@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.
- package/dist/packages/Carousel/Carousel.js +1 -1
- package/dist/packages/CartClubAlert/CartClubAlert.js +1 -1
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.d.ts +12 -1
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +93 -84
- package/dist/packages/ChangeOrderModal/api/getOrderForm.js +6 -15
- package/dist/packages/ChangeOrderModal/api/getProductsSimilars.d.ts +7 -4
- package/dist/packages/ChangeOrderModal/api/getProductsSimilars.js +22 -21
- package/dist/packages/ChangeOrderModal/api/postChangeOrder.d.ts +6 -1
- package/dist/packages/ChangeOrderModal/api/postChangeOrder.js +11 -17
- package/dist/packages/ChangeOrderModal/components/ModalFooter.d.ts +4 -1
- package/dist/packages/ChangeOrderModal/components/ModalFooter.js +3 -1
- package/dist/packages/ChangeOrderModal/components/SimilarProductList.d.ts +2 -3
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.d.ts +4 -5
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.js +21 -21
- package/dist/packages/ChangeOrderModal/mocks.d.ts +1 -0
- package/dist/packages/ChangeOrderModal/mocks.js +1 -0
- package/dist/packages/Coupons/Coupons.d.ts +4 -1
- package/dist/packages/Coupons/Coupons.js +61 -51
- package/dist/packages/Coupons/api/addCoupon.d.ts +1 -1
- package/dist/packages/Coupons/api/addCoupon.js +7 -7
- package/dist/packages/Coupons/api/getCoupons.d.ts +1 -1
- package/dist/packages/Coupons/api/getCoupons.js +4 -4
- package/dist/packages/Coupons/api/removeCoupon.d.ts +1 -1
- package/dist/packages/Coupons/api/removeCoupon.js +6 -6
- package/dist/packages/Coupons/components/CouponCard.d.ts +3 -1
- package/dist/packages/Coupons/components/CouponCard.js +86 -76
- package/dist/packages/Coupons/views/CouponsView.d.ts +3 -1
- package/dist/packages/Coupons/views/CouponsView.js +87 -78
- package/dist/packages/Coupons/views/LoadingView.js +6 -6
- package/dist/packages/Modal/Modal.js +1 -1
- package/dist/packages/Onboarding/Onboarding.js +1 -1
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.d.ts +1 -1
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.js +16 -22
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.d.ts +3 -2
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.js +15 -31
- package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.js +1 -1
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.d.ts +18 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.js +80 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.d.ts +10 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.js +61 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.d.ts +8 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.js +44 -0
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.d.ts +17 -2
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.js +1 -1
- package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +6 -6
- package/dist/packages/ProductCard/ProductCardHorizontal/index.js +31 -30
- package/dist/packages/ProductCard/ProductCardPrice/index.d.ts +8 -1
- package/dist/packages/ProductCard/ProductCardPrice/index.js +27 -31
- package/dist/packages/ProductCard/ProductCardVertical/index.js +16 -15
- package/dist/packages/ProductCard/index.js +1 -1
- package/dist/packages/ProductCardSeeMore/ProductCardSeeMore.js +1 -1
- package/dist/packages/Regionalization/Regionalization.d.ts +1 -1
- package/dist/packages/Regionalization/Regionalization.js +15 -13
- package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +1 -1
- package/dist/packages/Regionalization/context/RegionalizationContext.js +31 -29
- package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +1 -0
- package/dist/packages/Regionalization/views/AllStoresScreen.js +21 -21
- package/dist/packages/Tour/Tour.js +1 -1
- package/dist/styles/change-order-modal.global.css +1 -1
- package/dist/styles/product-card.global.css +1 -1
- package/dist/styles/regionalization.global.css +1 -1
- package/dist/types/ProductCard.d.ts +13 -12
- package/dist/utils/changerOrderModal.js +13 -16
- package/package.json +69 -69
- package/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +0 -45
- package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +0 -34
- 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
|
|
18
|
+
/* empty css */const rt = ({
|
|
19
19
|
children: s,
|
|
20
20
|
id: r,
|
|
21
21
|
bullet: t,
|
|
@@ -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 {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { ProductSelected as
|
|
5
|
-
import { SimilarProducts as
|
|
6
|
-
import { ModalFooter as
|
|
7
|
-
/* empty css
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
const
|
|
14
|
-
selectedItem:
|
|
15
|
-
postalCode:
|
|
16
|
-
orderFormId:
|
|
17
|
-
isClubClient:
|
|
18
|
-
isOpen:
|
|
19
|
-
environment:
|
|
20
|
-
setIsOpen:
|
|
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 [
|
|
24
|
-
|
|
26
|
+
const [a, k] = g(), [A, h] = g(!1), r = N === "io", { genericTaggingEvent: E } = z(), [o, O] = g();
|
|
27
|
+
v(() => {
|
|
25
28
|
(async () => {
|
|
26
|
-
|
|
29
|
+
var S, b;
|
|
30
|
+
h(!0);
|
|
27
31
|
try {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
57
|
+
h(!1);
|
|
54
58
|
}
|
|
55
59
|
})();
|
|
56
|
-
}, [])
|
|
57
|
-
|
|
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:
|
|
60
|
-
setIsOpen:
|
|
77
|
+
isOpen: x,
|
|
78
|
+
setIsOpen: e,
|
|
61
79
|
className: "change-order-modal",
|
|
62
80
|
title: "Produto com estoque baixo",
|
|
63
|
-
Footer: /* @__PURE__ */
|
|
64
|
-
|
|
81
|
+
Footer: a && a.length > 0 && /* @__PURE__ */ i(
|
|
82
|
+
T,
|
|
65
83
|
{
|
|
66
|
-
saveSelectedSimilarProduct:
|
|
67
|
-
|
|
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:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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:
|
|
94
|
-
similarProductSelect:
|
|
95
|
-
setSimilarProductSelect:
|
|
96
|
-
products:
|
|
102
|
+
isClubClient: w,
|
|
103
|
+
similarProductSelect: o,
|
|
104
|
+
setSimilarProductSelect: O,
|
|
105
|
+
products: a
|
|
97
106
|
}
|
|
98
|
-
) : /* @__PURE__ */
|
|
99
|
-
]
|
|
107
|
+
) : /* @__PURE__ */ i(B, {}) })
|
|
108
|
+
]
|
|
100
109
|
}
|
|
101
110
|
);
|
|
102
111
|
};
|
|
103
112
|
export {
|
|
104
|
-
|
|
113
|
+
no as ChangeOrderModal
|
|
105
114
|
};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
const c = async (
|
|
1
|
+
import e from "axios";
|
|
2
|
+
const c = async (o, t) => {
|
|
3
3
|
try {
|
|
4
|
-
if (
|
|
5
|
-
const { data:
|
|
6
|
-
`/api/checkout/pub/orderForm/${
|
|
4
|
+
if (t) {
|
|
5
|
+
const { data: r } = await e.post(
|
|
6
|
+
`/api/checkout/pub/orderForm/${o}`
|
|
7
7
|
);
|
|
8
|
-
return
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
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
|
|
2
|
-
const
|
|
3
|
-
postalCode:
|
|
4
|
-
isIO:
|
|
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 (
|
|
9
|
-
const { data: o } = await
|
|
10
|
-
`/_v/commerce/products/productsSimilar?postalCode=${
|
|
11
|
-
), { similarProducts:
|
|
12
|
-
return
|
|
13
|
-
(
|
|
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
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
})
|
|
24
|
-
return
|
|
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
|
-
|
|
33
|
+
P as getProductsSimilars
|
|
33
34
|
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export
|
|
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
|
|
2
|
-
const
|
|
1
|
+
import s from "axios";
|
|
2
|
+
const p = async (o, e, n, c, t) => {
|
|
3
3
|
try {
|
|
4
4
|
const r = {
|
|
5
|
-
orderFormId:
|
|
6
|
-
skuId:
|
|
7
|
-
substitutionId:
|
|
5
|
+
orderFormId: o,
|
|
6
|
+
skuId: n,
|
|
7
|
+
substitutionId: c
|
|
8
8
|
};
|
|
9
|
-
if (
|
|
10
|
-
const { data: d } = await
|
|
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
|
|
17
|
-
|
|
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
|
|
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
|
-
|
|
25
|
+
p as postChangeOrder
|
|
32
26
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
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:
|
|
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
|
|
6
|
-
similarProductSelect: SimilarProductProps;
|
|
7
|
-
setSimilarProductSelect:
|
|
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
|
|
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
|
|
2
|
-
import { Icons as
|
|
3
|
-
import { SimilarProductItem as
|
|
4
|
-
const
|
|
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:
|
|
7
|
-
similarProductSelect:
|
|
8
|
-
setSimilarProductSelect:
|
|
9
|
-
}) =>
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
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:
|
|
15
|
-
similarProductSelect:
|
|
16
|
-
setSimilarProductSelect:
|
|
17
|
-
similarProduct:
|
|
14
|
+
isClubClient: a,
|
|
15
|
+
similarProductSelect: o,
|
|
16
|
+
setSimilarProductSelect: s,
|
|
17
|
+
similarProduct: t
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
t.itemId
|
|
20
20
|
)) }),
|
|
21
|
-
|
|
21
|
+
o && /* @__PURE__ */ i(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
|
-
onClick: () =>
|
|
24
|
+
onClick: () => s(void 0),
|
|
25
25
|
className: "remove-buttom",
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ r(c, { iconId: "Trash" }),
|
|
28
28
|
" Remover substituto"
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
|
-
] })
|
|
32
|
+
] });
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
u as SimilarProducts
|
|
35
35
|
};
|
|
@@ -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 {};
|