randmarcomps 1.325.0 → 1.326.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/dist/randmarcomps.js +39 -29
- package/dist/randmarcomps.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/randmarcomps.js
CHANGED
|
@@ -17463,36 +17463,39 @@ function ExploreManufacturers({ appID: t, manufPath: e, withBot: n }) {
|
|
|
17463
17463
|
routeApplicationId: t ?? "",
|
|
17464
17464
|
withSpecification: !0
|
|
17465
17465
|
}), b = useMemo(() => {
|
|
17466
|
-
const
|
|
17467
|
-
return (
|
|
17468
|
-
(
|
|
17469
|
-
var
|
|
17470
|
-
return (((
|
|
17466
|
+
const j = g || d;
|
|
17467
|
+
return (j == null ? void 0 : j.slice().sort(
|
|
17468
|
+
(F, te) => {
|
|
17469
|
+
var ne, oe;
|
|
17470
|
+
return (((ne = te.SalesData) == null ? void 0 : ne.SalesLast30Days) ?? 0) - (((oe = F.SalesData) == null ? void 0 : oe.SalesLast30Days) ?? 0);
|
|
17471
17471
|
}
|
|
17472
17472
|
)) || [];
|
|
17473
|
-
}, [d, g]), [S, _] = useState([]), C =
|
|
17474
|
-
|
|
17475
|
-
return ((
|
|
17476
|
-
}
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17473
|
+
}, [d, g]), [S, _] = useState([]), C = useMemo(() => {
|
|
17474
|
+
const j = ["19009", "12014", "25150"];
|
|
17475
|
+
return b.filter((F) => j.includes(F.ManufacturerId ?? ""));
|
|
17476
|
+
}, [b]), E = useMemo(() => S.length === 0 ? b : b.filter((j) => {
|
|
17477
|
+
var F;
|
|
17478
|
+
return (((F = j.Tags) == null ? void 0 : F.split(",").findIndex((te) => S.includes(te.trim()))) ?? -1) >= 0;
|
|
17479
|
+
}), [b, S]), R = useMemo(() => E.filter((j) => j.OpenToWork), [E]), A = useMemo(() => E.filter((j) => !j.OpenToWork), [E]), M = (j, F) => {
|
|
17480
|
+
_((te) => F ? [...te, j] : te.filter((ne) => ne !== j));
|
|
17481
|
+
}, I = useCallback(() => _([]), []), { sendMessage: O } = useChat(), q = useCallback((j) => {
|
|
17482
|
+
O(-1, `Search for ${j} and tell me more about this manufacturer.`);
|
|
17483
|
+
}, [O]), z = useCallback(() => {
|
|
17481
17484
|
l(!0);
|
|
17482
|
-
}, []),
|
|
17485
|
+
}, []), Q = useMemo(() => /* @__PURE__ */ jsxs(Button, { onClick: z, children: [
|
|
17483
17486
|
/* @__PURE__ */ jsx(Filter, {}),
|
|
17484
17487
|
" Filter"
|
|
17485
|
-
] }), [
|
|
17488
|
+
] }), [z]);
|
|
17486
17489
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
17487
17490
|
/* @__PURE__ */ jsxs("div", { className: "p-4 max-w-7xl m-auto", children: [
|
|
17488
17491
|
/* @__PURE__ */ jsx(
|
|
17489
17492
|
ManufacturerSectionComponent,
|
|
17490
17493
|
{
|
|
17491
17494
|
title: "Featured Manufacturers",
|
|
17492
|
-
items:
|
|
17495
|
+
items: C,
|
|
17493
17496
|
manufPath: e,
|
|
17494
17497
|
withBot: n,
|
|
17495
|
-
handleChatWithPartner:
|
|
17498
|
+
handleChatWithPartner: q,
|
|
17496
17499
|
appID: t,
|
|
17497
17500
|
isLoading: f
|
|
17498
17501
|
}
|
|
@@ -17501,11 +17504,11 @@ function ExploreManufacturers({ appID: t, manufPath: e, withBot: n }) {
|
|
|
17501
17504
|
ManufacturerSectionComponent,
|
|
17502
17505
|
{
|
|
17503
17506
|
title: "Manufacturers Open To Work",
|
|
17504
|
-
items:
|
|
17505
|
-
action:
|
|
17507
|
+
items: R,
|
|
17508
|
+
action: Q,
|
|
17506
17509
|
manufPath: e,
|
|
17507
17510
|
withBot: n,
|
|
17508
|
-
handleChatWithPartner:
|
|
17511
|
+
handleChatWithPartner: q,
|
|
17509
17512
|
appID: t,
|
|
17510
17513
|
isLoading: f
|
|
17511
17514
|
}
|
|
@@ -17514,11 +17517,11 @@ function ExploreManufacturers({ appID: t, manufPath: e, withBot: n }) {
|
|
|
17514
17517
|
ManufacturerSectionComponent,
|
|
17515
17518
|
{
|
|
17516
17519
|
title: "Other Manufaturers",
|
|
17517
|
-
items:
|
|
17518
|
-
action:
|
|
17520
|
+
items: A,
|
|
17521
|
+
action: Q,
|
|
17519
17522
|
manufPath: e,
|
|
17520
17523
|
withBot: n,
|
|
17521
|
-
handleChatWithPartner:
|
|
17524
|
+
handleChatWithPartner: q,
|
|
17522
17525
|
appID: t,
|
|
17523
17526
|
isLoading: f
|
|
17524
17527
|
}
|
|
@@ -17534,9 +17537,9 @@ function ExploreManufacturers({ appID: t, manufPath: e, withBot: n }) {
|
|
|
17534
17537
|
{
|
|
17535
17538
|
isLoading: f,
|
|
17536
17539
|
selectedCategories: S,
|
|
17537
|
-
onCategoryChange:
|
|
17540
|
+
onCategoryChange: M,
|
|
17538
17541
|
manufacturers: b,
|
|
17539
|
-
onReset:
|
|
17542
|
+
onReset: I
|
|
17540
17543
|
}
|
|
17541
17544
|
)
|
|
17542
17545
|
] }) })
|
|
@@ -65111,7 +65114,7 @@ function OrdersCard({
|
|
|
65111
65114
|
enableFiltering: !1
|
|
65112
65115
|
}
|
|
65113
65116
|
],
|
|
65114
|
-
[]
|
|
65117
|
+
[t]
|
|
65115
65118
|
), d = useMemo(() => {
|
|
65116
65119
|
const g = {};
|
|
65117
65120
|
if (e) {
|
|
@@ -92473,7 +92476,7 @@ function OpportunitiesTable({
|
|
|
92473
92476
|
}).finally(() => {
|
|
92474
92477
|
R(oe, "isSettingDefault", !1);
|
|
92475
92478
|
});
|
|
92476
|
-
}, [t, A, o, R]), [I] = usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation(), O = useCallback((ne) => {
|
|
92479
|
+
}, [t, A, o, R, E == null ? void 0 : E.IsReseller]), [I] = usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation(), O = useCallback((ne) => {
|
|
92477
92480
|
if (E != null && E.IsReseller) {
|
|
92478
92481
|
if (!ne.BidNumber) {
|
|
92479
92482
|
o({ title: "Error", description: "Bid Number is missing, cannot prepare report.", variant: "destructive" });
|
|
@@ -92481,7 +92484,7 @@ function OpportunitiesTable({
|
|
|
92481
92484
|
}
|
|
92482
92485
|
C(ne), S(""), g(!0);
|
|
92483
92486
|
}
|
|
92484
|
-
}, [o]), q = useCallback(async () => {
|
|
92487
|
+
}, [o, E == null ? void 0 : E.IsReseller]), q = useCallback(async () => {
|
|
92485
92488
|
if (!(E != null && E.IsReseller)) return;
|
|
92486
92489
|
if (!_ || !_.BidNumber) {
|
|
92487
92490
|
o({ title: "Error", description: "No opportunity selected or Bid Number is missing.", variant: "destructive" });
|
|
@@ -92605,7 +92608,14 @@ function OpportunitiesTable({
|
|
|
92605
92608
|
}
|
|
92606
92609
|
}
|
|
92607
92610
|
],
|
|
92608
|
-
[
|
|
92611
|
+
[
|
|
92612
|
+
l,
|
|
92613
|
+
M,
|
|
92614
|
+
O,
|
|
92615
|
+
_,
|
|
92616
|
+
E == null ? void 0 : E.IsReseller,
|
|
92617
|
+
t
|
|
92618
|
+
]
|
|
92609
92619
|
), Q = useMemo(() => {
|
|
92610
92620
|
const ne = {};
|
|
92611
92621
|
if (e) {
|