@spscommerce/max 0.2.0 → 0.4.0
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.
- package/lib/index.js +6 -4
- package/lib/index.umd.cjs +3 -3
- package/lib/models/FeatureFlagsTitles.d.ts +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8166,7 +8166,7 @@ function Nq(e, t) {
|
|
|
8166
8166
|
}, [B]), G = h.useCallback(() => {
|
|
8167
8167
|
g(!1), l([]), M([]), a(!1), B(), n(!1), E(null), L(!1), F(null), x();
|
|
8168
8168
|
}, [T, B, x]), K = ({ currentUser: g0 }) => g0 ? !!["sps-agent:user"].every((T0) => g0?.acting_entity.permissions.includes(T0)) : !1, j = h.useCallback(() => {
|
|
8169
|
-
const g0 = I?.
|
|
8169
|
+
const g0 = I?.["show-max-panel"] && K({ currentUser: w }) || !1;
|
|
8170
8170
|
return R(g0), g0;
|
|
8171
8171
|
}, [I, w, R]), n0 = h.useCallback(async () => {
|
|
8172
8172
|
const g0 = j();
|
|
@@ -52227,7 +52227,7 @@ const MZ = ({
|
|
|
52227
52227
|
s && s(I);
|
|
52228
52228
|
}
|
|
52229
52229
|
return /* @__PURE__ */ u0.jsxs("div", { className: "agent-message", children: [
|
|
52230
|
-
/* @__PURE__ */ u0.jsx("div", { className: "agent-icon", children: g?.
|
|
52230
|
+
/* @__PURE__ */ u0.jsx("div", { className: "agent-icon", children: g?.["max-beta"] ? /* @__PURE__ */ u0.jsx(
|
|
52231
52231
|
"img",
|
|
52232
52232
|
{
|
|
52233
52233
|
src: zv,
|
|
@@ -68048,6 +68048,8 @@ function ks0({
|
|
|
68048
68048
|
a({ children: c0, href: z0, ...L0 }) {
|
|
68049
68049
|
if (typeof z0 != "string" || !z0.trim())
|
|
68050
68050
|
return /* @__PURE__ */ u0.jsx("span", { children: c0 });
|
|
68051
|
+
if (z0.startsWith("mailto:") || z0.startsWith("#"))
|
|
68052
|
+
return /* @__PURE__ */ u0.jsx("a", { href: z0, ...L0, children: c0 });
|
|
68051
68053
|
try {
|
|
68052
68054
|
const g0 = new URL(z0);
|
|
68053
68055
|
return g0.protocol !== "http:" && g0.protocol !== "https:" ? /* @__PURE__ */ u0.jsx("span", { children: c0 }) : (Object.values(Cs0.COMMERCE_PLATFORM_DOMAINS).includes(g0.origin) && i?.length && g0.searchParams.set("conversationId", i), /* @__PURE__ */ u0.jsx("a", { href: g0.toString(), ...L0, target: "_blank", rel: "noopener noreferrer", children: c0 }));
|
|
@@ -68125,7 +68127,7 @@ function ks0({
|
|
|
68125
68127
|
) }),
|
|
68126
68128
|
/* @__PURE__ */ u0.jsx("div", { className: "title", children: /* @__PURE__ */ u0.jsxs("p", { children: [
|
|
68127
68129
|
"MAX ",
|
|
68128
|
-
s?.
|
|
68130
|
+
s?.["max-beta"] && /* @__PURE__ */ u0.jsx("span", { className: "beta-text", children: "(BETA)" })
|
|
68129
68131
|
] }) }),
|
|
68130
68132
|
/* @__PURE__ */ u0.jsxs("div", { children: [
|
|
68131
68133
|
/* @__PURE__ */ u0.jsx(
|
|
@@ -68177,7 +68179,7 @@ function ks0({
|
|
|
68177
68179
|
) }),
|
|
68178
68180
|
/* @__PURE__ */ u0.jsx("div", { className: "title", children: /* @__PURE__ */ u0.jsxs("p", { children: [
|
|
68179
68181
|
"MAX ",
|
|
68180
|
-
s?.
|
|
68182
|
+
s?.["max-beta"] && /* @__PURE__ */ u0.jsx("span", { className: "beta-text", children: "(BETA)" })
|
|
68181
68183
|
] }) }),
|
|
68182
68184
|
/* @__PURE__ */ u0.jsxs("div", { style: { flex: 1, textAlign: "right" }, children: [
|
|
68183
68185
|
/* @__PURE__ */ u0.jsx(
|