@plurix/ecom-components 1.14.1-eng-task-1249.8 → 1.14.1-eng-task-1249.9

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.
@@ -2,40 +2,41 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { useMemo as p } from "react";
3
3
  import { isMobile as u } from "../../../constants/index.js";
4
4
  import { formatBrazilianPrice as n, formatedQty as h } from "../../../utils/changerOrderModal.js";
5
- const M = ({ selectedItem: l }) => {
5
+ const M = ({ selectedItem: o }) => {
6
+ console.log("selectedItem", o);
6
7
  const {
7
8
  imageUrl: t,
8
- name: o,
9
+ name: s,
9
10
  quantity: i,
10
11
  sellingPrice: m,
11
- measurementUnit: s,
12
+ measurementUnit: a,
12
13
  unitMultiplier: r
13
- } = l || {};
14
+ } = o || {};
14
15
  console.log({
15
- measurementUnit: s,
16
+ measurementUnit: a,
16
17
  unitMultiplier: r,
17
18
  quantity: i,
18
19
  testeunitMultiplier: n(r || 0),
19
20
  testeuquantity: n(i || 0)
20
21
  });
21
- const a = p(() => u ? 48 : 80, []), d = t == null ? void 0 : t.replace("-55-55", "-80-80");
22
+ const l = p(() => u ? 48 : 80, []), d = t == null ? void 0 : t.replace("-55-55", "-80-80");
22
23
  return /* @__PURE__ */ c("section", { className: "change-order-pre-content", children: [
23
24
  /* @__PURE__ */ e(
24
25
  "img",
25
26
  {
26
- height: a,
27
- width: a,
27
+ height: l,
28
+ width: l,
28
29
  style: { objectFit: "contain", width: "20%" },
29
30
  src: d,
30
- alt: o,
31
+ alt: s,
31
32
  className: "change-order-pre-content-img"
32
33
  }
33
34
  ),
34
35
  /* @__PURE__ */ c("div", { className: "change-order-pre-content-infos", children: [
35
- /* @__PURE__ */ e("h3", { className: "product-name", children: o }),
36
+ /* @__PURE__ */ e("h3", { className: "product-name", children: s }),
36
37
  /* @__PURE__ */ c("div", { className: "product-details", children: [
37
38
  /* @__PURE__ */ e("p", { className: "quantity", children: h(
38
- s || "",
39
+ a || "",
39
40
  r || 0,
40
41
  i || 0
41
42
  ) }),
@@ -1,20 +1,17 @@
1
- const s = (t, r, e = "") => {
2
- if (e === "un")
1
+ const i = (t, e, r = "") => {
2
+ if (r === "un")
3
3
  return t;
4
- const o = (t * r).toString().match(/^\d+(?:\.\d{0,2})?/);
4
+ const o = (t * e).toString().match(/^\d+(?:\.\d{0,2})?/);
5
5
  return Number(o);
6
- }, u = (t) => t.toLocaleString("pt-br", { style: "currency", currency: "BRL" }), m = (t) => Number(t.toString().match(/^\d+(?:\.\d{0,2})?/)), d = (t, r, e) => {
7
- const n = r * 1e3 * e;
8
- return t === "un" ? `${e} ${e > 1 ? "unidades" : "unidade"} ` : n >= 1e3 ? `${n / 1e3}kg` : `${n}g`;
9
- }, a = (t, r) => {
10
- const e = r * 1e3;
11
- return t === "un" ? "" : e >= 1e3 ? `/${e / 1e3}kg` : `/${e}g`;
12
- }, i = (t, r) => {
13
- const e = r == null ? void 0 : r.filter(
6
+ }, u = (t) => t.toLocaleString("pt-br", { style: "currency", currency: "BRL" }), m = (t) => Number(t.toString().match(/^\d+(?:\.\d{0,2})?/)), a = (t, e, r) => t === "un" ? `${r} ${r > 1 ? "unidades" : "unidade"} ` : e >= 1 ? `${e}kg` : `${e}g`, d = (t, e) => {
7
+ const r = e * 1e3;
8
+ return t === "un" ? "" : r >= 1e3 ? `/${r / 1e3}kg` : `/${r}g`;
9
+ }, s = (t, e) => {
10
+ const r = e == null ? void 0 : e.filter(
14
11
  (n) => t.includes(n.field.originalName) && n.values.some((c) => c.originalName.toLowerCase() === "true")
15
12
  );
16
- return (e == null ? void 0 : e.map((n) => n.field.originalName)) || [];
17
- }, f = (t) => i([
13
+ return (r == null ? void 0 : r.map((n) => n.field.originalName)) || [];
14
+ }, f = (t) => s([
18
15
  "Vegano",
19
16
  "Orgânico",
20
17
  "Sem Glúten",
@@ -24,8 +21,8 @@ const s = (t, r, e = "") => {
24
21
  export {
25
22
  u as formatBrazilianPrice,
26
23
  f as formatEspecifications,
27
- s as formatListPrice,
28
- a as formatedMultiply,
29
- d as formatedQty,
24
+ i as formatListPrice,
25
+ d as formatedMultiply,
26
+ a as formatedQty,
30
27
  m as truncPrice
31
28
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@plurix/ecom-components",
3
3
  "author": "Plurix",
4
4
  "private": false,
5
- "version": "1.14.1-eng-task-1249.8",
5
+ "version": "1.14.1-eng-task-1249.9",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",