randmarcomps 1.319.0 → 1.321.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.d.ts +1 -1
- package/dist/randmarcomps.js +46 -20
- package/dist/randmarcomps.umd.cjs +7 -7
- package/package.json +1 -1
package/dist/randmarcomps.d.ts
CHANGED
|
@@ -748,7 +748,7 @@ declare interface SeriesConfig {
|
|
|
748
748
|
/** The Y-axis this series should be plotted against. Defaults to 'left'. */
|
|
749
749
|
yAxisId?: "left" | "right";
|
|
750
750
|
/** The format to display for this series' values. */
|
|
751
|
-
format?: "money" | null;
|
|
751
|
+
format?: "money" | "integer" | null;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
export declare const Sheet: React_2.FC<DialogPrimitive.DialogProps>;
|
package/dist/randmarcomps.js
CHANGED
|
@@ -10,7 +10,7 @@ import * as React from "react";
|
|
|
10
10
|
import React__default, { forwardRef, createElement, useState, useLayoutEffect, useEffect, useCallback, useDebugValue, useMemo, useRef, createContext, useContext, isValidElement, Children, PureComponent, useImperativeHandle, cloneElement, Component, Fragment as Fragment$2 } from "react";
|
|
11
11
|
import * as ReactDOM from "react-dom";
|
|
12
12
|
import ReactDOM__default from "react-dom";
|
|
13
|
-
import {
|
|
13
|
+
import { Link, useBlocker, useLocation } from "react-router-dom";
|
|
14
14
|
var Bt = Object.defineProperty, At = Object.defineProperties, kt = Object.getOwnPropertyDescriptors, Y$2 = Object.getOwnPropertySymbols, gt = Object.prototype.hasOwnProperty, Et = Object.prototype.propertyIsEnumerable, vt = (t, e, n) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, St = (t, e) => {
|
|
15
15
|
for (var n in e || (e = {})) gt.call(e, n) && vt(t, n, e[n]);
|
|
16
16
|
if (Y$2) for (var n of Y$2(e)) Et.call(e, n) && vt(t, n, e[n]);
|
|
@@ -3959,12 +3959,17 @@ const fromTheme = (t) => {
|
|
|
3959
3959
|
function cn(...t) {
|
|
3960
3960
|
return twMerge(clsx(t));
|
|
3961
3961
|
}
|
|
3962
|
-
const formatNumber = (t) => new Intl.NumberFormat("en-CA").format(t), formatMoney = (t, e
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3962
|
+
const formatNumber = (t, e) => new Intl.NumberFormat("en-CA", e).format(t), formatMoney = (t, e) => {
|
|
3963
|
+
const n = {
|
|
3964
|
+
style: "currency",
|
|
3965
|
+
currency: "CAD",
|
|
3966
|
+
minimumFractionDigits: 2,
|
|
3967
|
+
maximumFractionDigits: 2,
|
|
3968
|
+
...e
|
|
3969
|
+
// User-provided options will override the defaults
|
|
3970
|
+
};
|
|
3971
|
+
return new Intl.NumberFormat("en-CA", n).format(t);
|
|
3972
|
+
}, formatYYYYMMDDIntToDateString = (t) => {
|
|
3968
3973
|
if (t === null || typeof t > "u")
|
|
3969
3974
|
return "—";
|
|
3970
3975
|
const e = t.toString();
|
|
@@ -35572,7 +35577,7 @@ function ChartTooltipContent({ active: t, payload: e, label: n, series: o }) {
|
|
|
35572
35577
|
return null;
|
|
35573
35578
|
const f = l.get(d.dataKey);
|
|
35574
35579
|
if (!f) return null;
|
|
35575
|
-
const g = f.format === "money" ? formatMoney(d.value) : f.unitsPosition === "left" ? `${f.units || ""}${d.value}` : `${d.value}${f.units ? ` ${f.units}` : ""}`;
|
|
35580
|
+
const g = f.format === "money" && typeof d.value == "number" ? formatMoney(d.value) : f.format === "integer" && typeof d.value == "number" ? formatNumber(d.value, { maximumFractionDigits: 2 }) : f.unitsPosition === "left" ? `${f.units || ""}${d.value}` : `${d.value}${f.units ? ` ${f.units}` : ""}`;
|
|
35576
35581
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
35577
35582
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
35578
35583
|
/* @__PURE__ */ jsx("span", { className: "mr-2 h-2.5 w-2.5 rounded-full", style: { backgroundColor: f.color ?? "#000" } }),
|
|
@@ -35596,10 +35601,10 @@ function AreaChart({
|
|
|
35596
35601
|
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-center text-muted-foreground", o), style: l === "default" ? { height: n } : {}, children: "No data available" });
|
|
35597
35602
|
const d = Object.keys(t[0])[0], f = l === "mini", g = e.filter((C) => C.yAxisId === "left" || !C.yAxisId), b = e.filter((C) => C.yAxisId === "right"), S = (C) => {
|
|
35598
35603
|
const E = g[0];
|
|
35599
|
-
return (E == null ? void 0 : E.format) === "money" ? formatMoney(C, 0) : E != null && E.units ? E.unitsPosition === "left" ? `${E.units}${C}` : `${C}${E.units}` : String(C);
|
|
35604
|
+
return (E == null ? void 0 : E.format) === "money" ? formatMoney(C, { minimumFractionDigits: 0, maximumFractionDigits: 0 }) : E != null && E.units ? E.unitsPosition === "left" ? `${E.units}${C}` : `${C}${E.units}` : String(C);
|
|
35600
35605
|
}, _ = (C) => {
|
|
35601
35606
|
const E = b[0];
|
|
35602
|
-
return E != null && E.units ? E.unitsPosition === "left" ? `${E.units}${C}` : `${C}${E.units}` : String(C);
|
|
35607
|
+
return (E == null ? void 0 : E.format) === "money" ? formatMoney(C, { minimumFractionDigits: 0, maximumFractionDigits: 0 }) : E != null && E.units ? E.unitsPosition === "left" ? `${E.units}${C}` : `${C}${E.units}` : String(C);
|
|
35603
35608
|
};
|
|
35604
35609
|
return /* @__PURE__ */ jsx(
|
|
35605
35610
|
"div",
|
|
@@ -60751,7 +60756,14 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60751
60756
|
] })
|
|
60752
60757
|
] }) })
|
|
60753
60758
|
] }),
|
|
60754
|
-
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: Oe.findIndex((pt) => pt.partner1 === "2" || pt.partner2 === "2") < 0 ? /* @__PURE__ */ jsx(Button, { className: "w-full", ref: A, onClick: () => Yt(), children: "Chat with Randmar" }, "b1") : ge === "approved" && Oe.length >= 5 ? null : /* @__PURE__ */ jsx(
|
|
60759
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: Oe.findIndex((pt) => pt.partner1 === "2" || pt.partner2 === "2") < 0 ? /* @__PURE__ */ jsx(Button, { className: "w-full", ref: A, onClick: () => Yt(), children: "Chat with Randmar" }, "b1") : ge === "approved" && Oe.length >= 5 ? null : /* @__PURE__ */ jsx(
|
|
60760
|
+
Link,
|
|
60761
|
+
{
|
|
60762
|
+
to: `${window.location.hostname === "dashboard.randmar.io" ? "" : "https://dashboard.randmar.io"}/${t}/ExploreManufacturers`,
|
|
60763
|
+
target: window.location.hostname === "dashboard.randmar.io" ? "_self" : "_blank",
|
|
60764
|
+
children: /* @__PURE__ */ jsx(Button, { className: "w-full", children: "Explore Manufacturers" }, "b2")
|
|
60765
|
+
}
|
|
60766
|
+
) }),
|
|
60755
60767
|
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: Oe.length > 0 && /* @__PURE__ */ jsx(ChatList, { userId: t, chats: Ht.filter((pt) => pt.partner1 !== ASSISTANT_ID && pt.partner2 !== ASSISTANT_ID), activeChat: mt ?? null, onSelectChat: $e }) }),
|
|
60756
60768
|
/* @__PURE__ */ jsx(Separator$1, { className: "mt-auto" }),
|
|
60757
60769
|
/* @__PURE__ */ jsx("div", { className: "pt-1", children: Oe.find((pt) => pt.partner1 === ASSISTANT_ID || pt.partner2 === ASSISTANT_ID) && /* @__PURE__ */ jsx(ChatList, { userId: t, chats: Ht.filter((pt) => pt.partner1 === ASSISTANT_ID || pt.partner2 === ASSISTANT_ID), activeChat: mt ?? null, onSelectChat: $e, assistantStickyMode: !0 }) })
|
|
@@ -60771,7 +60783,14 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60771
60783
|
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60772
60784
|
/* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8 flex-shrink-0 rounded-none", children: /* @__PURE__ */ jsx(PartnerLogo, { id: Ae[0] === t ? Ae[1] : Ae[0], width: 72, height: 72 }) }),
|
|
60773
60785
|
/* @__PURE__ */ jsx("div", { className: "ml-3 font-medium", children: mt == null ? void 0 : mt.name }),
|
|
60774
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2 ml-auto", children: /* @__PURE__ */ jsx(
|
|
60786
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2 ml-auto", children: /* @__PURE__ */ jsx(
|
|
60787
|
+
Link,
|
|
60788
|
+
{
|
|
60789
|
+
to: `${window.location.hostname === "dashboard.randmar.io" ? "" : "https://dashboard.randmar.io"}/${t}/Partner/${Ae[0] === t ? Ae[1] : Ae[0]}`,
|
|
60790
|
+
target: window.location.hostname === "dashboard.randmar.io" ? "_self" : "_blank",
|
|
60791
|
+
children: /* @__PURE__ */ jsx(Button, { children: "View Partner" })
|
|
60792
|
+
}
|
|
60793
|
+
) })
|
|
60775
60794
|
] }) }),
|
|
60776
60795
|
mt != null && mt.pending && mt.partner1 == t ? /* @__PURE__ */ jsx("p", { className: "mt-8 p-2 mx-auto", children: "This conversation is awaiting approval by the other party — please check back later." }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60777
60796
|
/* @__PURE__ */ jsxs(ScrollArea, { className: "flex-1 pl-2 pr-2 bg-slate-50", children: [
|
|
@@ -64191,10 +64210,17 @@ function BillingCard({ appID: t, reseller: e, isLoading: n, withoutReports: o, u
|
|
|
64191
64210
|
] })
|
|
64192
64211
|
] })
|
|
64193
64212
|
] }),
|
|
64194
|
-
/* @__PURE__ */ jsx(
|
|
64195
|
-
|
|
64196
|
-
|
|
64197
|
-
|
|
64213
|
+
/* @__PURE__ */ jsx(
|
|
64214
|
+
Link,
|
|
64215
|
+
{
|
|
64216
|
+
to: `${window.location.hostname === "dashboard.randmar.io" ? "" : "https://dashboard.randmar.io"}/${t}/PayInvoice`,
|
|
64217
|
+
target: window.location.hostname === "dashboard.randmar.io" ? "_self" : "_blank",
|
|
64218
|
+
children: /* @__PURE__ */ jsxs(Button, { children: [
|
|
64219
|
+
/* @__PURE__ */ jsx(CreditCard, { className: "mr-2 h-4 w-4" }),
|
|
64220
|
+
"Pay Invoices"
|
|
64221
|
+
] })
|
|
64222
|
+
}
|
|
64223
|
+
)
|
|
64198
64224
|
] })
|
|
64199
64225
|
] })
|
|
64200
64226
|
] }),
|
|
@@ -64376,7 +64402,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
64376
64402
|
] })
|
|
64377
64403
|
] }),
|
|
64378
64404
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
64379
|
-
!e && /* @__PURE__ */ jsx(Button, { variant: "outline", className: "flex-1", asChild: !0, children: /* @__PURE__ */ jsxs(
|
|
64405
|
+
!e && /* @__PURE__ */ jsx(Button, { variant: "outline", className: "flex-1", asChild: !0, children: /* @__PURE__ */ jsxs(Link, { to: "https://www.randmar.io/docs/overview/pricingTiers", target: "_blank", children: [
|
|
64380
64406
|
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 mr-1" }),
|
|
64381
64407
|
"Pricing Tiers"
|
|
64382
64408
|
] }) }),
|
|
@@ -64775,7 +64801,7 @@ function SalesChart({
|
|
|
64775
64801
|
}) {
|
|
64776
64802
|
const [d, f] = useState([]), [g, b] = useState(!1), S = [
|
|
64777
64803
|
{ name: "dollarVolume", label: "Dollar Volume", color: "var(--primary)", yAxisId: "left", format: "money" },
|
|
64778
|
-
{ name: "unitsSold", label: "Units Sold", color: "#888", units: " units", yAxisId: "right" }
|
|
64804
|
+
{ name: "unitsSold", label: "Units Sold", color: "#888", units: " units", yAxisId: "right", format: "integer" }
|
|
64779
64805
|
];
|
|
64780
64806
|
return useEffect(() => {
|
|
64781
64807
|
if (o || !t) {
|
|
@@ -75431,7 +75457,7 @@ function ManufacturerGetStartedButton({ applicationId: t, manufacturer: e }) {
|
|
|
75431
75457
|
/* @__PURE__ */ jsx(Separator$1, { className: "my-4" }),
|
|
75432
75458
|
/* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
|
|
75433
75459
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Don't have a qualification ID?" }),
|
|
75434
|
-
/* @__PURE__ */ jsx(
|
|
75460
|
+
/* @__PURE__ */ jsx(Link, { to: e.PartnerRegistrationLink, target: "_blank", children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "w-full", disabled: !e.PartnerRegistrationLink, children: [
|
|
75435
75461
|
/* @__PURE__ */ jsx(ExternalLink, { className: "mr-2 h-4 w-4" }),
|
|
75436
75462
|
"Register here"
|
|
75437
75463
|
] }) })
|
|
@@ -92554,7 +92580,7 @@ function OpportunitiesTable({
|
|
|
92554
92580
|
return /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Actions unavailable" });
|
|
92555
92581
|
const ge = oe.BidNumber, se = (Ve = l[ge]) == null ? void 0 : Ve.isSettingDefault, Ae = (_ == null ? void 0 : _.BidNumber) === ge && ((je = l[ge]) == null ? void 0 : je.isSendingReport), $e = se || Ae, Ne = oe.CanBeSetAsDefault === !0;
|
|
92556
92582
|
return /* @__PURE__ */ jsxs("div", { className: "flex space-x-2", children: [
|
|
92557
|
-
/* @__PURE__ */ jsx(
|
|
92583
|
+
/* @__PURE__ */ jsx(Link, { to: `/${t}/Opportunity/${oe.ManufacturerId}/${oe.BidNumber}`, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "flex items-center", children: [
|
|
92558
92584
|
/* @__PURE__ */ jsx(Star, { className: "mr-2 h-4 w-4" }),
|
|
92559
92585
|
" View"
|
|
92560
92586
|
] }) }),
|