@plurix/ecom-components 1.14.1-loyalty → 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.
Files changed (24) hide show
  1. package/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +45 -0
  2. package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +34 -0
  3. package/dist/node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js +29 -0
  4. package/dist/packages/Carousel/Carousel.js +1 -1
  5. package/dist/packages/CartClubAlert/CartClubAlert.js +1 -1
  6. package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +12 -12
  7. package/dist/packages/Coupons/Coupons.js +1 -1
  8. package/dist/packages/Coupons/views/LoadingView.js +6 -6
  9. package/dist/packages/Modal/Modal.js +1 -1
  10. package/dist/packages/Onboarding/Onboarding.js +1 -1
  11. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.d.ts +1 -1
  12. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.js +13 -22
  13. package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.js +4 -3
  14. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.d.ts +3 -2
  15. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.js +17 -19
  16. package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +53 -45
  17. package/dist/packages/ProductCard/index.js +1 -1
  18. package/dist/packages/ProductCardSeeMore/ProductCardSeeMore.js +1 -1
  19. package/dist/packages/Regionalization/Regionalization.js +1 -1
  20. package/dist/packages/Regionalization/views/AllStoresScreen.js +31 -32
  21. package/dist/packages/Tour/Tour.js +1 -1
  22. package/package.json +70 -69
  23. package/dist/packages/ProductCard/ProductCardButton/IconButton.d.ts +0 -12
  24. package/dist/packages/ProductCard/ProductCardButton/IconButton.js +0 -46
@@ -0,0 +1,45 @@
1
+ var R = Object.defineProperty;
2
+ var o = Object.getOwnPropertySymbols;
3
+ var b = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable;
4
+ var l = (e, a, t) => a in e ? R(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, p = (e, a) => {
5
+ for (var t in a || (a = {}))
6
+ b.call(a, t) && l(e, t, a[t]);
7
+ if (o)
8
+ for (var t of o(a))
9
+ m.call(a, t) && l(e, t, a[t]);
10
+ return e;
11
+ };
12
+ var c = (e, a) => {
13
+ var t = {};
14
+ for (var r in e)
15
+ b.call(e, r) && a.indexOf(r) < 0 && (t[r] = e[r]);
16
+ if (e != null && o)
17
+ for (var r of o(e))
18
+ a.indexOf(r) < 0 && m.call(e, r) && (t[r] = e[r]);
19
+ return t;
20
+ };
21
+ import n, { forwardRef as h } from "react";
22
+ import k from "../Loader/Loader.js";
23
+ const x = h(function(y, w) {
24
+ var s = y, { children: a, variant: t, inverse: r, size: i = "regular", testId: E = "fs-button", loading: f, loadingLabel: g, icon: u, iconPosition: d = "left", disabled: B } = s, v = c(s, ["children", "variant", "inverse", "size", "testId", "loading", "loadingLabel", "icon", "iconPosition", "disabled"]);
25
+ return n.createElement(
26
+ "button",
27
+ p({ ref: w, "data-fs-button": !0, "data-fs-button-inverse": r, "data-fs-button-size": i, "data-fs-button-loading": f, "data-fs-button-variant": t, disabled: B, "data-testid": E }, v),
28
+ n.createElement(
29
+ "div",
30
+ { "data-fs-button-wrapper": !0 },
31
+ f && n.createElement(
32
+ "p",
33
+ { "data-fs-button-loading-label": !0 },
34
+ g,
35
+ n.createElement(k, { variant: t === "primary" && !r ? "light" : "dark" })
36
+ ),
37
+ !!u && d === "left" && n.createElement("span", { "data-fs-button-icon": !0 }, u),
38
+ a && n.createElement("span", null, a),
39
+ !!u && d === "right" && n.createElement("span", { "data-fs-button-icon": !0 }, u)
40
+ )
41
+ );
42
+ }), j = x;
43
+ export {
44
+ j as default
45
+ };
@@ -0,0 +1,34 @@
1
+ var u = Object.defineProperty;
2
+ var d = Object.getOwnPropertySymbols;
3
+ var f = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
4
+ var s = (e, t, a) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, m = (e, t) => {
5
+ for (var a in t || (t = {}))
6
+ f.call(t, a) && s(e, a, t[a]);
7
+ if (d)
8
+ for (var a of d(t))
9
+ l.call(t, a) && s(e, a, t[a]);
10
+ return e;
11
+ };
12
+ var c = (e, t) => {
13
+ var a = {};
14
+ for (var r in e)
15
+ f.call(e, r) && t.indexOf(r) < 0 && (a[r] = e[r]);
16
+ if (e != null && d)
17
+ for (var r of d(e))
18
+ t.indexOf(r) < 0 && l.call(e, r) && (a[r] = e[r]);
19
+ return a;
20
+ };
21
+ import o, { forwardRef as p } from "react";
22
+ const E = p(function(L, i) {
23
+ var n = L, { testId: t = "fs-loader", variant: a = "dark" } = n, r = c(n, ["testId", "variant"]);
24
+ return o.createElement(
25
+ "span",
26
+ m({ ref: i, "data-fs-loader": !0, "data-fs-loader-variant": a, "data-testid": t }, r),
27
+ o.createElement("span", { "data-fs-loader-item": !0 }),
28
+ o.createElement("span", { "data-fs-loader-item": !0 }),
29
+ o.createElement("span", { "data-fs-loader-item": !0 })
30
+ );
31
+ }), v = E;
32
+ export {
33
+ v as default
34
+ };
@@ -0,0 +1,29 @@
1
+ var I = Object.defineProperty;
2
+ var r = Object.getOwnPropertySymbols;
3
+ var f = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
4
+ var c = (t, e, o) => e in t ? I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, i = (t, e) => {
5
+ for (var o in e || (e = {}))
6
+ f.call(e, o) && c(t, o, e[o]);
7
+ if (r)
8
+ for (var o of r(e))
9
+ s.call(e, o) && c(t, o, e[o]);
10
+ return t;
11
+ };
12
+ var l = (t, e) => {
13
+ var o = {};
14
+ for (var n in t)
15
+ f.call(t, n) && e.indexOf(n) < 0 && (o[n] = t[n]);
16
+ if (t != null && r)
17
+ for (var n of r(t))
18
+ e.indexOf(n) < 0 && s.call(t, n) && (o[n] = t[n]);
19
+ return o;
20
+ };
21
+ import p, { forwardRef as R } from "react";
22
+ import g from "../../atoms/Button/Button.js";
23
+ const w = R(function(x, B) {
24
+ var a = x, { icon: e, children: o, testId: n = "fs-icon-button", "aria-label": b, size: d = "regular", variant: u } = a, m = l(a, ["icon", "children", "testId", "aria-label", "size", "variant"]);
25
+ return p.createElement(g, i({ ref: B, "data-fs-button": !0, "data-fs-icon-button": !0, variant: u != null ? u : "tertiary", icon: e, "aria-label": b, testId: n, size: d }, m), o);
26
+ }), $ = w;
27
+ export {
28
+ $ as default
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,
@@ -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 "../Skeleton/index.js";
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
  );
@@ -6,7 +6,7 @@ import { CouponsView as H } from "./views/CouponsView.js";
6
6
  import { RulesView as K } from "./views/RulesView.js";
7
7
  import { OverwriteView as P } from "./views/OverwriteView.js";
8
8
  import { EmptyCartView as Q } from "./views/EmptyCartView.js";
9
- /* empty css */const I = ({
9
+ /* empty css */const I = ({
10
10
  orderFormId: h,
11
11
  hasItemsInCart: a,
12
12
  builder: j,
@@ -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 "../../Skeleton/index.js";
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,
@@ -3,7 +3,7 @@ import { useRef as s, useEffect as p } from "react";
3
3
  import { ArrowIcon as g } from "../../assets/svgs/ArrowIcon.js";
4
4
  import { CloseIcon as k } from "../../assets/svgs/CloseIcon.js";
5
5
  import { HAS_WINDOW as v } from "../../constants/index.js";
6
- /* empty css */const R = (w) => {
6
+ /* empty css */const R = (w) => {
7
7
  const {
8
8
  isOpen: r,
9
9
  setIsOpen: C,
@@ -4,7 +4,7 @@ import { Header as x } from "./components/Header.js";
4
4
  import { Content as S } from "./components/Content.js";
5
5
  import { Footer as c } from "./components/Footer.js";
6
6
  import { TIPS_LENGTH as h } from "./constants/tips.js";
7
- /* empty css */const w = ({
7
+ /* empty css */const w = ({
8
8
  socialMediaLinks: a,
9
9
  handleCloseAction: r,
10
10
  handleFinishAction: n,
@@ -6,5 +6,5 @@ interface ProductCardBadgeProps {
6
6
  measurementUnit?: string;
7
7
  setIsShowProductBadge: React.Dispatch<React.SetStateAction<boolean>>;
8
8
  }
9
- export declare const ProductCardBadgeKg: ({ measurementUnit, skuSpecifications, unitMultiplier, setIsShowProductBadge }: ProductCardBadgeProps) => import("react/jsx-runtime").JSX.Element | undefined;
9
+ export declare const ProductCardBadgeKg: ({ measurementUnit, setIsShowProductBadge, unitMultiplier }: ProductCardBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  export {};
@@ -1,24 +1,15 @@
1
- import { jsx as c, jsxs as h } from "react/jsx-runtime";
2
- import { useMemo as g, useEffect as v } from "react";
3
- const b = ({
4
- measurementUnit: n,
5
- skuSpecifications: o,
6
- unitMultiplier: r,
7
- setIsShowProductBadge: s
8
- }) => {
9
- const m = "Venda por unidade", e = o == null ? void 0 : o.some((f) => f.field.originalName === m && f.values.some((N) => N.originalName === "true")), d = g(() => e ? null : r > 1 ? r : r === 1 ? n !== "un" ? r : null : r * 1e3, [e, r]), a = g(() => e ? "Un" : r * 1e3 >= 1e3 ? n : "g", [e, n, r]);
10
- if (v(() => {
11
- if (!d || !a) {
12
- s(!1);
13
- return;
14
- }
15
- s(!0);
16
- }, [d, a]), !(!d || !a))
17
- return /* @__PURE__ */ c("div", { className: "product-card-badge", children: /* @__PURE__ */ h("p", { className: "product-card-badge-kg", children: [
18
- d,
19
- a
20
- ] }) });
21
- };
1
+ import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
+ const g = ({
3
+ measurementUnit: e,
4
+ setIsShowProductBadge: d,
5
+ unitMultiplier: r
6
+ }) => e === "un" ? null : r < 1 ? (d(!0), /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */ c("p", { className: "product-card-badge-kg", children: [
7
+ r * 1e3,
8
+ "g"
9
+ ] }) })) : (r >= 1 && d(!0), /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */ c("p", { className: "product-card-badge-kg", children: [
10
+ r,
11
+ "kg"
12
+ ] }) }));
22
13
  export {
23
- b as ProductCardBadgeKg
14
+ g as ProductCardBadgeKg
24
15
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- const r = ({ handleAddToCart: t }) => /* @__PURE__ */ a(
3
- "button",
2
+ import o from "../../../node_modules/@faststore/components/dist/esm/atoms/Button/Button.js";
3
+ const n = ({ handleAddToCart: t }) => /* @__PURE__ */ a(
4
+ o,
4
5
  {
5
6
  onClick: t,
6
7
  "data-button-variant": "primary",
@@ -11,5 +12,5 @@ const r = ({ handleAddToCart: t }) => /* @__PURE__ */ a(
11
12
  }
12
13
  );
13
14
  export {
14
- r as AddToCartButton
15
+ n as AddToCartButton
15
16
  };
@@ -1,9 +1,10 @@
1
+ import { IconButtonProps } from '@faststore/ui';
1
2
  import { InputHTMLAttributes } from 'react';
2
3
 
3
4
  export interface QuantitySelectorProps extends InputHTMLAttributes<HTMLDivElement> {
4
5
  quantity: number | string;
5
- leftButtonProps: React.ReactNode;
6
- rightButtonProps: React.ReactNode;
6
+ leftButtonProps: Omit<IconButtonProps, 'aria-label'>;
7
+ rightButtonProps: Omit<IconButtonProps, 'aria-label'>;
7
8
  measureUnit?: string;
8
9
  testId?: string;
9
10
  }
@@ -1,35 +1,35 @@
1
1
  var N = Object.defineProperty, x = Object.defineProperties;
2
2
  var v = Object.getOwnPropertyDescriptors;
3
3
  var l = Object.getOwnPropertySymbols;
4
- var u = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
5
- var s = (t, a, e) => a in t ? N(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e, d = (t, a) => {
4
+ var c = Object.prototype.hasOwnProperty, d = Object.prototype.propertyIsEnumerable;
5
+ var u = (t, a, e) => a in t ? N(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e, r = (t, a) => {
6
6
  for (var e in a || (a = {}))
7
- u.call(a, e) && s(t, e, a[e]);
7
+ c.call(a, e) && u(t, e, a[e]);
8
8
  if (l)
9
9
  for (var e of l(a))
10
- c.call(a, e) && s(t, e, a[e]);
10
+ d.call(a, e) && u(t, e, a[e]);
11
11
  return t;
12
12
  }, y = (t, a) => x(t, v(a));
13
13
  var m = (t, a) => {
14
14
  var e = {};
15
15
  for (var i in t)
16
- u.call(t, i) && a.indexOf(i) < 0 && (e[i] = t[i]);
16
+ c.call(t, i) && a.indexOf(i) < 0 && (e[i] = t[i]);
17
17
  if (t != null && l)
18
18
  for (var i of l(t))
19
- a.indexOf(i) < 0 && c.call(t, i) && (e[i] = t[i]);
19
+ a.indexOf(i) < 0 && d.call(t, i) && (e[i] = t[i]);
20
20
  return e;
21
21
  };
22
22
  import { jsxs as q, jsx as n } from "react/jsx-runtime";
23
23
  import { forwardRef as Q } from "react";
24
- import p from "../IconButton.js";
24
+ import p from "../../../../node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js";
25
25
  const A = Q(function(j, h) {
26
- var o = j, {
26
+ var s = j, {
27
27
  quantity: a,
28
28
  testId: e = "store-quantity-selector",
29
29
  leftButtonProps: i,
30
30
  rightButtonProps: f,
31
- measureUnit: r
32
- } = o, b = m(o, [
31
+ measureUnit: o
32
+ } = s, b = m(s, [
33
33
  "quantity",
34
34
  "testId",
35
35
  "leftButtonProps",
@@ -38,7 +38,7 @@ const A = Q(function(j, h) {
38
38
  ]);
39
39
  return /* @__PURE__ */ q(
40
40
  "div",
41
- y(d({
41
+ y(r({
42
42
  className: "quantity-selector",
43
43
  "data-testid": e,
44
44
  ref: h
@@ -46,25 +46,23 @@ const A = Q(function(j, h) {
46
46
  children: [
47
47
  /* @__PURE__ */ n(
48
48
  p,
49
- {
50
- icon: i,
49
+ r({
51
50
  "aria-controls": "quantity-selector-input",
52
51
  "aria-label": "Diminuir quantidade",
53
52
  className: "quantity-selector-button button-plus"
54
- }
53
+ }, i)
55
54
  ),
56
55
  /* @__PURE__ */ q("div", { style: { display: "flex", alignItems: "center" }, children: [
57
56
  /* @__PURE__ */ n("div", { style: { width: "auto" }, children: /* @__PURE__ */ n("p", { "aria-label": "Quantidade", className: "quantity-selector-quantity", children: a }) }),
58
- r && r !== "un" && /* @__PURE__ */ n("p", { className: "quantity-selector-measure-unit", children: r })
57
+ o && o !== "un" && /* @__PURE__ */ n("p", { className: "quantity-selector-measure-unit", children: o })
59
58
  ] }),
60
59
  /* @__PURE__ */ n(
61
60
  p,
62
- {
61
+ r({
63
62
  "aria-controls": "quantity-selector-input",
64
63
  "aria-label": "Aumentar quantidade",
65
- className: "quantity-selector-button quantity-selector-button-plus",
66
- icon: f
67
- }
64
+ className: "quantity-selector-button quantity-selector-button-plus"
65
+ }, f)
68
66
  )
69
67
  ]
70
68
  })
@@ -1,66 +1,74 @@
1
- import { jsx as t, jsxs as a, Fragment as c } from "react/jsx-runtime";
2
- import { Skeleton as s } from "../../Skeleton/index.js";
3
- import { memo as h } from "react";
4
- import m from "./CustomQuantitySelector/index.js";
5
- const u = ({
1
+ import { jsx as t, jsxs as d, Fragment as c } from "react/jsx-runtime";
2
+ import { memo as s } from "react";
3
+ import h from "./CustomQuantitySelector/index.js";
4
+ import { Skeleton as m } from "../../Skeleton/index.js";
5
+ const p = ({
6
6
  hasUndQtd: i,
7
7
  decrease: r,
8
8
  increase: e,
9
9
  measurementUnit: o,
10
10
  isLeftDisabled: l,
11
11
  isRightDisabled: n,
12
- layout: d
13
- }) => /* @__PURE__ */ t("div", { className: "input-add", "data-testid": "quantity-selector-container", children: o ? /* @__PURE__ */ a(c, { children: [
14
- !d && /* @__PURE__ */ t("div", { className: "product-add-text", children: /* @__PURE__ */ t("p", { children: "Produto adicionado" }) }),
12
+ layout: a
13
+ }) => /* @__PURE__ */ t("div", { className: "input-add", "data-testid": "quantity-selector-container", children: o ? /* @__PURE__ */ d(c, { children: [
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,
20
- leftButtonProps: /* @__PURE__ */ t("button", { onClick: r, disabled: l, children: /* @__PURE__ */ t(
21
- "svg",
22
- {
23
- width: "13",
24
- height: "28",
25
- viewBox: "0 0 11 4",
26
- fill: "none",
27
- xmlns: "http://www.w3.org/2000/svg",
28
- children: /* @__PURE__ */ t(
29
- "path",
30
- {
31
- d: "M0.568324 3.336V0.767999H10.6243V3.336H0.568324Z",
32
- fill: "var(--color-main)"
33
- }
34
- )
35
- }
36
- ) }),
37
- rightButtonProps: /* @__PURE__ */ t("button", { onClick: e, disabled: n, children: /* @__PURE__ */ t(
38
- "svg",
39
- {
40
- width: "15",
41
- height: "28",
42
- viewBox: "0 0 13 12",
43
- fill: "none",
44
- xmlns: "http://www.w3.org/2000/svg",
45
- children: /* @__PURE__ */ t(
46
- "path",
47
- {
48
- d: "M0.952276 7.336V4.768H5.46428V0.615999H8.08028V4.768H12.5683V7.336H8.08028V11.488H5.46428V7.336H0.952276Z",
49
- fill: "var( --color-main)"
50
- }
51
- )
52
- }
53
- ) })
20
+ leftButtonProps: {
21
+ onClick: r,
22
+ disabled: l,
23
+ icon: /* @__PURE__ */ t(
24
+ "svg",
25
+ {
26
+ width: "13",
27
+ height: "28",
28
+ viewBox: "0 0 11 4",
29
+ fill: "none",
30
+ xmlns: "http://www.w3.org/2000/svg",
31
+ children: /* @__PURE__ */ t(
32
+ "path",
33
+ {
34
+ d: "M0.568324 3.336V0.767999H10.6243V3.336H0.568324Z",
35
+ fill: "var(--color-main)"
36
+ }
37
+ )
38
+ }
39
+ )
40
+ },
41
+ rightButtonProps: {
42
+ onClick: e,
43
+ disabled: n,
44
+ icon: /* @__PURE__ */ t(
45
+ "svg",
46
+ {
47
+ width: "15",
48
+ height: "28",
49
+ viewBox: "0 0 13 12",
50
+ fill: "none",
51
+ xmlns: "http://www.w3.org/2000/svg",
52
+ children: /* @__PURE__ */ t(
53
+ "path",
54
+ {
55
+ d: "M0.952276 7.336V4.768H5.46428V0.615999H8.08028V4.768H12.5683V7.336H8.08028V11.488H5.46428V7.336H0.952276Z",
56
+ fill: "var( --color-main)"
57
+ }
58
+ )
59
+ }
60
+ )
61
+ }
54
62
  }
55
63
  )
56
64
  ] }) : /* @__PURE__ */ t(
57
- s,
65
+ m,
58
66
  {
59
67
  width: 100,
60
68
  height: 40,
61
69
  backgroundColor: "var(--color-grayScale-faded)"
62
70
  }
63
- ) }), v = h(u);
71
+ ) }), v = s(p);
64
72
  export {
65
73
  v as default
66
74
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { ProductCardHorizontal as b } from "./ProductCardHorizontal/index.js";
3
3
  import { ProductCardVertical as g } from "./ProductCardVertical/index.js";
4
- /* empty css */const E = ({
4
+ /* empty css */const E = ({
5
5
  product: l,
6
6
  variant: r,
7
7
  hasPlusFriendBadge: C = !1,
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
2
  import { ProductCardSeeMoreHorizontal as s } from "./ProductCardSeeMoreHorizontal.js";
3
- /* empty css */const l = ({
3
+ /* empty css */const l = ({
4
4
  text: e,
5
5
  link: o,
6
6
  taggingEvent: c,
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { RegionalizationContextProvider as C } from "./context/RegionalizationContext.js";
3
3
  import { ViewsContainer as S } from "./views/ViewsContainer.js";
4
- /* empty css */const z = ({
4
+ /* empty css */const z = ({
5
5
  setMethod: r,
6
6
  setPickupName: a,
7
7
  setCity: o,
@@ -1,39 +1,38 @@
1
- import { jsxs as l, Fragment as f, jsx as e } from "react/jsx-runtime";
2
- import { useRef as v, useState as S, useEffect as u } from "react";
3
- import { Title as b } from "../components/Title.js";
1
+ import { jsxs as o, Fragment as h, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as f, useState as v, useEffect as b } from "react";
3
+ import { Title as S } from "../components/Title.js";
4
4
  import { PickupPoint as w } from "../components/PickupPoint.js";
5
- import { GlassIcon as g } from "../../../assets/svgs/GlassIcon.js";
6
- import { SetViewButton as x } from "../components/SetViewButton.js";
7
- import { ArrowIcon as F } from "../../../assets/svgs/ArrowIcon.js";
8
- import { useRegionalizationContext as N } from "../context/RegionalizationContext.js";
9
- const z = () => {
10
- const { pickup: r, pickupPoints: t, textBackButton: d } = N(), n = v(null), [s, a] = S(t), m = t.length > 0 ? t : [];
11
- u(() => {
12
- console.log("pickupPoints", t), a(m);
13
- }, [t]);
5
+ import { GlassIcon as x } from "../../../assets/svgs/GlassIcon.js";
6
+ import { SetViewButton as N } from "../components/SetViewButton.js";
7
+ import { ArrowIcon as u } from "../../../assets/svgs/ArrowIcon.js";
8
+ import { useRegionalizationContext as C } from "../context/RegionalizationContext.js";
9
+ const E = () => {
10
+ const { pickup: r, pickupPoints: l, textBackButton: m } = C(), a = f(null), [n, s] = v(l), d = l.length > 0 ? l : [];
11
+ b(() => {
12
+ s(d);
13
+ }, [l]);
14
14
  const i = () => {
15
- var o;
16
- console.log("handleFilterStores", t), console.log("handleFilterStores", (o = n.current) == null ? void 0 : o.value.toLowerCase()), a(
17
- t == null ? void 0 : t.filter(
18
- ({ name: h }) => {
15
+ s(
16
+ l == null ? void 0 : l.filter(
17
+ ({ name: t }) => {
19
18
  var c;
20
- return h.toLowerCase().includes(((c = n.current) == null ? void 0 : c.value.toLowerCase()) || "");
19
+ return t.toLowerCase().includes(((c = a.current) == null ? void 0 : c.value.toLowerCase()) || "");
21
20
  }
22
21
  )
23
22
  );
24
23
  };
25
- return /* @__PURE__ */ l(f, { children: [
26
- /* @__PURE__ */ e(b, { title: r == null ? void 0 : r.title }),
27
- /* @__PURE__ */ l("div", { className: "stores-filter", children: [
24
+ return /* @__PURE__ */ o(h, { children: [
25
+ /* @__PURE__ */ e(S, { title: r == null ? void 0 : r.title }),
26
+ /* @__PURE__ */ o("div", { className: "stores-filter", children: [
28
27
  /* @__PURE__ */ e("p", { children: r == null ? void 0 : r.labelFilter }),
29
- /* @__PURE__ */ l("div", { children: [
28
+ /* @__PURE__ */ o("div", { children: [
30
29
  /* @__PURE__ */ e(
31
30
  "input",
32
31
  {
33
32
  type: "text",
34
33
  placeholder: "Loja",
35
- ref: n,
36
- onKeyDown: (o) => o.key === "Enter" && i()
34
+ ref: a,
35
+ onKeyDown: (t) => t.key === "Enter" && i()
37
36
  }
38
37
  ),
39
38
  /* @__PURE__ */ e(
@@ -41,34 +40,34 @@ const z = () => {
41
40
  {
42
41
  className: "filter-ico-container",
43
42
  onClick: () => i(),
44
- children: /* @__PURE__ */ e(g, {})
43
+ children: /* @__PURE__ */ e(x, {})
45
44
  }
46
45
  )
47
46
  ] }),
48
47
  /* @__PURE__ */ e("div", { className: "divider", children: /* @__PURE__ */ e("span", { children: r == null ? void 0 : r.divider }) })
49
48
  ] }),
50
49
  /* @__PURE__ */ e("p", { className: "stores-label", children: r == null ? void 0 : r.labelStores }),
51
- /* @__PURE__ */ e("div", { className: "stores-container", children: s == null ? void 0 : s.map((o) => /* @__PURE__ */ e(
50
+ /* @__PURE__ */ e("div", { className: "stores-container", children: n == null ? void 0 : n.map((t) => /* @__PURE__ */ e(
52
51
  w,
53
52
  {
54
- pickupPointInfos: o
53
+ pickupPointInfos: t
55
54
  },
56
- o == null ? void 0 : o.id
55
+ t == null ? void 0 : t.id
57
56
  )) }),
58
57
  /* @__PURE__ */ e("br", {}),
59
- /* @__PURE__ */ l(
60
- x,
58
+ /* @__PURE__ */ o(
59
+ N,
61
60
  {
62
61
  view: "PickupPointInfoScreen",
63
62
  className: "back-button-all-store",
64
63
  children: [
65
- /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(F, { color: "var(--color-main)" }) }),
66
- d
64
+ /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(u, { color: "var(--color-main)" }) }),
65
+ m
67
66
  ]
68
67
  }
69
68
  )
70
69
  ] });
71
70
  };
72
71
  export {
73
- z as AllStoresScreen
72
+ E as AllStoresScreen
74
73
  };
@@ -2,7 +2,7 @@ import { jsxs as n, Fragment as N, jsx as k } from "react/jsx-runtime";
2
2
  import { useState as S, useRef as H, useEffect as R } from "react";
3
3
  import { TourTooltip as j } from "./components/TourTooltip.js";
4
4
  import { TourOverlay as q } from "./components/TourOverlay.js";
5
- /* empty css */const D = ({
5
+ /* empty css */const D = ({
6
6
  steps: e,
7
7
  handleCloseAction: l,
8
8
  handleFinishAction: c,
package/package.json CHANGED
@@ -1,69 +1,70 @@
1
- {
2
- "name": "@plurix/ecom-components",
3
- "author": "Plurix",
4
- "private": false,
5
- "version": "1.14.1-loyalty",
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
- "axios": "^1.7.4"
68
- }
69
- }
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
+ }
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- icon: React.ReactNode;
5
- children?: React.ReactNode;
6
- testId?: string;
7
- 'aria-label'?: string;
8
- size?: 'small' | 'regular' | 'large';
9
- variant?: string;
10
- }
11
- declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
- export default IconButton;
@@ -1,46 +0,0 @@
1
- var B = Object.defineProperty, I = Object.defineProperties;
2
- var g = Object.getOwnPropertyDescriptors;
3
- var e = Object.getOwnPropertySymbols;
4
- var f = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
5
- var d = (t, o, a) => o in t ? B(t, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[o] = a, i = (t, o) => {
6
- for (var a in o || (o = {}))
7
- f.call(o, a) && d(t, a, o[a]);
8
- if (e)
9
- for (var a of e(o))
10
- s.call(o, a) && d(t, a, o[a]);
11
- return t;
12
- }, c = (t, o) => I(t, g(o));
13
- var l = (t, o) => {
14
- var a = {};
15
- for (var r in t)
16
- f.call(t, r) && o.indexOf(r) < 0 && (a[r] = t[r]);
17
- if (t != null && e)
18
- for (var r of e(t))
19
- o.indexOf(r) < 0 && s.call(t, r) && (a[r] = t[r]);
20
- return a;
21
- };
22
- import { jsxs as h } from "react/jsx-runtime";
23
- import { forwardRef as j } from "react";
24
- const k = j(function(w, x) {
25
- var u = w, { icon: o, children: a, testId: r = "fs-icon-button", "aria-label": b, size: m = "regular", variant: n } = u, p = l(u, ["icon", "children", "testId", "aria-label", "size", "variant"]);
26
- return /* @__PURE__ */ h(
27
- "button",
28
- c(i({
29
- ref: x,
30
- "data-fs-button": !0,
31
- "data-fs-icon-button": !0,
32
- "data-variant": n != null ? n : "tertiary",
33
- "data-size": m,
34
- "data-testid": r,
35
- "aria-label": b
36
- }, p), {
37
- children: [
38
- o,
39
- a
40
- ]
41
- })
42
- );
43
- });
44
- export {
45
- k as default
46
- };