@burdenoff/microfe-integrations 2026.1117.3 → 2026.1118.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/generated/global-types.d.ts +398 -121
- package/dist/generated/wspace-operations.d.ts +727 -0
- package/dist/generated/wspace-operations.js +453 -174
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +3838 -130
- package/dist/generated/wspace-types.js +28 -10
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/integrations/ConnectSourceDialog.js +30 -21
- package/dist/integrations/ConnectSourceDialog.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +32 -27
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/connected-apps/components/ActivitySections.d.ts +31 -0
- package/dist/integrations/connected-apps/components/ActivitySections.js +147 -0
- package/dist/integrations/connected-apps/components/ActivitySections.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppItems.d.ts +26 -0
- package/dist/integrations/connected-apps/components/AppItems.js +171 -0
- package/dist/integrations/connected-apps/components/AppItems.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppPanels.d.ts +48 -0
- package/dist/integrations/connected-apps/components/AppPanels.js +244 -0
- package/dist/integrations/connected-apps/components/AppPanels.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppsSections.d.ts +30 -0
- package/dist/integrations/connected-apps/components/AppsSections.js +133 -0
- package/dist/integrations/connected-apps/components/AppsSections.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.d.ts +30 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.js +200 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.d.ts +38 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.js +162 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.d.ts +19 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.js +136 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.d.ts +38 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.js +358 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.d.ts +37 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.js +248 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.d.ts +44 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.js +222 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.js.map +1 -0
- package/dist/integrations/connected-apps/components/Explainer.d.ts +3 -0
- package/dist/integrations/connected-apps/components/Explainer.js +56 -0
- package/dist/integrations/connected-apps/components/Explainer.js.map +1 -0
- package/dist/integrations/connected-apps/components/ListOrigin.d.ts +21 -0
- package/dist/integrations/connected-apps/components/ListOrigin.js +35 -0
- package/dist/integrations/connected-apps/components/ListOrigin.js.map +1 -0
- package/dist/integrations/connected-apps/components/Notices.d.ts +9 -0
- package/dist/integrations/connected-apps/components/Notices.js +71 -0
- package/dist/integrations/connected-apps/components/Notices.js.map +1 -0
- package/dist/integrations/connected-apps/components/PageFrame.d.ts +27 -0
- package/dist/integrations/connected-apps/components/PageFrame.js +55 -0
- package/dist/integrations/connected-apps/components/PageFrame.js.map +1 -0
- package/dist/integrations/connected-apps/components/Panels.d.ts +28 -0
- package/dist/integrations/connected-apps/components/Panels.js +50 -0
- package/dist/integrations/connected-apps/components/Panels.js.map +1 -0
- package/dist/integrations/connected-apps/components/Results.d.ts +50 -0
- package/dist/integrations/connected-apps/components/Results.js +129 -0
- package/dist/integrations/connected-apps/components/Results.js.map +1 -0
- package/dist/integrations/connected-apps/components/SearchPicker.d.ts +20 -0
- package/dist/integrations/connected-apps/components/SearchPicker.js +139 -0
- package/dist/integrations/connected-apps/components/SearchPicker.js.map +1 -0
- package/dist/integrations/connected-apps/components/StatusChip.d.ts +11 -0
- package/dist/integrations/connected-apps/components/StatusChip.js +40 -0
- package/dist/integrations/connected-apps/components/StatusChip.js.map +1 -0
- package/dist/integrations/connected-apps/components/Toolbar.d.ts +74 -0
- package/dist/integrations/connected-apps/components/Toolbar.js +216 -0
- package/dist/integrations/connected-apps/components/Toolbar.js.map +1 -0
- package/dist/integrations/connected-apps/components/styles.d.ts +12 -0
- package/dist/integrations/connected-apps/components/styles.js +15 -0
- package/dist/integrations/connected-apps/components/styles.js.map +1 -0
- package/dist/integrations/connected-apps/connect/AppPicker.d.ts +7 -0
- package/dist/integrations/connected-apps/connect/AppPicker.js +257 -0
- package/dist/integrations/connected-apps/connect/AppPicker.js.map +1 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.d.ts +18 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.js +224 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.d.ts +1 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.js +10 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.d.ts +372 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.js +311 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useListState.d.ts +21 -0
- package/dist/integrations/connected-apps/hooks/useListState.js +43 -0
- package/dist/integrations/connected-apps/hooks/useListState.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.d.ts +12 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.js +46 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.js.map +1 -0
- package/dist/integrations/connected-apps/model/activity.d.ts +26 -0
- package/dist/integrations/connected-apps/model/activity.js +79 -0
- package/dist/integrations/connected-apps/model/activity.js.map +1 -0
- package/dist/integrations/connected-apps/model/apps.d.ts +68 -0
- package/dist/integrations/connected-apps/model/apps.js +101 -0
- package/dist/integrations/connected-apps/model/apps.js.map +1 -0
- package/dist/integrations/connected-apps/model/connections.d.ts +58 -0
- package/dist/integrations/connected-apps/model/connections.js +55 -0
- package/dist/integrations/connected-apps/model/connections.js.map +1 -0
- package/dist/integrations/connected-apps/model/health.d.ts +30 -0
- package/dist/integrations/connected-apps/model/health.js +54 -0
- package/dist/integrations/connected-apps/model/health.js.map +1 -0
- package/dist/integrations/connected-apps/model/queries.d.ts +56 -0
- package/dist/integrations/connected-apps/model/queries.js +117 -0
- package/dist/integrations/connected-apps/model/queries.js.map +1 -0
- package/dist/integrations/connected-apps/model/status.d.ts +36 -0
- package/dist/integrations/connected-apps/model/status.js +73 -0
- package/dist/integrations/connected-apps/model/status.js.map +1 -0
- package/dist/integrations/connected-apps/model/translate.d.ts +2 -0
- package/dist/integrations/connected-apps/model/urlState.d.ts +52 -0
- package/dist/integrations/connected-apps/model/urlState.js +87 -0
- package/dist/integrations/connected-apps/model/urlState.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.js +261 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.js +163 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/AppsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/AppsPage.js +209 -0
- package/dist/integrations/connected-apps/pages/AppsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.js +240 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.js +254 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.js.map +1 -0
- package/dist/integrations/providers/IntegrationsProvider.js +22 -21
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +426 -0
- package/dist/integrations/types/index.d.ts +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { appNeedsAdminSetup as n, categoryLabel as r, isSignInMethod as i, methodHint as a, usableAuthTypes as o } from "../model/apps.js";
|
|
4
|
+
import { useOriginState as s } from "./ListOrigin.js";
|
|
5
|
+
import { CONTROL_RING as c } from "./styles.js";
|
|
6
|
+
import { AlertTriangle as l, Check as u, KeyRound as d, LogIn as f, Plus as p } from "lucide-react";
|
|
7
|
+
import { Link as m } from "react-router";
|
|
8
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import { ProviderIcon as _ } from "@burdenoff/fe-libs/connections";
|
|
10
|
+
import { Button as v } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
// src/integrations/connected-apps/components/AppItems.tsx
|
|
12
|
+
function y({ app: e }) {
|
|
13
|
+
let r = t();
|
|
14
|
+
if (n(e)) return /* @__PURE__ */ g("span", {
|
|
15
|
+
className: "inline-flex items-center gap-1 whitespace-nowrap text-[12.5px] font-medium text-status-warning-text",
|
|
16
|
+
"data-testid": "app-needs-admin",
|
|
17
|
+
children: [/* @__PURE__ */ h(l, {
|
|
18
|
+
className: "size-3.5",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}), r("integrations.connectedApps.apps.needsAdmin", "Needs admin setup")]
|
|
21
|
+
});
|
|
22
|
+
let s = a(r, e);
|
|
23
|
+
if (!s) return null;
|
|
24
|
+
let c = o(e).some(i);
|
|
25
|
+
return /* @__PURE__ */ g("span", {
|
|
26
|
+
className: "inline-flex min-w-0 items-center gap-1 text-[12.5px] text-text-secondary",
|
|
27
|
+
children: [h(c ? f : d, {
|
|
28
|
+
className: "size-3.5 shrink-0",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}), /* @__PURE__ */ h("span", {
|
|
31
|
+
className: "truncate",
|
|
32
|
+
children: s
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function b({ app: n, to: r, short: i = !1 }) {
|
|
37
|
+
let a = t();
|
|
38
|
+
if (n.connectionCount <= 0) return null;
|
|
39
|
+
let o = a("integrations.connectedApps.apps.connectedCount", "{{count}} connected", { count: n.connectionCount });
|
|
40
|
+
return /* @__PURE__ */ g(m, {
|
|
41
|
+
to: r,
|
|
42
|
+
"aria-label": n.connectionCount === 1 ? a("integrations.connectedApps.apps.connectedAriaOne", "Show your {{app}} connection", { app: n.name }) : a("integrations.connectedApps.apps.connectedAria", "Show your {{count}} {{app}} connections", {
|
|
43
|
+
count: n.connectionCount,
|
|
44
|
+
app: n.name
|
|
45
|
+
}),
|
|
46
|
+
className: e("relative z-10 inline-flex items-center gap-1 whitespace-nowrap rounded-full border border-status-success-border bg-status-success-bg-subtle px-2 py-0.5 text-xs font-semibold text-status-success-text hover:underline", c),
|
|
47
|
+
"data-testid": "app-connected-badge",
|
|
48
|
+
children: [/* @__PURE__ */ h(u, {
|
|
49
|
+
className: "size-3",
|
|
50
|
+
"aria-hidden": "true"
|
|
51
|
+
}), i ? n.connectionCount : o]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function x({ app: n, onConnect: r, compact: i }) {
|
|
55
|
+
let a = t();
|
|
56
|
+
return r ? /* @__PURE__ */ g(v, {
|
|
57
|
+
variant: "outline",
|
|
58
|
+
size: "sm",
|
|
59
|
+
onClick: () => r(n),
|
|
60
|
+
"aria-label": a("integrations.connectedApps.apps.connectAria", "Connect {{app}}", { app: n.name }),
|
|
61
|
+
className: e("relative z-10 h-8 gap-1.5 px-3 text-[13px] font-semibold text-text-secondary hover:border-accent-glow/50 hover:bg-accent-glow/10 hover:text-text-primary", i && "h-7 px-2.5"),
|
|
62
|
+
"data-testid": "app-connect",
|
|
63
|
+
children: [/* @__PURE__ */ h(p, {
|
|
64
|
+
className: "size-3.5",
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}), a("integrations.connectedApps.apps.connect", "Connect")]
|
|
67
|
+
}) : null;
|
|
68
|
+
}
|
|
69
|
+
function S({ app: n, to: i, connectionsTo: a, onConnect: o, onOpen: c }) {
|
|
70
|
+
let l = t(), u = s();
|
|
71
|
+
return /* @__PURE__ */ g("article", {
|
|
72
|
+
className: e("group relative flex min-w-0 flex-col gap-2.5 rounded-xl border border-border-subtle bg-bg-elevated p-3.5", "max-sm:grid max-sm:grid-cols-[40px_minmax(0,1fr)_auto] max-sm:items-center max-sm:gap-x-3 max-sm:gap-y-0.5 max-sm:p-3 max-sm:[grid-template-areas:'logo_title_use'_'logo_desc_use'_'logo_meta_use']", "transition-[transform,box-shadow,border-color] motion-reduce:transition-none motion-safe:duration-150", "hover:border-accent-glow/45 hover:shadow-pop motion-safe:hover:-translate-y-0.5 focus-within:border-accent-glow/45"),
|
|
73
|
+
"data-testid": "app-card",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ g("div", {
|
|
76
|
+
className: "flex items-start gap-3 max-sm:contents",
|
|
77
|
+
children: [/* @__PURE__ */ h("span", {
|
|
78
|
+
className: "flex-none max-sm:self-start max-sm:[grid-area:logo]",
|
|
79
|
+
children: /* @__PURE__ */ h(_, {
|
|
80
|
+
provider: n,
|
|
81
|
+
size: 40
|
|
82
|
+
})
|
|
83
|
+
}), /* @__PURE__ */ g("div", {
|
|
84
|
+
className: "min-w-0 flex-1 max-sm:[grid-area:title]",
|
|
85
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
86
|
+
className: "truncate text-[14.5px] font-semibold leading-snug text-text-primary",
|
|
87
|
+
children: /* @__PURE__ */ h(m, {
|
|
88
|
+
to: i,
|
|
89
|
+
state: u,
|
|
90
|
+
onClick: c,
|
|
91
|
+
className: "outline-none after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] hover:underline focus-visible:after:ring-2 focus-visible:after:ring-accent-glow",
|
|
92
|
+
children: n.name
|
|
93
|
+
})
|
|
94
|
+
}), /* @__PURE__ */ h("p", {
|
|
95
|
+
className: "truncate text-[12.5px] text-text-muted max-sm:hidden",
|
|
96
|
+
children: r(l, n.category)
|
|
97
|
+
})]
|
|
98
|
+
})]
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ h("p", {
|
|
101
|
+
className: "line-clamp-2 min-h-[2.9em] text-[13px] leading-snug text-text-secondary max-sm:line-clamp-1 max-sm:min-h-0 max-sm:text-[12.5px] max-sm:[grid-area:desc]",
|
|
102
|
+
children: n.description || l("integrations.connectedApps.apps.noDescription", "No description yet.")
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ g("div", {
|
|
105
|
+
className: "mt-auto flex items-center justify-between gap-2 max-sm:contents",
|
|
106
|
+
children: [/* @__PURE__ */ g("div", {
|
|
107
|
+
className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1 max-sm:[grid-area:meta]",
|
|
108
|
+
children: [/* @__PURE__ */ h(y, { app: n }), /* @__PURE__ */ h(b, {
|
|
109
|
+
app: n,
|
|
110
|
+
to: a
|
|
111
|
+
})]
|
|
112
|
+
}), /* @__PURE__ */ h("div", {
|
|
113
|
+
className: "flex flex-none max-sm:self-center max-sm:[grid-area:use]",
|
|
114
|
+
children: /* @__PURE__ */ h(x, {
|
|
115
|
+
app: n,
|
|
116
|
+
onConnect: o
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function C({ app: e, to: n, connectionsTo: i, onConnect: a, onOpen: o }) {
|
|
124
|
+
let c = t(), l = s();
|
|
125
|
+
return /* @__PURE__ */ g("li", {
|
|
126
|
+
className: "relative flex items-center gap-3 border-t border-border-subtle px-3.5 py-2.5 first:border-t-0 hover:bg-bg-sunken",
|
|
127
|
+
"data-testid": "app-row",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ h(_, {
|
|
130
|
+
provider: e,
|
|
131
|
+
size: 28
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ g("div", {
|
|
134
|
+
className: "min-w-0 flex-1",
|
|
135
|
+
children: [/* @__PURE__ */ h(m, {
|
|
136
|
+
to: n,
|
|
137
|
+
state: l,
|
|
138
|
+
onClick: o,
|
|
139
|
+
className: "block truncate font-semibold text-text-primary outline-none after:absolute after:inset-0 after:content-[''] hover:underline focus-visible:after:ring-2 focus-visible:after:ring-accent-glow",
|
|
140
|
+
children: e.name
|
|
141
|
+
}), /* @__PURE__ */ g("div", {
|
|
142
|
+
className: "flex min-w-0 items-center gap-1.5 text-[12.5px] text-text-muted",
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ h("span", {
|
|
145
|
+
className: "truncate",
|
|
146
|
+
children: r(c, e.category)
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ h("span", {
|
|
149
|
+
"aria-hidden": "true",
|
|
150
|
+
children: "·"
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ h(y, { app: e })
|
|
153
|
+
]
|
|
154
|
+
})]
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ h(b, {
|
|
157
|
+
app: e,
|
|
158
|
+
to: i,
|
|
159
|
+
short: !0
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ h(x, {
|
|
162
|
+
app: e,
|
|
163
|
+
onConnect: a,
|
|
164
|
+
compact: !0
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
export { S as AppCard, C as AppRow, b as ConnectedBadge, y as MethodHint };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=AppItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppItems.js","names":["Link","Link$1","MethodHint","tr","useTr","appNeedsAdminSetup","app","AlertTriangle","hint","methodHint","signIn","usableAuthTypes","isSignInMethod","jsx","LogIn","KeyRound","ConnectedBadge","label","cn","CONTROL_RING","Check","short","ConnectButton","onConnect","Button","compact","Plus","AppCard","originState","useOriginState","ProviderIcon","onOpen","categoryLabel","connectionsTo","AppRow"],"sources":["../../../../src/integrations/connected-apps/components/AppItems.tsx"],"sourcesContent":["/**\n * One app in All apps (BOFF-15373): a rich card in the Templates card shell\n * (the default), or a compact row. The card says what the app does, how you\n * connect it, whether an admin must set it up first, and, only where the\n * workspace already uses it, how many connections it has.\n */\nimport { Link } from 'react-router';\nimport { AlertTriangle, Check, KeyRound, LogIn, Plus } from 'lucide-react';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\nimport type { ConnectedAppProviderFieldsFragment } from '../../../generated/wspace-operations';\nimport { cn } from '../../utils/cn';\nimport { useTr } from '../../hooks/useTr';\nimport {\n appNeedsAdminSetup,\n categoryLabel,\n isSignInMethod,\n methodHint,\n usableAuthTypes,\n} from '../model/apps';\nimport { useOriginState } from './ListOrigin';\nimport { CONTROL_RING } from './styles';\n\nexport type AppItem = ConnectedAppProviderFieldsFragment;\n\ninterface AppItemProps {\n app: AppItem;\n /** The app's page. */\n to: string;\n /** Your connections filtered to this app. */\n connectionsTo: string;\n /** Null when the person may not create connections. */\n onConnect: ((app: AppItem) => void) | null;\n /** The host's `onProviderSelect`, told when the app is opened. */\n onOpen?: () => void;\n}\n\n/** \"Sign in or API key\", or \"Needs admin setup\" in yellow. */\nexport function MethodHint({ app }: { app: AppItem }) {\n const tr = useTr();\n if (appNeedsAdminSetup(app)) {\n return (\n <span\n className=\"inline-flex items-center gap-1 whitespace-nowrap text-[12.5px] font-medium text-status-warning-text\"\n data-testid=\"app-needs-admin\"\n >\n <AlertTriangle className=\"size-3.5\" aria-hidden=\"true\" />\n {tr('integrations.connectedApps.apps.needsAdmin', 'Needs admin setup')}\n </span>\n );\n }\n const hint = methodHint(tr, app);\n if (!hint) return null;\n const signIn = usableAuthTypes(app).some(isSignInMethod);\n return (\n <span className=\"inline-flex min-w-0 items-center gap-1 text-[12.5px] text-text-secondary\">\n {signIn ? (\n <LogIn className=\"size-3.5 shrink-0\" aria-hidden=\"true\" />\n ) : (\n <KeyRound className=\"size-3.5 shrink-0\" aria-hidden=\"true\" />\n )}\n <span className=\"truncate\">{hint}</span>\n </span>\n );\n}\n\n/** \"✓ 12 connected\", linking to those connections; nothing when there are none. */\nexport function ConnectedBadge({\n app,\n to,\n short = false,\n}: {\n app: AppItem;\n to: string;\n short?: boolean;\n}) {\n const tr = useTr();\n if (app.connectionCount <= 0) return null;\n const label = tr('integrations.connectedApps.apps.connectedCount', '{{count}} connected', {\n count: app.connectionCount,\n });\n return (\n <Link\n to={to}\n aria-label={\n app.connectionCount === 1\n ? tr('integrations.connectedApps.apps.connectedAriaOne', 'Show your {{app}} connection', {\n app: app.name,\n })\n : tr(\n 'integrations.connectedApps.apps.connectedAria',\n 'Show your {{count}} {{app}} connections',\n { count: app.connectionCount, app: app.name }\n )\n }\n className={cn(\n 'relative z-10 inline-flex items-center gap-1 whitespace-nowrap rounded-full border border-status-success-border bg-status-success-bg-subtle px-2 py-0.5 text-xs font-semibold text-status-success-text hover:underline',\n CONTROL_RING\n )}\n data-testid=\"app-connected-badge\"\n >\n <Check className=\"size-3\" aria-hidden=\"true\" />\n {short ? app.connectionCount : label}\n </Link>\n );\n}\n\nfunction ConnectButton({\n app,\n onConnect,\n compact,\n}: {\n app: AppItem;\n onConnect: AppItemProps['onConnect'];\n compact?: boolean;\n}) {\n const tr = useTr();\n if (!onConnect) return null;\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onConnect(app)}\n aria-label={tr('integrations.connectedApps.apps.connectAria', 'Connect {{app}}', {\n app: app.name,\n })}\n className={cn(\n 'relative z-10 h-8 gap-1.5 px-3 text-[13px] font-semibold text-text-secondary hover:border-accent-glow/50 hover:bg-accent-glow/10 hover:text-text-primary',\n compact && 'h-7 px-2.5'\n )}\n data-testid=\"app-connect\"\n >\n <Plus className=\"size-3.5\" aria-hidden=\"true\" />\n {tr('integrations.connectedApps.apps.connect', 'Connect')}\n </Button>\n );\n}\n\nexport function AppCard({ app, to, connectionsTo, onConnect, onOpen }: AppItemProps) {\n const tr = useTr();\n const originState = useOriginState();\n return (\n <article\n className={cn(\n 'group relative flex min-w-0 flex-col gap-2.5 rounded-xl border border-border-subtle bg-bg-elevated p-3.5',\n // Phones: a list row, as the Templates card (logo | name, description, how | Connect).\n \"max-sm:grid max-sm:grid-cols-[40px_minmax(0,1fr)_auto] max-sm:items-center max-sm:gap-x-3 max-sm:gap-y-0.5 max-sm:p-3 max-sm:[grid-template-areas:'logo_title_use'_'logo_desc_use'_'logo_meta_use']\",\n 'transition-[transform,box-shadow,border-color] motion-reduce:transition-none motion-safe:duration-150',\n 'hover:border-accent-glow/45 hover:shadow-pop motion-safe:hover:-translate-y-0.5 focus-within:border-accent-glow/45'\n )}\n data-testid=\"app-card\"\n >\n <div className=\"flex items-start gap-3 max-sm:contents\">\n <span className=\"flex-none max-sm:self-start max-sm:[grid-area:logo]\">\n <ProviderIcon provider={app} size={40} />\n </span>\n <div className=\"min-w-0 flex-1 max-sm:[grid-area:title]\">\n <h3 className=\"truncate text-[14.5px] font-semibold leading-snug text-text-primary\">\n <Link\n to={to}\n state={originState}\n onClick={onOpen}\n className=\"outline-none after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] hover:underline focus-visible:after:ring-2 focus-visible:after:ring-accent-glow\"\n >\n {app.name}\n </Link>\n </h3>\n <p className=\"truncate text-[12.5px] text-text-muted max-sm:hidden\">\n {categoryLabel(tr, app.category)}\n </p>\n </div>\n </div>\n <p className=\"line-clamp-2 min-h-[2.9em] text-[13px] leading-snug text-text-secondary max-sm:line-clamp-1 max-sm:min-h-0 max-sm:text-[12.5px] max-sm:[grid-area:desc]\">\n {app.description ||\n tr('integrations.connectedApps.apps.noDescription', 'No description yet.')}\n </p>\n {/* As the Templates card: what it is on the left, the one action on the right. */}\n <div className=\"mt-auto flex items-center justify-between gap-2 max-sm:contents\">\n <div className=\"flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1 max-sm:[grid-area:meta]\">\n <MethodHint app={app} />\n <ConnectedBadge app={app} to={connectionsTo} />\n </div>\n <div className=\"flex flex-none max-sm:self-center max-sm:[grid-area:use]\">\n <ConnectButton app={app} onConnect={onConnect} />\n </div>\n </div>\n </article>\n );\n}\n\nexport function AppRow({ app, to, connectionsTo, onConnect, onOpen }: AppItemProps) {\n const tr = useTr();\n const originState = useOriginState();\n return (\n <li\n className=\"relative flex items-center gap-3 border-t border-border-subtle px-3.5 py-2.5 first:border-t-0 hover:bg-bg-sunken\"\n data-testid=\"app-row\"\n >\n <ProviderIcon provider={app} size={28} />\n <div className=\"min-w-0 flex-1\">\n <Link\n to={to}\n state={originState}\n onClick={onOpen}\n className=\"block truncate font-semibold text-text-primary outline-none after:absolute after:inset-0 after:content-[''] hover:underline focus-visible:after:ring-2 focus-visible:after:ring-accent-glow\"\n >\n {app.name}\n </Link>\n <div className=\"flex min-w-0 items-center gap-1.5 text-[12.5px] text-text-muted\">\n <span className=\"truncate\">{categoryLabel(tr, app.category)}</span>\n <span aria-hidden=\"true\">·</span>\n <MethodHint app={app} />\n </div>\n </div>\n <ConnectedBadge app={app} to={connectionsTo} short />\n <ConnectButton app={app} onConnect={onConnect} compact />\n </li>\n );\n}\n"],"mappings":";;;;;;;;;;;AAuCA,SAAgBE,EAAW,EAAE,UAAyB;CACpD,IAAMC,IAAKC,EAAM;CACjB,IAAIC,EAAmBC,CAAG,GACxB,OACE,kBAAC,QAAD;EACE,WA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F,IAAM/B,IAAKC,EAAM,GACXwB,IAAcC,EAAe;CACnC,OACE,kBAAC,MAAD;EACE,WAAU;EACV,eAAY;EAFd,UAAA;GAIE,kBAACC,GAAD;IAAc,UAAUxB;IAAK,MAAM;GAAK,CAAA;GACxC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACN,GAAD;KACM;KACJ,OAAO4B;KACP,SAASG;KACT,WAAU;KAET,UAAAzB,EAAI;IACD,CAAA,GACN,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACE,kBAAC,QAAD;OAAM,WAAU;OAAY,UAAA0B,EAAc7B,GAAIG,EAAI,QAAQ;MAAQ,CAAA;MAClE,kBAAC,QAAD;OAAM,eAAY;OAAO,UAAA;MAAO,CAAA;MAChC,kBAACJ,GAAD,EAAiB,OAAM,CAAA;KACpB;IACF,CAAA,CAAA;;GACL,kBAACc,GAAD;IAAqB;IAAK,IAAIiB;IAAe,OAAA;GAAO,CAAA;GACpD,kBAACX,GAAD;IAAoB;IAAgB;IAAW,SAAA;GAAS,CAAA;EACtD;;AAER"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AppDetails } from '../model/apps';
|
|
2
|
+
import { ConnectionItem } from '../model/connections';
|
|
3
|
+
/** The page while the app (or a connection) loads. */
|
|
4
|
+
export declare function DetailSkeleton(): import('react').JSX.Element;
|
|
5
|
+
/** Yellow: no way to connect is set up yet, or only signing in isn't. */
|
|
6
|
+
export declare function AdminSetupNotice({ appName, noMethodReady, }: {
|
|
7
|
+
appName: string;
|
|
8
|
+
/** True when none of the ways to connect works yet (not only sign-in). */
|
|
9
|
+
noMethodReady: boolean;
|
|
10
|
+
}): import('react').JSX.Element;
|
|
11
|
+
/** Each way to connect, default first, with what it involves. */
|
|
12
|
+
export declare function HowYouConnectPanel({ app }: {
|
|
13
|
+
app: AppDetails;
|
|
14
|
+
}): import('react').JSX.Element;
|
|
15
|
+
/** The app's features, as the catalog lists them. */
|
|
16
|
+
export declare function FeaturesPanel({ features }: {
|
|
17
|
+
features: string[];
|
|
18
|
+
}): import('react').JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* What a connection asks the app for, in words with the raw scope beside
|
|
21
|
+
* each. A sign-in method may carry its own list; the app's is the fallback.
|
|
22
|
+
* A key-based app says what a key can do instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare function AppPermissionsPanel({ app }: {
|
|
25
|
+
app: AppDetails;
|
|
26
|
+
}): import('react').JSX.Element;
|
|
27
|
+
/** Category, maker, version, install status and the app's key. */
|
|
28
|
+
export declare function AboutPanel({ app }: {
|
|
29
|
+
app: AppDetails;
|
|
30
|
+
}): import('react').JSX.Element;
|
|
31
|
+
/** "Your <app> connections": the first few, and a link to the rest. */
|
|
32
|
+
export declare function AppConnectionsSection({ appName, connections, shown, connectionsPath, pathOf, onOpen, onConnect, }: {
|
|
33
|
+
appName: string;
|
|
34
|
+
connections: {
|
|
35
|
+
items: ConnectionItem[];
|
|
36
|
+
total: number;
|
|
37
|
+
hasData: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** How many the page lists before "Show all". */
|
|
40
|
+
shown: number;
|
|
41
|
+
/** Your connections, filtered to this app. */
|
|
42
|
+
connectionsPath: string;
|
|
43
|
+
pathOf: (id: string) => string;
|
|
44
|
+
/** Tells the host a connection was opened. */
|
|
45
|
+
onOpen: (id: string) => void;
|
|
46
|
+
/** Null when the person may not create connections. */
|
|
47
|
+
onConnect: (() => void) | null;
|
|
48
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import { authTypeLabel as n, categoryLabel as r, enabledMethods as i, featureLabel as a, installStatusLabel as o, isSignInMethod as s, methodDescription as c } from "../model/apps.js";
|
|
4
|
+
import { ConnectionRow as l, ConnectionRowsHeader as u } from "./ConnectionItems.js";
|
|
5
|
+
import { KeyValueList as d, Pill as f, SectionPanel as p } from "./Panels.js";
|
|
6
|
+
import "./styles.js";
|
|
7
|
+
import { AlertTriangle as m, Check as h, Info as g, KeyRound as _, LayoutList as v, LogIn as y, Plus as b, Shield as x, Sparkles as S } from "lucide-react";
|
|
8
|
+
import { Link as C } from "react-router";
|
|
9
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
10
|
+
import { parseScopeOptions as D } from "@burdenoff/fe-libs/connections";
|
|
11
|
+
import { Button as O } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
// src/integrations/connected-apps/components/AppPanels.tsx
|
|
13
|
+
function k() {
|
|
14
|
+
return /* @__PURE__ */ E("div", {
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
children: [/* @__PURE__ */ E("div", {
|
|
17
|
+
className: "mb-6 flex items-start gap-4",
|
|
18
|
+
children: [/* @__PURE__ */ T("span", { className: "size-[52px] rounded-[13px] bg-bg-sunken motion-safe:animate-pulse" }), /* @__PURE__ */ E("span", {
|
|
19
|
+
className: "flex flex-1 flex-col gap-2 pt-1",
|
|
20
|
+
children: [/* @__PURE__ */ T("span", { className: "h-6 w-60 rounded bg-bg-sunken motion-safe:animate-pulse" }), /* @__PURE__ */ T("span", { className: "h-3.5 w-80 max-w-full rounded bg-bg-sunken motion-safe:animate-pulse" })]
|
|
21
|
+
})]
|
|
22
|
+
}), /* @__PURE__ */ E("div", {
|
|
23
|
+
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
24
|
+
children: [/* @__PURE__ */ T("span", { className: "h-48 rounded-xl bg-bg-sunken motion-safe:animate-pulse" }), /* @__PURE__ */ T("span", { className: "h-48 rounded-xl bg-bg-sunken motion-safe:animate-pulse" })]
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function A({ appName: t, noMethodReady: n }) {
|
|
29
|
+
let r = e();
|
|
30
|
+
return /* @__PURE__ */ E("div", {
|
|
31
|
+
role: "status",
|
|
32
|
+
className: "mb-5 flex items-start gap-3 rounded-xl border border-status-warning-border bg-status-warning-bg-subtle p-4",
|
|
33
|
+
"data-testid": "app-admin-setup",
|
|
34
|
+
children: [/* @__PURE__ */ T(m, {
|
|
35
|
+
className: "mt-0.5 size-5 shrink-0 text-status-warning-text",
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
}), /* @__PURE__ */ E("div", {
|
|
38
|
+
className: "min-w-0",
|
|
39
|
+
children: [/* @__PURE__ */ T("p", {
|
|
40
|
+
className: "font-semibold text-status-warning-text",
|
|
41
|
+
children: n ? r("integrations.connectedApps.app.adminTitle", "An admin needs to set this app up first") : r("integrations.connectedApps.app.adminSignInTitle", "Sign-in needs an admin first")
|
|
42
|
+
}), /* @__PURE__ */ T("p", {
|
|
43
|
+
className: "text-sm text-text-secondary",
|
|
44
|
+
children: n ? r("integrations.connectedApps.app.adminText", "None of {{app}}’s ways to connect is set up in this environment yet. Ask an administrator to add its credentials.", { app: t }) : r("integrations.connectedApps.app.adminSignInText", "Signing in with {{app}} isn’t set up in this environment yet. You can still connect it another way listed below.", { app: t })
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function j({ app: t }) {
|
|
50
|
+
let r = e(), a = i(t);
|
|
51
|
+
return /* @__PURE__ */ T(p, {
|
|
52
|
+
title: r("integrations.connectedApps.app.howTitle", "How you connect"),
|
|
53
|
+
icon: /* @__PURE__ */ T(_, {
|
|
54
|
+
className: "size-4",
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}),
|
|
57
|
+
testId: "app-methods",
|
|
58
|
+
children: a.length > 0 ? /* @__PURE__ */ T("ul", {
|
|
59
|
+
className: "space-y-2.5",
|
|
60
|
+
children: a.map((e) => {
|
|
61
|
+
let n = s(e.authType) ? y : _;
|
|
62
|
+
return /* @__PURE__ */ E("li", {
|
|
63
|
+
className: "flex items-start gap-3 rounded-lg border border-border-subtle p-3",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ T("span", {
|
|
66
|
+
className: "mt-0.5 text-text-secondary",
|
|
67
|
+
children: /* @__PURE__ */ T(n, {
|
|
68
|
+
className: "size-4",
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
})
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ E("div", {
|
|
73
|
+
className: "min-w-0 flex-1",
|
|
74
|
+
children: [/* @__PURE__ */ T("p", {
|
|
75
|
+
className: "font-medium text-text-primary",
|
|
76
|
+
children: e.displayName
|
|
77
|
+
}), /* @__PURE__ */ T("p", {
|
|
78
|
+
className: "text-sm text-text-secondary",
|
|
79
|
+
children: c(r, e, t.name)
|
|
80
|
+
})]
|
|
81
|
+
}),
|
|
82
|
+
e.isConfigured ? e.isDefault && a.length > 1 ? /* @__PURE__ */ T(f, {
|
|
83
|
+
tone: "accent",
|
|
84
|
+
children: r("integrations.connectedApps.app.recommended", "Recommended")
|
|
85
|
+
}) : null : /* @__PURE__ */ T(f, {
|
|
86
|
+
tone: "warning",
|
|
87
|
+
children: r("integrations.connectedApps.apps.needsAdmin", "Needs admin setup")
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}, e.key);
|
|
91
|
+
})
|
|
92
|
+
}) : /* @__PURE__ */ T("p", {
|
|
93
|
+
className: "text-sm text-text-secondary",
|
|
94
|
+
children: n(r, t.authType)
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function M({ features: t }) {
|
|
99
|
+
let n = e();
|
|
100
|
+
return /* @__PURE__ */ T(p, {
|
|
101
|
+
title: n("integrations.connectedApps.app.featuresTitle", "What it supports"),
|
|
102
|
+
icon: /* @__PURE__ */ T(S, {
|
|
103
|
+
className: "size-4",
|
|
104
|
+
"aria-hidden": "true"
|
|
105
|
+
}),
|
|
106
|
+
children: /* @__PURE__ */ T("ul", {
|
|
107
|
+
className: "flex flex-wrap gap-1.5",
|
|
108
|
+
children: t.map((e) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(f, { children: a(e) }) }, e))
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function N({ app: n }) {
|
|
113
|
+
let r = e(), a = i(n).find((e) => s(e.authType)), o = !!a || s(n.authType), c = n.authMethods.find((e) => e.key === a?.key)?.availableScopes, l = D(c ?? n.availableScopes), u = null;
|
|
114
|
+
return o ? l.length === 0 && (u = r("integrations.connectedApps.app.permissionsUnlisted", "{{app}} doesn’t list its permissions here. You’ll see them when you sign in.", { app: n.name })) : u = r("integrations.connectedApps.app.permissionsKey", "A key can do whatever the {{app}} account that created it can do. Create one with only the access your workflows need.", { app: n.name }), /* @__PURE__ */ T(p, {
|
|
115
|
+
title: r("integrations.connectedApps.app.permissionsTitle", "Permissions"),
|
|
116
|
+
icon: /* @__PURE__ */ T(x, {
|
|
117
|
+
className: "size-4",
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
}),
|
|
120
|
+
testId: "app-permissions",
|
|
121
|
+
children: u ? /* @__PURE__ */ T("p", {
|
|
122
|
+
className: "text-sm text-text-secondary",
|
|
123
|
+
children: u
|
|
124
|
+
}) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("p", {
|
|
125
|
+
className: "mb-3 text-sm text-text-secondary",
|
|
126
|
+
children: r("integrations.connectedApps.app.permissionsHint", "What a connection asks {{app}} for. You can leave the optional ones out when you connect.", { app: n.name })
|
|
127
|
+
}), /* @__PURE__ */ T("ul", {
|
|
128
|
+
className: "divide-y divide-border-subtle",
|
|
129
|
+
children: l.map((e) => {
|
|
130
|
+
let n = e.required ? h : b;
|
|
131
|
+
return /* @__PURE__ */ E("li", {
|
|
132
|
+
className: "flex items-start gap-3 py-2",
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ T(n, {
|
|
135
|
+
className: t("mt-0.5 size-4 shrink-0", e.required ? "text-text-secondary" : "text-text-muted"),
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ E("div", {
|
|
139
|
+
className: "min-w-0 flex-1",
|
|
140
|
+
children: [/* @__PURE__ */ T("p", {
|
|
141
|
+
className: "text-sm text-text-primary",
|
|
142
|
+
children: e.description || e.scope
|
|
143
|
+
}), /* @__PURE__ */ T("code", {
|
|
144
|
+
className: "break-all font-mono text-xs text-text-muted",
|
|
145
|
+
children: e.scope
|
|
146
|
+
})]
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ T(f, { children: e.required ? r("integrations.connectedApps.app.required", "Required") : r("integrations.connectedApps.app.optional", "Optional") })
|
|
149
|
+
]
|
|
150
|
+
}, e.scope);
|
|
151
|
+
})
|
|
152
|
+
})] })
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function P({ app: t }) {
|
|
156
|
+
let n = e(), i = [{
|
|
157
|
+
id: "category",
|
|
158
|
+
label: n("integrations.connectedApps.app.category", "Category"),
|
|
159
|
+
value: r(n, t.category)
|
|
160
|
+
}];
|
|
161
|
+
return t.pluginAuthor && i.push({
|
|
162
|
+
id: "author",
|
|
163
|
+
label: n("integrations.connectedApps.app.madeBy", "Made by"),
|
|
164
|
+
value: t.isBuiltIn ? n("integrations.connectedApps.app.builtInBy", "{{author}} (built in)", { author: t.pluginAuthor }) : t.pluginAuthor
|
|
165
|
+
}), t.pluginVersion && i.push({
|
|
166
|
+
id: "version",
|
|
167
|
+
label: n("integrations.connectedApps.app.version", "Version"),
|
|
168
|
+
value: /* @__PURE__ */ T("span", {
|
|
169
|
+
className: "tabular-nums",
|
|
170
|
+
children: t.pluginVersion
|
|
171
|
+
})
|
|
172
|
+
}), i.push({
|
|
173
|
+
id: "install",
|
|
174
|
+
label: n("integrations.connectedApps.apps.installLabel", "Install status"),
|
|
175
|
+
value: o(n, t.pluginStatus)
|
|
176
|
+
}, {
|
|
177
|
+
id: "key",
|
|
178
|
+
label: n("integrations.connectedApps.app.key", "App key"),
|
|
179
|
+
value: /* @__PURE__ */ T("code", {
|
|
180
|
+
className: "font-mono text-xs",
|
|
181
|
+
children: t.key
|
|
182
|
+
})
|
|
183
|
+
}), /* @__PURE__ */ T(p, {
|
|
184
|
+
title: n("integrations.connectedApps.app.aboutTitle", "About"),
|
|
185
|
+
icon: /* @__PURE__ */ T(g, {
|
|
186
|
+
className: "size-4",
|
|
187
|
+
"aria-hidden": "true"
|
|
188
|
+
}),
|
|
189
|
+
children: /* @__PURE__ */ T(d, { rows: i })
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function F({ appName: n, connections: r, shown: i, connectionsPath: a, pathOf: o, onOpen: s, onConnect: c }) {
|
|
193
|
+
let d = e();
|
|
194
|
+
return /* @__PURE__ */ E("section", {
|
|
195
|
+
className: "mt-6",
|
|
196
|
+
"data-testid": "app-connections",
|
|
197
|
+
children: [/* @__PURE__ */ E("div", {
|
|
198
|
+
className: "mb-3 flex flex-wrap items-baseline justify-between gap-2",
|
|
199
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
200
|
+
className: "text-[15px] font-semibold text-text-primary",
|
|
201
|
+
children: [
|
|
202
|
+
d("integrations.connectedApps.app.yourConnections", "Your {{app}} connections", { app: n }),
|
|
203
|
+
" ",
|
|
204
|
+
r.hasData && /* @__PURE__ */ T("span", {
|
|
205
|
+
className: "font-normal tabular-nums text-text-muted",
|
|
206
|
+
children: r.total
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
}), r.total > i && /* @__PURE__ */ E(C, {
|
|
210
|
+
to: a,
|
|
211
|
+
className: t("rounded-md text-sm font-medium text-text-link hover:underline", "outline-none focus-visible:ring-2 focus-visible:ring-accent-glow"),
|
|
212
|
+
children: [/* @__PURE__ */ T(v, {
|
|
213
|
+
className: "me-1 inline size-4 align-text-bottom",
|
|
214
|
+
"aria-hidden": "true"
|
|
215
|
+
}), d("integrations.connectedApps.app.showAll", "Show all {{count}} in Your connections", { count: r.total })]
|
|
216
|
+
})]
|
|
217
|
+
}), r.hasData ? r.items.length === 0 ? /* @__PURE__ */ E("div", {
|
|
218
|
+
className: "flex flex-col items-start gap-3 rounded-xl border border-dashed border-border-default p-4 sm:flex-row sm:items-center",
|
|
219
|
+
children: [/* @__PURE__ */ T("p", {
|
|
220
|
+
className: "flex-1 text-sm text-text-secondary",
|
|
221
|
+
children: d("integrations.connectedApps.app.noConnections", "This workspace has no {{app}} connection yet.", { app: n })
|
|
222
|
+
}), c && /* @__PURE__ */ E(O, {
|
|
223
|
+
onClick: c,
|
|
224
|
+
children: [/* @__PURE__ */ T(b, {
|
|
225
|
+
className: "size-4",
|
|
226
|
+
"aria-hidden": "true"
|
|
227
|
+
}), d("integrations.connectedApps.app.connect", "Connect {{app}}", { app: n })]
|
|
228
|
+
})]
|
|
229
|
+
}) : /* @__PURE__ */ E("div", {
|
|
230
|
+
className: "@container overflow-hidden rounded-xl border border-border-subtle bg-bg-elevated",
|
|
231
|
+
children: [/* @__PURE__ */ T(u, {}), /* @__PURE__ */ T("ul", { children: r.items.map((e) => /* @__PURE__ */ T(l, {
|
|
232
|
+
connection: e,
|
|
233
|
+
to: o(e.id),
|
|
234
|
+
onOpen: () => s(e.id)
|
|
235
|
+
}, e.id)) })]
|
|
236
|
+
}) : /* @__PURE__ */ T("div", {
|
|
237
|
+
className: "h-24 rounded-xl bg-bg-sunken motion-safe:animate-pulse",
|
|
238
|
+
"aria-hidden": "true"
|
|
239
|
+
})]
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
export { P as AboutPanel, A as AdminSetupNotice, F as AppConnectionsSection, N as AppPermissionsPanel, k as DetailSkeleton, M as FeaturesPanel, j as HowYouConnectPanel };
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=AppPanels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppPanels.js","names":["_Fragment","Link","Link$1","DetailSkeleton","AdminSetupNotice","tr","useTr","AlertTriangle","noMethodReady","appName","HowYouConnectPanel","methods","enabledMethods","app","SectionPanel","KeyRound","Icon","isSignInMethod","method","LogIn","methodDescription","Pill","authTypeLabel","FeaturesPanel","Sparkles","features","featureLabel","feature","AppPermissionsPanel","signInMethod","signIn","methodScopes","scopes","parseScopeOptions","note","Shield","Fragment","scope","Check","Plus","cn","AboutPanel","rows","categoryLabel","installStatusLabel","Info","KeyValueList","AppConnectionsSection","connections","shown","connectionsPath","LayoutList","onConnect","Button","ConnectionRowsHeader","ConnectionRow","pathOf","connection","onOpen"],"sources":["../../../../src/integrations/connected-apps/components/AppPanels.tsx"],"sourcesContent":["/**\n * The parts of an app's page (BOFF-15373): the \"admin must set it up\" notice,\n * how you connect, what it supports, the permissions it asks for, the facts\n * about it, and the workspace's connections to it.\n */\nimport { Link } from 'react-router';\nimport {\n AlertTriangle,\n Check,\n Info,\n KeyRound,\n LayoutList,\n LogIn,\n Plus,\n Shield,\n Sparkles,\n} from 'lucide-react';\nimport { parseScopeOptions } from '@burdenoff/fe-libs/connections';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\nimport {\n authTypeLabel,\n categoryLabel,\n enabledMethods,\n featureLabel,\n installStatusLabel,\n isSignInMethod,\n methodDescription,\n type AppDetails,\n} from '../model/apps';\nimport type { ConnectionItem } from '../model/connections';\nimport { ConnectionRow, ConnectionRowsHeader } from './ConnectionItems';\nimport { KeyValueList, Pill, SectionPanel, type KeyValue } from './Panels';\nimport { CONTROL_RING } from './styles';\n\n/** The page while the app (or a connection) loads. */\nexport function DetailSkeleton() {\n return (\n <div aria-hidden=\"true\">\n <div className=\"mb-6 flex items-start gap-4\">\n <span className=\"size-[52px] rounded-[13px] bg-bg-sunken motion-safe:animate-pulse\" />\n <span className=\"flex flex-1 flex-col gap-2 pt-1\">\n <span className=\"h-6 w-60 rounded bg-bg-sunken motion-safe:animate-pulse\" />\n <span className=\"h-3.5 w-80 max-w-full rounded bg-bg-sunken motion-safe:animate-pulse\" />\n </span>\n </div>\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <span className=\"h-48 rounded-xl bg-bg-sunken motion-safe:animate-pulse\" />\n <span className=\"h-48 rounded-xl bg-bg-sunken motion-safe:animate-pulse\" />\n </div>\n </div>\n );\n}\n\n/** Yellow: no way to connect is set up yet, or only signing in isn't. */\nexport function AdminSetupNotice({\n appName,\n noMethodReady,\n}: {\n appName: string;\n /** True when none of the ways to connect works yet (not only sign-in). */\n noMethodReady: boolean;\n}) {\n const tr = useTr();\n return (\n <div\n role=\"status\"\n className=\"mb-5 flex items-start gap-3 rounded-xl border border-status-warning-border bg-status-warning-bg-subtle p-4\"\n data-testid=\"app-admin-setup\"\n >\n <AlertTriangle\n className=\"mt-0.5 size-5 shrink-0 text-status-warning-text\"\n aria-hidden=\"true\"\n />\n <div className=\"min-w-0\">\n <p className=\"font-semibold text-status-warning-text\">\n {noMethodReady\n ? tr(\n 'integrations.connectedApps.app.adminTitle',\n 'An admin needs to set this app up first'\n )\n : tr('integrations.connectedApps.app.adminSignInTitle', 'Sign-in needs an admin first')}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {noMethodReady\n ? tr(\n 'integrations.connectedApps.app.adminText',\n 'None of {{app}}’s ways to connect is set up in this environment yet. Ask an administrator to add its credentials.',\n { app: appName }\n )\n : tr(\n 'integrations.connectedApps.app.adminSignInText',\n 'Signing in with {{app}} isn’t set up in this environment yet. You can still connect it another way listed below.',\n { app: appName }\n )}\n </p>\n </div>\n </div>\n );\n}\n\n/** Each way to connect, default first, with what it involves. */\nexport function HowYouConnectPanel({ app }: { app: AppDetails }) {\n const tr = useTr();\n const methods = enabledMethods(app);\n return (\n <SectionPanel\n title={tr('integrations.connectedApps.app.howTitle', 'How you connect')}\n icon={<KeyRound className=\"size-4\" aria-hidden=\"true\" />}\n testId=\"app-methods\"\n >\n {methods.length > 0 ? (\n <ul className=\"space-y-2.5\">\n {methods.map((method) => {\n const Icon = isSignInMethod(method.authType) ? LogIn : KeyRound;\n return (\n <li\n key={method.key}\n className=\"flex items-start gap-3 rounded-lg border border-border-subtle p-3\"\n >\n <span className=\"mt-0.5 text-text-secondary\">\n <Icon className=\"size-4\" aria-hidden=\"true\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <p className=\"font-medium text-text-primary\">{method.displayName}</p>\n <p className=\"text-sm text-text-secondary\">\n {methodDescription(tr, method, app.name)}\n </p>\n </div>\n {!method.isConfigured ? (\n <Pill tone=\"warning\">\n {tr('integrations.connectedApps.apps.needsAdmin', 'Needs admin setup')}\n </Pill>\n ) : method.isDefault && methods.length > 1 ? (\n <Pill tone=\"accent\">\n {tr('integrations.connectedApps.app.recommended', 'Recommended')}\n </Pill>\n ) : null}\n </li>\n );\n })}\n </ul>\n ) : (\n <p className=\"text-sm text-text-secondary\">{authTypeLabel(tr, app.authType)}</p>\n )}\n </SectionPanel>\n );\n}\n\n/** The app's features, as the catalog lists them. */\nexport function FeaturesPanel({ features }: { features: string[] }) {\n const tr = useTr();\n return (\n <SectionPanel\n title={tr('integrations.connectedApps.app.featuresTitle', 'What it supports')}\n icon={<Sparkles className=\"size-4\" aria-hidden=\"true\" />}\n >\n <ul className=\"flex flex-wrap gap-1.5\">\n {features.map((feature) => (\n <li key={feature}>\n <Pill>{featureLabel(feature)}</Pill>\n </li>\n ))}\n </ul>\n </SectionPanel>\n );\n}\n\n/**\n * What a connection asks the app for, in words with the raw scope beside\n * each. A sign-in method may carry its own list; the app's is the fallback.\n * A key-based app says what a key can do instead.\n */\nexport function AppPermissionsPanel({ app }: { app: AppDetails }) {\n const tr = useTr();\n const methods = enabledMethods(app);\n const signInMethod = methods.find((method) => isSignInMethod(method.authType));\n const signIn = Boolean(signInMethod) || isSignInMethod(app.authType);\n const methodScopes = app.authMethods.find(\n (method) => method.key === signInMethod?.key\n )?.availableScopes;\n const scopes = parseScopeOptions(methodScopes ?? app.availableScopes);\n\n let note: string | null = null;\n if (!signIn)\n note = tr(\n 'integrations.connectedApps.app.permissionsKey',\n 'A key can do whatever the {{app}} account that created it can do. Create one with only the access your workflows need.',\n { app: app.name }\n );\n else if (scopes.length === 0)\n note = tr(\n 'integrations.connectedApps.app.permissionsUnlisted',\n '{{app}} doesn’t list its permissions here. You’ll see them when you sign in.',\n { app: app.name }\n );\n\n return (\n <SectionPanel\n title={tr('integrations.connectedApps.app.permissionsTitle', 'Permissions')}\n icon={<Shield className=\"size-4\" aria-hidden=\"true\" />}\n testId=\"app-permissions\"\n >\n {note ? (\n <p className=\"text-sm text-text-secondary\">{note}</p>\n ) : (\n <>\n <p className=\"mb-3 text-sm text-text-secondary\">\n {tr(\n 'integrations.connectedApps.app.permissionsHint',\n 'What a connection asks {{app}} for. You can leave the optional ones out when you connect.',\n { app: app.name }\n )}\n </p>\n <ul className=\"divide-y divide-border-subtle\">\n {scopes.map((scope) => {\n const Icon = scope.required ? Check : Plus;\n return (\n <li key={scope.scope} className=\"flex items-start gap-3 py-2\">\n <Icon\n className={cn(\n 'mt-0.5 size-4 shrink-0',\n scope.required ? 'text-text-secondary' : 'text-text-muted'\n )}\n aria-hidden=\"true\"\n />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm text-text-primary\">{scope.description || scope.scope}</p>\n <code className=\"break-all font-mono text-xs text-text-muted\">\n {scope.scope}\n </code>\n </div>\n <Pill>\n {scope.required\n ? tr('integrations.connectedApps.app.required', 'Required')\n : tr('integrations.connectedApps.app.optional', 'Optional')}\n </Pill>\n </li>\n );\n })}\n </ul>\n </>\n )}\n </SectionPanel>\n );\n}\n\n/** Category, maker, version, install status and the app's key. */\nexport function AboutPanel({ app }: { app: AppDetails }) {\n const tr = useTr();\n const rows: KeyValue[] = [\n {\n id: 'category',\n label: tr('integrations.connectedApps.app.category', 'Category'),\n value: categoryLabel(tr, app.category),\n },\n ];\n if (app.pluginAuthor)\n rows.push({\n id: 'author',\n label: tr('integrations.connectedApps.app.madeBy', 'Made by'),\n value: app.isBuiltIn\n ? tr('integrations.connectedApps.app.builtInBy', '{{author}} (built in)', {\n author: app.pluginAuthor,\n })\n : app.pluginAuthor,\n });\n if (app.pluginVersion)\n rows.push({\n id: 'version',\n label: tr('integrations.connectedApps.app.version', 'Version'),\n value: <span className=\"tabular-nums\">{app.pluginVersion}</span>,\n });\n rows.push(\n {\n id: 'install',\n label: tr('integrations.connectedApps.apps.installLabel', 'Install status'),\n value: installStatusLabel(tr, app.pluginStatus),\n },\n {\n id: 'key',\n label: tr('integrations.connectedApps.app.key', 'App key'),\n value: <code className=\"font-mono text-xs\">{app.key}</code>,\n }\n );\n return (\n <SectionPanel\n title={tr('integrations.connectedApps.app.aboutTitle', 'About')}\n icon={<Info className=\"size-4\" aria-hidden=\"true\" />}\n >\n <KeyValueList rows={rows} />\n </SectionPanel>\n );\n}\n\n/** \"Your <app> connections\": the first few, and a link to the rest. */\nexport function AppConnectionsSection({\n appName,\n connections,\n shown,\n connectionsPath,\n pathOf,\n onOpen,\n onConnect,\n}: {\n appName: string;\n connections: { items: ConnectionItem[]; total: number; hasData: boolean };\n /** How many the page lists before \"Show all\". */\n shown: number;\n /** Your connections, filtered to this app. */\n connectionsPath: string;\n pathOf: (id: string) => string;\n /** Tells the host a connection was opened. */\n onOpen: (id: string) => void;\n /** Null when the person may not create connections. */\n onConnect: (() => void) | null;\n}) {\n const tr = useTr();\n return (\n <section className=\"mt-6\" data-testid=\"app-connections\">\n <div className=\"mb-3 flex flex-wrap items-baseline justify-between gap-2\">\n <h2 className=\"text-[15px] font-semibold text-text-primary\">\n {tr('integrations.connectedApps.app.yourConnections', 'Your {{app}} connections', {\n app: appName,\n })}{' '}\n {connections.hasData && (\n <span className=\"font-normal tabular-nums text-text-muted\">{connections.total}</span>\n )}\n </h2>\n {connections.total > shown && (\n <Link\n to={connectionsPath}\n className={cn(\n 'rounded-md text-sm font-medium text-text-link hover:underline',\n CONTROL_RING\n )}\n >\n <LayoutList className=\"me-1 inline size-4 align-text-bottom\" aria-hidden=\"true\" />\n {tr(\n 'integrations.connectedApps.app.showAll',\n 'Show all {{count}} in Your connections',\n {\n count: connections.total,\n }\n )}\n </Link>\n )}\n </div>\n {!connections.hasData ? (\n <div\n className=\"h-24 rounded-xl bg-bg-sunken motion-safe:animate-pulse\"\n aria-hidden=\"true\"\n />\n ) : connections.items.length === 0 ? (\n <div className=\"flex flex-col items-start gap-3 rounded-xl border border-dashed border-border-default p-4 sm:flex-row sm:items-center\">\n <p className=\"flex-1 text-sm text-text-secondary\">\n {tr(\n 'integrations.connectedApps.app.noConnections',\n 'This workspace has no {{app}} connection yet.',\n { app: appName }\n )}\n </p>\n {onConnect && (\n <Button onClick={onConnect}>\n <Plus className=\"size-4\" aria-hidden=\"true\" />\n {tr('integrations.connectedApps.app.connect', 'Connect {{app}}', { app: appName })}\n </Button>\n )}\n </div>\n ) : (\n <div className=\"@container overflow-hidden rounded-xl border border-border-subtle bg-bg-elevated\">\n <ConnectionRowsHeader />\n <ul>\n {connections.items.map((connection) => (\n <ConnectionRow\n key={connection.id}\n connection={connection}\n to={pathOf(connection.id)}\n onOpen={() => onOpen(connection.id)}\n />\n ))}\n </ul>\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,SAAgBG,IAAiB;CAC/B,OACE,kBAAC,OAAD;EAAK,eAAY;EAAjB,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,QAAD,EAAM,WAAU,oEAAqE,CAAA,GACrF,kBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,kBAAC,QAAD,EAAM,WAAU,0DAA2D,CAAA,GAC3E,kBAAC,QAAD,EAAM,WAAU,uEAAwE,CAAA,CACpF;GACH,CAAA,CAAA;EACL,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,QAAD,EAAM,WAAU,yDAA0D,CAAA,GAC1E,kBAAC,QAAD,EAAM,WAAU,yDAA0D,CAAA,CACvE;EACF,CAAA,CAAA;;AAET;AAGA,SAAgBC,EAAiB,EAC/B,YACA,oBAKC;CACD,IAAMC,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F9C,EACC,0CACA,0CACA,EACE,OAAO2C,EAAY,MACrB,CACF,CACI;GAEL,CAAA,CAAA;EACJ,CAAA,GAACA,EAAY,UAKVA,EAAY,MAAM,WAAW,IAC/B,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;IACV,UAAA3C,EACC,gDACA,iDACA,EAAE,KAAKI,EAAQ,CACjB;GACC,CAAA,GACF2C,KACC,kBAACC,GAAD;IAAQ,SAASD;IAAjB,UAAA,CACE,kBAACb,GAAD;KAAM,WAAU;KAAS,eAAY;IAAQ,CAAA,GAC5ClC,EAAG,0CAA0C,mBAAmB,EAAE,KAAKI,EAAQ,CAAC,CAC3E;GAEP,CAAA,CAAA;EAEL,CAAA,IAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC6C,GAAD,CAAuB,CAAA,GACvB,kBAAC,MAAD,EAAA,UACGN,EAAY,MAAM,KAAK,MACtB,kBAACO,GAAD;IAEc;IACZ,IAAIC,EAAOC,EAAW,EAAE;IACxB,cAAcC,EAAOD,EAAW,EAAE;GACnC,GAJMA,EAAW,EAIjB,CACF,EACC,CAAA,CACD;EAEA,CAAA,IAnCL,kBAAC,OAAD;GACE,WAAU;GACV,eAAY;EACb,CAAA,CAgCI;;AAEb"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CategoryFacet } from '@burdenoff/fe-libs/ui';
|
|
2
|
+
import { ProviderCategory } from '../../../generated/wspace-types';
|
|
3
|
+
import { ListView } from '../hooks/usePageChrome';
|
|
4
|
+
import { AppItem } from './AppItems';
|
|
5
|
+
/** "All apps", how many the catalog holds, and the way back to your connections. */
|
|
6
|
+
export declare function AppsHeader({ catalogTotal, connectionsPath, publishPath, }: {
|
|
7
|
+
/** 0 until the catalog has answered. */
|
|
8
|
+
catalogTotal: number;
|
|
9
|
+
connectionsPath: string;
|
|
10
|
+
publishPath: string;
|
|
11
|
+
}): import('react').JSX.Element;
|
|
12
|
+
/** The Templates chip row, one chip per category the data holds. */
|
|
13
|
+
export declare function AppCategoryChips({ facets, facetsTotal, category, onChange, }: {
|
|
14
|
+
facets: CategoryFacet[];
|
|
15
|
+
facetsTotal: number;
|
|
16
|
+
category: ProviderCategory | 'all';
|
|
17
|
+
onChange: (category: ProviderCategory | 'all') => void;
|
|
18
|
+
}): import('react').JSX.Element;
|
|
19
|
+
/** One page of apps, as rich cards or as rows. */
|
|
20
|
+
export declare function AppsList({ view, items, label, pathOf, connectionsOf, onConnect, onOpen, }: {
|
|
21
|
+
view: ListView;
|
|
22
|
+
items: AppItem[];
|
|
23
|
+
/** Names the list for assistive tech (the results heading). */
|
|
24
|
+
label: string;
|
|
25
|
+
pathOf: (app: AppItem) => string;
|
|
26
|
+
connectionsOf: (app: AppItem) => string;
|
|
27
|
+
/** Null when the person may not create connections. */
|
|
28
|
+
onConnect: ((app: AppItem) => void) | null;
|
|
29
|
+
onOpen: (app: AppItem) => void;
|
|
30
|
+
}): import('react').JSX.Element;
|