@moneylion/react-native-offer-carousel 1.0.1 → 1.0.3

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.
Files changed (79) hide show
  1. package/lib/commonjs/builder/builder.js +356 -0
  2. package/lib/commonjs/builder/builder.js.map +1 -0
  3. package/lib/commonjs/builder/config/types.js +2 -0
  4. package/lib/commonjs/builder/config/types.js.map +1 -0
  5. package/lib/commonjs/builder/index.js +28 -0
  6. package/lib/commonjs/builder/index.js.map +1 -0
  7. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +0 -2
  8. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
  9. package/lib/commonjs/components/Cards/VideosCard/VideoContent.js +35 -37
  10. package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +1 -1
  11. package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +1 -1
  12. package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +1 -1
  13. package/lib/commonjs/components/Modal/OfferDetailsModal.js +9 -3
  14. package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -1
  15. package/lib/module/builder/builder.js +350 -0
  16. package/lib/module/builder/builder.js.map +1 -0
  17. package/lib/module/builder/config/types.js +2 -0
  18. package/lib/module/builder/config/types.js.map +1 -0
  19. package/lib/module/builder/index.js +3 -0
  20. package/lib/module/builder/index.js.map +1 -0
  21. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +0 -1
  22. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
  23. package/lib/module/components/Cards/VideosCard/VideoContent.js +35 -30
  24. package/lib/module/components/Cards/VideosCard/VideoContent.js.map +1 -1
  25. package/lib/module/components/DynamicOffers/DynamicOffers.js +1 -1
  26. package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
  27. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +1 -1
  28. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
  29. package/lib/module/components/Modal/OfferDetailsModal.js +10 -4
  30. package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -1
  31. package/lib/typescript/{builder → src/builder}/builder.d.ts +2 -2
  32. package/lib/typescript/src/builder/builder.d.ts.map +1 -0
  33. package/lib/typescript/src/builder/config/types.d.ts.map +1 -0
  34. package/lib/typescript/src/builder/index.d.ts.map +1 -0
  35. package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts +1 -1
  36. package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -1
  37. package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts +1 -1
  38. package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -1
  39. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -1
  40. package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts +0 -8
  41. package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +1 -1
  42. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -1
  43. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
  44. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +1 -1
  45. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
  46. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +1 -1
  47. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
  48. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +1 -1
  49. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
  50. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +1 -1
  51. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
  52. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +1 -1
  53. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
  54. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +1 -1
  55. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
  56. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
  57. package/package.json +4 -9
  58. package/src/builder/builder.ts +500 -0
  59. package/src/builder/config/types.ts +107 -0
  60. package/src/builder/index.ts +2 -0
  61. package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +1 -1
  62. package/src/capabilities/configuration/src/brands/types.ts +1 -1
  63. package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +1 -1
  64. package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +0 -1
  65. package/src/components/Cards/VideosCard/VideoContent.tsx +32 -34
  66. package/src/components/DynamicOffers/DynamicOffers.tsx +1 -1
  67. package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +1 -1
  68. package/src/components/DynamicOffers/Render/Offer.tsx +1 -1
  69. package/src/components/Layouts/CreditCardOfferCard/index.tsx +1 -1
  70. package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +1 -1
  71. package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -1
  72. package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +1 -1
  73. package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +1 -1
  74. package/src/components/Modal/OfferDetailsModal.tsx +11 -0
  75. package/lib/typescript/builder/builder.d.ts.map +0 -1
  76. package/lib/typescript/builder/config/types.d.ts.map +0 -1
  77. package/lib/typescript/builder/index.d.ts.map +0 -1
  78. /package/lib/typescript/{builder → src/builder}/config/types.d.ts +0 -0
  79. /package/lib/typescript/{builder → src/builder}/index.d.ts +0 -0
@@ -1,38 +1,36 @@
1
- "use client";
1
+ // "use client";
2
2
 
3
- import { memo } from "react";
4
- import { Actionable, Tooltip, View } from "reshaped";
5
- // TODO: import VideoPlayer from "../../VideoPlayer/VideoPlayer";
6
- import React from "react";
7
- import Text from "../../Text";
3
+ // import { memo } from "react";
4
+ // import React from "react";
5
+ // import Text from "../../Text";
8
6
 
9
- type Video = {
10
- muxId: string;
11
- subtitle: string;
12
- };
7
+ // type Video = {
8
+ // muxId: string;
9
+ // subtitle: string;
10
+ // };
13
11
 
14
- export type VideoContentProps = Video;
12
+ // export type VideoContentProps = Video;
15
13
 
16
- export const VideoContent = memo(({ muxId, subtitle }: VideoContentProps) => (
17
- <View gap={2} direction="column" width={27}>
18
- <View width={27} height={48} borderRadius="large">
19
- {/* TODO: Add the video player logic */}
20
- <View key={`${muxId}`} />
21
- {/* <VideoPlayer playbackId={muxId} /> */}
22
- </View>
23
- <Tooltip text={subtitle}>
24
- {(attributes) => (
25
- <Actionable attributes={attributes} as="div">
26
- <Text
27
- variant="caption-2"
28
- weight="medium"
29
- color="neutral-faded"
30
- numberOfLines={2}
31
- >
32
- {subtitle}
33
- </Text>
34
- </Actionable>
35
- )}
36
- </Tooltip>
37
- </View>
38
- ));
14
+ // export const VideoContent = memo(({ muxId, subtitle }: VideoContentProps) => (
15
+ // <View gap={2} direction="column" width={27}>
16
+ // <View width={27} height={48} borderRadius="large">
17
+ // {/* TODO: Add the video player logic */}
18
+ // <View key={`${muxId}`} />
19
+ // {/* <VideoPlayer playbackId={muxId} /> */}
20
+ // </View>
21
+ // <Tooltip text={subtitle}>
22
+ // {(attributes) => (
23
+ // <Actionable attributes={attributes} as="div">
24
+ // <Text
25
+ // variant="caption-2"
26
+ // weight="medium"
27
+ // color="neutral-faded"
28
+ // numberOfLines={2}
29
+ // >
30
+ // {subtitle}
31
+ // </Text>
32
+ // </Actionable>
33
+ // )}
34
+ // </Tooltip>
35
+ // </View>
36
+ // ));
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { productTypeBuilder } from "../../../builder/builder";
2
+ import { productTypeBuilder } from "../../builder/builder";
3
3
  import { DynamicOffersRender, FallbackOfferTemplate } from "./Render";
4
4
  import type { DynamicOffersRenderProps } from "./Render/DynamicOffersRender";
5
5
  import type { Layout } from "../../utils";
@@ -7,7 +7,7 @@ import React, {
7
7
  } from "react";
8
8
  import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src/types/offerCatalogSchema";
9
9
  import type { Layout } from "../../../utils";
10
- import { productTypeBuilder as builder } from "../../../../builder/builder";
10
+ import { productTypeBuilder as builder } from "../../../builder/builder";
11
11
  import { Offer } from "./Offer";
12
12
  import {
13
13
  InteractionManager,
@@ -2,7 +2,7 @@ import React, { Fragment } from "react";
2
2
 
3
3
  import { match } from "ts-pattern";
4
4
 
5
- import type { ProductTypeBuilder } from "../../../../builder";
5
+ import type { ProductTypeBuilder } from "../../../builder";
6
6
  import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
7
7
  import {
8
8
  DefaultOfferCard,
@@ -3,7 +3,7 @@ import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
3
3
 
4
4
  import React from "react";
5
5
 
6
- import type { CreditCardOfferCard as CreditCardOfferCardBuilderProps } from "../../../../builder";
6
+ import type { CreditCardOfferCard as CreditCardOfferCardBuilderProps } from "../../../builder";
7
7
  import { makeCreditCardOfferStats } from "./statsBuilder";
8
8
  import { BaseOfferCard, SeeMore } from "../../Common";
9
9
  import Divider from "../../Divider";
@@ -1,5 +1,5 @@
1
1
  import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
2
- import type { CreditCardOfferCard } from "../../../../builder";
2
+ import type { CreditCardOfferCard } from "../../../builder";
3
3
  import { statsToElementPropsBuilder } from "../../../../src/capabilities/offer-catalog/src/utils/stats";
4
4
 
5
5
  export const makeCreditCardOfferStats =
@@ -4,7 +4,7 @@ import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
4
4
  import React from "react";
5
5
 
6
6
  import { makeDefaultOfferCardStats } from "./statsBuilder";
7
- import type { DefaultOfferCard as DefaultOfferCardBuilderProps } from "../../../../builder";
7
+ import type { DefaultOfferCard as DefaultOfferCardBuilderProps } from "../../../builder";
8
8
  import { BaseOfferCard, DynamicOfferCard, SeeMore } from "../../Common";
9
9
 
10
10
  type DefaultOfferCardProps = {
@@ -1,5 +1,5 @@
1
1
  import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
2
- import type { DefaultOfferCard } from "../../../../builder";
2
+ import type { DefaultOfferCard } from "../../../builder";
3
3
  import { statsToElementPropsBuilder } from "../../../../src/capabilities/offer-catalog/src/utils/stats";
4
4
 
5
5
  export const makeDefaultOfferCardStats =
@@ -3,7 +3,7 @@ import { get } from "radash";
3
3
  import React from "react";
4
4
  import { SeeMore } from "../../Common/DynamicOfferCard/SeeMore";
5
5
  import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
6
- import type { HeadlineWithDescriptionCard as HeadlineWithDescriptionCardBuilderProps } from "../../../../builder";
6
+ import type { HeadlineWithDescriptionCard as HeadlineWithDescriptionCardBuilderProps } from "../../../builder";
7
7
  import { BaseOfferCard, DynamicOfferCard } from "../../Common";
8
8
 
9
9
  type HeadlineWithDescriptionCardProps = {
@@ -6,6 +6,8 @@ import {
6
6
  ScrollView,
7
7
  TouchableOpacity,
8
8
  StyleSheet,
9
+ StatusBar,
10
+ Platform,
9
11
  } from "react-native";
10
12
  import Text from "../Text";
11
13
  import type { BaseOffer } from "../../../src/capabilities/offer-catalog/src";
@@ -35,8 +37,16 @@ export const OfferDetailsModal = ({
35
37
  transparent={false}
36
38
  visible={visible}
37
39
  onRequestClose={onClose}
40
+ statusBarTranslucent={true}
38
41
  >
39
42
  <SafeAreaView style={styles.modalContainer}>
43
+ {visible && (
44
+ <StatusBar
45
+ backgroundColor={"#ffffff"}
46
+ barStyle={"dark-content"}
47
+ translucent={false}
48
+ />
49
+ )}
40
50
  <View style={styles.modalHeader}>
41
51
  <TouchableOpacity
42
52
  onPress={onClose}
@@ -77,6 +87,7 @@ const styles = StyleSheet.create({
77
87
  modalContainer: {
78
88
  flex: 1,
79
89
  backgroundColor: "#ffffff",
90
+ marginTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
80
91
  },
81
92
  modalHeader: {
82
93
  flexDirection: "row",
@@ -1 +0,0 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../builder/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mDAAmD,CAAC;AAE9E,KAAK,UAAU,GAAG;IACjB,YAAY,EAAE,YAAY,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAC3C,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC9C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,UAAU,GAAG;IACtD,MAAM,EAAE,6BAA6B,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CACrC,gBAAgB,GAAG,mBAAmB,GAAG,2BAA2B,CACpE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,kBAsdhC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../builder/config/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OA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