randmarcomps 1.575.0 → 1.577.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 +2 -1
- package/dist/randmarcomps.js +29 -51
- package/dist/randmarcomps.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/randmarcomps.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<Ac
|
|
|
58
58
|
|
|
59
59
|
declare type AccountWithShopifyStore = Account & {
|
|
60
60
|
HasShopifyStore?: boolean | null;
|
|
61
|
+
IsVendor?: boolean | null;
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
export declare function ActiveOrdersCard({ orders, loading }: ActiveOrdersCardProps): JSX.Element;
|
|
@@ -721,7 +722,7 @@ export declare interface PartnerActionsProps {
|
|
|
721
722
|
isAdmin: boolean;
|
|
722
723
|
}
|
|
723
724
|
|
|
724
|
-
export declare function PartnerCard({ account, action, loading, className, withAbout
|
|
725
|
+
export declare function PartnerCard({ account, action, loading, className, withAbout }: PartnerCardProps): JSX.Element;
|
|
725
726
|
|
|
726
727
|
declare interface PartnerCardProps {
|
|
727
728
|
account?: AccountWithShopifyStore;
|
package/dist/randmarcomps.js
CHANGED
|
@@ -62647,7 +62647,6 @@ function PartnerRelationshipPage({
|
|
|
62647
62647
|
account: l,
|
|
62648
62648
|
loading: c || d,
|
|
62649
62649
|
withAbout: !0,
|
|
62650
|
-
withVoice: !1,
|
|
62651
62650
|
action: " "
|
|
62652
62651
|
}
|
|
62653
62652
|
),
|
|
@@ -66617,14 +66616,13 @@ function PartnerCard({
|
|
|
66617
66616
|
action: t,
|
|
66618
66617
|
loading: n = !1,
|
|
66619
66618
|
className: a,
|
|
66620
|
-
withAbout: s = !1
|
|
66621
|
-
withVoice: o = !0
|
|
66619
|
+
withAbout: s = !1
|
|
66622
66620
|
}) {
|
|
66623
|
-
const [
|
|
66624
|
-
{ applicationId:
|
|
66625
|
-
{ skip: !
|
|
66626
|
-
),
|
|
66627
|
-
|
|
66621
|
+
const [o, l] = useState(!0), [c, d] = useState(!1), f = e?.ApplicationId, S = f ? `https://api.randmar.io/V4/Partner/${f}/Account/Video` : null, { data: A } = useGetV4PartnerByApplicationIdAccountVideoExistsQuery(
|
|
66622
|
+
{ applicationId: f ?? "" },
|
|
66623
|
+
{ skip: !f || n }
|
|
66624
|
+
), R = typeof A == "boolean" ? A : typeof A == "string" ? A.toLowerCase() === "true" : !1, V = () => {
|
|
66625
|
+
l(!1);
|
|
66628
66626
|
};
|
|
66629
66627
|
return n || !e ? /* @__PURE__ */ jsxs(Card, { className: `flex flex-col h-full ${a}`, children: [
|
|
66630
66628
|
/* @__PURE__ */ jsx(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -66647,21 +66645,7 @@ function PartnerCard({
|
|
|
66647
66645
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-full" }),
|
|
66648
66646
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-full" }),
|
|
66649
66647
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-full" })
|
|
66650
|
-
] })
|
|
66651
|
-
o && /* @__PURE__ */ jsx("div", { className: "p-3 bg-slate-50 rounded-md", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 @lg:grid-cols-3 gap-2", children: [
|
|
66652
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66653
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20 mb-1" }),
|
|
66654
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-24" })
|
|
66655
|
-
] }),
|
|
66656
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66657
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20 mb-1" }),
|
|
66658
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-24" })
|
|
66659
|
-
] }),
|
|
66660
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66661
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20 mb-1" }),
|
|
66662
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-24" })
|
|
66663
|
-
] })
|
|
66664
|
-
] }) })
|
|
66648
|
+
] })
|
|
66665
66649
|
] }) }),
|
|
66666
66650
|
/* @__PURE__ */ jsxs(CardFooter, { className: "px-6 py-4 flex justify-between gap-2 mt-auto", children: [
|
|
66667
66651
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-32" }),
|
|
@@ -66677,11 +66661,19 @@ function PartnerCard({
|
|
|
66677
66661
|
}
|
|
66678
66662
|
),
|
|
66679
66663
|
/* @__PURE__ */ jsx(CardContent, { className: "pb-2 flex-grow", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
66680
|
-
(e.IsManufacturer || e.IsReseller || e.IsSalesAgency || e.HasShopifyStore) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
66664
|
+
(e.IsManufacturer || e.IsReseller || e.IsSalesAgency || e.HasShopifyStore || e.IsVendor) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
66681
66665
|
e.IsManufacturer && /* @__PURE__ */ jsx(Badge, { className: "manufacturer-theme", children: "Manufacturer" }),
|
|
66682
66666
|
e.IsReseller && /* @__PURE__ */ jsx(Badge, { className: "reseller-theme", children: "Reseller" }),
|
|
66683
66667
|
e.IsSalesAgency && /* @__PURE__ */ jsx(Badge, { children: "Agency" }),
|
|
66684
|
-
e.HasShopifyStore && /* @__PURE__ */ jsx(Badge, { className: "shopify-theme", children: "Shopify" })
|
|
66668
|
+
e.HasShopifyStore && /* @__PURE__ */ jsx(Badge, { className: "shopify-theme", children: "Shopify" }),
|
|
66669
|
+
e.IsVendor && /* @__PURE__ */ jsx(
|
|
66670
|
+
Badge,
|
|
66671
|
+
{
|
|
66672
|
+
variant: "outline",
|
|
66673
|
+
className: "text-[var(--randmar-black)] border-[var(--randmar-black)] hover:text-[var(--randmar-black)] hover:border-[var(--randmar-black)]",
|
|
66674
|
+
children: "Vendor"
|
|
66675
|
+
}
|
|
66676
|
+
)
|
|
66685
66677
|
] }),
|
|
66686
66678
|
s && e.About && /* @__PURE__ */ jsx(
|
|
66687
66679
|
"div",
|
|
@@ -66689,29 +66681,15 @@ function PartnerCard({
|
|
|
66689
66681
|
className: "prose prose-sm max-w-none",
|
|
66690
66682
|
dangerouslySetInnerHTML: { __html: e.About ?? "" }
|
|
66691
66683
|
}
|
|
66692
|
-
)
|
|
66693
|
-
o && /* @__PURE__ */ jsx("div", { className: "p-3 bg-slate-50 rounded-md", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 @lg:grid-cols-3 gap-2", children: [
|
|
66694
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66695
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: "Voice Name" }),
|
|
66696
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium", children: e.VoiceName ?? "Regular" })
|
|
66697
|
-
] }),
|
|
66698
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66699
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: "Voice Style" }),
|
|
66700
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium", children: e.VoiceStyle ?? "Regular" })
|
|
66701
|
-
] }),
|
|
66702
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
66703
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: "Scene Name" }),
|
|
66704
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium", children: e.SceneName ?? "N/A" })
|
|
66705
|
-
] })
|
|
66706
|
-
] }) })
|
|
66684
|
+
)
|
|
66707
66685
|
] }) }),
|
|
66708
66686
|
/* @__PURE__ */ jsxs(CardFooter, { className: "px-6 py-4 flex justify-between gap-2 mt-auto", children: [
|
|
66709
|
-
|
|
66687
|
+
R && S ? /* @__PURE__ */ jsxs(
|
|
66710
66688
|
Dialog,
|
|
66711
66689
|
{
|
|
66712
|
-
open:
|
|
66713
|
-
onOpenChange: (
|
|
66714
|
-
|
|
66690
|
+
open: c,
|
|
66691
|
+
onOpenChange: (at) => {
|
|
66692
|
+
d(at), at && l(!0);
|
|
66715
66693
|
},
|
|
66716
66694
|
children: [
|
|
66717
66695
|
/* @__PURE__ */ jsx(DialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsxs(Button$1, { variant: "outline", className: "flex items-center gap-2", children: [
|
|
@@ -66724,19 +66702,19 @@ function PartnerCard({
|
|
|
66724
66702
|
" Video"
|
|
66725
66703
|
] }) }),
|
|
66726
66704
|
/* @__PURE__ */ jsxs("div", { className: "w-full h-[640px] rounded-md overflow-hidden", children: [
|
|
66727
|
-
|
|
66705
|
+
o && /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-full" }),
|
|
66728
66706
|
/* @__PURE__ */ jsx(
|
|
66729
66707
|
"video",
|
|
66730
66708
|
{
|
|
66731
|
-
src:
|
|
66709
|
+
src: S,
|
|
66732
66710
|
controls: !0,
|
|
66733
66711
|
preload: "auto",
|
|
66734
66712
|
playsInline: !0,
|
|
66735
66713
|
autoPlay: !0,
|
|
66736
66714
|
"aria-label": `Video for ${e.PublicName}`,
|
|
66737
|
-
className: `w-full h-full object-cover object-center ${
|
|
66738
|
-
onLoadedData:
|
|
66739
|
-
onError: () =>
|
|
66715
|
+
className: `w-full h-full object-cover object-center ${o ? "invisible" : "visible"}`,
|
|
66716
|
+
onLoadedData: V,
|
|
66717
|
+
onError: () => l(!1)
|
|
66740
66718
|
}
|
|
66741
66719
|
)
|
|
66742
66720
|
] })
|
|
@@ -74035,7 +74013,7 @@ function ProductCard({
|
|
|
74035
74013
|
const complexComponents = [
|
|
74036
74014
|
`----
|
|
74037
74015
|
PartnerCard: For data that fits this shape:
|
|
74038
|
-
{ "ApplicationId": "19022", "PublicName": "BiOSS", "
|
|
74016
|
+
{ "ApplicationId": "19022", "PublicName": "BiOSS", "About": "example", "IsReseller": true, "IsManufacturer": true, "IsSalesAgency": false, "Socials": [ { "ApplicationId": "19022", "SocialNetwork": "Facebook", "Tag": "@bioss.ca" }, { "ApplicationId": "19022", "SocialNetwork": "Instagram", "Tag": "@bioss.ca" }, { "ApplicationId": "19022", "SocialNetwork": "LinkedIn", "Tag": "@biossinc" }, { "ApplicationId": "19022", "SocialNetwork": "Youtube", "Tag": "@biosssolutionssanitairessa4095" } ], "Manufacturer": null, "Reseller": null }
|
|
74039
74017
|
Use <PartnerCard account={data} action={<></>}>`,
|
|
74040
74018
|
`----
|
|
74041
74019
|
ManufacturerCard: For data that fits this shape:
|
|
@@ -74047,7 +74025,7 @@ const complexComponents = [
|
|
|
74047
74025
|
Use <ResellerCard reseller={data}>`,
|
|
74048
74026
|
`----
|
|
74049
74027
|
Sometimes, manufacturer and reseller data can be embed into a partner object: For example, for data that fits this shape:
|
|
74050
|
-
{ "ApplicationId": "19022", "PublicName": "BiOSS", "
|
|
74028
|
+
{ "ApplicationId": "19022", "PublicName": "BiOSS", "About": "example", "IsReseller": true, "IsManufacturer": true, "IsSalesAgency": false, "Socials": [ { "ApplicationId": "19022", "SocialNetwork": "Facebook", "Tag": "@bioss.ca" }, { "ApplicationId": "19022", "SocialNetwork": "Instagram", "Tag": "@bioss.ca" }, { "ApplicationId": "19022", "SocialNetwork": "LinkedIn", "Tag": "@biossinc" }, { "ApplicationId": "19022", "SocialNetwork": "Youtube", "Tag": "@biosssolutionssanitairessa4095" } ], "Manufacturer": { "ManufacturerId": "19022", "Website": "https://www.example.ca", "PublicName": "BiOSS", "LastUpdatedDate": 20241217, "AutoReorderDate": -1, "AutoUpdate": false, "PublicEmail": "example@example.ca", "DefaultWeeksOfStocking": 4, "Tags": "Health & Cleaning", "CreationDate": 20220127, "PartnerPortal": "", "PartnerRegistrationLink": "", "About": "example...", "OpenToWork": false, "PublicResourcesLink": "https://drive.google.com/drive/folders/example", "CurrencyCode": "CAD", "YoutubePlaylist": "null" }, "Reseller": null }
|
|
74051
74029
|
Use both <PartnerCard account={data} action={<></>}> and <ManufacturerCard manufacturer={data.Manufacturer}>`,
|
|
74052
74030
|
`----
|
|
74053
74031
|
ProductCard, for data that fits this shape:
|