@bpinternal/integration-hub 0.6.0 → 0.6.1
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/chunks/index.js +52 -52
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState as H, useEffect as L, useCallback as D, useRef as ee, useMemo
|
|
|
4
4
|
import { motion as ft } from "framer-motion";
|
|
5
5
|
import { clsx as ht } from "clsx";
|
|
6
6
|
import { twMerge as bt } from "tailwind-merge";
|
|
7
|
-
import { Menu as
|
|
7
|
+
import { Menu as E } from "@base-ui/react/menu";
|
|
8
8
|
const pt = [
|
|
9
9
|
{ name: "Popular", icon: Ge, description: "Most used integrations" },
|
|
10
10
|
{ name: "Communication & Channels", icon: _e, description: "Chat, email, SMS, and more" },
|
|
@@ -74,7 +74,7 @@ const pt = [
|
|
|
74
74
|
focusCategoryButton: R,
|
|
75
75
|
renderNoResults: K
|
|
76
76
|
}) => {
|
|
77
|
-
var G,
|
|
77
|
+
var G, S;
|
|
78
78
|
const [q, z] = H(/* @__PURE__ */ new Set());
|
|
79
79
|
L(() => {
|
|
80
80
|
z(/* @__PURE__ */ new Set());
|
|
@@ -142,7 +142,7 @@ const pt = [
|
|
|
142
142
|
/* @__PURE__ */ r("div", { className: "flex items-center h-full gap-6", children: [
|
|
143
143
|
/* @__PURE__ */ r("div", { className: "flex flex-col justify-between h-full flex-1 min-w-0", children: [
|
|
144
144
|
/* @__PURE__ */ e("h2", { className: "text-2xl font-semibold text-white leading-snug", children: (G = g[f]) == null ? void 0 : G.title }),
|
|
145
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((
|
|
145
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((S = g[f]) == null ? void 0 : S.subtitle) ?? "" }),
|
|
146
146
|
d && /* @__PURE__ */ e(
|
|
147
147
|
"button",
|
|
148
148
|
{
|
|
@@ -460,10 +460,10 @@ const pt = [
|
|
|
460
460
|
renderIntegrationDetails: z,
|
|
461
461
|
noResultsContent: O
|
|
462
462
|
}) => {
|
|
463
|
-
const G = l ?? a,
|
|
463
|
+
const G = l ?? a, S = I(() => {
|
|
464
464
|
var j;
|
|
465
465
|
return ((j = b[0]) == null ? void 0 : j.name) ?? "Popular";
|
|
466
|
-
}, [b]), [h, C] = H(i ??
|
|
466
|
+
}, [b]), [h, C] = H(i ?? S), k = ee(i), A = ee(!1), P = D(
|
|
467
467
|
(j) => {
|
|
468
468
|
C((me) => {
|
|
469
469
|
const te = typeof j == "function" ? j(me) : j;
|
|
@@ -475,9 +475,9 @@ const pt = [
|
|
|
475
475
|
integrationsByCategory: M,
|
|
476
476
|
visibleCategories: T,
|
|
477
477
|
sidebarCategories: U,
|
|
478
|
-
visibleCategoryNames:
|
|
479
|
-
sidebarCategoryNames:
|
|
480
|
-
installedCategoryOrder:
|
|
478
|
+
visibleCategoryNames: Ee,
|
|
479
|
+
sidebarCategoryNames: Be,
|
|
480
|
+
installedCategoryOrder: Se
|
|
481
481
|
} = Ct({
|
|
482
482
|
hubIntegrations: g,
|
|
483
483
|
sidebarIntegrations: m,
|
|
@@ -485,8 +485,8 @@ const pt = [
|
|
|
485
485
|
}), { categoryScrollContainerRef: Ae, focusFirstCardInCategory: Te, scrollToCategorySection: X, focusCategoryButton: je } = wt({
|
|
486
486
|
view: n,
|
|
487
487
|
isHubLoading: f,
|
|
488
|
-
sidebarCategoryNames:
|
|
489
|
-
visibleCategoryNames:
|
|
488
|
+
sidebarCategoryNames: Be,
|
|
489
|
+
visibleCategoryNames: Ee,
|
|
490
490
|
setSelectedCategory: P
|
|
491
491
|
}), { currentSlide: De, goToPreviousSlide: Re, goToNextSlide: Pe, goToSlide: Fe } = Nt({
|
|
492
492
|
isOpen: t,
|
|
@@ -536,7 +536,7 @@ const pt = [
|
|
|
536
536
|
isInstalledLoading: u,
|
|
537
537
|
installedIntegrations: d,
|
|
538
538
|
effectiveSearchTerm: G,
|
|
539
|
-
installedCategoryOrder:
|
|
539
|
+
installedCategoryOrder: Se,
|
|
540
540
|
renderInstalledIntegrations: q
|
|
541
541
|
}
|
|
542
542
|
) : /* @__PURE__ */ e(
|
|
@@ -565,28 +565,28 @@ const pt = [
|
|
|
565
565
|
renderNoResults: Oe
|
|
566
566
|
}
|
|
567
567
|
);
|
|
568
|
-
},
|
|
568
|
+
}, B = "flex items-center gap-2 px-3 py-2 text-sm text-[var(--gray-11)] rounded-md cursor-pointer hover:bg-[var(--gray-a3)] outline-none", re = "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[160px]", ne = "flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-[var(--gray-a3)] text-xs text-[var(--gray-11)] whitespace-nowrap hover:bg-[var(--gray-a4)] cursor-pointer focus-visible:ring-2 focus-visible:ring-[var(--accent-9)]", kt = (t) => /* @__PURE__ */ e(E.Root, { ...t }), It = (t) => /* @__PURE__ */ e(E.Trigger, { ...t }), Ie = ({
|
|
569
569
|
align: t = "start",
|
|
570
570
|
alignOffset: n = 0,
|
|
571
571
|
side: a = "bottom",
|
|
572
572
|
sideOffset: l = 4,
|
|
573
573
|
className: s,
|
|
574
574
|
...i
|
|
575
|
-
}) => /* @__PURE__ */ e(
|
|
576
|
-
|
|
575
|
+
}) => /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(
|
|
576
|
+
E.Positioner,
|
|
577
577
|
{
|
|
578
578
|
className: "isolate z-50 outline-none",
|
|
579
579
|
align: t,
|
|
580
580
|
alignOffset: n,
|
|
581
581
|
side: a,
|
|
582
582
|
sideOffset: l,
|
|
583
|
-
children: /* @__PURE__ */ e(
|
|
583
|
+
children: /* @__PURE__ */ e(E.Popup, { className: x(s), ...i })
|
|
584
584
|
}
|
|
585
|
-
) }), ie = (t) => /* @__PURE__ */ e(
|
|
585
|
+
) }), ie = (t) => /* @__PURE__ */ e(E.SubmenuRoot, { ...t }), se = ({
|
|
586
586
|
className: t,
|
|
587
587
|
children: n,
|
|
588
588
|
...a
|
|
589
|
-
}) => /* @__PURE__ */ r(
|
|
589
|
+
}) => /* @__PURE__ */ r(E.SubmenuTrigger, { className: x(t), ...a, children: [
|
|
590
590
|
n,
|
|
591
591
|
/* @__PURE__ */ e(ye, { className: "ml-auto w-4 h-4" })
|
|
592
592
|
] }), oe = ({
|
|
@@ -606,7 +606,7 @@ const pt = [
|
|
|
606
606
|
sideOffset: l,
|
|
607
607
|
...i
|
|
608
608
|
}
|
|
609
|
-
), _ = (t) => /* @__PURE__ */ e(
|
|
609
|
+
), _ = (t) => /* @__PURE__ */ e(E.Item, { ...t }), Ht = ({
|
|
610
610
|
visibility: t,
|
|
611
611
|
verification: n,
|
|
612
612
|
sortMethod: a,
|
|
@@ -655,13 +655,13 @@ const pt = [
|
|
|
655
655
|
className: "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[180px]",
|
|
656
656
|
children: [
|
|
657
657
|
/* @__PURE__ */ r(ie, { children: [
|
|
658
|
-
/* @__PURE__ */ e(se, { className:
|
|
658
|
+
/* @__PURE__ */ e(se, { className: B, children: g.visibilityGroup }),
|
|
659
659
|
/* @__PURE__ */ r(oe, { className: re, children: [
|
|
660
660
|
/* @__PURE__ */ r(
|
|
661
661
|
_,
|
|
662
662
|
{
|
|
663
|
-
className: x(
|
|
664
|
-
|
|
663
|
+
className: x(B, t === "private" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
664
|
+
onClick: () => f("private"),
|
|
665
665
|
"aria-checked": t === "private",
|
|
666
666
|
children: [
|
|
667
667
|
/* @__PURE__ */ e(W, { className: "w-4 h-4" }),
|
|
@@ -673,8 +673,8 @@ const pt = [
|
|
|
673
673
|
/* @__PURE__ */ r(
|
|
674
674
|
_,
|
|
675
675
|
{
|
|
676
|
-
className: x(
|
|
677
|
-
|
|
676
|
+
className: x(B, t === "public" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
677
|
+
onClick: () => f("public"),
|
|
678
678
|
"aria-checked": t === "public",
|
|
679
679
|
children: [
|
|
680
680
|
/* @__PURE__ */ e(ue, { className: "w-4 h-4" }),
|
|
@@ -686,16 +686,16 @@ const pt = [
|
|
|
686
686
|
] })
|
|
687
687
|
] }),
|
|
688
688
|
/* @__PURE__ */ r(ie, { children: [
|
|
689
|
-
/* @__PURE__ */ e(se, { className:
|
|
689
|
+
/* @__PURE__ */ e(se, { className: B, children: g.verificationGroup }),
|
|
690
690
|
/* @__PURE__ */ r(oe, { className: `${re} min-w-[180px]`, children: [
|
|
691
691
|
/* @__PURE__ */ r(
|
|
692
692
|
_,
|
|
693
693
|
{
|
|
694
694
|
className: x(
|
|
695
|
-
|
|
695
|
+
B,
|
|
696
696
|
c.includes("official") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
|
|
697
697
|
),
|
|
698
|
-
|
|
698
|
+
onClick: () => m("official"),
|
|
699
699
|
"aria-checked": c.includes("official"),
|
|
700
700
|
children: [
|
|
701
701
|
/* @__PURE__ */ e(J, { className: "w-4 h-4 text-blue-500" }),
|
|
@@ -708,10 +708,10 @@ const pt = [
|
|
|
708
708
|
_,
|
|
709
709
|
{
|
|
710
710
|
className: x(
|
|
711
|
-
|
|
711
|
+
B,
|
|
712
712
|
c.includes("verified") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
|
|
713
713
|
),
|
|
714
|
-
|
|
714
|
+
onClick: () => m("verified"),
|
|
715
715
|
"aria-checked": c.includes("verified"),
|
|
716
716
|
children: [
|
|
717
717
|
/* @__PURE__ */ e(Q, { className: "w-4 h-4 text-green-500" }),
|
|
@@ -723,13 +723,13 @@ const pt = [
|
|
|
723
723
|
] })
|
|
724
724
|
] }),
|
|
725
725
|
/* @__PURE__ */ r(ie, { children: [
|
|
726
|
-
/* @__PURE__ */ e(se, { className:
|
|
726
|
+
/* @__PURE__ */ e(se, { className: B, children: g.sortGroup }),
|
|
727
727
|
/* @__PURE__ */ r(oe, { className: re, children: [
|
|
728
728
|
/* @__PURE__ */ r(
|
|
729
729
|
_,
|
|
730
730
|
{
|
|
731
|
-
className: x(
|
|
732
|
-
|
|
731
|
+
className: x(B, a === "asc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
732
|
+
onClick: () => o("asc"),
|
|
733
733
|
"aria-checked": a === "asc",
|
|
734
734
|
children: [
|
|
735
735
|
g.sort.asc,
|
|
@@ -740,8 +740,8 @@ const pt = [
|
|
|
740
740
|
/* @__PURE__ */ r(
|
|
741
741
|
_,
|
|
742
742
|
{
|
|
743
|
-
className: x(
|
|
744
|
-
|
|
743
|
+
className: x(B, a === "desc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
744
|
+
onClick: () => o("desc"),
|
|
745
745
|
"aria-checked": a === "desc",
|
|
746
746
|
children: [
|
|
747
747
|
g.sort.desc,
|
|
@@ -752,8 +752,8 @@ const pt = [
|
|
|
752
752
|
/* @__PURE__ */ r(
|
|
753
753
|
_,
|
|
754
754
|
{
|
|
755
|
-
className: x(
|
|
756
|
-
|
|
755
|
+
className: x(B, a === "newest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
756
|
+
onClick: () => o("newest"),
|
|
757
757
|
"aria-checked": a === "newest",
|
|
758
758
|
children: [
|
|
759
759
|
g.sort.newest,
|
|
@@ -764,8 +764,8 @@ const pt = [
|
|
|
764
764
|
/* @__PURE__ */ r(
|
|
765
765
|
_,
|
|
766
766
|
{
|
|
767
|
-
className: x(
|
|
768
|
-
|
|
767
|
+
className: x(B, a === "oldest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
|
|
768
|
+
onClick: () => o("oldest"),
|
|
769
769
|
"aria-checked": a === "oldest",
|
|
770
770
|
children: [
|
|
771
771
|
g.sort.oldest,
|
|
@@ -874,12 +874,12 @@ const pt = [
|
|
|
874
874
|
] })
|
|
875
875
|
}
|
|
876
876
|
);
|
|
877
|
-
},
|
|
877
|
+
}, Et = (t) => t.title || t.name || "", qt = ({
|
|
878
878
|
integrations: t,
|
|
879
879
|
searchTerm: n,
|
|
880
880
|
categoryOrder: a,
|
|
881
881
|
onSelectIntegration: l,
|
|
882
|
-
getDisplayName: s =
|
|
882
|
+
getDisplayName: s = Et,
|
|
883
883
|
actionLabel: i = "Manage"
|
|
884
884
|
}) => {
|
|
885
885
|
const o = I(
|
|
@@ -975,13 +975,13 @@ const pt = [
|
|
|
975
975
|
onBackToSetup: z,
|
|
976
976
|
notifications: O,
|
|
977
977
|
children: G,
|
|
978
|
-
selectedDetailPanel:
|
|
978
|
+
selectedDetailPanel: S,
|
|
979
979
|
onDismissSelectedDetailPanel: h
|
|
980
980
|
}) => {
|
|
981
|
-
const [C, k] = H(!!
|
|
981
|
+
const [C, k] = H(!!S), A = !!S && C;
|
|
982
982
|
L(() => {
|
|
983
|
-
k(!!
|
|
984
|
-
}, [
|
|
983
|
+
k(!!S);
|
|
984
|
+
}, [S]);
|
|
985
985
|
const P = D(() => {
|
|
986
986
|
if (h) {
|
|
987
987
|
h();
|
|
@@ -1123,18 +1123,18 @@ const pt = [
|
|
|
1123
1123
|
"div",
|
|
1124
1124
|
{
|
|
1125
1125
|
className: "fixed top-3 right-3 bottom-3 w-[500px] z-50 bg-[var(--gray-2)] border border-[var(--gray-6)] rounded-xl shadow-lg overflow-y-auto",
|
|
1126
|
-
children:
|
|
1126
|
+
children: S
|
|
1127
1127
|
}
|
|
1128
1128
|
)
|
|
1129
1129
|
] })
|
|
1130
1130
|
] });
|
|
1131
|
-
},
|
|
1131
|
+
}, Bt = (t) => t.startsWith("http") ? t : `https://${t}`, St = (t) => "Source Code", At = (t) => "Documentation", Wt = ({
|
|
1132
1132
|
version: t,
|
|
1133
1133
|
githubUrl: n,
|
|
1134
1134
|
guideUrl: a,
|
|
1135
1135
|
onAboutClick: l,
|
|
1136
1136
|
aboutLabel: s = "About Integration",
|
|
1137
|
-
formatGithubLabel: i =
|
|
1137
|
+
formatGithubLabel: i = St,
|
|
1138
1138
|
formatGuideLabel: o = At
|
|
1139
1139
|
}) => /* @__PURE__ */ r("div", { className: "flex items-start gap-12 px-6 py-4 rounded-lg border border-[var(--gray-a4)] bg-[var(--gray-a2)]", children: [
|
|
1140
1140
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -1146,7 +1146,7 @@ const pt = [
|
|
|
1146
1146
|
/* @__PURE__ */ r(
|
|
1147
1147
|
"a",
|
|
1148
1148
|
{
|
|
1149
|
-
href:
|
|
1149
|
+
href: Bt(n),
|
|
1150
1150
|
target: "_blank",
|
|
1151
1151
|
rel: "noopener noreferrer",
|
|
1152
1152
|
className: "inline-flex w-fit items-center gap-1 text-sm font-medium text-[var(--blue-11)] hover:underline",
|
|
@@ -1381,9 +1381,9 @@ const pt = [
|
|
|
1381
1381
|
if (t.length <= 1)
|
|
1382
1382
|
return null;
|
|
1383
1383
|
const s = ((i = t.find((o) => o.value === n)) == null ? void 0 : i.label) ?? String(n ?? "");
|
|
1384
|
-
return /* @__PURE__ */ r(
|
|
1384
|
+
return /* @__PURE__ */ r(E.Root, { children: [
|
|
1385
1385
|
/* @__PURE__ */ r(
|
|
1386
|
-
|
|
1386
|
+
E.Trigger,
|
|
1387
1387
|
{
|
|
1388
1388
|
disabled: l,
|
|
1389
1389
|
className: "flex items-center gap-2 px-4 py-2 rounded-lg bg-[var(--gray-a3)] text-sm text-[var(--gray-12)] hover:bg-[var(--gray-a4)] cursor-pointer border-none outline-none w-[165px] disabled:opacity-60 disabled:cursor-not-allowed",
|
|
@@ -1393,13 +1393,13 @@ const pt = [
|
|
|
1393
1393
|
]
|
|
1394
1394
|
}
|
|
1395
1395
|
),
|
|
1396
|
-
/* @__PURE__ */ e(
|
|
1397
|
-
|
|
1396
|
+
/* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(E.Positioner, { className: "isolate z-50 outline-none", align: "end", side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e(
|
|
1397
|
+
E.Popup,
|
|
1398
1398
|
{
|
|
1399
1399
|
role: "menu",
|
|
1400
1400
|
className: "bg-[var(--gray-2)] rounded-lg p-1 shadow-lg w-(--anchor-width) overflow-hidden",
|
|
1401
1401
|
children: t.map((o) => /* @__PURE__ */ e(
|
|
1402
|
-
|
|
1402
|
+
E.Item,
|
|
1403
1403
|
{
|
|
1404
1404
|
onClick: () => a(o.value),
|
|
1405
1405
|
className: x(
|