diff --git a/package.json b/package.json index 60801b2b044..9c154937887 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "pagopa_api_walletv2": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.29/bonus/specs/bpd/pm/walletv2.json", "pagopa_cobadge_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.29/pagopa/cobadge/abi_definitions.yml", "pagopa_privative_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.29/pagopa/privative/definitions.yml", - "idpay_api": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v6.5.0/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml", + "idpay_api": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v6.9.1/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml", "lollipop_api": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/api_lollipop_first_consumer.yaml", "fast_login_api": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/openapi/generated/api_fast_login.yaml", "pagopa_api_walletv3": "https://raw.githubusercontent.com/pagopa/pagopa-infra/4cd111e94432ff62580adc391de78a5462a7128e/src/domains/wallet-app/api/payment-wallet/v1/_openapi.json.tpl", diff --git a/ts/boot/configureStoreAndPersistor.ts b/ts/boot/configureStoreAndPersistor.ts index bfcad576113..26b33faa001 100644 --- a/ts/boot/configureStoreAndPersistor.ts +++ b/ts/boot/configureStoreAndPersistor.ts @@ -22,7 +22,7 @@ import { persistStore } from "redux-persist"; import createSagaMiddleware from "redux-saga"; -import { remoteUndefined } from "../features/bonus/bpd/model/RemoteValue"; +import { remoteUndefined } from "../common/model/RemoteValue"; import { CURRENT_REDUX_LOLLIPOP_STORE_VERSION } from "../features/lollipop/store"; import { initialLollipopState, diff --git a/ts/features/bonus/bpd/model/RemoteValue.ts b/ts/common/model/RemoteValue.ts similarity index 100% rename from ts/features/bonus/bpd/model/RemoteValue.ts rename to ts/common/model/RemoteValue.ts diff --git a/ts/features/bonus/bonusVacanze/components/FooterTopShadow.tsx b/ts/components/FooterTopShadow.tsx similarity index 76% rename from ts/features/bonus/bonusVacanze/components/FooterTopShadow.tsx rename to ts/components/FooterTopShadow.tsx index 24457f387e4..a32c1d30755 100644 --- a/ts/features/bonus/bonusVacanze/components/FooterTopShadow.tsx +++ b/ts/components/FooterTopShadow.tsx @@ -1,7 +1,7 @@ +import { IOStyles } from "@pagopa/io-app-design-system"; import * as React from "react"; -import { View, StyleSheet } from "react-native"; -import { IOStyles } from "../../../../components/core/variables/IOStyles"; -import variables from "../../../../theme/variables"; +import { StyleSheet, View } from "react-native"; +import variables from "../theme/variables"; // TODO: after bonus vacanze,create a common style for footer, atm duplicated in FooterWithButtons const styles = StyleSheet.create({ diff --git a/ts/features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent.tsx b/ts/components/LoadingErrorComponent.tsx similarity index 82% rename from ts/features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent.tsx rename to ts/components/LoadingErrorComponent.tsx index c86e4acd889..734c7a29507 100644 --- a/ts/features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent.tsx +++ b/ts/components/LoadingErrorComponent.tsx @@ -1,12 +1,12 @@ import { Millisecond } from "@pagopa/ts-commons/lib/units"; import * as React from "react"; import { useEffect } from "react"; -import { View, ActivityIndicator, SafeAreaView } from "react-native"; -import { IOStyles } from "../../../../../components/core/variables/IOStyles"; -import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; -import GenericErrorComponent from "../../../../../components/screens/GenericErrorComponent"; -import { WithTestID } from "../../../../../types/WithTestID"; -import { setAccessibilityFocus } from "../../../../../utils/accessibility"; +import { ActivityIndicator, SafeAreaView, View } from "react-native"; +import { WithTestID } from "../types/WithTestID"; +import { setAccessibilityFocus } from "../utils/accessibility"; +import { IOStyles } from "./core/variables/IOStyles"; +import { InfoScreenComponent } from "./infoScreen/InfoScreenComponent"; +import GenericErrorComponent from "./screens/GenericErrorComponent"; export type LoadingErrorProps = WithTestID<{ isLoading: boolean; diff --git a/ts/components/PinCreationForm.tsx b/ts/components/PinCreationForm.tsx index 5c95f2a61c6..b632603227c 100644 --- a/ts/components/PinCreationForm.tsx +++ b/ts/components/PinCreationForm.tsx @@ -2,7 +2,6 @@ import { ButtonOutline, IOColors, VSpacer } from "@pagopa/io-app-design-system"; import * as React from "react"; import { ScrollView, StyleSheet, View } from "react-native"; import { defaultPin } from "../config"; -import { confirmButtonProps } from "../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; import { isValidPinNumber } from "../features/fastLogin/utils/pinPolicy"; import I18n from "../i18n"; import { trackPinError } from "../screens/profile/analytics"; @@ -12,6 +11,7 @@ import { PinString } from "../types/PinString"; import { getFlowType } from "../utils/analytics"; import { PIN_LENGTH_SIX } from "../utils/constants"; import { isDevEnv } from "../utils/environment"; +import { confirmButtonProps } from "./buttons/ButtonConfigurations"; import { LabelledItem } from "./LabelledItem"; import { InfoBox } from "./box/InfoBox"; import { Body } from "./core/typography/Body"; diff --git a/ts/features/bonus/bonusVacanze/components/buttons/ButtonConfigurations.ts b/ts/components/buttons/ButtonConfigurations.ts similarity index 94% rename from ts/features/bonus/bonusVacanze/components/buttons/ButtonConfigurations.ts rename to ts/components/buttons/ButtonConfigurations.ts index bb44e5dce69..590674f72f3 100644 --- a/ts/features/bonus/bonusVacanze/components/buttons/ButtonConfigurations.ts +++ b/ts/components/buttons/ButtonConfigurations.ts @@ -1,6 +1,6 @@ import { IOColors, IOIcons } from "@pagopa/io-app-design-system"; -import { BlockButtonProps } from "../../../../../components/ui/BlockButtons"; -import I18n from "../../../../../i18n"; +import { BlockButtonProps } from "../ui/BlockButtons"; +import I18n from "../../i18n"; /** * A common configuration for all the buttons that represent a cancel/abort action diff --git a/ts/features/bonus/bonusVacanze/components/buttons/FooterStackButtons.tsx b/ts/components/buttons/FooterStackButtons.tsx similarity index 91% rename from ts/features/bonus/bonusVacanze/components/buttons/FooterStackButtons.tsx rename to ts/components/buttons/FooterStackButtons.tsx index 00979131708..7dcc7bbfee2 100644 --- a/ts/features/bonus/bonusVacanze/components/buttons/FooterStackButtons.tsx +++ b/ts/components/buttons/FooterStackButtons.tsx @@ -4,8 +4,8 @@ import { Text as NBButtonText } from "native-base"; import * as React from "react"; import { View, StyleSheet } from "react-native"; import { HSpacer, Icon, VSpacer } from "@pagopa/io-app-design-system"; -import ButtonDefaultOpacity from "../../../../../components/ButtonDefaultOpacity"; -import { BlockButtonProps } from "../../../../../components/ui/BlockButtons"; +import ButtonDefaultOpacity from "../ButtonDefaultOpacity"; +import { BlockButtonProps } from "../ui/BlockButtons"; import { FooterTopShadow } from "../FooterTopShadow"; const styles = StyleSheet.create({ diff --git a/ts/components/error/WorkunitGenericFailure.tsx b/ts/components/error/WorkunitGenericFailure.tsx index b03b75fb24b..4149e619432 100644 --- a/ts/components/error/WorkunitGenericFailure.tsx +++ b/ts/components/error/WorkunitGenericFailure.tsx @@ -3,7 +3,7 @@ import { SafeAreaView } from "react-native"; import { connect } from "react-redux"; import { Dispatch } from "redux"; import image from "../../../img/servicesStatus/error-detail-icon.png"; -import { cancelButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../buttons/ButtonConfigurations"; import I18n from "../../i18n"; import { navigateBack } from "../../store/actions/navigation"; import { IOStyles } from "../core/variables/IOStyles"; diff --git a/ts/features/bonus/bonusVacanze/components/markdown/FooterSingleButton.tsx b/ts/components/markdown/FooterSingleButton.tsx similarity index 84% rename from ts/features/bonus/bonusVacanze/components/markdown/FooterSingleButton.tsx rename to ts/components/markdown/FooterSingleButton.tsx index a0d1a7ced27..977c2827b2e 100644 --- a/ts/features/bonus/bonusVacanze/components/markdown/FooterSingleButton.tsx +++ b/ts/components/markdown/FooterSingleButton.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; +import FooterWithButtons from "../ui/FooterWithButtons"; import { cancelButtonProps } from "../buttons/ButtonConfigurations"; export type OnCancelProps = { diff --git a/ts/features/bonus/bonusVacanze/components/markdown/FooterTwoButtons.tsx b/ts/components/markdown/FooterTwoButtons.tsx similarity index 92% rename from ts/features/bonus/bonusVacanze/components/markdown/FooterTwoButtons.tsx rename to ts/components/markdown/FooterTwoButtons.tsx index 8eb5b9ce21e..3ec168a337a 100644 --- a/ts/features/bonus/bonusVacanze/components/markdown/FooterTwoButtons.tsx +++ b/ts/components/markdown/FooterTwoButtons.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; +import FooterWithButtons from "../ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps, diff --git a/ts/features/bonus/bonusVacanze/components/markdown/MarkdownBaseScreen.tsx b/ts/components/markdown/MarkdownBaseScreen.tsx similarity index 79% rename from ts/features/bonus/bonusVacanze/components/markdown/MarkdownBaseScreen.tsx rename to ts/components/markdown/MarkdownBaseScreen.tsx index d01ae1aae40..1ab6024f4a1 100644 --- a/ts/features/bonus/bonusVacanze/components/markdown/MarkdownBaseScreen.tsx +++ b/ts/components/markdown/MarkdownBaseScreen.tsx @@ -1,11 +1,11 @@ import { useEffect, useState } from "react"; import * as React from "react"; import { View, StyleSheet } from "react-native"; -import BaseScreenComponent from "../../../../../components/screens/BaseScreenComponent"; -import { EdgeBorderComponent } from "../../../../../components/screens/EdgeBorderComponent"; -import ScreenContent from "../../../../../components/screens/ScreenContent"; -import Markdown from "../../../../../components/ui/Markdown"; -import themeVariables from "../../../../../theme/variables"; +import BaseScreenComponent from "../screens/BaseScreenComponent"; +import { EdgeBorderComponent } from "../screens/EdgeBorderComponent"; +import ScreenContent from "../screens/ScreenContent"; +import Markdown from "../ui/Markdown"; +import themeVariables from "../../theme/variables"; /** * TODO Rename the title prop in the BaseScreenComponent to navigationTitle diff --git a/ts/components/screens/LogoutScreen.tsx b/ts/components/screens/LogoutScreen.tsx index ced2e3e19ef..d633b8096cb 100644 --- a/ts/components/screens/LogoutScreen.tsx +++ b/ts/components/screens/LogoutScreen.tsx @@ -6,7 +6,7 @@ import { HSpacer } from "@pagopa/io-app-design-system"; import { Dispatch } from "../../store/actions/types"; import { logoutRequest } from "../../store/actions/authentication"; import I18n from "../../i18n"; -import { LoadingErrorComponent } from "../../features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../LoadingErrorComponent"; import BaseScreenComponent from "./BaseScreenComponent"; type Props = ReturnType; diff --git a/ts/components/wallet/OutcomeCodeMessageComponent.tsx b/ts/components/wallet/OutcomeCodeMessageComponent.tsx index 11705686896..0fc980edde4 100644 --- a/ts/components/wallet/OutcomeCodeMessageComponent.tsx +++ b/ts/components/wallet/OutcomeCodeMessageComponent.tsx @@ -10,7 +10,7 @@ import FooterWithButtons from "../ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps -} from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../buttons/ButtonConfigurations"; import { OutcomeCode } from "../../types/outcomeCode"; import { getFullLocale } from "../../utils/locale"; diff --git a/ts/features/bonus/bonusVacanze/__mock__/availableBonuses.ts b/ts/features/bonus/__mock__/availableBonuses.ts similarity index 96% rename from ts/features/bonus/bonusVacanze/__mock__/availableBonuses.ts rename to ts/features/bonus/__mock__/availableBonuses.ts index d343f9db051..f5cb93e8c04 100644 --- a/ts/features/bonus/bonusVacanze/__mock__/availableBonuses.ts +++ b/ts/features/bonus/__mock__/availableBonuses.ts @@ -1,11 +1,11 @@ -import { BonusAvailable } from "../../../../../definitions/content/BonusAvailable"; -import { BonusesAvailable } from "../../../../../definitions/content/BonusesAvailable"; +import { BonusAvailable } from "../../../../definitions/content/BonusAvailable"; +import { BonusesAvailable } from "../../../../definitions/content/BonusesAvailable"; import { ID_BONUS_VACANZE_TYPE, ID_BPD_TYPE, ID_CGN_TYPE -} from "../utils/bonus"; -import { BonusVisibilityEnum } from "../../../../../definitions/content/BonusVisibility"; +} from "../common/utils"; +import { BonusVisibilityEnum } from "../../../../definitions/content/BonusVisibility"; export const contentBonusVacanzeIT = `#### Chi può richiederlo? diff --git a/ts/features/bonus/bonusVacanze/__mock__/mockData.ts b/ts/features/bonus/__mock__/mockData.ts similarity index 97% rename from ts/features/bonus/bonusVacanze/__mock__/mockData.ts rename to ts/features/bonus/__mock__/mockData.ts index ac9588f5542..1e4cfac2ddf 100644 --- a/ts/features/bonus/bonusVacanze/__mock__/mockData.ts +++ b/ts/features/bonus/__mock__/mockData.ts @@ -3,15 +3,15 @@ */ import { FiscalCode, NonEmptyString } from "@pagopa/ts-commons/lib/strings"; -import { BonusActivationStatusEnum } from "../../../../../definitions/bonus_vacanze/BonusActivationStatus"; -import { BonusActivationWithQrCode } from "../../../../../definitions/bonus_vacanze/BonusActivationWithQrCode"; -import { BonusCode } from "../../../../../definitions/bonus_vacanze/BonusCode"; -import { Dsu } from "../../../../../definitions/bonus_vacanze/Dsu"; +import { BonusActivationStatusEnum } from "../../../../definitions/bonus_vacanze/BonusActivationStatus"; +import { BonusActivationWithQrCode } from "../../../../definitions/bonus_vacanze/BonusActivationWithQrCode"; +import { BonusCode } from "../../../../definitions/bonus_vacanze/BonusCode"; +import { Dsu } from "../../../../definitions/bonus_vacanze/Dsu"; import { EligibilityCheckSuccessEligible, StatusEnum -} from "../../../../../definitions/bonus_vacanze/EligibilityCheckSuccessEligible"; -import { FamilyMember } from "../../../../../definitions/bonus_vacanze/FamilyMember"; +} from "../../../../definitions/bonus_vacanze/EligibilityCheckSuccessEligible"; +import { FamilyMember } from "../../../../definitions/bonus_vacanze/FamilyMember"; export const svgBase64: string = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMjMyIiBoZWlnaHQ9IjIzMiIgdmlld0JveD0iMCAwIDIzMiAyMzIiCgkJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOmV2PSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL3htbC1ldmVudHMiPgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMjMyIiBoZWlnaHQ9IjIzMiIgZmlsbD0iI2ZmZmZmZiIvPgo8ZGVmcz4KPHJlY3QgaWQ9InAiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz4KPC9kZWZzPgo8ZyBmaWxsPSIjMDAwMDAwIj4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMzIiIHk9IjMyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjMyIiB5PSI0MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIzMiIgeT0iNDgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMzIiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjMyIiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIzMiIgeT0iNzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMzIiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjMyIiB5PSI5NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIzMiIgeT0iMTQ0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjMyIiB5PSIxNTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMzIiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIzMiIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjMyIiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMzIiIHk9IjE4NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIzMiIgeT0iMTkyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQwIiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0MCIgeT0iODAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDAiIHk9Ijk2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQwIiB5PSIxMjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDAiIHk9IjE0NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0MCIgeT0iMTkyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQ4IiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0OCIgeT0iNDgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDgiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQ4IiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0OCIgeT0iODAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDgiIHk9IjEyMCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0OCIgeT0iMTI4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQ4IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDgiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI0OCIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjQ4IiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNDgiIHk9IjE5MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI1NiIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNTYiIHk9IjQ4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjU2IiB5PSI1NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI1NiIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNTYiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjU2IiB5PSIxMDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNTYiIHk9IjExMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI1NiIgeT0iMTI4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjU2IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNTYiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI1NiIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjU2IiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNTYiIHk9IjE5MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI2NCIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNjQiIHk9IjQ4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjY0IiB5PSI1NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI2NCIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNjQiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjY0IiB5PSIxMDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNjQiIHk9IjExMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI2NCIgeT0iMTI4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjY0IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNjQiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI2NCIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjY0IiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNjQiIHk9IjE5MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI3MiIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNzIiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjcyIiB5PSI5NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI3MiIgeT0iMTA0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjcyIiB5PSIxMTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iNzIiIHk9IjEyMCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI3MiIgeT0iMTQ0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjcyIiB5PSIxOTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjMyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSI0MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4MCIgeT0iNDgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4MCIgeT0iNzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSI5NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4MCIgeT0iMTEyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSIxMjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjE0NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4MCIgeT0iMTUyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSIxNjAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjE2OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4MCIgeT0iMTc2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjgwIiB5PSIxODQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODAiIHk9IjE5MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4OCIgeT0iOTYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iODgiIHk9IjEwNCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI4OCIgeT0iMTEyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9Ijk2IiB5PSI1NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI5NiIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iOTYiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9Ijk2IiB5PSIxMjAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iOTYiIHk9IjEyOCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI5NiIgeT0iMTM2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9Ijk2IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iOTYiIHk9IjE1MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSI5NiIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9Ijk2IiB5PSIxOTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMDQiIHk9IjQwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEwNCIgeT0iNDgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSI1NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMDQiIHk9Ijg4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEwNCIgeT0iOTYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSIxMTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTA0IiB5PSIxODQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMTIiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjExMiIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSI3MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMTIiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjExMiIgeT0iODgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIxMjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIxNTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIxNjAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIxNjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTEyIiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTIwIiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMjAiIHk9IjQwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyMCIgeT0iNTYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTIwIiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMjAiIHk9Ijg4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyMCIgeT0iMTEyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyMCIgeT0iMTUyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyMCIgeT0iMTYwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyMCIgeT0iMTkyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTI4IiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMjgiIHk9IjcyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iODAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTI4IiB5PSI4OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxMjgiIHk9Ijk2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTA0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTM2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTQ0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTUyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTYwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTc2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEyOCIgeT0iMTkyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTA0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTIwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTI4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTQ0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTUyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjEzNiIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE0NCIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSI0MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNDQiIHk9IjQ4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE0NCIgeT0iNTYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSI2NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNDQiIHk9IjcyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE0NCIgeT0iODAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSIxMDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSIxMjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSIxNTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTQ0IiB5PSIxNjgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTUyIiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNTIiIHk9IjgwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTA0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTIwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTYwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE1MiIgeT0iMTkyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTYwIiB5PSI0OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNjAiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTYwIiB5PSI4MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNjAiIHk9Ijk2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iMTA0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iMTI4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iMTc2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2MCIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTY4IiB5PSI0OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNjgiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTY4IiB5PSI4MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNjgiIHk9Ijk2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTEyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTIwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTQ0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTUyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTY4Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE2OCIgeT0iMTg0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE3NiIgeT0iMzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTc2IiB5PSI0OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjU2Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE3NiIgeT0iNjQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTc2IiB5PSI4MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjExMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjEyMCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjEyOCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjEzNiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE1MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE2OCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE3NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE4NCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxNzYiIHk9IjE5MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxODQiIHk9IjMyIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE4NCIgeT0iODAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxMDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxMTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxMjAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxNDQiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxNjAiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxNzYiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTg0IiB5PSIxOTIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTkyIiB5PSIzMiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjQwIi8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE5MiIgeT0iNDgiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTkyIiB5PSI1NiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjY0Ii8+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHg9IjE5MiIgeT0iNzIiLz4KPHVzZSB4bGluazpocmVmPSIjcCIgeD0iMTkyIiB5PSI4MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjEwNCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjE1MiIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjE2MCIvPgo8dXNlIHhsaW5rOmhyZWY9IiNwIiB4PSIxOTIiIHk9IjE3NiIvPgo8L2c+Cjwvc3ZnPg=="; diff --git a/ts/features/bonus/bonusVacanze/components/RequestBonus.tsx b/ts/features/bonus/bonusVacanze/components/RequestBonus.tsx index b2c999763ba..723ecf7ed87 100644 --- a/ts/features/bonus/bonusVacanze/components/RequestBonus.tsx +++ b/ts/features/bonus/bonusVacanze/components/RequestBonus.tsx @@ -10,7 +10,7 @@ import SectionCardComponent, { SectionCardStatus } from "../../../../components/wallet/card/SectionCardComponent"; import I18n from "../../../../i18n"; -import { ID_BONUS_VACANZE_TYPE } from "../utils/bonus"; +import { ID_BONUS_VACANZE_TYPE } from "../../common/utils"; import BonusCardComponent from "./BonusCardComponent"; type OwnProps = { diff --git a/ts/features/bonus/bonusVacanze/screens/ActiveBonusScreen.tsx b/ts/features/bonus/bonusVacanze/screens/ActiveBonusScreen.tsx index d954a3b52eb..89bcb73347a 100644 --- a/ts/features/bonus/bonusVacanze/screens/ActiveBonusScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/ActiveBonusScreen.tsx @@ -1,41 +1,45 @@ +import { + HSpacer, + IOColors, + IOIcons, + Icon, + VSpacer, + hexToRgba +} from "@pagopa/io-app-design-system"; import * as pot from "@pagopa/ts-commons/lib/pot"; import { Millisecond } from "@pagopa/ts-commons/lib/units"; import * as E from "fp-ts/lib/Either"; -import { pipe } from "fp-ts/lib/function"; import * as O from "fp-ts/lib/Option"; +import { pipe } from "fp-ts/lib/function"; import { Toast as NBToast } from "native-base"; import * as React from "react"; import { useCallback } from "react"; import { - View, Animated, Easing, + Platform, SafeAreaView, StyleSheet, - ViewStyle, - Platform + View, + ViewStyle } from "react-native"; import ViewShot, { CaptureOptions } from "react-native-view-shot"; import { connect } from "react-redux"; -import { - IOColors, - IOIcons, - Icon, - hexToRgba, - HSpacer, - VSpacer -} from "@pagopa/io-app-design-system"; import { BonusActivationStatusEnum } from "../../../../../definitions/bonus_vacanze/BonusActivationStatus"; import { BonusActivationWithQrCode } from "../../../../../definitions/bonus_vacanze/BonusActivationWithQrCode"; +import ItemSeparatorComponent from "../../../../components/ItemSeparatorComponent"; +import TouchableDefaultOpacity from "../../../../components/TouchableDefaultOpacity"; +import { IOBadge } from "../../../../components/core/IOBadge"; +import { Body } from "../../../../components/core/typography/Body"; +import { H3 } from "../../../../components/core/typography/H3"; import { Label } from "../../../../components/core/typography/Label"; import { Link } from "../../../../components/core/typography/Link"; +import { IOStyles } from "../../../../components/core/variables/IOStyles"; import { withLightModalContext } from "../../../../components/helpers/withLightModalContext"; -import ItemSeparatorComponent from "../../../../components/ItemSeparatorComponent"; import { ContextualHelpPropsMarkdown } from "../../../../components/screens/BaseScreenComponent"; import DarkLayout from "../../../../components/screens/DarkLayout"; import { EdgeBorderComponent } from "../../../../components/screens/EdgeBorderComponent"; import GenericErrorComponent from "../../../../components/screens/GenericErrorComponent"; -import TouchableDefaultOpacity from "../../../../components/TouchableDefaultOpacity"; import { LightModalContextInterface } from "../../../../components/ui/LightModal"; import I18n from "../../../../i18n"; import { IOStackNavigationRouteProps } from "../../../../navigation/params/AppParamsList"; @@ -47,7 +51,6 @@ import variables from "../../../../theme/variables"; import { formatDateAsLocal } from "../../../../utils/dates"; import { useLegacyIOBottomSheetModal } from "../../../../utils/hooks/bottomSheet"; import { withBase64Uri } from "../../../../utils/image"; -import { getRemoteLocale } from "../../../messages/utils/messages"; import { isShareEnabled, saveImageToGallery, @@ -55,11 +58,17 @@ import { } from "../../../../utils/share"; import { showToast } from "../../../../utils/showToast"; import { maybeNotNullyString } from "../../../../utils/strings"; +import { getRemoteLocale } from "../../../messages/utils/messages"; +import TosBonusComponent from "../../common/components/TosBonusComponent"; +import { + availableBonusTypesSelectorFromId, + bonusVacanzeLogo +} from "../../common/store/selectors"; +import { ID_BONUS_VACANZE_TYPE } from "../../common/utils"; import BonusCardComponent from "../components/BonusCardComponent"; +import QrModalBox from "../components/QrModalBox"; import { BonusCompositionDetails } from "../components/keyValueTable/BonusCompositionDetails"; import { FamilyComposition } from "../components/keyValueTable/FamilyComposition"; -import QrModalBox from "../components/QrModalBox"; -import TosBonusComponent from "../../common/components/TosBonusComponent"; import { cancelLoadBonusFromIdPolling, startLoadBonusFromIdPolling @@ -68,20 +77,11 @@ import { bonusActiveDetailByIdSelector, ownedActiveOrRedeemedBonus } from "../store/reducers/allActive"; -import { - availableBonusTypesSelectorFromId, - bonusVacanzeLogo -} from "../store/reducers/availableBonusesTypes"; import { getBonusCodeFormatted, - ID_BONUS_VACANZE_TYPE, isBonusActive, validityInterval } from "../utils/bonus"; -import { H3 } from "../../../../components/core/typography/H3"; -import { IOStyles } from "../../../../components/core/variables/IOStyles"; -import { Body } from "../../../../components/core/typography/Body"; -import { IOBadge } from "../../../../components/core/IOBadge"; import { ActivateBonusDiscrepancies } from "./activation/request/ActivateBonusDiscrepancies"; type QRCodeContents = { diff --git a/ts/features/bonus/bonusVacanze/screens/AvailableBonusScreen.tsx b/ts/features/bonus/bonusVacanze/screens/AvailableBonusScreen.tsx index dd6c15c695a..5e96e1946e2 100644 --- a/ts/features/bonus/bonusVacanze/screens/AvailableBonusScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/AvailableBonusScreen.tsx @@ -48,20 +48,12 @@ import { AvailableBonusItemState } from "../components/AvailableBonusItem"; import { navigateToBonusRequestInformation } from "../navigation/action"; -import { loadAvailableBonuses } from "../store/actions/bonusVacanze"; -import { - experimentalAndVisibleBonus, - isAvailableBonusLoadingSelector, - isAvailableBonusNoneErrorSelector, - serviceFromAvailableBonusSelector, - supportedAvailableBonusSelector -} from "../store/reducers/availableBonusesTypes"; import { ID_BONUS_VACANZE_TYPE, ID_BPD_TYPE, ID_CDC_TYPE, ID_CGN_TYPE -} from "../utils/bonus"; +} from "../../common/utils"; import { ServiceId } from "../../../../../definitions/backend/ServiceId"; import { ServicePublic } from "../../../../../definitions/backend/ServicePublic"; @@ -71,6 +63,14 @@ import { showServiceDetails } from "../../../../store/actions/services"; import { IOStyles } from "../../../../components/core/variables/IOStyles"; +import { + experimentalAndVisibleBonus, + isAvailableBonusLoadingSelector, + isAvailableBonusNoneErrorSelector, + serviceFromAvailableBonusSelector, + supportedAvailableBonusSelector +} from "../../common/store/selectors"; +import { loadAvailableBonuses } from "../../common/store/actions/availableBonusesTypes"; export type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/bonusVacanze/screens/__tests__/AvailableBonusScreen.test.tsx b/ts/features/bonus/bonusVacanze/screens/__tests__/AvailableBonusScreen.test.tsx index 56d52f546ea..f8e29f481af 100644 --- a/ts/features/bonus/bonusVacanze/screens/__tests__/AvailableBonusScreen.test.tsx +++ b/ts/features/bonus/bonusVacanze/screens/__tests__/AvailableBonusScreen.test.tsx @@ -11,11 +11,11 @@ import { appReducer } from "../../../../../store/reducers"; import { baseRawBackendStatus } from "../../../../../store/reducers/__mock__/backendStatus"; import { GlobalState } from "../../../../../store/reducers/types"; import { renderScreenFakeNavRedux } from "../../../../../utils/testWrapper"; -import { availableBonuses, bpdBonus } from "../../__mock__/availableBonuses"; +import { availableBonuses, bpdBonus } from "../../../__mock__/availableBonuses"; import BONUSVACANZE_ROUTES from "../../navigation/routes"; -import { loadAvailableBonuses } from "../../store/actions/bonusVacanze"; -import { ID_BPD_TYPE } from "../../utils/bonus"; +import { ID_BPD_TYPE } from "../../../common/utils"; import AvailableBonusScreen from "../AvailableBonusScreen"; +import { loadAvailableBonuses } from "../../../common/store/actions/availableBonusesTypes"; jest.mock("../../../../../config", () => ({ bpdEnabled: true })); diff --git a/ts/features/bonus/bonusVacanze/screens/activation/ActivateBonusCompletedScreen.tsx b/ts/features/bonus/bonusVacanze/screens/activation/ActivateBonusCompletedScreen.tsx index dcf9d5d2650..acac24f2a03 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/ActivateBonusCompletedScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/ActivateBonusCompletedScreen.tsx @@ -7,10 +7,10 @@ import { renderInfoRasterImage } from "../../../../../components/infoScreen/imag import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; -import { confirmButtonProps } from "../../components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../../../components/buttons/FooterStackButtons"; import { completeBonusVacanzeActivation } from "../../store/actions/bonusVacanze"; -import { bonusVacanzeLogo } from "../../store/reducers/availableBonusesTypes"; +import { bonusVacanzeLogo } from "../../../common/store/selectors"; type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/bonusVacanze/screens/activation/BonusAlreadyExists.tsx b/ts/features/bonus/bonusVacanze/screens/activation/BonusAlreadyExists.tsx index 937987f85ea..50c801bbe4b 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/BonusAlreadyExists.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/BonusAlreadyExists.tsx @@ -5,8 +5,8 @@ import { Dispatch } from "redux"; import { renderInfoRasterImage } from "../../../../../components/infoScreen/imageRendering"; import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; import I18n from "../../../../../i18n"; -import { confirmButtonProps } from "../../components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../../../components/buttons/FooterStackButtons"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; import { cancelBonusVacanzeRequest, diff --git a/ts/features/bonus/bonusVacanze/screens/activation/EligibilityExpired.tsx b/ts/features/bonus/bonusVacanze/screens/activation/EligibilityExpired.tsx index 18c233fb711..7c20ca110d9 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/EligibilityExpired.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/EligibilityExpired.tsx @@ -10,7 +10,7 @@ import I18n from "../../../../../i18n"; import { cancelButtonProps, confirmButtonProps -} from "../../components/buttons/ButtonConfigurations"; +} from "../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; import { cancelBonusVacanzeRequest, diff --git a/ts/features/bonus/bonusVacanze/screens/activation/LoadActivateBonusScreen.tsx b/ts/features/bonus/bonusVacanze/screens/activation/LoadActivateBonusScreen.tsx index 1c0c08361fe..e4c36cbf40a 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/LoadActivateBonusScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/LoadActivateBonusScreen.tsx @@ -5,7 +5,7 @@ import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { abortBonusRequest } from "../../components/alert/AbortBonusRequest"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { activateBonusVacanze, cancelBonusVacanzeRequest diff --git a/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestComponent.tsx b/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestComponent.tsx index 391f891b72c..6c37e637551 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestComponent.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestComponent.tsx @@ -11,7 +11,7 @@ import { EdgeBorderComponent } from "../../../../../../components/screens/EdgeBo import I18n from "../../../../../../i18n"; import { BonusCompositionDetails } from "../../../components/keyValueTable/BonusCompositionDetails"; import { FamilyComposition } from "../../../components/keyValueTable/FamilyComposition"; -import { FooterTwoButtons } from "../../../components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { ActivateBonusDiscrepancies } from "./ActivateBonusDiscrepancies"; import { ActivateBonusReminder } from "./ActivateBonusReminder"; import { ActivateBonusTitle } from "./ActivateBonusTitle"; diff --git a/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestScreen.tsx b/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestScreen.tsx index 48c7260aeda..61b1a443831 100644 --- a/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/activation/request/ActivateBonusRequestScreen.tsx @@ -1,15 +1,15 @@ -import { pipe } from "fp-ts/lib/function"; import * as O from "fp-ts/lib/Option"; +import { pipe } from "fp-ts/lib/function"; import * as React from "react"; import { connect } from "react-redux"; import { Dispatch } from "redux"; import { GlobalState } from "../../../../../../store/reducers/types"; +import { bonusVacanzeLogo } from "../../../../common/store/selectors"; import { abortBonusRequest } from "../../../components/alert/AbortBonusRequest"; import { activateBonusVacanze, cancelBonusVacanzeRequest } from "../../../store/actions/bonusVacanze"; -import { bonusVacanzeLogo } from "../../../store/reducers/availableBonusesTypes"; import { eligibilityEligibleSelector } from "../../../store/reducers/eligibility"; import { ActivateBonusRequestComponent } from "./ActivateBonusRequestComponent"; diff --git a/ts/features/bonus/bonusVacanze/screens/eligibility/BonusActivationPending.tsx b/ts/features/bonus/bonusVacanze/screens/eligibility/BonusActivationPending.tsx index 892acd6a089..f38d58af506 100644 --- a/ts/features/bonus/bonusVacanze/screens/eligibility/BonusActivationPending.tsx +++ b/ts/features/bonus/bonusVacanze/screens/eligibility/BonusActivationPending.tsx @@ -6,8 +6,8 @@ import image from "../../../../../../img/messages/empty-message-list-icon.png"; import { renderInfoRasterImage } from "../../../../../components/infoScreen/imageRendering"; import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; import I18n from "../../../../../i18n"; -import { cancelButtonProps } from "../../components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; +import { cancelButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../../../components/buttons/FooterStackButtons"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; import { cancelBonusVacanzeRequest } from "../../store/actions/bonusVacanze"; import { IOStyles } from "../../../../../components/core/variables/IOStyles"; diff --git a/ts/features/bonus/bonusVacanze/screens/eligibility/LoadBonusEligibilityScreen.tsx b/ts/features/bonus/bonusVacanze/screens/eligibility/LoadBonusEligibilityScreen.tsx index 9b56488d1e1..6221f8a8598 100644 --- a/ts/features/bonus/bonusVacanze/screens/eligibility/LoadBonusEligibilityScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/eligibility/LoadBonusEligibilityScreen.tsx @@ -5,7 +5,7 @@ import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { abortBonusRequest } from "../../components/alert/AbortBonusRequest"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { cancelBonusVacanzeRequest, checkBonusVacanzeEligibility diff --git a/ts/features/bonus/bonusVacanze/screens/eligibility/UnderageScreen.tsx b/ts/features/bonus/bonusVacanze/screens/eligibility/UnderageScreen.tsx index ccab7e224a2..ffe8af253a9 100644 --- a/ts/features/bonus/bonusVacanze/screens/eligibility/UnderageScreen.tsx +++ b/ts/features/bonus/bonusVacanze/screens/eligibility/UnderageScreen.tsx @@ -6,7 +6,7 @@ import { renderInfoRasterImage } from "../../../../../components/infoScreen/imag import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; import I18n from "../../../../../i18n"; -import { cancelButtonProps } from "../../components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; import { cancelBonusVacanzeRequest } from "../../store/actions/bonusVacanze"; diff --git a/ts/features/bonus/bonusVacanze/screens/eligibility/isee/BaseIseeErrorComponent.tsx b/ts/features/bonus/bonusVacanze/screens/eligibility/isee/BaseIseeErrorComponent.tsx index 0027a49caa3..034692dc5e4 100644 --- a/ts/features/bonus/bonusVacanze/screens/eligibility/isee/BaseIseeErrorComponent.tsx +++ b/ts/features/bonus/bonusVacanze/screens/eligibility/isee/BaseIseeErrorComponent.tsx @@ -9,7 +9,7 @@ import I18n from "../../../../../../i18n"; import { cancelButtonProps, confirmButtonProps -} from "../../../components/buttons/ButtonConfigurations"; +} from "../../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; diff --git a/ts/features/bonus/bonusVacanze/store/actions/bonusVacanze.ts b/ts/features/bonus/bonusVacanze/store/actions/bonusVacanze.ts index cf4a0ff0ac0..f75bb1b9e4e 100644 --- a/ts/features/bonus/bonusVacanze/store/actions/bonusVacanze.ts +++ b/ts/features/bonus/bonusVacanze/store/actions/bonusVacanze.ts @@ -7,7 +7,6 @@ import { BonusActivationCollection } from "../../../../../../definitions/bonus_v import { BonusActivationWithQrCode } from "../../../../../../definitions/bonus_vacanze/BonusActivationWithQrCode"; import { EligibilityCheck } from "../../../../../../definitions/bonus_vacanze/EligibilityCheck"; import { InstanceId } from "../../../../../../definitions/bonus_vacanze/InstanceId"; -import { BonusesAvailable } from "../../../../../../definitions/content/BonusesAvailable"; import { BonusActivationProgressEnum } from "../reducers/activation"; import { EligibilityRequestProgressEnum } from "../reducers/eligibility"; @@ -20,15 +19,6 @@ export const loadAllBonusActivations = createAsyncAction( "BONUS_VACANZE_LOAD_ALL_ACTIVATION_FAILURE" )(); -/** - * Request the list of all the types of bonus - */ -export const loadAvailableBonuses = createAsyncAction( - "BONUSES_AVAILABLE_REQUEST", - "BONUSES_AVAILABLE_SUCCESS", - "BONUSES_AVAILABLE_FAILURE" -)(); - export type EligibilityCheckPayload = { status: EligibilityRequestProgressEnum; check?: EligibilityCheck; @@ -88,8 +78,7 @@ export type BonusVacanzeActivationPayload = { activation?: BonusActivationWithQrCode; }; -export type BonusActions = - | ActionType +export type BonusVacanzeActions = | ActionType | ActionType | ActionType diff --git a/ts/features/bonus/bonusVacanze/store/reducers/__tests__/allActive.test.ts b/ts/features/bonus/bonusVacanze/store/reducers/__tests__/allActive.test.ts index 8de81dc3f17..4b95c0f1cdb 100644 --- a/ts/features/bonus/bonusVacanze/store/reducers/__tests__/allActive.test.ts +++ b/ts/features/bonus/bonusVacanze/store/reducers/__tests__/allActive.test.ts @@ -3,7 +3,7 @@ import { FiscalCode } from "@pagopa/ts-commons/lib/strings"; import { BonusActivationStatusEnum } from "../../../../../../../definitions/bonus_vacanze/BonusActivationStatus"; import { BonusCode } from "../../../../../../../definitions/bonus_vacanze/BonusCode"; import mockedProfile from "../../../../../../__mocks__/initializedProfile"; -import { mockedBonus } from "../../../__mock__/mockData"; +import { mockedBonus } from "../../../../__mock__/mockData"; import { ownedActiveOrRedeemedBonus } from "../allActive"; const fiscalCode = "ABCDEF83A12L719R" as FiscalCode; diff --git a/ts/features/bonus/bonusVacanze/store/reducers/index.ts b/ts/features/bonus/bonusVacanze/store/reducers/index.ts index bbf3f1b67a1..8846fd462d5 100644 --- a/ts/features/bonus/bonusVacanze/store/reducers/index.ts +++ b/ts/features/bonus/bonusVacanze/store/reducers/index.ts @@ -1,45 +1,20 @@ import { combineReducers } from "redux"; import { Action } from "../../../../../store/actions/types"; -import bpdReducer, { BpdState } from "../../../bpd/store/reducers"; -import cgnReducer, { CgnState } from "../../../cgn/store/reducers"; -import svReducer, { SvState } from "../../../siciliaVola/store/reducers"; -import cdcReducer, { CdcState } from "../../../cdc/store/reducers"; import bonusVacanzeActivationReducer, { ActivationState } from "./activation"; import allActiveReducer, { AllActiveState } from "./allActive"; -import availableBonusesReducer, { - AvailableBonusTypesState -} from "./availableBonusesTypes"; import eligibilityReducer, { EligibilityState } from "./eligibility"; // type alias -type BonusVacanzeState = { +export type BonusVacanzeState = { activation: ActivationState; eligibility: EligibilityState; allActive: AllActiveState; }; -export type BonusState = Readonly<{ - availableBonusTypes: AvailableBonusTypesState; - bonusVacanze: BonusVacanzeState; - bpd: BpdState; - cgn: CgnState; - sv: SvState; - cdc: CdcState; -}>; - const bonusVacanzeReducer = combineReducers({ activation: bonusVacanzeActivationReducer, eligibility: eligibilityReducer, allActive: allActiveReducer }); -const bonusReducer = combineReducers({ - availableBonusTypes: availableBonusesReducer, - bonusVacanze: bonusVacanzeReducer, - bpd: bpdReducer, - cgn: cgnReducer, - sv: svReducer, - cdc: cdcReducer -}); - -export default bonusReducer; +export default bonusVacanzeReducer; diff --git a/ts/features/bonus/bonusVacanze/store/sagas/bonusSaga.ts b/ts/features/bonus/bonusVacanze/store/sagas/bonusSaga.ts index 61e6854c8f6..d399441f261 100644 --- a/ts/features/bonus/bonusVacanze/store/sagas/bonusSaga.ts +++ b/ts/features/bonus/bonusVacanze/store/sagas/bonusSaga.ts @@ -3,7 +3,7 @@ import { put, takeEvery, takeLatest } from "typed-redux-saga/macro"; import { getType } from "typesafe-actions"; import { apiUrlPrefix } from "../../../../../config"; import { BackendBonusVacanze } from "../../api/backendBonusVacanze"; -import { ID_BONUS_VACANZE_TYPE } from "../../utils/bonus"; +import { ID_BONUS_VACANZE_TYPE } from "../../../common/utils"; import { activateBonusVacanze, checkBonusVacanzeEligibility, diff --git a/ts/features/bonus/bonusVacanze/store/sagas/handleForceBonusServiceActivation.ts b/ts/features/bonus/bonusVacanze/store/sagas/handleForceBonusServiceActivation.ts index b6700961a46..b10d167baa1 100644 --- a/ts/features/bonus/bonusVacanze/store/sagas/handleForceBonusServiceActivation.ts +++ b/ts/features/bonus/bonusVacanze/store/sagas/handleForceBonusServiceActivation.ts @@ -6,7 +6,7 @@ import { ServiceId } from "../../../../../../definitions/backend/ServiceId"; import { profileUpsert } from "../../../../../store/actions/profile"; import { profileSelector } from "../../../../../store/reducers/profile"; import { getBlockedChannels } from "../../../../../utils/profile"; -import { availableBonusTypesSelectorFromId } from "../reducers/availableBonusesTypes"; +import { availableBonusTypesSelectorFromId } from "../../../common/store/selectors"; // handle a profile update if the service related to the bonus is in its blocked channel export function* handleForceBonusServiceActivation( diff --git a/ts/features/bonus/bonusVacanze/utils/bonus.ts b/ts/features/bonus/bonusVacanze/utils/bonus.ts index 970bda07ff4..c28f9a73418 100644 --- a/ts/features/bonus/bonusVacanze/utils/bonus.ts +++ b/ts/features/bonus/bonusVacanze/utils/bonus.ts @@ -11,16 +11,6 @@ import { } from "../store/actions/bonusVacanze"; import { BonusActivationProgressEnum } from "../store/reducers/activation"; import { EligibilityRequestProgressEnum } from "../store/reducers/eligibility"; -import { - bonusVacanzeEnabled, - bpdEnabled, - cdcEnabled -} from "../../../../config"; - -export const ID_BONUS_VACANZE_TYPE = 1; -export const ID_BPD_TYPE = 2; -export const ID_CGN_TYPE = 3; -export const ID_CDC_TYPE = 4; // return true if the bonus is active export const isBonusActive = (bonus: BonusActivationWithQrCode) => @@ -78,16 +68,3 @@ const allowedActivationStatus = new Set([ export const isActivationResponseTrackable = ( eligibility: BonusVacanzeActivationPayload ) => allowedActivationStatus.has(eligibility.status); - -/** - * Return a Map with the bonus ID as a key and - * a bool representing the relative feature flag - * status as a value. - */ -export const mapBonusIdFeatureFlag = () => - new Map([ - [ID_BONUS_VACANZE_TYPE, bonusVacanzeEnabled], - [ID_BPD_TYPE, bpdEnabled], - [ID_CGN_TYPE, true], - [ID_CDC_TYPE, cdcEnabled] - ]); diff --git a/ts/features/bonus/bpd/components/optInPaymentMethods/BpdOptInPaymentMethodsContainer.tsx b/ts/features/bonus/bpd/components/optInPaymentMethods/BpdOptInPaymentMethodsContainer.tsx index 3424f350c69..c61ea471de5 100644 --- a/ts/features/bonus/bpd/components/optInPaymentMethods/BpdOptInPaymentMethodsContainer.tsx +++ b/ts/features/bonus/bpd/components/optInPaymentMethods/BpdOptInPaymentMethodsContainer.tsx @@ -9,7 +9,7 @@ import I18n from "../../../../../i18n"; import ROUTES from "../../../../../navigation/routes"; import { useIOSelector } from "../../../../../store/hooks"; import { bpdRemoteConfigSelector } from "../../../../../store/reducers/backendStatus"; -import { isError, isReady } from "../../model/RemoteValue"; +import { isError, isReady } from "../../../../../common/model/RemoteValue"; import BPD_ROUTES from "../../navigation/routes"; import { optInPaymentMethodsShowChoice } from "../../store/actions/optInPaymentMethods"; import { showOptInChoiceSelector } from "../../store/reducers/details/activation/ui"; diff --git a/ts/features/bonus/bpd/components/optInPaymentMethods/RetryAfterDeletionFailsComponent.tsx b/ts/features/bonus/bpd/components/optInPaymentMethods/RetryAfterDeletionFailsComponent.tsx index c61c56402a1..1ce4d767b83 100644 --- a/ts/features/bonus/bpd/components/optInPaymentMethods/RetryAfterDeletionFailsComponent.tsx +++ b/ts/features/bonus/bpd/components/optInPaymentMethods/RetryAfterDeletionFailsComponent.tsx @@ -7,7 +7,7 @@ import { IOStyles } from "../../../../../components/core/variables/IOStyles"; import { cancelButtonProps, confirmButtonProps -} from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../components/buttons/ButtonConfigurations"; import { optInPaymentMethodsCompleted, optInPaymentMethodsDeletionChoice diff --git a/ts/features/bonus/bpd/components/optInPaymentMethods/ThankYouSuccessComponent.tsx b/ts/features/bonus/bpd/components/optInPaymentMethods/ThankYouSuccessComponent.tsx index fad0973710d..a0fe882e4ca 100644 --- a/ts/features/bonus/bpd/components/optInPaymentMethods/ThankYouSuccessComponent.tsx +++ b/ts/features/bonus/bpd/components/optInPaymentMethods/ThankYouSuccessComponent.tsx @@ -8,7 +8,7 @@ import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; import I18n from "../../../../../i18n"; import ROUTES from "../../../../../navigation/routes"; import { useIODispatch } from "../../../../../store/hooks"; -import { cancelButtonProps } from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { optInPaymentMethodsCompleted, optInPaymentMethodsShowChoice diff --git a/ts/features/bonus/bpd/components/paymentMethodActivationToggle/bottomsheet/BpdChangeActivationConfirmationScreen.tsx b/ts/features/bonus/bpd/components/paymentMethodActivationToggle/bottomsheet/BpdChangeActivationConfirmationScreen.tsx index 80ce1652b75..8ea2b5df5fb 100644 --- a/ts/features/bonus/bpd/components/paymentMethodActivationToggle/bottomsheet/BpdChangeActivationConfirmationScreen.tsx +++ b/ts/features/bonus/bpd/components/paymentMethodActivationToggle/bottomsheet/BpdChangeActivationConfirmationScreen.tsx @@ -11,7 +11,7 @@ import { useLegacyIOBottomSheetModal } from "../../../../../../utils/hooks/botto import { cancelButtonProps, confirmButtonProps -} from "../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../components/buttons/ButtonConfigurations"; import { PaymentMethodRepresentationComponent } from "../base/PaymentMethodRepresentationComponent"; export type ConfirmationType = "Activation" | "Deactivation"; diff --git a/ts/features/bonus/bpd/saga/networking/__test__/loadBpdData.test.ts b/ts/features/bonus/bpd/saga/networking/__test__/loadBpdData.test.ts index 2170a76c3c1..428152d161d 100644 --- a/ts/features/bonus/bpd/saga/networking/__test__/loadBpdData.test.ts +++ b/ts/features/bonus/bpd/saga/networking/__test__/loadBpdData.test.ts @@ -1,6 +1,6 @@ import { testSaga } from "redux-saga-test-plan"; import { abiSelector } from "../../../../../wallet/onboarding/store/abi"; -import { remoteReady } from "../../../model/RemoteValue"; +import { remoteReady } from "../../../../../../common/model/RemoteValue"; import { bpdAllData, bpdLoadActivationStatus diff --git a/ts/features/bonus/bpd/saga/networking/loadBpdData.ts b/ts/features/bonus/bpd/saga/networking/loadBpdData.ts index da1a65c4f10..a0e9907905f 100644 --- a/ts/features/bonus/bpd/saga/networking/loadBpdData.ts +++ b/ts/features/bonus/bpd/saga/networking/loadBpdData.ts @@ -5,7 +5,7 @@ import { getBackoffTime } from "../../../../../utils/backoffError"; import { isTestEnv } from "../../../../../utils/environment"; import { loadAbi } from "../../../../wallet/onboarding/bancomat/store/actions"; import { abiSelector } from "../../../../wallet/onboarding/store/abi"; -import { isReady } from "../../model/RemoteValue"; +import { isReady } from "../../../../../common/model/RemoteValue"; import { bpdAllData, bpdLoadActivationStatus diff --git a/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/__tests__/optInShouldShowChoiceHandler.test.ts b/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/__tests__/optInShouldShowChoiceHandler.test.ts index 16ee75e0611..31950c6dd24 100644 --- a/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/__tests__/optInShouldShowChoiceHandler.test.ts +++ b/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/__tests__/optInShouldShowChoiceHandler.test.ts @@ -11,7 +11,10 @@ import { getBPDMethodsVisibleInWalletSelector, pagoPaCreditCardWalletV1Selector } from "../../../../../../../store/reducers/wallet/wallets"; -import { remoteReady, remoteUndefined } from "../../../../model/RemoteValue"; +import { + remoteReady, + remoteUndefined +} from "../../../../../../../common/model/RemoteValue"; import { BpdActivationPayload, bpdLoadActivationStatus diff --git a/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/optInShouldShowChoiceHandler.ts b/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/optInShouldShowChoiceHandler.ts index f2f8ae16115..171c7b86ca8 100644 --- a/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/optInShouldShowChoiceHandler.ts +++ b/ts/features/bonus/bpd/saga/orchestration/optInPaymentMethods/optInShouldShowChoiceHandler.ts @@ -12,7 +12,11 @@ import { pagoPaCreditCardWalletV1Selector } from "../../../../../../store/reducers/wallet/wallets"; import { ReduxSagaEffect } from "../../../../../../types/utils"; -import { isLoading, isReady, RemoteValue } from "../../../model/RemoteValue"; +import { + isLoading, + isReady, + RemoteValue +} from "../../../../../../common/model/RemoteValue"; import { ActivationStatus, bpdLoadActivationStatus diff --git a/ts/features/bonus/bpd/screens/details/BpdDetailsScreen.tsx b/ts/features/bonus/bpd/screens/details/BpdDetailsScreen.tsx index 9103c1f11f6..80ca1b10c47 100644 --- a/ts/features/bonus/bpd/screens/details/BpdDetailsScreen.tsx +++ b/ts/features/bonus/bpd/screens/details/BpdDetailsScreen.tsx @@ -15,7 +15,11 @@ import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { showToast } from "../../../../../utils/showToast"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; import BpdLastUpdateComponent from "../../components/BpdLastUpdateComponent"; -import { isError, isLoading, isReady } from "../../model/RemoteValue"; +import { + isError, + isLoading, + isReady +} from "../../../../../common/model/RemoteValue"; import { navigateToBpdTransactions } from "../../navigation/actions"; import { bpdAllData } from "../../store/actions/details"; import { diff --git a/ts/features/bonus/bpd/screens/details/components/iban/BaseIbanInformationComponent.tsx b/ts/features/bonus/bpd/screens/details/components/iban/BaseIbanInformationComponent.tsx index a73b165f200..5ec7171ae5b 100644 --- a/ts/features/bonus/bpd/screens/details/components/iban/BaseIbanInformationComponent.tsx +++ b/ts/features/bonus/bpd/screens/details/components/iban/BaseIbanInformationComponent.tsx @@ -11,7 +11,10 @@ import { Monospace } from "../../../../../../../components/core/typography/Monos import { IOStyles } from "../../../../../../../components/core/variables/IOStyles"; import I18n from "../../../../../../../i18n"; import { isStringNullyOrEmpty } from "../../../../../../../utils/strings"; -import { isReady, RemoteValue } from "../../../../model/RemoteValue"; +import { + isReady, + RemoteValue +} from "../../../../../../../common/model/RemoteValue"; export type BaseIbanProps = { iban: string | undefined; diff --git a/ts/features/bonus/bpd/screens/details/components/iban/IbanInformationComponent.tsx b/ts/features/bonus/bpd/screens/details/components/iban/IbanInformationComponent.tsx index 410a2bd0ec7..0ae8417a91f 100644 --- a/ts/features/bonus/bpd/screens/details/components/iban/IbanInformationComponent.tsx +++ b/ts/features/bonus/bpd/screens/details/components/iban/IbanInformationComponent.tsx @@ -3,7 +3,10 @@ import { connect } from "react-redux"; import { Dispatch } from "redux"; import Placeholder from "rn-placeholder"; import { GlobalState } from "../../../../../../../store/reducers/types"; -import { fold, RemoteValue } from "../../../../model/RemoteValue"; +import { + fold, + RemoteValue +} from "../../../../../../../common/model/RemoteValue"; import { bpdIbanInsertionStart } from "../../../../store/actions/iban"; import { bpdIbanSelector } from "../../../../store/reducers/details/activation"; import { bpdTechnicalAccountSelector } from "../../../../store/reducers/details/activation/technicalAccount"; diff --git a/ts/features/bonus/bpd/screens/details/components/unsubscribe/UnsubscribeToBpd.tsx b/ts/features/bonus/bpd/screens/details/components/unsubscribe/UnsubscribeToBpd.tsx index d0531a9039f..b0005d0bf2d 100644 --- a/ts/features/bonus/bpd/screens/details/components/unsubscribe/UnsubscribeToBpd.tsx +++ b/ts/features/bonus/bpd/screens/details/components/unsubscribe/UnsubscribeToBpd.tsx @@ -14,7 +14,7 @@ import { useLegacyIOBottomSheetModal } from "../../../../../../../utils/hooks/bo import { cancelButtonProps, errorButtonProps -} from "../../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../../components/buttons/ButtonConfigurations"; import FooterWithButtons from "../../../../../../../components/ui/FooterWithButtons"; import { UnsubscribeComponent } from "./UnsubscribeComponent"; diff --git a/ts/features/bonus/bpd/screens/details/transaction/v2/TransactionsUnavailableV2.tsx b/ts/features/bonus/bpd/screens/details/transaction/v2/TransactionsUnavailableV2.tsx index 3acaa356b95..3bb18877df4 100644 --- a/ts/features/bonus/bpd/screens/details/transaction/v2/TransactionsUnavailableV2.tsx +++ b/ts/features/bonus/bpd/screens/details/transaction/v2/TransactionsUnavailableV2.tsx @@ -14,7 +14,7 @@ import { GlobalState } from "../../../../../../../store/reducers/types"; import { cancelButtonProps, confirmButtonProps -} from "../../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../../components/buttons/ButtonConfigurations"; import { AwardPeriodId } from "../../../../store/actions/periods"; import { bpdTransactionsLoadRequiredData } from "../../../../store/actions/transactions"; import { bpdSelectedPeriodSelector } from "../../../../store/reducers/details/selectedPeriod"; diff --git a/ts/features/bonus/bpd/screens/iban/IbanCTAEditScreen.tsx b/ts/features/bonus/bpd/screens/iban/IbanCTAEditScreen.tsx index 96c68cb6a9e..851b006f2b9 100644 --- a/ts/features/bonus/bpd/screens/iban/IbanCTAEditScreen.tsx +++ b/ts/features/bonus/bpd/screens/iban/IbanCTAEditScreen.tsx @@ -11,7 +11,7 @@ import { bpdRemoteConfigSelector } from "../../../../../store/reducers/backendSt import { GlobalState } from "../../../../../store/reducers/types"; import { useActionOnFocus } from "../../../../../utils/hooks/useOnFocus"; import { isStrictSome } from "../../../../../utils/pot"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { navigateToBpdDetails } from "../../navigation/actions"; import { bpdAllData } from "../../store/actions/details"; import { bpdSelectPeriod } from "../../store/actions/selectedPeriod"; diff --git a/ts/features/bonus/bpd/screens/iban/IbanLoadingUpsert.tsx b/ts/features/bonus/bpd/screens/iban/IbanLoadingUpsert.tsx index 921f7acfa9c..48be3b97c49 100644 --- a/ts/features/bonus/bpd/screens/iban/IbanLoadingUpsert.tsx +++ b/ts/features/bonus/bpd/screens/iban/IbanLoadingUpsert.tsx @@ -7,7 +7,7 @@ import { Iban } from "../../../../../../definitions/backend/Iban"; import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { bpdIbanInsertionCancel, bpdUpsertIban diff --git a/ts/features/bonus/bpd/screens/iban/MainIbanScreen.tsx b/ts/features/bonus/bpd/screens/iban/MainIbanScreen.tsx index a3e747adc7a..96ac8356324 100644 --- a/ts/features/bonus/bpd/screens/iban/MainIbanScreen.tsx +++ b/ts/features/bonus/bpd/screens/iban/MainIbanScreen.tsx @@ -4,7 +4,11 @@ import { connect } from "react-redux"; import { Dispatch } from "redux"; import { GlobalState } from "../../../../../store/reducers/types"; import { showToast } from "../../../../../utils/showToast"; -import { isError, isLoading, isReady } from "../../model/RemoteValue"; +import { + isError, + isLoading, + isReady +} from "../../../../../common/model/RemoteValue"; import { IbanStatus } from "../../saga/networking/patchCitizenIban"; import { bpdIbanInsertionContinue, diff --git a/ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx b/ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx index c0ebdbd28d7..23de7bcbbb5 100644 --- a/ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx +++ b/ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx @@ -16,7 +16,7 @@ import { LabelledItem } from "../../../../../../components/LabelledItem"; import BaseScreenComponent from "../../../../../../components/screens/BaseScreenComponent"; import I18n from "../../../../../../i18n"; import { maybeNotNullyString } from "../../../../../../utils/strings"; -import { FooterTwoButtons } from "../../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; type OwnProps = { onBack: () => void; diff --git a/ts/features/bonus/bpd/screens/iban/ko/IbanKOCannotVerify.tsx b/ts/features/bonus/bpd/screens/iban/ko/IbanKOCannotVerify.tsx index 6caf81d6f05..544ec726984 100644 --- a/ts/features/bonus/bpd/screens/iban/ko/IbanKOCannotVerify.tsx +++ b/ts/features/bonus/bpd/screens/iban/ko/IbanKOCannotVerify.tsx @@ -9,7 +9,7 @@ import { InfoScreenComponent } from "../../../../../../components/infoScreen/Inf import BaseScreenComponent from "../../../../../../components/screens/BaseScreenComponent"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { FooterTwoButtons } from "../../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { bpdIbanInsertionContinue, bpdIbanInsertionResetScreen diff --git a/ts/features/bonus/bpd/screens/iban/ko/IbanKONotOwned.tsx b/ts/features/bonus/bpd/screens/iban/ko/IbanKONotOwned.tsx index 9562491740b..d5eec253e6e 100644 --- a/ts/features/bonus/bpd/screens/iban/ko/IbanKONotOwned.tsx +++ b/ts/features/bonus/bpd/screens/iban/ko/IbanKONotOwned.tsx @@ -14,7 +14,7 @@ import BaseScreenComponent from "../../../../../../components/screens/BaseScreen import I18n from "../../../../../../i18n"; import { profileSelector } from "../../../../../../store/reducers/profile"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { FooterTwoButtons } from "../../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { bpdIbanInsertionCancel, bpdIbanInsertionResetScreen diff --git a/ts/features/bonus/bpd/screens/iban/ko/IbanKOWrong.tsx b/ts/features/bonus/bpd/screens/iban/ko/IbanKOWrong.tsx index bf793b89c58..faa06e7f4ae 100644 --- a/ts/features/bonus/bpd/screens/iban/ko/IbanKOWrong.tsx +++ b/ts/features/bonus/bpd/screens/iban/ko/IbanKOWrong.tsx @@ -9,7 +9,7 @@ import { InfoScreenComponent } from "../../../../../../components/infoScreen/Inf import BaseScreenComponent from "../../../../../../components/screens/BaseScreenComponent"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { FooterTwoButtons } from "../../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { bpdIbanInsertionCancel, bpdIbanInsertionResetScreen diff --git a/ts/features/bonus/bpd/screens/onboarding/BpdCTAStartOnboardingScreen.tsx b/ts/features/bonus/bpd/screens/onboarding/BpdCTAStartOnboardingScreen.tsx index 55e7e6d99d1..d586ce069a5 100644 --- a/ts/features/bonus/bpd/screens/onboarding/BpdCTAStartOnboardingScreen.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/BpdCTAStartOnboardingScreen.tsx @@ -9,12 +9,12 @@ import I18n from "../../../../../i18n"; import { bpdRemoteConfigSelector } from "../../../../../store/reducers/backendStatus"; import { GlobalState } from "../../../../../store/reducers/types"; import { useActionOnFocus } from "../../../../../utils/hooks/useOnFocus"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { loadAvailableBonuses } from "../../../bonusVacanze/store/actions/bonusVacanze"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { loadAvailableBonuses } from "../../../common/store/actions/availableBonusesTypes"; import { isAvailableBonusErrorSelector, supportedAvailableBonusSelector -} from "../../../bonusVacanze/store/reducers/availableBonusesTypes"; +} from "../../../common/store/selectors"; import { bpdOnboardingStart } from "../../store/actions/onboarding"; export type Props = ReturnType & diff --git a/ts/features/bonus/bpd/screens/onboarding/BpdInformationScreen.tsx b/ts/features/bonus/bpd/screens/onboarding/BpdInformationScreen.tsx index 7da9a5717aa..20fc4642779 100644 --- a/ts/features/bonus/bpd/screens/onboarding/BpdInformationScreen.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/BpdInformationScreen.tsx @@ -6,14 +6,14 @@ import { Dispatch } from "../../../../../store/actions/types"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { actionWithAlert } from "../../../common/components/alert/ActionWithAlert"; -import { availableBonusTypesSelectorFromId } from "../../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_BPD_TYPE } from "../../../bonusVacanze/utils/bonus"; +import { ID_BPD_TYPE } from "../../../common/utils"; import BonusInformationComponent from "../../../common/components/BonusInformationComponent"; import { bpdOnboardingCancel, bpdUserActivate } from "../../store/actions/onboarding"; import { bpdEnabledSelector } from "../../store/reducers/details/activation"; +import { availableBonusTypesSelectorFromId } from "../../../common/store/selectors"; export type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/bpd/screens/onboarding/ErrorPaymentMethodsScreen.tsx b/ts/features/bonus/bpd/screens/onboarding/ErrorPaymentMethodsScreen.tsx index 268310d8813..e9fb04cc972 100644 --- a/ts/features/bonus/bpd/screens/onboarding/ErrorPaymentMethodsScreen.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/ErrorPaymentMethodsScreen.tsx @@ -12,7 +12,7 @@ import I18n from "../../../../../i18n"; import { navigateToWalletHome } from "../../../../../store/actions/navigation"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { confirmButtonProps } from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; export type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/bpd/screens/onboarding/LoadActivateBpdScreen.tsx b/ts/features/bonus/bpd/screens/onboarding/LoadActivateBpdScreen.tsx index a241240fcd4..343de78761f 100644 --- a/ts/features/bonus/bpd/screens/onboarding/LoadActivateBpdScreen.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/LoadActivateBpdScreen.tsx @@ -4,8 +4,8 @@ import { Dispatch } from "redux"; import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { isError } from "../../model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { isError } from "../../../../../common/model/RemoteValue"; import { bpdOnboardingAcceptDeclaration, bpdOnboardingCancel diff --git a/ts/features/bonus/bpd/screens/onboarding/LoadBpdActivationStatus.tsx b/ts/features/bonus/bpd/screens/onboarding/LoadBpdActivationStatus.tsx index 192487ee327..7c60be9d180 100644 --- a/ts/features/bonus/bpd/screens/onboarding/LoadBpdActivationStatus.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/LoadBpdActivationStatus.tsx @@ -5,7 +5,7 @@ import { Dispatch } from "redux"; import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { bpdOnboardingCancel, bpdOnboardingStart diff --git a/ts/features/bonus/bpd/screens/onboarding/NoPaymentMethodsAvailableScreen.tsx b/ts/features/bonus/bpd/screens/onboarding/NoPaymentMethodsAvailableScreen.tsx index 2851e909d6b..7c0dc2be012 100644 --- a/ts/features/bonus/bpd/screens/onboarding/NoPaymentMethodsAvailableScreen.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/NoPaymentMethodsAvailableScreen.tsx @@ -15,7 +15,7 @@ import { } from "../../../../../store/actions/navigation"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { FooterTwoButtons } from "../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../components/markdown/FooterTwoButtons"; export type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/bpd/screens/onboarding/declaration/DeclarationComponent.tsx b/ts/features/bonus/bpd/screens/onboarding/declaration/DeclarationComponent.tsx index cc2712d5558..a9c79a05606 100644 --- a/ts/features/bonus/bpd/screens/onboarding/declaration/DeclarationComponent.tsx +++ b/ts/features/bonus/bpd/screens/onboarding/declaration/DeclarationComponent.tsx @@ -11,7 +11,7 @@ import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; import BaseScreenComponent from "../../../../../../components/screens/BaseScreenComponent"; import I18n from "../../../../../../i18n"; import { openWebUrl } from "../../../../../../utils/url"; -import { FooterTwoButtons } from "../../../../bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { dpr28Dec2000Url } from "../../../../../../urls"; import { DeclarationEntry } from "./DeclarationEntry"; diff --git a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsCashbackUpdateScreen.tsx b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsCashbackUpdateScreen.tsx index 0ebb3dd5a57..8ae4a763571 100644 --- a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsCashbackUpdateScreen.tsx +++ b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsCashbackUpdateScreen.tsx @@ -14,7 +14,7 @@ import { getBPDMethodsSelector, paymentMethodsSelector } from "../../../../../store/reducers/wallet/wallets"; -import { confirmButtonProps } from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { navigateToOptInPaymentMethodsChoiceScreen } from "../../navigation/actions"; import { optInPaymentMethodsCompleted, diff --git a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsChoiceScreen.tsx b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsChoiceScreen.tsx index c2c48c50966..56dd1217c4f 100644 --- a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsChoiceScreen.tsx +++ b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsChoiceScreen.tsx @@ -24,9 +24,13 @@ import { confirmButtonProps, disablePrimaryButtonProps, errorBorderedButtonProps -} from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../components/buttons/ButtonConfigurations"; import { useBottomSheetMethodsToDelete } from "../../components/optInStatus/BottomSheetMethodsToDelete"; -import { isError, isReady, isUndefined } from "../../model/RemoteValue"; +import { + isError, + isReady, + isUndefined +} from "../../../../../common/model/RemoteValue"; import { navigateToOptInPaymentMethodsThankYouDeleteMethodsScreen, navigateToOptInPaymentMethodsThankYouKeepMethodsScreen diff --git a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouDeleteMethodsScreen.tsx b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouDeleteMethodsScreen.tsx index b29c30b9780..fb4241a6ddf 100644 --- a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouDeleteMethodsScreen.tsx +++ b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouDeleteMethodsScreen.tsx @@ -7,7 +7,7 @@ import ROUTES from "../../../../../navigation/routes"; import { useIOSelector } from "../../../../../store/hooks"; import { deleteAllPaymentMethodsByFunctionSelector } from "../../../../../store/reducers/wallet/wallets"; import { showToast } from "../../../../../utils/showToast"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import RetryAfterDeletionFailsComponent from "../../components/optInPaymentMethods/RetryAfterDeletionFailsComponent"; import ThankYouSuccessComponent from "../../components/optInPaymentMethods/ThankYouSuccessComponent"; import { @@ -15,7 +15,7 @@ import { isLoading, isReady, isUndefined -} from "../../model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { optInPaymentMethodsDeletionChoice } from "../../store/actions/optInPaymentMethods"; import { optInStatusSelector } from "../../store/reducers/details/activation"; diff --git a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouKeepMethodsScreen.tsx b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouKeepMethodsScreen.tsx index 1447020bd10..b4fcb82e6f4 100644 --- a/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouKeepMethodsScreen.tsx +++ b/ts/features/bonus/bpd/screens/optInPaymentMethods/OptInPaymentMethodsThankYouKeepMethodsScreen.tsx @@ -7,7 +7,7 @@ import I18n from "../../../../../i18n"; import ROUTES from "../../../../../navigation/routes"; import { useIOSelector } from "../../../../../store/hooks"; import { showToast } from "../../../../../utils/showToast"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import ThankYouSuccessComponent from "../../components/optInPaymentMethods/ThankYouSuccessComponent"; import { bpdUpdateOptInStatusMethod } from "../../store/actions/onboarding"; import { optInStatusSelector } from "../../store/reducers/details/activation"; diff --git a/ts/features/bonus/bpd/screens/optInPaymentMethods/__tests__/OptInPaymentMethodsThankYouDeleteMethodsScreen.test.ts b/ts/features/bonus/bpd/screens/optInPaymentMethods/__tests__/OptInPaymentMethodsThankYouDeleteMethodsScreen.test.ts index 55f36327247..42c61fdf033 100644 --- a/ts/features/bonus/bpd/screens/optInPaymentMethods/__tests__/OptInPaymentMethodsThankYouDeleteMethodsScreen.test.ts +++ b/ts/features/bonus/bpd/screens/optInPaymentMethods/__tests__/OptInPaymentMethodsThankYouDeleteMethodsScreen.test.ts @@ -15,7 +15,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { bpdUpdateOptInStatusMethod } from "../../../store/actions/onboarding"; import OptInPaymentMethodsThankYouDeleteMethodsScreen from "../OptInPaymentMethodsThankYouDeleteMethodsScreen"; diff --git a/ts/features/bonus/bpd/store/reducers/__test__/payoffInstruments.test.ts b/ts/features/bonus/bpd/store/reducers/__test__/payoffInstruments.test.ts index 37ce0fa4cce..765754400fd 100644 --- a/ts/features/bonus/bpd/store/reducers/__test__/payoffInstruments.test.ts +++ b/ts/features/bonus/bpd/store/reducers/__test__/payoffInstruments.test.ts @@ -7,7 +7,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { IbanStatus } from "../../../saga/networking/patchCitizenIban"; import { bpdUpsertIban } from "../../actions/iban"; diff --git a/ts/features/bonus/bpd/store/reducers/details/activation/index.ts b/ts/features/bonus/bpd/store/reducers/details/activation/index.ts index a3459cb841c..016572cdb6e 100644 --- a/ts/features/bonus/bpd/store/reducers/details/activation/index.ts +++ b/ts/features/bonus/bpd/store/reducers/details/activation/index.ts @@ -13,7 +13,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../model/RemoteValue"; +} from "../../../../../../../common/model/RemoteValue"; import { ActivationStatus, bpdLoadActivationStatus diff --git a/ts/features/bonus/bpd/store/reducers/details/activation/payoffInstrument.ts b/ts/features/bonus/bpd/store/reducers/details/activation/payoffInstrument.ts index 309fd5a4075..a194e4cd0ba 100644 --- a/ts/features/bonus/bpd/store/reducers/details/activation/payoffInstrument.ts +++ b/ts/features/bonus/bpd/store/reducers/details/activation/payoffInstrument.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../model/RemoteValue"; +} from "../../../../../../../common/model/RemoteValue"; import { IbanStatus } from "../../../../saga/networking/patchCitizenIban"; import { bpdLoadActivationStatus } from "../../../actions/details"; import { diff --git a/ts/features/bonus/bpd/store/reducers/details/activation/technicalAccount.ts b/ts/features/bonus/bpd/store/reducers/details/activation/technicalAccount.ts index 19961843b82..f6045a18507 100644 --- a/ts/features/bonus/bpd/store/reducers/details/activation/technicalAccount.ts +++ b/ts/features/bonus/bpd/store/reducers/details/activation/technicalAccount.ts @@ -6,7 +6,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../model/RemoteValue"; +} from "../../../../../../../common/model/RemoteValue"; import { Action } from "../../../../../../../store/actions/types"; import { bpdDeleteUserFromProgram } from "../../../actions/onboarding"; import { bpdLoadActivationStatus } from "../../../actions/details"; diff --git a/ts/features/bonus/bpd/store/reducers/details/activation/ui.ts b/ts/features/bonus/bpd/store/reducers/details/activation/ui.ts index 9d62892ecf6..26ff69147a2 100644 --- a/ts/features/bonus/bpd/store/reducers/details/activation/ui.ts +++ b/ts/features/bonus/bpd/store/reducers/details/activation/ui.ts @@ -6,7 +6,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../model/RemoteValue"; +} from "../../../../../../../common/model/RemoteValue"; import { Action } from "../../../../../../../store/actions/types"; import { optInPaymentMethodsShowChoice } from "../../../actions/optInPaymentMethods"; import { GlobalState } from "../../../../../../../store/reducers/types"; diff --git a/ts/features/bonus/bpd/store/reducers/onboarding/enroll.ts b/ts/features/bonus/bpd/store/reducers/onboarding/enroll.ts index 006eb27b0f8..bc86ae7a47d 100644 --- a/ts/features/bonus/bpd/store/reducers/onboarding/enroll.ts +++ b/ts/features/bonus/bpd/store/reducers/onboarding/enroll.ts @@ -6,7 +6,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { bpdEnrollUserToProgram } from "../../actions/onboarding"; import { Action } from "../../../../../../store/actions/types"; diff --git a/ts/features/bonus/bpd/store/reducers/onboarding/index.ts b/ts/features/bonus/bpd/store/reducers/onboarding/index.ts index fa8f550314e..987899a2643 100644 --- a/ts/features/bonus/bpd/store/reducers/onboarding/index.ts +++ b/ts/features/bonus/bpd/store/reducers/onboarding/index.ts @@ -1,5 +1,5 @@ import { Action, combineReducers } from "redux"; -import { RemoteValue } from "../../../model/RemoteValue"; +import { RemoteValue } from "../../../../../../common/model/RemoteValue"; import bpdEnrollUserReducer from "./enroll"; import ongoingOnboardingReducer from "./ongoing"; diff --git a/ts/features/bonus/cdc/components/CdcGenericError.tsx b/ts/features/bonus/cdc/components/CdcGenericError.tsx index 4386b62b1e8..38878e067ce 100644 --- a/ts/features/bonus/cdc/components/CdcGenericError.tsx +++ b/ts/features/bonus/cdc/components/CdcGenericError.tsx @@ -7,7 +7,7 @@ import { renderInfoRasterImage } from "../../../../components/infoScreen/imageRe import image from "../../../../../img/wallet/errors/generic-error-icon.png"; import I18n from "../../../../i18n"; import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; -import { cancelButtonProps } from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { AppParamsList, IOStackNavigationProp diff --git a/ts/features/bonus/cdc/components/CdcRequestCompleted.tsx b/ts/features/bonus/cdc/components/CdcRequestCompleted.tsx index 5254a5a8ce2..a499a3a0e5a 100644 --- a/ts/features/bonus/cdc/components/CdcRequestCompleted.tsx +++ b/ts/features/bonus/cdc/components/CdcRequestCompleted.tsx @@ -7,7 +7,7 @@ import { renderInfoRasterImage } from "../../../../components/infoScreen/imageRe import image from "../../../../../img/pictograms/payment-completed.png"; import I18n from "../../../../i18n"; import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; -import { confirmButtonProps } from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { AppParamsList, IOStackNavigationProp diff --git a/ts/features/bonus/cdc/components/CdcRequestPartiallySuccess.tsx b/ts/features/bonus/cdc/components/CdcRequestPartiallySuccess.tsx index 3fffcadf975..43dfe7a4353 100644 --- a/ts/features/bonus/cdc/components/CdcRequestPartiallySuccess.tsx +++ b/ts/features/bonus/cdc/components/CdcRequestPartiallySuccess.tsx @@ -11,10 +11,10 @@ import { AppParamsList, IOStackNavigationProp } from "../../../../navigation/params/AppParamsList"; -import { cancelButtonProps } from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { cdcEnrollUserToBonusSelector } from "../store/reducers/cdcBonusRequest"; import { useIOSelector } from "../../../../store/hooks"; -import { isReady } from "../../bpd/model/RemoteValue"; +import { isReady } from "../../../../common/model/RemoteValue"; import { CdcBonusEnrollmentOutcomeList, RequestOutcomeEnum diff --git a/ts/features/bonus/cdc/components/CdcRequirementsError.tsx b/ts/features/bonus/cdc/components/CdcRequirementsError.tsx index 0d4e2f5fc02..e035b8fa9d4 100644 --- a/ts/features/bonus/cdc/components/CdcRequirementsError.tsx +++ b/ts/features/bonus/cdc/components/CdcRequirementsError.tsx @@ -7,7 +7,7 @@ import { renderInfoRasterImage } from "../../../../components/infoScreen/imageRe import image from "../../../../../img/servicesStatus/error-detail-icon.png"; import I18n from "../../../../i18n"; import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; -import { cancelButtonProps } from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { AppParamsList, IOStackNavigationProp diff --git a/ts/features/bonus/cdc/components/CdcServiceCTA.tsx b/ts/features/bonus/cdc/components/CdcServiceCTA.tsx index 8928840ed69..6734081f3a6 100644 --- a/ts/features/bonus/cdc/components/CdcServiceCTA.tsx +++ b/ts/features/bonus/cdc/components/CdcServiceCTA.tsx @@ -1,25 +1,25 @@ +import { VSpacer } from "@pagopa/io-app-design-system"; import * as pot from "@pagopa/ts-commons/lib/pot"; import { useFocusEffect, useNavigation } from "@react-navigation/native"; import * as React from "react"; import { useCallback } from "react"; import { View } from "react-native"; -import { VSpacer } from "@pagopa/io-app-design-system"; import { StatoBeneficiarioEnum } from "../../../../../definitions/cdc/StatoBeneficiario"; import { BonusVisibilityEnum } from "../../../../../definitions/content/BonusVisibility"; import ButtonDefaultOpacity from "../../../../components/ButtonDefaultOpacity"; -import { Label } from "../../../../components/core/typography/Label"; import SectionStatusComponent from "../../../../components/SectionStatus"; import StatusContent from "../../../../components/SectionStatus/StatusContent"; +import { Label } from "../../../../components/core/typography/Label"; import ActivityIndicator from "../../../../components/ui/ActivityIndicator"; import I18n from "../../../../i18n"; import { useIODispatch, useIOSelector } from "../../../../store/hooks"; -import { loadAvailableBonuses } from "../../bonusVacanze/store/actions/bonusVacanze"; +import { ID_CDC_TYPE } from "../../common/utils"; +import { fold } from "../../../../common/model/RemoteValue"; +import { loadAvailableBonuses } from "../../common/store/actions/availableBonusesTypes"; import { allAvailableBonusTypesSelector, availableBonusTypesSelectorFromId -} from "../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_CDC_TYPE } from "../../bonusVacanze/utils/bonus"; -import { fold } from "../../bpd/model/RemoteValue"; +} from "../../common/store/selectors"; import { CDC_ROUTES } from "../navigation/routes"; import { cdcRequestBonusList } from "../store/actions/cdcBonusRequest"; import { cdcBonusRequestListSelector } from "../store/reducers/cdcBonusRequest"; diff --git a/ts/features/bonus/cdc/components/CdcWrongFormat.tsx b/ts/features/bonus/cdc/components/CdcWrongFormat.tsx index 84fbf35bccd..86e84ea210e 100644 --- a/ts/features/bonus/cdc/components/CdcWrongFormat.tsx +++ b/ts/features/bonus/cdc/components/CdcWrongFormat.tsx @@ -7,7 +7,7 @@ import { renderInfoRasterImage } from "../../../../components/infoScreen/imageRe import image from "../../../../../img/wallet/errors/generic-error-icon.png"; import I18n from "../../../../i18n"; import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; -import { cancelButtonProps } from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { AppParamsList, IOStackNavigationProp diff --git a/ts/features/bonus/cdc/components/__test__/CdcServiceCTA.test.ts b/ts/features/bonus/cdc/components/__test__/CdcServiceCTA.test.ts index b47472e182b..739bbf9134d 100644 --- a/ts/features/bonus/cdc/components/__test__/CdcServiceCTA.test.ts +++ b/ts/features/bonus/cdc/components/__test__/CdcServiceCTA.test.ts @@ -1,17 +1,17 @@ import { createStore, Store } from "redux"; -import { appReducer } from "../../../../../store/reducers"; +import { Anno } from "../../../../../../definitions/cdc/Anno"; +import { StatoBeneficiarioEnum } from "../../../../../../definitions/cdc/StatoBeneficiario"; +import { BonusAvailable } from "../../../../../../definitions/content/BonusAvailable"; +import ROUTES from "../../../../../navigation/routes"; import { applicationChangeState } from "../../../../../store/actions/application"; +import { appReducer } from "../../../../../store/reducers"; import { GlobalState } from "../../../../../store/reducers/types"; +import { getTimeoutError } from "../../../../../utils/errors"; import { renderScreenFakeNavRedux } from "../../../../../utils/testWrapper"; -import ROUTES from "../../../../../navigation/routes"; -import CdcServiceCTA from "../CdcServiceCTA"; +import { loadAvailableBonuses } from "../../../common/store/actions/availableBonusesTypes"; import { cdcRequestBonusList } from "../../store/actions/cdcBonusRequest"; import { CdcBonusRequest } from "../../types/CdcBonusRequest"; -import { getTimeoutError } from "../../../../../utils/errors"; -import { Anno } from "../../../../../../definitions/cdc/Anno"; -import { StatoBeneficiarioEnum } from "../../../../../../definitions/cdc/StatoBeneficiario"; -import { loadAvailableBonuses } from "../../../bonusVacanze/store/actions/bonusVacanze"; -import { BonusAvailable } from "../../../../../../definitions/content/BonusAvailable"; +import CdcServiceCTA from "../CdcServiceCTA"; jest.useFakeTimers(); diff --git a/ts/features/bonus/cdc/screens/CdcBonusRequestBonusRequested.tsx b/ts/features/bonus/cdc/screens/CdcBonusRequestBonusRequested.tsx index ef26693880d..c0b393e1209 100644 --- a/ts/features/bonus/cdc/screens/CdcBonusRequestBonusRequested.tsx +++ b/ts/features/bonus/cdc/screens/CdcBonusRequestBonusRequested.tsx @@ -8,9 +8,9 @@ import { import { useIODispatch, useIOSelector } from "../../../../store/hooks"; import CdcRequirementsError from "../components/CdcRequirementsError"; import { cdcEnrollUserToBonus } from "../store/actions/cdcBonusRequest"; -import { fold } from "../../bpd/model/RemoteValue"; +import { fold } from "../../../../common/model/RemoteValue"; import CdcRequestCompleted from "../components/CdcRequestCompleted"; -import { LoadingErrorComponent } from "../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../components/LoadingErrorComponent"; import I18n from "../../../../i18n"; import { CdcBonusRequestResponse, diff --git a/ts/features/bonus/cdc/screens/CdcBonusRequestInformationTos.tsx b/ts/features/bonus/cdc/screens/CdcBonusRequestInformationTos.tsx index 11c98668bd3..877e6bb1c5c 100644 --- a/ts/features/bonus/cdc/screens/CdcBonusRequestInformationTos.tsx +++ b/ts/features/bonus/cdc/screens/CdcBonusRequestInformationTos.tsx @@ -1,30 +1,30 @@ +import { VSpacer } from "@pagopa/io-app-design-system"; +import { useNavigation } from "@react-navigation/native"; import * as React from "react"; import { - View, Image, ImageSourcePropType, SafeAreaView, ScrollView, - StyleSheet + StyleSheet, + View } from "react-native"; -import { useNavigation } from "@react-navigation/native"; -import { VSpacer } from "@pagopa/io-app-design-system"; -import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; +import { BonusAvailableContent } from "../../../../../definitions/content/BonusAvailableContent"; +import { IORenderHtml } from "../../../../components/core/IORenderHtml"; +import { H2 } from "../../../../components/core/typography/H2"; +import { H4 } from "../../../../components/core/typography/H4"; import { IOStyles } from "../../../../components/core/variables/IOStyles"; import BaseScreenComponent from "../../../../components/screens/BaseScreenComponent"; -import I18n from "../../../../i18n"; import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; -import { CDC_ROUTES } from "../navigation/routes"; +import I18n from "../../../../i18n"; import { IOStackNavigationProp } from "../../../../navigation/params/AppParamsList"; -import { CdcBonusRequestParamsList } from "../navigation/params"; -import { H2 } from "../../../../components/core/typography/H2"; -import { IORenderHtml } from "../../../../components/core/IORenderHtml"; import { useIOSelector } from "../../../../store/hooks"; -import { availableBonusTypesSelectorFromId } from "../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_CDC_TYPE } from "../../bonusVacanze/utils/bonus"; -import { BonusAvailableContent } from "../../../../../definitions/content/BonusAvailableContent"; +import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { getRemoteLocale } from "../../../messages/utils/messages"; -import { H4 } from "../../../../components/core/typography/H4"; +import { ID_CDC_TYPE } from "../../common/utils"; +import { availableBonusTypesSelectorFromId } from "../../common/store/selectors"; +import { CdcBonusRequestParamsList } from "../navigation/params"; +import { CDC_ROUTES } from "../navigation/routes"; const styles = StyleSheet.create({ logo: { diff --git a/ts/features/bonus/cdc/screens/CdcBonusRequestSelectResidence.tsx b/ts/features/bonus/cdc/screens/CdcBonusRequestSelectResidence.tsx index d150e66637f..d719121db34 100644 --- a/ts/features/bonus/cdc/screens/CdcBonusRequestSelectResidence.tsx +++ b/ts/features/bonus/cdc/screens/CdcBonusRequestSelectResidence.tsx @@ -20,7 +20,7 @@ import { CDC_ROUTES } from "../navigation/routes"; import { cancelButtonProps, confirmButtonProps -} from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import { cdcSelectedBonusSelector } from "../store/reducers/cdcBonusRequest"; import { useIOSelector } from "../../../../store/hooks"; import { H3 } from "../../../../components/core/typography/H3"; diff --git a/ts/features/bonus/cdc/screens/CdcBonusRequestSelectYear.tsx b/ts/features/bonus/cdc/screens/CdcBonusRequestSelectYear.tsx index e6bca3b153d..7511a450ba0 100644 --- a/ts/features/bonus/cdc/screens/CdcBonusRequestSelectYear.tsx +++ b/ts/features/bonus/cdc/screens/CdcBonusRequestSelectYear.tsx @@ -15,7 +15,7 @@ import I18n from "../../../../i18n"; import { CDC_ROUTES } from "../navigation/routes"; import { cdcBonusRequestListSelector } from "../store/reducers/cdcBonusRequest"; import { useIOSelector } from "../../../../store/hooks"; -import { isReady } from "../../bpd/model/RemoteValue"; +import { isReady } from "../../../../common/model/RemoteValue"; import ROUTES from "../../../../navigation/routes"; import { CheckBox } from "../../../../components/core/selection/checkbox/CheckBox"; import { H4 } from "../../../../components/core/typography/H4"; @@ -25,7 +25,7 @@ import { cdcSelectedBonus } from "../store/actions/cdcBonusRequest"; import { cancelButtonProps, confirmButtonProps -} from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import { compareSelectedBonusByYear } from "../utils/bonusRequest"; const CdcBonusRequestSelectYear = () => { diff --git a/ts/features/bonus/cdc/store/reducers/__test__/cdcBonusRequest.test.ts b/ts/features/bonus/cdc/store/reducers/__test__/cdcBonusRequest.test.ts index e239e748999..d794678dbb2 100644 --- a/ts/features/bonus/cdc/store/reducers/__test__/cdcBonusRequest.test.ts +++ b/ts/features/bonus/cdc/store/reducers/__test__/cdcBonusRequest.test.ts @@ -13,7 +13,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { cdcEnrollUserToBonus, cdcRequestBonusList, diff --git a/ts/features/bonus/cdc/store/reducers/cdcBonusRequest.ts b/ts/features/bonus/cdc/store/reducers/cdcBonusRequest.ts index a38b236000a..b047d5a4e76 100644 --- a/ts/features/bonus/cdc/store/reducers/cdcBonusRequest.ts +++ b/ts/features/bonus/cdc/store/reducers/cdcBonusRequest.ts @@ -5,7 +5,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { NetworkError } from "../../../../../utils/errors"; import { CdcBonusRequestList, diff --git a/ts/features/bonus/cgn/__e2e__/cgn.e2e.ts b/ts/features/bonus/cgn/__e2e__/cgn.e2e.ts index 216a0525162..d92b2e4167a 100644 --- a/ts/features/bonus/cgn/__e2e__/cgn.e2e.ts +++ b/ts/features/bonus/cgn/__e2e__/cgn.e2e.ts @@ -1,7 +1,7 @@ import { e2eWaitRenderTimeout } from "../../../../__e2e__/config"; import { ensureLoggedIn } from "../../../../__e2e__/utils"; import I18n from "../../../../i18n"; -import { ID_CGN_TYPE } from "../../bonusVacanze/utils/bonus"; +import { ID_CGN_TYPE } from "../../common/utils"; const CGN_TITLE = "Carta Giovani Nazionale"; const SERVICES_LIST = "services-list"; diff --git a/ts/features/bonus/cgn/components/CgnServiceCTA.tsx b/ts/features/bonus/cgn/components/CgnServiceCTA.tsx index 973acba4ec4..d4020fdc427 100644 --- a/ts/features/bonus/cgn/components/CgnServiceCTA.tsx +++ b/ts/features/bonus/cgn/components/CgnServiceCTA.tsx @@ -10,14 +10,14 @@ import { useIODispatch, useIOSelector } from "../../../../store/hooks"; import { servicePreferenceSelector } from "../../../../store/reducers/entities/services/servicePreference"; import { isServicePreferenceResponseSuccess } from "../../../../types/services/ServicePreferenceResponse"; import { ServiceId } from "../../../../../definitions/backend/ServiceId"; -import { loadAvailableBonuses } from "../../bonusVacanze/store/actions/bonusVacanze"; import { cgnActivationStart } from "../store/actions/activation"; import { cgnUnsubscribe } from "../store/actions/unsubscribe"; -import { fold, isLoading } from "../../bpd/model/RemoteValue"; +import { fold, isLoading } from "../../../../common/model/RemoteValue"; import { showToast } from "../../../../utils/showToast"; import { cgnUnsubscribeSelector } from "../store/reducers/unsubscribe"; import { loadServicePreference } from "../../../../store/actions/services/servicePreference"; import ActivityIndicator from "../../../../components/ui/ActivityIndicator"; +import { loadAvailableBonuses } from "../../common/store/actions/availableBonusesTypes"; type Props = { serviceId: ServiceId; diff --git a/ts/features/bonus/cgn/components/detail/CgnUnsubscribe.tsx b/ts/features/bonus/cgn/components/detail/CgnUnsubscribe.tsx index 9fbd6c9e53d..ec0eebcd348 100644 --- a/ts/features/bonus/cgn/components/detail/CgnUnsubscribe.tsx +++ b/ts/features/bonus/cgn/components/detail/CgnUnsubscribe.tsx @@ -7,7 +7,7 @@ import { useIODispatch, useIOSelector } from "../../../../../store/hooks"; import { cgnUnsubscribeSelector } from "../../store/reducers/unsubscribe"; import I18n from "../../../../../i18n"; import { cgnUnsubscribe } from "../../store/actions/unsubscribe"; -import { isError, isReady } from "../../../bpd/model/RemoteValue"; +import { isError, isReady } from "../../../../../common/model/RemoteValue"; import { navigateBack } from "../../../../../store/actions/navigation"; import { cgnDetails } from "../../store/actions/details"; import { IOToast } from "../../../../../components/Toast"; diff --git a/ts/features/bonus/cgn/components/detail/eyca/EycaDetailComponent.tsx b/ts/features/bonus/cgn/components/detail/eyca/EycaDetailComponent.tsx index 4d24728c1f1..eee6a995d9e 100644 --- a/ts/features/bonus/cgn/components/detail/eyca/EycaDetailComponent.tsx +++ b/ts/features/bonus/cgn/components/detail/eyca/EycaDetailComponent.tsx @@ -8,7 +8,7 @@ import { CardPending } from "../../../../../../../definitions/cgn/CardPending"; import { EycaCard } from "../../../../../../../definitions/cgn/EycaCard"; import { Dispatch } from "../../../../../../store/actions/types"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { isLoading } from "../../../../bpd/model/RemoteValue"; +import { isLoading } from "../../../../../../common/model/RemoteValue"; import { cgnEycaActivation, cgnEycaActivationStatusRequest diff --git a/ts/features/bonus/cgn/components/merchants/CgnMerchantsFilters.tsx b/ts/features/bonus/cgn/components/merchants/CgnMerchantsFilters.tsx index 8711be5d82f..6e341afd8f7 100644 --- a/ts/features/bonus/cgn/components/merchants/CgnMerchantsFilters.tsx +++ b/ts/features/bonus/cgn/components/merchants/CgnMerchantsFilters.tsx @@ -24,7 +24,7 @@ import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps -} from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../components/buttons/ButtonConfigurations"; import { LabelledItem } from "../../../../../components/LabelledItem"; import CategoryCheckbox from "./search/CategoryCheckbox"; import OrderOption from "./search/OrderOption"; diff --git a/ts/features/bonus/cgn/components/merchants/discount/CgnBucketCodeComponent.tsx b/ts/features/bonus/cgn/components/merchants/discount/CgnBucketCodeComponent.tsx index 29cabb2a52e..ba341e8b327 100644 --- a/ts/features/bonus/cgn/components/merchants/discount/CgnBucketCodeComponent.tsx +++ b/ts/features/bonus/cgn/components/merchants/discount/CgnBucketCodeComponent.tsx @@ -14,7 +14,11 @@ import ActivityIndicator from "../../../../../../components/ui/ActivityIndicator import I18n from "../../../../../../i18n"; import { useIODispatch, useIOSelector } from "../../../../../../store/hooks"; import { clipboardSetStringWithFeedback } from "../../../../../../utils/clipboard"; -import { isError, isLoading, isReady } from "../../../../bpd/model/RemoteValue"; +import { + isError, + isLoading, + isReady +} from "../../../../../../common/model/RemoteValue"; import { cgnCodeFromBucket, cgnCodeFromBucketReset diff --git a/ts/features/bonus/cgn/components/merchants/discount/CgnOTPCodeComponent.tsx b/ts/features/bonus/cgn/components/merchants/discount/CgnOTPCodeComponent.tsx index 714e9018207..c83b9983b8a 100644 --- a/ts/features/bonus/cgn/components/merchants/discount/CgnOTPCodeComponent.tsx +++ b/ts/features/bonus/cgn/components/merchants/discount/CgnOTPCodeComponent.tsx @@ -6,7 +6,11 @@ import I18n from "../../../../../../i18n"; import { BaseTypography } from "../../../../../../components/core/typography/BaseTypography"; import { useIODispatch, useIOSelector } from "../../../../../../store/hooks"; import { cgnOtpDataSelector } from "../../../store/reducers/otp"; -import { isError, isLoading, isReady } from "../../../../bpd/model/RemoteValue"; +import { + isError, + isLoading, + isReady +} from "../../../../../../common/model/RemoteValue"; import { cgnGenerateOtp, resetOtpState } from "../../../store/actions/otp"; import ActivityIndicator from "../../../../../../components/ui/ActivityIndicator"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; diff --git a/ts/features/bonus/cgn/saga/networking/__test__/getEycaStatus.test.ts b/ts/features/bonus/cgn/saga/networking/__test__/getEycaStatus.test.ts index 129f1772861..ab7c581abcb 100644 --- a/ts/features/bonus/cgn/saga/networking/__test__/getEycaStatus.test.ts +++ b/ts/features/bonus/cgn/saga/networking/__test__/getEycaStatus.test.ts @@ -14,7 +14,10 @@ import { appReducer } from "../../../../../../store/reducers"; import { GlobalState } from "../../../../../../store/reducers/types"; import { getGenericError } from "../../../../../../utils/errors"; import { readablePrivacyReport } from "../../../../../../utils/reporters"; -import { remoteError, remoteReady } from "../../../../bpd/model/RemoteValue"; +import { + remoteError, + remoteReady +} from "../../../../../../common/model/RemoteValue"; import { cgnEycaStatus } from "../../../store/actions/eyca/details"; import { handleGetEycaStatus } from "../eyca/details/getEycaStatus"; diff --git a/ts/features/bonus/cgn/screens/CgnDetailScreen.tsx b/ts/features/bonus/cgn/screens/CgnDetailScreen.tsx index 5a7150aef49..bccc93729a6 100644 --- a/ts/features/bonus/cgn/screens/CgnDetailScreen.tsx +++ b/ts/features/bonus/cgn/screens/CgnDetailScreen.tsx @@ -30,9 +30,8 @@ import customVariables from "../../../../theme/variables"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { useActionOnFocus } from "../../../../utils/hooks/useOnFocus"; import { useHardwareBackButton } from "../../../../hooks/useHardwareBackButton"; -import { availableBonusTypesSelectorFromId } from "../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_CGN_TYPE } from "../../bonusVacanze/utils/bonus"; -import { isLoading } from "../../bpd/model/RemoteValue"; +import { ID_CGN_TYPE } from "../../common/utils"; +import { isLoading } from "../../../../common/model/RemoteValue"; import CgnCardComponent from "../components/detail/CgnCardComponent"; import CgnOwnershipInformation from "../components/detail/CgnOwnershipInformation"; import CgnStatusDetail from "../components/detail/CgnStatusDetail"; @@ -55,6 +54,7 @@ import { import { eycaDetailSelector } from "../store/reducers/eyca/details"; import { cgnUnsubscribeSelector } from "../store/reducers/unsubscribe"; import { canEycaCardBeShown } from "../utils/eyca"; +import { availableBonusTypesSelectorFromId } from "../../common/store/selectors"; type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/cgn/screens/activation/CgnActivationLoadingScreen.tsx b/ts/features/bonus/cgn/screens/activation/CgnActivationLoadingScreen.tsx index ac4368063df..88443bcdefc 100644 --- a/ts/features/bonus/cgn/screens/activation/CgnActivationLoadingScreen.tsx +++ b/ts/features/bonus/cgn/screens/activation/CgnActivationLoadingScreen.tsx @@ -7,7 +7,7 @@ import { cgnActivationCancel, cgnRequestActivation } from "../../store/actions/activation"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import I18n from "../../../../../i18n"; type Props = ReturnType & diff --git a/ts/features/bonus/cgn/screens/activation/CgnCTAStartActivationScreen.tsx b/ts/features/bonus/cgn/screens/activation/CgnCTAStartActivationScreen.tsx index ccfbedb8526..4b37006ccf6 100644 --- a/ts/features/bonus/cgn/screens/activation/CgnCTAStartActivationScreen.tsx +++ b/ts/features/bonus/cgn/screens/activation/CgnCTAStartActivationScreen.tsx @@ -9,14 +9,14 @@ import I18n from "../../../../../i18n"; import { isCGNEnabledSelector } from "../../../../../store/reducers/backendStatus"; import { GlobalState } from "../../../../../store/reducers/types"; import { useActionOnFocus } from "../../../../../utils/hooks/useOnFocus"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { loadAvailableBonuses } from "../../../bonusVacanze/store/actions/bonusVacanze"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { ID_CGN_TYPE } from "../../../common/utils"; +import { loadAvailableBonuses } from "../../../common/store/actions/availableBonusesTypes"; import { availableBonusTypesSelectorFromId, isAvailableBonusErrorSelector, supportedAvailableBonusSelector -} from "../../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_CGN_TYPE } from "../../../bonusVacanze/utils/bonus"; +} from "../../../common/store/selectors"; import { cgnActivationStart } from "../../store/actions/activation"; export type Props = ReturnType & diff --git a/ts/features/bonus/cgn/screens/activation/CgnInformationScreen.tsx b/ts/features/bonus/cgn/screens/activation/CgnInformationScreen.tsx index 5d4079e4781..1fcc2ddfec1 100644 --- a/ts/features/bonus/cgn/screens/activation/CgnInformationScreen.tsx +++ b/ts/features/bonus/cgn/screens/activation/CgnInformationScreen.tsx @@ -4,8 +4,7 @@ import I18n from "../../../../../i18n"; import { Dispatch } from "../../../../../store/actions/types"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { availableBonusTypesSelectorFromId } from "../../../bonusVacanze/store/reducers/availableBonusesTypes"; -import { ID_CGN_TYPE } from "../../../bonusVacanze/utils/bonus"; +import { ID_CGN_TYPE } from "../../../common/utils"; import BonusInformationComponent from "../../../common/components/BonusInformationComponent"; import { cgnActivationBack, @@ -13,6 +12,7 @@ import { cgnRequestActivation } from "../../store/actions/activation"; import { useHardwareBackButton } from "../../../../../hooks/useHardwareBackButton"; +import { availableBonusTypesSelectorFromId } from "../../../common/store/selectors"; export type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/cgn/screens/eyca/activation/EycaActivationLoading.tsx b/ts/features/bonus/cgn/screens/eyca/activation/EycaActivationLoading.tsx index 2462abbe4aa..b47e8814156 100644 --- a/ts/features/bonus/cgn/screens/eyca/activation/EycaActivationLoading.tsx +++ b/ts/features/bonus/cgn/screens/eyca/activation/EycaActivationLoading.tsx @@ -2,14 +2,14 @@ import * as React from "react"; import { connect } from "react-redux"; import { GlobalState } from "../../../../../../store/reducers/types"; import { Dispatch } from "../../../../../../store/actions/types"; -import { LoadingErrorComponent } from "../../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; import I18n from "../../../../../../i18n"; import { eycaActivationStatusSelector } from "../../../store/reducers/eyca/activation"; import { cgnEycaActivation, cgnEycaActivationCancel } from "../../../store/actions/eyca/activation"; -import { isError, isLoading } from "../../../../bpd/model/RemoteValue"; +import { isError, isLoading } from "../../../../../../common/model/RemoteValue"; type Props = ReturnType & ReturnType; diff --git a/ts/features/bonus/cgn/screens/merchants/CgnMerchantDetailScreen.tsx b/ts/features/bonus/cgn/screens/merchants/CgnMerchantDetailScreen.tsx index a1eef3803dd..d2e9d9d9483 100644 --- a/ts/features/bonus/cgn/screens/merchants/CgnMerchantDetailScreen.tsx +++ b/ts/features/bonus/cgn/screens/merchants/CgnMerchantDetailScreen.tsx @@ -27,8 +27,8 @@ import { clipboardSetStringWithFeedback } from "../../../../../utils/clipboard"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { showToast } from "../../../../../utils/showToast"; import { openWebUrl } from "../../../../../utils/url"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { isLoading, isReady } from "../../../bpd/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { isLoading, isReady } from "../../../../../common/model/RemoteValue"; import CgnMerchantDiscountItem from "../../components/merchants/CgnMerchantsDiscountItem"; import { cgnSelectedMerchant } from "../../store/actions/merchants"; import { cgnSelectedMerchantSelector } from "../../store/reducers/merchants"; diff --git a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListByCategory.tsx b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListByCategory.tsx index a5dcc55c87b..455fbe021c0 100644 --- a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListByCategory.tsx +++ b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListByCategory.tsx @@ -19,7 +19,7 @@ import { getValueOrElse, isError, isLoading -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import CgnMerchantsListView from "../../components/merchants/CgnMerchantsListView"; import { CgnDetailsParamsList } from "../../navigation/params"; import CGN_ROUTES from "../../navigation/routes"; diff --git a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListScreen.tsx b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListScreen.tsx index d370d71a08a..37ac4aae985 100644 --- a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListScreen.tsx +++ b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsListScreen.tsx @@ -15,12 +15,12 @@ import I18n from "../../../../../i18n"; import { Dispatch } from "../../../../../store/actions/types"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { getValueOrElse, isLoading, isReady -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import CgnMerchantsListView from "../../components/merchants/CgnMerchantsListView"; import { navigateToCgnMerchantDetail } from "../../navigation/actions"; import { diff --git a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsTabsScreen.tsx b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsTabsScreen.tsx index aa5c2115960..0bf3f0d44d9 100644 --- a/ts/features/bonus/cgn/screens/merchants/CgnMerchantsTabsScreen.tsx +++ b/ts/features/bonus/cgn/screens/merchants/CgnMerchantsTabsScreen.tsx @@ -21,7 +21,7 @@ import { } from "../../../../../components/ui/LightModal"; import CgnMerchantsFilters from "../../components/merchants/CgnMerchantsFilters"; import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; -import { confirmButtonProps } from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { Merchant } from "../../../../../../definitions/cgn/merchants/Merchant"; type Props = ReturnType & diff --git a/ts/features/bonus/cgn/store/reducers/__test__/otp.test.ts b/ts/features/bonus/cgn/store/reducers/__test__/otp.test.ts index 46a426b96f0..f546afc055e 100644 --- a/ts/features/bonus/cgn/store/reducers/__test__/otp.test.ts +++ b/ts/features/bonus/cgn/store/reducers/__test__/otp.test.ts @@ -5,7 +5,7 @@ import { remoteError, remoteLoading, remoteReady -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { cgnGenerateOtp } from "../../actions/otp"; import { cgnOtpDataSelector } from "../otp"; import { OtpCode } from "../../../../../../../definitions/cgn/OtpCode"; diff --git a/ts/features/bonus/cgn/store/reducers/bucket.ts b/ts/features/bonus/cgn/store/reducers/bucket.ts index b4c1a79a0c1..16777c646c4 100644 --- a/ts/features/bonus/cgn/store/reducers/bucket.ts +++ b/ts/features/bonus/cgn/store/reducers/bucket.ts @@ -8,7 +8,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { cgnCodeFromBucket, cgnCodeFromBucketReset } from "../actions/bucket"; import { DiscountBucketCodeResponse } from "../../types/DiscountBucketCodeResponse"; diff --git a/ts/features/bonus/cgn/store/reducers/eyca/activation.ts b/ts/features/bonus/cgn/store/reducers/eyca/activation.ts index 4c36c0a86b8..7d3a9522c58 100644 --- a/ts/features/bonus/cgn/store/reducers/eyca/activation.ts +++ b/ts/features/bonus/cgn/store/reducers/eyca/activation.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { NetworkError } from "../../../../../../utils/errors"; import { cgnEycaActivation, diff --git a/ts/features/bonus/cgn/store/reducers/eyca/details.ts b/ts/features/bonus/cgn/store/reducers/eyca/details.ts index 14fc0a7db00..5a4e284ffe5 100644 --- a/ts/features/bonus/cgn/store/reducers/eyca/details.ts +++ b/ts/features/bonus/cgn/store/reducers/eyca/details.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { NetworkError } from "../../../../../../utils/errors"; import { EycaCard } from "../../../../../../../definitions/cgn/EycaCard"; diff --git a/ts/features/bonus/cgn/store/reducers/merchants.ts b/ts/features/bonus/cgn/store/reducers/merchants.ts index 4cb456bc72b..8b6359020e0 100644 --- a/ts/features/bonus/cgn/store/reducers/merchants.ts +++ b/ts/features/bonus/cgn/store/reducers/merchants.ts @@ -14,7 +14,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { OnlineMerchants } from "../../../../../../definitions/cgn/merchants/OnlineMerchants"; import { OfflineMerchants } from "../../../../../../definitions/cgn/merchants/OfflineMerchants"; import { Merchant } from "../../../../../../definitions/cgn/merchants/Merchant"; diff --git a/ts/features/bonus/cgn/store/reducers/otp.ts b/ts/features/bonus/cgn/store/reducers/otp.ts index 4fa17d72880..55651f90c35 100644 --- a/ts/features/bonus/cgn/store/reducers/otp.ts +++ b/ts/features/bonus/cgn/store/reducers/otp.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; export type CgnOtpState = { data: RemoteValue; diff --git a/ts/features/bonus/cgn/store/reducers/unsubscribe.ts b/ts/features/bonus/cgn/store/reducers/unsubscribe.ts index 8431b997ce2..dac49367fea 100644 --- a/ts/features/bonus/cgn/store/reducers/unsubscribe.ts +++ b/ts/features/bonus/cgn/store/reducers/unsubscribe.ts @@ -5,7 +5,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { Action } from "../../../../../store/actions/types"; import { NetworkError } from "../../../../../utils/errors"; import { cgnUnsubscribe } from "../actions/unsubscribe"; diff --git a/ts/features/bonus/cgn/utils/eyca.ts b/ts/features/bonus/cgn/utils/eyca.ts index 4c636306ad5..0e16064fe60 100644 --- a/ts/features/bonus/cgn/utils/eyca.ts +++ b/ts/features/bonus/cgn/utils/eyca.ts @@ -2,7 +2,7 @@ import { EycaDetailsState, EycaDetailStatus } from "../store/reducers/eyca/details"; -import { isLoading, isReady } from "../../bpd/model/RemoteValue"; +import { isLoading, isReady } from "../../../../common/model/RemoteValue"; // return true if the EYCA details component can be shown export const canEycaCardBeShown = (card: EycaDetailsState): boolean => { diff --git a/ts/features/bonus/common/BaseTimeoutScreen.tsx b/ts/features/bonus/common/BaseTimeoutScreen.tsx index cdf77b8fa7d..c6cdc7c0fcc 100644 --- a/ts/features/bonus/common/BaseTimeoutScreen.tsx +++ b/ts/features/bonus/common/BaseTimeoutScreen.tsx @@ -5,8 +5,8 @@ import { IOStyles } from "../../../components/core/variables/IOStyles"; import { renderInfoRasterImage } from "../../../components/infoScreen/imageRendering"; import { InfoScreenComponent } from "../../../components/infoScreen/InfoScreenComponent"; import I18n from "../../../i18n"; -import { cancelButtonProps } from "../bonusVacanze/components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../bonusVacanze/components/buttons/FooterStackButtons"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../components/buttons/FooterStackButtons"; type Props = { title: string; diff --git a/ts/features/bonus/common/store/actions/availableBonusesTypes.ts b/ts/features/bonus/common/store/actions/availableBonusesTypes.ts new file mode 100644 index 00000000000..a75352a5f40 --- /dev/null +++ b/ts/features/bonus/common/store/actions/availableBonusesTypes.ts @@ -0,0 +1,13 @@ +import { ActionType, createAsyncAction } from "typesafe-actions"; +import { BonusesAvailable } from "../../../../../../definitions/content/BonusesAvailable"; + +/** + * Request the list of all the types of bonus + */ +export const loadAvailableBonuses = createAsyncAction( + "BONUSES_AVAILABLE_REQUEST", + "BONUSES_AVAILABLE_SUCCESS", + "BONUSES_AVAILABLE_FAILURE" +)(); + +export type AvailableBonusesActions = ActionType; diff --git a/ts/features/bonus/common/store/actions/index.ts b/ts/features/bonus/common/store/actions/index.ts new file mode 100644 index 00000000000..6335f55200b --- /dev/null +++ b/ts/features/bonus/common/store/actions/index.ts @@ -0,0 +1,14 @@ +import { BonusVacanzeActions } from "../../../bonusVacanze/store/actions/bonusVacanze"; +import { BpdActions } from "../../../bpd/store/actions"; +import { CdcActions } from "../../../cdc/store/actions"; +import { CgnActions } from "../../../cgn/store/actions"; +import { SvActions } from "../../../siciliaVola/store/actions"; +import { AvailableBonusesActions } from "./availableBonusesTypes"; + +export type BonusActions = + | AvailableBonusesActions + | BonusVacanzeActions + | BpdActions + | CgnActions + | SvActions + | CdcActions; diff --git a/ts/features/bonus/bonusVacanze/store/reducers/__tests__/availableBonusesTypes.test.ts b/ts/features/bonus/common/store/reducers/__tests__/availableBonusesTypes.test.ts similarity index 97% rename from ts/features/bonus/bonusVacanze/store/reducers/__tests__/availableBonusesTypes.test.ts rename to ts/features/bonus/common/store/reducers/__tests__/availableBonusesTypes.test.ts index 3d769a70d9f..1465467d2b9 100644 --- a/ts/features/bonus/bonusVacanze/store/reducers/__tests__/availableBonusesTypes.test.ts +++ b/ts/features/bonus/common/store/reducers/__tests__/availableBonusesTypes.test.ts @@ -1,24 +1,25 @@ import * as pot from "@pagopa/ts-commons/lib/pot"; -import { - AvailableBonusTypesState, - isAvailableBonusErrorSelector, - isAvailableBonusLoadingSelector, - isAvailableBonusNoneErrorSelector, - supportedAvailableBonusSelector -} from "../availableBonusesTypes"; + import { availableBonuses, contentBonusVacanzeIT -} from "../../../__mock__/availableBonuses"; +} from "../../../../__mock__/availableBonuses"; import { BonusesAvailable } from "../../../../../../../definitions/content/BonusesAvailable"; import { BonusVisibilityEnum } from "../../../../../../../definitions/content/BonusVisibility"; import { ID_BONUS_VACANZE_TYPE, ID_BPD_TYPE, ID_CGN_TYPE -} from "../../../utils/bonus"; +} from "../../../../common/utils"; import { BonusAvailable } from "../../../../../../../definitions/content/BonusAvailable"; -import * as bonus from "../../../utils/bonus"; +import * as bonus from "../../../utils"; +import { + isAvailableBonusErrorSelector, + isAvailableBonusLoadingSelector, + isAvailableBonusNoneErrorSelector, + supportedAvailableBonusSelector +} from "../../selectors"; +import { AvailableBonusTypesState } from "../availableBonusesTypes"; const bonusMockContent = { name: "Bonus Vacanze", diff --git a/ts/features/bonus/common/store/reducers/availableBonusesTypes.ts b/ts/features/bonus/common/store/reducers/availableBonusesTypes.ts new file mode 100644 index 00000000000..490185f3bc7 --- /dev/null +++ b/ts/features/bonus/common/store/reducers/availableBonusesTypes.ts @@ -0,0 +1,30 @@ +import * as pot from "@pagopa/ts-commons/lib/pot"; +import { getType } from "typesafe-actions"; +import { BonusesAvailable } from "../../../../../../definitions/content/BonusesAvailable"; +import { clearCache } from "../../../../../store/actions/profile"; +import { Action } from "../../../../../store/actions/types"; +import { loadAvailableBonuses } from "../actions/availableBonusesTypes"; + +export type AvailableBonusTypesState = pot.Pot; + +const INITIAL_STATE: AvailableBonusTypesState = pot.none; + +const reducer = ( + state: AvailableBonusTypesState = INITIAL_STATE, + action: Action +): AvailableBonusTypesState => { + switch (action.type) { + // available bonuses + case getType(loadAvailableBonuses.request): + return pot.toLoading(state); + case getType(loadAvailableBonuses.success): + return pot.some(action.payload); + case getType(loadAvailableBonuses.failure): + return pot.toError(state, action.payload); + case getType(clearCache): + return INITIAL_STATE; + } + return state; +}; + +export default reducer; diff --git a/ts/features/bonus/common/store/reducers/index.ts b/ts/features/bonus/common/store/reducers/index.ts new file mode 100644 index 00000000000..25dc4212471 --- /dev/null +++ b/ts/features/bonus/common/store/reducers/index.ts @@ -0,0 +1,32 @@ +import { combineReducers } from "redux"; +import { Action } from "../../../../../store/actions/types"; +import bonusVacanzeReducer, { + BonusVacanzeState +} from "../../../bonusVacanze/store/reducers"; +import bpdReducer, { BpdState } from "../../../bpd/store/reducers"; +import cdcReducer, { CdcState } from "../../../cdc/store/reducers"; +import cgnReducer, { CgnState } from "../../../cgn/store/reducers"; +import svReducer, { SvState } from "../../../siciliaVola/store/reducers"; +import availableBonusesReducer, { + AvailableBonusTypesState +} from "./availableBonusesTypes"; + +export type BonusState = Readonly<{ + availableBonusTypes: AvailableBonusTypesState; + bonusVacanze: BonusVacanzeState; + bpd: BpdState; + cgn: CgnState; + sv: SvState; + cdc: CdcState; +}>; + +const bonusReducer = combineReducers({ + availableBonusTypes: availableBonusesReducer, + bonusVacanze: bonusVacanzeReducer, + bpd: bpdReducer, + cgn: cgnReducer, + sv: svReducer, + cdc: cdcReducer +}); + +export default bonusReducer; diff --git a/ts/features/bonus/bonusVacanze/store/reducers/availableBonusesTypes.ts b/ts/features/bonus/common/store/selectors/index.ts similarity index 81% rename from ts/features/bonus/bonusVacanze/store/reducers/availableBonusesTypes.ts rename to ts/features/bonus/common/store/selectors/index.ts index a87f36e3c76..77fa9008037 100644 --- a/ts/features/bonus/bonusVacanze/store/reducers/availableBonusesTypes.ts +++ b/ts/features/bonus/common/store/selectors/index.ts @@ -1,45 +1,20 @@ +import * as pot from "@pagopa/ts-commons/lib/pot"; import * as O from "fp-ts/lib/Option"; import { pipe } from "fp-ts/lib/function"; -import * as pot from "@pagopa/ts-commons/lib/pot"; import { createSelector } from "reselect"; -import { getType } from "typesafe-actions"; import { BonusAvailable } from "../../../../../../definitions/content/BonusAvailable"; import { BonusesAvailable } from "../../../../../../definitions/content/BonusesAvailable"; -import { clearCache } from "../../../../../store/actions/profile"; -import { Action } from "../../../../../store/actions/types"; import { GlobalState } from "../../../../../store/reducers/types"; + +import { ServicePublic } from "../../../../../../definitions/backend/ServicePublic"; +import { BonusVisibilityEnum } from "../../../../../../definitions/content/BonusVisibility"; +import { servicesByIdSelector } from "../../../../../store/reducers/entities/services/servicesById"; import { ID_BONUS_VACANZE_TYPE, ID_BPD_TYPE, mapBonusIdFeatureFlag -} from "../../utils/bonus"; -import { loadAvailableBonuses } from "../actions/bonusVacanze"; - -import { BonusVisibilityEnum } from "../../../../../../definitions/content/BonusVisibility"; -import { servicesByIdSelector } from "../../../../../store/reducers/entities/services/servicesById"; -import { ServicePublic } from "../../../../../../definitions/backend/ServicePublic"; - -export type AvailableBonusTypesState = pot.Pot; - -const INITIAL_STATE: AvailableBonusTypesState = pot.none; - -const reducer = ( - state: AvailableBonusTypesState = INITIAL_STATE, - action: Action -): AvailableBonusTypesState => { - switch (action.type) { - // available bonuses - case getType(loadAvailableBonuses.request): - return pot.toLoading(state); - case getType(loadAvailableBonuses.success): - return pot.some(action.payload); - case getType(loadAvailableBonuses.failure): - return pot.toError(state, action.payload); - case getType(clearCache): - return INITIAL_STATE; - } - return state; -}; +} from "../../utils"; +import { AvailableBonusTypesState } from "../reducers/availableBonusesTypes"; /** * return all available bonus: visibile, hidden or experimental @@ -144,5 +119,3 @@ export const bonusVacanzeLogo = createSelector( ) ) ); - -export default reducer; diff --git a/ts/features/bonus/common/utils/index.ts b/ts/features/bonus/common/utils/index.ts new file mode 100644 index 00000000000..e9203e5cde6 --- /dev/null +++ b/ts/features/bonus/common/utils/index.ts @@ -0,0 +1,23 @@ +import { + bonusVacanzeEnabled, + bpdEnabled, + cdcEnabled +} from "../../../../config"; + +export const ID_BONUS_VACANZE_TYPE = 1; +export const ID_BPD_TYPE = 2; +export const ID_CGN_TYPE = 3; +export const ID_CDC_TYPE = 4; + +/** + * Return a Map with the bonus ID as a key and + * a bool representing the relative feature flag + * status as a value. + */ +export const mapBonusIdFeatureFlag = () => + new Map([ + [ID_BONUS_VACANZE_TYPE, bonusVacanzeEnabled], + [ID_BPD_TYPE, bpdEnabled], + [ID_CGN_TYPE, true], + [ID_CDC_TYPE, cdcEnabled] + ]); diff --git a/ts/features/bonus/siciliaVola/components/AcceptTosComponent.tsx b/ts/features/bonus/siciliaVola/components/AcceptTosComponent.tsx index fccfc25f3ab..9d4737d4cd2 100644 --- a/ts/features/bonus/siciliaVola/components/AcceptTosComponent.tsx +++ b/ts/features/bonus/siciliaVola/components/AcceptTosComponent.tsx @@ -6,7 +6,7 @@ import BaseScreenComponent from "../../../../components/screens/BaseScreenCompon import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; import I18n from "../../../../i18n"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; -import { LoadingErrorComponent } from "../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../components/LoadingErrorComponent"; type Props = { onCancel: () => void; diff --git a/ts/features/bonus/siciliaVola/components/SvVoucherListFilters.tsx b/ts/features/bonus/siciliaVola/components/SvVoucherListFilters.tsx index 5dc1d6d7617..bac26f0a022 100644 --- a/ts/features/bonus/siciliaVola/components/SvVoucherListFilters.tsx +++ b/ts/features/bonus/siciliaVola/components/SvVoucherListFilters.tsx @@ -16,12 +16,12 @@ import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps -} from "../../bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import { LabelledItem } from "../../../../components/LabelledItem"; import DateTimePicker from "../../../../components/ui/DateTimePicker"; import { GlobalState } from "../../../../store/reducers/types"; import { possibleVoucherStateSelector } from "../store/reducers/voucherList/possibleVoucherState"; -import { isReady } from "../../bpd/model/RemoteValue"; +import { isReady } from "../../../../common/model/RemoteValue"; import { StatoVoucherBean } from "../../../../../definitions/api_sicilia_vola/StatoVoucherBean"; import { H4 } from "../../../../components/core/typography/H4"; import { svSetFilter } from "../store/actions/voucherList"; diff --git a/ts/features/bonus/siciliaVola/components/VoucherDetailBottomsheet.tsx b/ts/features/bonus/siciliaVola/components/VoucherDetailBottomsheet.tsx index ba8b0a9d931..6bc0dd13ef0 100644 --- a/ts/features/bonus/siciliaVola/components/VoucherDetailBottomsheet.tsx +++ b/ts/features/bonus/siciliaVola/components/VoucherDetailBottomsheet.tsx @@ -2,7 +2,7 @@ import React from "react"; import { View } from "react-native"; import { VSpacer } from "@pagopa/io-app-design-system"; import { NetworkError } from "../../../../utils/errors"; -import { RemoteValue } from "../../bpd/model/RemoteValue"; +import { RemoteValue } from "../../../../common/model/RemoteValue"; import VoucherInformationComponent from "./VoucherInformationComponent"; type Props = { diff --git a/ts/features/bonus/siciliaVola/components/WrappedMunicipalityFlatList.tsx b/ts/features/bonus/siciliaVola/components/WrappedMunicipalityFlatList.tsx index 14b56da8452..df304df66d7 100644 --- a/ts/features/bonus/siciliaVola/components/WrappedMunicipalityFlatList.tsx +++ b/ts/features/bonus/siciliaVola/components/WrappedMunicipalityFlatList.tsx @@ -7,7 +7,11 @@ import { useContext } from "react"; import { VSpacer } from "@pagopa/io-app-design-system"; import { GlobalState } from "../../../../store/reducers/types"; import { availableMunicipalitiesSelector } from "../store/reducers/voucherGeneration/availableMunicipalities"; -import { isError, isLoading, isReady } from "../../bpd/model/RemoteValue"; +import { + isError, + isLoading, + isReady +} from "../../../../common/model/RemoteValue"; import { toArray } from "../../../../store/helpers/indexer"; import { H4 } from "../../../../components/core/typography/H4"; import { Municipality } from "../types/SvVoucherRequest"; diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/CheckStatusRouterScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/CheckStatusRouterScreen.tsx index 891f8612ef9..bdf13fd8cf1 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/CheckStatusRouterScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/CheckStatusRouterScreen.tsx @@ -15,8 +15,12 @@ import { } from "../../store/reducers/activation"; import GenericErrorComponent from "../../../../../components/screens/GenericErrorComponent"; import { svServiceAlive, svTosAccepted } from "../../store/actions/activation"; -import { fold, isLoading, isReady } from "../../../bpd/model/RemoteValue"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { + fold, + isLoading, + isReady +} from "../../../../../common/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import AcceptTosComponent from "../../components/AcceptTosComponent"; import CheckResidenceComponent from "../../components/CheckResidenceComponent"; import I18n from "../../../../../i18n"; diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/SummaryScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/SummaryScreen.tsx index c6cc0f8a023..ceddac3dddc 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/SummaryScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/SummaryScreen.tsx @@ -18,8 +18,8 @@ import { GlobalState } from "../../../../../store/reducers/types"; import { formatDateAsLocal } from "../../../../../utils/dates"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { openWebUrl } from "../../../../../utils/url"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { isLoading, isReady } from "../../../bpd/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { isLoading, isReady } from "../../../../../common/model/RemoteValue"; import SV_ROUTES from "../../navigation/routes"; import { svGenerateVoucherAvailableDestination, diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/VoucherGeneratedScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/VoucherGeneratedScreen.tsx index 070340348b0..50b469d05b3 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/VoucherGeneratedScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/VoucherGeneratedScreen.tsx @@ -16,8 +16,12 @@ import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { showToast } from "../../../../../utils/showToast"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { fold, isLoading, isReady } from "../../../bpd/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { + fold, + isLoading, + isReady +} from "../../../../../common/model/RemoteValue"; import VoucherInformationComponent from "../../components/VoucherInformationComponent"; import { svGenerateVoucherBack, diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckIncomeKoScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckIncomeKoScreen.tsx index bf0ecd1948f..8d243ea20cd 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckIncomeKoScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckIncomeKoScreen.tsx @@ -7,7 +7,7 @@ import { renderInfoRasterImage } from "../../../../../../components/infoScreen/i import image from "../../../../../../../img/servicesStatus/error-detail-icon.png"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { cancelButtonProps } from "../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../components/buttons/ButtonConfigurations"; import FooterWithButtons from "../../../../../../components/ui/FooterWithButtons"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; import { svGenerateVoucherCancel } from "../../../store/actions/voucherGeneration"; diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckResidenceKoScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckResidenceKoScreen.tsx index 20ff0eb37a0..217917febef 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckResidenceKoScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvCheckResidenceKoScreen.tsx @@ -8,7 +8,7 @@ import image from "../../../../../../../img/servicesStatus/error-detail-icon.png import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; -import { cancelButtonProps } from "../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../components/buttons/ButtonConfigurations"; import FooterWithButtons from "../../../../../../components/ui/FooterWithButtons"; import { svGenerateVoucherCancel } from "../../../store/actions/voucherGeneration"; diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvGeneratedVoucherTimeoutScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvGeneratedVoucherTimeoutScreen.tsx index 304f2ffd819..bd219d3f797 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvGeneratedVoucherTimeoutScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvGeneratedVoucherTimeoutScreen.tsx @@ -8,7 +8,7 @@ import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { svGenerateVoucherCancel } from "../../../store/actions/voucherGeneration"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; -import { cancelButtonProps } from "../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../components/buttons/ButtonConfigurations"; import FooterWithButtons from "../../../../../../components/ui/FooterWithButtons"; type Props = ReturnType & diff --git a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvSelectBeneficiaryCategoryKoScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvSelectBeneficiaryCategoryKoScreen.tsx index edc426c0ec3..80baa321ae8 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvSelectBeneficiaryCategoryKoScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherGeneration/ko/SvSelectBeneficiaryCategoryKoScreen.tsx @@ -8,7 +8,7 @@ import image from "../../../../../../../img/servicesStatus/error-detail-icon.png import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; -import { cancelButtonProps } from "../../../../bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../components/buttons/ButtonConfigurations"; import FooterWithButtons from "../../../../../../components/ui/FooterWithButtons"; import { svGenerateVoucherCancel } from "../../../store/actions/voucherGeneration"; diff --git a/ts/features/bonus/siciliaVola/screens/voucherList/VoucherDetailsScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherList/VoucherDetailsScreen.tsx index 683499c324e..6947738d735 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherList/VoucherDetailsScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherList/VoucherDetailsScreen.tsx @@ -26,13 +26,13 @@ import { formatDateAsLocal } from "../../../../../utils/dates"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { useLegacyIOBottomSheetModal } from "../../../../../utils/hooks/bottomSheet"; import { showToast } from "../../../../../utils/showToast"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { fold, isError, isLoading, isReady -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import VoucherDetailBottomSheet from "../../components/VoucherDetailBottomsheet"; import { svGetPdfVoucher } from "../../store/actions/voucherGeneration"; import { diff --git a/ts/features/bonus/siciliaVola/screens/voucherList/VoucherListScreen.tsx b/ts/features/bonus/siciliaVola/screens/voucherList/VoucherListScreen.tsx index f1e968ba3bb..a103ce639b6 100644 --- a/ts/features/bonus/siciliaVola/screens/voucherList/VoucherListScreen.tsx +++ b/ts/features/bonus/siciliaVola/screens/voucherList/VoucherListScreen.tsx @@ -24,14 +24,14 @@ import { GlobalState } from "../../../../../store/reducers/types"; import { formatDateAsLocal } from "../../../../../utils/dates"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { showToast } from "../../../../../utils/showToast"; -import { confirmButtonProps } from "../../../bonusVacanze/components/buttons/ButtonConfigurations"; -import { LoadingErrorComponent } from "../../../bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { isError, isLoading, isReady, isUndefined -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import SvVoucherListFilters from "../../components/SvVoucherListFilters"; import SV_ROUTES from "../../navigation/routes"; import { svGenerateVoucherStart } from "../../store/actions/voucherGeneration"; diff --git a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableDestinations.test.ts b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableDestinations.test.ts index 0c0166decce..454e21df92e 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableDestinations.test.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableDestinations.test.ts @@ -12,7 +12,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; const genericError = getTimeoutError(); const mockDestination = { stato: "1", latitudine: 1, longitudine: 1 }; diff --git a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableMunicipalities.test.ts b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableMunicipalities.test.ts index f1f1725f322..71f52453de2 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableMunicipalities.test.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableMunicipalities.test.ts @@ -13,7 +13,7 @@ import { remoteError, remoteReady, remoteUndefined -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; const genericError = getTimeoutError(); diff --git a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableStates.test.ts b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableStates.test.ts index ec8efa1f3a2..ab09d91577a 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/__test__/availableStates.test.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/__test__/availableStates.test.ts @@ -13,7 +13,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; const genericError = getTimeoutError(); diff --git a/ts/features/bonus/siciliaVola/store/reducers/__test__/voucherGenerated.test.ts b/ts/features/bonus/siciliaVola/store/reducers/__test__/voucherGenerated.test.ts index fa4b93bd805..5f1975ea465 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/__test__/voucherGenerated.test.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/__test__/voucherGenerated.test.ts @@ -14,7 +14,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; const genericError = getTimeoutError(); const mockVoucherRequest: VoucherRequest = { diff --git a/ts/features/bonus/siciliaVola/store/reducers/activation.ts b/ts/features/bonus/siciliaVola/store/reducers/activation.ts index 328e989b488..b8bf73413fb 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/activation.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/activation.ts @@ -14,7 +14,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; export type ActivationState = { isAlive: RemoteValue; diff --git a/ts/features/bonus/siciliaVola/store/reducers/selectedVoucher.ts b/ts/features/bonus/siciliaVola/store/reducers/selectedVoucher.ts index 540f6f5f59b..630112c13e1 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/selectedVoucher.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/selectedVoucher.ts @@ -18,7 +18,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { GlobalState } from "../../../../../store/reducers/types"; export type SelectedVoucherState = { diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableDestinations.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableDestinations.ts index 8ef95784824..ecd3774f9db 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableDestinations.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableDestinations.ts @@ -14,7 +14,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; export type AvailableDestinationsState = RemoteValue< AvailableDestinations, diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableMunicipalities.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableMunicipalities.ts index 0c59d3426fb..9b403cb27ed 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableMunicipalities.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableMunicipalities.ts @@ -20,7 +20,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; export type AvailableMunicipalitiesState = RemoteValue< IndexedById, diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableStates.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableStates.ts index 23a875d4d6c..07f12acc776 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableStates.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/availableStates.ts @@ -18,7 +18,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; export type AvailableStatesState = RemoteValue< IndexedById, diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/voucherGenerated.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/voucherGenerated.ts index c1fa3c92d6e..739e3d67bd2 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/voucherGenerated.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherGeneration/voucherGenerated.ts @@ -13,7 +13,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { GlobalState } from "../../../../../../store/reducers/types"; export type VoucherGeneratedState = RemoteValue< diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherList/possibleVoucherState.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherList/possibleVoucherState.ts index b71d6edc128..e1ce116e7c8 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherList/possibleVoucherState.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherList/possibleVoucherState.ts @@ -8,7 +8,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { GlobalState } from "../../../../../../store/reducers/types"; import { StatoVoucherBeanList } from "../../../../../../../definitions/api_sicilia_vola/StatoVoucherBeanList"; import { NetworkError } from "../../../../../../utils/errors"; diff --git a/ts/features/bonus/siciliaVola/store/reducers/voucherList/ui.ts b/ts/features/bonus/siciliaVola/store/reducers/voucherList/ui.ts index b84eff8dab1..4dffb55e583 100644 --- a/ts/features/bonus/siciliaVola/store/reducers/voucherList/ui.ts +++ b/ts/features/bonus/siciliaVola/store/reducers/voucherList/ui.ts @@ -12,7 +12,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { svGenerateVoucherCompleted } from "../../actions/voucherGeneration"; import { NetworkError } from "../../../../../../utils/errors"; import { GlobalState } from "../../../../../../store/reducers/types"; diff --git a/ts/features/euCovidCert/screens/ko/EuCovidCertGenericErrorKoScreen.tsx b/ts/features/euCovidCert/screens/ko/EuCovidCertGenericErrorKoScreen.tsx index 90d5334c4c1..36947a43c98 100644 --- a/ts/features/euCovidCert/screens/ko/EuCovidCertGenericErrorKoScreen.tsx +++ b/ts/features/euCovidCert/screens/ko/EuCovidCertGenericErrorKoScreen.tsx @@ -11,7 +11,7 @@ import { InfoScreenComponent } from "../../../../components/infoScreen/InfoScree import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; import I18n from "../../../../i18n"; import { GlobalState } from "../../../../store/reducers/types"; -import { confirmButtonProps } from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { euCovidCertificateGet } from "../../store/actions"; import { EUCovidCertificateAuthCode } from "../../types/EUCovidCertificate"; import { BaseEuCovidCertificateLayout } from "../BaseEuCovidCertificateLayout"; diff --git a/ts/features/euCovidCert/screens/ko/EuCovidCertNotFoundKoScreen.tsx b/ts/features/euCovidCert/screens/ko/EuCovidCertNotFoundKoScreen.tsx index ce49d7aea7f..df08e2ce3c2 100644 --- a/ts/features/euCovidCert/screens/ko/EuCovidCertNotFoundKoScreen.tsx +++ b/ts/features/euCovidCert/screens/ko/EuCovidCertNotFoundKoScreen.tsx @@ -15,7 +15,7 @@ import { mixpanelTrack } from "../../../../mixpanel"; import { GlobalState } from "../../../../store/reducers/types"; import { euCovidCertificateUrl } from "../../../../urls"; import { openWebUrl } from "../../../../utils/url"; -import { confirmButtonProps } from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { EUCovidCertificateAuthCode } from "../../types/EUCovidCertificate"; import { BaseEuCovidCertificateLayout } from "../BaseEuCovidCertificateLayout"; import { EUCovidContext } from "../EuCovidCertificateRouterScreen"; diff --git a/ts/features/euCovidCert/screens/ko/EuCovidCertWrongFormatKoScreen.tsx b/ts/features/euCovidCert/screens/ko/EuCovidCertWrongFormatKoScreen.tsx index 121d977dd4b..0ff2a09c8ac 100644 --- a/ts/features/euCovidCert/screens/ko/EuCovidCertWrongFormatKoScreen.tsx +++ b/ts/features/euCovidCert/screens/ko/EuCovidCertWrongFormatKoScreen.tsx @@ -15,7 +15,7 @@ import { mixpanelTrack } from "../../../../mixpanel"; import { GlobalState } from "../../../../store/reducers/types"; import { euCovidCertificateUrl } from "../../../../urls"; import { openWebUrl } from "../../../../utils/url"; -import { confirmButtonProps } from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { EUCovidCertificateAuthCode } from "../../types/EUCovidCertificate"; import { BaseEuCovidCertificateLayout } from "../BaseEuCovidCertificateLayout"; import { EUCovidContext } from "../EuCovidCertificateRouterScreen"; diff --git a/ts/features/euCovidCert/screens/valid/EuCovidCertMarkdownDetailsScreen.tsx b/ts/features/euCovidCert/screens/valid/EuCovidCertMarkdownDetailsScreen.tsx index 62b3077fdc5..2aafbab0ea1 100644 --- a/ts/features/euCovidCert/screens/valid/EuCovidCertMarkdownDetailsScreen.tsx +++ b/ts/features/euCovidCert/screens/valid/EuCovidCertMarkdownDetailsScreen.tsx @@ -12,7 +12,7 @@ import { mixpanelTrack } from "../../../../mixpanel"; import { IOStackNavigationRouteProps } from "../../../../navigation/params/AppParamsList"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { showToast } from "../../../../utils/showToast"; -import { cancelButtonProps } from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { FlashAnimatedComponent, FlashAnimationState diff --git a/ts/features/euCovidCert/screens/valid/EuCovidCertQrCodeFullScreen.tsx b/ts/features/euCovidCert/screens/valid/EuCovidCertQrCodeFullScreen.tsx index 4da6eb3c1af..056db88d3f1 100644 --- a/ts/features/euCovidCert/screens/valid/EuCovidCertQrCodeFullScreen.tsx +++ b/ts/features/euCovidCert/screens/valid/EuCovidCertQrCodeFullScreen.tsx @@ -14,7 +14,7 @@ import I18n from "../../../../i18n"; import { IOStackNavigationRouteProps } from "../../../../navigation/params/AppParamsList"; import { useMaxBrightness } from "../../../../utils/brightness"; import { withBase64Uri } from "../../../../utils/image"; -import { cancelButtonProps } from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../components/buttons/ButtonConfigurations"; import { EUCovidCertParamsList } from "../../navigation/params"; export type EuCovidCertQrCodeFullScreenNavigationParams = Readonly<{ diff --git a/ts/features/euCovidCert/screens/valid/EuCovidCertValidScreen.tsx b/ts/features/euCovidCert/screens/valid/EuCovidCertValidScreen.tsx index c45cd1402bf..5ecd35dce98 100644 --- a/ts/features/euCovidCert/screens/valid/EuCovidCertValidScreen.tsx +++ b/ts/features/euCovidCert/screens/valid/EuCovidCertValidScreen.tsx @@ -27,7 +27,7 @@ import { showToast } from "../../../../utils/showToast"; import { cancelButtonProps, confirmButtonProps -} from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import { FlashAnimatedComponent, FlashAnimationState diff --git a/ts/features/fci/components/DocumentViewer.tsx b/ts/features/fci/components/DocumentViewer.tsx index a21d48ca1fb..14b23cdf843 100644 --- a/ts/features/fci/components/DocumentViewer.tsx +++ b/ts/features/fci/components/DocumentViewer.tsx @@ -11,7 +11,7 @@ import I18n from "../../../i18n"; import { isIos } from "../../../utils/platform"; import { share } from "../../../utils/share"; import { showToast } from "../../../utils/showToast"; -import { confirmButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { FciDownloadPreviewDirectoryPath } from "../saga/networking/handleDownloadDocument"; import { useIODispatch, useIOSelector } from "../../../store/hooks"; import { fciDownloadPreview } from "../store/actions"; @@ -19,7 +19,7 @@ import { fciDownloadPathSelector, fciDownloadPreviewSelector } from "../store/reducers/fciDownloadPreview"; -import { LoadingErrorComponent } from "../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../components/LoadingErrorComponent"; const styles = StyleSheet.create({ pdf: { diff --git a/ts/features/fci/components/ErrorComponent.tsx b/ts/features/fci/components/ErrorComponent.tsx index 0cb3f7072b1..b73a2f6f181 100644 --- a/ts/features/fci/components/ErrorComponent.tsx +++ b/ts/features/fci/components/ErrorComponent.tsx @@ -6,7 +6,7 @@ import I18n from "../../../i18n"; import { IOStyles } from "../../../components/core/variables/IOStyles"; import BaseScreenComponent from "../../../components/screens/BaseScreenComponent"; import { WithTestID } from "../../../types/WithTestID"; -import { FooterStackButton } from "../../bonus/bonusVacanze/components/buttons/FooterStackButtons"; +import { FooterStackButton } from "../../../components/buttons/FooterStackButtons"; import { addTicketCustomField, assistanceToolRemoteConfig, diff --git a/ts/features/fci/hooks/useFciAbortSignatureFlow.tsx b/ts/features/fci/hooks/useFciAbortSignatureFlow.tsx index 0aed275f058..879be9d8417 100644 --- a/ts/features/fci/hooks/useFciAbortSignatureFlow.tsx +++ b/ts/features/fci/hooks/useFciAbortSignatureFlow.tsx @@ -7,7 +7,7 @@ import { H3 } from "../../../components/core/typography/H3"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import I18n from "../../../i18n"; import customVariables from "../../../theme/variables"; -import { errorButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { errorButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { fciEndRequest } from "../store/actions"; import { useIODispatch, useIOSelector } from "../../../store/hooks"; import { trackFciUserExit } from "../analytics"; diff --git a/ts/features/fci/hooks/useFciCheckService.tsx b/ts/features/fci/hooks/useFciCheckService.tsx index 739c82e0ce1..0a17fab5a47 100644 --- a/ts/features/fci/hooks/useFciCheckService.tsx +++ b/ts/features/fci/hooks/useFciCheckService.tsx @@ -7,7 +7,7 @@ import { H3 } from "../../../components/core/typography/H3"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import I18n from "../../../i18n"; import customVariables from "../../../theme/variables"; -import { confirmButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { H4 } from "../../../components/core/typography/H4"; import { useIODispatch, useIOSelector } from "../../../store/hooks"; import { fciStartSigningRequest } from "../store/actions"; diff --git a/ts/features/fci/hooks/useFciNoSignatureFields.tsx b/ts/features/fci/hooks/useFciNoSignatureFields.tsx index 5d58e50e625..50081e4afe8 100644 --- a/ts/features/fci/hooks/useFciNoSignatureFields.tsx +++ b/ts/features/fci/hooks/useFciNoSignatureFields.tsx @@ -8,7 +8,7 @@ import { H3 } from "../../../components/core/typography/H3"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import I18n from "../../../i18n"; import customVariables from "../../../theme/variables"; -import { confirmButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { H4 } from "../../../components/core/typography/H4"; import { FCI_ROUTES } from "../navigation/routes"; import { fciSignatureDetailDocumentsSelector } from "../store/reducers/fciSignatureRequest"; diff --git a/ts/features/fci/screens/FciRouterScreen.tsx b/ts/features/fci/screens/FciRouterScreen.tsx index 7ce71d0f8f3..9d9bc6eadd8 100644 --- a/ts/features/fci/screens/FciRouterScreen.tsx +++ b/ts/features/fci/screens/FciRouterScreen.tsx @@ -11,7 +11,7 @@ import { useIODispatch, useIOSelector } from "../../../store/hooks"; import { FciParamsList } from "../navigation/params"; import { fciEndRequest, fciSignatureRequestFromId } from "../store/actions"; import { fciSignatureRequestSelector } from "../store/reducers/fciSignatureRequest"; -import { LoadingErrorComponent } from "../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../components/LoadingErrorComponent"; import SuccessComponent from "../components/SuccessComponent"; import GenericErrorComponent from "../components/GenericErrorComponent"; import { withValidatedEmail } from "../../../components/helpers/withValidatedEmail"; diff --git a/ts/features/fci/screens/valid/FciDataSharingScreen.tsx b/ts/features/fci/screens/valid/FciDataSharingScreen.tsx index c13757c7a8f..f11197eb123 100644 --- a/ts/features/fci/screens/valid/FciDataSharingScreen.tsx +++ b/ts/features/fci/screens/valid/FciDataSharingScreen.tsx @@ -24,7 +24,7 @@ import { capitalize } from "../../../../utils/strings"; import { cancelButtonProps, confirmButtonProps -} from "../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import { useFciAbortSignatureFlow } from "../../hooks/useFciAbortSignatureFlow"; import ROUTES from "../../../../navigation/routes"; import { IOStyles } from "../../../../components/core/variables/IOStyles"; diff --git a/ts/features/fci/screens/valid/FciQtspClausesScreen.tsx b/ts/features/fci/screens/valid/FciQtspClausesScreen.tsx index 222b936cd16..2e4b72be5f0 100644 --- a/ts/features/fci/screens/valid/FciQtspClausesScreen.tsx +++ b/ts/features/fci/screens/valid/FciQtspClausesScreen.tsx @@ -22,7 +22,7 @@ import QtspClauseListItem from "../../components/QtspClauseListItem"; import { FCI_ROUTES } from "../../navigation/routes"; import { useIODispatch } from "../../../../store/hooks"; import { fciEndRequest, fciStartSigningRequest } from "../../store/actions"; -import { LoadingErrorComponent } from "../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../components/LoadingErrorComponent"; import { fciPollFilledDocumentErrorSelector, fciPollFilledDocumentReadySelector diff --git a/ts/features/fci/screens/valid/FciThankyouScreen.tsx b/ts/features/fci/screens/valid/FciThankyouScreen.tsx index 0b7b8f573d8..5773969ffbb 100644 --- a/ts/features/fci/screens/valid/FciThankyouScreen.tsx +++ b/ts/features/fci/screens/valid/FciThankyouScreen.tsx @@ -4,7 +4,7 @@ import * as pot from "@pagopa/ts-commons/lib/pot"; import { constNull } from "fp-ts/lib/function"; import BaseScreenComponent from "../../../../components/screens/BaseScreenComponent"; import { useIODispatch, useIOSelector } from "../../../../store/hooks"; -import { LoadingErrorComponent } from "../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../components/LoadingErrorComponent"; import { fciSignatureSelector } from "../../store/reducers/fciSignature"; import GenericErrorComponent from "../../components/GenericErrorComponent"; import paymentCompleted from "../../../../../img/pictograms/payment-completed.png"; diff --git a/ts/features/messages/components/MessageAttachmentPreview.tsx b/ts/features/messages/components/MessageAttachmentPreview.tsx index d72afe2c87e..bd635ea16ef 100644 --- a/ts/features/messages/components/MessageAttachmentPreview.tsx +++ b/ts/features/messages/components/MessageAttachmentPreview.tsx @@ -23,7 +23,7 @@ import { isIos } from "../../../utils/platform"; import { isStrictNone } from "../../../utils/pot"; import { share } from "../../../utils/share"; import { showToast } from "../../../utils/showToast"; -import { confirmButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../components/buttons/ButtonConfigurations"; import PdfViewer from "./MessageDetail/PdfViewer"; type Props = { diff --git a/ts/features/messages/hooks/useMessageOpening.tsx b/ts/features/messages/hooks/useMessageOpening.tsx index b1005dde47a..c02fab36504 100644 --- a/ts/features/messages/hooks/useMessageOpening.tsx +++ b/ts/features/messages/hooks/useMessageOpening.tsx @@ -13,7 +13,7 @@ import { clearMessagePrecondition } from "../store/actions"; import { messagePreconditionSelector } from "../store/reducers/messagePrecondition"; -import { RemoteValue, fold } from "../../bonus/bpd/model/RemoteValue"; +import { RemoteValue, fold } from "../../../common/model/RemoteValue"; import I18n from "../../../i18n"; import { ThirdPartyMessagePrecondition } from "../../../../definitions/backend/ThirdPartyMessagePrecondition"; import { trackDisclaimerOpened } from "../analytics"; diff --git a/ts/features/messages/screens/MessageRouterScreen.tsx b/ts/features/messages/screens/MessageRouterScreen.tsx index 2ac8504e031..13a36486d2c 100644 --- a/ts/features/messages/screens/MessageRouterScreen.tsx +++ b/ts/features/messages/screens/MessageRouterScreen.tsx @@ -1,7 +1,7 @@ import { StackActions, useNavigation } from "@react-navigation/native"; import React, { useCallback, useEffect, useRef } from "react"; import BaseScreenComponent from "../../../components/screens/BaseScreenComponent"; -import { LoadingErrorComponent } from "../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../components/LoadingErrorComponent"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; import { MessagesParamsList } from "../navigation/params"; diff --git a/ts/features/messages/store/reducers/__tests__/messagePrecondition.test.ts b/ts/features/messages/store/reducers/__tests__/messagePrecondition.test.ts index 7549d577d88..2ac830f730c 100644 --- a/ts/features/messages/store/reducers/__tests__/messagePrecondition.test.ts +++ b/ts/features/messages/store/reducers/__tests__/messagePrecondition.test.ts @@ -13,7 +13,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { message_1 } from "../../../__mocks__/message"; import { toUIMessage } from "../transformers"; import { GlobalState } from "../../../../../store/reducers/types"; diff --git a/ts/features/messages/store/reducers/messagePrecondition.ts b/ts/features/messages/store/reducers/messagePrecondition.ts index 10a8e1e43d7..13c629382c6 100644 --- a/ts/features/messages/store/reducers/messagePrecondition.ts +++ b/ts/features/messages/store/reducers/messagePrecondition.ts @@ -10,7 +10,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../bonus/bpd/model/RemoteValue"; +} from "../../../../common/model/RemoteValue"; import { UIMessageId } from "../../types"; export type MessagePrecondition = { diff --git a/ts/features/pn/components/MessagePaymentItem.tsx b/ts/features/pn/components/MessagePaymentItem.tsx index 0db7115e5ac..92684d5c64d 100644 --- a/ts/features/pn/components/MessagePaymentItem.tsx +++ b/ts/features/pn/components/MessagePaymentItem.tsx @@ -19,7 +19,7 @@ import { } from "../store/reducers/payments"; import { useIOSelector } from "../../../store/hooks"; import { updatePaymentForMessage } from "../store/actions"; -import { RemoteValue, fold } from "../../bonus/bpd/model/RemoteValue"; +import { RemoteValue, fold } from "../../../common/model/RemoteValue"; import { PaymentRequestsGetResponse } from "../../../../definitions/backend/PaymentRequestsGetResponse"; import { Detail_v2Enum } from "../../../../definitions/backend/PaymentProblemJson"; import { diff --git a/ts/features/pn/store/reducers/__tests__/payments.test.ts b/ts/features/pn/store/reducers/__tests__/payments.test.ts index b4e8022b754..5fad349bfd9 100644 --- a/ts/features/pn/store/reducers/__tests__/payments.test.ts +++ b/ts/features/pn/store/reducers/__tests__/payments.test.ts @@ -12,7 +12,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { clearSelectedPayment, setSelectedPayment, diff --git a/ts/features/pn/store/reducers/payments.ts b/ts/features/pn/store/reducers/payments.ts index 3108203d76e..86a73f167cd 100644 --- a/ts/features/pn/store/reducers/payments.ts +++ b/ts/features/pn/store/reducers/payments.ts @@ -16,7 +16,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bonus/bpd/model/RemoteValue"; +} from "../../../../common/model/RemoteValue"; import { clearSelectedPayment, setSelectedPayment, diff --git a/ts/features/wallet/component/__test__/FeaturedCardCarousel.test.tsx b/ts/features/wallet/component/__test__/FeaturedCardCarousel.test.tsx index 201c131b372..ac54fb2213a 100644 --- a/ts/features/wallet/component/__test__/FeaturedCardCarousel.test.tsx +++ b/ts/features/wallet/component/__test__/FeaturedCardCarousel.test.tsx @@ -4,18 +4,18 @@ import FeaturedCardCarousel from "../card/FeaturedCardCarousel"; import { appReducer } from "../../../../store/reducers"; import { bpdLoadActivationStatus } from "../../../bonus/bpd/store/actions/details"; import { GlobalState } from "../../../../store/reducers/types"; -import { loadAvailableBonuses } from "../../../bonus/bonusVacanze/store/actions/bonusVacanze"; -import { availableBonuses } from "../../../bonus/bonusVacanze/__mock__/availableBonuses"; -import * as bonus from "../../../bonus/bonusVacanze/utils/bonus"; +import { availableBonuses } from "../../../bonus/__mock__/availableBonuses"; +import * as bonus from "../../../bonus/common/utils"; import { ID_BONUS_VACANZE_TYPE, ID_BPD_TYPE, ID_CGN_TYPE -} from "../../../bonus/bonusVacanze/utils/bonus"; +} from "../../../bonus/common/utils"; import { BonusVisibilityEnum } from "../../../../../definitions/content/BonusVisibility"; import * as cgnDetailSelectors from "../../../bonus/cgn/store/reducers/details"; import { renderScreenFakeNavRedux } from "../../../../utils/testWrapper"; import { MESSAGES_ROUTES } from "../../../messages/navigation/routes"; +import { loadAvailableBonuses } from "../../../bonus/common/store/actions/availableBonusesTypes"; jest.mock("react-native-share", () => jest.fn()); describe("FeaturedCardCarousel", () => { diff --git a/ts/features/wallet/component/card/FeaturedCardCarousel.tsx b/ts/features/wallet/component/card/FeaturedCardCarousel.tsx index 4520659487f..2dbf494a850 100644 --- a/ts/features/wallet/component/card/FeaturedCardCarousel.tsx +++ b/ts/features/wallet/component/card/FeaturedCardCarousel.tsx @@ -1,12 +1,12 @@ +import { IOColors } from "@pagopa/io-app-design-system"; import { useNavigation } from "@react-navigation/native"; import * as AR from "fp-ts/lib/Array"; -import { constUndefined, pipe } from "fp-ts/lib/function"; import * as O from "fp-ts/lib/Option"; +import { constUndefined, pipe } from "fp-ts/lib/function"; import * as React from "react"; import { useEffect } from "react"; -import { View, ScrollView, StyleSheet } from "react-native"; +import { ScrollView, StyleSheet, View } from "react-native"; import { connect } from "react-redux"; -import { IOColors } from "@pagopa/io-app-design-system"; import { BonusAvailable } from "../../../../../definitions/content/BonusAvailable"; import cashbackLogo from "../../../../../img/bonus/bpd/logo_cashback_blue.png"; import cgnLogo from "../../../../../img/bonus/cgn/cgn_logo.png"; @@ -25,25 +25,22 @@ import { import { Dispatch } from "../../../../store/actions/types"; import { useIODispatch, useIOSelector } from "../../../../store/hooks"; import { - isCdcEnabledSelector, - isCGNEnabledSelector + isCGNEnabledSelector, + isCdcEnabledSelector } from "../../../../store/reducers/backendStatus"; import { GlobalState } from "../../../../store/reducers/types"; -import { getRemoteLocale } from "../../../messages/utils/messages"; import { showToast } from "../../../../utils/showToast"; -import { - availableBonusTypesSelectorFromId, - serviceFromAvailableBonusSelector, - supportedAvailableBonusSelector -} from "../../../bonus/bonusVacanze/store/reducers/availableBonusesTypes"; -import { - ID_CDC_TYPE, - ID_CGN_TYPE -} from "../../../bonus/bonusVacanze/utils/bonus"; +import { ID_CDC_TYPE, ID_CGN_TYPE } from "../../../bonus/common/utils"; import { bpdOnboardingStart } from "../../../bonus/bpd/store/actions/onboarding"; import { bpdEnabledSelector } from "../../../bonus/bpd/store/reducers/details/activation"; import { cgnActivationStart } from "../../../bonus/cgn/store/actions/activation"; import { isCgnEnrolledSelector } from "../../../bonus/cgn/store/reducers/details"; +import { + availableBonusTypesSelectorFromId, + supportedAvailableBonusSelector, + serviceFromAvailableBonusSelector +} from "../../../bonus/common/store/selectors"; +import { getRemoteLocale } from "../../../messages/utils/messages"; import FeaturedCard from "./FeaturedCard"; type Props = ReturnType & diff --git a/ts/features/wallet/onboarding/bancomat/store/reducers/addedPans.ts b/ts/features/wallet/onboarding/bancomat/store/reducers/addedPans.ts index bfc87033c48..773894ceb78 100644 --- a/ts/features/wallet/onboarding/bancomat/store/reducers/addedPans.ts +++ b/ts/features/wallet/onboarding/bancomat/store/reducers/addedPans.ts @@ -6,7 +6,7 @@ import { RawBancomatPaymentMethod } from "../../../../../../types/pagopa"; import { enhanceBancomat } from "../../../../../../utils/paymentMethod"; -import { getValueOrElse } from "../../../../../bonus/bpd/model/RemoteValue"; +import { getValueOrElse } from "../../../../../../common/model/RemoteValue"; import { abiSelector } from "../../../store/abi"; import { addBancomatToWallet, walletAddBancomatStart } from "../actions"; diff --git a/ts/features/wallet/onboarding/bancomat/store/reducers/addingPans.ts b/ts/features/wallet/onboarding/bancomat/store/reducers/addingPans.ts index 1db171c66f5..31bba91157f 100644 --- a/ts/features/wallet/onboarding/bancomat/store/reducers/addingPans.ts +++ b/ts/features/wallet/onboarding/bancomat/store/reducers/addingPans.ts @@ -9,7 +9,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { addBancomatToWallet, walletAddBancomatStart } from "../actions"; export type AddingPansState = { diff --git a/ts/features/wallet/onboarding/bancomat/store/reducers/pans.ts b/ts/features/wallet/onboarding/bancomat/store/reducers/pans.ts index f8ff41e2112..1ae18e247c5 100644 --- a/ts/features/wallet/onboarding/bancomat/store/reducers/pans.ts +++ b/ts/features/wallet/onboarding/bancomat/store/reducers/pans.ts @@ -8,7 +8,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { PansResponse, searchUserPans } from "../actions"; import { NetworkError } from "../../../../../../utils/errors"; diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx index 7221b1612af..3bf81ebf1a5 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx @@ -14,7 +14,7 @@ import { GlobalState } from "../../../../../../store/reducers/types"; import { cancelButtonProps, confirmButtonProps -} from "../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../components/buttons/ButtonConfigurations"; import { abiListSelector } from "../../../store/abi"; import { BPay } from "../../../../../../../definitions/pagopa/BPay"; import BPayCard from "../../../../bancomatpay/component/BPayCard"; diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayScreen.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayScreen.tsx index 2cccb9b50dc..d65956ca407 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayScreen.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayScreen.tsx @@ -14,7 +14,7 @@ import { isError, isLoading, isReady -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { addBPayToWallet, walletAddBPayCancel, diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/LoadAddBPayComponent.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/LoadAddBPayComponent.tsx index ac6b860044e..8fa52831913 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/add-account/LoadAddBPayComponent.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/add-account/LoadAddBPayComponent.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import I18n from "../../../../../../i18n"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; export type Props = { isLoading: boolean; diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/search/BPaySearchStartScreen.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/search/BPaySearchStartScreen.tsx index 40ec2e4f84c..087cc2fb237 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/search/BPaySearchStartScreen.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/search/BPaySearchStartScreen.tsx @@ -5,7 +5,7 @@ import { withLightModalContext } from "../../../../../../components/helpers/with import { LightModalContextInterface } from "../../../../../../components/ui/LightModal"; import { GlobalState } from "../../../../../../store/reducers/types"; import TosBonusComponent from "../../../../../bonus/common/components/TosBonusComponent"; -import { isError, isLoading } from "../../../../../bonus/bpd/model/RemoteValue"; +import { isError, isLoading } from "../../../../../../common/model/RemoteValue"; import { abiSelector } from "../../../store/abi"; import SearchStartScreen from "../../../common/searchBank/SearchStartScreen"; import { diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoNotFound.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoNotFound.tsx index f23b842c2ba..f581f3725e8 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoNotFound.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoNotFound.tsx @@ -10,7 +10,7 @@ import BaseScreenComponent from "../../../../../../components/screens/BaseScreen import FooterWithButtons from "../../../../../../components/ui/FooterWithButtons"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { cancelButtonProps } from "../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../components/buttons/ButtonConfigurations"; import { walletAddBPayCancel } from "../../store/actions"; export type Props = ReturnType & diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoTimeout.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoTimeout.tsx index 76fb84e9f72..cb1e5bb50be 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoTimeout.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoTimeout.tsx @@ -9,7 +9,7 @@ import { InfoScreenComponent } from "../../../../../../components/infoScreen/Inf import BaseScreenComponent from "../../../../../../components/screens/BaseScreenComponent"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; -import { FooterTwoButtons } from "../../../../../bonus/bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { searchUserBPay, walletAddBPayCancel } from "../../store/actions"; import { onboardingBPayAbiSelectedSelector } from "../../store/reducers/abiSelected"; diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/LoadBPaySearch.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/LoadBPaySearch.tsx index 4de293b0232..25d34e652e5 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/LoadBPaySearch.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/LoadBPaySearch.tsx @@ -4,7 +4,7 @@ import { Dispatch } from "redux"; import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; import { searchUserBPay, walletAddBPayCancel } from "../../store/actions"; import { onboardingBPayAbiSelectedSelector } from "../../store/reducers/abiSelected"; import { onboardingBpayFoundAccountsIsError } from "../../store/reducers/foundBpay"; diff --git a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/SearchAvailableUserBPayScreen.tsx b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/SearchAvailableUserBPayScreen.tsx index eefe00011c7..70c7a1d0b69 100644 --- a/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/SearchAvailableUserBPayScreen.tsx +++ b/ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/SearchAvailableUserBPayScreen.tsx @@ -8,7 +8,7 @@ import { isError, isLoading, isReady -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { onboardingBPayFoundAccountsSelector } from "../../store/reducers/foundBpay"; import { useAvoidHardwareBackButton } from "../../../../../../utils/useAvoidHardwareBackButton"; import AddBPayScreen from "../add-account/AddBPayScreen"; diff --git a/ts/features/wallet/onboarding/bancomatPay/store/reducers/__test__/foundBpay.test.ts b/ts/features/wallet/onboarding/bancomatPay/store/reducers/__test__/foundBpay.test.ts index 0c05ab0b3a9..9ab6d4e7817 100644 --- a/ts/features/wallet/onboarding/bancomatPay/store/reducers/__test__/foundBpay.test.ts +++ b/ts/features/wallet/onboarding/bancomatPay/store/reducers/__test__/foundBpay.test.ts @@ -7,7 +7,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../../common/model/RemoteValue"; import { searchUserBPay } from "../../actions"; import { onboardingBPayFoundAccountsSelector } from "../foundBpay"; import { bPayAttMock, bPayDisMock } from "../__mock__/bpay.mock"; diff --git a/ts/features/wallet/onboarding/bancomatPay/store/reducers/addedBPay.ts b/ts/features/wallet/onboarding/bancomatPay/store/reducers/addedBPay.ts index f0f993b019b..8c08ff68374 100644 --- a/ts/features/wallet/onboarding/bancomatPay/store/reducers/addedBPay.ts +++ b/ts/features/wallet/onboarding/bancomatPay/store/reducers/addedBPay.ts @@ -6,7 +6,7 @@ import { RawBPayPaymentMethod } from "../../../../../../types/pagopa"; import { enhanceBPay } from "../../../../../../utils/paymentMethod"; -import { getValueOrElse } from "../../../../../bonus/bpd/model/RemoteValue"; +import { getValueOrElse } from "../../../../../../common/model/RemoteValue"; import { abiSelector } from "../../../store/abi"; import { addBPayToWallet, walletAddBPayStart } from "../actions"; diff --git a/ts/features/wallet/onboarding/bancomatPay/store/reducers/addingBPay.ts b/ts/features/wallet/onboarding/bancomatPay/store/reducers/addingBPay.ts index c5f64b18f6e..1e71e059508 100644 --- a/ts/features/wallet/onboarding/bancomatPay/store/reducers/addingBPay.ts +++ b/ts/features/wallet/onboarding/bancomatPay/store/reducers/addingBPay.ts @@ -9,7 +9,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { addBPayToWallet, walletAddBPayStart } from "../actions"; import { NetworkError } from "../../../../../../utils/errors"; diff --git a/ts/features/wallet/onboarding/bancomatPay/store/reducers/foundBpay.ts b/ts/features/wallet/onboarding/bancomatPay/store/reducers/foundBpay.ts index 7fc7b068b81..0f2c0d83ebe 100644 --- a/ts/features/wallet/onboarding/bancomatPay/store/reducers/foundBpay.ts +++ b/ts/features/wallet/onboarding/bancomatPay/store/reducers/foundBpay.ts @@ -11,7 +11,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { searchUserBPay } from "../actions"; export type RemoteBPay = RemoteValue, NetworkError>; diff --git a/ts/features/wallet/onboarding/cobadge/screens/CoBadgeChooseType.tsx b/ts/features/wallet/onboarding/cobadge/screens/CoBadgeChooseType.tsx index 57553910086..d5594534880 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/CoBadgeChooseType.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/CoBadgeChooseType.tsx @@ -30,7 +30,7 @@ import { } from "../../../../../store/actions/navigation"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { cancelButtonProps } from "../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { PaymentMethodOnboardingCoBadgeParamsList } from "../navigation/params"; import { walletAddCoBadgeStart } from "../store/actions"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCoBadgeScreen.tsx b/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCoBadgeScreen.tsx index d3b32780e54..517f1921e18 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCoBadgeScreen.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCoBadgeScreen.tsx @@ -14,7 +14,7 @@ import { isError, isLoading, isReady -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { addCoBadgeToWallet, walletAddCoBadgeCancel, diff --git a/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCobadgeComponent.tsx b/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCobadgeComponent.tsx index 3a55757fa62..45fa4cc3789 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCobadgeComponent.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/add-account/AddCobadgeComponent.tsx @@ -18,7 +18,7 @@ import { GlobalState } from "../../../../../../store/reducers/types"; import { cancelButtonProps, confirmButtonProps -} from "../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../components/buttons/ButtonConfigurations"; import { abiListSelector } from "../../../store/abi"; import { Abi } from "../../../../../../../definitions/pagopa/walletv2/Abi"; import PreviewCoBadgeCard from "../../../../cobadge/component/PreviewCoBadgeCard"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/add-account/LoadAddCoBadgeComponent.tsx b/ts/features/wallet/onboarding/cobadge/screens/add-account/LoadAddCoBadgeComponent.tsx index 63c59871613..f792c0d2f6c 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/add-account/LoadAddCoBadgeComponent.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/add-account/LoadAddCoBadgeComponent.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import I18n from "../../../../../../i18n"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; export type Props = { isLoading: boolean; diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/LoadCoBadgeSearch.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/LoadCoBadgeSearch.tsx index fce279d24dd..64fb0d1d962 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/LoadCoBadgeSearch.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/LoadCoBadgeSearch.tsx @@ -5,7 +5,7 @@ import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { WithTestID } from "../../../../../../types/WithTestID"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; import { searchUserCoBadge, walletAddCoBadgeCancel } from "../../store/actions"; import { onboardingCoBadgeAbiSelectedSelector } from "../../store/reducers/abiSelected"; import { onboardingCoBadgeFoundIsError } from "../../store/reducers/foundCoBadge"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/SearchAvailableCoBadgeScreen.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/SearchAvailableCoBadgeScreen.tsx index 3a604fbcba2..77e6c15fea7 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/SearchAvailableCoBadgeScreen.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/SearchAvailableCoBadgeScreen.tsx @@ -15,7 +15,7 @@ import { GlobalState } from "../../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../../utils/emptyContextualHelp"; import { isTimeoutError } from "../../../../../../utils/errors"; import { useAvoidHardwareBackButton } from "../../../../../../utils/useAvoidHardwareBackButton"; -import { isError, isReady } from "../../../../../bonus/bpd/model/RemoteValue"; +import { isError, isReady } from "../../../../../../common/model/RemoteValue"; import { searchUserCoBadge } from "../../store/actions"; import { onboardingCoBadgeAbiSelectedSelector } from "../../store/reducers/abiSelected"; import { onboardingCoBadgeFoundSelector } from "../../store/reducers/foundCoBadge"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoNotFound.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoNotFound.tsx index fe62d3a00f5..1df6ad1f8c6 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoNotFound.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoNotFound.tsx @@ -15,8 +15,8 @@ import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualH import { cancelButtonProps, confirmButtonProps -} from "../../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../../../../../bonus/bonusVacanze/components/buttons/FooterStackButtons"; +} from "../../../../../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../../../../../components/buttons/FooterStackButtons"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; import TosBonusComponent from "../../../../../../bonus/common/components/TosBonusComponent"; import { walletAddCoBadgeCancel } from "../../../store/actions"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoServiceError.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoServiceError.tsx index 277106a678b..f157eb7a971 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoServiceError.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoServiceError.tsx @@ -11,7 +11,7 @@ import image from "../../../../../../../../img/wallet/errors/payment-unavailable import I18n from "../../../../../../../i18n"; import { GlobalState } from "../../../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualHelp"; -import { cancelButtonProps } from "../../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; import { walletAddCoBadgeCancel } from "../../../store/actions"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoSingleBankNotFound.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoSingleBankNotFound.tsx index 520ee1b3fb5..b517e44760c 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoSingleBankNotFound.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoSingleBankNotFound.tsx @@ -16,7 +16,7 @@ import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualH import { cancelButtonProps, confirmButtonProps -} from "../../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; import { searchUserCoBadge, diff --git a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoTimeout.tsx b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoTimeout.tsx index 73802a8599c..1c070961a97 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoTimeout.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoTimeout.tsx @@ -11,7 +11,7 @@ import I18n from "../../../../../../../i18n"; import { GlobalState } from "../../../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualHelp"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; -import { FooterTwoButtons } from "../../../../../../bonus/bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../../components/markdown/FooterTwoButtons"; import { searchUserCoBadge, walletAddCoBadgeCancel diff --git a/ts/features/wallet/onboarding/cobadge/screens/start/CoBadgeChosenBankScreen.tsx b/ts/features/wallet/onboarding/cobadge/screens/start/CoBadgeChosenBankScreen.tsx index 63ce16773dd..1fa0c58d0dc 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/start/CoBadgeChosenBankScreen.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/start/CoBadgeChosenBankScreen.tsx @@ -14,10 +14,10 @@ import { walletAddCoBadgeCancel, walletAddCoBadgeFailure } from "../../store/actions"; -import { fold, isReady } from "../../../../../bonus/bpd/model/RemoteValue"; +import { fold, isReady } from "../../../../../../common/model/RemoteValue"; import { loadAbi } from "../../../bancomat/store/actions"; import I18n from "../../../../../../i18n"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; import { mixpanelTrack } from "../../../../../../mixpanel"; type OwnProps = { diff --git a/ts/features/wallet/onboarding/cobadge/screens/start/LoadAbiConfiguration.tsx b/ts/features/wallet/onboarding/cobadge/screens/start/LoadAbiConfiguration.tsx index 9361ab19c42..2290b825e58 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/start/LoadAbiConfiguration.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/start/LoadAbiConfiguration.tsx @@ -6,7 +6,7 @@ import I18n from "../../../../../../i18n"; import { GlobalState } from "../../../../../../store/reducers/types"; import { WithTestID } from "../../../../../../types/WithTestID"; import { useHardwareBackButton } from "../../../../../../hooks/useHardwareBackButton"; -import { LoadingErrorComponent } from "../../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../../components/LoadingErrorComponent"; import { loadCoBadgeAbiConfiguration, walletAddCoBadgeCancel diff --git a/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoDisabled.tsx b/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoDisabled.tsx index d5e011d89cb..cfda9a37155 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoDisabled.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoDisabled.tsx @@ -15,8 +15,8 @@ import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualH import { cancelButtonProps, confirmButtonProps -} from "../../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../../../../../bonus/bonusVacanze/components/buttons/FooterStackButtons"; +} from "../../../../../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../../../../../components/buttons/FooterStackButtons"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; import TosBonusComponent from "../../../../../../bonus/common/components/TosBonusComponent"; import { walletAddCoBadgeCancel } from "../../../store/actions"; diff --git a/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoUnavailable.tsx b/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoUnavailable.tsx index 73eb0b488c7..f47f666a36d 100644 --- a/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoUnavailable.tsx +++ b/ts/features/wallet/onboarding/cobadge/screens/start/ko/CoBadgeStartKoUnavailable.tsx @@ -11,7 +11,7 @@ import FooterWithButtons from "../../../../../../../components/ui/FooterWithButt import I18n from "../../../../../../../i18n"; import { GlobalState } from "../../../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../../../utils/emptyContextualHelp"; -import { cancelButtonProps } from "../../../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../../../components/buttons/ButtonConfigurations"; import { useHardwareBackButton } from "../../../../../../../hooks/useHardwareBackButton"; import { walletAddCoBadgeCancel } from "../../../store/actions"; diff --git a/ts/features/wallet/onboarding/cobadge/store/reducers/addedCoBadge.ts b/ts/features/wallet/onboarding/cobadge/store/reducers/addedCoBadge.ts index 22c4fea155d..428fb9c7141 100644 --- a/ts/features/wallet/onboarding/cobadge/store/reducers/addedCoBadge.ts +++ b/ts/features/wallet/onboarding/cobadge/store/reducers/addedCoBadge.ts @@ -6,7 +6,7 @@ import { RawCreditCardPaymentMethod } from "../../../../../../types/pagopa"; import { enhanceCreditCard } from "../../../../../../utils/paymentMethod"; -import { getValueOrElse } from "../../../../../bonus/bpd/model/RemoteValue"; +import { getValueOrElse } from "../../../../../../common/model/RemoteValue"; import { abiSelector } from "../../../store/abi"; import { addCoBadgeToWallet, walletAddCoBadgeStart } from "../actions"; diff --git a/ts/features/wallet/onboarding/cobadge/store/reducers/addingCoBadge.ts b/ts/features/wallet/onboarding/cobadge/store/reducers/addingCoBadge.ts index 70258355bc1..5b0c4755016 100644 --- a/ts/features/wallet/onboarding/cobadge/store/reducers/addingCoBadge.ts +++ b/ts/features/wallet/onboarding/cobadge/store/reducers/addingCoBadge.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { addCoBadgeToWallet, walletAddCoBadgeStart } from "../actions"; export type AddingCoBadgeState = { diff --git a/ts/features/wallet/onboarding/cobadge/store/reducers/foundCoBadge.ts b/ts/features/wallet/onboarding/cobadge/store/reducers/foundCoBadge.ts index ca3889c6904..8a39f221e16 100644 --- a/ts/features/wallet/onboarding/cobadge/store/reducers/foundCoBadge.ts +++ b/ts/features/wallet/onboarding/cobadge/store/reducers/foundCoBadge.ts @@ -9,7 +9,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { searchUserCoBadge } from "../actions"; import { CobadgeResponse } from "../../../../../../../definitions/pagopa/walletv2/CobadgeResponse"; diff --git a/ts/features/wallet/onboarding/common/screens/bpd/SuggestBpdActivationScreen.tsx b/ts/features/wallet/onboarding/common/screens/bpd/SuggestBpdActivationScreen.tsx index 39a8b037fd0..b4ed53131c5 100644 --- a/ts/features/wallet/onboarding/common/screens/bpd/SuggestBpdActivationScreen.tsx +++ b/ts/features/wallet/onboarding/common/screens/bpd/SuggestBpdActivationScreen.tsx @@ -11,7 +11,7 @@ import I18n from "../../../../../../i18n"; import { navigateBack } from "../../../../../../store/actions/navigation"; import { GlobalState } from "../../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../../utils/emptyContextualHelp"; -import { FooterTwoButtons } from "../../../../../bonus/bonusVacanze/components/markdown/FooterTwoButtons"; +import { FooterTwoButtons } from "../../../../../../components/markdown/FooterTwoButtons"; import { bpdOnboardingStart } from "../../../../../bonus/bpd/store/actions/onboarding"; export type Props = ReturnType & diff --git a/ts/features/wallet/onboarding/common/searchBank/SearchBankScreen.tsx b/ts/features/wallet/onboarding/common/searchBank/SearchBankScreen.tsx index 7ac79e14208..695449980d6 100644 --- a/ts/features/wallet/onboarding/common/searchBank/SearchBankScreen.tsx +++ b/ts/features/wallet/onboarding/common/searchBank/SearchBankScreen.tsx @@ -14,12 +14,12 @@ import { navigateBack } from "../../../../../store/actions/navigation"; import { SectionStatusKey } from "../../../../../store/reducers/backendStatus"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; -import { cancelButtonProps } from "../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import { isError, isLoading, isUndefined -} from "../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { loadAbi } from "../../bancomat/store/actions"; import { abiListSelector, abiSelector } from "../../store/abi"; import { SearchBankComponent } from "./SearchBankComponent"; diff --git a/ts/features/wallet/onboarding/common/searchBank/SearchStartScreen.tsx b/ts/features/wallet/onboarding/common/searchBank/SearchStartScreen.tsx index cd303de2216..ee67af1e9d9 100644 --- a/ts/features/wallet/onboarding/common/searchBank/SearchStartScreen.tsx +++ b/ts/features/wallet/onboarding/common/searchBank/SearchStartScreen.tsx @@ -6,7 +6,7 @@ import BaseScreenComponent from "../../../../../components/screens/BaseScreenCom import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { WithTestID } from "../../../../../types/WithTestID"; -import { isError, isLoading } from "../../../../bonus/bpd/model/RemoteValue"; +import { isError, isLoading } from "../../../../../common/model/RemoteValue"; import { abiSelector } from "../../store/abi"; import { loadAbi } from "../../bancomat/store/actions"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; @@ -14,7 +14,7 @@ import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps -} from "../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../../components/buttons/ButtonConfigurations"; import { IOStyles } from "../../../../../components/core/variables/IOStyles"; import SectionStatusComponent from "../../../../../components/SectionStatus"; import { SectionStatusKey } from "../../../../../store/reducers/backendStatus"; diff --git a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutCompletedScreen.tsx b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutCompletedScreen.tsx index 2ea6d9a7278..5b5bf93aba5 100644 --- a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutCompletedScreen.tsx +++ b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutCompletedScreen.tsx @@ -8,7 +8,7 @@ import { fetchWalletsRequestWithExpBackoff } from "../../../../../store/actions/ import { useIODispatch, useIOSelector } from "../../../../../store/hooks"; import { extractOutcomeCode } from "../../../../../store/reducers/wallet/outcomeCode"; import { paypalSelector } from "../../../../../store/reducers/wallet/wallets"; -import { LoadingErrorComponent } from "../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { walletAddPaypalFailure } from "../store/actions"; import { paypalOnboardingOutcomeCodeSelector } from "../store/reducers/onOboardingCompleted"; import PayPalOnboardingCompletedSuccessComponent from "./PayPalOnboardingCompletedSuccessComponent"; diff --git a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutScreen.tsx b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutScreen.tsx index 48dadfd1417..a5432c6a0cf 100644 --- a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutScreen.tsx +++ b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCheckoutScreen.tsx @@ -18,8 +18,8 @@ import { pmSessionTokenSelector } from "../../../../../store/reducers/wallet/pay import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { getLocalePrimaryWithFallback } from "../../../../../utils/locale"; import { getLookUpIdPO } from "../../../../../utils/pmLookUpId"; -import { LoadingErrorComponent } from "../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { fold } from "../../../../bonus/bpd/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; +import { fold } from "../../../../../common/model/RemoteValue"; import { walletAddPaypalBack, walletAddPaypalOutcome, diff --git a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCompletedSuccessComponent.tsx b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCompletedSuccessComponent.tsx index 91d472573d9..12868f0c22c 100644 --- a/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCompletedSuccessComponent.tsx +++ b/ts/features/wallet/onboarding/paypal/screen/PayPalOnboardingCompletedSuccessComponent.tsx @@ -2,7 +2,7 @@ import React from "react"; import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent"; import { renderInfoRasterImage } from "../../../../../components/infoScreen/imageRendering"; import successImage from "../../../../../../img/pictograms/payment-completed.png"; -import { confirmButtonProps } from "../../../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../../../components/buttons/ButtonConfigurations"; import I18n from "../../../../../i18n"; import FooterWithButtons from "../../../../../components/ui/FooterWithButtons"; import { walletAddPaypalCompleted } from "../store/actions"; diff --git a/ts/features/wallet/onboarding/paypal/screen/PayPalPspSelectionScreen.tsx b/ts/features/wallet/onboarding/paypal/screen/PayPalPspSelectionScreen.tsx index 814981b9e43..974aa9a12b5 100644 --- a/ts/features/wallet/onboarding/paypal/screen/PayPalPspSelectionScreen.tsx +++ b/ts/features/wallet/onboarding/paypal/screen/PayPalPspSelectionScreen.tsx @@ -19,12 +19,12 @@ import I18n from "../../../../../i18n"; import { GlobalState } from "../../../../../store/reducers/types"; import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp"; import { useIOBottomSheetAutoresizableModal } from "../../../../../utils/hooks/bottomSheet"; -import { LoadingErrorComponent } from "../../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../../../components/LoadingErrorComponent"; import { getValueOrElse, isError, isReady -} from "../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { PspRadioItem } from "../components/PspRadioItem"; import { searchPaypalPsp as searchPaypalPspAction, diff --git a/ts/features/wallet/onboarding/paypal/store/reducers/searchPsp.ts b/ts/features/wallet/onboarding/paypal/store/reducers/searchPsp.ts index 73780921ed9..d2b2464b6f1 100644 --- a/ts/features/wallet/onboarding/paypal/store/reducers/searchPsp.ts +++ b/ts/features/wallet/onboarding/paypal/store/reducers/searchPsp.ts @@ -5,7 +5,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../../common/model/RemoteValue"; import { NetworkError } from "../../../../../../utils/errors"; import { IOPayPalPsp } from "../../types"; import { Action } from "../../../../../../store/actions/types"; diff --git a/ts/features/wallet/onboarding/store/abi.ts b/ts/features/wallet/onboarding/store/abi.ts index 67beb47e29f..83fcd141975 100644 --- a/ts/features/wallet/onboarding/store/abi.ts +++ b/ts/features/wallet/onboarding/store/abi.ts @@ -11,7 +11,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bonus/bpd/model/RemoteValue"; +} from "../../../../common/model/RemoteValue"; import { Action } from "../../../../store/actions/types"; import { loadAbi } from "../bancomat/store/actions"; import { GlobalState } from "../../../../store/reducers/types"; diff --git a/ts/features/wallet/paypal/screen/PayPalPspUpdateScreen.tsx b/ts/features/wallet/paypal/screen/PayPalPspUpdateScreen.tsx index efec20a1703..26e50c4bf1e 100644 --- a/ts/features/wallet/paypal/screen/PayPalPspUpdateScreen.tsx +++ b/ts/features/wallet/paypal/screen/PayPalPspUpdateScreen.tsx @@ -33,8 +33,8 @@ import { useIOSelector } from "../../../../store/hooks"; import { pspV2ListSelector } from "../../../../store/reducers/wallet/payment"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { formatNumberCentsToAmount } from "../../../../utils/stringBuilder"; -import { LoadingErrorComponent } from "../../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; -import { isError, isReady } from "../../../bonus/bpd/model/RemoteValue"; +import { LoadingErrorComponent } from "../../../../components/LoadingErrorComponent"; +import { isError, isReady } from "../../../../common/model/RemoteValue"; import { useImageResize } from "../../onboarding/bancomat/hooks/useImageResize"; import { PSP_LOGO_MAX_HEIGHT, diff --git a/ts/features/zendesk/components/ZendeskEmptyTicketsComponent.tsx b/ts/features/zendesk/components/ZendeskEmptyTicketsComponent.tsx index 94e4ea1f500..db95dd10ccb 100644 --- a/ts/features/zendesk/components/ZendeskEmptyTicketsComponent.tsx +++ b/ts/features/zendesk/components/ZendeskEmptyTicketsComponent.tsx @@ -11,7 +11,7 @@ import { IOStackNavigationProp } from "../../../navigation/params/AppParamsList"; import { useIOSelector } from "../../../store/hooks"; -import { FooterStackButton } from "../../bonus/bonusVacanze/components/buttons/FooterStackButtons"; +import { FooterStackButton } from "../../../components/buttons/FooterStackButtons"; import { zendeskConfigSelector } from "../store/reducers"; import { handleContactSupport } from "../utils"; diff --git a/ts/features/zendesk/screens/ZendeskChooseCategory.tsx b/ts/features/zendesk/screens/ZendeskChooseCategory.tsx index ee6307742c7..e86b6289c3c 100644 --- a/ts/features/zendesk/screens/ZendeskChooseCategory.tsx +++ b/ts/features/zendesk/screens/ZendeskChooseCategory.tsx @@ -23,7 +23,7 @@ import { addTicketCustomField, hasSubCategories } from "../../../utils/supportAssistance"; -import { isReady } from "../../bonus/bpd/model/RemoteValue"; +import { isReady } from "../../../common/model/RemoteValue"; import { ZendeskParamsList } from "../navigation/params"; import ZENDESK_ROUTES from "../navigation/routes"; import { diff --git a/ts/features/zendesk/screens/ZendeskPanicMode.tsx b/ts/features/zendesk/screens/ZendeskPanicMode.tsx index 4746e1c6fd7..d435a013104 100644 --- a/ts/features/zendesk/screens/ZendeskPanicMode.tsx +++ b/ts/features/zendesk/screens/ZendeskPanicMode.tsx @@ -7,7 +7,7 @@ import { InfoScreenComponent } from "../../../components/infoScreen/InfoScreenCo import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import I18n from "../../../i18n"; import { useIODispatch } from "../../../store/hooks"; -import { cancelButtonProps } from "../../bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { zendeskSupportCompleted } from "../store/actions"; /** diff --git a/ts/features/zendesk/screens/ZendeskSeeReportsRouters.tsx b/ts/features/zendesk/screens/ZendeskSeeReportsRouters.tsx index d297e7a1a64..8e8c35cb413 100644 --- a/ts/features/zendesk/screens/ZendeskSeeReportsRouters.tsx +++ b/ts/features/zendesk/screens/ZendeskSeeReportsRouters.tsx @@ -12,7 +12,7 @@ import { getZendeskIdentity, getZendeskConfig } from "../../../utils/supportAssistance"; -import { LoadingErrorComponent } from "../../bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../../components/LoadingErrorComponent"; import ZendeskEmptyTicketsComponent from "../components/ZendeskEmptyTicketsComponent"; import { ZendeskParamsList } from "../navigation/params"; import { diff --git a/ts/features/zendesk/screens/__tests__/ZendeskSupportHelpCenter.test.tsx b/ts/features/zendesk/screens/__tests__/ZendeskSupportHelpCenter.test.tsx index bc2af7a18d2..35b804d85ac 100644 --- a/ts/features/zendesk/screens/__tests__/ZendeskSupportHelpCenter.test.tsx +++ b/ts/features/zendesk/screens/__tests__/ZendeskSupportHelpCenter.test.tsx @@ -6,7 +6,7 @@ import { GlobalState } from "../../../../store/reducers/types"; import { renderScreenFakeNavRedux } from "../../../../utils/testWrapper"; import ROUTES from "../../../../navigation/routes"; import ZendeskSupportHelpCenter from "../ZendeskSupportHelpCenter"; -import { isLoading } from "../../../bonus/bpd/model/RemoteValue"; +import { isLoading } from "../../../../common/model/RemoteValue"; jest.useFakeTimers(); diff --git a/ts/features/zendesk/store/reducers/__tests__/index.test.ts b/ts/features/zendesk/store/reducers/__tests__/index.test.ts index 03878a04c40..61f48bada45 100644 --- a/ts/features/zendesk/store/reducers/__tests__/index.test.ts +++ b/ts/features/zendesk/store/reducers/__tests__/index.test.ts @@ -12,7 +12,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../../bonus/bpd/model/RemoteValue"; +} from "../../../../../common/model/RemoteValue"; import { getZendeskConfig, zendeskRequestTicketNumber, diff --git a/ts/features/zendesk/store/reducers/index.ts b/ts/features/zendesk/store/reducers/index.ts index 792ce429023..6b7ffb2731a 100644 --- a/ts/features/zendesk/store/reducers/index.ts +++ b/ts/features/zendesk/store/reducers/index.ts @@ -9,7 +9,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../bonus/bpd/model/RemoteValue"; +} from "../../../../common/model/RemoteValue"; import { NetworkError } from "../../../../utils/errors"; import { Action } from "../../../../store/actions/types"; import { diff --git a/ts/features/zendesk/utils/index.ts b/ts/features/zendesk/utils/index.ts index 1160d0acf69..1a661edddc8 100644 --- a/ts/features/zendesk/utils/index.ts +++ b/ts/features/zendesk/utils/index.ts @@ -3,7 +3,7 @@ import { IOStackNavigationProp } from "../../../navigation/params/AppParamsList"; import { isPanicModeActive } from "../../../utils/supportAssistance"; -import { isReady } from "../../bonus/bpd/model/RemoteValue"; +import { isReady } from "../../../common/model/RemoteValue"; import ZENDESK_ROUTES from "../navigation/routes"; import { ZendeskConfig } from "../store/reducers"; diff --git a/ts/sagas/contentLoaders.ts b/ts/sagas/contentLoaders.ts index e5428bc0853..2005ae8a333 100644 --- a/ts/sagas/contentLoaders.ts +++ b/ts/sagas/contentLoaders.ts @@ -1,16 +1,17 @@ /** * This module implements the sagas to retrive data from the content client: */ -import * as E from "fp-ts/lib/Either"; -import * as t from "io-ts"; import { readableReport } from "@pagopa/ts-commons/lib/reporters"; import { BasicResponseType } from "@pagopa/ts-commons/lib/requests"; +import * as E from "fp-ts/lib/Either"; +import * as t from "io-ts"; import { SagaIterator } from "redux-saga"; import { call, put, takeEvery, takeLatest } from "typed-redux-saga/macro"; import { ActionType, getType } from "typesafe-actions"; import { ContextualHelp } from "../../definitions/content/ContextualHelp"; import { Municipality as MunicipalityMedadata } from "../../definitions/content/Municipality"; import { ContentClient } from "../api/content"; +import { loadAvailableBonuses } from "../features/bonus/common/store/actions/availableBonusesTypes"; import { contentMunicipalityLoad, loadContextualHelpData, @@ -18,7 +19,6 @@ import { } from "../store/actions/content"; import { CodiceCatastale } from "../types/MunicipalityCodiceCatastale"; import { ReduxSagaEffect, SagaCallReturnType } from "../types/utils"; -import { loadAvailableBonuses } from "../features/bonus/bonusVacanze/store/actions/bonusVacanze"; import { convertUnknownToError } from "../utils/errors"; const contentClient = ContentClient(); diff --git a/ts/screens/authentication/IdpSelectionScreen.tsx b/ts/screens/authentication/IdpSelectionScreen.tsx index 92b68e558b7..de152afd5d9 100644 --- a/ts/screens/authentication/IdpSelectionScreen.tsx +++ b/ts/screens/authentication/IdpSelectionScreen.tsx @@ -17,7 +17,7 @@ import { SpidIdp } from "../../../definitions/content/SpidIdp"; import { LocalIdpsFallback } from "../../utils/idps"; import { loadIdps } from "../../store/actions/content"; import LoadingSpinnerOverlay from "../../components/LoadingSpinnerOverlay"; -import { isLoading } from "../../features/bonus/bpd/model/RemoteValue"; +import { isLoading } from "../../common/model/RemoteValue"; import { assistanceToolConfigSelector } from "../../store/reducers/backendStatus"; import { assistanceToolRemoteConfig, diff --git a/ts/screens/onboarding/OnboardingNotificationsInfoScreenConsent.tsx b/ts/screens/onboarding/OnboardingNotificationsInfoScreenConsent.tsx index ba3c29c2d29..deef170f34b 100644 --- a/ts/screens/onboarding/OnboardingNotificationsInfoScreenConsent.tsx +++ b/ts/screens/onboarding/OnboardingNotificationsInfoScreenConsent.tsx @@ -21,7 +21,7 @@ import BaseScreenComponent, { import I18n from "../../i18n"; import { IOStyles } from "../../components/core/variables/IOStyles"; import { BlockButtonProps } from "../../components/ui/BlockButtons"; -import { FooterStackButton } from "../../features/bonus/bonusVacanze/components/buttons/FooterStackButtons"; +import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; import { openAppSettings } from "../../utils/appSettings"; import { useIODispatch } from "../../store/hooks"; import { notificationsInfoScreenConsent } from "../../store/actions/notifications"; diff --git a/ts/screens/onboarding/OnboardingServicesPreferenceScreen.tsx b/ts/screens/onboarding/OnboardingServicesPreferenceScreen.tsx index 7e8c2ac5b51..ae93b68606e 100644 --- a/ts/screens/onboarding/OnboardingServicesPreferenceScreen.tsx +++ b/ts/screens/onboarding/OnboardingServicesPreferenceScreen.tsx @@ -10,7 +10,7 @@ import { IOStyles } from "../../components/core/variables/IOStyles"; import { withLoadingSpinner } from "../../components/helpers/withLoadingSpinner"; import BaseScreenComponent from "../../components/screens/BaseScreenComponent"; import FooterWithButtons from "../../components/ui/FooterWithButtons"; -import { confirmButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../components/buttons/ButtonConfigurations"; import I18n from "../../i18n"; import { IOStackNavigationRouteProps } from "../../navigation/params/AppParamsList"; import { OnboardingParamsList } from "../../navigation/params/OnboardingParamsList"; diff --git a/ts/screens/onboarding/OnboardingShareDataScreen.tsx b/ts/screens/onboarding/OnboardingShareDataScreen.tsx index 150d5e94b3f..96708426578 100644 --- a/ts/screens/onboarding/OnboardingShareDataScreen.tsx +++ b/ts/screens/onboarding/OnboardingShareDataScreen.tsx @@ -11,7 +11,7 @@ import FooterWithButtons from "../../components/ui/FooterWithButtons"; import { cancelButtonProps, confirmButtonProps -} from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../components/buttons/ButtonConfigurations"; import I18n from "../../i18n"; import { setMixpanelEnabled } from "../../store/actions/mixpanel"; import { abortOnboarding } from "../../store/actions/onboarding"; diff --git a/ts/screens/onboarding/ServicePreferenceCompleteScreen.tsx b/ts/screens/onboarding/ServicePreferenceCompleteScreen.tsx index 8bb87e04d12..f28fd94b47d 100644 --- a/ts/screens/onboarding/ServicePreferenceCompleteScreen.tsx +++ b/ts/screens/onboarding/ServicePreferenceCompleteScreen.tsx @@ -8,8 +8,8 @@ import { IOStyles } from "../../components/core/variables/IOStyles"; import I18n from "../../i18n"; import paymentCompleted from "../../../img/pictograms/payment-completed.png"; import { renderInfoRasterImage } from "../../components/infoScreen/imageRendering"; -import { FooterStackButton } from "../../features/bonus/bonusVacanze/components/buttons/FooterStackButtons"; -import { cancelButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; +import { cancelButtonProps } from "../../components/buttons/ButtonConfigurations"; import { servicesOptinCompleted } from "../../store/actions/onboarding"; type Props = ReturnType & diff --git a/ts/screens/profile/RemoveAccountDetailsScreen.tsx b/ts/screens/profile/RemoveAccountDetailsScreen.tsx index c03d803a829..ffdd64609f0 100644 --- a/ts/screens/profile/RemoveAccountDetailsScreen.tsx +++ b/ts/screens/profile/RemoveAccountDetailsScreen.tsx @@ -16,7 +16,7 @@ import { LabelledItem } from "../../components/LabelledItem"; import BaseScreenComponent from "../../components/screens/BaseScreenComponent"; import FooterWithButtons from "../../components/ui/FooterWithButtons"; import { shufflePinPadOnPayment } from "../../config"; -import { LoadingErrorComponent } from "../../features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../components/LoadingErrorComponent"; import { allBonusActiveSelector } from "../../features/bonus/bonusVacanze/store/reducers/allActive"; import { bpdEnabledSelector } from "../../features/bonus/bpd/store/reducers/details/activation"; import { isCgnEnrolledSelector } from "../../features/bonus/cgn/store/reducers/details"; diff --git a/ts/screens/profile/ShareDataScreen.tsx b/ts/screens/profile/ShareDataScreen.tsx index 6f06ae51776..5386c7a8f46 100644 --- a/ts/screens/profile/ShareDataScreen.tsx +++ b/ts/screens/profile/ShareDataScreen.tsx @@ -8,7 +8,7 @@ import { RNavScreenWithLargeHeader } from "../../components/ui/RNavScreenWithLar import { cancelButtonProps, confirmButtonProps -} from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../components/buttons/ButtonConfigurations"; import I18n from "../../i18n"; import { setMixpanelEnabled } from "../../store/actions/mixpanel"; import { isMixpanelEnabled } from "../../store/reducers/persistedPreferences"; diff --git a/ts/screens/profile/components/OptOutBottomSheet.tsx b/ts/screens/profile/components/OptOutBottomSheet.tsx index 0a02454d034..9a6e9aa4f93 100644 --- a/ts/screens/profile/components/OptOutBottomSheet.tsx +++ b/ts/screens/profile/components/OptOutBottomSheet.tsx @@ -7,7 +7,7 @@ import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import { cancelButtonProps, errorButtonProps -} from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../components/buttons/ButtonConfigurations"; import I18n from "../../../i18n"; import { useLegacyIOBottomSheetModal } from "../../../utils/hooks/bottomSheet"; diff --git a/ts/screens/profile/components/services/ManualConfigBottomSheet.tsx b/ts/screens/profile/components/services/ManualConfigBottomSheet.tsx index 384b60413c5..0ce64301235 100644 --- a/ts/screens/profile/components/services/ManualConfigBottomSheet.tsx +++ b/ts/screens/profile/components/services/ManualConfigBottomSheet.tsx @@ -4,7 +4,7 @@ import FooterWithButtons from "../../../../components/ui/FooterWithButtons"; import { cancelButtonProps, errorButtonProps -} from "../../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../../components/buttons/ButtonConfigurations"; import Markdown from "../../../../components/ui/Markdown"; import I18n from "../../../../i18n"; import { useLegacyIOBottomSheetModal } from "../../../../utils/hooks/bottomSheet"; diff --git a/ts/screens/services/ServiceDetailsScreen.tsx b/ts/screens/services/ServiceDetailsScreen.tsx index 84f51b07282..a747765211f 100644 --- a/ts/screens/services/ServiceDetailsScreen.tsx +++ b/ts/screens/services/ServiceDetailsScreen.tsx @@ -21,7 +21,7 @@ import ServiceMetadataComponent from "../../components/services/ServiceMetadata" import SpecialServicesCTA from "../../components/services/SpecialServices/SpecialServicesCTA"; import TosAndPrivacyBox from "../../components/services/TosAndPrivacyBox"; import Markdown from "../../components/ui/Markdown"; -import { FooterTopShadow } from "../../features/bonus/bonusVacanze/components/FooterTopShadow"; +import { FooterTopShadow } from "../../components/FooterTopShadow"; import I18n from "../../i18n"; import { IOStackNavigationRouteProps } from "../../navigation/params/AppParamsList"; import { ServicesParamsList } from "../../navigation/params/ServicesParamsList"; diff --git a/ts/screens/wallet/ConfirmCardDetailsScreen.tsx b/ts/screens/wallet/ConfirmCardDetailsScreen.tsx index 20513977570..41203494a06 100644 --- a/ts/screens/wallet/ConfirmCardDetailsScreen.tsx +++ b/ts/screens/wallet/ConfirmCardDetailsScreen.tsx @@ -31,15 +31,15 @@ import Switch from "../../components/ui/Switch"; import CardComponent from "../../components/wallet/card/CardComponent"; import { PayWebViewModal } from "../../components/wallet/PayWebViewModal"; import { pagoPaApiUrlPrefix, pagoPaApiUrlPrefixTest } from "../../config"; -import { confirmButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../features/bonus/bonusVacanze/components/buttons/FooterStackButtons"; +import { confirmButtonProps } from "../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../components/buttons/FooterStackButtons"; -import { LoadingErrorComponent } from "../../features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { LoadingErrorComponent } from "../../components/LoadingErrorComponent"; import { isError, isLoading as isRemoteLoading, isReady -} from "../../features/bonus/bpd/model/RemoteValue"; +} from "../../common/model/RemoteValue"; import I18n from "../../i18n"; import { IOStackNavigationRouteProps } from "../../navigation/params/AppParamsList"; import { WalletParamsList } from "../../navigation/params/WalletParamsList"; diff --git a/ts/screens/wallet/WalletHomeScreen.tsx b/ts/screens/wallet/WalletHomeScreen.tsx index 0825f913938..846cd859e31 100644 --- a/ts/screens/wallet/WalletHomeScreen.tsx +++ b/ts/screens/wallet/WalletHomeScreen.tsx @@ -40,12 +40,8 @@ import { navigateToAvailableBonusScreen, navigateToBonusActiveDetailScreen } from "../../features/bonus/bonusVacanze/navigation/action"; -import { - loadAllBonusActivations, - loadAvailableBonuses -} from "../../features/bonus/bonusVacanze/store/actions/bonusVacanze"; +import { loadAllBonusActivations } from "../../features/bonus/bonusVacanze/store/actions/bonusVacanze"; import { allBonusActiveSelector } from "../../features/bonus/bonusVacanze/store/reducers/allActive"; -import { supportedAvailableBonusSelector } from "../../features/bonus/bonusVacanze/store/reducers/availableBonusesTypes"; import BpdOptInPaymentMethodsContainer from "../../features/bonus/bpd/components/optInPaymentMethods/BpdOptInPaymentMethodsContainer"; import BpdCardsInWalletContainer from "../../features/bonus/bpd/components/walletCardContainer/BpdCardsInWalletComponent"; import { bpdAllData } from "../../features/bonus/bpd/store/actions/details"; @@ -57,6 +53,8 @@ import { cgnDetailSelector, isCgnInformationAvailableSelector } from "../../features/bonus/cgn/store/reducers/details"; +import { loadAvailableBonuses } from "../../features/bonus/common/store/actions/availableBonusesTypes"; +import { supportedAvailableBonusSelector } from "../../features/bonus/common/store/selectors"; import IDPayCardsInWalletContainer from "../../features/idpay/wallet/components/IDPayCardsInWalletContainer"; import { idPayWalletGet } from "../../features/idpay/wallet/store/actions"; import NewPaymentMethodAddedNotifier from "../../features/wallet/component/NewMethodAddedNotifier"; diff --git a/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx b/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx index 4e0d54a76bb..d0cc490ec0e 100644 --- a/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx +++ b/ts/screens/wallet/payment/ConfirmPaymentMethodScreen.tsx @@ -29,13 +29,13 @@ import { getCardIconFromBrandLogo } from "../../../components/wallet/card/Logo"; import { PayWebViewModal } from "../../../components/wallet/PayWebViewModal"; import { SelectionBox } from "../../../components/wallet/SelectionBox"; import { pagoPaApiUrlPrefix, pagoPaApiUrlPrefixTest } from "../../../config"; -import { confirmButtonProps } from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../../components/buttons/ButtonConfigurations"; import { getValueOrElse, isError, isLoading, isReady -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import { BrandImage } from "../../../features/wallet/component/card/BrandImage"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; diff --git a/ts/screens/wallet/payment/ManualDataInsertionScreen.tsx b/ts/screens/wallet/payment/ManualDataInsertionScreen.tsx index 91a5c6ed8a0..4fbf8e07b65 100644 --- a/ts/screens/wallet/payment/ManualDataInsertionScreen.tsx +++ b/ts/screens/wallet/payment/ManualDataInsertionScreen.tsx @@ -26,7 +26,7 @@ import BaseScreenComponent, { } from "../../../components/screens/BaseScreenComponent"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import { LightModalContextInterface } from "../../../components/ui/LightModal"; -import { cancelButtonProps } from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; import { WalletParamsList } from "../../../navigation/params/WalletParamsList"; diff --git a/ts/screens/wallet/payment/PaymentOutcomeCodeMessage.tsx b/ts/screens/wallet/payment/PaymentOutcomeCodeMessage.tsx index fbfb5e8cbb2..242756d5941 100644 --- a/ts/screens/wallet/payment/PaymentOutcomeCodeMessage.tsx +++ b/ts/screens/wallet/payment/PaymentOutcomeCodeMessage.tsx @@ -14,7 +14,7 @@ import { InfoScreenComponent } from "../../../components/infoScreen/InfoScreenCo import { renderInfoRasterImage } from "../../../components/infoScreen/imageRendering"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import OutcomeCodeMessageComponent from "../../../components/wallet/OutcomeCodeMessageComponent"; -import { cancelButtonProps } from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; import { WalletParamsList } from "../../../navigation/params/WalletParamsList"; diff --git a/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx b/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx index fef3619b2f6..03e68268c12 100644 --- a/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx +++ b/ts/screens/wallet/payment/PickPaymentMethodScreen.tsx @@ -25,11 +25,11 @@ import PickNotAvailablePaymentMethodListItem from "../../../components/wallet/pa import { cancelButtonProps, confirmButtonProps -} from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +} from "../../../components/buttons/ButtonConfigurations"; import { isLoading as isLoadingRemote, isLoading as isRemoteLoading -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import PaymentStatusSwitch from "../../../features/wallet/component/features/PaymentStatusSwitch"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; diff --git a/ts/screens/wallet/payment/PickPspScreen.tsx b/ts/screens/wallet/payment/PickPspScreen.tsx index 5857d77cd89..77554577f80 100644 --- a/ts/screens/wallet/payment/PickPspScreen.tsx +++ b/ts/screens/wallet/payment/PickPspScreen.tsx @@ -19,13 +19,13 @@ import BaseScreenComponent, { import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import { LightModalContextInterface } from "../../../components/ui/LightModal"; import { PspComponent } from "../../../components/wallet/payment/PspComponent"; -import { cancelButtonProps } from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; -import { LoadingErrorComponent } from "../../../features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; +import { LoadingErrorComponent } from "../../../components/LoadingErrorComponent"; import { getValueOrElse, isError, isLoading -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import I18n from "../../../i18n"; import { IOStackNavigationRouteProps } from "../../../navigation/params/AppParamsList"; import { WalletParamsList } from "../../../navigation/params/WalletParamsList"; diff --git a/ts/screens/wallet/payment/ScanQrCodeScreen.tsx b/ts/screens/wallet/payment/ScanQrCodeScreen.tsx index 5a250be313b..78fd4796dfc 100644 --- a/ts/screens/wallet/payment/ScanQrCodeScreen.tsx +++ b/ts/screens/wallet/payment/ScanQrCodeScreen.tsx @@ -35,7 +35,7 @@ import BaseScreenComponent, { import FocusAwareStatusBar from "../../../components/ui/FocusAwareStatusBar"; import FooterWithButtons from "../../../components/ui/FooterWithButtons"; import { CameraMarker } from "../../../components/wallet/CameraMarker"; -import { cancelButtonProps } from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations"; import I18n from "../../../i18n"; import { mixpanelTrack } from "../../../mixpanel"; import { diff --git a/ts/screens/wallet/payment/TransactionErrorScreen.tsx b/ts/screens/wallet/payment/TransactionErrorScreen.tsx index e81c56b09ee..78048ae8ef0 100644 --- a/ts/screens/wallet/payment/TransactionErrorScreen.tsx +++ b/ts/screens/wallet/payment/TransactionErrorScreen.tsx @@ -22,8 +22,8 @@ import BaseScreenComponent from "../../../components/screens/BaseScreenComponent import { cancelButtonProps, confirmButtonProps -} from "../../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; -import { FooterStackButton } from "../../../features/bonus/bonusVacanze/components/buttons/FooterStackButtons"; +} from "../../../components/buttons/ButtonConfigurations"; +import { FooterStackButton } from "../../../components/buttons/FooterStackButtons"; import { zendeskSelectedCategory, zendeskSupportStart diff --git a/ts/screens/wallet/payment/TransactionSummaryScreen.tsx b/ts/screens/wallet/payment/TransactionSummaryScreen.tsx index 4760619d15f..e0c0952019a 100644 --- a/ts/screens/wallet/payment/TransactionSummaryScreen.tsx +++ b/ts/screens/wallet/payment/TransactionSummaryScreen.tsx @@ -25,7 +25,7 @@ import { isError as isRemoteError, isLoading as isRemoteLoading, isUndefined -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import { zendeskSelectedCategory, zendeskSupportStart diff --git a/ts/screens/wallet/payment/__tests__/ConfirmPaymentMethodScreen.test.tsx b/ts/screens/wallet/payment/__tests__/ConfirmPaymentMethodScreen.test.tsx index 22c7bc11053..d70afceef1e 100644 --- a/ts/screens/wallet/payment/__tests__/ConfirmPaymentMethodScreen.test.tsx +++ b/ts/screens/wallet/payment/__tests__/ConfirmPaymentMethodScreen.test.tsx @@ -1,7 +1,7 @@ import { createStore, DeepPartial, Store } from "redux"; import { PspData } from "../../../../../definitions/pagopa/PspData"; import { PayWebViewModal } from "../../../../components/wallet/PayWebViewModal"; -import { remoteReady } from "../../../../features/bonus/bpd/model/RemoteValue"; +import { remoteReady } from "../../../../common/model/RemoteValue"; import I18n from "../../../../i18n"; import ROUTES from "../../../../navigation/routes"; import { appReducer } from "../../../../store/reducers/"; diff --git a/ts/store/actions/types.ts b/ts/store/actions/types.ts index 817caa1a84a..e64628eb068 100644 --- a/ts/store/actions/types.ts +++ b/ts/store/actions/types.ts @@ -9,26 +9,22 @@ import { } from "redux"; import { VersionInfoActions } from "../../common/versionInfo/store/actions/versionInfo"; -import { BonusActions } from "../../features/bonus/bonusVacanze/store/actions/bonusVacanze"; -import { BpdActions } from "../../features/bonus/bpd/store/actions"; -import { CgnActions } from "../../features/bonus/cgn/store/actions"; -import { SvActions } from "../../features/bonus/siciliaVola/store/actions"; +import { BonusActions } from "../../features/bonus/common/store/actions"; import { EuCovidCertActions } from "../../features/euCovidCert/store/actions"; +import { FastLoginActions } from "../../features/fastLogin/store/actions"; +import { FciActions } from "../../features/fci/store/actions"; +import { IdPayActions } from "../../features/idpay/common/store/actions"; +import { LollipopActions } from "../../features/lollipop/store/actions/lollipop"; +import { MessagesActions } from "../../features/messages/store/actions"; +import { PnActions } from "../../features/pn/store/actions"; import { AbiActions } from "../../features/wallet/onboarding/bancomat/store/actions"; import { BPayActions } from "../../features/wallet/onboarding/bancomatPay/store/actions"; import { CoBadgeActions } from "../../features/wallet/onboarding/cobadge/store/actions"; import { PayPalOnboardingActions } from "../../features/wallet/onboarding/paypal/store/actions"; +import { WalletActions as WalletV3Actions } from "../../features/walletV3/common/store/actions"; +import { WhatsNewActions } from "../../features/whatsnew/store/actions"; import { ZendeskSupportActions } from "../../features/zendesk/store/actions"; import { GlobalState } from "../reducers/types"; -import { CdcActions } from "../../features/bonus/cdc/store/actions"; -import { PnActions } from "../../features/pn/store/actions"; -import { FciActions } from "../../features/fci/store/actions"; -import { IdPayActions } from "../../features/idpay/common/store/actions"; -import { LollipopActions } from "../../features/lollipop/store/actions/lollipop"; -import { WhatsNewActions } from "../../features/whatsnew/store/actions"; -import { WalletActions as WalletV3Actions } from "../../features/walletV3/common/store/actions"; -import { FastLoginActions } from "../../features/fastLogin/store/actions"; -import { MessagesActions } from "../../features/messages/store/actions"; import { AnalyticsActions } from "./analytics"; import { ApplicationActions } from "./application"; import { AuthenticationActions } from "./authentication"; @@ -52,11 +48,11 @@ import { ProfileActions } from "./profile"; import { ProfileEmailValidationAction } from "./profileEmailValidationChange"; import { SearchActions } from "./search"; import { ServicesActions } from "./services"; +import { StartupActions } from "./startup"; import { UserDataProcessingActions } from "./userDataProcessing"; import { UserMetadataActions } from "./userMetadata"; import { WalletActions } from "./wallet"; import { OutcomeCodeActions } from "./wallet/outcomeCode"; -import { StartupActions } from "./startup"; export type Action = | AnalyticsActions @@ -87,18 +83,14 @@ export type Action = | UserDataProcessingActions | ProfileEmailValidationAction | BonusActions - | BpdActions | AbiActions | BPayActions | CoBadgeActions | PayPalOnboardingActions | CrossSessionsActions - | CgnActions | EuCovidCertActions | OutcomeCodeActions - | SvActions | ZendeskSupportActions - | CdcActions | PnActions | StartupActions | FciActions diff --git a/ts/store/middlewares/analytics.ts b/ts/store/middlewares/analytics.ts index 943500e27da..e5daa7b821f 100644 --- a/ts/store/middlewares/analytics.ts +++ b/ts/store/middlewares/analytics.ts @@ -2,16 +2,19 @@ // disabled in order to allows comments between the switch import * as O from "fp-ts/lib/Option"; import { getType } from "typesafe-actions"; -import { - loadAllBonusActivations, - loadAvailableBonuses -} from "../../features/bonus/bonusVacanze/store/actions/bonusVacanze"; +import { loadAllBonusActivations } from "../../features/bonus/bonusVacanze/store/actions/bonusVacanze"; import trackBpdAction from "../../features/bonus/bpd/analytics/index"; import trackCdc from "../../features/bonus/cdc/analytics/index"; import trackCgnAction from "../../features/bonus/cgn/analytics/index"; +import { loadAvailableBonuses } from "../../features/bonus/common/store/actions/availableBonusesTypes"; import trackEuCovidCertificateActions from "../../features/euCovidCert/analytics/index"; import trackFciAction from "../../features/fci/analytics"; +import { fciEnvironmentSelector } from "../../features/fci/store/reducers/fciEnvironment"; +import { + migrateToPaginatedMessages, + removeMessages +} from "../../features/messages/store/actions"; import { trackBPayAction } from "../../features/wallet/onboarding/bancomatPay/analytics"; import { trackCoBadgeAction } from "../../features/wallet/onboarding/cobadge/analytics"; import trackPaypalOnboarding from "../../features/wallet/onboarding/paypal/analytics/index"; @@ -46,10 +49,6 @@ import { identificationStart, identificationSuccess } from "../actions/identification"; -import { - migrateToPaginatedMessages, - removeMessages -} from "../../features/messages/store/actions"; import { notificationsInstallationTokenRegistered, updateNotificationInstallationFailure, @@ -109,7 +108,6 @@ import { setFavouriteWalletSuccess, updatePaymentStatus } from "../actions/wallet/wallets"; -import { fciEnvironmentSelector } from "../../features/fci/store/reducers/fciEnvironment"; import { trackContentAction } from "./contentAnalytics"; import { trackServiceAction } from "./serviceAnalytics"; diff --git a/ts/store/reducers/__tests__/content.test.ts b/ts/store/reducers/__tests__/content.test.ts index 23537292f72..f840c4df4a9 100644 --- a/ts/store/reducers/__tests__/content.test.ts +++ b/ts/store/reducers/__tests__/content.test.ts @@ -3,7 +3,7 @@ import { remoteLoading, remoteReady, remoteUndefined -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import { idpsSelector } from "../content"; import { SpidIdp } from "../../../../definitions/content/SpidIdp"; import { idps as mockedIdps } from "../__mock__/idps"; diff --git a/ts/store/reducers/authentication.ts b/ts/store/reducers/authentication.ts index f29eeb973a0..fe30867947b 100644 --- a/ts/store/reducers/authentication.ts +++ b/ts/store/reducers/authentication.ts @@ -23,7 +23,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../features/bonus/bpd/model/RemoteValue"; +} from "../../common/model/RemoteValue"; import { SupportToken } from "../../../definitions/backend/SupportToken"; import { SpidIdp } from "../../../definitions/content/SpidIdp"; import { refreshSessionToken } from "../../features/fastLogin/store/actions/tokenRefreshActions"; diff --git a/ts/store/reducers/content.ts b/ts/store/reducers/content.ts index 9396350eb05..c0ab8cbbcf1 100644 --- a/ts/store/reducers/content.ts +++ b/ts/store/reducers/content.ts @@ -19,7 +19,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../features/bonus/bpd/model/RemoteValue"; +} from "../../common/model/RemoteValue"; import { CodiceCatastale } from "../../types/MunicipalityCodiceCatastale"; import { idps as idpsFallback, LocalIdpsFallback } from "../../utils/idps"; import { getRemoteLocale } from "../../features/messages/utils/messages"; diff --git a/ts/store/reducers/index.ts b/ts/store/reducers/index.ts index 69689a066e0..11e8a2ac658 100644 --- a/ts/store/reducers/index.ts +++ b/ts/store/reducers/index.ts @@ -6,7 +6,7 @@ import { combineReducers, Reducer } from "redux"; import { PersistConfig, persistReducer, purgeStoredState } from "redux-persist"; import { isActionOf } from "typesafe-actions"; import { versionInfoReducer } from "../../common/versionInfo/store/reducers/versionInfo"; -import bonusReducer from "../../features/bonus/bonusVacanze/store/reducers"; +import bonusReducer from "../../features/bonus/common/store/reducers"; import { featuresPersistor } from "../../features/common/store/reducers"; import { lollipopPersistor } from "../../features/lollipop/store"; import { initialLollipopState } from "../../features/lollipop/store/reducers/lollipop"; diff --git a/ts/store/reducers/types.ts b/ts/store/reducers/types.ts index ad042229671..62677fbe2b8 100644 --- a/ts/store/reducers/types.ts +++ b/ts/store/reducers/types.ts @@ -1,7 +1,7 @@ import { PersistPartial } from "redux-persist"; import { VersionInfoState } from "../../common/versionInfo/store/reducers/versionInfo"; -import { BonusState } from "../../features/bonus/bonusVacanze/store/reducers"; +import { BonusState } from "../../features/bonus/common/store/reducers"; import { PersistedFeaturesState } from "../../features/common/store/reducers"; import { PersistedLollipopState } from "../../features/lollipop/store"; import { AppState } from "./appState"; diff --git a/ts/store/reducers/wallet/__tests__/wallets.test.ts b/ts/store/reducers/wallet/__tests__/wallets.test.ts index 8e935e62932..fce0853eeb5 100644 --- a/ts/store/reducers/wallet/__tests__/wallets.test.ts +++ b/ts/store/reducers/wallet/__tests__/wallets.test.ts @@ -3,7 +3,7 @@ import { Errors } from "io-ts"; import * as pot from "@pagopa/ts-commons/lib/pot"; import _ from "lodash"; import { pipe } from "fp-ts/lib/function"; -import { remoteUndefined } from "../../../../features/bonus/bpd/model/RemoteValue"; +import { remoteUndefined } from "../../../../common/model/RemoteValue"; import { CreditCard, isRawCreditCard, diff --git a/ts/store/reducers/wallet/payment.ts b/ts/store/reducers/wallet/payment.ts index 75bd58ac715..4408a704a5b 100644 --- a/ts/store/reducers/wallet/payment.ts +++ b/ts/store/reducers/wallet/payment.ts @@ -10,7 +10,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import { walletAddPaypalRefreshPMToken } from "../../../features/wallet/onboarding/paypal/store/actions"; import { PaymentManagerToken } from "../../../types/pagopa"; import { PotFromActions } from "../../../types/utils"; diff --git a/ts/store/reducers/wallet/wallets.ts b/ts/store/reducers/wallet/wallets.ts index 939c60ffb57..dcbc7c0d19d 100644 --- a/ts/store/reducers/wallet/wallets.ts +++ b/ts/store/reducers/wallet/wallets.ts @@ -14,7 +14,7 @@ import { remoteReady, remoteUndefined, RemoteValue -} from "../../../features/bonus/bpd/model/RemoteValue"; +} from "../../../common/model/RemoteValue"; import { abiSelector } from "../../../features/wallet/onboarding/store/abi"; import { BancomatPaymentMethod, diff --git a/ts/utils/hooks/usePreviewMoreInfo.tsx b/ts/utils/hooks/usePreviewMoreInfo.tsx index 4b8e4ce1cf9..7c1e2f4f31e 100644 --- a/ts/utils/hooks/usePreviewMoreInfo.tsx +++ b/ts/utils/hooks/usePreviewMoreInfo.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import I18n from "../../i18n"; import { Body } from "../../components/core/typography/Body"; import FooterWithButtons from "../../components/ui/FooterWithButtons"; -import { confirmButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations"; +import { confirmButtonProps } from "../../components/buttons/ButtonConfigurations"; import { IOBottomSheetModal, useLegacyIOBottomSheetModal } from "./bottomSheet"; /** diff --git a/ts/utils/supportAssistance.ts b/ts/utils/supportAssistance.ts index 2c90e8d2585..b889880497e 100644 --- a/ts/utils/supportAssistance.ts +++ b/ts/utils/supportAssistance.ts @@ -4,7 +4,7 @@ import { pipe } from "fp-ts/lib/function"; import { ToolEnum } from "../../definitions/content/AssistanceToolConfig"; import { ZendeskCategory } from "../../definitions/content/ZendeskCategory"; import { ZendeskConfig } from "../features/zendesk/store/reducers"; -import { getValueOrElse } from "../features/bonus/bpd/model/RemoteValue"; +import { getValueOrElse } from "../common/model/RemoteValue"; import { zendeskEnabled } from "../config"; export type ZendeskAppConfig = {