@burdenoff/microfe-store 2026.703.2 → 2026.705.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/components/InstallAppModal.js +326 -187
- package/dist/components/InstallAppModal.js.map +1 -1
- package/dist/generated/global-operations.js +1 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/pages/AppDetailPage.js +200 -153
- package/dist/pages/AppDetailPage.js.map +1 -1
- package/dist/pages/CartPage.js +27 -20
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/InstalledAppsPage.js +335 -154
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/OrderConfirmationPage.js +4 -0
- package/dist/pages/OrderConfirmationPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +339 -334
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,14 +2,16 @@ import { useStore as e } from "../providers/StoreProvider.js";
|
|
|
2
2
|
import { useInstallationStatusUpdatedSubscription as t } from "../generated/global-operations.js";
|
|
3
3
|
import { useInstallations as n } from "../hooks/useInstallations.js";
|
|
4
4
|
import { StoreInstallationStatus as r } from "../generated/global-types.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import { AlertCircle as s,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { useCallback as i, useMemo as a, useState as o } from "react";
|
|
6
|
+
import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
+
import { AlertCircle as te, ChevronLeft as ne, ChevronRight as s, ExternalLink as c, Loader2 as l, Plus as u, RefreshCw as d, Search as f, Settings as re, Trash2 as p } from "lucide-react";
|
|
8
|
+
import { useApolloClient as ie } from "@apollo/client/react";
|
|
9
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
|
+
import { useNavigate as ae } from "react-router-dom";
|
|
11
|
+
import { gql as _ } from "@apollo/client";
|
|
12
|
+
import { AlertDialog as v, AlertDialogAction as oe, AlertDialogCancel as y, AlertDialogContent as b, AlertDialogDescription as x, AlertDialogFooter as S, AlertDialogHeader as C, AlertDialogTitle as se, IllustratedEmptyState as ce, PagePurpose as le } from "@burdenoff/fe-libs/ui";
|
|
11
13
|
//#region src/pages/InstalledAppsPage.tsx
|
|
12
|
-
var
|
|
14
|
+
var w = 20, ue = [
|
|
13
15
|
{
|
|
14
16
|
label: "All",
|
|
15
17
|
value: "all"
|
|
@@ -38,225 +40,404 @@ var D = [
|
|
|
38
40
|
label: "Uninstalled",
|
|
39
41
|
value: r.Uninstalled
|
|
40
42
|
}
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
+
], T = (e) => e === r.Active ? "bg-status-success-bg-subtle text-status-success-text" : e === r.Pending || e === r.Installing || e === r.Inactive ? "bg-status-warning-bg-subtle text-status-warning-text" : e === r.Failed ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-muted";
|
|
44
|
+
function E(e) {
|
|
45
|
+
let t = e.manifest;
|
|
46
|
+
return t?.name && typeof t.name == "string" ? t.name : t?.slug && typeof t.slug == "string" ? t.slug.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ") : e.productId.slice(0, 8) + "…";
|
|
47
|
+
}
|
|
48
|
+
function D(e) {
|
|
49
|
+
let t = e.manifest;
|
|
50
|
+
return t?.icon && typeof t.icon == "string" ? t.icon : null;
|
|
51
|
+
}
|
|
52
|
+
function O(e) {
|
|
53
|
+
let t = e.manifest;
|
|
54
|
+
return t?.type && typeof t.type == "string" ? t.type : null;
|
|
55
|
+
}
|
|
56
|
+
function k(e) {
|
|
57
|
+
let t = e.manifest;
|
|
58
|
+
return t?.installationId && typeof t.installationId == "string" ? t.installationId : null;
|
|
59
|
+
}
|
|
60
|
+
function A({ installation: e }) {
|
|
61
|
+
let t = D(e), n = E(e), [r, i] = o(!1);
|
|
62
|
+
return t && !r ? /* @__PURE__ */ h("img", {
|
|
63
|
+
src: t,
|
|
64
|
+
alt: n,
|
|
65
|
+
onError: () => i(!0),
|
|
66
|
+
className: "size-8 rounded object-contain"
|
|
67
|
+
}) : /* @__PURE__ */ h("div", {
|
|
68
|
+
className: "flex size-8 items-center justify-center rounded bg-bg-sunken text-sm font-semibold text-text-muted",
|
|
69
|
+
children: n.charAt(0).toUpperCase()
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
var j = _`
|
|
73
|
+
mutation UninstallAppByApplicationFromStore(
|
|
74
|
+
$applicationId: ID!
|
|
75
|
+
$workspaceId: ID!
|
|
76
|
+
$reason: String
|
|
77
|
+
) {
|
|
78
|
+
uninstallAppByApplication(
|
|
79
|
+
applicationId: $applicationId
|
|
80
|
+
workspaceId: $workspaceId
|
|
81
|
+
reason: $reason
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
`, M = () => {
|
|
85
|
+
let _ = ae(), { basePath: D, workspaceId: M } = e(), { t: N } = ee(), P = ie(), [F, I] = o("all"), [L, R] = o(""), [z, B] = o(1), [V, H] = o(null), [U, W] = o(null), { installations: G, totalCount: K, hasMore: q, loading: J, error: Y, uninstall: de, uninstallingIds: fe, refetch: X } = n({
|
|
86
|
+
filter: a(() => F === "all" ? void 0 : { status: F }, [F]),
|
|
87
|
+
limit: w,
|
|
88
|
+
offset: (z - 1) * w
|
|
89
|
+
});
|
|
43
90
|
t({
|
|
44
|
-
variables: { workspaceId:
|
|
45
|
-
skip: !
|
|
91
|
+
variables: { workspaceId: M ?? "" },
|
|
92
|
+
skip: !M,
|
|
46
93
|
onData: () => {
|
|
47
|
-
|
|
94
|
+
X();
|
|
48
95
|
},
|
|
49
96
|
onError: (e) => {
|
|
50
97
|
console.warn("InstallationStatusUpdated subscription error:", e.message);
|
|
51
98
|
}
|
|
52
99
|
});
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
100
|
+
let Z = Math.max(1, Math.ceil(K / w)), Q = a(() => {
|
|
101
|
+
if (!L.trim()) return G;
|
|
102
|
+
let e = L.toLowerCase();
|
|
103
|
+
return G.filter((t) => {
|
|
104
|
+
let n = E(t).toLowerCase(), r = (t.workspaceName ?? t.workspaceId).toLowerCase(), i = (O(t) ?? "").toLowerCase();
|
|
105
|
+
return n.includes(e) || r.includes(e) || i.includes(e);
|
|
106
|
+
});
|
|
107
|
+
}, [G, L]), $ = a(() => [...Q].sort((e, t) => t.installedAt.localeCompare(e.installedAt)), [Q]), pe = i((e) => {
|
|
108
|
+
I(e), B(1);
|
|
109
|
+
}, []), me = async (e) => {
|
|
110
|
+
H(null), await de(e, "User requested uninstall from store UI") ? P.mutate({
|
|
111
|
+
mutation: j,
|
|
112
|
+
variables: {
|
|
113
|
+
applicationId: e.productId,
|
|
114
|
+
workspaceId: e.workspaceId,
|
|
115
|
+
reason: "User uninstalled from Installed Apps"
|
|
116
|
+
}
|
|
117
|
+
}).catch(() => {}) : H("Could not uninstall. Try again."), W(null);
|
|
57
118
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ g("div", {
|
|
59
120
|
className: "flex h-full flex-col",
|
|
60
121
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ h("header", {
|
|
62
123
|
className: "border-b border-border-seam bg-bg-surface px-6 py-4",
|
|
63
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ g("div", {
|
|
64
125
|
className: "flex items-center justify-between",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
66
127
|
className: "text-2xl font-bold text-text-primary",
|
|
67
|
-
children:
|
|
68
|
-
}), /* @__PURE__ */
|
|
128
|
+
children: N("pages.installed.title", { defaultValue: "Installed Apps" })
|
|
129
|
+
}), /* @__PURE__ */ h("p", {
|
|
69
130
|
className: "text-sm text-text-muted",
|
|
70
131
|
children: "Manage your installed applications"
|
|
71
|
-
})] }), /* @__PURE__ */
|
|
132
|
+
})] }), /* @__PURE__ */ g("button", {
|
|
72
133
|
type: "button",
|
|
73
|
-
onClick:
|
|
134
|
+
onClick: () => _(`${D}/marketplace`),
|
|
74
135
|
className: "flex cursor-pointer items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 font-semibold text-action-primary-text transition-colors hover:opacity-90",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ h(u, { className: "size-5" }), /* @__PURE__ */ h("span", { children: N("pages.installed.installNew", { defaultValue: "Install New App" }) })]
|
|
76
137
|
})]
|
|
77
138
|
})
|
|
78
139
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ h("main", {
|
|
80
141
|
className: "flex-1 overflow-y-auto p-6",
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
className: "mx-auto max-w-
|
|
142
|
+
children: /* @__PURE__ */ g("div", {
|
|
143
|
+
className: "mx-auto max-w-7xl",
|
|
83
144
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ h(le, {
|
|
85
146
|
className: "mb-4",
|
|
86
|
-
children: "Every app you install into a workspace lives here.
|
|
147
|
+
children: "Every app you install into a workspace lives here. Check status, jump into details, or remove apps a workspace no longer needs."
|
|
87
148
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ g("div", {
|
|
89
150
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
90
|
-
children: [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
151
|
+
children: [
|
|
152
|
+
ue.map((e) => /* @__PURE__ */ h("button", {
|
|
153
|
+
type: "button",
|
|
154
|
+
onClick: () => pe(e.value),
|
|
155
|
+
className: `cursor-pointer rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${F === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary hover:bg-bg-surface"}`,
|
|
156
|
+
children: e.label
|
|
157
|
+
}, e.label)),
|
|
158
|
+
/* @__PURE__ */ g("div", {
|
|
159
|
+
className: "relative ml-auto",
|
|
160
|
+
children: [/* @__PURE__ */ h(f, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ h("input", {
|
|
161
|
+
type: "search",
|
|
162
|
+
value: L,
|
|
163
|
+
onChange: (e) => R(e.target.value),
|
|
164
|
+
placeholder: "Search by name, workspace…",
|
|
165
|
+
className: "h-9 rounded-lg border border-border-default bg-bg-surface pl-9 pr-3 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
166
|
+
})]
|
|
167
|
+
}),
|
|
168
|
+
/* @__PURE__ */ g("button", {
|
|
169
|
+
type: "button",
|
|
170
|
+
onClick: () => X(),
|
|
171
|
+
className: "inline-flex cursor-pointer items-center gap-2 rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
172
|
+
children: [/* @__PURE__ */ h(d, { className: "size-4" }), "Refresh"]
|
|
173
|
+
})
|
|
174
|
+
]
|
|
101
175
|
}),
|
|
102
|
-
|
|
176
|
+
V && /* @__PURE__ */ h("div", {
|
|
103
177
|
role: "alert",
|
|
104
178
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
105
|
-
children:
|
|
179
|
+
children: V
|
|
106
180
|
}),
|
|
107
|
-
|
|
181
|
+
J ? /* @__PURE__ */ h("output", {
|
|
108
182
|
"aria-label": "Loading installed apps",
|
|
109
183
|
className: "flex items-center justify-center py-16",
|
|
110
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ h(l, {
|
|
111
185
|
className: "size-8 animate-spin text-text-muted",
|
|
112
186
|
"aria-hidden": "true"
|
|
113
187
|
})
|
|
114
|
-
}) :
|
|
188
|
+
}) : Y ? /* @__PURE__ */ g("div", {
|
|
115
189
|
role: "alert",
|
|
116
190
|
className: "flex flex-col items-center justify-center rounded-xl border border-status-error-border bg-status-error-bg-subtle py-16 text-center",
|
|
117
191
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ h(te, { className: "mb-3 size-10 text-status-error-text" }),
|
|
193
|
+
/* @__PURE__ */ h("h3", {
|
|
120
194
|
className: "text-lg font-semibold text-status-error-text",
|
|
121
195
|
children: "Failed to load installations"
|
|
122
196
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ h("p", {
|
|
124
198
|
className: "mt-2 text-sm text-text-muted",
|
|
125
|
-
children:
|
|
199
|
+
children: Y.message
|
|
126
200
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ h("button", {
|
|
128
202
|
type: "button",
|
|
129
|
-
onClick: () =>
|
|
203
|
+
onClick: () => X(),
|
|
130
204
|
className: "mt-4 cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
131
205
|
children: "Try Again"
|
|
132
206
|
})
|
|
133
207
|
]
|
|
134
|
-
}) :
|
|
208
|
+
}) : $.length === 0 && K === 0 ? /* @__PURE__ */ h(ce, {
|
|
135
209
|
illustration: "empty-generic",
|
|
136
|
-
title:
|
|
137
|
-
description:
|
|
138
|
-
action: /* @__PURE__ */
|
|
210
|
+
title: F === "all" ? "No apps installed" : "No apps match this filter",
|
|
211
|
+
description: F === "all" ? "Browse the marketplace to install your first app." : "Try a different status filter, or browse the marketplace.",
|
|
212
|
+
action: /* @__PURE__ */ h("button", {
|
|
139
213
|
type: "button",
|
|
140
|
-
onClick:
|
|
214
|
+
onClick: () => _(`${D}/marketplace`),
|
|
141
215
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 font-semibold text-action-primary-text transition-colors hover:opacity-90",
|
|
142
216
|
children: "Browse Marketplace"
|
|
143
217
|
})
|
|
144
|
-
}) : /* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
/* @__PURE__ */ h("
|
|
218
|
+
}) : /* @__PURE__ */ g(m, { children: [
|
|
219
|
+
/* @__PURE__ */ g("div", {
|
|
220
|
+
className: "mb-2 flex items-center justify-between text-sm text-text-muted",
|
|
221
|
+
children: [/* @__PURE__ */ h("span", {
|
|
148
222
|
"aria-live": "polite",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
223
|
+
children: L.trim() ? `${$.length} of ${K} shown` : `${K} installation${K === 1 ? "" : "s"}`
|
|
224
|
+
}), /* @__PURE__ */ g("span", { children: [
|
|
225
|
+
"Page ",
|
|
226
|
+
z,
|
|
227
|
+
" of ",
|
|
228
|
+
Z
|
|
229
|
+
] })]
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ h("div", {
|
|
232
|
+
className: "overflow-x-auto rounded-xl border border-border-seam",
|
|
233
|
+
children: /* @__PURE__ */ g("table", {
|
|
234
|
+
className: "w-full min-w-[720px] text-sm",
|
|
235
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
236
|
+
className: "border-b border-border-seam bg-bg-sunken text-left text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ h("th", {
|
|
239
|
+
className: "px-4 py-3",
|
|
240
|
+
children: "App"
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ h("th", {
|
|
243
|
+
className: "px-4 py-3",
|
|
244
|
+
children: "Workspace"
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ h("th", {
|
|
247
|
+
className: "px-4 py-3",
|
|
248
|
+
children: "Status"
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ h("th", {
|
|
251
|
+
className: "px-4 py-3",
|
|
252
|
+
children: "Version"
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ h("th", {
|
|
255
|
+
className: "px-4 py-3",
|
|
256
|
+
children: "Installed"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ h("th", {
|
|
259
|
+
className: "px-4 py-3 text-right",
|
|
260
|
+
children: "Actions"
|
|
261
|
+
})
|
|
262
|
+
]
|
|
263
|
+
}) }), /* @__PURE__ */ h("tbody", {
|
|
264
|
+
className: "divide-y divide-border-seam bg-bg-surface",
|
|
265
|
+
children: $.length === 0 ? /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", {
|
|
266
|
+
colSpan: 6,
|
|
267
|
+
className: "py-12 text-center text-text-muted",
|
|
268
|
+
children: "No results match your search."
|
|
269
|
+
}) }) : $.map((e) => {
|
|
270
|
+
let t = E(e), n = O(e), i = k(e), a = fe.has(`${e.workspaceId}:${e.productId}`), o = n === "INTEGRATION" || n === "API_INTEGRATION";
|
|
271
|
+
return /* @__PURE__ */ g("tr", {
|
|
272
|
+
className: "transition-colors hover:bg-bg-subtle",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ h("td", {
|
|
275
|
+
className: "px-4 py-3",
|
|
276
|
+
children: /* @__PURE__ */ g("div", {
|
|
277
|
+
className: "flex items-center gap-3",
|
|
278
|
+
children: [/* @__PURE__ */ h(A, { installation: e }), /* @__PURE__ */ g("div", {
|
|
279
|
+
className: "min-w-0",
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ h("p", {
|
|
282
|
+
className: "truncate font-medium text-text-primary",
|
|
283
|
+
children: t
|
|
284
|
+
}),
|
|
285
|
+
n && /* @__PURE__ */ h("span", {
|
|
286
|
+
className: "mt-0.5 inline-block rounded bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-muted",
|
|
287
|
+
children: n
|
|
288
|
+
}),
|
|
289
|
+
o && i && /* @__PURE__ */ g("p", {
|
|
290
|
+
className: "truncate text-[10px] text-text-muted",
|
|
291
|
+
title: i,
|
|
292
|
+
children: [
|
|
293
|
+
"ID: ",
|
|
294
|
+
i.slice(0, 16),
|
|
295
|
+
"…"
|
|
296
|
+
]
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
})]
|
|
300
|
+
})
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ g("td", {
|
|
303
|
+
className: "px-4 py-3",
|
|
304
|
+
children: [/* @__PURE__ */ h("p", {
|
|
305
|
+
className: "truncate text-text-primary",
|
|
173
306
|
children: e.workspaceName ?? e.workspaceId
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
307
|
+
}), e.workspaceType && /* @__PURE__ */ h("p", {
|
|
308
|
+
className: "text-xs text-text-muted",
|
|
309
|
+
children: e.workspaceType
|
|
310
|
+
})]
|
|
311
|
+
}),
|
|
312
|
+
/* @__PURE__ */ h("td", {
|
|
313
|
+
className: "px-4 py-3",
|
|
314
|
+
children: /* @__PURE__ */ h("span", {
|
|
315
|
+
className: `inline-block rounded-full px-2 py-1 text-xs font-medium ${T(e.status)}`,
|
|
316
|
+
children: e.status
|
|
317
|
+
})
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ h("td", {
|
|
320
|
+
className: "px-4 py-3 font-variant-numeric tabular-nums text-text-muted",
|
|
321
|
+
children: e.version ? `v${e.version}` : "—"
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ h("td", {
|
|
324
|
+
className: "px-4 py-3 text-text-muted",
|
|
325
|
+
children: new Date(e.installedAt).toLocaleDateString(void 0, {
|
|
326
|
+
year: "numeric",
|
|
327
|
+
month: "short",
|
|
328
|
+
day: "numeric"
|
|
329
|
+
})
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ h("td", {
|
|
332
|
+
className: "px-4 py-3",
|
|
333
|
+
children: /* @__PURE__ */ g("div", {
|
|
334
|
+
className: "flex items-center justify-end gap-2",
|
|
181
335
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
|
|
184
|
-
|
|
336
|
+
o ? /* @__PURE__ */ g("button", {
|
|
337
|
+
type: "button",
|
|
338
|
+
onClick: () => _(`${D}/installed/${e.id}`),
|
|
339
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
340
|
+
title: "View installation details",
|
|
341
|
+
children: [/* @__PURE__ */ h(c, { className: "size-3.5" }), "Details"]
|
|
342
|
+
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
343
|
+
type: "button",
|
|
344
|
+
onClick: () => _(`${D}/installed/${e.id}`),
|
|
345
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
346
|
+
children: "Details"
|
|
347
|
+
}), /* @__PURE__ */ g("button", {
|
|
348
|
+
type: "button",
|
|
349
|
+
onClick: () => _(`${D}/installed/${e.id}/settings`),
|
|
350
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
351
|
+
children: [/* @__PURE__ */ h(re, { className: "size-3.5" }), "Configure"]
|
|
352
|
+
})] }),
|
|
353
|
+
/* @__PURE__ */ h("button", {
|
|
354
|
+
type: "button",
|
|
355
|
+
onClick: () => _(`${D}/marketplace/product/${e.productId}`),
|
|
356
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
357
|
+
children: "Product"
|
|
185
358
|
}),
|
|
186
|
-
e.
|
|
187
|
-
|
|
359
|
+
e.status !== r.Uninstalled && /* @__PURE__ */ g("button", {
|
|
360
|
+
type: "button",
|
|
361
|
+
onClick: () => W(e),
|
|
362
|
+
disabled: a,
|
|
363
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-status-error-border px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:opacity-60",
|
|
364
|
+
children: [a ? /* @__PURE__ */ h(l, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(p, { className: "size-3.5" }), "Uninstall"]
|
|
365
|
+
})
|
|
188
366
|
]
|
|
189
367
|
})
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
type: "button",
|
|
202
|
-
onClick: () => k(`${A}/marketplace/product/${e.productId}`),
|
|
203
|
-
className: "cursor-pointer rounded-lg border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
204
|
-
children: "View Product"
|
|
205
|
-
}),
|
|
206
|
-
e.status !== r.Uninstalled && /* @__PURE__ */ h("button", {
|
|
207
|
-
type: "button",
|
|
208
|
-
onClick: () => R(e),
|
|
209
|
-
disabled: t,
|
|
210
|
-
className: "cursor-pointer inline-flex items-center gap-1.5 rounded-lg border border-status-error-border px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:opacity-60",
|
|
211
|
-
children: [t ? /* @__PURE__ */ m(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(f, { className: "size-4" }), "Uninstall"]
|
|
212
|
-
})
|
|
213
|
-
]
|
|
214
|
-
})]
|
|
215
|
-
})
|
|
216
|
-
}, e.id);
|
|
217
|
-
})
|
|
218
|
-
}),
|
|
219
|
-
V && /* @__PURE__ */ m("div", {
|
|
220
|
-
className: "flex justify-center pt-6",
|
|
221
|
-
children: /* @__PURE__ */ m("button", {
|
|
368
|
+
})
|
|
369
|
+
]
|
|
370
|
+
}, e.id);
|
|
371
|
+
})
|
|
372
|
+
})]
|
|
373
|
+
})
|
|
374
|
+
}),
|
|
375
|
+
Z > 1 && /* @__PURE__ */ g("div", {
|
|
376
|
+
className: "mt-4 flex items-center justify-between",
|
|
377
|
+
children: [
|
|
378
|
+
/* @__PURE__ */ g("button", {
|
|
222
379
|
type: "button",
|
|
223
|
-
onClick:
|
|
224
|
-
disabled:
|
|
225
|
-
className: "rounded-lg border border-border-default px-
|
|
226
|
-
children:
|
|
380
|
+
onClick: () => B((e) => Math.max(1, e - 1)),
|
|
381
|
+
disabled: z === 1 || J,
|
|
382
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
383
|
+
children: [/* @__PURE__ */ h(ne, { className: "size-4" }), "Previous"]
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ h("div", {
|
|
386
|
+
className: "flex items-center gap-1",
|
|
387
|
+
children: Array.from({ length: Math.min(Z, 7) }, (e, t) => {
|
|
388
|
+
let n = Z <= 7 || t < 3 ? t + 1 : t >= 4 ? Z - (6 - t) : z;
|
|
389
|
+
return /* @__PURE__ */ h("button", {
|
|
390
|
+
type: "button",
|
|
391
|
+
onClick: () => B(n),
|
|
392
|
+
className: `size-8 rounded-lg text-sm font-medium transition-colors ${n === z ? "bg-action-primary-bg text-action-primary-text" : "text-text-muted hover:bg-bg-sunken"}`,
|
|
393
|
+
children: n
|
|
394
|
+
}, n);
|
|
395
|
+
})
|
|
396
|
+
}),
|
|
397
|
+
/* @__PURE__ */ g("button", {
|
|
398
|
+
type: "button",
|
|
399
|
+
onClick: () => B((e) => q ? e + 1 : Math.min(Z, e + 1)),
|
|
400
|
+
disabled: z >= Z || J,
|
|
401
|
+
className: "inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
402
|
+
children: ["Next", /* @__PURE__ */ h(s, { className: "size-4" })]
|
|
227
403
|
})
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
})
|
|
404
|
+
]
|
|
405
|
+
})
|
|
406
|
+
] })
|
|
231
407
|
]
|
|
232
408
|
})
|
|
233
409
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
open:
|
|
236
|
-
onOpenChange: (e) => !e &&
|
|
237
|
-
children: /* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ h(v, {
|
|
411
|
+
open: U !== null,
|
|
412
|
+
onOpenChange: (e) => !e && W(null),
|
|
413
|
+
children: /* @__PURE__ */ g(b, {
|
|
238
414
|
className: "max-w-md",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
240
|
-
"Remove
|
|
415
|
+
children: [/* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(se, { children: "Uninstall app" }), /* @__PURE__ */ h(x, { children: U && /* @__PURE__ */ g(m, { children: [
|
|
416
|
+
"Remove",
|
|
241
417
|
" ",
|
|
242
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ h("span", {
|
|
243
419
|
className: "font-medium text-text-primary",
|
|
244
|
-
children:
|
|
420
|
+
children: E(U)
|
|
245
421
|
}),
|
|
246
422
|
" ",
|
|
247
|
-
"from
|
|
423
|
+
"from",
|
|
248
424
|
" ",
|
|
249
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ h("span", {
|
|
250
426
|
className: "font-medium text-text-primary",
|
|
251
|
-
children:
|
|
427
|
+
children: U.workspaceName ?? U.workspaceId
|
|
252
428
|
}),
|
|
253
|
-
"?"
|
|
254
|
-
|
|
255
|
-
|
|
429
|
+
"?",
|
|
430
|
+
" ",
|
|
431
|
+
(O(U) === "INTEGRATION" || O(U) === "API_INTEGRATION") && /* @__PURE__ */ h("span", {
|
|
432
|
+
className: "mt-1 block text-xs text-text-muted",
|
|
433
|
+
children: "This will also revoke the integration's access on the third-party side."
|
|
434
|
+
})
|
|
435
|
+
] }) })] }), /* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(y, {
|
|
436
|
+
onClick: () => W(null),
|
|
256
437
|
children: "Cancel"
|
|
257
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ h(oe, {
|
|
258
439
|
className: "bg-status-error-bg text-status-error-text hover:bg-status-error-bg-emphasis",
|
|
259
|
-
onClick: () =>
|
|
440
|
+
onClick: () => U && me(U),
|
|
260
441
|
children: "Uninstall"
|
|
261
442
|
})] })]
|
|
262
443
|
})
|
|
@@ -265,6 +446,6 @@ var D = [
|
|
|
265
446
|
});
|
|
266
447
|
};
|
|
267
448
|
//#endregion
|
|
268
|
-
export {
|
|
449
|
+
export { M as InstalledAppsPage };
|
|
269
450
|
|
|
270
451
|
//# sourceMappingURL=InstalledAppsPage.js.map
|