@moneylion/react-native-offer-carousel 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Button/index.js +2 -1
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +17 -6
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +6 -3
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js +2 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Divider/index.js +0 -2
- package/lib/commonjs/components/Divider/index.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +0 -2
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +3 -22
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +6 -15
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/SeeAllButton.js +2 -1
- package/lib/commonjs/components/DynamicOffers/SeeAllButton.js.map +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +2 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Modal/AllOffersModal.js +7 -4
- package/lib/commonjs/components/Modal/AllOffersModal.js.map +1 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js +2 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js +2 -1
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/Modal/OfferDetailsModal.js +13 -8
- package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +2 -8
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +3 -1
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Touchable/TouchableOpacity.js +12 -0
- package/lib/commonjs/components/Touchable/TouchableOpacity.js.map +1 -0
- package/lib/commonjs/components/Touchable/index.js +29 -0
- package/lib/commonjs/components/Touchable/index.js.map +1 -0
- package/lib/commonjs/components/utils/withTestID.js +55 -0
- package/lib/commonjs/components/utils/withTestID.js.map +1 -0
- package/lib/commonjs/pageData.js +1 -5
- package/lib/commonjs/pageData.js.map +1 -1
- package/lib/commonjs/services/getDynamicOffers.js +1 -3
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
- package/lib/commonjs/utils/index.js +0 -11
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/components/Button/index.js +2 -1
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js +17 -6
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +6 -3
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
- package/lib/module/components/Common/DynamicOfferCard/index.js +2 -1
- package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -1
- package/lib/module/components/Divider/index.js +0 -2
- package/lib/module/components/Divider/index.js.map +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffers.js +0 -2
- package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +3 -22
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +6 -15
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
- package/lib/module/components/DynamicOffers/SeeAllButton.js +2 -1
- package/lib/module/components/DynamicOffers/SeeAllButton.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/index.js +2 -1
- package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -1
- package/lib/module/components/Modal/AllOffersModal.js +6 -3
- package/lib/module/components/Modal/AllOffersModal.js.map +1 -1
- package/lib/module/components/Modal/DescriptionPoints.js +2 -1
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/module/components/Modal/Disclaimer.js +2 -1
- package/lib/module/components/Modal/Disclaimer.js.map +1 -1
- package/lib/module/components/Modal/OfferDetailsModal.js +13 -8
- package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +2 -8
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/components/Text/index.js +3 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Touchable/TouchableOpacity.js +5 -0
- package/lib/module/components/Touchable/TouchableOpacity.js.map +1 -0
- package/lib/module/components/Touchable/index.js +3 -0
- package/lib/module/components/Touchable/index.js.map +1 -0
- package/lib/module/components/utils/withTestID.js +50 -0
- package/lib/module/components/utils/withTestID.js.map +1 -0
- package/lib/module/pageData.js +2 -6
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getDynamicOffers.js +1 -3
- package/lib/module/services/getDynamicOffers.js.map +1 -1
- package/lib/module/utils/index.js +0 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +3 -2
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +2 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Divider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +1 -3
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts +1 -4
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -3
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/SeeAllButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/AllOffersModal.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +0 -2
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/index.d.ts +2 -1
- package/lib/typescript/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts +7 -0
- package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/src/components/Touchable/index.d.ts +3 -0
- package/lib/typescript/src/components/Touchable/index.d.ts.map +1 -0
- package/lib/typescript/src/components/utils/withTestID.d.ts +4 -0
- package/lib/typescript/src/components/utils/withTestID.d.ts.map +1 -0
- package/lib/typescript/src/pageData.d.ts +0 -1
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +1 -3
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +0 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.tsx +6 -3
- package/src/components/Common/BaseOfferCard/index.tsx +17 -8
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +9 -2
- package/src/components/Common/DynamicOfferCard/index.tsx +1 -0
- package/src/components/Divider/index.tsx +0 -1
- package/src/components/DynamicOffers/DynamicOffers.tsx +0 -4
- package/src/components/DynamicOffers/DynamicOffersContainer.tsx +2 -21
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +16 -28
- package/src/components/DynamicOffers/SeeAllButton.tsx +1 -0
- package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -0
- package/src/components/Modal/AllOffersModal.tsx +3 -1
- package/src/components/Modal/DescriptionPoints.tsx +6 -1
- package/src/components/Modal/Disclaimer.tsx +6 -1
- package/src/components/Modal/OfferDetailsModal.tsx +12 -6
- package/src/components/MoneyLionOfferCarousel.tsx +2 -6
- package/src/components/Text/index.tsx +7 -2
- package/src/components/Touchable/TouchableOpacity.tsx +15 -0
- package/src/components/Touchable/index.ts +2 -0
- package/src/components/utils/withTestID.tsx +56 -0
- package/src/pageData.ts +0 -6
- package/src/services/getDynamicOffers.ts +1 -5
- package/src/utils/index.ts +0 -1
- package/lib/commonjs/utils/getOffersBasedOnLayout.js +0 -48
- package/lib/commonjs/utils/getOffersBasedOnLayout.js.map +0 -1
- package/lib/commonjs/utils/layouts.js +0 -27
- package/lib/commonjs/utils/layouts.js.map +0 -1
- package/lib/module/utils/getOffersBasedOnLayout.js +0 -39
- package/lib/module/utils/getOffersBasedOnLayout.js.map +0 -1
- package/lib/module/utils/layouts.js +0 -20
- package/lib/module/utils/layouts.js.map +0 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +0 -26
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +0 -1
- package/lib/typescript/src/utils/layouts.d.ts +0 -19
- package/lib/typescript/src/utils/layouts.d.ts.map +0 -1
- package/src/utils/getOffersBasedOnLayout.ts +0 -51
- package/src/utils/layouts.ts +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAQzC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AA+PF,eAAO,MAAM,sBAAsB,UAC3B,2BAA2B,GACjC,KAAK,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,sBAa5D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type TextStyle, type StyleProp, type TextProps as RNTextProps } from "react-native";
|
|
2
|
+
import { Text as RNText, type TextStyle, type StyleProp, type TextProps as RNTextProps } from "react-native";
|
|
3
3
|
import { type ThemeColors } from "../../context/ThemeProvider";
|
|
4
4
|
export type Variant = "title-1" | "title-2" | "title-3" | "title-4" | "title-5" | "title-6" | "featured-1" | "featured-2" | "featured-3" | "body-1" | "body-2" | "body-3" | "caption-1" | "caption-2";
|
|
5
5
|
export type TextDecoration = "line-through";
|
|
@@ -12,6 +12,7 @@ export interface TextProps extends Omit<RNTextProps, "style"> {
|
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
style?: StyleProp<TextStyle>;
|
|
14
14
|
}
|
|
15
|
+
export type TextRef = React.ElementRef<typeof RNText>;
|
|
15
16
|
declare const Text: React.FC<TextProps>;
|
|
16
17
|
export default Text;
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,IAAI,IAAI,MAAM,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,IAAI,WAAW,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIzE,MAAM,MAAM,OAAO,GAChB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,WAAW,CAAC;AAGf,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAG5C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGtD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAItD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgD7B,CAAC;AAwEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TouchableOpacity as RNTouchableOpacity } from "react-native";
|
|
3
|
+
export type TouchableOpacityProps = React.ComponentProps<typeof RNTouchableOpacity>;
|
|
4
|
+
export type TouchableOpacityRef = React.ElementRef<typeof RNTouchableOpacity>;
|
|
5
|
+
declare const TouchableOpacity: import("react").ForwardRefExoticComponent<import("react-native").TouchableOpacityProps & Pick<import("react-native").AccessibilityProps, "accessibilityLabel"> & Pick<import("react-native").ViewProps, "testID"> & import("react").RefAttributes<RNTouchableOpacity>>;
|
|
6
|
+
export default TouchableOpacity;
|
|
7
|
+
//# sourceMappingURL=TouchableOpacity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableOpacity.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/TouchableOpacity.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAItE,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CACvD,OAAO,kBAAkB,CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9E,QAAA,MAAM,gBAAgB,wQAErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare function withTestID<P extends object, R = unknown>(Component: React.ComponentType<P & React.RefAttributes<R>>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P & Pick<import("react-native").AccessibilityProps, "accessibilityLabel"> & Pick<import("react-native").ViewProps, "testID">> & React.RefAttributes<R>>;
|
|
3
|
+
export default withTestID;
|
|
4
|
+
//# sourceMappingURL=withTestID.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTestID.d.ts","sourceRoot":"","sources":["../../../../../src/components/utils/withTestID.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA8B1B,iBAAS,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,EAChD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,iNAqB1D;AAGD,eAAe,UAAU,CAAC"}
|
|
@@ -15,7 +15,6 @@ export declare function getPageData({ context, params, onRateTableSubmit, }: Get
|
|
|
15
15
|
currentCountry: string | undefined;
|
|
16
16
|
showCardBorder: boolean | undefined;
|
|
17
17
|
showProductTypeLabel: boolean | undefined;
|
|
18
|
-
displayLayout: "fixed" | "carousel";
|
|
19
18
|
}>;
|
|
20
19
|
export {};
|
|
21
20
|
//# sourceMappingURL=pageData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAU7E,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,GACjB,EAAE,gBAAgB;;;;;;;;;GAuElB"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type Layout } from "../utils";
|
|
2
1
|
import type { GetProductTypesProps, ProductTypesResult } from "./getProductTypes";
|
|
3
2
|
import type { PartnerOverride, ProductTypeDefinition } from "../capabilities/offer-catalog/src";
|
|
4
3
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
5
4
|
export type GetDynamicOffersProps = {
|
|
6
5
|
tags: string;
|
|
7
|
-
displayLayout: Layout;
|
|
8
6
|
productTypes: string[];
|
|
9
7
|
resultType: ProductTypesResult["resultType"];
|
|
10
8
|
isCachedOffersRequest: boolean;
|
|
@@ -18,7 +16,7 @@ export type GetDynamicOffersProps = {
|
|
|
18
16
|
* @param {GetDynamicOffersProps} params - The parameters for retrieving dynamic offers.
|
|
19
17
|
* @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
|
|
20
18
|
*/
|
|
21
|
-
export declare const getDynamicOffers: ({ tags,
|
|
19
|
+
export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes, resultType, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
|
|
22
20
|
offers: import("../capabilities/offer-catalog/src").BaseOffer[];
|
|
23
21
|
isError: boolean | undefined;
|
|
24
22
|
errorCode: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;CACpB,GAAG,IAAI,CACP,oBAAoB,EAClB,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,gBAAgB,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,gJAS1B,KAAK,qBAAqB,EAAE,OAAO,CAAC;;;;;;EA6CtC,CAAC"}
|
|
@@ -2,7 +2,6 @@ export * from "./addClientTagsToOfferLinks";
|
|
|
2
2
|
export * from "./getDefaultProductType";
|
|
3
3
|
export * from "./getOffersByProductTypes";
|
|
4
4
|
export * from "./getProductTypesDefinition";
|
|
5
|
-
export * from "./layouts";
|
|
6
5
|
export * from "./resolveProductTypes";
|
|
7
6
|
export * from "./selectDynamicOffers";
|
|
8
7
|
export * from "./sortOffersByRecommendationScore";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React, { forwardRef, type ReactNode } from "react";
|
|
2
2
|
import {
|
|
3
|
-
TouchableOpacity,
|
|
4
3
|
View,
|
|
5
4
|
StyleSheet,
|
|
6
5
|
ActivityIndicator,
|
|
7
6
|
type StyleProp,
|
|
8
7
|
type ViewStyle,
|
|
9
|
-
type TouchableOpacityProps,
|
|
10
8
|
} from "react-native";
|
|
11
9
|
import { useTheme, type ThemeColors } from "../../context/ThemeProvider";
|
|
12
10
|
import Text, { type Variant } from "../Text";
|
|
11
|
+
import {
|
|
12
|
+
TouchableOpacity,
|
|
13
|
+
type TouchableOpacityProps,
|
|
14
|
+
type TouchableOpacityRef,
|
|
15
|
+
} from "../Touchable";
|
|
13
16
|
|
|
14
17
|
// Helper function to determine text color based on background color
|
|
15
18
|
const getContrastColor = (hexColor: string): string => {
|
|
@@ -42,7 +45,7 @@ export interface ButtonProps extends TouchableOpacityProps {
|
|
|
42
45
|
textFontWeight?: "normal" | "medium" | "bold";
|
|
43
46
|
}
|
|
44
47
|
|
|
45
|
-
const Button = forwardRef<
|
|
48
|
+
const Button = forwardRef<TouchableOpacityRef, ButtonProps>((props, ref) => {
|
|
46
49
|
const {
|
|
47
50
|
color,
|
|
48
51
|
highlighted = false,
|
|
@@ -11,6 +11,7 @@ import { Dimensions, StyleSheet } from "react-native";
|
|
|
11
11
|
import { ThumborImage } from "../../../capabilities/ui/elements/src";
|
|
12
12
|
import { arrayToMarkdownList } from "../../../capabilities/offer-catalog/src";
|
|
13
13
|
import { MarkdownText } from "../../../capabilities/ui/elements/src/components/MarkdownText";
|
|
14
|
+
import { useTheme } from "../../../context/ThemeProvider";
|
|
14
15
|
|
|
15
16
|
const CardWidth = 282;
|
|
16
17
|
|
|
@@ -24,7 +25,7 @@ const BaseOfferCard = ({
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<View
|
|
27
|
-
borderColor={showCardBorder ? "
|
|
28
|
+
borderColor={showCardBorder ? "borderNeutral" : undefined}
|
|
28
29
|
direction={"column"}
|
|
29
30
|
backgroundColor={"backgroundElevationBase"}
|
|
30
31
|
width={fullCardWidth ? screenWidth - 32 : CardWidth} // 32 = left(16) + right(16) margin of the card
|
|
@@ -118,13 +119,18 @@ const PartnerImage = (
|
|
|
118
119
|
);
|
|
119
120
|
};
|
|
120
121
|
|
|
121
|
-
const TopContainer = ({ children, ...viewProps }: ViewProps) =>
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
const TopContainer = ({ children, ...viewProps }: ViewProps) => {
|
|
123
|
+
const themeContext = useTheme();
|
|
124
|
+
const theme = themeContext?.theme || {};
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
return (
|
|
127
|
+
<View {...viewProps} gap={3} direction={"column"}>
|
|
128
|
+
{children}
|
|
129
|
+
|
|
130
|
+
<Divider color={theme.borderNeutral} />
|
|
131
|
+
</View>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
128
134
|
|
|
129
135
|
const TopBar = ({ children, ...viewProps }: ViewProps) => (
|
|
130
136
|
<View
|
|
@@ -211,6 +217,9 @@ const DescriptionHandler = ({
|
|
|
211
217
|
contentDescription?: string;
|
|
212
218
|
hasDivider?: boolean;
|
|
213
219
|
}) => {
|
|
220
|
+
const themeContext = useTheme();
|
|
221
|
+
const theme = themeContext?.theme || {};
|
|
222
|
+
|
|
214
223
|
const renderContentDescription = () => {
|
|
215
224
|
if (descriptionPoints.length > 0) {
|
|
216
225
|
return (
|
|
@@ -236,7 +245,7 @@ const DescriptionHandler = ({
|
|
|
236
245
|
|
|
237
246
|
return (
|
|
238
247
|
<View gap={3} direction={"column"}>
|
|
239
|
-
{hasDivider && <Divider />}
|
|
248
|
+
{hasDivider && <Divider color={theme.borderNeutral} />}
|
|
240
249
|
{renderContentDescription()}
|
|
241
250
|
</View>
|
|
242
251
|
);
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import React, { useCallback, useState } from "react";
|
|
2
2
|
import Text from "../../Text";
|
|
3
|
-
import {
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
4
|
import { OfferDetailsModal } from "../../Modal/OfferDetailsModal";
|
|
5
5
|
import { useEventHandler } from "../../../context/EventHandlerProvider";
|
|
6
6
|
import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
|
|
7
7
|
import { getEventCallbackContext } from "../../../capabilities/offer-catalog/src/utils/getEventCallbackContext";
|
|
8
|
+
import { TouchableOpacity } from "../../Touchable";
|
|
8
9
|
|
|
9
10
|
export type SeeMoreProps = {
|
|
10
11
|
offer: BaseOffer;
|
|
11
12
|
offerIndex: number;
|
|
12
13
|
isHorizontalScroll?: boolean;
|
|
14
|
+
testID?: string;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export const SeeMore = ({
|
|
16
18
|
offer,
|
|
17
19
|
offerIndex,
|
|
18
20
|
isHorizontalScroll = true,
|
|
21
|
+
testID,
|
|
19
22
|
}: SeeMoreProps) => {
|
|
20
23
|
const [modalVisible, setModalVisible] = useState(false);
|
|
21
24
|
const {
|
|
@@ -59,7 +62,11 @@ export const SeeMore = ({
|
|
|
59
62
|
|
|
60
63
|
return (
|
|
61
64
|
<>
|
|
62
|
-
<TouchableOpacity
|
|
65
|
+
<TouchableOpacity
|
|
66
|
+
onPress={handleMoreInfoClick}
|
|
67
|
+
style={styles.container}
|
|
68
|
+
testID={testID}
|
|
69
|
+
>
|
|
63
70
|
<Text
|
|
64
71
|
variant={"body-3"}
|
|
65
72
|
color={"foregroundNeutral"}
|
|
@@ -2,13 +2,11 @@ import React from "react";
|
|
|
2
2
|
import { productTypeBuilder } from "../../builder/builder";
|
|
3
3
|
import { DynamicOffersRender, FallbackOfferTemplate } from "./Render";
|
|
4
4
|
import type { DynamicOffersRenderProps } from "./Render/DynamicOffersRender";
|
|
5
|
-
import type { Layout } from "../../utils";
|
|
6
5
|
import { View } from "react-native";
|
|
7
6
|
|
|
8
7
|
export type DynamicOfferProps = {
|
|
9
8
|
title?: string;
|
|
10
9
|
subtitle?: string;
|
|
11
|
-
displayLayout: Layout;
|
|
12
10
|
showCardBorder: boolean;
|
|
13
11
|
showProductTypeLabel?: boolean;
|
|
14
12
|
shouldHideFooter: boolean;
|
|
@@ -24,7 +22,6 @@ export type DynamicOfferProps = {
|
|
|
24
22
|
export const DynamicOffers = ({
|
|
25
23
|
title,
|
|
26
24
|
subtitle,
|
|
27
|
-
displayLayout,
|
|
28
25
|
showCardBorder,
|
|
29
26
|
showProductTypeLabel,
|
|
30
27
|
// shouldHideFooter,
|
|
@@ -48,7 +45,6 @@ export const DynamicOffers = ({
|
|
|
48
45
|
title={title}
|
|
49
46
|
subtitle={subtitle}
|
|
50
47
|
offers={offers}
|
|
51
|
-
displayLayout={displayLayout}
|
|
52
48
|
fallbackTemplate={FallbackOfferTemplate}
|
|
53
49
|
productTypeBuilder={productTypeBuilder}
|
|
54
50
|
showCardBorder={showCardBorder}
|
|
@@ -1,34 +1,15 @@
|
|
|
1
1
|
import React, { Suspense } from "react";
|
|
2
|
-
import { match } from "ts-pattern";
|
|
3
|
-
import type { Layout } from "../../utils";
|
|
4
2
|
import { DynamicOffers, type DynamicOfferProps } from "./DynamicOffers";
|
|
5
3
|
import Skeleton from "../Skeleton";
|
|
6
|
-
import { View, StyleSheet } from "react-native";
|
|
7
4
|
|
|
8
|
-
export const DynamicOfferSkeleton = React.memo(
|
|
9
|
-
({ displayLayout = "carousel" }: { displayLayout?: Layout }) =>
|
|
10
|
-
match(displayLayout)
|
|
11
|
-
.with("fixed", () => <Skeleton height={300} />)
|
|
12
|
-
.otherwise(() => (
|
|
13
|
-
<View style={styles.skeletonContainer}>
|
|
14
|
-
<Skeleton height={10} width={73} />
|
|
15
|
-
<Skeleton height={300} />
|
|
16
|
-
</View>
|
|
17
|
-
))
|
|
18
|
-
);
|
|
5
|
+
export const DynamicOfferSkeleton = React.memo(() => <Skeleton height={300} />);
|
|
19
6
|
|
|
20
7
|
export const DynamicOffersContainer = React.memo(
|
|
21
8
|
({ config }: { config: DynamicOfferProps }) => {
|
|
22
9
|
return (
|
|
23
|
-
<Suspense
|
|
24
|
-
fallback={<DynamicOfferSkeleton displayLayout={config.displayLayout} />}
|
|
25
|
-
>
|
|
10
|
+
<Suspense fallback={<DynamicOfferSkeleton />}>
|
|
26
11
|
<DynamicOffers {...config} />
|
|
27
12
|
</Suspense>
|
|
28
13
|
);
|
|
29
14
|
}
|
|
30
15
|
);
|
|
31
|
-
|
|
32
|
-
const styles = StyleSheet.create({
|
|
33
|
-
skeletonContainer: { gap: 2, width: "100%" },
|
|
34
|
-
});
|
|
@@ -5,7 +5,6 @@ import React, {
|
|
|
5
5
|
useRef,
|
|
6
6
|
useState,
|
|
7
7
|
} from "react";
|
|
8
|
-
import type { Layout } from "../../../utils";
|
|
9
8
|
import { productTypeBuilder as builder } from "../../../builder/builder";
|
|
10
9
|
import { Offer } from "./Offer";
|
|
11
10
|
import {
|
|
@@ -29,7 +28,6 @@ export type DynamicOffersRenderProps = {
|
|
|
29
28
|
title?: string;
|
|
30
29
|
subtitle?: string;
|
|
31
30
|
offers: BaseOffer[];
|
|
32
|
-
displayLayout: Layout;
|
|
33
31
|
fallbackTemplate?: React.FC<{
|
|
34
32
|
offer: BaseOffer;
|
|
35
33
|
showProductTypeLabel?: boolean;
|
|
@@ -50,7 +48,6 @@ export const DynamicOffersRender = ({
|
|
|
50
48
|
title,
|
|
51
49
|
subtitle,
|
|
52
50
|
offers,
|
|
53
|
-
displayLayout,
|
|
54
51
|
productTypeBuilder = builder,
|
|
55
52
|
fallbackTemplate,
|
|
56
53
|
showCardBorder,
|
|
@@ -268,32 +265,18 @@ export const DynamicOffersRender = ({
|
|
|
268
265
|
const fullCardWidth = offers.length === 1 || !isHorizontalScroll;
|
|
269
266
|
|
|
270
267
|
// Create offer components
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
fullCardWidth,
|
|
281
|
-
isHorizontalScroll,
|
|
282
|
-
}),
|
|
283
|
-
]
|
|
284
|
-
: Offer({
|
|
285
|
-
productTypeBuilder,
|
|
286
|
-
offers,
|
|
287
|
-
showProductTypeLabel,
|
|
288
|
-
fallbackTemplate,
|
|
289
|
-
showCardBorder,
|
|
290
|
-
fullCardWidth,
|
|
291
|
-
isHorizontalScroll,
|
|
292
|
-
});
|
|
268
|
+
return Offer({
|
|
269
|
+
productTypeBuilder,
|
|
270
|
+
offers,
|
|
271
|
+
showProductTypeLabel,
|
|
272
|
+
fallbackTemplate,
|
|
273
|
+
showCardBorder,
|
|
274
|
+
fullCardWidth,
|
|
275
|
+
isHorizontalScroll,
|
|
276
|
+
});
|
|
293
277
|
}, [
|
|
294
278
|
offers,
|
|
295
279
|
isHorizontalScroll,
|
|
296
|
-
displayLayout,
|
|
297
280
|
productTypeBuilder,
|
|
298
281
|
showProductTypeLabel,
|
|
299
282
|
fallbackTemplate,
|
|
@@ -348,7 +331,6 @@ export const DynamicOffersRender = ({
|
|
|
348
331
|
const config = {
|
|
349
332
|
title,
|
|
350
333
|
subtitle,
|
|
351
|
-
displayLayout,
|
|
352
334
|
showCardBorder,
|
|
353
335
|
showProductTypeLabel,
|
|
354
336
|
shouldHideFooter: false,
|
|
@@ -369,7 +351,12 @@ export const DynamicOffersRender = ({
|
|
|
369
351
|
{showHeaderText && (
|
|
370
352
|
<View style={styles.headerTextContainer}>
|
|
371
353
|
{showTitle && (
|
|
372
|
-
<Text
|
|
354
|
+
<Text
|
|
355
|
+
variant="featured-3"
|
|
356
|
+
weight="bold"
|
|
357
|
+
color="foregroundNeutral"
|
|
358
|
+
testID="offer_carousel.dynamic_offers.title"
|
|
359
|
+
>
|
|
373
360
|
{title}
|
|
374
361
|
</Text>
|
|
375
362
|
)}
|
|
@@ -392,6 +379,7 @@ export const DynamicOffersRender = ({
|
|
|
392
379
|
)}
|
|
393
380
|
{isHorizontalScroll ? (
|
|
394
381
|
<ScrollView
|
|
382
|
+
scrollEnabled={wrappedOfferComponents?.length > 1}
|
|
395
383
|
horizontal={true}
|
|
396
384
|
showsHorizontalScrollIndicator={false}
|
|
397
385
|
contentContainerStyle={styles.contentContainer}
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
View,
|
|
5
5
|
SafeAreaView,
|
|
6
6
|
ScrollView,
|
|
7
|
-
TouchableOpacity,
|
|
8
7
|
StyleSheet,
|
|
9
8
|
Linking,
|
|
10
9
|
type LayoutChangeEvent,
|
|
@@ -15,6 +14,7 @@ import Text from "../Text";
|
|
|
15
14
|
import { DynamicOffersContainer } from "../DynamicOffers/DynamicOffersContainer";
|
|
16
15
|
import type { DynamicOfferProps } from "../DynamicOffers/DynamicOffers";
|
|
17
16
|
import { useTheme } from "../../context/ThemeProvider";
|
|
17
|
+
import { TouchableOpacity } from "../Touchable";
|
|
18
18
|
|
|
19
19
|
type AllOffersModalProps = {
|
|
20
20
|
visible: boolean;
|
|
@@ -114,6 +114,7 @@ export const AllOffersModal = ({
|
|
|
114
114
|
onPress={onClose}
|
|
115
115
|
style={styles.closeXButton}
|
|
116
116
|
hitSlop={{ top: 15, right: 15, bottom: 15, left: 15 }}
|
|
117
|
+
testID="offer_carousel.all_offers_modal.close_button"
|
|
117
118
|
>
|
|
118
119
|
<Text style={styles.closeXText} color={"foregroundNeutral"}>
|
|
119
120
|
✕
|
|
@@ -124,6 +125,7 @@ export const AllOffersModal = ({
|
|
|
124
125
|
weight="bold"
|
|
125
126
|
color={"foregroundNeutral"}
|
|
126
127
|
style={styles.headerTitle}
|
|
128
|
+
testID="offer_carousel.all_offers_modal.title"
|
|
127
129
|
>
|
|
128
130
|
{title}
|
|
129
131
|
</Text>
|
|
@@ -11,7 +11,12 @@ export function DescriptionPoints({
|
|
|
11
11
|
}) {
|
|
12
12
|
return (
|
|
13
13
|
<View gap={8}>
|
|
14
|
-
<Text
|
|
14
|
+
<Text
|
|
15
|
+
variant={"body-3"}
|
|
16
|
+
weight={"bold"}
|
|
17
|
+
color={"foregroundNeutral"}
|
|
18
|
+
testID="offer_carousel.offer_details_modal.offer_details_title"
|
|
19
|
+
>
|
|
15
20
|
Offer Details
|
|
16
21
|
</Text>
|
|
17
22
|
<MarkdownText
|
|
@@ -6,7 +6,12 @@ import { MarkdownText } from "../../capabilities/ui/elements/src/components/Mark
|
|
|
6
6
|
export function Disclaimer({ disclaimer }: { disclaimer: string }) {
|
|
7
7
|
return (
|
|
8
8
|
<View gap={16}>
|
|
9
|
-
<Text
|
|
9
|
+
<Text
|
|
10
|
+
variant={"body-3"}
|
|
11
|
+
weight={"bold"}
|
|
12
|
+
color={"foregroundNeutral"}
|
|
13
|
+
testID="offer_carousel.offer_details_modal.provider_disclaimer_title"
|
|
14
|
+
>
|
|
10
15
|
Provider Disclaimer
|
|
11
16
|
</Text>
|
|
12
17
|
<MarkdownText
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
View,
|
|
5
5
|
SafeAreaView,
|
|
6
6
|
ScrollView,
|
|
7
|
-
TouchableOpacity,
|
|
8
7
|
StyleSheet,
|
|
9
8
|
StatusBar,
|
|
10
9
|
Platform,
|
|
@@ -16,6 +15,7 @@ import { CallToAction } from "../Common/DynamicOfferCard/CallToAction";
|
|
|
16
15
|
import Divider from "../Divider";
|
|
17
16
|
import type { BaseOffer } from "../../capabilities/offer-catalog/src";
|
|
18
17
|
import { useTheme } from "../../context/ThemeProvider";
|
|
18
|
+
import { TouchableOpacity } from "../Touchable";
|
|
19
19
|
|
|
20
20
|
type OfferDetailsModalProps = {
|
|
21
21
|
visible: boolean;
|
|
@@ -32,7 +32,7 @@ export const OfferDetailsModal = ({
|
|
|
32
32
|
onClose,
|
|
33
33
|
offerIndex,
|
|
34
34
|
}: OfferDetailsModalProps) => {
|
|
35
|
-
const { theme } = useTheme();
|
|
35
|
+
const { theme, isDarkTheme } = useTheme();
|
|
36
36
|
|
|
37
37
|
const showDescriptionPoints = Boolean(offer?.descriptionPoints?.length);
|
|
38
38
|
|
|
@@ -45,7 +45,7 @@ export const OfferDetailsModal = ({
|
|
|
45
45
|
return (
|
|
46
46
|
<Modal
|
|
47
47
|
animationType="slide"
|
|
48
|
-
transparent={
|
|
48
|
+
transparent={true}
|
|
49
49
|
visible={visible}
|
|
50
50
|
onRequestClose={onClose}
|
|
51
51
|
statusBarTranslucent={true}
|
|
@@ -54,15 +54,21 @@ export const OfferDetailsModal = ({
|
|
|
54
54
|
{visible && (
|
|
55
55
|
<StatusBar
|
|
56
56
|
backgroundColor={backgroundColor}
|
|
57
|
-
barStyle={"dark-content"}
|
|
57
|
+
barStyle={isDarkTheme ? "light-content" : "dark-content"}
|
|
58
58
|
translucent={false}
|
|
59
59
|
/>
|
|
60
60
|
)}
|
|
61
|
-
<View
|
|
61
|
+
<View
|
|
62
|
+
style={[
|
|
63
|
+
styles.modalHeader,
|
|
64
|
+
{ borderBottomColor: theme.borderNeutral },
|
|
65
|
+
]}
|
|
66
|
+
>
|
|
62
67
|
<TouchableOpacity
|
|
63
68
|
onPress={onClose}
|
|
64
69
|
style={styles.closeXButton}
|
|
65
70
|
hitSlop={{ top: 15, right: 15, bottom: 15, left: 15 }}
|
|
71
|
+
testID="offer_carousel.offer_details_modal.close_button"
|
|
66
72
|
>
|
|
67
73
|
<Text
|
|
68
74
|
style={[styles.closeXText, { color: theme.foregroundNeutral }]}
|
|
@@ -89,6 +95,7 @@ export const OfferDetailsModal = ({
|
|
|
89
95
|
overrideUrl={offer.overrideUrl}
|
|
90
96
|
style={styles.cta}
|
|
91
97
|
context={"offer_details"}
|
|
98
|
+
testID="offer_carousel.offer_details_modal.cta"
|
|
92
99
|
>
|
|
93
100
|
{CTA_LABEL}
|
|
94
101
|
</CallToAction>
|
|
@@ -108,7 +115,6 @@ const styles = StyleSheet.create({
|
|
|
108
115
|
paddingHorizontal: 16,
|
|
109
116
|
paddingBottom: 32,
|
|
110
117
|
borderBottomWidth: 1,
|
|
111
|
-
borderBottomColor: "#e0e0e0",
|
|
112
118
|
position: "relative",
|
|
113
119
|
},
|
|
114
120
|
closeXButton: {
|
|
@@ -2,7 +2,6 @@ import React, { useEffect, useMemo, useState } from "react";
|
|
|
2
2
|
import { localCnfContext } from "../config/mocks/cnfContext";
|
|
3
3
|
import { Text } from "react-native";
|
|
4
4
|
import { getPageData } from "../pageData";
|
|
5
|
-
import type { Layout } from "../utils";
|
|
6
5
|
import {
|
|
7
6
|
DynamicOffersContainer,
|
|
8
7
|
DynamicOfferSkeleton,
|
|
@@ -34,7 +33,6 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
34
33
|
productType?: string;
|
|
35
34
|
query?: string;
|
|
36
35
|
tags?: string;
|
|
37
|
-
displayLayout?: Layout;
|
|
38
36
|
staticProductTypes?: string;
|
|
39
37
|
fontFamily?: Partial<FontFamily>;
|
|
40
38
|
showProductTypeLabel?: boolean;
|
|
@@ -247,7 +245,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
247
245
|
);
|
|
248
246
|
|
|
249
247
|
if (isLoading) {
|
|
250
|
-
return <DynamicOfferSkeleton
|
|
248
|
+
return <DynamicOfferSkeleton />;
|
|
251
249
|
}
|
|
252
250
|
|
|
253
251
|
if (error) {
|
|
@@ -259,12 +257,11 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
259
257
|
}
|
|
260
258
|
|
|
261
259
|
if (!pageData) {
|
|
262
|
-
return <DynamicOfferSkeleton
|
|
260
|
+
return <DynamicOfferSkeleton />;
|
|
263
261
|
}
|
|
264
262
|
|
|
265
263
|
const {
|
|
266
264
|
shouldHideFooter,
|
|
267
|
-
displayLayout,
|
|
268
265
|
showProductTypeLabel,
|
|
269
266
|
showCardBorder,
|
|
270
267
|
offers,
|
|
@@ -275,7 +272,6 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
275
272
|
const config: DynamicOfferProps = {
|
|
276
273
|
offers,
|
|
277
274
|
shouldHideFooter,
|
|
278
|
-
displayLayout,
|
|
279
275
|
showProductTypeLabel,
|
|
280
276
|
showCardBorder,
|
|
281
277
|
title,
|