@plurix/ecom-components 1.14.1-eng-task-1249.7 → 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.
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { isMobile as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as p } from "react";
|
|
3
|
+
import { isMobile as u } from "../../../constants/index.js";
|
|
4
|
+
import { formatBrazilianPrice as n, formatedQty as h } from "../../../utils/changerOrderModal.js";
|
|
5
|
+
const M = ({ selectedItem: o }) => {
|
|
6
|
+
console.log("selectedItem", o);
|
|
6
7
|
const {
|
|
7
8
|
imageUrl: t,
|
|
8
|
-
name:
|
|
9
|
-
quantity:
|
|
10
|
-
sellingPrice:
|
|
11
|
-
measurementUnit:
|
|
12
|
-
unitMultiplier:
|
|
13
|
-
} =
|
|
14
|
-
|
|
9
|
+
name: s,
|
|
10
|
+
quantity: i,
|
|
11
|
+
sellingPrice: m,
|
|
12
|
+
measurementUnit: a,
|
|
13
|
+
unitMultiplier: r
|
|
14
|
+
} = o || {};
|
|
15
|
+
console.log({
|
|
16
|
+
measurementUnit: a,
|
|
17
|
+
unitMultiplier: r,
|
|
18
|
+
quantity: i,
|
|
19
|
+
testeunitMultiplier: n(r || 0),
|
|
20
|
+
testeuquantity: n(i || 0)
|
|
21
|
+
});
|
|
22
|
+
const l = p(() => u ? 48 : 80, []), d = t == null ? void 0 : t.replace("-55-55", "-80-80");
|
|
23
|
+
return /* @__PURE__ */ c("section", { className: "change-order-pre-content", children: [
|
|
15
24
|
/* @__PURE__ */ e(
|
|
16
25
|
"img",
|
|
17
26
|
{
|
|
18
|
-
height:
|
|
19
|
-
width:
|
|
27
|
+
height: l,
|
|
28
|
+
width: l,
|
|
20
29
|
style: { objectFit: "contain", width: "20%" },
|
|
21
|
-
src:
|
|
22
|
-
alt:
|
|
30
|
+
src: d,
|
|
31
|
+
alt: s,
|
|
23
32
|
className: "change-order-pre-content-img"
|
|
24
33
|
}
|
|
25
34
|
),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ e("h3", { className: "product-name", children:
|
|
28
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ c("div", { className: "change-order-pre-content-infos", children: [
|
|
36
|
+
/* @__PURE__ */ e("h3", { className: "product-name", children: s }),
|
|
37
|
+
/* @__PURE__ */ c("div", { className: "product-details", children: [
|
|
29
38
|
/* @__PURE__ */ e("p", { className: "quantity", children: h(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
a || "",
|
|
40
|
+
r || 0,
|
|
41
|
+
i || 0
|
|
33
42
|
) }),
|
|
34
|
-
/* @__PURE__ */ e("p", { className: "sellingPrice", children:
|
|
43
|
+
/* @__PURE__ */ e("p", { className: "sellingPrice", children: n(m || 0) })
|
|
35
44
|
] })
|
|
36
45
|
] })
|
|
37
46
|
] });
|
|
38
47
|
};
|
|
39
48
|
export {
|
|
40
|
-
|
|
49
|
+
M as ProductSelected
|
|
41
50
|
};
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
if (
|
|
1
|
+
const i = (t, e, r = "") => {
|
|
2
|
+
if (r === "un")
|
|
3
3
|
return t;
|
|
4
|
-
const o = (t *
|
|
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})?/)),
|
|
7
|
-
const
|
|
8
|
-
return t === "un" ?
|
|
9
|
-
},
|
|
10
|
-
const
|
|
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 (
|
|
17
|
-
}, f = (t) =>
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
i as formatListPrice,
|
|
25
|
+
d as formatedMultiply,
|
|
26
|
+
a as formatedQty,
|
|
30
27
|
m as truncPrice
|
|
31
28
|
};
|