@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.
@@ -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 { 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";
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 } = _(), [r, p] = e({ itemId: "" });
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 E({
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 L(f, a), i = ((d = (t = c == null ? void 0 : c.customData) == null ? void 0 : t.customApps) == null ? void 0 : d.find(
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
- T(
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
- A,
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(J, {})
98
+ ) : /* @__PURE__ */ n(_, {})
99
99
  ] })
100
100
  }
101
101
  );
@@ -1,14 +1,14 @@
1
- import s from "axios";
2
- const n = async (o, t, a) => {
3
- const { data: r } = await s.post(
4
- `https://${o}.myvtex.com/_v/faststoreapi/coupon/order`,
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 r;
10
+ return p;
11
11
  };
12
12
  export {
13
- n as addCoupon
13
+ s as addCoupon
14
14
  };
@@ -1,8 +1,8 @@
1
- import a from "axios";
2
- const m = async (s, n, t) => {
3
- const o = `https://${s}.myvtex.com/_v/faststoreapi/coupon/list`, r = Math.random(), { data: p } = t ? await a.post(o, { couponsList: t }) : await a.get(o, { params: { builder: n, random: r } });
4
- return p.coupons;
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
- m as getCoupons
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 { Skeleton as i } from "@acctglobal/skeleton";
3
- import { ModalHeader as m } from "../components/ModalHeader.js";
4
- import { ModalFooter as u } from "../components/ModalFooter.js";
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
- m,
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
- i,
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
- u,
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 { Skeleton as s } from "@acctglobal/skeleton";
3
- import { memo as h } from "react";
4
- import m from "./CustomQuantitySelector/index.js";
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
- m,
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
- s,
65
+ m,
66
66
  {
67
67
  width: 100,
68
68
  height: 40,
69
69
  backgroundColor: "var(--color-grayScale-faded)"
70
70
  }
71
- ) }), v = h(p);
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.1-eng-task-383.0",
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
- "@acctglobal/skeleton": "^1.0.0",
68
- "@faststore/ui": "^3.41.5",
69
- "axios": "^1.7.4"
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
+ }