@mirai/core 0.2.19 → 0.3.2
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 +67 -50
- package/build/Core.Notifications.js.map +1 -1
- package/build/Core.constants.js +13 -11
- 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 +69 -48
- package/build/Core.js.map +1 -1
- package/build/Core.provider.js +91 -41
- package/build/Core.provider.js.map +1 -1
- package/build/components/Booking/Booking.constants.js +48 -0
- package/build/components/Booking/Booking.constants.js.map +1 -0
- package/build/components/Booking/Booking.js +220 -0
- package/build/components/Booking/Booking.js.map +1 -0
- package/build/components/Booking/Booking.l10n.js +233 -0
- package/build/components/Booking/Booking.l10n.js.map +1 -0
- package/build/components/Booking/Booking.module.css +273 -0
- package/build/components/{user → Booking}/Booking.skeleton.js +12 -14
- package/build/components/Booking/Booking.skeleton.js.map +1 -0
- package/build/components/Booking/__tests__/__snapshots__/Booking.test.js.snap +83 -0
- package/build/components/Booking/components/Field/Field.js +70 -0
- package/build/components/Booking/components/Field/Field.js.map +1 -0
- package/build/components/Booking/components/Field/Field.l10n.js +12 -0
- package/build/components/Booking/components/Field/Field.l10n.js.map +1 -0
- package/build/components/Booking/components/Field/Field.module.css +48 -0
- package/build/components/Booking/components/Field/__tests__/__snapshots__/Field.test.js.snap +139 -0
- package/build/components/Booking/components/Field/index.js +17 -0
- package/build/components/Booking/components/Field/index.js.map +1 -0
- package/build/components/Booking/components/index.js +17 -0
- package/build/components/Booking/components/index.js.map +1 -0
- package/build/components/Booking/helpers/getOccupationCaption.js +64 -0
- package/build/components/Booking/helpers/getOccupationCaption.js.map +1 -0
- package/build/components/Booking/helpers/index.js +28 -0
- package/build/components/Booking/helpers/index.js.map +1 -0
- package/build/components/Booking/helpers/trackStateChange.js +97 -0
- package/build/components/Booking/helpers/trackStateChange.js.map +1 -0
- package/build/components/Booking/index.js +13 -0
- package/build/components/Booking/index.js.map +1 -0
- package/build/components/Booking/mocks/booking.json +176 -0
- package/build/components/Booking/partials/Booking.Details.js +133 -0
- package/build/components/Booking/partials/Booking.Details.js.map +1 -0
- package/build/components/Booking/partials/Booking.FormCancel.js +107 -0
- package/build/components/Booking/partials/Booking.FormCancel.js.map +1 -0
- package/build/components/Booking/partials/Booking.FormEdit.js +22 -0
- package/build/components/Booking/partials/Booking.FormEdit.js.map +1 -0
- package/build/components/Booking/partials/Booking.FormResend.js +53 -0
- package/build/components/Booking/partials/Booking.FormResend.js.map +1 -0
- package/build/components/Booking/partials/Booking.Menu.js +98 -0
- package/build/components/Booking/partials/Booking.Menu.js.map +1 -0
- package/build/components/Booking/partials/Booking.Modal.js +181 -0
- package/build/components/Booking/partials/Booking.Modal.js.map +1 -0
- package/build/components/Booking/partials/Booking.ModalAgency.js +65 -0
- package/build/components/Booking/partials/Booking.ModalAgency.js.map +1 -0
- package/build/components/Booking/partials/Booking.Others.js +115 -0
- package/build/components/Booking/partials/Booking.Others.js.map +1 -0
- package/build/components/Booking/partials/Booking.PriceBreakdown.js +144 -0
- package/build/components/Booking/partials/Booking.PriceBreakdown.js.map +1 -0
- package/build/components/Booking/partials/Booking.Summary.js +255 -0
- package/build/components/Booking/partials/Booking.Summary.js.map +1 -0
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Details.test.js.snap +4677 -0
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Menu.test.js.snap +638 -0
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +400 -0
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap +442 -0
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Summary.test.js.snap +1066 -0
- package/build/components/Booking/partials/index.js +72 -0
- package/build/components/Booking/partials/index.js.map +1 -0
- package/build/components/BookingQuery/BookingQuery.constants.js +11 -0
- package/build/components/BookingQuery/BookingQuery.constants.js.map +1 -0
- package/build/components/BookingQuery/BookingQuery.js +199 -0
- package/build/components/BookingQuery/BookingQuery.js.map +1 -0
- package/build/components/BookingQuery/BookingQuery.l10n.js +36 -0
- package/build/components/BookingQuery/BookingQuery.l10n.js.map +1 -0
- package/build/components/BookingQuery/BookingQuery.module.css +17 -0
- package/build/components/{user → BookingQuery}/BookingQuery.skeleton.js +4 -3
- package/build/components/BookingQuery/BookingQuery.skeleton.js.map +1 -0
- package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +1106 -0
- package/build/components/BookingQuery/helpers/getErrorText.js +12 -0
- package/build/components/BookingQuery/helpers/getErrorText.js.map +1 -0
- package/build/components/BookingQuery/helpers/index.js +17 -0
- package/build/components/BookingQuery/helpers/index.js.map +1 -0
- package/build/components/BookingQuery/index.js +13 -0
- package/build/components/BookingQuery/index.js.map +1 -0
- package/build/components/Checkout/Checkout.constants.js +45 -0
- package/build/components/Checkout/Checkout.constants.js.map +1 -0
- package/build/components/Checkout/Checkout.js +182 -0
- package/build/components/Checkout/Checkout.js.map +1 -0
- package/build/components/Checkout/Checkout.l10n.js +125 -0
- package/build/components/Checkout/Checkout.l10n.js.map +1 -0
- package/build/components/Checkout/Checkout.module.css +250 -0
- package/build/components/{user → Checkout}/Checkout.skeleton.js +10 -12
- package/build/components/Checkout/Checkout.skeleton.js.map +1 -0
- package/build/components/Checkout/__tests__/__snapshots__/Checkout.test.js.snap +133 -0
- package/build/components/Checkout/components/InputRadio/InputRadio.js +67 -0
- package/build/components/Checkout/components/InputRadio/InputRadio.js.map +1 -0
- package/build/components/Checkout/components/InputRadio/InputRadio.module.css +3 -0
- package/build/components/Checkout/components/InputRadio/__tests__/__snapshots__/InputRadio.test.js.snap +323 -0
- package/build/components/Checkout/components/InputRadio/index.js +17 -0
- package/build/components/Checkout/components/InputRadio/index.js.map +1 -0
- package/build/components/Checkout/components/index.js +17 -0
- package/build/components/Checkout/components/index.js.map +1 -0
- package/build/components/Checkout/helpers/generateId.js +21 -0
- package/build/components/Checkout/helpers/generateId.js.map +1 -0
- package/build/components/Checkout/helpers/getFieldProps.js +79 -0
- package/build/components/Checkout/helpers/getFieldProps.js.map +1 -0
- package/build/components/Checkout/helpers/getVariant.js +34 -0
- package/build/components/Checkout/helpers/getVariant.js.map +1 -0
- package/build/components/Checkout/helpers/index.js +61 -0
- package/build/components/Checkout/helpers/index.js.map +1 -0
- package/build/components/Checkout/helpers/testDNI.js +12 -0
- package/build/components/Checkout/helpers/testDNI.js.map +1 -0
- package/build/components/Checkout/helpers/trackDataSource.js +117 -0
- package/build/components/Checkout/helpers/trackDataSource.js.map +1 -0
- package/build/components/Checkout/helpers/trackForm.js +25 -0
- package/build/components/Checkout/helpers/trackForm.js.map +1 -0
- package/build/components/Checkout/index.js +13 -0
- package/build/components/Checkout/index.js.map +1 -0
- package/build/components/Checkout/mocks/checkout.json +519 -0
- package/build/components/Checkout/partials/Checkout.Confirmation.js +237 -0
- package/build/components/Checkout/partials/Checkout.Confirmation.js.map +1 -0
- package/build/components/Checkout/partials/Checkout.Details.js +172 -0
- package/build/components/Checkout/partials/Checkout.Details.js.map +1 -0
- package/build/components/Checkout/partials/Checkout.Form.js +215 -0
- package/build/components/Checkout/partials/Checkout.Form.js.map +1 -0
- package/build/components/Checkout/partials/Checkout.Session.js +108 -0
- package/build/components/Checkout/partials/Checkout.Session.js.map +1 -0
- package/build/components/Checkout/partials/Checkout.Summary.Line.js +56 -0
- package/build/components/Checkout/partials/Checkout.Summary.Line.js.map +1 -0
- package/build/components/Checkout/partials/Checkout.Summary.js +196 -0
- package/build/components/Checkout/partials/Checkout.Summary.js.map +1 -0
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +1580 -0
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Details.test.js.snap +1636 -0
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +5650 -0
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Session.test.js.snap +770 -0
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Summary.test.js.snap +798 -0
- package/build/components/Checkout/partials/index.js +61 -0
- package/build/components/Checkout/partials/index.js.map +1 -0
- package/build/components/Deals/Deals.Calendar.js +180 -0
- package/build/components/Deals/Deals.Calendar.js.map +1 -0
- package/build/components/Deals/Deals.constants.js +16 -0
- package/build/components/Deals/Deals.constants.js.map +1 -0
- package/build/components/Deals/Deals.js +281 -0
- package/build/components/Deals/Deals.js.map +1 -0
- package/build/components/Deals/Deals.l10n.js +43 -0
- package/build/components/Deals/Deals.l10n.js.map +1 -0
- package/build/components/Deals/Deals.module.css +106 -0
- package/build/components/{finder → Deals}/Deals.skeleton.js +17 -19
- package/build/components/Deals/Deals.skeleton.js.map +1 -0
- package/build/components/Deals/__tests__/__snapshots__/Deals.Calendar.test.js.snap +4584 -0
- package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +7893 -0
- package/build/components/Deals/helpers/__tests__/__mocks__/deal.json +25 -0
- package/build/components/Deals/helpers/calcFromDate.js +20 -0
- package/build/components/Deals/helpers/calcFromDate.js.map +1 -0
- package/build/components/Deals/helpers/calcMinStay.js +24 -0
- package/build/components/Deals/helpers/calcMinStay.js.map +1 -0
- package/build/components/Deals/helpers/calcNightWithDeals.js +17 -0
- package/build/components/Deals/helpers/calcNightWithDeals.js.map +1 -0
- package/build/components/Deals/helpers/calcToDate.js +19 -0
- package/build/components/Deals/helpers/calcToDate.js.map +1 -0
- package/build/components/Deals/helpers/calcTooltips.js +59 -0
- package/build/components/Deals/helpers/calcTooltips.js.map +1 -0
- package/build/components/Deals/helpers/getCurrency.js +19 -0
- package/build/components/Deals/helpers/getCurrency.js.map +1 -0
- package/build/components/Deals/helpers/index.js +83 -0
- package/build/components/Deals/helpers/index.js.map +1 -0
- package/build/components/Deals/helpers/validate.js +37 -0
- package/build/components/Deals/helpers/validate.js.map +1 -0
- package/build/components/Deals/index.js +13 -0
- package/build/components/Deals/index.js.map +1 -0
- package/build/components/Environment/Environment.js +47 -0
- package/build/components/Environment/Environment.js.map +1 -0
- package/build/components/Environment/Environment.module.css +6 -0
- package/build/components/Environment/index.js +13 -0
- package/build/components/Environment/index.js.map +1 -0
- package/build/components/Finder/Finder.constants.js +37 -0
- package/build/components/Finder/Finder.constants.js.map +1 -0
- package/build/components/Finder/Finder.js +242 -0
- package/build/components/Finder/Finder.js.map +1 -0
- package/build/components/Finder/Finder.l10n.js +21 -0
- package/build/components/Finder/Finder.l10n.js.map +1 -0
- package/build/components/Finder/Finder.module.css +46 -0
- package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +11469 -0
- package/build/components/Finder/components/Calendar/Calendar.constants.js +19 -0
- package/build/components/Finder/components/Calendar/Calendar.constants.js.map +1 -0
- package/build/components/Finder/components/Calendar/Calendar.js +209 -0
- package/build/components/Finder/components/Calendar/Calendar.js.map +1 -0
- package/build/components/Finder/components/Calendar/Calendar.l10n.js +25 -0
- package/build/components/Finder/components/Calendar/Calendar.l10n.js.map +1 -0
- package/build/components/Finder/components/Calendar/Calendar.module.css +28 -0
- package/build/components/Finder/components/Calendar/__tests__/__mocks__/prices.json +11 -0
- package/build/components/Finder/components/Calendar/__tests__/__snapshots__/Calendar.test.js.snap +10164 -0
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js +86 -0
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js.map +1 -0
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js +15 -0
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js.map +1 -0
- package/build/components/Finder/components/Calendar/helpers/index.js +28 -0
- package/build/components/Finder/components/Calendar/helpers/index.js.map +1 -0
- package/build/components/Finder/components/Calendar/index.js +17 -0
- package/build/components/Finder/components/Calendar/index.js.map +1 -0
- package/build/components/Finder/components/Places/Places.js +108 -0
- package/build/components/Finder/components/Places/Places.js.map +1 -0
- package/build/components/Finder/components/Places/Places.l10n.js +12 -0
- package/build/components/Finder/components/Places/Places.l10n.js.map +1 -0
- package/build/components/Finder/components/Places/Places.module.css +83 -0
- package/build/components/Finder/components/Places/__tests__/__mocks__/places.json +44 -0
- package/build/components/Finder/components/Places/__tests__/__snapshots__/Places.test.js.snap +288 -0
- package/build/components/Finder/components/Places/helpers/calcColumns.js +40 -0
- package/build/components/Finder/components/Places/helpers/calcColumns.js.map +1 -0
- package/build/components/Finder/components/Places/helpers/index.js +17 -0
- package/build/components/Finder/components/Places/helpers/index.js.map +1 -0
- package/build/components/Finder/components/Places/index.js +17 -0
- package/build/components/Finder/components/Places/index.js.map +1 -0
- package/build/components/Finder/components/index.js +28 -0
- package/build/components/Finder/components/index.js.map +1 -0
- package/build/components/Finder/helpers/__tests__/__mocks__/chain.json +1113 -0
- package/build/components/Finder/helpers/__tests__/__mocks__/dataSource.json +1382 -0
- package/build/components/Finder/helpers/__tests__/__mocks__/hotel.json +199 -0
- package/build/components/Finder/helpers/getDataSource.js +65 -0
- package/build/components/Finder/helpers/getDataSource.js.map +1 -0
- package/build/components/Finder/helpers/getHotels.js +41 -0
- package/build/components/Finder/helpers/getHotels.js.map +1 -0
- package/build/components/Finder/helpers/getOccupationDataSource.js +107 -0
- package/build/components/Finder/helpers/getOccupationDataSource.js.map +1 -0
- package/build/components/Finder/helpers/getPlaceCaption.js +15 -0
- package/build/components/Finder/helpers/getPlaceCaption.js.map +1 -0
- package/build/components/Finder/helpers/getPlacesOptions.js +50 -0
- package/build/components/Finder/helpers/getPlacesOptions.js.map +1 -0
- package/build/components/Finder/helpers/index.js +94 -0
- package/build/components/Finder/helpers/index.js.map +1 -0
- package/build/components/Finder/helpers/parseCalendarProps.js +29 -0
- package/build/components/Finder/helpers/parseCalendarProps.js.map +1 -0
- package/build/components/Finder/helpers/parseValue.js +20 -0
- package/build/components/Finder/helpers/parseValue.js.map +1 -0
- package/build/components/Finder/helpers/validate.js +15 -0
- package/build/components/Finder/helpers/validate.js.map +1 -0
- package/build/components/Finder/index.js +13 -0
- package/build/components/Finder/index.js.map +1 -0
- package/build/components/Profile/Profile.Account.js +224 -0
- package/build/components/Profile/Profile.Account.js.map +1 -0
- package/build/components/Profile/Profile.Password.js +173 -0
- package/build/components/Profile/Profile.Password.js.map +1 -0
- package/build/components/Profile/Profile.Signout.js +137 -0
- package/build/components/Profile/Profile.Signout.js.map +1 -0
- package/build/components/Profile/Profile.constants.js +13 -0
- package/build/components/Profile/Profile.constants.js.map +1 -0
- package/build/components/Profile/Profile.js +75 -0
- package/build/components/Profile/Profile.js.map +1 -0
- package/build/components/Profile/Profile.l10n.js +100 -0
- package/build/components/Profile/Profile.l10n.js.map +1 -0
- package/build/components/Profile/Profile.module.css +70 -0
- package/build/components/Profile/Profile.skeleton.js +120 -0
- package/build/components/Profile/Profile.skeleton.js.map +1 -0
- package/build/components/Profile/components/Bookings/Booking.constants.js +20 -0
- package/build/components/Profile/components/Bookings/Booking.constants.js.map +1 -0
- package/build/components/Profile/components/Bookings/Booking.l10n.js +47 -0
- package/build/components/Profile/components/Bookings/Booking.l10n.js.map +1 -0
- package/build/components/Profile/components/Bookings/Bookings.Item.js +110 -0
- package/build/components/Profile/components/Bookings/Bookings.Item.js.map +1 -0
- package/build/components/Profile/components/Bookings/Bookings.Search.js +98 -0
- package/build/components/Profile/components/Bookings/Bookings.Search.js.map +1 -0
- package/build/components/Profile/components/Bookings/Bookings.js +184 -0
- package/build/components/Profile/components/Bookings/Bookings.js.map +1 -0
- package/build/components/Profile/components/Bookings/Bookings.module.css +171 -0
- package/build/components/Profile/components/Bookings/__tests__/__snapshots__/Bookings.test.js.snap +9 -0
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js +31 -0
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js.map +1 -0
- package/build/components/Profile/components/Bookings/helpers/index.js +17 -0
- package/build/components/Profile/components/Bookings/helpers/index.js.map +1 -0
- package/build/components/Profile/components/Bookings/index.js +17 -0
- package/build/components/Profile/components/Bookings/index.js.map +1 -0
- package/build/components/Profile/components/index.js +17 -0
- package/build/components/Profile/components/index.js.map +1 -0
- package/build/components/Profile/index.js +13 -0
- package/build/components/Profile/index.js.map +1 -0
- package/build/components/Session/Session.Account.js +161 -0
- package/build/components/Session/Session.Account.js.map +1 -0
- package/build/components/Session/Session.Login.Modal.js +334 -0
- package/build/components/Session/Session.Login.Modal.js.map +1 -0
- package/build/components/Session/Session.Login.js +85 -0
- package/build/components/Session/Session.Login.js.map +1 -0
- package/build/components/Session/Session.constants.js +26 -0
- package/build/components/Session/Session.constants.js.map +1 -0
- package/build/components/Session/Session.js +50 -0
- package/build/components/Session/Session.js.map +1 -0
- package/build/components/Session/Session.l10n.js +81 -0
- package/build/components/Session/Session.l10n.js.map +1 -0
- package/build/components/Session/Session.module.css +41 -0
- package/build/components/Session/Session.skeleton.js +19 -0
- package/build/components/Session/Session.skeleton.js.map +1 -0
- package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +1075 -0
- package/build/components/Session/helpers/getDomain.js +14 -0
- package/build/components/Session/helpers/getDomain.js.map +1 -0
- package/build/components/Session/helpers/getSignupUrl.js +19 -0
- package/build/components/Session/helpers/getSignupUrl.js.map +1 -0
- package/build/components/Session/helpers/index.js +50 -0
- package/build/components/Session/helpers/index.js.map +1 -0
- package/build/components/Session/helpers/template.js +18 -0
- package/build/components/Session/helpers/template.js.map +1 -0
- package/build/components/Session/helpers/trackLogin.js +23 -0
- package/build/components/Session/helpers/trackLogin.js.map +1 -0
- package/build/components/Session/index.js +13 -0
- package/build/components/Session/index.js.map +1 -0
- package/build/components/Signup/Signup.constants.js +8 -0
- package/build/components/Signup/Signup.constants.js.map +1 -0
- package/build/components/Signup/Signup.js +266 -0
- package/build/components/Signup/Signup.js.map +1 -0
- package/build/components/Signup/Signup.l10n.js +67 -0
- package/build/components/Signup/Signup.l10n.js.map +1 -0
- package/build/components/Signup/Signup.module.css +25 -0
- package/build/components/Signup/Signup.skeleton.js +93 -0
- package/build/components/Signup/Signup.skeleton.js.map +1 -0
- package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +1023 -0
- package/build/components/Signup/index.js +13 -0
- package/build/components/Signup/index.js.map +1 -0
- package/build/components/State/State.js +104 -0
- package/build/components/State/State.js.map +1 -0
- package/build/components/State/State.module.css +34 -0
- package/build/components/State/index.js +13 -0
- package/build/components/State/index.js.map +1 -0
- package/build/components/__shared__/BookingDates/BookingDates.constants.js +12 -0
- package/build/components/__shared__/BookingDates/BookingDates.constants.js.map +1 -0
- package/build/components/__shared__/BookingDates/BookingDates.js +74 -0
- package/build/components/__shared__/BookingDates/BookingDates.js.map +1 -0
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js +27 -0
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js.map +1 -0
- package/build/components/__shared__/BookingDates/BookingDates.module.css +13 -0
- package/build/components/__shared__/BookingDates/__tests__/__snapshots__/BookingDates.test.js.snap +208 -0
- package/build/components/__shared__/BookingDates/index.js +17 -0
- package/build/components/__shared__/BookingDates/index.js.map +1 -0
- package/build/components/__shared__/BookingTable/BookingTable.Row.js +123 -0
- package/build/components/__shared__/BookingTable/BookingTable.Row.js.map +1 -0
- package/build/components/__shared__/BookingTable/BookingTable.constants.js +18 -0
- package/build/components/__shared__/BookingTable/BookingTable.constants.js.map +1 -0
- package/build/components/__shared__/BookingTable/BookingTable.js +93 -0
- package/build/components/__shared__/BookingTable/BookingTable.js.map +1 -0
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js +15 -0
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js.map +1 -0
- package/build/components/__shared__/BookingTable/BookingTable.module.css +125 -0
- package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.Row.test.js.snap +456 -0
- package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.test.js.snap +619 -0
- package/build/components/__shared__/BookingTable/index.js +17 -0
- package/build/components/__shared__/BookingTable/index.js.map +1 -0
- package/build/components/__shared__/ButtonMore/ButtonMore.js +46 -0
- package/build/components/__shared__/ButtonMore/ButtonMore.js.map +1 -0
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js +12 -0
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonMore/ButtonMore.module.css +9 -0
- package/build/components/__shared__/ButtonMore/__tests__/__snapshots__/ButtonMore.test.js.snap +110 -0
- package/build/components/__shared__/ButtonMore/index.js +17 -0
- package/build/components/__shared__/ButtonMore/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js +21 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js +278 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js +13 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/ButtonPayment.module.css +3 -0
- package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +195 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js +95 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js +21 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.module.css +9 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/__tests__/__snapshots__/FormAddon.test.js.snap +68 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js +18 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js +37 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js +198 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js +30 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.module.css +27 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/__tests__/__snapshots__/FormCheckout.test.js.snap +308 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js +35 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js +8 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js +230 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js +30 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.module.css +26 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/__tests__/__snapshots__/FormPaycomet.test.js.snap +148 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js +24 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js +16 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js +136 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js +21 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.module.css +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/__tests__/__snapshots__/FormSipay.test.js.snap +149 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js +22 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js +54 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.module.css +60 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/__tests__/__snapshots__/InputField.test.js.snap +166 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/components/index.js +50 -0
- package/build/components/__shared__/ButtonPayment/components/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js +26 -0
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js +32 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js +29 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js +25 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js +39 -0
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/index.js +39 -0
- package/build/components/__shared__/ButtonPayment/helpers/index.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js +25 -0
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js +20 -0
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js.map +1 -0
- package/build/components/__shared__/ButtonPayment/index.js +17 -0
- package/build/components/__shared__/ButtonPayment/index.js.map +1 -0
- package/build/components/__shared__/Field/Field.js +91 -0
- package/build/components/__shared__/Field/Field.js.map +1 -0
- package/build/components/__shared__/Field/Field.module.css +105 -0
- package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +799 -0
- package/build/components/__shared__/Field/index.js +17 -0
- package/build/components/__shared__/Field/index.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js +87 -0
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js +12 -0
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/FieldOccupation.module.css +5 -0
- package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +2179 -0
- package/build/components/__shared__/FieldOccupation/helpers/__tests__/__mocks__/en.json +15 -0
- package/build/components/__shared__/FieldOccupation/helpers/__tests__/__mocks__/hotels.json +87 -0
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js +41 -0
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js +51 -0
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/helpers/index.js +28 -0
- package/build/components/__shared__/FieldOccupation/helpers/index.js.map +1 -0
- package/build/components/__shared__/FieldOccupation/index.js +17 -0
- package/build/components/__shared__/FieldOccupation/index.js.map +1 -0
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js +47 -0
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js.map +1 -0
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js +12 -0
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js.map +1 -0
- package/build/components/__shared__/FieldPromocode/FieldPromocode.module.css +19 -0
- package/build/components/__shared__/FieldPromocode/__tests__/__snapshots__/FieldPromocode.test.jsx.snap +272 -0
- package/build/components/__shared__/FieldPromocode/index.js +17 -0
- package/build/components/__shared__/FieldPromocode/index.js.map +1 -0
- package/build/components/__shared__/Occupation/Occupation.Group.js +110 -0
- package/build/components/__shared__/Occupation/Occupation.Group.js.map +1 -0
- package/build/components/__shared__/Occupation/Occupation.constants.js +76 -0
- package/build/components/__shared__/Occupation/Occupation.constants.js.map +1 -0
- package/build/components/__shared__/Occupation/Occupation.js +252 -0
- package/build/components/__shared__/Occupation/Occupation.js.map +1 -0
- package/build/components/__shared__/Occupation/Occupation.l10n.js +65 -0
- package/build/components/__shared__/Occupation/Occupation.l10n.js.map +1 -0
- package/build/components/__shared__/Occupation/Occupation.module.css +124 -0
- package/build/components/__shared__/Occupation/__tests__/__mocks__/occupation.json +17 -0
- package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +3591 -0
- package/build/components/__shared__/Occupation/helpers/checkRoom.js +36 -0
- package/build/components/__shared__/Occupation/helpers/checkRoom.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js +92 -0
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js +31 -0
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js +32 -0
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js +17 -0
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/index.js +72 -0
- package/build/components/__shared__/Occupation/helpers/index.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js +32 -0
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js.map +1 -0
- package/build/components/__shared__/Occupation/helpers/toParties.js +41 -0
- package/build/components/__shared__/Occupation/helpers/toParties.js.map +1 -0
- package/build/components/__shared__/Occupation/index.js +28 -0
- package/build/components/__shared__/Occupation/index.js.map +1 -0
- package/build/components/__shared__/Payment/Payment.constants.js +39 -0
- package/build/components/__shared__/Payment/Payment.constants.js.map +1 -0
- package/build/components/__shared__/Payment/Payment.js +197 -0
- package/build/components/__shared__/Payment/Payment.js.map +1 -0
- package/build/components/__shared__/Payment/Payment.l10n.js +84 -0
- package/build/components/__shared__/Payment/Payment.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/Payment.module.css +61 -0
- package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +750 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js +43 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js.map +1 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js +188 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js.map +1 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js +18 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.module.css +8 -0
- package/build/components/__shared__/Payment/components/AmazonPay/__tests__/__snapshots__/AmazonPay.test.js.snap +23 -0
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js +16 -0
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js.map +1 -0
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js +17 -0
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/AmazonPay/index.js +17 -0
- package/build/components/__shared__/Payment/components/AmazonPay/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js +96 -0
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js.map +1 -0
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js +12 -0
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/components/Aplazame/__tests__/__snapshots__/Aplazame.test.js.snap +30 -0
- package/build/components/__shared__/Payment/components/Aplazame/index.js +17 -0
- package/build/components/__shared__/Payment/components/Aplazame/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/Card.constants.js +29 -0
- package/build/components/__shared__/Payment/components/Card/Card.constants.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/Card.js +149 -0
- package/build/components/__shared__/Payment/components/Card/Card.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js +27 -0
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/Card.module.css +23 -0
- package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +887 -0
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +46 -0
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js +12 -0
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js +26 -0
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/index.js +61 -0
- package/build/components/__shared__/Payment/components/Card/helpers/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js +10 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js +13 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js +12 -0
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js.map +1 -0
- package/build/components/__shared__/Payment/components/Card/index.js +17 -0
- package/build/components/__shared__/Payment/components/Card/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js +25 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.js +317 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js +30 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/PCI.module.css +9 -0
- package/build/components/__shared__/Payment/components/PCI/__tests__/__snapshots__/PCI.test.js.snap +399 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +27 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js +30 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js +28 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/PCI/index.js +17 -0
- package/build/components/__shared__/Payment/components/PCI/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js +75 -0
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js.map +1 -0
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js +12 -0
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js.map +1 -0
- package/build/components/__shared__/Payment/components/Tpv/__tests__/__snapshots__/Tpv.test.js.snap +92 -0
- package/build/components/__shared__/Payment/components/Tpv/index.js +17 -0
- package/build/components/__shared__/Payment/components/Tpv/index.js.map +1 -0
- package/build/components/__shared__/Payment/components/index.js +61 -0
- package/build/components/__shared__/Payment/components/index.js.map +1 -0
- package/build/components/__shared__/Payment/helpers/getCaption.js +38 -0
- package/build/components/__shared__/Payment/helpers/getCaption.js.map +1 -0
- package/build/components/__shared__/Payment/helpers/getComponent.js +29 -0
- package/build/components/__shared__/Payment/helpers/getComponent.js.map +1 -0
- package/build/components/__shared__/Payment/helpers/getImage.js +15 -0
- package/build/components/__shared__/Payment/helpers/getImage.js.map +1 -0
- package/build/components/__shared__/Payment/helpers/index.js +39 -0
- package/build/components/__shared__/Payment/helpers/index.js.map +1 -0
- package/build/components/__shared__/Payment/index.js +49 -0
- package/build/components/__shared__/Payment/index.js.map +1 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js +50 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js.map +1 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js +122 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js.map +1 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js +78 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js.map +1 -0
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.module.css +30 -0
- package/build/components/__shared__/PriceBreakdown/index.js +17 -0
- package/build/components/__shared__/PriceBreakdown/index.js.map +1 -0
- package/build/components/__shared__/Skeleton/Skeleton.js +35 -0
- package/build/components/__shared__/Skeleton/Skeleton.js.map +1 -0
- package/build/components/__shared__/Skeleton/index.js +17 -0
- package/build/components/__shared__/Skeleton/index.js.map +1 -0
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js +32 -0
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js.map +1 -0
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js +13 -0
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js.map +1 -0
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.module.css +8 -0
- package/build/components/__shared__/TextRequiredFields/__tests__/__snapshots__/TextRequiredFields.test.js.snap +41 -0
- package/build/components/__shared__/TextRequiredFields/index.js +17 -0
- package/build/components/__shared__/TextRequiredFields/index.js.map +1 -0
- package/build/components/__shared__/index.js +138 -0
- package/build/components/__shared__/index.js.map +1 -0
- package/build/components/helpers/ICON.js +33 -0
- package/build/components/helpers/ICON.js.map +1 -0
- package/build/components/helpers/__tests__/__snapshots__/parseHtml.test.js.snap +313 -0
- package/build/components/helpers/constants.js +62 -0
- package/build/components/helpers/constants.js.map +1 -0
- package/build/components/helpers/getButtonPaymentKey.js +23 -0
- package/build/components/helpers/getButtonPaymentKey.js.map +1 -0
- package/build/components/helpers/getButtonPaymentKey.l10n.js +18 -0
- package/build/components/helpers/getButtonPaymentKey.l10n.js.map +1 -0
- package/build/components/helpers/getCalendarCaption.js +37 -0
- package/build/components/helpers/getCalendarCaption.js.map +1 -0
- package/build/components/helpers/getCountryCode.js +11 -0
- package/build/components/helpers/getCountryCode.js.map +1 -0
- package/build/components/helpers/index.js +138 -0
- package/build/components/helpers/index.js.map +1 -0
- package/build/components/helpers/isJest.js +9 -0
- package/build/components/helpers/isJest.js.map +1 -0
- package/build/components/helpers/parseHtml.js +76 -0
- package/build/components/helpers/parseHtml.js.map +1 -0
- package/build/components/helpers/testPassword.js +11 -0
- package/build/components/helpers/testPassword.js.map +1 -0
- package/build/components/helpers/toQueryString.js +23 -0
- package/build/components/helpers/toQueryString.js.map +1 -0
- package/build/components/helpers/toUrlParams.js +23 -0
- package/build/components/helpers/toUrlParams.js.map +1 -0
- package/build/components/helpers/trace.js +19 -0
- package/build/components/helpers/trace.js.map +1 -0
- package/build/components/helpers/translate.js +27 -0
- package/build/components/helpers/translate.js.map +1 -0
- package/build/components/index.js +75 -30
- package/build/components/index.js.map +1 -1
- package/build/helpers/checkSession.js +42 -20
- package/build/helpers/checkSession.js.map +1 -1
- package/build/helpers/consolidateStore.js +113 -98
- package/build/helpers/consolidateStore.js.map +1 -1
- package/build/helpers/fetchConfig.js +58 -16
- package/build/helpers/fetchConfig.js.map +1 -1
- package/build/helpers/fetchCookies.js +13 -12
- package/build/helpers/fetchCookies.js.map +1 -1
- package/build/helpers/fetchSession.js +30 -33
- package/build/helpers/fetchSession.js.map +1 -1
- package/build/helpers/fetchUrlParams.js +2 -3
- package/build/helpers/fetchUrlParams.js.map +1 -1
- package/build/helpers/findComponents.js +26 -21
- package/build/helpers/findComponents.js.map +1 -1
- package/build/helpers/findDangerousCSSRules.js +48 -21
- package/build/helpers/findDangerousCSSRules.js.map +1 -1
- package/build/helpers/findInstance.js +34 -20
- 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 +13 -6
- package/build/helpers/getGhost.js.map +1 -1
- package/build/helpers/getLocale.js +23 -12
- package/build/helpers/getLocale.js.map +1 -1
- package/build/helpers/getTags.js +30 -24
- 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 +8 -9
- package/build/helpers/loadEnvironment.js.map +1 -1
- package/build/helpers/loadSentry.js +6 -6
- package/build/helpers/loadSentry.js.map +1 -1
- package/build/helpers/theme.js +27 -16
- package/build/helpers/theme.js.map +1 -1
- package/build/index.js +120 -71
- 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 +49 -21
- 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 +54 -22
- 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/index.js +2 -2
- package/build/services/index.js.map +1 -1
- package/package.json +13 -14
- package/public/App.Container.jsx +129 -0
- package/public/App.jsx +28 -0
- package/public/App.module.css +141 -0
- package/public/index.html +7 -51
- package/public/index.template.html +19 -0
- package/public/routes/Deals.jsx +19 -0
- package/public/routes/Home.jsx +36 -0
- package/public/routes/NotFound.jsx +18 -0
- package/public/routes/Profile.jsx +20 -0
- package/public/routes/Signup.jsx +19 -0
- package/public/routes/Step0-Accommodations.jsx +4 -0
- package/public/routes/Step1-Rates.jsx +4 -0
- package/public/routes/Step2-Checkout.jsx +4 -0
- package/public/routes/Step3-Booking.jsx +4 -0
- package/public/routes/index.js +9 -0
- package/public/routes/routes.module.css +93 -0
- package/public/themes/monalisa.theme.css +25 -0
- package/build/components/__internal__/Environment.js +0 -45
- package/build/components/__internal__/Environment.js.map +0 -1
- package/build/components/__internal__/Environment.module.css +0 -4
- package/build/components/__internal__/Skeleton.js +0 -30
- package/build/components/__internal__/Skeleton.js.map +0 -1
- package/build/components/__internal__/State.js +0 -59
- package/build/components/__internal__/State.js.map +0 -1
- package/build/components/__internal__/State.module.css +0 -36
- package/build/components/finder/Deals.js +0 -9
- package/build/components/finder/Deals.js.map +0 -1
- package/build/components/finder/Deals.skeleton.js.map +0 -1
- package/build/components/finder/Finder.js +0 -31
- package/build/components/finder/Finder.js.map +0 -1
- package/build/components/user/Booking.js +0 -9
- package/build/components/user/Booking.js.map +0 -1
- package/build/components/user/Booking.skeleton.js.map +0 -1
- package/build/components/user/BookingQuery.js +0 -9
- package/build/components/user/BookingQuery.js.map +0 -1
- package/build/components/user/BookingQuery.skeleton.js.map +0 -1
- package/build/components/user/Checkout.js +0 -9
- package/build/components/user/Checkout.js.map +0 -1
- package/build/components/user/Checkout.skeleton.js.map +0 -1
- package/build/components/user/Profile.js +0 -9
- package/build/components/user/Profile.js.map +0 -1
- package/build/components/user/Profile.skeleton.js +0 -119
- package/build/components/user/Profile.skeleton.js.map +0 -1
- package/build/components/user/Session.js +0 -9
- package/build/components/user/Session.js.map +0 -1
- package/build/components/user/Session.skeleton.js +0 -18
- package/build/components/user/Session.skeleton.js.map +0 -1
- package/build/components/user/Signup.js +0 -9
- package/build/components/user/Signup.js.map +0 -1
- package/build/components/user/Signup.skeleton.js +0 -92
- package/build/components/user/Signup.skeleton.js.map +0 -1
- package/public/customer.css +0 -124
- package/site/booking/index.html +0 -20
- package/site/checkout/index.html +0 -20
- package/site/core.css +0 -8
- package/site/customer.css +0 -147
- package/site/deals/index.html +0 -34
- package/site/index.html +0 -58
- package/site/profile/index.html +0 -32
- package/site/signup/index.html +0 -32
- /package/build/components/{__internal__ → __shared__/Skeleton}/Skeleton.module.css +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _FieldPromocode = require("./FieldPromocode");
|
|
7
|
+
Object.keys(_FieldPromocode).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _FieldPromocode[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _FieldPromocode[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_FieldPromocode","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/__shared__/FieldPromocode/index.js"],"sourcesContent":["export * from './FieldPromocode';\n"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.OccupationGroup = void 0;
|
|
8
|
+
var _locale = require("@mirai/locale");
|
|
9
|
+
var _ui = require("@mirai/ui");
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
var _Occupation = require("./Occupation.constants");
|
|
14
|
+
var _Occupation2 = require("./Occupation.l10n");
|
|
15
|
+
var style = _interopRequireWildcard(require("./Occupation.module.css"));
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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); }
|
|
20
|
+
var OccupationGroup = exports.OccupationGroup = function OccupationGroup(_ref) {
|
|
21
|
+
var _ref$age = _ref.age,
|
|
22
|
+
age = _ref$age === void 0 ? [] : _ref$age,
|
|
23
|
+
_ref$fulfill = _ref.fulfill,
|
|
24
|
+
fulfill = _ref$fulfill === void 0 ? false : _ref$fulfill,
|
|
25
|
+
max = _ref.max,
|
|
26
|
+
_ref$min = _ref.min,
|
|
27
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
28
|
+
_ref$type = _ref.type,
|
|
29
|
+
type = _ref$type === void 0 ? _Occupation.TYPE.ADULT : _ref$type,
|
|
30
|
+
_ref$value = _ref.value,
|
|
31
|
+
value = _ref$value === void 0 ? {} : _ref$value,
|
|
32
|
+
_ref$onChange = _ref.onChange,
|
|
33
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
34
|
+
var _useLocale = (0, _locale.useLocale)(),
|
|
35
|
+
translate = _useLocale.translate;
|
|
36
|
+
(0, _react.useEffect)(function () {}, []);
|
|
37
|
+
var amount = value.amount,
|
|
38
|
+
_value$ages = value.ages,
|
|
39
|
+
ages = _value$ages === void 0 ? [] : _value$ages;
|
|
40
|
+
var handleAmount = function handleAmount(nextAmount) {
|
|
41
|
+
if (nextAmount < amount) ages.pop();else ages.push(undefined);
|
|
42
|
+
onChange({
|
|
43
|
+
ages: ages,
|
|
44
|
+
amount: nextAmount,
|
|
45
|
+
type: type
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var handleAge = function handleAge() {
|
|
49
|
+
var nextAge = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
50
|
+
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
51
|
+
ages[index] = nextAge.length !== 0 ? parseInt(nextAge, 10) : undefined;
|
|
52
|
+
onChange({
|
|
53
|
+
ages: ages,
|
|
54
|
+
amount: amount,
|
|
55
|
+
type: type
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.InputNumber, {
|
|
59
|
+
hint: (0, _helpers.getGroupHint)(age, translate),
|
|
60
|
+
label: translate(_Occupation2.L10N.LABEL_OCCUPATION_TYPE[type], {
|
|
61
|
+
// ! TODO: Should use a better bind
|
|
62
|
+
adults: '',
|
|
63
|
+
children: '',
|
|
64
|
+
guests: ''
|
|
65
|
+
}),
|
|
66
|
+
max: max,
|
|
67
|
+
min: min,
|
|
68
|
+
name: "occupation-".concat(type, "-").concat(max || ''),
|
|
69
|
+
rounded: true,
|
|
70
|
+
step: 1,
|
|
71
|
+
value: amount,
|
|
72
|
+
className: (0, _ui.styles)(style.inputNumber, style.offset),
|
|
73
|
+
onChange: handleAmount
|
|
74
|
+
}), fulfill && amount > 0 && /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
75
|
+
className: (0, _ui.styles)(style.ages, style.offset)
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
77
|
+
row: true,
|
|
78
|
+
className: style.inputs
|
|
79
|
+
}, Array.from({
|
|
80
|
+
length: amount
|
|
81
|
+
}, function (_, index) {
|
|
82
|
+
var _ages$index;
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(_ui.InputSelect, _extends({}, (0, _helpers.getAgeOptions)(age, translate), {
|
|
84
|
+
name: "age-".concat(age),
|
|
85
|
+
error: ages[index] === undefined,
|
|
86
|
+
key: index,
|
|
87
|
+
value: (_ages$index = ages[index]) === null || _ages$index === void 0 ? void 0 : _ages$index.toString(),
|
|
88
|
+
onChange: function onChange(value) {
|
|
89
|
+
return handleAge(value, index);
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
})), [_Occupation.TYPE.CHILD, _Occupation.TYPE.INFANT].includes(type) && /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
93
|
+
lighten: true,
|
|
94
|
+
small: true
|
|
95
|
+
}, translate(_Occupation2.L10N.LABEL_AGE_HINT))));
|
|
96
|
+
};
|
|
97
|
+
OccupationGroup.displayName = 'Finder:Occupation:OccupationGroup';
|
|
98
|
+
OccupationGroup.propTypes = {
|
|
99
|
+
age: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
100
|
+
fulfill: _propTypes.default.bool,
|
|
101
|
+
max: _propTypes.default.number,
|
|
102
|
+
min: _propTypes.default.number,
|
|
103
|
+
type: _propTypes.default.number.isRequired,
|
|
104
|
+
value: _propTypes.default.shape({
|
|
105
|
+
amount: _propTypes.default.number,
|
|
106
|
+
ages: _propTypes.default.arrayOf(_propTypes.default.number)
|
|
107
|
+
}),
|
|
108
|
+
onChange: _propTypes.default.func.isRequired
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=Occupation.Group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Occupation.Group.js","names":["_locale","require","_ui","_propTypes","_interopRequireDefault","_react","_interopRequireWildcard","_helpers","_Occupation","_Occupation2","style","_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","OccupationGroup","exports","_ref","_ref$age","age","_ref$fulfill","fulfill","max","_ref$min","min","_ref$type","type","TYPE","ADULT","_ref$value","value","_ref$onChange","onChange","_useLocale","useLocale","translate","useEffect","amount","_value$ages","ages","handleAmount","nextAmount","pop","push","undefined","handleAge","nextAge","index","parseInt","createElement","Fragment","InputNumber","hint","getGroupHint","label","L10N","LABEL_OCCUPATION_TYPE","adults","children","guests","name","concat","rounded","step","className","styles","inputNumber","offset","View","row","inputs","Array","from","_","_ages$index","InputSelect","getAgeOptions","error","toString","CHILD","INFANT","includes","Text","lighten","small","LABEL_AGE_HINT","displayName","propTypes","PropTypes","arrayOf","number","bool","isRequired","shape","func"],"sources":["../../../../src/components/__shared__/Occupation/Occupation.Group.jsx"],"sourcesContent":["import { useLocale } from '@mirai/locale';\nimport { InputNumber, InputSelect, styles, Text, View } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React, { useEffect } from 'react';\n\nimport { getAgeOptions, getGroupHint } from './helpers';\nimport { TYPE } from './Occupation.constants';\nimport { L10N } from './Occupation.l10n';\nimport * as style from './Occupation.module.css';\n\nconst OccupationGroup = ({\n age = [],\n fulfill = false,\n max,\n min = 0,\n type = TYPE.ADULT,\n value = {},\n onChange = () => {},\n}) => {\n const { translate } = useLocale();\n\n useEffect(() => {}, []);\n\n const { amount, ages = [] } = value;\n\n const handleAmount = (nextAmount) => {\n if (nextAmount < amount) ages.pop();\n else ages.push(undefined);\n onChange({ ages, amount: nextAmount, type });\n };\n\n const handleAge = (nextAge = '', index) => {\n ages[index] = nextAge.length !== 0 ? parseInt(nextAge, 10) : undefined;\n onChange({ ages, amount, type });\n };\n\n return (\n <>\n <InputNumber\n hint={getGroupHint(age, translate)}\n label={translate(L10N.LABEL_OCCUPATION_TYPE[type], {\n // ! TODO: Should use a better bind\n adults: '',\n children: '',\n guests: '',\n })}\n max={max}\n min={min}\n name={`occupation-${type}-${max || ''}`}\n rounded\n step={1}\n value={amount}\n className={styles(style.inputNumber, style.offset)}\n onChange={handleAmount}\n />\n {fulfill && amount > 0 && (\n <View className={styles(style.ages, style.offset)}>\n <View row className={style.inputs}>\n {Array.from({ length: amount }, (_, index) => (\n <InputSelect\n {...getAgeOptions(age, translate)}\n name={`age-${age}`}\n error={ages[index] === undefined}\n key={index}\n value={ages[index]?.toString()}\n onChange={(value) => handleAge(value, index)}\n />\n ))}\n </View>\n {[TYPE.CHILD, TYPE.INFANT].includes(type) && (\n <Text lighten small>\n {translate(L10N.LABEL_AGE_HINT)}\n </Text>\n )}\n </View>\n )}\n </>\n );\n};\n\nOccupationGroup.displayName = 'Finder:Occupation:OccupationGroup';\n\nOccupationGroup.propTypes = {\n age: PropTypes.arrayOf(PropTypes.number),\n fulfill: PropTypes.bool,\n max: PropTypes.number,\n min: PropTypes.number,\n type: PropTypes.number.isRequired,\n value: PropTypes.shape({\n amount: PropTypes.number,\n ages: PropTypes.arrayOf(PropTypes.number),\n }),\n onChange: PropTypes.func.isRequired,\n};\n\nexport { OccupationGroup };\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;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAJ,uBAAA,CAAAL,OAAA;AAAiD,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,4BAAAG,OAAA,EAAAH,GAAA,UAAAI,KAAA,GAAAT,wBAAA,CAAAC,WAAA,OAAAQ,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAL,GAAA,YAAAI,KAAA,CAAAE,GAAA,CAAAN,GAAA,SAAAO,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAZ,GAAA,QAAAY,GAAA,kBAAAH,MA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ACC,OAAO,CAACD,kBAAS,CAACE,MAAM,CAAC;EACxCrE,OAAO,EAAEmE,kBAAS,CAACG,IAAI;EACvBrE,GAAG,EAAEkE,kBAAS,CAACE,MAAM;EACrBlE,GAAG,EAAEgE,kBAAS,CAACE,MAAM;EACrBhE,IAAI,EAAE8D,kBAAS,CAACE,MAAM,CAACE,UAAU;EACjC9D,KAAK,EAAE0D,kBAAS,CAACK,KAAK,CAAC;IACrBxD,MAAM,EAAEmD,kBAAS,CAACE,MAAM;IACxBnD,IAAI,EAAEiD,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,MAAM;EAC1C,CAAC,CAAC;EACF1D,QAAQ,EAAEwD,kBAAS,CAACM,IAAI,CAACF;AAC3B,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TYPE = exports.SHAPE = exports.PLACE_INDIVIDUAL = exports.PLACE = exports.ERROR = exports.DEFAULT_PLACE = exports.DEFAULT_AMOUNT = exports.DATASOURCE = exports.ACCOMMODATION_TYPE = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _PLACE;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
var ACCOMMODATION_TYPE = exports.ACCOMMODATION_TYPE = {
|
|
15
|
+
ROOM: 1,
|
|
16
|
+
APARTMENT: 2,
|
|
17
|
+
PITCH: 3,
|
|
18
|
+
ACCOMMODATION: 4,
|
|
19
|
+
VILLA: 5
|
|
20
|
+
};
|
|
21
|
+
var DEFAULT_AMOUNT = exports.DEFAULT_AMOUNT = 2;
|
|
22
|
+
var DEFAULT_PLACE = exports.DEFAULT_PLACE = 'ROOMS';
|
|
23
|
+
var ERROR = exports.ERROR = {
|
|
24
|
+
NO_ROOM: {
|
|
25
|
+
code: 1,
|
|
26
|
+
type: 'error',
|
|
27
|
+
message: 'There is no room for all individuals'
|
|
28
|
+
},
|
|
29
|
+
NOT_FILLED: {
|
|
30
|
+
code: 2,
|
|
31
|
+
type: 'warn',
|
|
32
|
+
message: 'Not all fields have been filled out'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var APARTMENT = ACCOMMODATION_TYPE.APARTMENT,
|
|
36
|
+
ACCOMMODATION = ACCOMMODATION_TYPE.ACCOMMODATION,
|
|
37
|
+
PITCH = ACCOMMODATION_TYPE.PITCH,
|
|
38
|
+
ROOM = ACCOMMODATION_TYPE.ROOM,
|
|
39
|
+
VILLA = ACCOMMODATION_TYPE.VILLA;
|
|
40
|
+
var PLACE = exports.PLACE = (_PLACE = {}, _defineProperty(_PLACE, ACCOMMODATION, 'accommodation'), _defineProperty(_PLACE, APARTMENT, 'apartment'), _defineProperty(_PLACE, PITCH, 'pitch'), _defineProperty(_PLACE, ROOM, 'room'), _defineProperty(_PLACE, VILLA, 'villa'), _PLACE);
|
|
41
|
+
var PLACE_INDIVIDUAL = exports.PLACE_INDIVIDUAL = {
|
|
42
|
+
APARTMENTS: APARTMENT,
|
|
43
|
+
LODGINGS: ACCOMMODATION,
|
|
44
|
+
PLOTS: PITCH,
|
|
45
|
+
ROOMS: ROOM,
|
|
46
|
+
VILLA: VILLA
|
|
47
|
+
};
|
|
48
|
+
var SHAPE = exports.SHAPE = {
|
|
49
|
+
DATASOURCE: _propTypes.default.shape({
|
|
50
|
+
type: _propTypes.default.number,
|
|
51
|
+
age: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
52
|
+
max: _propTypes.default.number,
|
|
53
|
+
min: _propTypes.default.number,
|
|
54
|
+
fulfill: _propTypes.default.bool
|
|
55
|
+
}),
|
|
56
|
+
VALUE: _propTypes.default.shape({
|
|
57
|
+
ages: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
58
|
+
amount: _propTypes.default.number,
|
|
59
|
+
type: _propTypes.default.number
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
var TYPE = exports.TYPE = {
|
|
63
|
+
GUEST: 1,
|
|
64
|
+
ADULT: 2,
|
|
65
|
+
CHILD: 3
|
|
66
|
+
};
|
|
67
|
+
var DATASOURCE = exports.DATASOURCE = [{
|
|
68
|
+
type: TYPE.ADULT,
|
|
69
|
+
min: 1,
|
|
70
|
+
age: [18]
|
|
71
|
+
}, {
|
|
72
|
+
type: TYPE.CHILD,
|
|
73
|
+
age: [0, 17],
|
|
74
|
+
fulfill: true
|
|
75
|
+
}];
|
|
76
|
+
//# sourceMappingURL=Occupation.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Occupation.constants.js","names":["_propTypes","_interopRequireDefault","require","_PLACE","obj","__esModule","default","_typeof","o","Symbol","iterator","constructor","prototype","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","TypeError","Number","ACCOMMODATION_TYPE","exports","ROOM","APARTMENT","PITCH","ACCOMMODATION","VILLA","DEFAULT_AMOUNT","DEFAULT_PLACE","ERROR","NO_ROOM","code","type","message","NOT_FILLED","PLACE","PLACE_INDIVIDUAL","APARTMENTS","LODGINGS","PLOTS","ROOMS","SHAPE","DATASOURCE","PropTypes","shape","number","age","arrayOf","max","min","fulfill","bool","VALUE","ages","amount","TYPE","GUEST","ADULT","CHILD"],"sources":["../../../../src/components/__shared__/Occupation/Occupation.constants.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst ACCOMMODATION_TYPE = {\n ROOM: 1,\n APARTMENT: 2,\n PITCH: 3,\n ACCOMMODATION: 4,\n VILLA: 5,\n};\n\nconst DEFAULT_AMOUNT = 2;\n\nconst DEFAULT_PLACE = 'ROOMS';\n\nconst ERROR = {\n NO_ROOM: { code: 1, type: 'error', message: 'There is no room for all individuals' },\n NOT_FILLED: { code: 2, type: 'warn', message: 'Not all fields have been filled out' },\n};\n\nconst { APARTMENT, ACCOMMODATION, PITCH, ROOM, VILLA } = ACCOMMODATION_TYPE;\n\nconst PLACE = {\n [ACCOMMODATION]: 'accommodation',\n [APARTMENT]: 'apartment',\n [PITCH]: 'pitch',\n [ROOM]: 'room',\n [VILLA]: 'villa',\n};\n\nconst PLACE_INDIVIDUAL = {\n APARTMENTS: APARTMENT,\n LODGINGS: ACCOMMODATION,\n PLOTS: PITCH,\n ROOMS: ROOM,\n VILLA: VILLA,\n};\n\nconst SHAPE = {\n DATASOURCE: PropTypes.shape({\n type: PropTypes.number,\n age: PropTypes.arrayOf(PropTypes.number),\n max: PropTypes.number,\n min: PropTypes.number,\n fulfill: PropTypes.bool,\n }),\n\n VALUE: PropTypes.shape({\n ages: PropTypes.arrayOf(PropTypes.number),\n amount: PropTypes.number,\n type: PropTypes.number,\n }),\n};\n\nconst TYPE = {\n GUEST: 1,\n ADULT: 2,\n CHILD: 3,\n};\n\nconst DATASOURCE = [\n { type: TYPE.ADULT, min: 1, age: [18] },\n { type: TYPE.CHILD, age: [0, 17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|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Occupation = void 0;
|
|
8
|
+
var _locale = require("@mirai/locale");
|
|
9
|
+
var _ui = require("@mirai/ui");
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
var _Occupation = require("./Occupation.constants");
|
|
14
|
+
var _Occupation2 = require("./Occupation.Group");
|
|
15
|
+
var _Occupation3 = require("./Occupation.l10n");
|
|
16
|
+
var style = _interopRequireWildcard(require("./Occupation.module.css"));
|
|
17
|
+
var _excluded = ["dataSource", "error", "maxRooms", "minRooms", "type", "value", "onChange", "onError", "onSubmit", "onValid"];
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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; }
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
31
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
32
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
34
|
+
var Occupation = exports.Occupation = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
35
|
+
var _ref$dataSource = _ref.dataSource,
|
|
36
|
+
dataSource = _ref$dataSource === void 0 ? _Occupation.DATASOURCE : _ref$dataSource,
|
|
37
|
+
error = _ref.error,
|
|
38
|
+
maxRooms = _ref.maxRooms,
|
|
39
|
+
_ref$minRooms = _ref.minRooms,
|
|
40
|
+
minRooms = _ref$minRooms === void 0 ? 1 : _ref$minRooms,
|
|
41
|
+
_ref$type = _ref.type,
|
|
42
|
+
type = _ref$type === void 0 ? _Occupation.ACCOMMODATION_TYPE.ROOM : _ref$type,
|
|
43
|
+
_ref$value = _ref.value,
|
|
44
|
+
value = _ref$value === void 0 ? dataSource ? _toConsumableArray(Array(minRooms)).map(function () {
|
|
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 () {
|
|
75
|
+
if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setWithWarning(false);
|
|
76
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
+
}, [currentDataSource, dataSource]);
|
|
78
|
+
(0, _react.useEffect)(function () {
|
|
79
|
+
var nextValue = (0, _helpers.consolidateValue)(value, dataSource, currentDataSource);
|
|
80
|
+
if (!nextValue) {
|
|
81
|
+
setWithWarning(true);
|
|
82
|
+
onError(_Occupation.ERROR.NO_ROOM);
|
|
83
|
+
nextValue = [(0, _helpers.prepareRoom)(dataSource)];
|
|
84
|
+
} else if (error && (0, _helpers.checkRoom)(nextValue, dataSource)) {
|
|
85
|
+
handleValid();
|
|
86
|
+
}
|
|
87
|
+
if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setCurrentDataSource(dataSource);
|
|
88
|
+
// ! TODO: Check why doesnt work witn non-hotels
|
|
89
|
+
if (JSON.stringify(nextValue) !== JSON.stringify(value)) handleChange(nextValue);
|
|
90
|
+
|
|
91
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
92
|
+
}, [dataSource, value]);
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
var _itemsRef$current;
|
|
95
|
+
setWithError(error);
|
|
96
|
+
var roomIndex = value.findIndex(function (room) {
|
|
97
|
+
return room.some(function () {
|
|
98
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
99
|
+
_ref2$ages = _ref2.ages,
|
|
100
|
+
ages = _ref2$ages === void 0 ? [] : _ref2$ages,
|
|
101
|
+
type = _ref2.type;
|
|
102
|
+
return type === _Occupation.TYPE.CHILD && ages.some(function (age) {
|
|
103
|
+
return age === undefined;
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
if (roomIndex < 0) return;
|
|
108
|
+
var scrollHeight = (0, _helpers.getScrollHeight)({
|
|
109
|
+
hasAges: true,
|
|
110
|
+
roomIndex: roomIndex,
|
|
111
|
+
rooms: (_itemsRef$current = itemsRef.current) === null || _itemsRef$current === void 0 ? void 0 : _itemsRef$current.map(function (el) {
|
|
112
|
+
return el === null || el === void 0 ? void 0 : el.scrollHeight;
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);
|
|
116
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
117
|
+
}, [error]);
|
|
118
|
+
var handleAddRoom = function handleAddRoom() {
|
|
119
|
+
var _itemsRef$current2;
|
|
120
|
+
var _ref3 = ((_itemsRef$current2 = itemsRef.current) === null || _itemsRef$current2 === void 0 ? void 0 : _itemsRef$current2.length) > 0 && itemsRef.current[0] || {},
|
|
121
|
+
_ref3$parentNode = _ref3.parentNode,
|
|
122
|
+
_ref3$parentNode2 = _ref3$parentNode === void 0 ? {} : _ref3$parentNode,
|
|
123
|
+
scrollHeight = _ref3$parentNode2.scrollHeight;
|
|
124
|
+
if (scrollHeight) setScrollEnd(scrollHeight);
|
|
125
|
+
handleChange([].concat(_toConsumableArray(value), [(0, _helpers.prepareRoom)(dataSource)]));
|
|
126
|
+
setWithWarning(false);
|
|
127
|
+
};
|
|
128
|
+
var handleRemoveRoom = function handleRemoveRoom(event, roomIndex, groupValue) {
|
|
129
|
+
event.stopPropagation();
|
|
130
|
+
scroll(roomIndex, groupValue);
|
|
131
|
+
handleChange(value.filter(function (_, index) {
|
|
132
|
+
return roomIndex !== index;
|
|
133
|
+
}));
|
|
134
|
+
itemsRef.current = [];
|
|
135
|
+
setWithWarning(false);
|
|
136
|
+
};
|
|
137
|
+
var handleIndividual = function handleIndividual(roomIndex, groupIndex, groupValue) {
|
|
138
|
+
dataSource[groupIndex].fulfill && scroll(roomIndex, groupValue);
|
|
139
|
+
var nextValue = _toConsumableArray(value);
|
|
140
|
+
nextValue[roomIndex] = _toConsumableArray(nextValue[roomIndex]) || [];
|
|
141
|
+
nextValue[roomIndex][groupIndex] = groupValue.amount === 0 ? undefined : groupValue;
|
|
142
|
+
handleChange(nextValue);
|
|
143
|
+
setWithWarning(false);
|
|
144
|
+
};
|
|
145
|
+
var handleChange = function handleChange(nextValue) {
|
|
146
|
+
onChange(nextValue);
|
|
147
|
+
(0, _helpers.checkRoom)(nextValue, dataSource) ? handleValid() : onError(_Occupation.ERROR.NOT_FILLED);
|
|
148
|
+
};
|
|
149
|
+
var handleSubmit = function handleSubmit() {
|
|
150
|
+
setWithWarning(false);
|
|
151
|
+
onSubmit(value);
|
|
152
|
+
};
|
|
153
|
+
var handleValid = function handleValid() {
|
|
154
|
+
setWithError(false);
|
|
155
|
+
onValid();
|
|
156
|
+
};
|
|
157
|
+
var scroll = function scroll(roomIndex, groupValue) {
|
|
158
|
+
var _groupValue$ages, _itemsRef$current3;
|
|
159
|
+
var scrollHeight = (0, _helpers.getScrollHeight)({
|
|
160
|
+
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: roomIndex,
|
|
162
|
+
rooms: (_itemsRef$current3 = itemsRef.current) === null || _itemsRef$current3 === void 0 ? void 0 : _itemsRef$current3.map(function (el) {
|
|
163
|
+
return el === null || el === void 0 ? void 0 : el.scrollHeight;
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);
|
|
167
|
+
};
|
|
168
|
+
var testId = others.testId;
|
|
169
|
+
var isValid = (0, _helpers.checkRoom)(value, dataSource);
|
|
170
|
+
return /*#__PURE__*/_react.default.createElement(_ui.View, _extends({}, others, {
|
|
171
|
+
role: "occupation",
|
|
172
|
+
ref: ref,
|
|
173
|
+
className: (0, _ui.styles)(style.container, others.className)
|
|
174
|
+
}), (withError || withWarning) && /*#__PURE__*/_react.default.createElement(_ui.Notification, {
|
|
175
|
+
small: true,
|
|
176
|
+
error: withError,
|
|
177
|
+
warning: withWarning,
|
|
178
|
+
className: style.notification
|
|
179
|
+
}, translate(withError ? _Occupation3.L10N.NOTIFICATION_ERROR_UNFILLED_FIELDS : _Occupation3.L10N.NOTIFICATION_WARNING_OCCUPATION)), /*#__PURE__*/_react.default.createElement(_ui.ScrollView, {
|
|
180
|
+
scrollTo: scrollEnd,
|
|
181
|
+
snap: false,
|
|
182
|
+
className: style.scrollview
|
|
183
|
+
}, value.map(function () {
|
|
184
|
+
var room = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
185
|
+
var roomIndex = arguments.length > 1 ? arguments[1] : undefined;
|
|
186
|
+
return /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
187
|
+
key: roomIndex,
|
|
188
|
+
ref: function ref(el) {
|
|
189
|
+
return itemsRef.current[roomIndex] = el;
|
|
190
|
+
},
|
|
191
|
+
wide: true
|
|
192
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
193
|
+
row: true,
|
|
194
|
+
className: (0, _ui.styles)(style.header, style.offset)
|
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
196
|
+
action: true
|
|
197
|
+
}, translate({
|
|
198
|
+
id: "".concat(_Occupation3.L10N.LABEL_PLACE_TYPE_COUNT.id, ".").concat(_Occupation.PLACE[type])
|
|
199
|
+
}, {
|
|
200
|
+
roomIndex: roomIndex + 1
|
|
201
|
+
})), value.length > minRooms && /*#__PURE__*/_react.default.createElement(_ui.Action, {
|
|
202
|
+
inline: true,
|
|
203
|
+
preventDefault: true,
|
|
204
|
+
small: true,
|
|
205
|
+
onPress: function onPress(event) {
|
|
206
|
+
return handleRemoveRoom(event, roomIndex, room[roomIndex]);
|
|
207
|
+
},
|
|
208
|
+
testId: testId ? "".concat(testId, "-remove-room-").concat(roomIndex) : undefined
|
|
209
|
+
}, translate(_Occupation3.L10N.ACTION_REMOVE))), dataSource.map(function (group, groupIndex) {
|
|
210
|
+
return /*#__PURE__*/_react.default.createElement(_Occupation2.OccupationGroup, _extends({}, group, {
|
|
211
|
+
error: error,
|
|
212
|
+
key: groupIndex,
|
|
213
|
+
value: room[groupIndex],
|
|
214
|
+
onChange: function onChange(value) {
|
|
215
|
+
return handleIndividual(roomIndex, groupIndex, value);
|
|
216
|
+
}
|
|
217
|
+
}));
|
|
218
|
+
}));
|
|
219
|
+
})), /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
220
|
+
row: true,
|
|
221
|
+
className: (0, _ui.styles)(style.buttons, style.offset)
|
|
222
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
223
|
+
disabled: maxRooms && value.length >= maxRooms,
|
|
224
|
+
preventDefault: true,
|
|
225
|
+
secondary: true,
|
|
226
|
+
className: style.buttonAdd,
|
|
227
|
+
onPress: handleAddRoom,
|
|
228
|
+
testId: testId ? "".concat(testId, "-add-room") : undefined
|
|
229
|
+
}, translate({
|
|
230
|
+
id: "".concat(_Occupation3.L10N.ACTION_ADD_PLACE_TYPE.id, ".").concat(_Occupation.PLACE[type])
|
|
231
|
+
})), onSubmit && /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
232
|
+
disabled: !isValid,
|
|
233
|
+
className: style.buttonSubmit,
|
|
234
|
+
preventDefault: true,
|
|
235
|
+
onPress: handleSubmit,
|
|
236
|
+
testId: testId ? "".concat(testId, "-submit") : undefined
|
|
237
|
+
}, translate(_Occupation3.L10N.ACTION_NEXT))));
|
|
238
|
+
});
|
|
239
|
+
Occupation.displayName = 'Mirai:Finder:Occupation';
|
|
240
|
+
Occupation.propTypes = {
|
|
241
|
+
dataSource: _propTypes.default.arrayOf(_Occupation.SHAPE.DATASOURCE),
|
|
242
|
+
error: _propTypes.default.bool,
|
|
243
|
+
maxRooms: _propTypes.default.number,
|
|
244
|
+
minRooms: _propTypes.default.number,
|
|
245
|
+
type: _propTypes.default.oneOf(Object.values(_Occupation.ACCOMMODATION_TYPE)),
|
|
246
|
+
value: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_Occupation.SHAPE.VALUE)),
|
|
247
|
+
onChange: _propTypes.default.func,
|
|
248
|
+
onError: _propTypes.default.func,
|
|
249
|
+
onSubmit: _propTypes.default.func,
|
|
250
|
+
onValid: _propTypes.default.func
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=Occupation.js.map
|
|
@@ -0,0 +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,\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,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"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.L10N = void 0;
|
|
7
|
+
var _Occupation = require("./Occupation.constants");
|
|
8
|
+
var _LABEL_OCCUPATION_TYP;
|
|
9
|
+
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); }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
var ADULT = _Occupation.TYPE.ADULT,
|
|
14
|
+
CHILD = _Occupation.TYPE.CHILD,
|
|
15
|
+
GUEST = _Occupation.TYPE.GUEST;
|
|
16
|
+
var L10N = exports.L10N = {
|
|
17
|
+
ACTION_ADD_PLACE_TYPE: {
|
|
18
|
+
id: 'finder.action.add_place_type'
|
|
19
|
+
},
|
|
20
|
+
// ! TODO: Should bind type
|
|
21
|
+
ACTION_NEXT: {
|
|
22
|
+
id: 'finder.action.next'
|
|
23
|
+
},
|
|
24
|
+
ACTION_REMOVE: {
|
|
25
|
+
id: 'finder.action.remove'
|
|
26
|
+
},
|
|
27
|
+
LABEL_AGE: {
|
|
28
|
+
id: 'common.label.age'
|
|
29
|
+
},
|
|
30
|
+
LABEL_AGE_FROM: {
|
|
31
|
+
id: 'common.label.age_from'
|
|
32
|
+
},
|
|
33
|
+
LABEL_AGE_HINT: {
|
|
34
|
+
id: 'common.label.age_hint'
|
|
35
|
+
},
|
|
36
|
+
LABEL_AGE_RANGE: {
|
|
37
|
+
id: 'common.label.age_range'
|
|
38
|
+
},
|
|
39
|
+
LABEL_AGE_UP_TO: {
|
|
40
|
+
id: 'common.label.age_up_to'
|
|
41
|
+
},
|
|
42
|
+
LABEL_OCCUPATION_TYPE: (_LABEL_OCCUPATION_TYP = {}, _defineProperty(_LABEL_OCCUPATION_TYP, ADULT, {
|
|
43
|
+
id: 'finder.label.occupation_type_adult'
|
|
44
|
+
}), _defineProperty(_LABEL_OCCUPATION_TYP, CHILD, {
|
|
45
|
+
id: 'finder.label.occupation_type_child'
|
|
46
|
+
}), _defineProperty(_LABEL_OCCUPATION_TYP, GUEST, {
|
|
47
|
+
id: 'finder.label.occupation_type_guest'
|
|
48
|
+
}), _LABEL_OCCUPATION_TYP),
|
|
49
|
+
LABEL_PLACE_TYPE: {
|
|
50
|
+
id: 'finder.label.place_type'
|
|
51
|
+
},
|
|
52
|
+
// ! TODO: Should bind type
|
|
53
|
+
LABEL_PLACE_TYPE_COUNT: {
|
|
54
|
+
id: 'finder.label.place_type_count'
|
|
55
|
+
},
|
|
56
|
+
// ! TODO: Should bind type
|
|
57
|
+
|
|
58
|
+
NOTIFICATION_ERROR_UNFILLED_FIELDS: {
|
|
59
|
+
id: 'common.notification.error_unfilled_fields'
|
|
60
|
+
},
|
|
61
|
+
NOTIFICATION_WARNING_OCCUPATION: {
|
|
62
|
+
id: 'finder.notification.warning_occupation'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=Occupation.l10n.js.map
|