@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.
@@ -1,18 +1,19 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
- import { useCallback as t, useEffect as n, useReducer as r, useState as i } from "react";
3
- import { AlertCircle as a, ArrowLeft as o, Building2 as s, CheckCircle as c, ChevronRight as l, Info as u, Loader2 as d, ShieldCheck as f } from "lucide-react";
2
+ import { useTr as t } from "../shared/hooks/useTr.js";
3
+ import { useCallback as n, useEffect as r, useReducer as i, useState as a } from "react";
4
+ import { AlertCircle as o, ArrowLeft as s, Building2 as c, CheckCircle as l, ChevronRight as u, Info as d, Loader2 as f, ShieldCheck as ee } from "lucide-react";
4
5
  import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql";
5
6
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
6
- import { Dialog as _, DialogContent as v, DialogDescription as y, DialogFooter as b, DialogHeader as x, DialogTitle as ee } from "@burdenoff/fe-libs/ui";
7
+ import { Dialog as _, DialogContent as te, DialogDescription as v, DialogFooter as y, DialogHeader as b, DialogTitle as x } from "@burdenoff/fe-libs/ui";
7
8
  //#region src/components/InstallAppModal.tsx
8
- var S = "query MyWorkspaces { myWorkspaces { items { id name slug type status organizationId } total } }", C = "mutation InstallWorkspaceApps($workspaceIds: [ID!]!, $input: InstallWorkspaceAppInput!) { installWorkspaceApps(workspaceIds: $workspaceIds, input: $input) { successCount failedCount results { success workspaceId error } } }", w = "mutation RecordAppInstallation($input: RecordAppInstallationInput!) { recordAppInstallation(input: $input) { id status workspaceId version } }", T = "mutation InstallPurchasedApp($orderId: ID, $productId: String!, $workspaceId: String!, $version: String) { installPurchasedApp(orderId: $orderId, productId: $productId, workspaceId: $workspaceId, version: $version) { success alreadyInstalled installation { id productId workspaceId status version } error message } }", te = "mutation CreateProductEntitlement($input: CreateProductEntitlementInput!) { createProductEntitlement(input: $input) { id status productId workspaceId } }", ne = "mutation InstallAppDevportal($input: InstallAppInput!) { installApp(input: $input) { id status workspaceId application { oauthAuthUrl } } }", E = "query InstallableApplicationVersions($applicationId: ID!) { installableApplicationVersions(applicationId: $applicationId) { version status isLatest } }", D = new Set([
9
+ var S = "query MyWorkspaces { myWorkspaces { items { id name slug type status organizationId } total } }", ne = "mutation InstallWorkspaceApps($workspaceIds: [ID!]!, $input: InstallWorkspaceAppInput!) { installWorkspaceApps(workspaceIds: $workspaceIds, input: $input) { successCount failedCount results { success workspaceId error } } }", C = "mutation RecordAppInstallation($input: RecordAppInstallationInput!) { recordAppInstallation(input: $input) { id status workspaceId version } }", w = "mutation InstallPurchasedApp($orderId: ID, $productId: String!, $workspaceId: String!, $version: String) { installPurchasedApp(orderId: $orderId, productId: $productId, workspaceId: $workspaceId, version: $version) { success alreadyInstalled installation { id productId workspaceId status version } error message } }", T = "mutation CreateProductEntitlement($input: CreateProductEntitlementInput!) { createProductEntitlement(input: $input) { id status productId workspaceId } }", E = "mutation InstallAppDevportal($input: InstallAppInput!) { installApp(input: $input) { id status workspaceId application { oauthAuthUrl } } }", D = "query InstallableApplicationVersions($applicationId: ID!) { installableApplicationVersions(applicationId: $applicationId) { version status isLatest } }", O = new Set([
9
10
  "VIBEMODULE",
10
11
  "NODE",
11
12
  "CONSOLE",
12
13
  "DASHBOARD",
13
14
  "PARSER",
14
15
  "DATASINK"
15
- ]), O = new Set(["INTEGRATION", "API_INTEGRATION"]), k = {
16
+ ]), k = new Set(["INTEGRATION", "API_INTEGRATION"]), A = {
16
17
  ALREADY_INSTALLED: "This app is already installed in the selected workspace.",
17
18
  QUOTA_EXCEEDED: "Installation limit reached. Please upgrade your plan or contact support.",
18
19
  PERMISSION_DENIED: "You do not have permission to install apps in this workspace.",
@@ -21,11 +22,11 @@ var S = "query MyWorkspaces { myWorkspaces { items { id name slug type status or
21
22
  ENTITLEMENT_EXPIRED: "Your license for this app has expired.",
22
23
  UNSUPPORTED_TYPE: "This product type cannot be installed in the selected workspace."
23
24
  };
24
- function A(e) {
25
- for (let [t, n] of Object.entries(k)) if (e.toUpperCase().includes(t)) return n;
25
+ function j(e) {
26
+ for (let [t, n] of Object.entries(A)) if (e.toUpperCase().includes(t)) return n;
26
27
  return "Installation failed. Please try again or contact support.";
27
28
  }
28
- var j = {
29
+ var M = {
29
30
  step: "workspace",
30
31
  selectedWorkspace: null,
31
32
  selectedVersion: "",
@@ -33,9 +34,9 @@ var j = {
33
34
  installError: null,
34
35
  installInfo: null
35
36
  };
36
- function M(e, t) {
37
+ function re(e, t) {
37
38
  switch (t.type) {
38
- case "reset": return j;
39
+ case "reset": return M;
39
40
  case "selectWorkspace": return {
40
41
  ...e,
41
42
  selectedWorkspace: t.workspaceId
@@ -75,15 +76,15 @@ function M(e, t) {
75
76
  default: return e;
76
77
  }
77
78
  }
78
- function N(r) {
79
- let { authToken: a } = e(), [o, s] = i([]), [c, l] = i(!1), [u, d] = i(null), f = t(async () => {
80
- if (!r) {
79
+ function N(t) {
80
+ let { authToken: i } = e(), [o, s] = a([]), [c, l] = a(!1), [u, d] = a(null), f = n(async () => {
81
+ if (!t) {
81
82
  l(!0), d(null);
82
83
  try {
83
84
  let e = await p({
84
85
  gateway: "global",
85
86
  query: S,
86
- authToken: a || void 0
87
+ authToken: i || void 0
87
88
  });
88
89
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "GraphQL error");
89
90
  s(e.data?.myWorkspaces?.items || []);
@@ -93,8 +94,8 @@ function N(r) {
93
94
  l(!1);
94
95
  }
95
96
  }
96
- }, [a, r]);
97
- return n(() => {
97
+ }, [i, t]);
98
+ return r(() => {
98
99
  f();
99
100
  }, [f]), {
100
101
  workspaces: o,
@@ -103,19 +104,19 @@ function N(r) {
103
104
  refetch: f
104
105
  };
105
106
  }
106
- function P(t, r) {
107
- let { authToken: a } = e(), [o, s] = i([]), [c, l] = i(!1);
108
- return n(() => {
109
- if (r || !t) {
107
+ function P(t, n) {
108
+ let { authToken: i } = e(), [o, s] = a([]), [c, l] = a(!1);
109
+ return r(() => {
110
+ if (n || !t) {
110
111
  s([]);
111
112
  return;
112
113
  }
113
114
  let e = !1;
114
115
  return l(!0), p({
115
116
  gateway: "global",
116
- query: E,
117
+ query: D,
117
118
  variables: { applicationId: t },
118
- authToken: a || void 0
119
+ authToken: i || void 0
119
120
  }).then((t) => {
120
121
  if (!e) {
121
122
  if (t.errors?.length) {
@@ -133,30 +134,30 @@ function P(t, r) {
133
134
  };
134
135
  }, [
135
136
  t,
136
- a,
137
- r
137
+ i,
138
+ n
138
139
  ]), {
139
140
  versions: o,
140
141
  loading: c
141
142
  };
142
143
  }
143
- var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free", onInstallSuccess: F, onInstallError: I }) => {
144
- let { authToken: L, user: re } = e(), [ie, R] = r(M, j), { step: z, selectedWorkspace: B, selectedVersion: V, installing: H, installError: U, installInfo: W } = ie, G = S.type?.toUpperCase() ?? "", K = O.has(G), q = D.has(G), { workspaces: J, loading: ae, error: Y } = N(!t), { versions: X } = P(S.applicationId, !t || !q);
145
- n(() => {
146
- t || R({ type: "reset" });
147
- }, [t]);
148
- let Z = J.filter((e) => e.status === "ACTIVE"), oe = async () => {
149
- if (!B) return;
150
- let e = Z.find((e) => e.id === B);
144
+ var F = ({ isOpen: n, onClose: a, app: S, orderId: D, purchaseState: A = "free", onInstallSuccess: F, onInstallError: I }) => {
145
+ let L = t(), { authToken: R, user: ie } = e(), [ae, z] = i(re, M), { step: B, selectedWorkspace: V, selectedVersion: H, installing: U, installError: W, installInfo: G } = ae, K = S.type?.toUpperCase() ?? "", q = k.has(K), J = O.has(K), { workspaces: oe, loading: se, error: Y } = N(!n), { versions: X } = P(S.applicationId, !n || !J);
146
+ r(() => {
147
+ n || z({ type: "reset" });
148
+ }, [n]);
149
+ let Z = oe.filter((e) => e.status === "ACTIVE"), ce = async () => {
150
+ if (!V) return;
151
+ let e = Z.find((e) => e.id === V);
151
152
  if (!e) return;
152
- let t = re?.id;
153
- R({ type: "startInstall" });
153
+ let t = ie?.id;
154
+ z({ type: "startInstall" });
154
155
  try {
155
- if (!E && k !== "purchased") {
156
+ if (!D && A !== "purchased") {
156
157
  if (!t) throw Error("Unable to identify the current user for license creation");
157
158
  await p({
158
159
  gateway: "global",
159
- query: te,
160
+ query: T,
160
161
  variables: { input: {
161
162
  productId: S.id,
162
163
  purchasedBy: t,
@@ -166,51 +167,51 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
166
167
  productType: S.type
167
168
  }
168
169
  } },
169
- authToken: L || void 0
170
+ authToken: R || void 0
170
171
  });
171
172
  }
172
173
  let n = await p({
173
174
  gateway: "global",
174
- query: T,
175
+ query: w,
175
176
  variables: {
176
- orderId: E ?? null,
177
+ orderId: D ?? null,
177
178
  productId: S.id,
178
179
  workspaceId: e.id,
179
- version: V || void 0
180
+ version: H || void 0
180
181
  },
181
- authToken: L || void 0
182
+ authToken: R || void 0
182
183
  });
183
184
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Installation failed");
184
185
  let r = n.data?.installPurchasedApp;
185
- if (r?.success) r.alreadyInstalled ? R({
186
+ if (r?.success) r.alreadyInstalled ? z({
186
187
  type: "setInfo",
187
188
  info: r.message || "Already installed on this workspace"
188
- }) : (F?.(e.id, e.name), i());
189
+ }) : (F?.(e.id, e.name), a());
189
190
  else {
190
191
  let e = r?.error || "Installation failed";
191
- R({
192
+ z({
192
193
  type: "setError",
193
- error: A(e)
194
+ error: j(e)
194
195
  }), I?.(Error(e));
195
196
  }
196
197
  } catch (e) {
197
198
  let t = e instanceof Error ? e.message : "Installation failed";
198
- R({
199
+ z({
199
200
  type: "setError",
200
- error: A(t)
201
+ error: j(t)
201
202
  }), I?.(Error(t));
202
203
  } finally {
203
- R({ type: "finishInstall" });
204
+ z({ type: "finishInstall" });
204
205
  }
205
- }, se = async () => {
206
- if (!B) return;
207
- let e = Z.find((e) => e.id === B);
206
+ }, le = async () => {
207
+ if (!V) return;
208
+ let e = Z.find((e) => e.id === V);
208
209
  if (e) {
209
- R({ type: "startInstall" });
210
+ z({ type: "startInstall" });
210
211
  try {
211
212
  let t = await p({
212
213
  gateway: "workspace",
213
- query: C,
214
+ query: ne,
214
215
  variables: {
215
216
  workspaceIds: [e.id],
216
217
  input: {
@@ -224,7 +225,7 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
224
225
  }
225
226
  }
226
227
  },
227
- authToken: L || void 0,
228
+ authToken: R || void 0,
228
229
  workspaceId: e.id,
229
230
  workspaceToken: !0
230
231
  });
@@ -234,7 +235,7 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
234
235
  try {
235
236
  await p({
236
237
  gateway: "global",
237
- query: w,
238
+ query: C,
238
239
  variables: { input: {
239
240
  productId: S.id,
240
241
  workspaceId: e.id,
@@ -250,45 +251,45 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
250
251
  type: S.type
251
252
  }
252
253
  } },
253
- authToken: L || void 0
254
+ authToken: R || void 0
254
255
  });
255
256
  } catch {}
256
- F?.(e.id, e.name), i();
257
+ F?.(e.id, e.name), a();
257
258
  } else {
258
259
  let e = n?.results?.[0]?.error || "Installation failed";
259
- R({
260
+ z({
260
261
  type: "setError",
261
- error: A(e)
262
+ error: j(e)
262
263
  }), I?.(Error(e));
263
264
  }
264
265
  } catch (e) {
265
266
  let t = e instanceof Error ? e.message : "Installation failed";
266
- R({
267
+ z({
267
268
  type: "setError",
268
- error: A(t)
269
+ error: j(t)
269
270
  }), I?.(Error(t));
270
271
  } finally {
271
- R({ type: "finishInstall" });
272
+ z({ type: "finishInstall" });
272
273
  }
273
274
  }
274
- }, ce = () => {
275
- K ? R({ type: "advanceToConsent" }) : Q();
276
- }, le = async () => {
277
- if (!B) return;
278
- let e = Z.find((e) => e.id === B);
275
+ }, ue = () => {
276
+ q ? z({ type: "advanceToConsent" }) : Q();
277
+ }, de = async () => {
278
+ if (!V) return;
279
+ let e = Z.find((e) => e.id === V);
279
280
  if (e) {
280
- R({ type: "startInstall" });
281
+ z({ type: "startInstall" });
281
282
  try {
282
283
  let t = await p({
283
284
  gateway: "global",
284
- query: ne,
285
+ query: E,
285
286
  variables: { input: {
286
287
  applicationId: S.applicationId ?? S.id,
287
288
  scope: "WORKSPACE",
288
289
  workspaceId: e.id,
289
290
  consentedPermissions: S.permissions ?? []
290
291
  } },
291
- authToken: L || void 0
292
+ authToken: R || void 0
292
293
  });
293
294
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Installation failed");
294
295
  let n = t.data?.installApp;
@@ -296,7 +297,7 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
296
297
  try {
297
298
  await p({
298
299
  gateway: "global",
299
- query: w,
300
+ query: C,
300
301
  variables: { input: {
301
302
  productId: S.id,
302
303
  workspaceId: e.id,
@@ -314,31 +315,31 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
314
315
  installationId: n.id
315
316
  }
316
317
  } },
317
- authToken: L || void 0
318
+ authToken: R || void 0
318
319
  });
319
320
  } catch {}
320
321
  let r = n.application?.oauthAuthUrl;
321
- r && window.open(`${r}?installation_id=${n.id}`, "_blank"), F?.(e.id, e.name), i();
322
+ r && window.open(`${r}?installation_id=${n.id}`, "_blank"), F?.(e.id, e.name), a();
322
323
  } catch (e) {
323
324
  let t = e instanceof Error ? e.message : "Installation failed";
324
- R({
325
+ z({
325
326
  type: "setError",
326
- error: A(t)
327
+ error: j(t)
327
328
  }), I?.(Error(t));
328
329
  } finally {
329
- R({ type: "finishInstall" });
330
+ z({ type: "finishInstall" });
330
331
  }
331
332
  }
332
333
  }, Q = async () => {
333
- O.has(G) ? await le() : k === "purchased" || E || D.has(G) ? await oe() : await se();
334
- }, $ = Z.find((e) => e.id === B);
334
+ k.has(K) ? await de() : A === "purchased" || D || O.has(K) ? await ce() : await le();
335
+ }, $ = Z.find((e) => e.id === V);
335
336
  return /* @__PURE__ */ h(_, {
336
- open: t,
337
- onOpenChange: (e) => !e && i(),
338
- children: /* @__PURE__ */ g(v, {
337
+ open: n,
338
+ onOpenChange: (e) => !e && a(),
339
+ children: /* @__PURE__ */ g(te, {
339
340
  className: "mx-4 w-full max-w-lg gap-0 p-0",
340
341
  children: [
341
- /* @__PURE__ */ g(x, {
342
+ /* @__PURE__ */ g(b, {
342
343
  className: "flex flex-row items-center justify-between space-y-0 border-b border-border-default px-6 py-4 text-left",
343
344
  children: [/* @__PURE__ */ g("div", {
344
345
  className: "flex items-center gap-3",
@@ -349,47 +350,47 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
349
350
  }) : /* @__PURE__ */ h("div", {
350
351
  className: "flex size-10 items-center justify-center rounded-lg bg-bg-sunken text-lg font-bold text-text-muted",
351
352
  children: S.name.charAt(0)
352
- }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(ee, {
353
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(x, {
353
354
  className: "text-lg font-semibold text-text-primary",
354
- children: z === "consent" ? "Review Permissions" : "Install App"
355
- }), /* @__PURE__ */ h(y, {
355
+ children: B === "consent" ? L("installApp.reviewPermissions", "Review Permissions") : L("installApp.title", "Install App")
356
+ }), /* @__PURE__ */ h(v, {
356
357
  className: "text-sm text-text-muted",
357
358
  children: S.name
358
359
  })] })]
359
- }), K && /* @__PURE__ */ g("div", {
360
+ }), q && /* @__PURE__ */ g("div", {
360
361
  className: "flex items-center gap-1.5 text-xs text-text-muted shrink-0",
361
362
  children: [
362
363
  /* @__PURE__ */ h("span", {
363
- className: z === "workspace" ? "font-semibold text-text-primary" : "",
364
+ className: B === "workspace" ? "font-semibold text-text-primary" : "",
364
365
  children: "1"
365
366
  }),
366
- /* @__PURE__ */ h(l, { className: "size-3" }),
367
+ /* @__PURE__ */ h(u, { className: "size-3" }),
367
368
  /* @__PURE__ */ h("span", {
368
- className: z === "consent" ? "font-semibold text-text-primary" : "",
369
+ className: B === "consent" ? "font-semibold text-text-primary" : "",
369
370
  children: "2"
370
371
  })
371
372
  ]
372
373
  })]
373
374
  }),
374
- z === "workspace" && /* @__PURE__ */ g("div", {
375
+ B === "workspace" && /* @__PURE__ */ g("div", {
375
376
  className: "px-6 py-4",
376
377
  children: [
377
378
  /* @__PURE__ */ h("p", {
378
379
  className: "mb-4 text-text-secondary",
379
- children: "Select the workspace where you want to install this app:"
380
+ children: L("installApp.selectWorkspace", "Select the workspace where you want to install this app:")
380
381
  }),
381
382
  /* @__PURE__ */ h("div", {
382
383
  className: "max-h-72 overflow-y-auto rounded-lg border border-border-seam",
383
- children: ae ? /* @__PURE__ */ h("div", {
384
+ children: se ? /* @__PURE__ */ h("div", {
384
385
  className: "flex items-center justify-center py-12",
385
- children: /* @__PURE__ */ h(d, { className: "size-8 animate-spin text-text-muted" })
386
+ children: /* @__PURE__ */ h(f, { className: "size-8 animate-spin text-text-muted" })
386
387
  }) : Y ? /* @__PURE__ */ g("div", {
387
388
  className: "flex flex-col items-center justify-center py-12 text-center",
388
389
  children: [
389
- /* @__PURE__ */ h(a, { className: "mb-2 size-8 text-status-error-text" }),
390
+ /* @__PURE__ */ h(o, { className: "mb-2 size-8 text-status-error-text" }),
390
391
  /* @__PURE__ */ h("p", {
391
392
  className: "text-sm text-status-error-text",
392
- children: "Failed to load workspaces"
393
+ children: L("installApp.failedToLoadWorkspaces", "Failed to load workspaces")
393
394
  }),
394
395
  /* @__PURE__ */ h("p", {
395
396
  className: "text-xs text-text-muted mt-1",
@@ -398,23 +399,23 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
398
399
  ]
399
400
  }) : Z.length === 0 ? /* @__PURE__ */ g("div", {
400
401
  className: "flex flex-col items-center justify-center py-12 text-center",
401
- children: [/* @__PURE__ */ h(s, { className: "mb-2 size-8 text-text-muted" }), /* @__PURE__ */ h("p", {
402
+ children: [/* @__PURE__ */ h(c, { className: "mb-2 size-8 text-text-muted" }), /* @__PURE__ */ h("p", {
402
403
  className: "text-sm text-text-muted",
403
- children: "No workspaces available"
404
+ children: L("installApp.noWorkspaces", "No workspaces available")
404
405
  })]
405
406
  }) : /* @__PURE__ */ h("div", {
406
407
  className: "divide-y divide-border-default",
407
408
  children: Z.map((e) => /* @__PURE__ */ g("button", {
408
409
  type: "button",
409
- onClick: () => R({
410
+ onClick: () => z({
410
411
  type: "selectWorkspace",
411
412
  workspaceId: e.id
412
413
  }),
413
- className: `w-full cursor-pointer flex items-center gap-3 px-4 py-3 text-left transition-colors ${B === e.id ? "bg-action-primary-bg/10" : "hover:bg-bg-sunken"}`,
414
+ className: `w-full cursor-pointer flex items-center gap-3 px-4 py-3 text-left transition-colors ${V === e.id ? "bg-action-primary-bg/10" : "hover:bg-bg-sunken"}`,
414
415
  children: [
415
416
  /* @__PURE__ */ h("div", {
416
417
  className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10 text-text-link",
417
- children: /* @__PURE__ */ h(s, { className: "size-5" })
418
+ children: /* @__PURE__ */ h(c, { className: "size-5" })
418
419
  }),
419
420
  /* @__PURE__ */ g("div", {
420
421
  className: "flex-1 min-w-0",
@@ -426,50 +427,48 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
426
427
  children: ["/", e.slug]
427
428
  }) : null]
428
429
  }),
429
- B === e.id && /* @__PURE__ */ h(c, { className: "size-5 flex-shrink-0 text-action-primary-bg" })
430
+ V === e.id && /* @__PURE__ */ h(l, { className: "size-5 flex-shrink-0 text-action-primary-bg" })
430
431
  ]
431
432
  }, e.id))
432
433
  })
433
434
  }),
434
- q && X.length > 1 && /* @__PURE__ */ g("div", {
435
+ J && X.length > 1 && /* @__PURE__ */ g("div", {
435
436
  className: "mt-4",
436
437
  children: [/* @__PURE__ */ h("label", {
437
438
  htmlFor: "install-app-version",
438
439
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
439
- children: "Version"
440
+ children: L("installApp.version", "Version")
440
441
  }), /* @__PURE__ */ g("select", {
441
442
  id: "install-app-version",
442
- value: V,
443
- onChange: (e) => R({
443
+ value: H,
444
+ onChange: (e) => z({
444
445
  type: "selectVersion",
445
446
  version: e.target.value
446
447
  }),
447
448
  className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
448
- children: [/* @__PURE__ */ g("option", {
449
+ children: [/* @__PURE__ */ h("option", {
449
450
  value: "",
450
- children: ["Latest", S.version ? ` (${S.version})` : ""]
451
- }), X.filter((e) => !e.isLatest).map((e) => /* @__PURE__ */ g("option", {
451
+ children: S.version ? L("installApp.latestWithVersion", "Latest ({{version}})", { version: S.version }) : L("installApp.latest", "Latest")
452
+ }), X.filter((e) => !e.isLatest).map((e) => /* @__PURE__ */ h("option", {
452
453
  value: e.version,
453
- children: [
454
- e.version,
455
- " (",
456
- e.status,
457
- ")"
458
- ]
454
+ children: L("installApp.versionWithStatus", "{{version}} ({{status}})", {
455
+ version: e.version,
456
+ status: e.status
457
+ })
459
458
  }, e.version))]
460
459
  })]
461
460
  })
462
461
  ]
463
462
  }),
464
- z === "consent" && /* @__PURE__ */ g("div", {
463
+ B === "consent" && /* @__PURE__ */ g("div", {
465
464
  className: "px-6 py-4",
466
465
  children: [
467
466
  $ && /* @__PURE__ */ g("div", {
468
467
  className: "mb-4 flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2",
469
- children: [/* @__PURE__ */ h(s, { className: "size-4 shrink-0 text-text-muted" }), /* @__PURE__ */ g("span", {
468
+ children: [/* @__PURE__ */ h(c, { className: "size-4 shrink-0 text-text-muted" }), /* @__PURE__ */ g("span", {
470
469
  className: "text-sm text-text-secondary",
471
470
  children: [
472
- "Installing into",
471
+ L("installApp.installingInto", "Installing into"),
473
472
  " ",
474
473
  /* @__PURE__ */ h("span", {
475
474
  className: "font-medium text-text-primary",
@@ -480,21 +479,17 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
480
479
  }),
481
480
  /* @__PURE__ */ g("div", {
482
481
  className: "mb-4 flex items-center gap-2",
483
- children: [/* @__PURE__ */ h(f, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ h("p", {
482
+ children: [/* @__PURE__ */ h(ee, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ h("p", {
484
483
  className: "text-sm font-semibold text-text-primary",
485
- children: "Permissions requested"
484
+ children: L("installApp.permissionsRequested", "Permissions requested")
486
485
  })]
487
486
  }),
488
- /* @__PURE__ */ g("p", {
487
+ /* @__PURE__ */ h("p", {
489
488
  className: "mb-4 text-sm text-text-secondary",
490
- children: [
491
- "By clicking ",
492
- /* @__PURE__ */ h("strong", { children: "Accept & Install" }),
493
- ", you grant",
494
- " ",
495
- /* @__PURE__ */ h("strong", { children: S.name }),
496
- " access to the following in the selected workspace:"
497
- ]
489
+ children: L("installApp.consentDescription", "By clicking {{button}}, you grant {{appName}} access to the following in the selected workspace:", {
490
+ button: L("installApp.acceptAndInstall", "Accept & Install"),
491
+ appName: S.name
492
+ })
498
493
  }),
499
494
  /* @__PURE__ */ h("div", {
500
495
  className: "rounded-lg border border-border-seam bg-bg-surface px-4 py-3",
@@ -502,69 +497,69 @@ var F = ({ isOpen: t, onClose: i, app: S, orderId: E, purchaseState: k = "free",
502
497
  className: "space-y-2",
503
498
  children: S.permissions.map((e) => /* @__PURE__ */ g("li", {
504
499
  className: "flex items-center gap-2.5 text-sm text-text-primary",
505
- children: [/* @__PURE__ */ h(c, { className: "size-4 shrink-0 text-status-success-text" }), e]
500
+ children: [/* @__PURE__ */ h(l, { className: "size-4 shrink-0 text-status-success-text" }), e]
506
501
  }, e))
507
502
  }) : /* @__PURE__ */ g("ul", {
508
503
  className: "space-y-2",
509
504
  children: [
510
505
  /* @__PURE__ */ g("li", {
511
506
  className: "flex items-center gap-2.5 text-sm text-text-primary",
512
- children: [/* @__PURE__ */ h(c, { className: "size-4 shrink-0 text-status-success-text" }), "Read and write data within this workspace on your behalf"]
507
+ children: [/* @__PURE__ */ h(l, { className: "size-4 shrink-0 text-status-success-text" }), L("installApp.permissionReadWrite", "Read and write data within this workspace on your behalf")]
513
508
  }),
514
509
  /* @__PURE__ */ g("li", {
515
510
  className: "flex items-center gap-2.5 text-sm text-text-primary",
516
- children: [/* @__PURE__ */ h(c, { className: "size-4 shrink-0 text-status-success-text" }), "Receive webhook events for workspace activity"]
511
+ children: [/* @__PURE__ */ h(l, { className: "size-4 shrink-0 text-status-success-text" }), L("installApp.permissionWebhooks", "Receive webhook events for workspace activity")]
517
512
  }),
518
513
  /* @__PURE__ */ g("li", {
519
514
  className: "flex items-center gap-2.5 text-sm text-text-primary",
520
- children: [/* @__PURE__ */ h(c, { className: "size-4 shrink-0 text-status-success-text" }), "Act as an authorized integration within this workspace"]
515
+ children: [/* @__PURE__ */ h(l, { className: "size-4 shrink-0 text-status-success-text" }), L("installApp.permissionAuthorized", "Act as an authorized integration within this workspace")]
521
516
  })
522
517
  ]
523
518
  })
524
519
  }),
525
520
  /* @__PURE__ */ h("p", {
526
521
  className: "mt-3 text-xs text-text-muted",
527
- children: "You can revoke access at any time from your Installed Apps settings."
522
+ children: L("installApp.revokeHint", "You can revoke access at any time from your Installed Apps settings.")
528
523
  })
529
524
  ]
530
525
  }),
531
- /* @__PURE__ */ g(b, {
526
+ /* @__PURE__ */ g(y, {
532
527
  className: "block border-t border-border-default px-6 py-4 sm:flex-col sm:items-stretch sm:space-x-0",
533
528
  children: [
534
- W && /* @__PURE__ */ g("div", {
529
+ G && /* @__PURE__ */ g("div", {
535
530
  className: "mb-3 flex items-center gap-2 rounded-lg bg-status-info-bg-subtle px-3 py-2 text-sm text-status-info-text",
536
- children: [/* @__PURE__ */ h(u, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ h("span", { children: W })]
531
+ children: [/* @__PURE__ */ h(d, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ h("span", { children: G })]
537
532
  }),
538
- U && /* @__PURE__ */ g("div", {
533
+ W && /* @__PURE__ */ g("div", {
539
534
  className: "mb-3 flex items-center gap-2 rounded-lg bg-status-error-bg-subtle/10 px-3 py-2 text-sm text-status-error-text",
540
- children: [/* @__PURE__ */ h(a, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ h("span", { children: U })]
535
+ children: [/* @__PURE__ */ h(o, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ h("span", { children: W })]
541
536
  }),
542
537
  /* @__PURE__ */ h("div", {
543
538
  className: "flex items-center justify-end gap-3",
544
- children: z === "consent" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("button", {
539
+ children: B === "consent" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("button", {
545
540
  type: "button",
546
- onClick: () => R({ type: "backToWorkspace" }),
547
- disabled: H,
541
+ onClick: () => z({ type: "backToWorkspace" }),
542
+ disabled: U,
548
543
  className: "cursor-pointer inline-flex items-center gap-1.5 rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
549
- children: [/* @__PURE__ */ h(o, { className: "size-4" }), "Back"]
544
+ children: [/* @__PURE__ */ h(s, { className: "size-4" }), L("common.back", "Back")]
550
545
  }), /* @__PURE__ */ h("button", {
551
546
  type: "button",
552
547
  onClick: () => void Q(),
553
- disabled: H,
548
+ disabled: U,
554
549
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2",
555
- children: H ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(d, { className: "size-4 animate-spin" }), "Installing…"] }) : "Accept & Install"
550
+ children: U ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(f, { className: "size-4 animate-spin" }), L("installApp.installing", "Installing…")] }) : L("installApp.acceptAndInstall", "Accept & Install")
556
551
  })] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
557
552
  type: "button",
558
- onClick: i,
559
- disabled: H,
553
+ onClick: a,
554
+ disabled: U,
560
555
  className: "cursor-pointer rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
561
- children: "Cancel"
556
+ children: L("common.cancel", "Cancel")
562
557
  }), /* @__PURE__ */ h("button", {
563
558
  type: "button",
564
- onClick: ce,
565
- disabled: !B || H,
559
+ onClick: ue,
560
+ disabled: !V || U,
566
561
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2",
567
- children: H ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(d, { className: "size-4 animate-spin" }), "Installing…"] }) : K ? /* @__PURE__ */ g(m, { children: ["Continue", /* @__PURE__ */ h(l, { className: "size-4" })] }) : "Install App"
562
+ children: U ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(f, { className: "size-4 animate-spin" }), L("installApp.installing", "Installing…")] }) : q ? /* @__PURE__ */ g(m, { children: [L("common.continue", "Continue"), /* @__PURE__ */ h(u, { className: "size-4" })] }) : L("installApp.installApp", "Install App")
568
563
  })] })
569
564
  })
570
565
  ]