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