@plurix/ecom-components 1.14.1-eng-task-383.0 → 1.14.2-commerce
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/ChangeOrderModal/ChangeOrderModal.js +12 -12
- package/dist/packages/Coupons/api/addCoupon.js +6 -6
- package/dist/packages/Coupons/api/getCoupons.js +5 -5
- package/dist/packages/Coupons/views/LoadingView.js +6 -6
- package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +6 -6
- package/package.json +70 -71
|
@@ -4,12 +4,12 @@ import { Modal as M } from "../Modal/Modal.js";
|
|
|
4
4
|
import { ProductSelected as N } from "./components/ProductSelected.js";
|
|
5
5
|
import { SimilarProducts as k } from "./components/SimilarProducts.js";
|
|
6
6
|
import { ModalFooter as v } from "./components/ModalFooter.js";
|
|
7
|
-
/* empty css */import {
|
|
8
|
-
import
|
|
9
|
-
import _ from "
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
/* empty css */import { getProductsSimilars as A } from "./api/getProductsSimilars.js";
|
|
8
|
+
import E from "../../hooks/useAnalitcsEvents.js";
|
|
9
|
+
import { NoSimilarProduct as _ } from "./components/NoSimilarProduct.js";
|
|
10
|
+
import { getOrderForm as J } from "./api/getOrderForm.js";
|
|
11
|
+
import { postChangeOrder as L } from "./api/postChangeOrder.js";
|
|
12
|
+
import { Skeleton as T } from "../Skeleton/index.js";
|
|
13
13
|
const oo = ({
|
|
14
14
|
selectedItem: o,
|
|
15
15
|
postalCode: S,
|
|
@@ -20,12 +20,12 @@ const oo = ({
|
|
|
20
20
|
setIsOpen: l,
|
|
21
21
|
saveSelectedSimilarProduct: m
|
|
22
22
|
}) => {
|
|
23
|
-
const [u, b] = e(), [P, s] = e(!1), a = O === "io", { genericTaggingEvent: C } =
|
|
23
|
+
const [u, b] = e(), [P, s] = e(!1), a = O === "io", { genericTaggingEvent: C } = E(), [r, p] = e({ itemId: "" });
|
|
24
24
|
return w(() => {
|
|
25
25
|
(async () => {
|
|
26
26
|
s(!0);
|
|
27
27
|
try {
|
|
28
|
-
const t = await
|
|
28
|
+
const t = await A({
|
|
29
29
|
postalCode: S,
|
|
30
30
|
selectedItem: o,
|
|
31
31
|
isIO: a
|
|
@@ -38,7 +38,7 @@ const oo = ({
|
|
|
38
38
|
var t, d;
|
|
39
39
|
s(!0);
|
|
40
40
|
try {
|
|
41
|
-
const c = await
|
|
41
|
+
const c = await J(f, a), i = ((d = (t = c == null ? void 0 : c.customData) == null ? void 0 : t.customApps) == null ? void 0 : d.find(
|
|
42
42
|
(x) => x.id === "janis"
|
|
43
43
|
)) || null;
|
|
44
44
|
let g = {};
|
|
@@ -64,7 +64,7 @@ const oo = ({
|
|
|
64
64
|
v,
|
|
65
65
|
{
|
|
66
66
|
saveSelectedSimilarProduct: () => {
|
|
67
|
-
|
|
67
|
+
L(
|
|
68
68
|
f,
|
|
69
69
|
a,
|
|
70
70
|
o.productOriginId,
|
|
@@ -77,7 +77,7 @@ const oo = ({
|
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
79
|
children: P ? /* @__PURE__ */ n(
|
|
80
|
-
|
|
80
|
+
T,
|
|
81
81
|
{
|
|
82
82
|
width: a ? "100%" : "90%",
|
|
83
83
|
height: a ? 600 : 425,
|
|
@@ -95,7 +95,7 @@ const oo = ({
|
|
|
95
95
|
setSimilarProductSelect: p,
|
|
96
96
|
products: u
|
|
97
97
|
}
|
|
98
|
-
) : /* @__PURE__ */ n(
|
|
98
|
+
) : /* @__PURE__ */ n(_, {})
|
|
99
99
|
] })
|
|
100
100
|
}
|
|
101
101
|
);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const { data:
|
|
4
|
-
`https://${o}.
|
|
1
|
+
import r from "axios";
|
|
2
|
+
const s = async (o, t, a) => {
|
|
3
|
+
const { data: p } = await r.post(
|
|
4
|
+
`https://${o}.vtex.app/api/coupon/order`,
|
|
5
5
|
{
|
|
6
6
|
orderFormId: t,
|
|
7
7
|
couponId: a
|
|
8
8
|
}
|
|
9
9
|
);
|
|
10
|
-
return
|
|
10
|
+
return p;
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
s as addCoupon
|
|
14
14
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import o from "axios";
|
|
2
|
+
const e = async (n, p, t) => {
|
|
3
|
+
const a = `https://${n}.vtex.app/api/coupon/list`, s = Math.random(), { data: r } = t ? await o.post(a, { couponsList: t }) : await o.get(a, { params: { builder: p, random: s } });
|
|
4
|
+
return r.coupons;
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as getCoupons
|
|
8
8
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as a, Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ModalHeader as i } from "../components/ModalHeader.js";
|
|
3
|
+
import { ModalFooter as m } from "../components/ModalFooter.js";
|
|
4
|
+
import { Skeleton as u } from "../../Skeleton/index.js";
|
|
5
5
|
const f = ({
|
|
6
6
|
isIO: t = !1,
|
|
7
7
|
closeIOModal: o,
|
|
8
8
|
genericTaggingEvent: e
|
|
9
9
|
}) => /* @__PURE__ */ a(n, { children: [
|
|
10
10
|
t && o && /* @__PURE__ */ r(
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
{
|
|
13
13
|
closeModal: o,
|
|
14
14
|
title: "Meus Cupons",
|
|
@@ -16,7 +16,7 @@ const f = ({
|
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
18
|
/* @__PURE__ */ r(
|
|
19
|
-
|
|
19
|
+
u,
|
|
20
20
|
{
|
|
21
21
|
width: t ? "100%" : "90%",
|
|
22
22
|
height: t ? 600 : 425,
|
|
@@ -26,7 +26,7 @@ const f = ({
|
|
|
26
26
|
}
|
|
27
27
|
),
|
|
28
28
|
t && o && /* @__PURE__ */ r(
|
|
29
|
-
|
|
29
|
+
m,
|
|
30
30
|
{
|
|
31
31
|
isFloating: !0,
|
|
32
32
|
cancelButtonAction: o,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import m from "
|
|
2
|
+
import { memo as s } from "react";
|
|
3
|
+
import h from "./CustomQuantitySelector/index.js";
|
|
4
|
+
import { Skeleton as m } from "../../Skeleton/index.js";
|
|
5
5
|
const p = ({
|
|
6
6
|
hasUndQtd: i,
|
|
7
7
|
decrease: r,
|
|
@@ -13,7 +13,7 @@ const p = ({
|
|
|
13
13
|
}) => /* @__PURE__ */ t("div", { className: "input-add", "data-testid": "quantity-selector-container", children: o ? /* @__PURE__ */ d(c, { children: [
|
|
14
14
|
!a && /* @__PURE__ */ t("div", { className: "product-add-text", children: /* @__PURE__ */ t("p", { children: "Produto adicionado" }) }),
|
|
15
15
|
/* @__PURE__ */ t(
|
|
16
|
-
|
|
16
|
+
h,
|
|
17
17
|
{
|
|
18
18
|
measureUnit: o,
|
|
19
19
|
quantity: i,
|
|
@@ -62,13 +62,13 @@ const p = ({
|
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] }) : /* @__PURE__ */ t(
|
|
65
|
-
|
|
65
|
+
m,
|
|
66
66
|
{
|
|
67
67
|
width: 100,
|
|
68
68
|
height: 40,
|
|
69
69
|
backgroundColor: "var(--color-grayScale-faded)"
|
|
70
70
|
}
|
|
71
|
-
) }), v =
|
|
71
|
+
) }), v = s(p);
|
|
72
72
|
export {
|
|
73
73
|
v as default
|
|
74
74
|
};
|
package/package.json
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@plurix/ecom-components",
|
|
3
|
-
"author": "Plurix",
|
|
4
|
-
"private": false,
|
|
5
|
-
"version": "1.14.
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/main.js",
|
|
8
|
-
"types": "dist/main.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/plurix-ecommerce/ecom-components.git"
|
|
15
|
-
},
|
|
16
|
-
"sideEffects": [
|
|
17
|
-
"**/*.css"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"dev": "vite",
|
|
21
|
-
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
22
|
-
"format": "prettier --write .",
|
|
23
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
24
|
-
"prepare": "husky install",
|
|
25
|
-
"preview": "vite preview",
|
|
26
|
-
"test": "jest"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"react": "^18.2.0",
|
|
30
|
-
"react-dom": "^18.2.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@babel/preset-env": "^7.24.5",
|
|
34
|
-
"@babel/preset-react": "^7.24.1",
|
|
35
|
-
"@commitlint/cli": "^17.4.2",
|
|
36
|
-
"@commitlint/config-conventional": "^17.4.2",
|
|
37
|
-
"@jest/globals": "^29.7.0",
|
|
38
|
-
"@testing-library/jest-dom": "^6.4.5",
|
|
39
|
-
"@testing-library/react": "^15.0.7",
|
|
40
|
-
"@types/jest": "^29.5.12",
|
|
41
|
-
"@types/node": "^20.11.30",
|
|
42
|
-
"@types/react": "^18.2.71",
|
|
43
|
-
"@types/react-dom": "^18.2.22",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
45
|
-
"@typescript-eslint/parser": "^6.21.0",
|
|
46
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
47
|
-
"eslint": "^8.57.0",
|
|
48
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
-
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
|
-
"glob": "^10.3.10",
|
|
51
|
-
"husky": "^9.0.11",
|
|
52
|
-
"identity-obj-proxy": "^3.0.0",
|
|
53
|
-
"jest": "^29.7.0",
|
|
54
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
55
|
-
"jest-svg-transformer": "^1.0.0",
|
|
56
|
-
"prettier": "^2.2.1",
|
|
57
|
-
"react": "^18.2.0",
|
|
58
|
-
"react-dom": "^18.2.0",
|
|
59
|
-
"rollup-plugin-delete": "^2.0.0",
|
|
60
|
-
"ts-jest": "^29.1.2",
|
|
61
|
-
"typescript": "^5.4.3",
|
|
62
|
-
"vite": "^4.5.3",
|
|
63
|
-
"vite-plugin-dts": "^3.7.3",
|
|
64
|
-
"vite-plugin-lib-inject-css": "^2.0.1"
|
|
65
|
-
},
|
|
66
|
-
"dependencies": {
|
|
67
|
-
"@
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@plurix/ecom-components",
|
|
3
|
+
"author": "Plurix",
|
|
4
|
+
"private": false,
|
|
5
|
+
"version": "1.14.2-commerce",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/main.js",
|
|
8
|
+
"types": "dist/main.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/plurix-ecommerce/ecom-components.git"
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
22
|
+
"format": "prettier --write .",
|
|
23
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
24
|
+
"prepare": "husky install",
|
|
25
|
+
"preview": "vite preview",
|
|
26
|
+
"test": "jest"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^18.2.0",
|
|
30
|
+
"react-dom": "^18.2.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/preset-env": "^7.24.5",
|
|
34
|
+
"@babel/preset-react": "^7.24.1",
|
|
35
|
+
"@commitlint/cli": "^17.4.2",
|
|
36
|
+
"@commitlint/config-conventional": "^17.4.2",
|
|
37
|
+
"@jest/globals": "^29.7.0",
|
|
38
|
+
"@testing-library/jest-dom": "^6.4.5",
|
|
39
|
+
"@testing-library/react": "^15.0.7",
|
|
40
|
+
"@types/jest": "^29.5.12",
|
|
41
|
+
"@types/node": "^20.11.30",
|
|
42
|
+
"@types/react": "^18.2.71",
|
|
43
|
+
"@types/react-dom": "^18.2.22",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
46
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
47
|
+
"eslint": "^8.57.0",
|
|
48
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
|
+
"glob": "^10.3.10",
|
|
51
|
+
"husky": "^9.0.11",
|
|
52
|
+
"identity-obj-proxy": "^3.0.0",
|
|
53
|
+
"jest": "^29.7.0",
|
|
54
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
55
|
+
"jest-svg-transformer": "^1.0.0",
|
|
56
|
+
"prettier": "^2.2.1",
|
|
57
|
+
"react": "^18.2.0",
|
|
58
|
+
"react-dom": "^18.2.0",
|
|
59
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
60
|
+
"ts-jest": "^29.1.2",
|
|
61
|
+
"typescript": "^5.4.3",
|
|
62
|
+
"vite": "^4.5.3",
|
|
63
|
+
"vite-plugin-dts": "^3.7.3",
|
|
64
|
+
"vite-plugin-lib-inject-css": "^2.0.1"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@faststore/ui": "^3.41.5",
|
|
68
|
+
"axios": "^1.7.4"
|
|
69
|
+
}
|
|
70
|
+
}
|