@caseparts-org/caseblocks 0.0.211 → 0.0.212
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 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._availability_kb59t_1{font-style:italic}._pointer_kb59t_5{cursor:pointer}._tooltip_kb59t_9{background-color:#fafafa}._tooltipContent_kb59t_13{max-width:370px}._tooltipContent_kb59t_13>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_kb59t_13 li{list-style:none}._available_kb59t_26,._in-stock_kb59t_26{color:var(--color-alerts-success)}._limited_kb59t_29{color:var(--color-alerts-warning)}._discontinued_kb59t_32{color:var(--color-alerts-error-warning)}
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { Text as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import '../../assets/Availability.css';const
|
|
6
|
-
availability:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { Text as l } from "../../atoms/Text/Text.js";
|
|
4
|
+
import { Tooltip as b } from "../../atoms/Tooltip/Tooltip.js";
|
|
5
|
+
import '../../assets/Availability.css';const k = "_availability_kb59t_1", f = "_pointer_kb59t_5", C = "_tooltip_kb59t_9", g = "_tooltipContent_kb59t_13", w = "_available_kb59t_26", z = "_limited_kb59t_29", S = "_discontinued_kb59t_32", s = {
|
|
6
|
+
availability: k,
|
|
7
|
+
pointer: f,
|
|
8
|
+
tooltip: C,
|
|
9
|
+
tooltipContent: g,
|
|
10
|
+
available: w,
|
|
11
|
+
"in-stock": "_in-stock_kb59t_26",
|
|
12
|
+
limited: z,
|
|
13
|
+
discontinued: S
|
|
12
14
|
};
|
|
13
|
-
function
|
|
15
|
+
function L({
|
|
14
16
|
availId: i,
|
|
15
|
-
availDescription:
|
|
17
|
+
availDescription: t,
|
|
16
18
|
availClassName: d,
|
|
17
|
-
enableTooltip:
|
|
19
|
+
enableTooltip: n = !1,
|
|
18
20
|
inventory: a
|
|
19
21
|
}) {
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
|
|
22
|
+
const c = n && a && i !== "not-found", r = /* @__PURE__ */ e(l, { size: "xs", className: _(s.availability, s[i], c ? s.pointer : null, d), children: t });
|
|
23
|
+
return c ? /* @__PURE__ */ e(
|
|
24
|
+
b,
|
|
23
25
|
{
|
|
24
26
|
closeDelay: 0,
|
|
25
27
|
openDelay: 250,
|
|
26
28
|
position: "top center",
|
|
27
|
-
trigger:
|
|
28
|
-
|
|
29
|
+
trigger: r,
|
|
30
|
+
contentClassName: s.tooltip,
|
|
31
|
+
children: /* @__PURE__ */ e(A, { availabilityId: i, inventory: a })
|
|
29
32
|
}
|
|
30
|
-
) :
|
|
33
|
+
) : r;
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
var
|
|
34
|
-
const d = (((
|
|
35
|
+
function A({ availabilityId: i, inventory: t }) {
|
|
36
|
+
var n, a, c, r, p, u;
|
|
37
|
+
const d = (((n = t == null ? void 0 : t.MPK) == null ? void 0 : n.Unreserved) ?? 0) + (((a = t == null ? void 0 : t.SEA) == null ? void 0 : a.Unreserved) ?? 0) + (((c = t == null ? void 0 : t.STL) == null ? void 0 : c.Unreserved) ?? 0);
|
|
35
38
|
if (i === "in-stock" || i === "limited") {
|
|
36
|
-
const
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
const h = i === "in-stock" ? "Additional quantity will be backordered. If you need more than we have at any one warehouse, a CSR will contact you with options." : "Once our stock is depleted, this item will no longer be available.";
|
|
40
|
+
return /* @__PURE__ */ o("div", { className: s.tooltipContent, children: [
|
|
41
|
+
/* @__PURE__ */ o(l, { size: "sm", children: [
|
|
39
42
|
"We currently have (",
|
|
40
43
|
d,
|
|
41
44
|
") in stock across our three warehouses:"
|
|
42
45
|
] }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ o("ul", { children: [
|
|
47
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
|
|
45
48
|
"(",
|
|
46
|
-
((
|
|
49
|
+
((r = t == null ? void 0 : t.MPK) == null ? void 0 : r.Unreserved) ?? 0,
|
|
47
50
|
") Los Angeles"
|
|
48
51
|
] }) }),
|
|
49
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
|
|
50
53
|
"(",
|
|
51
|
-
((
|
|
54
|
+
((p = t == null ? void 0 : t.STL) == null ? void 0 : p.Unreserved) ?? 0,
|
|
52
55
|
") St. Louis"
|
|
53
56
|
] }) }),
|
|
54
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
|
|
55
58
|
"(",
|
|
56
|
-
((u =
|
|
59
|
+
((u = t == null ? void 0 : t.SEA) == null ? void 0 : u.Unreserved) ?? 0,
|
|
57
60
|
") Seattle"
|
|
58
61
|
] }) })
|
|
59
62
|
] }),
|
|
60
|
-
/* @__PURE__ */ l
|
|
63
|
+
/* @__PURE__ */ e(l, { size: "sm", children: h })
|
|
61
64
|
] });
|
|
62
65
|
}
|
|
63
|
-
return i === "available" ? /* @__PURE__ */
|
|
66
|
+
return i === "available" ? /* @__PURE__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { size: "sm", children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }) }) : i === "discontinued" ? /* @__PURE__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ e(m, {});
|
|
64
67
|
}
|
|
65
68
|
export {
|
|
66
|
-
|
|
69
|
+
L as Availability
|
|
67
70
|
};
|