@mirai/core 0.3.70 → 0.3.72
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/package.json +2 -2
- package/build/Core.Notifications.js +0 -101
- package/build/Core.Notifications.js.map +0 -1
- package/build/Core.Notifications.module.css +0 -56
- package/build/Core.constants.js +0 -36
- package/build/Core.constants.js.map +0 -1
- package/build/Core.definition.js +0 -10
- package/build/Core.definition.js.map +0 -1
- package/build/Core.js +0 -104
- package/build/Core.js.map +0 -1
- package/build/Core.provider.js +0 -73
- package/build/Core.provider.js.map +0 -1
- package/build/components/Booking/Booking.constants.js +0 -55
- package/build/components/Booking/Booking.constants.js.map +0 -1
- package/build/components/Booking/Booking.js +0 -201
- package/build/components/Booking/Booking.js.map +0 -1
- package/build/components/Booking/Booking.l10n.js +0 -244
- package/build/components/Booking/Booking.l10n.js.map +0 -1
- package/build/components/Booking/Booking.module.css +0 -279
- package/build/components/Booking/Booking.skeleton.js +0 -85
- package/build/components/Booking/Booking.skeleton.js.map +0 -1
- package/build/components/Booking/__tests__/__snapshots__/Booking.test.js.snap +0 -362
- package/build/components/Booking/components/Field/Field.js +0 -70
- package/build/components/Booking/components/Field/Field.js.map +0 -1
- package/build/components/Booking/components/Field/Field.l10n.js +0 -12
- package/build/components/Booking/components/Field/Field.l10n.js.map +0 -1
- package/build/components/Booking/components/Field/Field.module.css +0 -48
- package/build/components/Booking/components/Field/__tests__/__snapshots__/Field.test.js.snap +0 -139
- package/build/components/Booking/components/Field/index.js +0 -17
- package/build/components/Booking/components/Field/index.js.map +0 -1
- package/build/components/Booking/components/index.js +0 -17
- package/build/components/Booking/components/index.js.map +0 -1
- package/build/components/Booking/helpers/getOccupationCaption.js +0 -59
- package/build/components/Booking/helpers/getOccupationCaption.js.map +0 -1
- package/build/components/Booking/helpers/index.js +0 -28
- package/build/components/Booking/helpers/index.js.map +0 -1
- package/build/components/Booking/helpers/trackStateChange.js +0 -101
- package/build/components/Booking/helpers/trackStateChange.js.map +0 -1
- package/build/components/Booking/index.js +0 -13
- package/build/components/Booking/index.js.map +0 -1
- package/build/components/Booking/mocks/booking.json +0 -176
- package/build/components/Booking/partials/Booking.Details.js +0 -132
- package/build/components/Booking/partials/Booking.Details.js.map +0 -1
- package/build/components/Booking/partials/Booking.FormCancel.js +0 -105
- package/build/components/Booking/partials/Booking.FormCancel.js.map +0 -1
- package/build/components/Booking/partials/Booking.FormEdit.js +0 -24
- package/build/components/Booking/partials/Booking.FormEdit.js.map +0 -1
- package/build/components/Booking/partials/Booking.FormResend.js +0 -56
- package/build/components/Booking/partials/Booking.FormResend.js.map +0 -1
- package/build/components/Booking/partials/Booking.Menu.js +0 -138
- package/build/components/Booking/partials/Booking.Menu.js.map +0 -1
- package/build/components/Booking/partials/Booking.Modal.js +0 -144
- package/build/components/Booking/partials/Booking.Modal.js.map +0 -1
- package/build/components/Booking/partials/Booking.ModalAgency.js +0 -65
- package/build/components/Booking/partials/Booking.ModalAgency.js.map +0 -1
- package/build/components/Booking/partials/Booking.Others.js +0 -101
- package/build/components/Booking/partials/Booking.Others.js.map +0 -1
- package/build/components/Booking/partials/Booking.PriceBreakdown.js +0 -118
- package/build/components/Booking/partials/Booking.PriceBreakdown.js.map +0 -1
- package/build/components/Booking/partials/Booking.Summary.js +0 -240
- package/build/components/Booking/partials/Booking.Summary.js.map +0 -1
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Details.test.js.snap +0 -4913
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Menu.test.js.snap +0 -1330
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +0 -400
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap +0 -442
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Summary.test.js.snap +0 -1066
- package/build/components/Booking/partials/index.js +0 -72
- package/build/components/Booking/partials/index.js.map +0 -1
- package/build/components/BookingQuery/BookingQuery.constants.js +0 -11
- package/build/components/BookingQuery/BookingQuery.constants.js.map +0 -1
- package/build/components/BookingQuery/BookingQuery.js +0 -143
- package/build/components/BookingQuery/BookingQuery.js.map +0 -1
- package/build/components/BookingQuery/BookingQuery.l10n.js +0 -39
- package/build/components/BookingQuery/BookingQuery.l10n.js.map +0 -1
- package/build/components/BookingQuery/BookingQuery.module.css +0 -17
- package/build/components/BookingQuery/BookingQuery.skeleton.js +0 -12
- package/build/components/BookingQuery/BookingQuery.skeleton.js.map +0 -1
- package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +0 -1114
- package/build/components/BookingQuery/helpers/getErrorText.js +0 -11
- package/build/components/BookingQuery/helpers/getErrorText.js.map +0 -1
- package/build/components/BookingQuery/helpers/index.js +0 -17
- package/build/components/BookingQuery/helpers/index.js.map +0 -1
- package/build/components/BookingQuery/index.js +0 -13
- package/build/components/BookingQuery/index.js.map +0 -1
- package/build/components/Checkout/Checkout.constants.js +0 -45
- package/build/components/Checkout/Checkout.constants.js.map +0 -1
- package/build/components/Checkout/Checkout.js +0 -179
- package/build/components/Checkout/Checkout.js.map +0 -1
- package/build/components/Checkout/Checkout.l10n.js +0 -130
- package/build/components/Checkout/Checkout.l10n.js.map +0 -1
- package/build/components/Checkout/Checkout.module.css +0 -255
- package/build/components/Checkout/Checkout.skeleton.js +0 -64
- package/build/components/Checkout/Checkout.skeleton.js.map +0 -1
- package/build/components/Checkout/__tests__/__snapshots__/Checkout.test.js.snap +0 -412
- package/build/components/Checkout/components/InputRadio/InputRadio.js +0 -61
- package/build/components/Checkout/components/InputRadio/InputRadio.js.map +0 -1
- package/build/components/Checkout/components/InputRadio/InputRadio.module.css +0 -3
- package/build/components/Checkout/components/InputRadio/__tests__/__snapshots__/InputRadio.test.js.snap +0 -323
- package/build/components/Checkout/components/InputRadio/index.js +0 -17
- package/build/components/Checkout/components/InputRadio/index.js.map +0 -1
- package/build/components/Checkout/components/index.js +0 -17
- package/build/components/Checkout/components/index.js.map +0 -1
- package/build/components/Checkout/helpers/getFieldProps.js +0 -73
- package/build/components/Checkout/helpers/getFieldProps.js.map +0 -1
- package/build/components/Checkout/helpers/getVariant.js +0 -28
- package/build/components/Checkout/helpers/getVariant.js.map +0 -1
- package/build/components/Checkout/helpers/index.js +0 -50
- package/build/components/Checkout/helpers/index.js.map +0 -1
- package/build/components/Checkout/helpers/testDNI.js +0 -13
- package/build/components/Checkout/helpers/testDNI.js.map +0 -1
- package/build/components/Checkout/helpers/trackDataSource.js +0 -111
- package/build/components/Checkout/helpers/trackDataSource.js.map +0 -1
- package/build/components/Checkout/helpers/trackForm.js +0 -27
- package/build/components/Checkout/helpers/trackForm.js.map +0 -1
- package/build/components/Checkout/index.js +0 -13
- package/build/components/Checkout/index.js.map +0 -1
- package/build/components/Checkout/mocks/checkout.json +0 -519
- package/build/components/Checkout/partials/Checkout.Confirmation.js +0 -200
- package/build/components/Checkout/partials/Checkout.Confirmation.js.map +0 -1
- package/build/components/Checkout/partials/Checkout.Details.js +0 -162
- package/build/components/Checkout/partials/Checkout.Details.js.map +0 -1
- package/build/components/Checkout/partials/Checkout.Form.js +0 -178
- package/build/components/Checkout/partials/Checkout.Form.js.map +0 -1
- package/build/components/Checkout/partials/Checkout.Session.js +0 -100
- package/build/components/Checkout/partials/Checkout.Session.js.map +0 -1
- package/build/components/Checkout/partials/Checkout.Summary.Line.js +0 -57
- package/build/components/Checkout/partials/Checkout.Summary.Line.js.map +0 -1
- package/build/components/Checkout/partials/Checkout.Summary.js +0 -202
- package/build/components/Checkout/partials/Checkout.Summary.js.map +0 -1
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +0 -1592
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Details.test.js.snap +0 -1674
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +0 -5662
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Session.test.js.snap +0 -770
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Summary.test.js.snap +0 -806
- package/build/components/Checkout/partials/index.js +0 -61
- package/build/components/Checkout/partials/index.js.map +0 -1
- package/build/components/Deals/Deals.Calendar.js +0 -162
- package/build/components/Deals/Deals.Calendar.js.map +0 -1
- package/build/components/Deals/Deals.constants.js +0 -16
- package/build/components/Deals/Deals.constants.js.map +0 -1
- package/build/components/Deals/Deals.js +0 -231
- package/build/components/Deals/Deals.js.map +0 -1
- package/build/components/Deals/Deals.l10n.js +0 -43
- package/build/components/Deals/Deals.l10n.js.map +0 -1
- package/build/components/Deals/Deals.module.css +0 -112
- package/build/components/Deals/Deals.skeleton.js +0 -112
- package/build/components/Deals/Deals.skeleton.js.map +0 -1
- package/build/components/Deals/__tests__/__snapshots__/Deals.Calendar.test.js.snap +0 -4584
- package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +0 -7893
- package/build/components/Deals/helpers/__tests__/__mocks__/deal.json +0 -25
- package/build/components/Deals/helpers/calcFromDate.js +0 -21
- package/build/components/Deals/helpers/calcFromDate.js.map +0 -1
- package/build/components/Deals/helpers/calcMinStay.js +0 -23
- package/build/components/Deals/helpers/calcMinStay.js.map +0 -1
- package/build/components/Deals/helpers/calcNightWithDeals.js +0 -18
- package/build/components/Deals/helpers/calcNightWithDeals.js.map +0 -1
- package/build/components/Deals/helpers/calcToDate.js +0 -14
- package/build/components/Deals/helpers/calcToDate.js.map +0 -1
- package/build/components/Deals/helpers/calcTooltips.js +0 -60
- package/build/components/Deals/helpers/calcTooltips.js.map +0 -1
- package/build/components/Deals/helpers/getCurrency.js +0 -21
- package/build/components/Deals/helpers/getCurrency.js.map +0 -1
- package/build/components/Deals/helpers/index.js +0 -83
- package/build/components/Deals/helpers/index.js.map +0 -1
- package/build/components/Deals/helpers/validate.js +0 -28
- package/build/components/Deals/helpers/validate.js.map +0 -1
- package/build/components/Deals/index.js +0 -13
- package/build/components/Deals/index.js.map +0 -1
- package/build/components/Environment/Environment.State.js +0 -105
- package/build/components/Environment/Environment.State.js.map +0 -1
- package/build/components/Environment/Environment.constants.js +0 -8
- package/build/components/Environment/Environment.constants.js.map +0 -1
- package/build/components/Environment/Environment.js +0 -58
- package/build/components/Environment/Environment.js.map +0 -1
- package/build/components/Environment/Environment.module.css +0 -61
- package/build/components/Environment/index.js +0 -13
- package/build/components/Environment/index.js.map +0 -1
- package/build/components/Finder/Finder.compact.js +0 -111
- package/build/components/Finder/Finder.compact.js.map +0 -1
- package/build/components/Finder/Finder.constants.js +0 -42
- package/build/components/Finder/Finder.constants.js.map +0 -1
- package/build/components/Finder/Finder.js +0 -262
- package/build/components/Finder/Finder.js.map +0 -1
- package/build/components/Finder/Finder.l10n.js +0 -24
- package/build/components/Finder/Finder.l10n.js.map +0 -1
- package/build/components/Finder/Finder.module.css +0 -82
- package/build/components/Finder/Finder.skeleton.js +0 -49
- package/build/components/Finder/Finder.skeleton.js.map +0 -1
- package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +0 -19857
- package/build/components/Finder/components/Calendar/Calendar.constants.js +0 -20
- package/build/components/Finder/components/Calendar/Calendar.constants.js.map +0 -1
- package/build/components/Finder/components/Calendar/Calendar.js +0 -188
- package/build/components/Finder/components/Calendar/Calendar.js.map +0 -1
- package/build/components/Finder/components/Calendar/Calendar.l10n.js +0 -18
- package/build/components/Finder/components/Calendar/Calendar.l10n.js.map +0 -1
- package/build/components/Finder/components/Calendar/Calendar.module.css +0 -29
- package/build/components/Finder/components/Calendar/__tests__/__mocks__/prices.json +0 -11
- package/build/components/Finder/components/Calendar/__tests__/__snapshots__/Calendar.test.js.snap +0 -10043
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js +0 -49
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js.map +0 -1
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js +0 -18
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js.map +0 -1
- package/build/components/Finder/components/Calendar/helpers/index.js +0 -50
- package/build/components/Finder/components/Calendar/helpers/index.js.map +0 -1
- package/build/components/Finder/components/Calendar/helpers/parseValue.js +0 -14
- package/build/components/Finder/components/Calendar/helpers/parseValue.js.map +0 -1
- package/build/components/Finder/components/Calendar/helpers/valueFormat.js +0 -18
- package/build/components/Finder/components/Calendar/helpers/valueFormat.js.map +0 -1
- package/build/components/Finder/components/Calendar/index.js +0 -17
- package/build/components/Finder/components/Calendar/index.js.map +0 -1
- package/build/components/Finder/components/Places/Places.js +0 -96
- package/build/components/Finder/components/Places/Places.js.map +0 -1
- package/build/components/Finder/components/Places/Places.l10n.js +0 -12
- package/build/components/Finder/components/Places/Places.l10n.js.map +0 -1
- package/build/components/Finder/components/Places/Places.module.css +0 -87
- package/build/components/Finder/components/Places/__tests__/__mocks__/places.json +0 -44
- package/build/components/Finder/components/Places/__tests__/__snapshots__/Places.test.js.snap +0 -288
- package/build/components/Finder/components/Places/helpers/calcColumns.js +0 -35
- package/build/components/Finder/components/Places/helpers/calcColumns.js.map +0 -1
- package/build/components/Finder/components/Places/helpers/index.js +0 -17
- package/build/components/Finder/components/Places/helpers/index.js.map +0 -1
- package/build/components/Finder/components/Places/index.js +0 -17
- package/build/components/Finder/components/Places/index.js.map +0 -1
- package/build/components/Finder/components/index.js +0 -28
- package/build/components/Finder/components/index.js.map +0 -1
- package/build/components/Finder/helpers/__tests__/__mocks__/chain.json +0 -1113
- package/build/components/Finder/helpers/__tests__/__mocks__/dataSource.json +0 -1382
- package/build/components/Finder/helpers/__tests__/__mocks__/hotel.json +0 -199
- package/build/components/Finder/helpers/getDataSource.js +0 -58
- package/build/components/Finder/helpers/getDataSource.js.map +0 -1
- package/build/components/Finder/helpers/getForwarderUrl.js +0 -64
- package/build/components/Finder/helpers/getForwarderUrl.js.map +0 -1
- package/build/components/Finder/helpers/getHotels.js +0 -29
- package/build/components/Finder/helpers/getHotels.js.map +0 -1
- package/build/components/Finder/helpers/getOccupationDataSource.js +0 -93
- package/build/components/Finder/helpers/getOccupationDataSource.js.map +0 -1
- package/build/components/Finder/helpers/getPlaceCaption.js +0 -15
- package/build/components/Finder/helpers/getPlaceCaption.js.map +0 -1
- package/build/components/Finder/helpers/getPlacesOptions.js +0 -44
- package/build/components/Finder/helpers/getPlacesOptions.js.map +0 -1
- package/build/components/Finder/helpers/index.js +0 -105
- package/build/components/Finder/helpers/index.js.map +0 -1
- package/build/components/Finder/helpers/parseCalendarProps.js +0 -37
- package/build/components/Finder/helpers/parseCalendarProps.js.map +0 -1
- package/build/components/Finder/helpers/parseValue.js +0 -22
- package/build/components/Finder/helpers/parseValue.js.map +0 -1
- package/build/components/Finder/helpers/validate.js +0 -16
- package/build/components/Finder/helpers/validate.js.map +0 -1
- package/build/components/Finder/index.js +0 -13
- package/build/components/Finder/index.js.map +0 -1
- package/build/components/Profile/Profile.Account.js +0 -165
- package/build/components/Profile/Profile.Account.js.map +0 -1
- package/build/components/Profile/Profile.Password.js +0 -123
- package/build/components/Profile/Profile.Password.js.map +0 -1
- package/build/components/Profile/Profile.Signout.js +0 -100
- package/build/components/Profile/Profile.Signout.js.map +0 -1
- package/build/components/Profile/Profile.constants.js +0 -13
- package/build/components/Profile/Profile.constants.js.map +0 -1
- package/build/components/Profile/Profile.js +0 -65
- package/build/components/Profile/Profile.js.map +0 -1
- package/build/components/Profile/Profile.l10n.js +0 -100
- package/build/components/Profile/Profile.l10n.js.map +0 -1
- package/build/components/Profile/Profile.module.css +0 -70
- package/build/components/Profile/Profile.skeleton.js +0 -119
- package/build/components/Profile/Profile.skeleton.js.map +0 -1
- package/build/components/Profile/components/Bookings/Booking.constants.js +0 -20
- package/build/components/Profile/components/Bookings/Booking.constants.js.map +0 -1
- package/build/components/Profile/components/Bookings/Booking.l10n.js +0 -47
- package/build/components/Profile/components/Bookings/Booking.l10n.js.map +0 -1
- package/build/components/Profile/components/Bookings/Bookings.Item.js +0 -111
- package/build/components/Profile/components/Bookings/Bookings.Item.js.map +0 -1
- package/build/components/Profile/components/Bookings/Bookings.Search.js +0 -87
- package/build/components/Profile/components/Bookings/Bookings.Search.js.map +0 -1
- package/build/components/Profile/components/Bookings/Bookings.js +0 -154
- package/build/components/Profile/components/Bookings/Bookings.js.map +0 -1
- package/build/components/Profile/components/Bookings/Bookings.module.css +0 -171
- package/build/components/Profile/components/Bookings/__tests__/__snapshots__/Bookings.test.js.snap +0 -9
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js +0 -25
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js.map +0 -1
- package/build/components/Profile/components/Bookings/helpers/index.js +0 -17
- package/build/components/Profile/components/Bookings/helpers/index.js.map +0 -1
- package/build/components/Profile/components/Bookings/index.js +0 -17
- package/build/components/Profile/components/Bookings/index.js.map +0 -1
- package/build/components/Profile/components/index.js +0 -17
- package/build/components/Profile/components/index.js.map +0 -1
- package/build/components/Profile/index.js +0 -13
- package/build/components/Profile/index.js.map +0 -1
- package/build/components/Rates/Rates.Footer.js +0 -137
- package/build/components/Rates/Rates.Footer.js.map +0 -1
- package/build/components/Rates/Rates.Header.js +0 -136
- package/build/components/Rates/Rates.Header.js.map +0 -1
- package/build/components/Rates/Rates.RoomSelector.js +0 -93
- package/build/components/Rates/Rates.RoomSelector.js.map +0 -1
- package/build/components/Rates/Rates.Skeleton.js +0 -185
- package/build/components/Rates/Rates.Skeleton.js.map +0 -1
- package/build/components/Rates/Rates.constants.js +0 -16
- package/build/components/Rates/Rates.constants.js.map +0 -1
- package/build/components/Rates/Rates.js +0 -272
- package/build/components/Rates/Rates.js.map +0 -1
- package/build/components/Rates/Rates.l10n.js +0 -45
- package/build/components/Rates/Rates.l10n.js.map +0 -1
- package/build/components/Rates/Rates.module.css +0 -330
- package/build/components/Rates/components/Item/Item.Preview.js +0 -160
- package/build/components/Rates/components/Item/Item.Preview.js.map +0 -1
- package/build/components/Rates/components/Item/Item.Rates.js +0 -154
- package/build/components/Rates/components/Item/Item.Rates.js.map +0 -1
- package/build/components/Rates/components/Item/Item.Summary.js +0 -135
- package/build/components/Rates/components/Item/Item.Summary.js.map +0 -1
- package/build/components/Rates/components/Item/Item.js +0 -92
- package/build/components/Rates/components/Item/Item.js.map +0 -1
- package/build/components/Rates/components/Item/Item.l10n.js +0 -107
- package/build/components/Rates/components/Item/Item.l10n.js.map +0 -1
- package/build/components/Rates/components/Item/Item.module.css +0 -130
- package/build/components/Rates/components/Item/components/Amenities/Amenities.js +0 -68
- package/build/components/Rates/components/Item/components/Amenities/Amenities.js.map +0 -1
- package/build/components/Rates/components/Item/components/Amenities/Amenities.module.css +0 -65
- package/build/components/Rates/components/Item/components/Amenities/index.js +0 -17
- package/build/components/Rates/components/Item/components/Amenities/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/Features/Features.js +0 -62
- package/build/components/Rates/components/Item/components/Features/Features.js.map +0 -1
- package/build/components/Rates/components/Item/components/Features/Features.module.css +0 -9
- package/build/components/Rates/components/Item/components/Features/index.js +0 -17
- package/build/components/Rates/components/Item/components/Features/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js +0 -141
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.module.css +0 -42
- package/build/components/Rates/components/Item/components/ModalInfo/index.js +0 -17
- package/build/components/Rates/components/Item/components/ModalInfo/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js +0 -68
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.module.css +0 -20
- package/build/components/Rates/components/Item/components/ModalRateInfo/index.js +0 -17
- package/build/components/Rates/components/Item/components/ModalRateInfo/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalUrl/ModalUrl.js +0 -38
- package/build/components/Rates/components/Item/components/ModalUrl/ModalUrl.js.map +0 -1
- package/build/components/Rates/components/Item/components/ModalUrl/ModalUrl.module.css +0 -20
- package/build/components/Rates/components/Item/components/ModalUrl/index.js +0 -17
- package/build/components/Rates/components/Item/components/ModalUrl/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/Option/Option.js +0 -72
- package/build/components/Rates/components/Item/components/Option/Option.js.map +0 -1
- package/build/components/Rates/components/Item/components/Option/Option.module.css +0 -24
- package/build/components/Rates/components/Item/components/Option/index.js +0 -17
- package/build/components/Rates/components/Item/components/Option/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/PriceDetails/PriceDetails.js +0 -99
- package/build/components/Rates/components/Item/components/PriceDetails/PriceDetails.js.map +0 -1
- package/build/components/Rates/components/Item/components/PriceDetails/PriceDetails.module.css +0 -23
- package/build/components/Rates/components/Item/components/PriceDetails/index.js +0 -17
- package/build/components/Rates/components/Item/components/PriceDetails/index.js.map +0 -1
- package/build/components/Rates/components/Item/components/index.js +0 -83
- package/build/components/Rates/components/Item/components/index.js.map +0 -1
- package/build/components/Rates/components/Item/index.js +0 -42
- package/build/components/Rates/components/Item/index.js.map +0 -1
- package/build/components/Rates/components/ModalExtras/ModalExtras.js +0 -176
- package/build/components/Rates/components/ModalExtras/ModalExtras.js.map +0 -1
- package/build/components/Rates/components/ModalExtras/ModalExtras.l10n.js +0 -18
- package/build/components/Rates/components/ModalExtras/ModalExtras.l10n.js.map +0 -1
- package/build/components/Rates/components/ModalExtras/ModalExtras.module.css +0 -74
- package/build/components/Rates/components/ModalExtras/index.js +0 -17
- package/build/components/Rates/components/ModalExtras/index.js.map +0 -1
- package/build/components/Rates/components/index.js +0 -28
- package/build/components/Rates/components/index.js.map +0 -1
- package/build/components/Rates/helpers/getFinderParams.js +0 -40
- package/build/components/Rates/helpers/getFinderParams.js.map +0 -1
- package/build/components/Rates/helpers/getForwarderUrl.js +0 -67
- package/build/components/Rates/helpers/getForwarderUrl.js.map +0 -1
- package/build/components/Rates/helpers/index.js +0 -28
- package/build/components/Rates/helpers/index.js.map +0 -1
- package/build/components/Rates/index.js +0 -13
- package/build/components/Rates/index.js.map +0 -1
- package/build/components/Session/Session.Account.js +0 -152
- package/build/components/Session/Session.Account.js.map +0 -1
- package/build/components/Session/Session.Login.Modal.js +0 -237
- package/build/components/Session/Session.Login.Modal.js.map +0 -1
- package/build/components/Session/Session.Login.js +0 -76
- package/build/components/Session/Session.Login.js.map +0 -1
- package/build/components/Session/Session.constants.js +0 -24
- package/build/components/Session/Session.constants.js.map +0 -1
- package/build/components/Session/Session.js +0 -37
- package/build/components/Session/Session.js.map +0 -1
- package/build/components/Session/Session.l10n.js +0 -82
- package/build/components/Session/Session.l10n.js.map +0 -1
- package/build/components/Session/Session.module.css +0 -41
- package/build/components/Session/Session.skeleton.js +0 -18
- package/build/components/Session/Session.skeleton.js.map +0 -1
- package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +0 -1075
- package/build/components/Session/helpers/getDomain.js +0 -15
- package/build/components/Session/helpers/getDomain.js.map +0 -1
- package/build/components/Session/helpers/getProfileUrl.js +0 -31
- package/build/components/Session/helpers/getProfileUrl.js.map +0 -1
- package/build/components/Session/helpers/getSignupUrl.js +0 -29
- package/build/components/Session/helpers/getSignupUrl.js.map +0 -1
- package/build/components/Session/helpers/index.js +0 -61
- package/build/components/Session/helpers/index.js.map +0 -1
- package/build/components/Session/helpers/template.js +0 -16
- package/build/components/Session/helpers/template.js.map +0 -1
- package/build/components/Session/helpers/trackLogin.js +0 -26
- package/build/components/Session/helpers/trackLogin.js.map +0 -1
- package/build/components/Session/index.js +0 -13
- package/build/components/Session/index.js.map +0 -1
- package/build/components/Signup/Signup.constants.js +0 -8
- package/build/components/Signup/Signup.constants.js.map +0 -1
- package/build/components/Signup/Signup.js +0 -198
- package/build/components/Signup/Signup.js.map +0 -1
- package/build/components/Signup/Signup.l10n.js +0 -67
- package/build/components/Signup/Signup.l10n.js.map +0 -1
- package/build/components/Signup/Signup.module.css +0 -25
- package/build/components/Signup/Signup.skeleton.js +0 -92
- package/build/components/Signup/Signup.skeleton.js.map +0 -1
- package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +0 -1023
- package/build/components/Signup/index.js +0 -13
- package/build/components/Signup/index.js.map +0 -1
- package/build/components/__shared__/BookingDates/BookingDates.constants.js +0 -12
- package/build/components/__shared__/BookingDates/BookingDates.constants.js.map +0 -1
- package/build/components/__shared__/BookingDates/BookingDates.js +0 -73
- package/build/components/__shared__/BookingDates/BookingDates.js.map +0 -1
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js +0 -29
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js.map +0 -1
- package/build/components/__shared__/BookingDates/BookingDates.module.css +0 -13
- package/build/components/__shared__/BookingDates/__tests__/__snapshots__/BookingDates.test.js.snap +0 -208
- package/build/components/__shared__/BookingDates/index.js +0 -17
- package/build/components/__shared__/BookingDates/index.js.map +0 -1
- package/build/components/__shared__/BookingTable/BookingTable.Row.js +0 -116
- package/build/components/__shared__/BookingTable/BookingTable.Row.js.map +0 -1
- package/build/components/__shared__/BookingTable/BookingTable.constants.js +0 -18
- package/build/components/__shared__/BookingTable/BookingTable.constants.js.map +0 -1
- package/build/components/__shared__/BookingTable/BookingTable.js +0 -76
- package/build/components/__shared__/BookingTable/BookingTable.js.map +0 -1
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js +0 -15
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js.map +0 -1
- package/build/components/__shared__/BookingTable/BookingTable.module.css +0 -125
- package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.Row.test.js.snap +0 -464
- package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.test.js.snap +0 -619
- package/build/components/__shared__/BookingTable/index.js +0 -17
- package/build/components/__shared__/BookingTable/index.js.map +0 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.js +0 -49
- package/build/components/__shared__/ButtonMore/ButtonMore.js.map +0 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js +0 -12
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.module.css +0 -9
- package/build/components/__shared__/ButtonMore/__tests__/__snapshots__/ButtonMore.test.js.snap +0 -110
- package/build/components/__shared__/ButtonMore/index.js +0 -17
- package/build/components/__shared__/ButtonMore/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js +0 -21
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js +0 -198
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js +0 -13
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.module.css +0 -3
- package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +0 -195
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js +0 -80
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js +0 -21
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.module.css +0 -9
- package/build/components/__shared__/ButtonPayment/components/FormAddon/__tests__/__snapshots__/FormAddon.test.js.snap +0 -68
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js +0 -21
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js +0 -37
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js +0 -181
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js +0 -30
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.module.css +0 -27
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/__tests__/__snapshots__/FormCheckout.test.js.snap +0 -308
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js +0 -37
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js +0 -8
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js +0 -210
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js +0 -30
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.module.css +0 -26
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/__tests__/__snapshots__/FormPaycomet.test.js.snap +0 -148
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js +0 -23
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js +0 -18
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js +0 -119
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js +0 -21
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.module.css +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormSipay/__tests__/__snapshots__/FormSipay.test.js.snap +0 -149
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js +0 -24
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js +0 -52
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.module.css +0 -60
- package/build/components/__shared__/ButtonPayment/components/InputField/__tests__/__snapshots__/InputField.test.js.snap +0 -166
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/components/index.js +0 -50
- package/build/components/__shared__/ButtonPayment/components/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js +0 -31
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js +0 -21
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js +0 -41
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js +0 -28
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js +0 -41
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/index.js +0 -39
- package/build/components/__shared__/ButtonPayment/helpers/index.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js +0 -27
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js +0 -18
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js.map +0 -1
- package/build/components/__shared__/ButtonPayment/index.js +0 -17
- package/build/components/__shared__/ButtonPayment/index.js.map +0 -1
- package/build/components/__shared__/Field/Field.js +0 -87
- package/build/components/__shared__/Field/Field.js.map +0 -1
- package/build/components/__shared__/Field/Field.module.css +0 -109
- package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +0 -799
- package/build/components/__shared__/Field/index.js +0 -17
- package/build/components/__shared__/Field/index.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js +0 -82
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js +0 -13
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.module.css +0 -5
- package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +0 -2179
- package/build/components/__shared__/FieldOccupation/helpers/__tests__/__mocks__/en.json +0 -15
- package/build/components/__shared__/FieldOccupation/helpers/__tests__/__mocks__/hotels.json +0 -87
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js +0 -37
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js +0 -54
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/helpers/index.js +0 -28
- package/build/components/__shared__/FieldOccupation/helpers/index.js.map +0 -1
- package/build/components/__shared__/FieldOccupation/index.js +0 -17
- package/build/components/__shared__/FieldOccupation/index.js.map +0 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js +0 -47
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js.map +0 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js +0 -13
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js.map +0 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.module.css +0 -24
- package/build/components/__shared__/FieldPromocode/__tests__/__snapshots__/FieldPromocode.test.jsx.snap +0 -272
- package/build/components/__shared__/FieldPromocode/index.js +0 -17
- package/build/components/__shared__/FieldPromocode/index.js.map +0 -1
- package/build/components/__shared__/Occupation/Occupation.Group.js +0 -106
- package/build/components/__shared__/Occupation/Occupation.Group.js.map +0 -1
- package/build/components/__shared__/Occupation/Occupation.constants.js +0 -79
- package/build/components/__shared__/Occupation/Occupation.constants.js.map +0 -1
- package/build/components/__shared__/Occupation/Occupation.js +0 -205
- package/build/components/__shared__/Occupation/Occupation.js.map +0 -1
- package/build/components/__shared__/Occupation/Occupation.l10n.js +0 -69
- package/build/components/__shared__/Occupation/Occupation.l10n.js.map +0 -1
- package/build/components/__shared__/Occupation/Occupation.module.css +0 -124
- package/build/components/__shared__/Occupation/__tests__/__mocks__/occupation.json +0 -17
- package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +0 -3591
- package/build/components/__shared__/Occupation/helpers/checkRoom.js +0 -36
- package/build/components/__shared__/Occupation/helpers/checkRoom.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js +0 -88
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js +0 -20
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js +0 -24
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js +0 -16
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/index.js +0 -72
- package/build/components/__shared__/Occupation/helpers/index.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js +0 -34
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js.map +0 -1
- package/build/components/__shared__/Occupation/helpers/toParties.js +0 -40
- package/build/components/__shared__/Occupation/helpers/toParties.js.map +0 -1
- package/build/components/__shared__/Occupation/index.js +0 -28
- package/build/components/__shared__/Occupation/index.js.map +0 -1
- package/build/components/__shared__/Payment/Payment.constants.js +0 -39
- package/build/components/__shared__/Payment/Payment.constants.js.map +0 -1
- package/build/components/__shared__/Payment/Payment.js +0 -181
- package/build/components/__shared__/Payment/Payment.js.map +0 -1
- package/build/components/__shared__/Payment/Payment.l10n.js +0 -84
- package/build/components/__shared__/Payment/Payment.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/Payment.module.css +0 -61
- package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +0 -750
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js +0 -43
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js.map +0 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js +0 -167
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js.map +0 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js +0 -18
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.module.css +0 -8
- package/build/components/__shared__/Payment/components/AmazonPay/__tests__/__snapshots__/AmazonPay.test.js.snap +0 -23
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js +0 -19
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js.map +0 -1
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js +0 -17
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/AmazonPay/index.js +0 -17
- package/build/components/__shared__/Payment/components/AmazonPay/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js +0 -79
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js.map +0 -1
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js +0 -12
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/components/Aplazame/__tests__/__snapshots__/Aplazame.test.js.snap +0 -30
- package/build/components/__shared__/Payment/components/Aplazame/index.js +0 -17
- package/build/components/__shared__/Payment/components/Aplazame/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/Card.constants.js +0 -29
- package/build/components/__shared__/Payment/components/Card/Card.constants.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/Card.js +0 -129
- package/build/components/__shared__/Payment/components/Card/Card.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js +0 -27
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/Card.module.css +0 -23
- package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +0 -887
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +0 -38
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js +0 -11
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js +0 -31
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/index.js +0 -61
- package/build/components/__shared__/Payment/components/Card/helpers/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js +0 -9
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js +0 -12
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js +0 -13
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js.map +0 -1
- package/build/components/__shared__/Payment/components/Card/index.js +0 -17
- package/build/components/__shared__/Payment/components/Card/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js +0 -25
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.js +0 -298
- package/build/components/__shared__/Payment/components/PCI/PCI.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js +0 -30
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.module.css +0 -9
- package/build/components/__shared__/Payment/components/PCI/__tests__/__snapshots__/PCI.test.js.snap +0 -399
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +0 -27
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js +0 -32
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js +0 -28
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/PCI/index.js +0 -17
- package/build/components/__shared__/Payment/components/PCI/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js +0 -58
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js.map +0 -1
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js +0 -12
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js.map +0 -1
- package/build/components/__shared__/Payment/components/Tpv/__tests__/__snapshots__/Tpv.test.js.snap +0 -92
- package/build/components/__shared__/Payment/components/Tpv/index.js +0 -17
- package/build/components/__shared__/Payment/components/Tpv/index.js.map +0 -1
- package/build/components/__shared__/Payment/components/index.js +0 -61
- package/build/components/__shared__/Payment/components/index.js.map +0 -1
- package/build/components/__shared__/Payment/helpers/getCaption.js +0 -44
- package/build/components/__shared__/Payment/helpers/getCaption.js.map +0 -1
- package/build/components/__shared__/Payment/helpers/getComponent.js +0 -35
- package/build/components/__shared__/Payment/helpers/getComponent.js.map +0 -1
- package/build/components/__shared__/Payment/helpers/getImage.js +0 -17
- package/build/components/__shared__/Payment/helpers/getImage.js.map +0 -1
- package/build/components/__shared__/Payment/helpers/index.js +0 -39
- package/build/components/__shared__/Payment/helpers/index.js.map +0 -1
- package/build/components/__shared__/Payment/index.js +0 -49
- package/build/components/__shared__/Payment/index.js.map +0 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js +0 -57
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js.map +0 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js +0 -160
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js.map +0 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js +0 -93
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js.map +0 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.module.css +0 -34
- package/build/components/__shared__/PriceBreakdown/index.js +0 -17
- package/build/components/__shared__/PriceBreakdown/index.js.map +0 -1
- package/build/components/__shared__/Skeleton/Skeleton.js +0 -31
- package/build/components/__shared__/Skeleton/Skeleton.js.map +0 -1
- package/build/components/__shared__/Skeleton/Skeleton.module.css +0 -37
- package/build/components/__shared__/Skeleton/index.js +0 -17
- package/build/components/__shared__/Skeleton/index.js.map +0 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js +0 -34
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js.map +0 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js +0 -13
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js.map +0 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.module.css +0 -8
- package/build/components/__shared__/TextRequiredFields/__tests__/__snapshots__/TextRequiredFields.test.js.snap +0 -41
- package/build/components/__shared__/TextRequiredFields/index.js +0 -17
- package/build/components/__shared__/TextRequiredFields/index.js.map +0 -1
- package/build/components/__shared__/index.js +0 -138
- package/build/components/__shared__/index.js.map +0 -1
- package/build/components/helpers/ICON.AMENITIES.js +0 -149
- package/build/components/helpers/ICON.AMENITIES.js.map +0 -1
- package/build/components/helpers/ICON.js +0 -64
- package/build/components/helpers/ICON.js.map +0 -1
- package/build/components/helpers/__tests__/__snapshots__/parseHtml.test.js.snap +0 -313
- package/build/components/helpers/constants.js +0 -64
- package/build/components/helpers/constants.js.map +0 -1
- package/build/components/helpers/generateId.js +0 -22
- package/build/components/helpers/generateId.js.map +0 -1
- package/build/components/helpers/getButtonPaymentKey.js +0 -29
- package/build/components/helpers/getButtonPaymentKey.js.map +0 -1
- package/build/components/helpers/getButtonPaymentKey.l10n.js +0 -18
- package/build/components/helpers/getButtonPaymentKey.l10n.js.map +0 -1
- package/build/components/helpers/getCalendarCaption.js +0 -25
- package/build/components/helpers/getCalendarCaption.js.map +0 -1
- package/build/components/helpers/getCountryCode.js +0 -12
- package/build/components/helpers/getCountryCode.js.map +0 -1
- package/build/components/helpers/index.js +0 -171
- package/build/components/helpers/index.js.map +0 -1
- package/build/components/helpers/isJest.js +0 -9
- package/build/components/helpers/isJest.js.map +0 -1
- package/build/components/helpers/opacity.js +0 -17
- package/build/components/helpers/opacity.js.map +0 -1
- package/build/components/helpers/parseHtml.js +0 -75
- package/build/components/helpers/parseHtml.js.map +0 -1
- package/build/components/helpers/parseToParties.js +0 -19
- package/build/components/helpers/parseToParties.js.map +0 -1
- package/build/components/helpers/testPassword.js +0 -12
- package/build/components/helpers/testPassword.js.map +0 -1
- package/build/components/helpers/toQueryString.js +0 -20
- package/build/components/helpers/toQueryString.js.map +0 -1
- package/build/components/helpers/toUrlParams.js +0 -18
- package/build/components/helpers/toUrlParams.js.map +0 -1
- package/build/components/helpers/trace.js +0 -19
- package/build/components/helpers/trace.js.map +0 -1
- package/build/components/helpers/translate.js +0 -28
- package/build/components/helpers/translate.js.map +0 -1
- package/build/components/index.js +0 -30
- package/build/components/index.js.map +0 -1
- package/build/helpers/checkSession.js +0 -28
- package/build/helpers/checkSession.js.map +0 -1
- package/build/helpers/consolidateStore.js +0 -259
- package/build/helpers/consolidateStore.js.map +0 -1
- package/build/helpers/fetchConfig.js +0 -25
- package/build/helpers/fetchConfig.js.map +0 -1
- package/build/helpers/fetchCookies.js +0 -28
- package/build/helpers/fetchCookies.js.map +0 -1
- package/build/helpers/fetchSession.js +0 -69
- package/build/helpers/fetchSession.js.map +0 -1
- package/build/helpers/fetchUrlParams.js +0 -12
- package/build/helpers/fetchUrlParams.js.map +0 -1
- package/build/helpers/findComponents.js +0 -37
- package/build/helpers/findComponents.js.map +0 -1
- package/build/helpers/findDangerousCSSRules.js +0 -33
- package/build/helpers/findDangerousCSSRules.js.map +0 -1
- package/build/helpers/findInstance.js +0 -34
- package/build/helpers/findInstance.js.map +0 -1
- package/build/helpers/getAccommodationType.js +0 -15
- package/build/helpers/getAccommodationType.js.map +0 -1
- package/build/helpers/getGhost.js +0 -20
- package/build/helpers/getGhost.js.map +0 -1
- package/build/helpers/getLocale.js +0 -24
- package/build/helpers/getLocale.js.map +0 -1
- package/build/helpers/getTags.js +0 -44
- package/build/helpers/getTags.js.map +0 -1
- package/build/helpers/index.js +0 -138
- package/build/helpers/index.js.map +0 -1
- package/build/helpers/loadEnvironment.js +0 -26
- package/build/helpers/loadEnvironment.js.map +0 -1
- package/build/helpers/loadSentry.js +0 -30
- package/build/helpers/loadSentry.js.map +0 -1
- package/build/helpers/theme.js +0 -50
- package/build/helpers/theme.js.map +0 -1
- package/build/helpers/toOccupation.js +0 -73
- package/build/helpers/toOccupation.js.map +0 -1
- package/build/index.js +0 -106
- package/build/index.js.map +0 -1
- package/build/services/Club/__tests__/__mocks__/get.json +0 -66
- package/build/services/Club/constants.js +0 -10
- package/build/services/Club/constants.js.map +0 -1
- package/build/services/Club/get.js +0 -30
- package/build/services/Club/get.js.map +0 -1
- package/build/services/Club/index.js +0 -11
- package/build/services/Club/index.js.map +0 -1
- package/build/services/Engine/__tests__/__mocks__/chain.json +0 -2695
- package/build/services/Engine/__tests__/__mocks__/hotel.json +0 -184
- package/build/services/Engine/constants.js +0 -10
- package/build/services/Engine/constants.js.map +0 -1
- package/build/services/Engine/get.js +0 -31
- package/build/services/Engine/get.js.map +0 -1
- package/build/services/Engine/index.js +0 -11
- package/build/services/Engine/index.js.map +0 -1
- package/build/services/Rates/__tests__/__mocks__/rates-response-cancel-types.json +0 -1662
- package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes-no-local.json +0 -530
- package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes.json +0 -1255
- package/build/services/Rates/__tests__/__mocks__/rates-response.json +0 -294
- package/build/services/Rates/__tests__/__mocks__/rates-success-cancel-types.json +0 -32481
- package/build/services/Rates/__tests__/__mocks__/rates-success-no-taxes-no-local.json +0 -6674
- package/build/services/Rates/__tests__/__mocks__/rates-success-no-taxes.json +0 -16508
- package/build/services/Rates/__tests__/__mocks__/rates-success.json +0 -5648
- package/build/services/Rates/constants.js +0 -107
- package/build/services/Rates/constants.js.map +0 -1
- package/build/services/Rates/get.js +0 -171
- package/build/services/Rates/get.js.map +0 -1
- package/build/services/Rates/helpers/getIncrements.js +0 -69
- package/build/services/Rates/helpers/getIncrements.js.map +0 -1
- package/build/services/Rates/helpers/getPrice.js +0 -22
- package/build/services/Rates/helpers/getPrice.js.map +0 -1
- package/build/services/Rates/helpers/index.js +0 -72
- package/build/services/Rates/helpers/index.js.map +0 -1
- package/build/services/Rates/helpers/normalizePrice.js +0 -15
- package/build/services/Rates/helpers/normalizePrice.js.map +0 -1
- package/build/services/Rates/helpers/parseAmenities.js +0 -87
- package/build/services/Rates/helpers/parseAmenities.js.map +0 -1
- package/build/services/Rates/helpers/parseBoards.js +0 -156
- package/build/services/Rates/helpers/parseBoards.js.map +0 -1
- package/build/services/Rates/helpers/parseDiscount.js +0 -49
- package/build/services/Rates/helpers/parseDiscount.js.map +0 -1
- package/build/services/Rates/helpers/parseExternalToken.js +0 -24
- package/build/services/Rates/helpers/parseExternalToken.js.map +0 -1
- package/build/services/Rates/index.js +0 -11
- package/build/services/Rates/index.js.map +0 -1
- package/build/services/index.js +0 -39
- package/build/services/index.js.map +0 -1
- package/build/theme.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_getDataSource","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getForwarderUrl","_getHotels","_getOccupationDataSource","_getPlaceCaption","_getPlacesOptions","_parseCalendarProps","_parseValue","_validate"],"sources":["../../../../src/components/Finder/helpers/index.js"],"sourcesContent":["export * from './getDataSource';\nexport * from './getForwarderUrl';\nexport * from './getHotels';\nexport * from './getOccupationDataSource';\nexport * from './getPlaceCaption';\nexport * from './getPlacesOptions';\nexport * from './parseCalendarProps';\nexport * from './parseValue';\nexport * from './validate';\n"],"mappings":";;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,cAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,cAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,gBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,gBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,gBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,gBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,UAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,UAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,UAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;I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ale");
|
|
8
|
-
var _helpers = require("../../helpers");
|
|
9
|
-
var _Calendar = require("../components/Calendar/Calendar.constants");
|
|
10
|
-
var _Finder = require("../Finder.constants");
|
|
11
|
-
const TAXES = [_Calendar.TAX, _Calendar.TAX_FREE, _Calendar.TAX_PARTIAL];
|
|
12
|
-
const parseCalendarProps = function () {
|
|
13
|
-
var _variants$find;
|
|
14
|
-
let calendar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15
|
-
let id = arguments.length > 1 ? arguments[1] : undefined;
|
|
16
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _Finder.TYPE.HOTEL;
|
|
17
|
-
let variants = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
18
|
-
const {
|
|
19
|
-
maxDays = 365,
|
|
20
|
-
maxNights: rangeMaxDays = 31,
|
|
21
|
-
nightsForDeal: rangeMinDays,
|
|
22
|
-
prices: showPrices = false,
|
|
23
|
-
pricesWithTaxes: pricesLegend
|
|
24
|
-
} = type === _Finder.TYPE.HOTEL ? calendar : {
|
|
25
|
-
...calendar,
|
|
26
|
-
...(((_variants$find = variants.find(item => item.id == id)) === null || _variants$find === void 0 ? void 0 : _variants$find.calendar) || {})
|
|
27
|
-
};
|
|
28
|
-
return {
|
|
29
|
-
rangeMaxDays,
|
|
30
|
-
rangeMinDays,
|
|
31
|
-
pricesLegend: TAXES.includes(pricesLegend) ? pricesLegend : showPrices ? _Calendar.TAX : undefined,
|
|
32
|
-
showPrices,
|
|
33
|
-
to: (0, _locale.dateFormat)((0, _locale.dateCalc)(new Date(), maxDays, 'days'), _helpers.CALENDAR_FORMAT)
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.parseCalendarProps = parseCalendarProps;
|
|
37
|
-
//# sourceMappingURL=parseCalendarProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseCalendarProps.js","names":["_locale","require","_helpers","_Calendar","_Finder","TAXES","TAX","TAX_FREE","TAX_PARTIAL","parseCalendarProps","_variants$find","calendar","arguments","length","undefined","id","type","TYPE","HOTEL","variants","maxDays","maxNights","rangeMaxDays","nightsForDeal","rangeMinDays","prices","showPrices","pricesWithTaxes","pricesLegend","find","item","includes","to","dateFormat","dateCalc","Date","CALENDAR_FORMAT","exports"],"sources":["../../../../src/components/Finder/helpers/parseCalendarProps.js"],"sourcesContent":["import { dateCalc, dateFormat } from '@mirai/locale';\n\nimport { CALENDAR_FORMAT } from '../../helpers';\nimport { TAX, TAX_FREE, TAX_PARTIAL } from '../components/Calendar/Calendar.constants';\nimport { TYPE } from '../Finder.constants';\n\nconst TAXES = [TAX, TAX_FREE, TAX_PARTIAL];\n\nexport const parseCalendarProps = (calendar = {}, id, type = TYPE.HOTEL, variants = []) => {\n const {\n maxDays = 365,\n maxNights: rangeMaxDays = 31,\n nightsForDeal: rangeMinDays,\n prices: showPrices = false,\n pricesWithTaxes: pricesLegend,\n } = type === TYPE.HOTEL ? calendar : { ...calendar, ...(variants.find((item) => item.id == id)?.calendar || {}) };\n\n return {\n rangeMaxDays,\n rangeMinDays,\n pricesLegend: TAXES.includes(pricesLegend) ? pricesLegend : showPrices ? TAX : undefined,\n showPrices,\n to: dateFormat(dateCalc(new Date(), maxDays, 'days'), CALENDAR_FORMAT),\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,MAAMI,KAAK,GAAG,CAACC,aAAG,EAAEC,kBAAQ,EAAEC,qBAAW,CAAC;AAEnC,MAAMC,kBAAkB,GAAG,SAAAA,CAAA,EAAyD;EAAA,IAAAC,cAAA;EAAA,IAAxDC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IAAEG,EAAE,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-
const parseValue = function () {
|
|
8
|
-
let {
|
|
9
|
-
place,
|
|
10
|
-
calendar,
|
|
11
|
-
occupation,
|
|
12
|
-
promocode
|
|
13
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
|
-
return {
|
|
15
|
-
place,
|
|
16
|
-
calendar,
|
|
17
|
-
occupation,
|
|
18
|
-
promocode
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
exports.parseValue = parseValue;
|
|
22
|
-
//# sourceMappingURL=parseValue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseValue.js","names":["parseValue","place","calendar","occupation","promocode","arguments","length","undefined","exports"],"sources":["../../../../src/components/Finder/helpers/parseValue.js"],"sourcesContent":["export const parseValue = ({ place, calendar, occupation, promocode } = {}) => ({\n place,\n calendar,\n occupation,\n promocode,\n});\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAG,SAAAA,CAAA;EAAA,IAAC;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,UAAU;IAAEC;EAAU,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAAM;IAC9EJ,KAAK;IACLC,QAAQ;IACRC,UAAU;IACVC;EACF,CAAC;AAAA,CAAC;AAACI,OAAA,CAAAR,UAAA,GAAAA,UAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.validate = void 0;
|
|
7
|
-
const validate = function () {
|
|
8
|
-
let error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9
|
-
let valid = true;
|
|
10
|
-
Object.keys(error).forEach(key => {
|
|
11
|
-
if (error[key]) valid = false;
|
|
12
|
-
});
|
|
13
|
-
return valid;
|
|
14
|
-
};
|
|
15
|
-
exports.validate = validate;
|
|
16
|
-
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","names":["validate","error","arguments","length","undefined","valid","Object","keys","forEach","key","exports"],"sources":["../../../../src/components/Finder/helpers/validate.js"],"sourcesContent":["export const validate = (error = {}) => {\n let valid = true;\n\n Object.keys(error).forEach((key) => {\n if (error[key]) valid = false;\n });\n\n return valid;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAG,SAAAA,CAAA,EAAgB;EAAA,IAAfC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjC,IAAIG,KAAK,GAAG,IAAI;EAEhBC,MAAM,CAACC,IAAI,CAACN,KAAK,CAAC,CAACO,OAAO,CAAEC,GAAG,IAAK;IAClC,IAAIR,KAAK,CAACQ,GAAG,CAAC,EAAEJ,KAAK,GAAG,KAAK;EAC/B,CAAC,CAAC;EAEF,OAAOA,KAAK;AACd,CAAC;AAACK,OAAA,CAAAV,QAAA,GAAAA,QAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Finder", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Finder.Finder;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Finder = require("./Finder");
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Finder","require"],"sources":["../../../src/components/Finder/index.js"],"sourcesContent":["export { Finder } from './Finder';\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Account = void 0;
|
|
7
|
-
var _dataSources = require("@mirai/data-sources");
|
|
8
|
-
var _locale = require("@mirai/locale");
|
|
9
|
-
var _services = require("@mirai/services");
|
|
10
|
-
var _ui = require("@mirai/ui");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Profile = require("./Profile.constants");
|
|
13
|
-
var _Profile2 = require("./Profile.l10n");
|
|
14
|
-
var style = _interopRequireWildcard(require("./Profile.module.css"));
|
|
15
|
-
var _shared__ = require("../__shared__");
|
|
16
|
-
var _helpers = require("../helpers");
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
-
const Account = () => {
|
|
20
|
-
var _form$dateOfBirth, _formError$dateOfBirt;
|
|
21
|
-
const {
|
|
22
|
-
set,
|
|
23
|
-
value: {
|
|
24
|
-
locale,
|
|
25
|
-
session = {}
|
|
26
|
-
}
|
|
27
|
-
} = (0, _dataSources.useStore)();
|
|
28
|
-
const {
|
|
29
|
-
translate
|
|
30
|
-
} = (0, _locale.useLocale)();
|
|
31
|
-
const [busy, setBusy] = (0, _react.useState)(false);
|
|
32
|
-
const [countries, setCountries] = (0, _react.useState)({});
|
|
33
|
-
const [form, setForm] = (0, _react.useState)(session);
|
|
34
|
-
const [formError, setFormError] = (0, _react.useState)({});
|
|
35
|
-
const [responseError, setResponseError] = (0, _react.useState)();
|
|
36
|
-
const formatDate = (0, _locale.getDateFormat)(locale);
|
|
37
|
-
(0, _react.useEffect)(() => {
|
|
38
|
-
setResponseError();
|
|
39
|
-
set({
|
|
40
|
-
profile: form
|
|
41
|
-
});
|
|
42
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
|
-
}, [form]);
|
|
44
|
-
(0, _react.useEffect)(() => {
|
|
45
|
-
(async () => {
|
|
46
|
-
const next = (await _services.ServiceCountry.list(locale)) || {};
|
|
47
|
-
setCountries(next);
|
|
48
|
-
setForm({
|
|
49
|
-
...form,
|
|
50
|
-
country: next[session.country]
|
|
51
|
-
});
|
|
52
|
-
})();
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
|
-
}, [locale]);
|
|
56
|
-
const handleSubmit = async form => {
|
|
57
|
-
setBusy(true);
|
|
58
|
-
setResponseError(undefined);
|
|
59
|
-
const parameters = {
|
|
60
|
-
...form,
|
|
61
|
-
country: (0, _helpers.getCountryCode)(form.country, countries),
|
|
62
|
-
dateOfBirth: (0, _locale.dateFormat)((0, _locale.parseDate)(form.dateOfBirth, formatDate), {
|
|
63
|
-
format: 'DD/MM/YYYY'
|
|
64
|
-
})
|
|
65
|
-
};
|
|
66
|
-
const response = await _services.ServiceUser.update(parameters).catch(error => {
|
|
67
|
-
setResponseError(error);
|
|
68
|
-
});
|
|
69
|
-
if (response) {
|
|
70
|
-
_dataSources.Event.publish(_helpers.EVENT.NOTIFICATION, {
|
|
71
|
-
success: true,
|
|
72
|
-
..._Profile2.L10N.SUCCESS_ACCOUNT
|
|
73
|
-
});
|
|
74
|
-
set({
|
|
75
|
-
session: {
|
|
76
|
-
...session,
|
|
77
|
-
...parameters
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
setBusy(false);
|
|
82
|
-
};
|
|
83
|
-
const countryCode = (0, _helpers.getCountryCode)(form.country, countries);
|
|
84
|
-
const has = {
|
|
85
|
-
changes: _Profile.ACCOUNT_FIELDS.some(key => form[key] !== session[key]) || countryCode !== session.country,
|
|
86
|
-
dateOfBirth: (_form$dateOfBirth = form.dateOfBirth) === null || _form$dateOfBirth === void 0 ? void 0 : _form$dateOfBirth.length,
|
|
87
|
-
errors: Object.keys(formError).length !== 0
|
|
88
|
-
};
|
|
89
|
-
return /*#__PURE__*/_react.default.createElement(_ui.Form, {
|
|
90
|
-
validateOnMount: true,
|
|
91
|
-
onChange: setForm,
|
|
92
|
-
onError: setFormError,
|
|
93
|
-
onSubmit: handleSubmit
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
95
|
-
wide: true
|
|
96
|
-
}, translate(_Profile2.L10N.DESCRIPTION_ACCOUNT)), /*#__PURE__*/_react.default.createElement(_shared__.TextRequiredFields, null), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
97
|
-
name: "firstName",
|
|
98
|
-
error: formError.firstName,
|
|
99
|
-
label: translate(_Profile2.L10N.FIRSTNAME_LABEL),
|
|
100
|
-
required: true,
|
|
101
|
-
showRequired: true,
|
|
102
|
-
success: form.firstName !== session.firstName,
|
|
103
|
-
value: form.firstName
|
|
104
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
105
|
-
name: "lastName",
|
|
106
|
-
error: formError.lastName,
|
|
107
|
-
label: translate(_Profile2.L10N.LASTNAME_LABEL),
|
|
108
|
-
required: true,
|
|
109
|
-
showRequired: true,
|
|
110
|
-
success: form.lastName !== session.lastName,
|
|
111
|
-
value: form.lastName
|
|
112
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
113
|
-
name: "email",
|
|
114
|
-
disabled: true,
|
|
115
|
-
label: translate(_Profile2.L10N.EMAIL_LABEL),
|
|
116
|
-
required: true,
|
|
117
|
-
showRequired: true,
|
|
118
|
-
type: "email",
|
|
119
|
-
value: form.email
|
|
120
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputDate, {
|
|
121
|
-
name: "dateOfBirth",
|
|
122
|
-
error: has.dateOfBirth && !!formError.dateOfBirth,
|
|
123
|
-
hint: has.dateOfBirth && (_formError$dateOfBirt = formError.dateOfBirth) !== null && _formError$dateOfBirt !== void 0 && _formError$dateOfBirt.max ? translate(_Profile2.L10N.DATEOFBIRTH_ERROR) : undefined,
|
|
124
|
-
format: formatDate,
|
|
125
|
-
label: translate(_Profile2.L10N.DATEOFBIRTH_LABEL),
|
|
126
|
-
max: (0, _locale.dateFormat)((0, _locale.dateCalc)(new Date(), -18, 'years'), {
|
|
127
|
-
format: formatDate
|
|
128
|
-
}),
|
|
129
|
-
required: true,
|
|
130
|
-
showRequired: true,
|
|
131
|
-
success: form.dateOfBirth !== session.dateOfBirth,
|
|
132
|
-
type: "inputDate",
|
|
133
|
-
value: form.dateOfBirth
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputSelect, {
|
|
135
|
-
name: "country",
|
|
136
|
-
label: translate(_Profile2.L10N.COUNTRY_LABEL),
|
|
137
|
-
placeholder: translate(_Profile2.L10N.COUNTRY_PLACEHOLDER),
|
|
138
|
-
options: Object.values(countries),
|
|
139
|
-
required: true,
|
|
140
|
-
showRequired: true,
|
|
141
|
-
success: countryCode !== session.country,
|
|
142
|
-
value: form.country
|
|
143
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputOption, {
|
|
144
|
-
name: "subscribed",
|
|
145
|
-
checked: form.subscribed,
|
|
146
|
-
type: "checkbox",
|
|
147
|
-
label: translate(_Profile2.L10N.SUBSCRIBED_LABEL),
|
|
148
|
-
value: form.subscribed,
|
|
149
|
-
className: style.wide
|
|
150
|
-
}), responseError && /*#__PURE__*/_react.default.createElement(_ui.Notification, {
|
|
151
|
-
error: true,
|
|
152
|
-
className: style.notification
|
|
153
|
-
}, translate(_Profile2.L10N.ERROR)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
154
|
-
busy: busy,
|
|
155
|
-
disabled: busy || has.errors || !has.changes,
|
|
156
|
-
large: true,
|
|
157
|
-
wide: true,
|
|
158
|
-
type: "submit",
|
|
159
|
-
className: style.button
|
|
160
|
-
}, translate(_Profile2.L10N.CTA_ACCOUNT)));
|
|
161
|
-
};
|
|
162
|
-
exports.Account = Account;
|
|
163
|
-
Account.displayName = 'Mirai:User:Profile.Account';
|
|
164
|
-
Account.propTypes = {};
|
|
165
|
-
//# sourceMappingURL=Profile.Account.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.Account.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Profile","_Profile2","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Account","_form$dateOfBirth","_formError$dateOfBirt","value","locale","session","useStore","translate","useLocale","busy","setBusy","useState","countries","setCountries","form","setForm","formError","setFormError","responseError","setResponseError","formatDate","getDateFormat","useEffect","profile","next","ServiceCountry","list","country","handleSubmit","undefined","parameters","getCountryCode","dateOfBirth","dateFormat","parseDate","format","response","ServiceUser","update","catch","error","Event","publish","EVENT","NOTIFICATION","success","L10N","SUCCESS_ACCOUNT","countryCode","changes","ACCOUNT_FIELDS","some","key","length","errors","keys","createElement","Form","validateOnMount","onChange","onError","onSubmit","Text","wide","DESCRIPTION_ACCOUNT","TextRequiredFields","InputText","name","firstName","label","FIRSTNAME_LABEL","required","showRequired","lastName","LASTNAME_LABEL","disabled","EMAIL_LABEL","type","email","InputDate","hint","max","DATEOFBIRTH_ERROR","DATEOFBIRTH_LABEL","dateCalc","Date","InputSelect","COUNTRY_LABEL","placeholder","COUNTRY_PLACEHOLDER","options","values","InputOption","checked","subscribed","SUBSCRIBED_LABEL","className","Notification","notification","ERROR","Button","large","button","CTA_ACCOUNT","exports","displayName","propTypes"],"sources":["../../../src/components/Profile/Profile.Account.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { dateCalc, dateFormat, getDateFormat, parseDate, useLocale } from '@mirai/locale';\nimport { ServiceCountry, ServiceUser } from '@mirai/services';\nimport { Button, Form, InputDate, InputOption, InputSelect, InputText, Notification, Text } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { ACCOUNT_FIELDS } from './Profile.constants';\nimport { L10N } from './Profile.l10n';\nimport * as style from './Profile.module.css';\nimport { TextRequiredFields } from '../__shared__';\nimport { EVENT, getCountryCode } from '../helpers';\n\nconst Account = () => {\n const {\n set,\n value: { locale, session = {} },\n } = useStore();\n const { translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [countries, setCountries] = useState({});\n const [form, setForm] = useState(session);\n const [formError, setFormError] = useState({});\n const [responseError, setResponseError] = useState();\n\n const formatDate = getDateFormat(locale);\n\n useEffect(() => {\n setResponseError();\n set({ profile: form });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n useEffect(() => {\n (async () => {\n const next = (await ServiceCountry.list(locale)) || {};\n\n setCountries(next);\n setForm({ ...form, country: next[session.country] });\n })();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n\n const handleSubmit = async (form) => {\n setBusy(true);\n setResponseError(undefined);\n\n const parameters = {\n ...form,\n country: getCountryCode(form.country, countries),\n dateOfBirth: dateFormat(parseDate(form.dateOfBirth, formatDate), { format: 'DD/MM/YYYY' }),\n };\n\n const response = await ServiceUser.update(parameters).catch((error) => {\n setResponseError(error);\n });\n\n if (response) {\n Event.publish(EVENT.NOTIFICATION, { success: true, ...L10N.SUCCESS_ACCOUNT });\n set({ session: { ...session, ...parameters } });\n }\n setBusy(false);\n };\n\n const countryCode = getCountryCode(form.country, countries);\n const has = {\n changes: ACCOUNT_FIELDS.some((key) => form[key] !== session[key]) || countryCode !== session.country,\n dateOfBirth: form.dateOfBirth?.length,\n errors: Object.keys(formError).length !== 0,\n };\n\n return (\n <Form validateOnMount onChange={setForm} onError={setFormError} onSubmit={handleSubmit}>\n <Text wide>{translate(L10N.DESCRIPTION_ACCOUNT)}</Text>\n <TextRequiredFields />\n <InputText\n name=\"firstName\"\n error={formError.firstName}\n label={translate(L10N.FIRSTNAME_LABEL)}\n required\n showRequired\n success={form.firstName !== session.firstName}\n value={form.firstName}\n />\n <InputText\n name=\"lastName\"\n error={formError.lastName}\n label={translate(L10N.LASTNAME_LABEL)}\n required\n showRequired\n success={form.lastName !== session.lastName}\n value={form.lastName}\n />\n <InputText\n name=\"email\"\n disabled\n label={translate(L10N.EMAIL_LABEL)}\n required\n showRequired\n type=\"email\"\n value={form.email}\n />\n <InputDate\n name=\"dateOfBirth\"\n error={has.dateOfBirth && !!formError.dateOfBirth}\n hint={has.dateOfBirth && formError.dateOfBirth?.max ? translate(L10N.DATEOFBIRTH_ERROR) : undefined}\n format={formatDate}\n label={translate(L10N.DATEOFBIRTH_LABEL)}\n max={dateFormat(dateCalc(new Date(), -18, 'years'), { format: formatDate })}\n required\n showRequired\n success={form.dateOfBirth !== session.dateOfBirth}\n type=\"inputDate\"\n value={form.dateOfBirth}\n />\n <InputSelect\n name=\"country\"\n label={translate(L10N.COUNTRY_LABEL)}\n placeholder={translate(L10N.COUNTRY_PLACEHOLDER)}\n options={Object.values(countries)}\n required\n showRequired\n success={countryCode !== session.country}\n value={form.country}\n />\n <InputOption\n name=\"subscribed\"\n checked={form.subscribed}\n type=\"checkbox\"\n label={translate(L10N.SUBSCRIBED_LABEL)}\n value={form.subscribed}\n className={style.wide}\n />\n\n {responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.ERROR)}\n </Notification>\n )}\n\n <Button\n busy={busy}\n disabled={busy || has.errors || !has.changes}\n large\n wide\n type=\"submit\"\n className={style.button}\n >\n {translate(L10N.CTA_ACCOUNT)}\n </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E,MAAM,IAAI,CAACpE,GAAG,CAAC+D,OAAQ;IAC7CoD,KAAK;IACLtC,IAAI;IACJc,IAAI,EAAC,QAAQ;IACbmB,SAAS,EAAExH,KAAK,CAAC8H;EAAO,GAEvB/F,SAAS,CAACuC,cAAI,CAACyD,WAAW,CACrB,CACJ,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAxG,OAAA,GAAAA,OAAA;AAEFA,OAAO,CAACyG,WAAW,GAAG,4BAA4B;AAElDzG,OAAO,CAAC0G,SAAS,GAAG,CAAC,CAAC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Password = void 0;
|
|
7
|
-
var _dataSources = require("@mirai/data-sources");
|
|
8
|
-
var _locale = require("@mirai/locale");
|
|
9
|
-
var _services = require("@mirai/services");
|
|
10
|
-
var _ui = require("@mirai/ui");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Profile = require("./Profile.l10n");
|
|
13
|
-
var style = _interopRequireWildcard(require("./Profile.module.css"));
|
|
14
|
-
var _shared__ = require("../__shared__");
|
|
15
|
-
var _helpers = require("../helpers");
|
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
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); }
|
|
19
|
-
const Password = others => {
|
|
20
|
-
var _form$currentPassword, _formError$currentPas, _form$currentPassword2, _form$password, _formError$password, _form$password2;
|
|
21
|
-
const {
|
|
22
|
-
translate
|
|
23
|
-
} = (0, _locale.useLocale)();
|
|
24
|
-
const {
|
|
25
|
-
value: {
|
|
26
|
-
session: {
|
|
27
|
-
club: {
|
|
28
|
-
id: idClub
|
|
29
|
-
} = {},
|
|
30
|
-
email
|
|
31
|
-
} = {}
|
|
32
|
-
} = {},
|
|
33
|
-
set
|
|
34
|
-
} = (0, _dataSources.useStore)();
|
|
35
|
-
const [busy, setBusy] = (0, _react.useState)(false);
|
|
36
|
-
const [form, setForm] = (0, _react.useState)({});
|
|
37
|
-
const [formError, setFormError] = (0, _react.useState)({});
|
|
38
|
-
const [responseError, setResponseError] = (0, _react.useState)();
|
|
39
|
-
const [sessionError, setSessionError] = (0, _react.useState)();
|
|
40
|
-
(0, _react.useEffect)(() => {
|
|
41
|
-
setResponseError();
|
|
42
|
-
setSessionError();
|
|
43
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
-
}, [form]);
|
|
45
|
-
const handleSubmit = async form => {
|
|
46
|
-
setBusy(true);
|
|
47
|
-
setResponseError(undefined);
|
|
48
|
-
setSessionError(undefined);
|
|
49
|
-
const {
|
|
50
|
-
currentPassword,
|
|
51
|
-
password
|
|
52
|
-
} = form;
|
|
53
|
-
const session = await _services.ServiceUser.login({
|
|
54
|
-
email,
|
|
55
|
-
idClub,
|
|
56
|
-
password: currentPassword
|
|
57
|
-
}).catch(error => {
|
|
58
|
-
setSessionError(error);
|
|
59
|
-
});
|
|
60
|
-
if (session) set({
|
|
61
|
-
session
|
|
62
|
-
});
|
|
63
|
-
const response = session && (await _services.ServiceUser.update({
|
|
64
|
-
password
|
|
65
|
-
}).catch(error => {
|
|
66
|
-
setResponseError(error);
|
|
67
|
-
}));
|
|
68
|
-
if (response) {
|
|
69
|
-
_dataSources.Event.publish(_helpers.EVENT.NOTIFICATION, {
|
|
70
|
-
success: true,
|
|
71
|
-
..._Profile.L10N.SUCCESS_PASSWORD
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
setBusy(false);
|
|
75
|
-
};
|
|
76
|
-
const has = {
|
|
77
|
-
errors: Object.keys(formError).length !== 0 || form.password === form.currentPassword,
|
|
78
|
-
responseError: responseError || sessionError
|
|
79
|
-
};
|
|
80
|
-
return /*#__PURE__*/_react.default.createElement(_ui.Form, _extends({}, others, {
|
|
81
|
-
validateOnMount: true,
|
|
82
|
-
onChange: setForm,
|
|
83
|
-
onError: setFormError,
|
|
84
|
-
onSubmit: handleSubmit
|
|
85
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
86
|
-
wide: true
|
|
87
|
-
}, translate(_Profile.L10N.DESCRIPTION_PASSWORD)), /*#__PURE__*/_react.default.createElement(_shared__.TextRequiredFields, null), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
88
|
-
name: "currentPassword",
|
|
89
|
-
error: ((_form$currentPassword = form.currentPassword) === null || _form$currentPassword === void 0 ? void 0 : _form$currentPassword.length) && ((_formError$currentPas = formError.currentPassword) === null || _formError$currentPas === void 0 ? void 0 : _formError$currentPas.test),
|
|
90
|
-
hint: translate(_Profile.L10N.PASSWORD_HINT),
|
|
91
|
-
label: translate(_Profile.L10N.PASSWORD_LABEL),
|
|
92
|
-
required: true,
|
|
93
|
-
showRequired: true,
|
|
94
|
-
success: ((_form$currentPassword2 = form.currentPassword) === null || _form$currentPassword2 === void 0 ? void 0 : _form$currentPassword2.length) && !formError.currentPassword,
|
|
95
|
-
type: "password",
|
|
96
|
-
value: form.currentPassword
|
|
97
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.InputText, {
|
|
98
|
-
name: "password",
|
|
99
|
-
error: ((_form$password = form.password) === null || _form$password === void 0 ? void 0 : _form$password.length) && (((_formError$password = formError.password) === null || _formError$password === void 0 ? void 0 : _formError$password.test) || form.password === form.currentPassword),
|
|
100
|
-
hint: translate(_Profile.L10N.PASSWORD_HINT),
|
|
101
|
-
label: translate(_Profile.L10N.PASSWORD_NEW_LABEL),
|
|
102
|
-
required: true,
|
|
103
|
-
showRequired: true,
|
|
104
|
-
success: ((_form$password2 = form.password) === null || _form$password2 === void 0 ? void 0 : _form$password2.length) && form.password !== form.currentPassword && !formError.password,
|
|
105
|
-
test: _helpers.testPassword,
|
|
106
|
-
type: "password",
|
|
107
|
-
value: form.password
|
|
108
|
-
}), has.responseError && /*#__PURE__*/_react.default.createElement(_ui.Notification, {
|
|
109
|
-
error: true,
|
|
110
|
-
className: style.notification
|
|
111
|
-
}, translate(_Profile.L10N.ERROR)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
112
|
-
busy: busy,
|
|
113
|
-
disabled: busy || has.errors,
|
|
114
|
-
large: true,
|
|
115
|
-
wide: true,
|
|
116
|
-
type: "submit",
|
|
117
|
-
className: style.button
|
|
118
|
-
}, translate(_Profile.L10N.CTA_PASSWORD)));
|
|
119
|
-
};
|
|
120
|
-
exports.Password = Password;
|
|
121
|
-
Password.displayName = 'Mirai:User:Profile.Password';
|
|
122
|
-
Password.propTypes = {};
|
|
123
|
-
//# sourceMappingURL=Profile.Password.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.Password.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Profile","style","_shared__","_helpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","Password","others","_form$currentPassword","_formError$currentPas","_form$currentPassword2","_form$password","_formError$password","_form$password2","translate","useLocale","value","session","club","id","idClub","email","useStore","busy","setBusy","useState","form","setForm","formError","setFormError","responseError","setResponseError","sessionError","setSessionError","useEffect","handleSubmit","undefined","currentPassword","password","ServiceUser","login","catch","error","response","update","Event","publish","EVENT","NOTIFICATION","success","L10N","SUCCESS_PASSWORD","errors","keys","createElement","Form","validateOnMount","onChange","onError","onSubmit","Text","wide","DESCRIPTION_PASSWORD","TextRequiredFields","InputText","name","test","hint","PASSWORD_HINT","label","PASSWORD_LABEL","required","showRequired","type","PASSWORD_NEW_LABEL","testPassword","Notification","className","notification","ERROR","Button","disabled","large","button","CTA_PASSWORD","exports","displayName","propTypes"],"sources":["../../../src/components/Profile/Profile.Password.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport { ServiceUser } from '@mirai/services';\nimport { Button, Form, InputText, Notification, Text } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { L10N } from './Profile.l10n';\nimport * as style from './Profile.module.css';\nimport { TextRequiredFields } from '../__shared__';\nimport { EVENT, testPassword } from '../helpers';\n\nconst Password = (others) => {\n const { translate } = useLocale();\n const { value: { session: { club: { id: idClub } = {}, email } = {} } = {}, set } = useStore();\n\n const [busy, setBusy] = useState(false);\n const [form, setForm] = useState({});\n const [formError, setFormError] = useState({});\n const [responseError, setResponseError] = useState();\n const [sessionError, setSessionError] = useState();\n\n useEffect(() => {\n setResponseError();\n setSessionError();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form]);\n\n const handleSubmit = async (form) => {\n setBusy(true);\n setResponseError(undefined);\n setSessionError(undefined);\n\n const { currentPassword, password } = form;\n const session = await ServiceUser.login({ email, idClub, password: currentPassword }).catch((error) => {\n setSessionError(error);\n });\n if (session) set({ session });\n\n const response =\n session &&\n (await ServiceUser.update({\n password,\n }).catch((error) => {\n setResponseError(error);\n }));\n\n if (response) {\n Event.publish(EVENT.NOTIFICATION, { success: true, ...L10N.SUCCESS_PASSWORD });\n }\n\n setBusy(false);\n };\n\n const has = {\n errors: Object.keys(formError).length !== 0 || form.password === form.currentPassword,\n responseError: responseError || sessionError,\n };\n\n return (\n <Form {...others} validateOnMount onChange={setForm} onError={setFormError} onSubmit={handleSubmit}>\n <Text wide>{translate(L10N.DESCRIPTION_PASSWORD)}</Text>\n <TextRequiredFields />\n <InputText\n name=\"currentPassword\"\n error={form.currentPassword?.length && formError.currentPassword?.test}\n hint={translate(L10N.PASSWORD_HINT)}\n label={translate(L10N.PASSWORD_LABEL)}\n required\n showRequired\n success={form.currentPassword?.length && !formError.currentPassword}\n type=\"password\"\n value={form.currentPassword}\n />\n\n <InputText\n name=\"password\"\n error={form.password?.length && (formError.password?.test || form.password === form.currentPassword)}\n hint={translate(L10N.PASSWORD_HINT)}\n label={translate(L10N.PASSWORD_NEW_LABEL)}\n required\n showRequired\n success={form.password?.length && form.password !== form.currentPassword && !formError.password}\n test={testPassword}\n type=\"password\"\n value={form.password}\n />\n\n {has.responseError && (\n <Notification error className={style.notification}>\n {translate(L10N.ERROR)}\n </Notification>\n )}\n\n <Button busy={busy} disabled={busy || has.errors} large wide type=\"submit\" className={style.button}>\n {translate(L10N.CTA_PASSWORD)}\n </Button>\n </Form>\n );\n};\n\nPassword.displayName = 'Mirai:User:Profile.Password';\n\nPassword.propTypes = {};\n\nexport { Password };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAF,uBAAA,CAAAL,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAAiD,SAAAU,yBAAAC,CAAA,6BAAAC,O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
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Signout = void 0;
|
|
7
|
-
var _dataSources = require("@mirai/data-sources");
|
|
8
|
-
var _locale = require("@mirai/locale");
|
|
9
|
-
var _services = require("@mirai/services");
|
|
10
|
-
var _ui = require("@mirai/ui");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Profile = require("./Profile.l10n");
|
|
13
|
-
var style = _interopRequireWildcard(require("./Profile.module.css"));
|
|
14
|
-
var _helpers = require("../helpers");
|
|
15
|
-
var _Session = require("../Session/Session.constants");
|
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
const Signout = () => {
|
|
19
|
-
const {
|
|
20
|
-
value: {
|
|
21
|
-
club = {},
|
|
22
|
-
hotel = {},
|
|
23
|
-
language
|
|
24
|
-
}
|
|
25
|
-
} = (0, _dataSources.useStore)();
|
|
26
|
-
const {
|
|
27
|
-
translate
|
|
28
|
-
} = (0, _locale.useLocale)();
|
|
29
|
-
const [busy, setBusy] = (0, _react.useState)(false);
|
|
30
|
-
const [modal, setModal] = (0, _react.useState)(false);
|
|
31
|
-
const [response, setResponse] = (0, _react.useState)();
|
|
32
|
-
const [responseError, setResponseError] = (0, _react.useState)();
|
|
33
|
-
const handleSubmit = async () => {
|
|
34
|
-
setBusy(true);
|
|
35
|
-
setResponseError(undefined);
|
|
36
|
-
const response = await _services.ServiceUser.signout().catch(error => {
|
|
37
|
-
setResponseError(error);
|
|
38
|
-
});
|
|
39
|
-
setResponse(response);
|
|
40
|
-
setBusy(false);
|
|
41
|
-
};
|
|
42
|
-
const handleClose = () => {
|
|
43
|
-
setModal(false);
|
|
44
|
-
};
|
|
45
|
-
const handleOpen = () => {
|
|
46
|
-
setModal(true);
|
|
47
|
-
};
|
|
48
|
-
const handleSignup = () => {
|
|
49
|
-
const url = "".concat(process.env.SERVICE_USER, "/").concat(_Session.ENDPOINT.SIGNUP).concat((0, _helpers.toUrlParams)({
|
|
50
|
-
idtokenprovider: hotel.id,
|
|
51
|
-
lang: language
|
|
52
|
-
}));
|
|
53
|
-
document.location.href = url;
|
|
54
|
-
};
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
56
|
-
bold: true,
|
|
57
|
-
headline: true
|
|
58
|
-
}, translate(_Profile.L10N.TITLE_SIGNOUT, {
|
|
59
|
-
club: club.name
|
|
60
|
-
})), /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
61
|
-
className: style.description
|
|
62
|
-
}, translate(_Profile.L10N.DESCRIPTION_SIGNOUT)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
63
|
-
secondary: true,
|
|
64
|
-
large: true,
|
|
65
|
-
wide: true,
|
|
66
|
-
onPress: handleOpen
|
|
67
|
-
}, translate(_Profile.L10N.BUTTON_SIGNOUT)), /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
68
|
-
title: translate(_Profile.L10N.BUTTON_SIGNOUT),
|
|
69
|
-
visible: modal,
|
|
70
|
-
onClose: handleClose
|
|
71
|
-
}, /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
72
|
-
className: style.content
|
|
73
|
-
}, !response && /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
74
|
-
className: style.description
|
|
75
|
-
}, translate(_Profile.L10N.DESCRIPTION_SIGNOUT_MODAL)), (response || responseError) && /*#__PURE__*/_react.default.createElement(_ui.Notification, {
|
|
76
|
-
large: !!response,
|
|
77
|
-
error: !!responseError,
|
|
78
|
-
success: !!response,
|
|
79
|
-
className: style.notification
|
|
80
|
-
}, translate(responseError ? _Profile.L10N.ERROR : _Profile.L10N.SUCCESS_SIGNOUT)), !response ? /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
81
|
-
row: true,
|
|
82
|
-
className: style.buttons
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement(_ui.Action, {
|
|
84
|
-
disabled: busy,
|
|
85
|
-
onPress: handleClose
|
|
86
|
-
}, translate(_Profile.L10N.ACTION_SIGNOUT_CANCEL)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
87
|
-
busy: busy,
|
|
88
|
-
onPress: handleSubmit
|
|
89
|
-
}, translate(_Profile.L10N.CTA_SIGNOUT))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
90
|
-
className: style.description
|
|
91
|
-
}, translate(_Profile.L10N.DESCRIPTION_SIGNOUT_MODAL_SUCCESS)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
92
|
-
wide: true,
|
|
93
|
-
type: "submit",
|
|
94
|
-
onPress: handleSignup
|
|
95
|
-
}, translate(_Profile.L10N.CTA_SIGNUP))))));
|
|
96
|
-
};
|
|
97
|
-
exports.Signout = Signout;
|
|
98
|
-
Signout.displayName = 'Mirai:User:Profile.Signout';
|
|
99
|
-
Signout.propTypes = {};
|
|
100
|
-
//# sourceMappingURL=Profile.Signout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.Signout.js","names":["_dataSources","require","_locale","_services","_ui","_react","_interopRequireWildcard","_Profile","style","_helpers","_Session","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Signout","value","club","hotel","language","useStore","translate","useLocale","busy","setBusy","useState","modal","setModal","response","setResponse","responseError","setResponseError","handleSubmit","undefined","ServiceUser","signout","catch","error","handleClose","handleOpen","handleSignup","url","concat","process","env","SERVICE_USER","ENDPOINT","SIGNUP","toUrlParams","idtokenprovider","id","lang","document","location","href","createElement","Fragment","Text","bold","headline","L10N","TITLE_SIGNOUT","name","className","description","DESCRIPTION_SIGNOUT","Button","secondary","large","wide","onPress","BUTTON_SIGNOUT","Modal","title","visible","onClose","View","content","DESCRIPTION_SIGNOUT_MODAL","Notification","success","notification","ERROR","SUCCESS_SIGNOUT","row","buttons","Action","disabled","ACTION_SIGNOUT_CANCEL","CTA_SIGNOUT","DESCRIPTION_SIGNOUT_MODAL_SUCCESS","type","CTA_SIGNUP","exports","displayName","propTypes"],"sources":["../../../src/components/Profile/Profile.Signout.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport { ServiceUser } from '@mirai/services';\nimport { Action, Button, Modal, Notification, Text, View } from '@mirai/ui';\nimport React, { useState } from 'react';\n\nimport { L10N } from './Profile.l10n';\nimport * as style from './Profile.module.css';\nimport { toUrlParams } from '../helpers';\nimport { ENDPOINT } from '../Session/Session.constants';\n\nconst Signout = () => {\n const {\n value: { club = {}, hotel = {}, language },\n } = useStore();\n const { translate } = useLocale();\n\n const [busy, setBusy] = useState(false);\n const [modal, setModal] = useState(false);\n const [response, setResponse] = useState();\n const [responseError, setResponseError] = useState();\n\n const handleSubmit = async () => {\n setBusy(true);\n setResponseError(undefined);\n\n const response = await ServiceUser.signout().catch((error) => {\n setResponseError(error);\n });\n\n setResponse(response);\n setBusy(false);\n };\n\n const handleClose = () => {\n setModal(false);\n };\n\n const handleOpen = () => {\n setModal(true);\n };\n\n const handleSignup = () => {\n const url = `${process.env.SERVICE_USER}/${ENDPOINT.SIGNUP}${toUrlParams({\n idtokenprovider: hotel.id,\n lang: language,\n })}`;\n\n document.location.href = url;\n };\n\n return (\n <>\n <Text bold headline>\n {translate(L10N.TITLE_SIGNOUT, { club: club.name })}\n </Text>\n\n <Text className={style.description}>{translate(L10N.DESCRIPTION_SIGNOUT)}</Text>\n\n <Button secondary large wide onPress={handleOpen}>\n {translate(L10N.BUTTON_SIGNOUT)}\n </Button>\n\n <Modal title={translate(L10N.BUTTON_SIGNOUT)} visible={modal} onClose={handleClose}>\n <View className={style.content}>\n {!response && <Text className={style.description}>{translate(L10N.DESCRIPTION_SIGNOUT_MODAL)}</Text>}\n\n {(response || responseError) && (\n <Notification\n large={!!response}\n error={!!responseError}\n success={!!response}\n className={style.notification}\n >\n {translate(responseError ? L10N.ERROR : L10N.SUCCESS_SIGNOUT)}\n </Notification>\n )}\n\n {!response ? (\n <View row className={style.buttons}>\n <Action disabled={busy} onPress={handleClose}>\n {translate(L10N.ACTION_SIGNOUT_CANCEL)}\n </Action>\n <Button busy={busy} onPress={handleSubmit}>\n {translate(L10N.CTA_SIGNOUT)}\n </Button>\n </View>\n ) : (\n <>\n <Text className={style.description}>{translate(L10N.DESCRIPTION_SIGNOUT_MODAL_SUCCESS)}</Text>\n <Button wide type=\"submit\" onPress={handleSignup}>\n {translate(L10N.CTA_SIGNUP)}\n </Button>\n </>\n )}\n </View>\n </Modal>\n </>\n );\n};\n\nSignout.displayName = 'Mirai:User:Profile.Signout';\n\nSignout.propTypes = {};\n\nexport { Signout };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAF,uBAAA,CAAAL,OAAA;AACA,IAA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AAQ;IAACrB,OAAO,EAAE9B;EAAa,GAC9CnB,SAAS,CAACuC,aAAI,CAACgC,UAAU,CACpB,CACR,CAEA,CACD,CACP,CAAC;AAEP,CAAC;AAACC,OAAA,CAAA9E,OAAA,GAAAA,OAAA;AAEFA,OAAO,CAAC+E,WAAW,GAAG,4BAA4B;AAElD/E,OAAO,CAACgF,SAAS,GAAG,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TRACKING = exports.CONTEXT = exports.ACCOUNT_FIELDS = void 0;
|
|
7
|
-
const ACCOUNT_FIELDS = exports.ACCOUNT_FIELDS = ['firstName', 'lastName', 'dateOfBirth', 'subscribed'];
|
|
8
|
-
const CONTEXT = exports.CONTEXT = {
|
|
9
|
-
ACCOUNT: 'account',
|
|
10
|
-
BOOKINGS: 'bookings'
|
|
11
|
-
};
|
|
12
|
-
const TRACKING = exports.TRACKING = 'PROFILE';
|
|
13
|
-
//# sourceMappingURL=Profile.constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.constants.js","names":["ACCOUNT_FIELDS","exports","CONTEXT","ACCOUNT","BOOKINGS","TRACKING"],"sources":["../../../src/components/Profile/Profile.constants.js"],"sourcesContent":["const ACCOUNT_FIELDS = ['firstName', 'lastName', 'dateOfBirth', 'subscribed'];\n\nconst CONTEXT = {\n ACCOUNT: 'account',\n BOOKINGS: 'bookings',\n};\n\nconst TRACKING = 'PROFILE';\n\nexport { ACCOUNT_FIELDS, CONTEXT, TRACKING };\n"],"mappings":";;;;;;AAAA,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC;AAE7E,MAAME,OAAO,GAAAD,OAAA,CAAAC,OAAA,GAAG;EACdC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAAG,SAAS"}
|