@plurix/ecom-components 1.14.2-shlo1555.0 → 1.14.3-com2034

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 (67) hide show
  1. package/dist/packages/Carousel/Carousel.js +1 -1
  2. package/dist/packages/CartClubAlert/CartClubAlert.js +1 -1
  3. package/dist/packages/ChangeOrderModal/ChangeOrderModal.d.ts +12 -1
  4. package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +93 -84
  5. package/dist/packages/ChangeOrderModal/api/getOrderForm.js +6 -15
  6. package/dist/packages/ChangeOrderModal/api/getProductsSimilars.d.ts +7 -4
  7. package/dist/packages/ChangeOrderModal/api/getProductsSimilars.js +22 -21
  8. package/dist/packages/ChangeOrderModal/api/postChangeOrder.d.ts +6 -1
  9. package/dist/packages/ChangeOrderModal/api/postChangeOrder.js +11 -17
  10. package/dist/packages/ChangeOrderModal/components/ModalFooter.d.ts +4 -1
  11. package/dist/packages/ChangeOrderModal/components/ModalFooter.js +3 -1
  12. package/dist/packages/ChangeOrderModal/components/SimilarProductList.d.ts +2 -3
  13. package/dist/packages/ChangeOrderModal/components/SimilarProducts.d.ts +4 -5
  14. package/dist/packages/ChangeOrderModal/components/SimilarProducts.js +21 -21
  15. package/dist/packages/ChangeOrderModal/mocks.d.ts +1 -0
  16. package/dist/packages/ChangeOrderModal/mocks.js +1 -0
  17. package/dist/packages/Coupons/Coupons.d.ts +4 -1
  18. package/dist/packages/Coupons/Coupons.js +61 -51
  19. package/dist/packages/Coupons/api/addCoupon.d.ts +1 -1
  20. package/dist/packages/Coupons/api/addCoupon.js +7 -7
  21. package/dist/packages/Coupons/api/getCoupons.d.ts +1 -1
  22. package/dist/packages/Coupons/api/getCoupons.js +4 -4
  23. package/dist/packages/Coupons/api/removeCoupon.d.ts +1 -1
  24. package/dist/packages/Coupons/api/removeCoupon.js +6 -6
  25. package/dist/packages/Coupons/components/CouponCard.d.ts +3 -1
  26. package/dist/packages/Coupons/components/CouponCard.js +86 -76
  27. package/dist/packages/Coupons/views/CouponsView.d.ts +3 -1
  28. package/dist/packages/Coupons/views/CouponsView.js +87 -78
  29. package/dist/packages/Coupons/views/LoadingView.js +6 -6
  30. package/dist/packages/Modal/Modal.js +1 -1
  31. package/dist/packages/Onboarding/Onboarding.js +1 -1
  32. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.d.ts +1 -1
  33. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.js +16 -22
  34. package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.d.ts +3 -2
  35. package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.js +15 -31
  36. package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.js +1 -1
  37. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.d.ts +18 -0
  38. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.js +80 -0
  39. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.d.ts +10 -0
  40. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.js +61 -0
  41. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.d.ts +8 -0
  42. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.js +44 -0
  43. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.d.ts +17 -2
  44. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.js +1 -1
  45. package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +6 -6
  46. package/dist/packages/ProductCard/ProductCardHorizontal/index.js +31 -30
  47. package/dist/packages/ProductCard/ProductCardPrice/index.d.ts +8 -1
  48. package/dist/packages/ProductCard/ProductCardPrice/index.js +27 -31
  49. package/dist/packages/ProductCard/ProductCardVertical/index.js +16 -15
  50. package/dist/packages/ProductCard/index.js +1 -1
  51. package/dist/packages/ProductCardSeeMore/ProductCardSeeMore.js +1 -1
  52. package/dist/packages/Regionalization/Regionalization.d.ts +1 -1
  53. package/dist/packages/Regionalization/Regionalization.js +15 -13
  54. package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +1 -1
  55. package/dist/packages/Regionalization/context/RegionalizationContext.js +31 -29
  56. package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +1 -0
  57. package/dist/packages/Regionalization/views/AllStoresScreen.js +21 -21
  58. package/dist/packages/Tour/Tour.js +1 -1
  59. package/dist/styles/change-order-modal.global.css +1 -1
  60. package/dist/styles/product-card.global.css +1 -1
  61. package/dist/styles/regionalization.global.css +1 -1
  62. package/dist/types/ProductCard.d.ts +13 -12
  63. package/dist/utils/changerOrderModal.js +13 -16
  64. package/package.json +69 -69
  65. package/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +0 -45
  66. package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +0 -34
  67. package/dist/node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js +0 -29
@@ -15,7 +15,7 @@ import { Children as X, useState as m, useRef as D, useEffect as Y } from "react
15
15
  import Z from "./components/Bullets.js";
16
16
  import E from "./components/Arrows.js";
17
17
  import { DefaultProps as M } from "./utils/defaultProps.js";
18
- /* empty css */const rt = ({
18
+ /* empty css */const rt = ({
19
19
  children: s,
20
20
  id: r,
21
21
  bullet: t,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { DiscountIcon as s } from "../../assets/svgs/DiscountIcon.js";
3
- /* empty css */const t = ({
3
+ /* empty css */const t = ({
4
4
  discount: a,
5
5
  participeLink: c,
6
6
  learnMoreLink: o,
@@ -1,6 +1,8 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { SelectedItemProps } from './components/ProductSelected';
3
3
  import { SimilarProducts as SimilarProductsProps } from '../../types/ChangeOrderModal';
4
+ import { GetProductsSimilarsResponse } from './api/getProductsSimilars';
5
+ import { PostChangeOrderMutationResponse } from './api/postChangeOrder';
4
6
 
5
7
  export interface ChangeOrderModalProps {
6
8
  postalCode: string;
@@ -11,8 +13,17 @@ export interface ChangeOrderModalProps {
11
13
  isClubClient?: boolean;
12
14
  orderFormId: string;
13
15
  saveSelectedSimilarProduct?: (similarProduct: SimilarProductsProps | undefined) => void;
16
+ getOrderFormMutation?: (variables: object) => Promise<CustomDataMutationResponse>;
17
+ getProductsSimilarsMutation?: (variables: object) => Promise<GetProductsSimilarsResponse>;
18
+ postChangeOrderMutation?: (variables: object) => Promise<PostChangeOrderMutationResponse>;
19
+ }
20
+ interface CustomDataMutationResponse {
21
+ getOrderForm: {
22
+ data: string;
23
+ };
14
24
  }
15
25
  export interface idSubstitutionCriteriasProps {
16
26
  [key: string]: string;
17
27
  }
18
- export declare const ChangeOrderModal: ({ selectedItem, postalCode, orderFormId, isClubClient, isOpen, environment, setIsOpen, saveSelectedSimilarProduct }: ChangeOrderModalProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const ChangeOrderModal: ({ selectedItem, postalCode, orderFormId, isClubClient, isOpen, environment, setIsOpen, saveSelectedSimilarProduct, getOrderFormMutation, getProductsSimilarsMutation, postChangeOrderMutation }: ChangeOrderModalProps) => import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -1,105 +1,114 @@
1
- import { jsx as n, jsxs as j, Fragment as q } from "react/jsx-runtime";
2
- import { useState as e, useEffect as w } from "react";
3
- import { Modal as M } from "../Modal/Modal.js";
4
- import { ProductSelected as N } from "./components/ProductSelected.js";
5
- import { SimilarProducts as k } from "./components/SimilarProducts.js";
6
- import { ModalFooter as v } from "./components/ModalFooter.js";
7
- /* empty css */import { Skeleton as A } from "@acctglobal/skeleton";
8
- import { getProductsSimilars as E } from "./api/getProductsSimilars.js";
9
- import _ from "../../hooks/useAnalitcsEvents.js";
10
- import { NoSimilarProduct as J } from "./components/NoSimilarProduct.js";
11
- import { getOrderForm as L } from "./api/getOrderForm.js";
12
- import { postChangeOrder as T } from "./api/postChangeOrder.js";
13
- const oo = ({
14
- selectedItem: o,
15
- postalCode: S,
16
- orderFormId: f,
17
- isClubClient: h,
18
- isOpen: y,
19
- environment: O,
20
- setIsOpen: l,
21
- saveSelectedSimilarProduct: m
1
+ import { jsxs as _, jsx as i, Fragment as q } from "react/jsx-runtime";
2
+ import { useState as g, useEffect as v } from "react";
3
+ import { Modal as D } from "../Modal/Modal.js";
4
+ import { ProductSelected as L } from "./components/ProductSelected.js";
5
+ import { SimilarProducts as R } from "./components/SimilarProducts.js";
6
+ import { ModalFooter as T } from "./components/ModalFooter.js";
7
+ /* empty css */import { getProductsSimilars as $ } from "./api/getProductsSimilars.js";
8
+ import z from "../../hooks/useAnalitcsEvents.js";
9
+ import { NoSimilarProduct as B } from "./components/NoSimilarProduct.js";
10
+ import { getOrderForm as G } from "./api/getOrderForm.js";
11
+ import { postChangeOrder as H } from "./api/postChangeOrder.js";
12
+ import { Skeleton as K } from "../Skeleton/index.js";
13
+ const no = ({
14
+ selectedItem: t,
15
+ postalCode: C,
16
+ orderFormId: s,
17
+ isClubClient: w,
18
+ isOpen: x,
19
+ environment: N,
20
+ setIsOpen: e,
21
+ saveSelectedSimilarProduct: m,
22
+ getOrderFormMutation: l,
23
+ getProductsSimilarsMutation: P,
24
+ postChangeOrderMutation: j
22
25
  }) => {
23
- const [u, b] = e(), [P, s] = e(!1), a = O === "io", { genericTaggingEvent: C } = _(), [r, p] = e({ itemId: "" });
24
- return w(() => {
26
+ const [a, k] = g(), [A, h] = g(!1), r = N === "io", { genericTaggingEvent: E } = z(), [o, O] = g();
27
+ v(() => {
25
28
  (async () => {
26
- s(!0);
29
+ var S, b;
30
+ h(!0);
27
31
  try {
28
- const t = await E({
29
- postalCode: S,
30
- selectedItem: o,
31
- isIO: a
32
- }), d = (t == null ? void 0 : t.products) || [];
33
- b(d);
34
- } finally {
35
- s(!1);
36
- }
37
- })(), (async () => {
38
- var t, d;
39
- s(!0);
40
- try {
41
- const c = await L(f, a), i = ((d = (t = c == null ? void 0 : c.customData) == null ? void 0 : t.customApps) == null ? void 0 : d.find(
42
- (x) => x.id === "janis"
32
+ const [p, c] = await Promise.all([
33
+ $({
34
+ postalCode: C,
35
+ selectedItem: t,
36
+ isIO: r,
37
+ getProductsSimilarsMutation: P
38
+ }),
39
+ (async () => {
40
+ const d = r && await G(s, r), M = l && await l({
41
+ input: { orderFormId: s }
42
+ }) || { getOrderForm: { data: "" } };
43
+ return r ? d : JSON.parse(M.getOrderForm.data);
44
+ })()
45
+ ]), J = (p == null ? void 0 : p.products) || [];
46
+ k(J);
47
+ const n = ((b = (S = c == null ? void 0 : c.customData) == null ? void 0 : S.customApps) == null ? void 0 : b.find(
48
+ (d) => d.id === "janis"
43
49
  )) || null;
44
- let g = {};
45
- i != null && i.fields.idSubstitutionCriterias && (g = JSON.parse(
46
- i == null ? void 0 : i.fields.idSubstitutionCriterias
47
- ));
48
- const F = o == null ? void 0 : o.productOriginId;
49
- p({
50
- itemId: `${g[F]}`
50
+ let f = {};
51
+ n != null && n.fields.idSubstitutionCriterias && (f = JSON.parse(n.fields.idSubstitutionCriterias));
52
+ const y = t == null ? void 0 : t.productOriginId;
53
+ f[y] && O({
54
+ itemId: `${f[y]}`
51
55
  });
52
56
  } finally {
53
- s(!1);
57
+ h(!1);
54
58
  }
55
59
  })();
56
- }, []), /* @__PURE__ */ n(
57
- M,
60
+ }, []);
61
+ const F = () => {
62
+ var u;
63
+ H(
64
+ s,
65
+ r,
66
+ t.productOriginId,
67
+ (u = o == null ? void 0 : o.itemId) != null ? u : "",
68
+ j
69
+ ), o && (m == null || m(o), E("salvar_substituto", {
70
+ name: t.name,
71
+ replacement_item: o == null ? void 0 : o.name
72
+ })), e(!1);
73
+ };
74
+ return /* @__PURE__ */ _(
75
+ D,
58
76
  {
59
- isOpen: y,
60
- setIsOpen: l,
77
+ isOpen: x,
78
+ setIsOpen: e,
61
79
  className: "change-order-modal",
62
80
  title: "Produto com estoque baixo",
63
- Footer: /* @__PURE__ */ n(
64
- v,
81
+ Footer: a && a.length > 0 && /* @__PURE__ */ i(
82
+ T,
65
83
  {
66
- saveSelectedSimilarProduct: () => {
67
- T(
68
- f,
69
- a,
70
- o.productOriginId,
71
- r.itemId
72
- ), r && (m == null || m(r), C("salvar_substituto", {
73
- name: o.name,
74
- replacement_item: r == null ? void 0 : r.name
75
- })), l(!1);
76
- }
84
+ saveSelectedSimilarProduct: F,
85
+ similarProductSelect: o
77
86
  }
78
87
  ),
79
- children: P ? /* @__PURE__ */ n(
80
- A,
81
- {
82
- width: a ? "100%" : "90%",
83
- height: a ? 600 : 425,
84
- backgroundColor: "var(--color-grayScale-faded)",
85
- margin: "auto",
86
- animation: !0
87
- }
88
- ) : /* @__PURE__ */ j(q, { children: [
89
- o && /* @__PURE__ */ n(N, { selectedItem: o }),
90
- u && u.length > 0 ? /* @__PURE__ */ n(
91
- k,
88
+ children: [
89
+ t && /* @__PURE__ */ i(L, { selectedItem: t }),
90
+ A ? /* @__PURE__ */ i(
91
+ K,
92
+ {
93
+ width: r ? "100%" : "90%",
94
+ height: r ? 600 : 425,
95
+ backgroundColor: "var(--color-grayScale-faded)",
96
+ margin: "auto",
97
+ animation: !0
98
+ }
99
+ ) : /* @__PURE__ */ i(q, { children: a && a.length > 0 ? /* @__PURE__ */ i(
100
+ R,
92
101
  {
93
- isClubClient: h,
94
- similarProductSelect: r,
95
- setSimilarProductSelect: p,
96
- products: u
102
+ isClubClient: w,
103
+ similarProductSelect: o,
104
+ setSimilarProductSelect: O,
105
+ products: a
97
106
  }
98
- ) : /* @__PURE__ */ n(J, {})
99
- ] })
107
+ ) : /* @__PURE__ */ i(B, {}) })
108
+ ]
100
109
  }
101
110
  );
102
111
  };
103
112
  export {
104
- oo as ChangeOrderModal
113
+ no as ChangeOrderModal
105
114
  };
@@ -1,21 +1,12 @@
1
- import o from "axios";
2
- const c = async (t, a) => {
1
+ import e from "axios";
2
+ const c = async (o, t) => {
3
3
  try {
4
- if (a) {
5
- const { data: e } = await o.post(
6
- `/api/checkout/pub/orderForm/${t}`
4
+ if (t) {
5
+ const { data: r } = await e.post(
6
+ `/api/checkout/pub/orderForm/${o}`
7
7
  );
8
- return e;
8
+ return r;
9
9
  }
10
- const { data: r } = await o.post("/api/proxy", {
11
- targetUrl: `/api/checkout/pub/orderForm/${t}`,
12
- method: "GET",
13
- headers: {
14
- "Content-Type": "application/json",
15
- Accept: "application/json"
16
- }
17
- });
18
- return r;
19
10
  } catch (r) {
20
11
  console.error("Error in Change Order Modal", r);
21
12
  }
@@ -4,9 +4,12 @@ interface GetProductsSimilarsProps {
4
4
  postalCode: string;
5
5
  isIO: boolean;
6
6
  selectedItem: SelectedItemProps;
7
+ getProductsSimilarsMutation?: (variables: {}) => Promise<GetProductsSimilarsResponse>;
7
8
  }
8
- export declare const getProductsSimilars: ({ postalCode, isIO, selectedItem }: GetProductsSimilarsProps) => Promise<{
9
- productOrigin: string;
10
- products: import('../../../main').SimilarProducts[];
11
- } | undefined>;
9
+ export interface GetProductsSimilarsResponse {
10
+ getProductsSimilars: {
11
+ data: string;
12
+ };
13
+ }
14
+ export declare const getProductsSimilars: ({ postalCode, isIO, selectedItem, getProductsSimilarsMutation }: GetProductsSimilarsProps) => Promise<any>;
12
15
  export {};
@@ -1,33 +1,34 @@
1
- import n from "axios";
2
- const O = async ({
3
- postalCode: a,
4
- isIO: p,
5
- selectedItem: r
1
+ import c from "axios";
2
+ const P = async ({
3
+ postalCode: n,
4
+ isIO: u,
5
+ selectedItem: r,
6
+ getProductsSimilarsMutation: a
6
7
  }) => {
7
8
  try {
8
- if (p) {
9
- const { data: o } = await n.get(
10
- `/_v/commerce/products/productsSimilar?postalCode=${a}&skus=${r == null ? void 0 : r.productOriginId}&field=sku`
11
- ), { similarProducts: u } = o;
12
- return u.find(
13
- (c) => c.productOrigin === (r == null ? void 0 : r.productOriginId)
9
+ if (u) {
10
+ const { data: o } = await c.get(
11
+ `/_v/commerce/products/productsSimilar?postalCode=${n}&skus=${r == null ? void 0 : r.productOriginId}&field=sku`
12
+ ), { similarProducts: p } = o;
13
+ return p.find(
14
+ (s) => s.productOrigin === (r == null ? void 0 : r.productOriginId)
14
15
  );
15
16
  }
16
- const { data: i } = await n.post("/api/proxy", {
17
- targetUrl: `/_v/commerce/products/productsSimilar?postalCode=${a}&skus=${r == null ? void 0 : r.productOriginId}&field=sku`,
18
- method: "GET",
19
- headers: {
20
- "Content-Type": "application/json",
21
- Accept: "application/json"
17
+ const i = a && await a({
18
+ input: {
19
+ postalCode: n,
20
+ productOriginId: r == null ? void 0 : r.productOriginId
22
21
  }
23
- }), { similarProducts: s } = i;
24
- return s.find(
22
+ });
23
+ return i ? JSON.parse(
24
+ i == null ? void 0 : i.getProductsSimilars.data
25
+ ).similarProducts.find(
25
26
  (o) => o.productOrigin === r.productOriginId
26
- );
27
+ ) : void 0;
27
28
  } catch (i) {
28
29
  console.error("Error in Change Order Modal", i);
29
30
  }
30
31
  };
31
32
  export {
32
- O as getProductsSimilars
33
+ P as getProductsSimilars
33
34
  };
@@ -1 +1,6 @@
1
- export declare const postChangeOrder: (orderFormId: string, isIO: boolean, skuId: string, substitutionId: string) => Promise<any>;
1
+ export interface PostChangeOrderMutationResponse {
2
+ postChangeOrder: {
3
+ data: string;
4
+ };
5
+ }
6
+ export declare const postChangeOrder: (orderFormId: string, isIO: boolean, skuId: string, substitutionId: string, postChangeOrderMutation?: (variables: {}) => Promise<PostChangeOrderMutationResponse>) => Promise<any>;
@@ -1,32 +1,26 @@
1
- import o from "axios";
2
- const s = async (e, t, a, n) => {
1
+ import s from "axios";
2
+ const p = async (o, e, n, c, t) => {
3
3
  try {
4
4
  const r = {
5
- orderFormId: e,
6
- skuId: a,
7
- substitutionId: n
5
+ orderFormId: o,
6
+ skuId: n,
7
+ substitutionId: c
8
8
  };
9
- if (t) {
10
- const { data: d } = await o.post(
9
+ if (e) {
10
+ const { data: d } = await s.post(
11
11
  "/_v/commerce/orderform/changeOrder",
12
12
  r
13
13
  );
14
14
  return d;
15
15
  }
16
- const { data: c } = await o.post("/api/proxy", {
17
- targetUrl: "/_v/commerce/orderform/changeOrder",
18
- method: "POST",
19
- headers: {
20
- "Content-Type": "application/json",
21
- Accept: "application/json"
22
- },
23
- body: r
16
+ const a = t && await t({
17
+ input: r
24
18
  });
25
- return c;
19
+ return a ? JSON.parse(a == null ? void 0 : a.postChangeOrder.data) : void 0;
26
20
  } catch (r) {
27
21
  console.error("Error in Change Order Modal", r);
28
22
  }
29
23
  };
30
24
  export {
31
- s as postChangeOrder
25
+ p as postChangeOrder
32
26
  };
@@ -1,3 +1,6 @@
1
- export declare const ModalFooter: ({ saveSelectedSimilarProduct }: {
1
+ import { SimilarProducts } from '../../../main';
2
+
3
+ export declare const ModalFooter: ({ saveSelectedSimilarProduct, similarProductSelect }: {
2
4
  saveSelectedSimilarProduct?: () => void;
5
+ similarProductSelect: SimilarProducts | undefined;
3
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  const t = ({
3
- saveSelectedSimilarProduct: o
3
+ saveSelectedSimilarProduct: o,
4
+ similarProductSelect: r
4
5
  }) => /* @__PURE__ */ n("div", { className: "change-order-moda-footer", children: /* @__PURE__ */ n(
5
6
  "button",
6
7
  {
7
8
  onClick: () => o == null ? void 0 : o(),
8
9
  className: "change-order-save-buttom",
10
+ disabled: !r,
9
11
  children: "Salvar Substituto"
10
12
  }
11
13
  ) });
@@ -1,9 +1,8 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
1
  import { SimilarProducts } from '../../../types/ChangeOrderModal';
3
2
 
4
3
  export declare const SimilarProductItem: ({ similarProduct, similarProductSelect, setSimilarProductSelect, isClubClient }: {
5
- similarProductSelect: SimilarProducts;
6
- setSimilarProductSelect: Dispatch<SetStateAction<SimilarProducts>>;
4
+ similarProductSelect: SimilarProducts | undefined;
5
+ setSimilarProductSelect: (similiarProductSelect: SimilarProducts) => void;
7
6
  similarProduct: SimilarProducts;
8
7
  isClubClient?: boolean;
9
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,10 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
1
  import { SimilarProducts as SimilarProductProps } from '../../../types/ChangeOrderModal';
3
2
 
4
3
  interface Props {
5
- products?: SimilarProductProps[];
6
- similarProductSelect: SimilarProductProps;
7
- setSimilarProductSelect: Dispatch<SetStateAction<SimilarProductProps>>;
4
+ products: SimilarProductProps[];
5
+ similarProductSelect: SimilarProductProps | undefined;
6
+ setSimilarProductSelect: (similiarProductSelect: SimilarProductProps | undefined) => void;
8
7
  isClubClient?: boolean;
9
8
  }
10
- export declare const SimilarProducts: ({ products, isClubClient, similarProductSelect, setSimilarProductSelect }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
+ export declare const SimilarProducts: ({ products, isClubClient, similarProductSelect, setSimilarProductSelect }: Props) => import("react/jsx-runtime").JSX.Element;
11
10
  export {};
@@ -1,35 +1,35 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
- import { Icons as h } from "../assets/icons.js";
3
- import { SimilarProductItem as t } from "./SimilarProductList.js";
4
- const I = ({
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { Icons as c } from "../assets/icons.js";
3
+ import { SimilarProductItem as e } from "./SimilarProductList.js";
4
+ const u = ({
5
5
  products: m,
6
- isClubClient: s,
7
- similarProductSelect: a,
8
- setSimilarProductSelect: n
9
- }) => m != null && m.length ? /* @__PURE__ */ r("section", { className: "change-order-similar-products", children: [
10
- /* @__PURE__ */ i("h3", { className: "title", children: "Na falta substitua por:" }),
11
- /* @__PURE__ */ i("div", { className: "similar-product-list", children: m.map((o) => /* @__PURE__ */ i(
12
- t,
6
+ isClubClient: a,
7
+ similarProductSelect: o,
8
+ setSimilarProductSelect: s
9
+ }) => /* @__PURE__ */ i("section", { className: "change-order-similar-products", children: [
10
+ /* @__PURE__ */ r("h3", { className: "title", children: "Na falta substitua por:" }),
11
+ /* @__PURE__ */ r("div", { className: "similar-product-list", children: m.map((t) => /* @__PURE__ */ r(
12
+ e,
13
13
  {
14
- isClubClient: s,
15
- similarProductSelect: a,
16
- setSimilarProductSelect: n,
17
- similarProduct: o
14
+ isClubClient: a,
15
+ similarProductSelect: o,
16
+ setSimilarProductSelect: s,
17
+ similarProduct: t
18
18
  },
19
- o.itemId
19
+ t.itemId
20
20
  )) }),
21
- a && /* @__PURE__ */ r(
21
+ o && /* @__PURE__ */ i(
22
22
  "button",
23
23
  {
24
- onClick: () => n == null ? void 0 : n({ itemId: "" }),
24
+ onClick: () => s(void 0),
25
25
  className: "remove-buttom",
26
26
  children: [
27
- /* @__PURE__ */ i(h, { iconId: "Trash" }),
27
+ /* @__PURE__ */ r(c, { iconId: "Trash" }),
28
28
  " Remover substituto"
29
29
  ]
30
30
  }
31
31
  )
32
- ] }) : null;
32
+ ] });
33
33
  export {
34
- I as SimilarProducts
34
+ u as SimilarProducts
35
35
  };
@@ -1,4 +1,5 @@
1
1
  export declare const productSelectedMock: {
2
+ id: string;
2
3
  imageUrl: string;
3
4
  name: string;
4
5
  quantity: number;
@@ -1,4 +1,5 @@
1
1
  const e = {
2
+ id: "product-001",
2
3
  imageUrl: "https://smrholding.vteximg.com.br/arquivos/ids/157320-55-55/7891150061040_01.jpg?v=637994761386800000",
3
4
  name: "Sorvete Ovomaltine Kibon 800mL",
4
5
  quantity: 1,
@@ -12,6 +12,9 @@ interface CouponsProps {
12
12
  disableFirstEmptyModal?: boolean;
13
13
  couponsList?: CouponType[];
14
14
  qtdCouponsView?: number;
15
+ getCouponsMutation?: any;
16
+ addCouponMutation?: any;
17
+ removeCouponMutation?: any;
15
18
  }
16
- export declare const Coupons: ({ orderFormId, hasItemsInCart, builder, account, isIO, closeIOModal, activeOrderFormCoupon, genericTaggingEvent, disableFirstEmptyModal, couponsList, qtdCouponsView }: CouponsProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const Coupons: ({ orderFormId, hasItemsInCart, builder, account, isIO, closeIOModal, activeOrderFormCoupon, genericTaggingEvent, disableFirstEmptyModal, couponsList, qtdCouponsView, getCouponsMutation, addCouponMutation, removeCouponMutation }: CouponsProps) => import("react/jsx-runtime").JSX.Element;
17
20
  export {};