@moneylion/react-native-offer-carousel 1.8.8 → 1.9.1

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 (113) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/commonjs/apiEnvironment.js +1 -7
  3. package/lib/commonjs/apiEnvironment.js.map +1 -1
  4. package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
  5. package/lib/commonjs/components/MoneyLionOfferCarousel.js +3 -8
  6. package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
  7. package/lib/commonjs/pageData.js +1 -12
  8. package/lib/commonjs/pageData.js.map +1 -1
  9. package/lib/commonjs/services/getDynamicOffers.js +1 -2
  10. package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
  11. package/lib/commonjs/services/getProductTypes.js +3 -22
  12. package/lib/commonjs/services/getProductTypes.js.map +1 -1
  13. package/lib/commonjs/utils/index.js +0 -11
  14. package/lib/commonjs/utils/index.js.map +1 -1
  15. package/lib/commonjs/utils/resolveProductTypes.js.map +1 -1
  16. package/lib/commonjs/version.js +1 -1
  17. package/lib/module/apiEnvironment.js +0 -5
  18. package/lib/module/apiEnvironment.js.map +1 -1
  19. package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
  20. package/lib/module/components/MoneyLionOfferCarousel.js +3 -8
  21. package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
  22. package/lib/module/pageData.js +1 -11
  23. package/lib/module/pageData.js.map +1 -1
  24. package/lib/module/services/getDynamicOffers.js +2 -3
  25. package/lib/module/services/getDynamicOffers.js.map +1 -1
  26. package/lib/module/services/getProductTypes.js +3 -22
  27. package/lib/module/services/getProductTypes.js.map +1 -1
  28. package/lib/module/utils/index.js +0 -1
  29. package/lib/module/utils/index.js.map +1 -1
  30. package/lib/module/utils/resolveProductTypes.js.map +1 -1
  31. package/lib/module/version.js +1 -1
  32. package/lib/typescript/src/apiEnvironment.d.ts +0 -4
  33. package/lib/typescript/src/apiEnvironment.d.ts.map +1 -1
  34. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
  35. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +0 -2
  36. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
  37. package/lib/typescript/src/pageData.d.ts +0 -2
  38. package/lib/typescript/src/pageData.d.ts.map +1 -1
  39. package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -4
  40. package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
  41. package/lib/typescript/src/services/getProductTypes.d.ts +2 -7
  42. package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -1
  43. package/lib/typescript/src/utils/index.d.ts +0 -1
  44. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  45. package/lib/typescript/src/utils/resolveProductTypes.d.ts +0 -5
  46. package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -1
  47. package/lib/typescript/src/version.d.ts +1 -1
  48. package/package.json +2 -4
  49. package/src/apiEnvironment.ts +0 -6
  50. package/src/components/Common/BaseOfferCard/index.tsx +0 -2
  51. package/src/components/MoneyLionOfferCarousel.tsx +2 -11
  52. package/src/pageData.ts +2 -20
  53. package/src/services/getDynamicOffers.ts +4 -21
  54. package/src/services/getProductTypes.ts +5 -28
  55. package/src/utils/index.ts +0 -1
  56. package/src/utils/resolveProductTypes.ts +0 -5
  57. package/src/version.ts +1 -1
  58. package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +0 -17
  59. package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
  60. package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -33
  61. package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
  62. package/lib/commonjs/components/Cards/VideosCard/VideoContent.js +0 -38
  63. package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +0 -1
  64. package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +0 -56
  65. package/lib/commonjs/components/Cards/VideosCard/VideosCard.js.map +0 -1
  66. package/lib/commonjs/components/Cards/index.js +0 -3
  67. package/lib/commonjs/components/Cards/index.js.map +0 -1
  68. package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js +0 -29
  69. package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +0 -1
  70. package/lib/commonjs/services/getProductTypesByQuery.js +0 -72
  71. package/lib/commonjs/services/getProductTypesByQuery.js.map +0 -1
  72. package/lib/commonjs/utils/selectDynamicOffers.js +0 -13
  73. package/lib/commonjs/utils/selectDynamicOffers.js.map +0 -1
  74. package/lib/module/capabilities/core/src/domain/third-party-search/index.js +0 -2
  75. package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
  76. package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -26
  77. package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
  78. package/lib/module/components/Cards/VideosCard/VideoContent.js +0 -37
  79. package/lib/module/components/Cards/VideosCard/VideoContent.js.map +0 -1
  80. package/lib/module/components/Cards/VideosCard/VideosCard.js +0 -55
  81. package/lib/module/components/Cards/VideosCard/VideosCard.js.map +0 -1
  82. package/lib/module/components/Cards/index.js +0 -2
  83. package/lib/module/components/Cards/index.js.map +0 -1
  84. package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js +0 -21
  85. package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +0 -1
  86. package/lib/module/services/getProductTypesByQuery.js +0 -65
  87. package/lib/module/services/getProductTypesByQuery.js.map +0 -1
  88. package/lib/module/utils/selectDynamicOffers.js +0 -6
  89. package/lib/module/utils/selectDynamicOffers.js.map +0 -1
  90. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts +0 -2
  91. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
  92. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -19
  93. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
  94. package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts +0 -1
  95. package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +0 -1
  96. package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts +0 -1
  97. package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts.map +0 -1
  98. package/lib/typescript/src/components/Cards/index.d.ts +0 -1
  99. package/lib/typescript/src/components/Cards/index.d.ts.map +0 -1
  100. package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts +0 -3
  101. package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts.map +0 -1
  102. package/lib/typescript/src/services/getProductTypesByQuery.d.ts +0 -30
  103. package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +0 -1
  104. package/lib/typescript/src/utils/selectDynamicOffers.d.ts +0 -3
  105. package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +0 -1
  106. package/src/capabilities/core/src/domain/third-party-search/index.ts +0 -1
  107. package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +0 -33
  108. package/src/components/Cards/VideosCard/VideoContent.tsx +0 -36
  109. package/src/components/Cards/VideosCard/VideosCard.tsx +0 -54
  110. package/src/components/Cards/index.ts +0 -1
  111. package/src/components/Common/BaseOfferCard/ThumbsUpIcon.tsx +0 -27
  112. package/src/services/getProductTypesByQuery.ts +0 -76
  113. package/src/utils/selectDynamicOffers.ts +0 -17
@@ -1,26 +1,19 @@
1
- import type { InternalOnErrorCallback } from "../capabilities/errors/types";
2
- import { getProductTypesByQuery } from "./getProductTypesByQuery";
3
-
4
1
  export type GetProductTypesProps = {
5
2
  productType?: string;
6
- query?: string;
7
3
  defaultProductType: string;
8
- searchAPIToken: string;
9
- isDev: boolean;
10
- onError?: InternalOnErrorCallback;
11
4
  };
12
5
 
13
- export type ResultType = "STATIC" | "QUERY" | "PRODUCT_TYPE" | "DEFAULT";
6
+ export type ResultType = "STATIC" | "PRODUCT_TYPE" | "DEFAULT";
14
7
 
15
8
  export type ProductTypesResult = {
16
9
  productTypes: string[];
17
10
  resultType: ResultType;
18
11
  };
19
12
 
20
- const parseProductTypes = (query: string): string[] => {
21
- return query.includes(",")
22
- ? query.split(",").map((productType) => productType.trim())
23
- : [query];
13
+ const parseProductTypes = (productType: string): string[] => {
14
+ return productType.includes(",")
15
+ ? productType.split(",").map((productTypeSlug) => productTypeSlug.trim())
16
+ : [productType];
24
17
  };
25
18
 
26
19
  /**
@@ -31,23 +24,7 @@ const parseProductTypes = (query: string): string[] => {
31
24
  export const getProductTypes = async ({
32
25
  productType,
33
26
  defaultProductType,
34
- query,
35
- searchAPIToken,
36
- isDev,
37
- onError,
38
27
  }: GetProductTypesProps): Promise<ProductTypesResult> => {
39
- if (query && query.trim().length > 0) {
40
- const productTypes = await getProductTypesByQuery({
41
- query,
42
- searchAPIToken,
43
- isDev,
44
- onError,
45
- });
46
-
47
- return { productTypes, resultType: "QUERY" };
48
- }
49
-
50
- // TODO: Check if need to add support for productType as enf app
51
28
  if (productType && productType.trim().length > 0) {
52
29
  const productTypes = await parseProductTypes(productType);
53
30
  return { productTypes, resultType: "PRODUCT_TYPE" };
@@ -3,7 +3,6 @@ export * from "./getDefaultProductType";
3
3
  export * from "./getOffersByProductTypes";
4
4
  export * from "./getProductTypesDefinition";
5
5
  export * from "./resolveProductTypes";
6
- export * from "./selectDynamicOffers";
7
6
  export * from "./sortOffersByRecommendationScore";
8
7
  export * from "./parseStringProductTypes";
9
8
  export * from "./getEnableUseCachedOffers";
@@ -1,13 +1,8 @@
1
- import type { InternalOnErrorCallback } from "../capabilities/errors/types";
2
1
  import { getProductTypes, type ResultType } from "../services/getProductTypes";
3
2
 
4
3
  type ResolveProductTypesProps = {
5
4
  productType?: string;
6
- query?: string;
7
5
  defaultProductType: string;
8
- searchAPIToken: string;
9
- isDev: boolean;
10
- onError?: InternalOnErrorCallback;
11
6
  };
12
7
 
13
8
  export const resolveProductTypes = async (
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Version is kept in sync with package.json via the sync-version script
2
- export const VERSION = "1.8.8";
2
+ export const VERSION = "1.9.1";
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _orderProductTypesByRankUtils = require("./orderProductTypesByRankUtils");
7
- Object.keys(_orderProductTypesByRankUtils).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _orderProductTypesByRankUtils[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _orderProductTypesByRankUtils[key];
14
- }
15
- });
16
- });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_orderProductTypesByRankUtils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../../../src","sources":["capabilities/core/src/domain/third-party-search/index.ts"],"mappings":";;;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,6BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,6BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,6BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.orderProductTypesByRank = void 0;
7
- /**
8
- * Orders product types by rank.
9
- *
10
- * @param productTypes {Record<string, number>} - The product types to order.
11
- * @returns {string[]} The product types ordered by rank.
12
- *
13
- * @example
14
- * ```ts
15
- * const productTypes = {
16
- * 'credit-card': 1,
17
- * 'loan': 2,
18
- * 'insurance': 3,
19
- * }
20
- * const orderedProductTypes = orderProductTypesByRank(productTypes)
21
- * // orderedProductTypes = ['insurance', 'loan', 'credit-card']
22
- * ```
23
- */
24
- const orderProductTypesByRank = productTypes => {
25
- const productTypesWithRank = Object.entries(productTypes).map(([productType, count]) => ({
26
- productType,
27
- rank: count
28
- }));
29
- const sortedProductTypes = productTypesWithRank.sort((a, b) => b.rank - a.rank);
30
- return sortedProductTypes.map(pt => pt.productType);
31
- };
32
- exports.orderProductTypesByRank = orderProductTypesByRank;
33
- //# sourceMappingURL=orderProductTypesByRankUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["orderProductTypesByRank","productTypes","productTypesWithRank","Object","entries","map","productType","count","rank","sortedProductTypes","sort","a","b","pt","exports"],"sourceRoot":"../../../../../../../src","sources":["capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,GACnCC,YAAoC,IAChC;EACJ,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,OAAO,CAACH,YAAY,CAAC,CAACI,GAAG,CAC5D,CAAC,CAACC,WAAW,EAAEC,KAAK,CAAC,MAAM;IAC1BD,WAAW;IACXE,IAAI,EAAED;EACP,CAAC,CACF,CAAC;EAED,MAAME,kBAAkB,GAAGP,oBAAoB,CAACQ,IAAI,CACnD,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAACJ,IAAI,GAAGG,CAAC,CAACH,IACtB,CAAC;EAED,OAAOC,kBAAkB,CAACJ,GAAG,CAAEQ,EAAE,IAAKA,EAAE,CAACP,WAAW,CAAC;AACtD,CAAC;AAACQ,OAAA,CAAAd,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,38 +0,0 @@
1
- // "use client";
2
-
3
- // import { memo } from "react";
4
- // import React from "react";
5
- // import Text from "../../Text";
6
-
7
- // type Video = {
8
- // muxId: string;
9
- // subtitle: string;
10
- // };
11
-
12
- // export type VideoContentProps = Video;
13
-
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
- // ));
37
- "use strict";
38
- //# sourceMappingURL=VideoContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Cards/VideosCard/VideoContent.tsx"],"mappings":"AAAA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -1,56 +0,0 @@
1
- // import { memo } from "react";
2
- // import { VideoContent, type VideoContentProps } from "./VideoContent";
3
- // import { GenericOfferVertical } from "../../../../src/capabilities/ui/elements/src";
4
- // import React from "react";
5
- // import Text from "../../Text";
6
- // import { View, StyleSheet } from "react-native";
7
-
8
- // type VideosContent = {
9
- // title: string;
10
- // subtitle: string;
11
- // videos: VideoContentProps[];
12
- // };
13
-
14
- // export type VideosCardProps = {
15
- // videosContent: VideosContent;
16
- // showCardBorder: boolean;
17
- // };
18
-
19
- // export const VideosCard = memo(
20
- // ({
21
- // videosContent: { title, subtitle, videos },
22
- // showCardBorder,
23
- // }: VideosCardProps) => {
24
- // const renderVideos = () =>
25
- // videos.map((video) => <VideoContent key={video.muxId} {...video} />);
26
-
27
- // return (
28
- // <GenericOfferVertical showCardBorder={showCardBorder}>
29
- // <GenericOfferVertical.Container>
30
- // <View style={styles.textContainer}>
31
- // <Text variant="featured-2" weight="bold">
32
- // {title}
33
- // </Text>
34
- // <Text variant="body-3" weight="normal">
35
- // {subtitle}
36
- // </Text>
37
- // </View>
38
- // <View style={styles.videoContainer}>{renderVideos()}</View>
39
- // </GenericOfferVertical.Container>
40
- // </GenericOfferVertical>
41
- // );
42
- // }
43
- // );
44
-
45
- // const styles = StyleSheet.create({
46
- // textContainer: {
47
- // gap: 1,
48
- // },
49
- // videoContainer: {
50
- // flexDirection: "row",
51
- // gap: 3,
52
- // justifyContent: "space-between",
53
- // },
54
- // });
55
- "use strict";
56
- //# sourceMappingURL=VideosCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Cards/VideosCard/VideosCard.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- // export * from "./VideosCard/VideosCard";
2
- "use strict";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Cards/index.ts"],"mappings":"AAAA;AAAA","ignoreList":[]}
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ThumbsUpIcon = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- const ThumbsUpIcon = () => /*#__PURE__*/_react.default.createElement("svg", {
10
- width: "13",
11
- height: "12",
12
- viewBox: "0 0 13 12",
13
- fill: "none",
14
- xmlns: "http://www.w3.org/2000/svg"
15
- }, /*#__PURE__*/_react.default.createElement("path", {
16
- d: "M12.8349 4.99359L12.0782 7.71044C11.9052 8.33122 11.4165 8.8054 10.8156 8.97501C10.5694 9.04451 10.3256 8.85546 10.3256 8.5996C10.3256 8.42574 10.4407 8.27334 10.6081 8.22597C10.9522 8.12787 11.2329 7.85591 11.3314 7.50307L12.0885 4.78622C12.1765 4.47516 12.109 4.13304 11.9122 3.87382C11.7151 3.61438 11.404 3.46421 11.0825 3.46421H7.93031C7.82148 3.46421 7.71779 3.41751 7.64517 3.33461C7.57254 3.2517 7.53634 3.14265 7.54662 3.03383L7.68137 1.63406C7.71266 1.32814 7.52093 1.043 7.22528 0.949597C7.14238 0.923675 7.07489 0.954737 7.04897 1.01708L6.5987 2.14802C6.51937 2.34713 6.31937 2.47718 6.10641 2.45484C5.94596 2.43808 5.84541 2.34042 5.813 2.15071C5.79021 2.01707 5.81122 1.87965 5.86641 1.75607L6.33345 0.711163C6.52004 0.291278 6.99177 0.0734024 7.42752 0.208373C8.09612 0.410383 8.51622 1.043 8.44874 1.71697L8.37388 2.49551C8.36405 2.59808 8.44449 2.68657 8.54729 2.68657H11.0773C11.6425 2.68657 12.1868 2.95606 12.5292 3.40723C12.8713 3.85818 12.9855 4.44924 12.8349 4.99359Z",
17
- fill: "black",
18
- fillOpacity: "0.6"
19
- }), /*#__PURE__*/_react.default.createElement("path", {
20
- d: "M9.76404 5.48096C9.42192 5.03001 8.87756 4.76029 8.31243 4.76029H5.59066L5.68384 3.79092C5.71982 3.4307 5.61681 3.08254 5.41077 2.80523C5.23133 2.56389 4.97391 2.37618 4.6624 2.2821C4.22687 2.14735 3.75514 2.36501 3.56833 2.78511L2.43292 5.36185H1.00723C0.509358 5.36185 0.0999756 5.77146 0.0999756 6.26911V9.28115C0.0999756 9.77903 0.509358 10.1889 1.00723 10.1889H2.56275L3.0966 10.5725C3.59447 10.9303 4.18039 11.1167 4.79201 11.1167H7.5607C8.37477 11.1167 9.09544 10.5674 9.31309 9.78439L10.07 7.06776C10.2203 6.52341 10.1064 5.93191 9.76404 5.48096ZM9.32337 6.86017L8.5665 9.57679C8.44204 10.0228 8.02751 10.339 7.5607 10.339H4.79201C4.34084 10.339 3.91045 10.1991 3.54777 9.93992L2.91515 9.48361C2.84766 9.43691 2.7699 9.41098 2.687 9.41098H1.00723C0.934606 9.41098 0.877623 9.354 0.877623 9.28138V6.26933C0.877623 6.19671 0.934606 6.13973 1.00723 6.13973V6.13459H2.687C2.75046 6.13459 2.81124 6.11917 2.86509 6.09101C2.94353 6.05056 3.00789 5.98397 3.04476 5.90107L4.28385 3.09103C4.30978 3.02891 4.37704 2.99785 4.46017 3.02377C4.60877 3.0707 4.731 3.16612 4.8119 3.28813C4.89257 3.40902 4.93212 3.55583 4.91648 3.70801L4.78173 5.10778C4.77122 5.21683 4.80743 5.32565 4.88027 5.40878C4.9196 5.4537 4.9681 5.48811 5.02195 5.51001C5.06687 5.52878 5.11558 5.53839 5.16564 5.53839H8.31757C8.63913 5.53839 8.95019 5.68856 9.14728 5.94777C9.34415 6.20699 9.41141 6.54888 9.32337 6.86017Z",
21
- fill: "black",
22
- fillOpacity: "0.6"
23
- }), /*#__PURE__*/_react.default.createElement("path", {
24
- d: "M3.03448 6.92743V8.52965C3.03448 8.74216 2.85817 8.91848 2.64565 8.91848C2.43314 8.91848 2.25661 8.74216 2.25661 8.52965V6.92743C2.25661 6.71492 2.43314 6.53861 2.64565 6.53861C2.72677 6.53861 2.80253 6.5643 2.86509 6.60788C2.96699 6.67849 3.03448 6.79603 3.03448 6.92743Z",
25
- fill: "black",
26
- fillOpacity: "0.6"
27
- }));
28
- exports.ThumbsUpIcon = ThumbsUpIcon;
29
- //# sourceMappingURL=ThumbsUpIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","e","__esModule","default","ThumbsUpIcon","createElement","width","height","viewBox","fill","xmlns","d","fillOpacity","exports"],"sourceRoot":"../../../../../src","sources":["components/Common/BaseOfferCard/ThumbsUpIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnB,MAAMG,YAAY,GAAGA,CAAA,kBAC3BN,MAAA,CAAAK,OAAA,CAAAE,aAAA;EACCC,KAAK,EAAC,IAAI;EACVC,MAAM,EAAC,IAAI;EACXC,OAAO,EAAC,WAAW;EACnBC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC;AAA4B,gBAElCZ,MAAA,CAAAK,OAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,g+BAAg+B;EACl+BF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CAAC,eACFd,MAAA,CAAAK,OAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,+2CAA+2C;EACj3CF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CAAC,eACFd,MAAA,CAAAK,OAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,kRAAkR;EACpRF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CACG,CACL;AAACC,OAAA,CAAAT,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,72 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getProductTypesByQuery = void 0;
7
- var _effect = require("effect");
8
- var _apiEnvironment = require("../apiEnvironment");
9
- var _thirdPartySearch = require("../capabilities/core/src/domain/third-party-search");
10
- var _types = require("../capabilities/errors/types");
11
- var _errorUtils = require("../components/utils/errorUtils");
12
- /**
13
- * Get product types by query
14
- * @param query {string} - The query to get the product types for
15
- * @param context The context to get the product types from
16
- * @returns {Promise<string[]>} The product types
17
- *
18
- * @example
19
- * ```ts
20
- * const productTypes = await getProductTypesByQuery('best credit cards', {
21
- * cnfEnv: {
22
- * THIRD_PARTY_SEARCH_API_URL: 'https://api.third-party-search.com',
23
- * THIRD_PARTY_SEARCH_API_TOKEN: 'your-token',
24
- * },
25
- * thirdPartySearchApiClient: makeThirdPartySearchApiClient,
26
- * })
27
- * // productTypes = ['credit-card', 'loan', 'insurance']
28
- * or
29
- * // productTypes = []
30
- * ```
31
- */
32
-
33
- const getProductTypesByQuery = async ({
34
- query,
35
- searchAPIToken,
36
- isDev,
37
- onError
38
- }) => {
39
- const url = `${(0, _apiEnvironment.getEwsSearchApiBaseUrl)(isDev)}/search/product-types?query=${encodeURIComponent(query)}`;
40
- const headers = {
41
- Authorization: `Bearer ${searchAPIToken}`
42
- };
43
- try {
44
- const response = await fetch(url, {
45
- headers
46
- });
47
- if (!response.ok) {
48
- const error = new Error();
49
- error.code = response.status;
50
- throw error;
51
- }
52
- const productTypes = await response.json();
53
- return (0, _effect.pipe)(productTypes, _thirdPartySearch.orderProductTypesByRank);
54
- } catch (error) {
55
- console.error("Error fetching ProductTypesByQuery", JSON.stringify(error));
56
- onError === null || onError === void 0 || onError({
57
- message: "Failed to fetch product types by query",
58
- error,
59
- additionalInfo: {
60
- query,
61
- isDev
62
- },
63
- ...((0, _errorUtils.getApiErrorLogProperties)(error) || {
64
- code: _types.ErrorCodes.FLOW_ERROR,
65
- severity: "error"
66
- })
67
- });
68
- return [];
69
- }
70
- };
71
- exports.getProductTypesByQuery = getProductTypesByQuery;
72
- //# sourceMappingURL=getProductTypesByQuery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_effect","require","_apiEnvironment","_thirdPartySearch","_types","_errorUtils","getProductTypesByQuery","query","searchAPIToken","isDev","onError","url","getEwsSearchApiBaseUrl","encodeURIComponent","headers","Authorization","response","fetch","ok","error","Error","code","status","productTypes","json","pipe","orderProductTypesByRank","console","JSON","stringify","message","additionalInfo","getApiErrorLogProperties","ErrorCodes","FLOW_ERROR","severity","exports"],"sourceRoot":"../../../src","sources":["services/getProductTypesByQuery.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMK,sBAAsB,GAAG,MAAAA,CAAO;EAC5CC,KAAK;EACLC,cAAc;EACdC,KAAK;EACLC;AAC4B,CAAC,KAAK;EAClC,MAAMC,GAAG,GAAG,GAAG,IAAAC,sCAAsB,EAACH,KAAK,CAAC,+BAA+BI,kBAAkB,CAACN,KAAK,CAAC,EAAE;EACtG,MAAMO,OAAO,GAAG;IACfC,aAAa,EAAE,UAAUP,cAAc;EACxC,CAAC;EACD,IAAI;IACH,MAAMQ,QAAQ,GAAG,MAAMC,KAAK,CAACN,GAAG,EAAE;MAAEG;IAAQ,CAAC,CAAC;IAC9C,IAAI,CAACE,QAAQ,CAACE,EAAE,EAAE;MACjB,MAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,CAAa;MACrCD,KAAK,CAACE,IAAI,GAAGL,QAAQ,CAACM,MAAM;MAC5B,MAAMH,KAAK;IACZ;IACA,MAAMI,YAAY,GAAG,MAAMP,QAAQ,CAACQ,IAAI,CAAC,CAAC;IAE1C,OAAO,IAAAC,YAAI,EAACF,YAAY,EAAEG,yCAAuB,CAAC;EACnD,CAAC,CAAC,OAAOP,KAAK,EAAE;IACfQ,OAAO,CAACR,KAAK,CAAC,oCAAoC,EAAES,IAAI,CAACC,SAAS,CAACV,KAAK,CAAC,CAAC;IAC1ET,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAG;MACToB,OAAO,EAAE,wCAAwC;MACjDX,KAAK;MACLY,cAAc,EAAE;QACfxB,KAAK;QACLE;MACD,CAAC;MACD,IAAI,IAAAuB,oCAAwB,EAACb,KAAK,CAAC,IAAI;QACtCE,IAAI,EAAEY,iBAAU,CAACC,UAAU;QAC3BC,QAAQ,EAAE;MACX,CAAC;IACF,CAAC,CAAC;IAEF,OAAO,EAAE;EACV;AACD,CAAC;AAACC,OAAA,CAAA9B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.selectDynamicOffers = void 0;
7
- var _sortOffersByRecommendationScore = require("./sortOffersByRecommendationScore");
8
- const selectDynamicOffers = (offers, productTypes) => {
9
- const resultOffers = productTypes.flatMap(productType => (0, _sortOffersByRecommendationScore.sortOffersByRecommendationScore)(offers.filter(offer => offer.productType === productType))).slice(0, 10);
10
- return resultOffers;
11
- };
12
- exports.selectDynamicOffers = selectDynamicOffers;
13
- //# sourceMappingURL=selectDynamicOffers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_sortOffersByRecommendationScore","require","selectDynamicOffers","offers","productTypes","resultOffers","flatMap","productType","sortOffersByRecommendationScore","filter","offer","slice","exports"],"sourceRoot":"../../../src","sources":["utils/selectDynamicOffers.ts"],"mappings":";;;;;;AACA,IAAAA,gCAAA,GAAAC,OAAA;AAEO,MAAMC,mBAAmB,GAAGA,CAClCC,MAAmB,EACnBC,YAAsB,KAClB;EACJ,MAAMC,YAAY,GAAGD,YAAY,CAC/BE,OAAO,CAAEC,WAAW,IACpB,IAAAC,gEAA+B,EAC9BL,MAAM,CAACM,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAACH,WAAW,KAAKA,WAAW,CAC3D,CACD,CAAC,CACAI,KAAK,CAAC,CAAC,EAAE,EAAE,CAAgB;EAE7B,OAAON,YAAY;AACpB,CAAC;AAACO,OAAA,CAAAV,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from "./orderProductTypesByRankUtils";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../../../src","sources":["capabilities/core/src/domain/third-party-search/index.ts"],"mappings":"AAAA,cAAc,gCAAgC","ignoreList":[]}
@@ -1,26 +0,0 @@
1
- /**
2
- * Orders product types by rank.
3
- *
4
- * @param productTypes {Record<string, number>} - The product types to order.
5
- * @returns {string[]} The product types ordered by rank.
6
- *
7
- * @example
8
- * ```ts
9
- * const productTypes = {
10
- * 'credit-card': 1,
11
- * 'loan': 2,
12
- * 'insurance': 3,
13
- * }
14
- * const orderedProductTypes = orderProductTypesByRank(productTypes)
15
- * // orderedProductTypes = ['insurance', 'loan', 'credit-card']
16
- * ```
17
- */
18
- export const orderProductTypesByRank = productTypes => {
19
- const productTypesWithRank = Object.entries(productTypes).map(([productType, count]) => ({
20
- productType,
21
- rank: count
22
- }));
23
- const sortedProductTypes = productTypesWithRank.sort((a, b) => b.rank - a.rank);
24
- return sortedProductTypes.map(pt => pt.productType);
25
- };
26
- //# sourceMappingURL=orderProductTypesByRankUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["orderProductTypesByRank","productTypes","productTypesWithRank","Object","entries","map","productType","count","rank","sortedProductTypes","sort","a","b","pt"],"sourceRoot":"../../../../../../../src","sources":["capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,uBAAuB,GACnCC,YAAoC,IAChC;EACJ,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,OAAO,CAACH,YAAY,CAAC,CAACI,GAAG,CAC5D,CAAC,CAACC,WAAW,EAAEC,KAAK,CAAC,MAAM;IAC1BD,WAAW;IACXE,IAAI,EAAED;EACP,CAAC,CACF,CAAC;EAED,MAAME,kBAAkB,GAAGP,oBAAoB,CAACQ,IAAI,CACnD,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAACJ,IAAI,GAAGG,CAAC,CAACH,IACtB,CAAC;EAED,OAAOC,kBAAkB,CAACJ,GAAG,CAAEQ,EAAE,IAAKA,EAAE,CAACP,WAAW,CAAC;AACtD,CAAC","ignoreList":[]}
@@ -1,37 +0,0 @@
1
- // "use client";
2
-
3
- // import { memo } from "react";
4
- // import React from "react";
5
- // import Text from "../../Text";
6
-
7
- // type Video = {
8
- // muxId: string;
9
- // subtitle: string;
10
- // };
11
-
12
- // export type VideoContentProps = Video;
13
-
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
- // ));
37
- //# sourceMappingURL=VideoContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Cards/VideosCard/VideoContent.tsx"],"mappings":"AAAA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,55 +0,0 @@
1
- // import { memo } from "react";
2
- // import { VideoContent, type VideoContentProps } from "./VideoContent";
3
- // import { GenericOfferVertical } from "../../../../src/capabilities/ui/elements/src";
4
- // import React from "react";
5
- // import Text from "../../Text";
6
- // import { View, StyleSheet } from "react-native";
7
-
8
- // type VideosContent = {
9
- // title: string;
10
- // subtitle: string;
11
- // videos: VideoContentProps[];
12
- // };
13
-
14
- // export type VideosCardProps = {
15
- // videosContent: VideosContent;
16
- // showCardBorder: boolean;
17
- // };
18
-
19
- // export const VideosCard = memo(
20
- // ({
21
- // videosContent: { title, subtitle, videos },
22
- // showCardBorder,
23
- // }: VideosCardProps) => {
24
- // const renderVideos = () =>
25
- // videos.map((video) => <VideoContent key={video.muxId} {...video} />);
26
-
27
- // return (
28
- // <GenericOfferVertical showCardBorder={showCardBorder}>
29
- // <GenericOfferVertical.Container>
30
- // <View style={styles.textContainer}>
31
- // <Text variant="featured-2" weight="bold">
32
- // {title}
33
- // </Text>
34
- // <Text variant="body-3" weight="normal">
35
- // {subtitle}
36
- // </Text>
37
- // </View>
38
- // <View style={styles.videoContainer}>{renderVideos()}</View>
39
- // </GenericOfferVertical.Container>
40
- // </GenericOfferVertical>
41
- // );
42
- // }
43
- // );
44
-
45
- // const styles = StyleSheet.create({
46
- // textContainer: {
47
- // gap: 1,
48
- // },
49
- // videoContainer: {
50
- // flexDirection: "row",
51
- // gap: 3,
52
- // justifyContent: "space-between",
53
- // },
54
- // });
55
- //# sourceMappingURL=VideosCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Cards/VideosCard/VideosCard.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- // export * from "./VideosCard/VideosCard";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Cards/index.ts"],"mappings":"AAAA","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- export const ThumbsUpIcon = () => /*#__PURE__*/React.createElement("svg", {
3
- width: "13",
4
- height: "12",
5
- viewBox: "0 0 13 12",
6
- fill: "none",
7
- xmlns: "http://www.w3.org/2000/svg"
8
- }, /*#__PURE__*/React.createElement("path", {
9
- d: "M12.8349 4.99359L12.0782 7.71044C11.9052 8.33122 11.4165 8.8054 10.8156 8.97501C10.5694 9.04451 10.3256 8.85546 10.3256 8.5996C10.3256 8.42574 10.4407 8.27334 10.6081 8.22597C10.9522 8.12787 11.2329 7.85591 11.3314 7.50307L12.0885 4.78622C12.1765 4.47516 12.109 4.13304 11.9122 3.87382C11.7151 3.61438 11.404 3.46421 11.0825 3.46421H7.93031C7.82148 3.46421 7.71779 3.41751 7.64517 3.33461C7.57254 3.2517 7.53634 3.14265 7.54662 3.03383L7.68137 1.63406C7.71266 1.32814 7.52093 1.043 7.22528 0.949597C7.14238 0.923675 7.07489 0.954737 7.04897 1.01708L6.5987 2.14802C6.51937 2.34713 6.31937 2.47718 6.10641 2.45484C5.94596 2.43808 5.84541 2.34042 5.813 2.15071C5.79021 2.01707 5.81122 1.87965 5.86641 1.75607L6.33345 0.711163C6.52004 0.291278 6.99177 0.0734024 7.42752 0.208373C8.09612 0.410383 8.51622 1.043 8.44874 1.71697L8.37388 2.49551C8.36405 2.59808 8.44449 2.68657 8.54729 2.68657H11.0773C11.6425 2.68657 12.1868 2.95606 12.5292 3.40723C12.8713 3.85818 12.9855 4.44924 12.8349 4.99359Z",
10
- fill: "black",
11
- fillOpacity: "0.6"
12
- }), /*#__PURE__*/React.createElement("path", {
13
- d: "M9.76404 5.48096C9.42192 5.03001 8.87756 4.76029 8.31243 4.76029H5.59066L5.68384 3.79092C5.71982 3.4307 5.61681 3.08254 5.41077 2.80523C5.23133 2.56389 4.97391 2.37618 4.6624 2.2821C4.22687 2.14735 3.75514 2.36501 3.56833 2.78511L2.43292 5.36185H1.00723C0.509358 5.36185 0.0999756 5.77146 0.0999756 6.26911V9.28115C0.0999756 9.77903 0.509358 10.1889 1.00723 10.1889H2.56275L3.0966 10.5725C3.59447 10.9303 4.18039 11.1167 4.79201 11.1167H7.5607C8.37477 11.1167 9.09544 10.5674 9.31309 9.78439L10.07 7.06776C10.2203 6.52341 10.1064 5.93191 9.76404 5.48096ZM9.32337 6.86017L8.5665 9.57679C8.44204 10.0228 8.02751 10.339 7.5607 10.339H4.79201C4.34084 10.339 3.91045 10.1991 3.54777 9.93992L2.91515 9.48361C2.84766 9.43691 2.7699 9.41098 2.687 9.41098H1.00723C0.934606 9.41098 0.877623 9.354 0.877623 9.28138V6.26933C0.877623 6.19671 0.934606 6.13973 1.00723 6.13973V6.13459H2.687C2.75046 6.13459 2.81124 6.11917 2.86509 6.09101C2.94353 6.05056 3.00789 5.98397 3.04476 5.90107L4.28385 3.09103C4.30978 3.02891 4.37704 2.99785 4.46017 3.02377C4.60877 3.0707 4.731 3.16612 4.8119 3.28813C4.89257 3.40902 4.93212 3.55583 4.91648 3.70801L4.78173 5.10778C4.77122 5.21683 4.80743 5.32565 4.88027 5.40878C4.9196 5.4537 4.9681 5.48811 5.02195 5.51001C5.06687 5.52878 5.11558 5.53839 5.16564 5.53839H8.31757C8.63913 5.53839 8.95019 5.68856 9.14728 5.94777C9.34415 6.20699 9.41141 6.54888 9.32337 6.86017Z",
14
- fill: "black",
15
- fillOpacity: "0.6"
16
- }), /*#__PURE__*/React.createElement("path", {
17
- d: "M3.03448 6.92743V8.52965C3.03448 8.74216 2.85817 8.91848 2.64565 8.91848C2.43314 8.91848 2.25661 8.74216 2.25661 8.52965V6.92743C2.25661 6.71492 2.43314 6.53861 2.64565 6.53861C2.72677 6.53861 2.80253 6.5643 2.86509 6.60788C2.96699 6.67849 3.03448 6.79603 3.03448 6.92743Z",
18
- fill: "black",
19
- fillOpacity: "0.6"
20
- }));
21
- //# sourceMappingURL=ThumbsUpIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","ThumbsUpIcon","createElement","width","height","viewBox","fill","xmlns","d","fillOpacity"],"sourceRoot":"../../../../../src","sources":["components/Common/BaseOfferCard/ThumbsUpIcon.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAO,MAAMC,YAAY,GAAGA,CAAA,kBAC3BD,KAAA,CAAAE,aAAA;EACCC,KAAK,EAAC,IAAI;EACVC,MAAM,EAAC,IAAI;EACXC,OAAO,EAAC,WAAW;EACnBC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC;AAA4B,gBAElCP,KAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,g+BAAg+B;EACl+BF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CAAC,eACFT,KAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,+2CAA+2C;EACj3CF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CAAC,eACFT,KAAA,CAAAE,aAAA;EACCM,CAAC,EAAC,kRAAkR;EACpRF,IAAI,EAAC,OAAO;EACZG,WAAW,EAAC;AAAK,CACjB,CACG,CACL","ignoreList":[]}
@@ -1,65 +0,0 @@
1
- import { pipe } from "effect";
2
- import { getEwsSearchApiBaseUrl } from "../apiEnvironment";
3
- import { orderProductTypesByRank } from "../capabilities/core/src/domain/third-party-search";
4
- import { ErrorCodes } from "../capabilities/errors/types";
5
- import { getApiErrorLogProperties } from "../components/utils/errorUtils";
6
- /**
7
- * Get product types by query
8
- * @param query {string} - The query to get the product types for
9
- * @param context The context to get the product types from
10
- * @returns {Promise<string[]>} The product types
11
- *
12
- * @example
13
- * ```ts
14
- * const productTypes = await getProductTypesByQuery('best credit cards', {
15
- * cnfEnv: {
16
- * THIRD_PARTY_SEARCH_API_URL: 'https://api.third-party-search.com',
17
- * THIRD_PARTY_SEARCH_API_TOKEN: 'your-token',
18
- * },
19
- * thirdPartySearchApiClient: makeThirdPartySearchApiClient,
20
- * })
21
- * // productTypes = ['credit-card', 'loan', 'insurance']
22
- * or
23
- * // productTypes = []
24
- * ```
25
- */
26
-
27
- export const getProductTypesByQuery = async ({
28
- query,
29
- searchAPIToken,
30
- isDev,
31
- onError
32
- }) => {
33
- const url = `${getEwsSearchApiBaseUrl(isDev)}/search/product-types?query=${encodeURIComponent(query)}`;
34
- const headers = {
35
- Authorization: `Bearer ${searchAPIToken}`
36
- };
37
- try {
38
- const response = await fetch(url, {
39
- headers
40
- });
41
- if (!response.ok) {
42
- const error = new Error();
43
- error.code = response.status;
44
- throw error;
45
- }
46
- const productTypes = await response.json();
47
- return pipe(productTypes, orderProductTypesByRank);
48
- } catch (error) {
49
- console.error("Error fetching ProductTypesByQuery", JSON.stringify(error));
50
- onError === null || onError === void 0 || onError({
51
- message: "Failed to fetch product types by query",
52
- error,
53
- additionalInfo: {
54
- query,
55
- isDev
56
- },
57
- ...(getApiErrorLogProperties(error) || {
58
- code: ErrorCodes.FLOW_ERROR,
59
- severity: "error"
60
- })
61
- });
62
- return [];
63
- }
64
- };
65
- //# sourceMappingURL=getProductTypesByQuery.js.map