@leverege/imaginarium-ui 1.4.0 → 1.5.0
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/lib/{PluginSetup-Bi8huSsp.js → PluginSetup-DK7SSyOS.js} +809 -796
- package/lib/PluginSetup-DK7SSyOS.js.map +1 -0
- package/lib/PluginSetup-XhNP-74n.cjs +116 -0
- package/lib/PluginSetup-XhNP-74n.cjs.map +1 -0
- package/lib/imp/release/ReleaseView.d.ts.map +1 -1
- package/lib/imp/release/TranslationsTab.d.ts.map +1 -1
- package/lib/imp/release/sortConfigsByEnvironment.d.ts +12 -0
- package/lib/imp/release/sortConfigsByEnvironment.d.ts.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/release.cjs +1 -1
- package/lib/release.js +1 -1
- package/package.json +1 -1
- package/src/imp/release/ReleaseView.tsx +6 -2
- package/src/imp/release/StatusMatrix.tsx +3 -3
- package/src/imp/release/TranslationsTab.tsx +6 -9
- package/src/imp/release/sortConfigsByEnvironment.ts +28 -0
- package/lib/PluginSetup-BJlPsEwp.cjs +0 -116
- package/lib/PluginSetup-BJlPsEwp.cjs.map +0 -1
- package/lib/PluginSetup-Bi8huSsp.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { M as
|
|
1
|
+
import { P as Pt, N as Et } from "./PluginTypes-mZ4TjxPV.js";
|
|
2
|
+
import { M as Kt, u as ye, P as $t } from "./MarkdownPageDoc-DR1FmNpF.js";
|
|
3
3
|
import { jsx as e, jsxs as n, Fragment as Me } from "react/jsx-runtime";
|
|
4
|
-
import { useState as
|
|
5
|
-
import { u as
|
|
6
|
-
import { useQueryClient as
|
|
7
|
-
import { X as be, Loader2 as
|
|
4
|
+
import { useState as A, useMemo as B, useEffect as je, Fragment as ut } from "react";
|
|
5
|
+
import { u as le, a as ne, B as $, C as Se, f as Pe, c as ce } from "./Card-D2LdIJwJ.js";
|
|
6
|
+
import { useQueryClient as oe, useMutation as U, useQuery as re } from "@tanstack/react-query";
|
|
7
|
+
import { X as be, Loader2 as mt, Save as ht, Plus as De, Ban as Fe, RotateCcw as It, AlertTriangle as fe, Check as pt, ChevronDown as ge, ChevronRight as xe, Send as Ot, Circle as Rt, ArrowLeft as We, RefreshCw as ft, BarChart2 as At, Pencil as Mt, Trash2 as gt, Bot as Dt } from "lucide-react";
|
|
8
8
|
import { Config as ze } from "@leverege/plugin";
|
|
9
|
-
import { D as
|
|
10
|
-
import { b as
|
|
11
|
-
const
|
|
9
|
+
import { D as Ke, a as $e, b as Ie, c as Oe, d as Re, L as ie, I as he, e as Ae } from "./Label-v0wUXs4O.js";
|
|
10
|
+
import { b as Ft, T as qt, c as jt, a as zt } from "./Tooltip-CIwKmgzA.js";
|
|
11
|
+
const Bt = Kt.create({
|
|
12
12
|
path: "/imp",
|
|
13
13
|
markdown: `# imp
|
|
14
14
|
|
|
@@ -123,138 +123,138 @@ Lists all permanently-ignored items for the selected origin cluster. Removing a
|
|
|
123
123
|
After removing an ignore, refreshing an existing release draft will bring the item back.
|
|
124
124
|
`
|
|
125
125
|
});
|
|
126
|
-
function
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
() => u.filter((
|
|
126
|
+
function Jt({ open: t, onOpenChange: s, onCreated: a }) {
|
|
127
|
+
const i = ze.get("Release", "apiPath", "/releases"), { toast: l } = le(), { fetchJson: c } = ne(), o = oe(), { configs: u } = ye(), [p, w] = A(""), [v, d] = A(""), [h, E] = A(""), [z, j] = A([]), H = ["imaginarium", "releases", i], _ = () => {
|
|
128
|
+
w(""), d(""), E(""), j([]);
|
|
129
|
+
}, J = B(
|
|
130
|
+
() => u.filter((g) => g.id !== h),
|
|
131
131
|
[u, h]
|
|
132
|
-
), D = (
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
(
|
|
132
|
+
), D = (g) => {
|
|
133
|
+
E(g), j((R) => R.filter((Q) => Q !== g));
|
|
134
|
+
}, L = (g) => {
|
|
135
|
+
j(
|
|
136
|
+
(R) => R.includes(g) ? R.filter((Q) => Q !== g) : [...R, g]
|
|
137
137
|
);
|
|
138
|
-
},
|
|
138
|
+
}, x = U({
|
|
139
139
|
mutationFn: async () => {
|
|
140
|
-
const
|
|
140
|
+
const g = await c(i, {
|
|
141
141
|
method: "POST",
|
|
142
142
|
body: JSON.stringify({
|
|
143
143
|
name: p.trim(),
|
|
144
|
-
description:
|
|
144
|
+
description: v.trim() || null,
|
|
145
145
|
originConfigId: h,
|
|
146
|
-
targetConfigIds:
|
|
146
|
+
targetConfigIds: z
|
|
147
147
|
})
|
|
148
148
|
});
|
|
149
|
-
return await c(`${
|
|
149
|
+
return await c(`${i}/${g.id}/snapshot-from-compare`, {
|
|
150
150
|
method: "POST",
|
|
151
151
|
body: JSON.stringify({})
|
|
152
|
-
}),
|
|
152
|
+
}), g;
|
|
153
153
|
},
|
|
154
|
-
onSuccess: (
|
|
155
|
-
|
|
154
|
+
onSuccess: (g) => {
|
|
155
|
+
o.invalidateQueries({ queryKey: H }), l({ title: "Success", description: "Release created and snapshotted" }), s(!1), _(), a(g.id);
|
|
156
156
|
},
|
|
157
|
-
onError: (
|
|
158
|
-
|
|
157
|
+
onError: (g) => {
|
|
158
|
+
l({ title: "Error", description: g.message, variant: "destructive" });
|
|
159
159
|
},
|
|
160
160
|
// Refetch regardless of outcome: if create succeeds but snapshot fails, the
|
|
161
161
|
// new release would otherwise be orphaned and missing from the list.
|
|
162
162
|
onSettled: () => {
|
|
163
|
-
|
|
163
|
+
o.invalidateQueries({ queryKey: H });
|
|
164
164
|
}
|
|
165
|
-
}),
|
|
166
|
-
|
|
167
|
-
}, C = !!(p.trim() && h &&
|
|
168
|
-
return /* @__PURE__ */ e(
|
|
169
|
-
/* @__PURE__ */ n(
|
|
165
|
+
}), k = (g) => {
|
|
166
|
+
g || _(), s(g);
|
|
167
|
+
}, C = !!(p.trim() && h && z.length > 0);
|
|
168
|
+
return /* @__PURE__ */ e(Ke, { open: t, onOpenChange: k, children: /* @__PURE__ */ n($e, { children: [
|
|
169
|
+
/* @__PURE__ */ n(Ie, { children: [
|
|
170
170
|
/* @__PURE__ */ e(Oe, { children: "New Release" }),
|
|
171
|
-
/* @__PURE__ */ e(
|
|
171
|
+
/* @__PURE__ */ e(Re, { children: "Create a release from an origin cluster and snapshot the diff against its targets." })
|
|
172
172
|
] }),
|
|
173
173
|
/* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
|
|
174
174
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
175
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ e(ie, { htmlFor: "release-name", children: "Name" }),
|
|
176
176
|
/* @__PURE__ */ e(
|
|
177
177
|
he,
|
|
178
178
|
{
|
|
179
179
|
id: "release-name",
|
|
180
180
|
value: p,
|
|
181
|
-
onChange: (
|
|
181
|
+
onChange: (g) => w(g.target.value),
|
|
182
182
|
placeholder: "2026.05 Release"
|
|
183
183
|
}
|
|
184
184
|
)
|
|
185
185
|
] }),
|
|
186
186
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
187
|
-
/* @__PURE__ */ e(
|
|
187
|
+
/* @__PURE__ */ e(ie, { htmlFor: "release-description", children: "Description (Optional)" }),
|
|
188
188
|
/* @__PURE__ */ e(
|
|
189
189
|
he,
|
|
190
190
|
{
|
|
191
191
|
id: "release-description",
|
|
192
|
-
value:
|
|
193
|
-
onChange: (
|
|
192
|
+
value: v,
|
|
193
|
+
onChange: (g) => d(g.target.value),
|
|
194
194
|
placeholder: "What this release contains"
|
|
195
195
|
}
|
|
196
196
|
)
|
|
197
197
|
] }),
|
|
198
198
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
199
|
-
/* @__PURE__ */ e(
|
|
199
|
+
/* @__PURE__ */ e(ie, { htmlFor: "release-origin", children: "Origin Cluster" }),
|
|
200
200
|
/* @__PURE__ */ n(
|
|
201
201
|
"select",
|
|
202
202
|
{
|
|
203
203
|
id: "release-origin",
|
|
204
204
|
value: h,
|
|
205
|
-
onChange: (
|
|
205
|
+
onChange: (g) => D(g.target.value),
|
|
206
206
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
207
207
|
children: [
|
|
208
208
|
/* @__PURE__ */ e("option", { value: "", children: "Select origin…" }),
|
|
209
|
-
u.map((
|
|
209
|
+
u.map((g) => /* @__PURE__ */ e("option", { value: g.id, children: g.displayName }, g.id))
|
|
210
210
|
]
|
|
211
211
|
}
|
|
212
212
|
)
|
|
213
213
|
] }),
|
|
214
214
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
215
|
-
/* @__PURE__ */ e(
|
|
216
|
-
|
|
215
|
+
/* @__PURE__ */ e(ie, { children: "Target Clusters" }),
|
|
216
|
+
J.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-1 rounded-md border border-input p-2 max-h-48 overflow-y-auto", children: J.map((g) => /* @__PURE__ */ n("label", { className: "flex items-center gap-2 text-sm cursor-pointer", children: [
|
|
217
217
|
/* @__PURE__ */ e(
|
|
218
218
|
"input",
|
|
219
219
|
{
|
|
220
220
|
type: "checkbox",
|
|
221
|
-
checked:
|
|
222
|
-
onChange: () =>
|
|
221
|
+
checked: z.includes(g.id),
|
|
222
|
+
onChange: () => L(g.id)
|
|
223
223
|
}
|
|
224
224
|
),
|
|
225
|
-
|
|
226
|
-
] },
|
|
225
|
+
g.displayName
|
|
226
|
+
] }, g.id)) }) : /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: h ? "No other clusters available as targets." : "Select an origin first." })
|
|
227
227
|
] })
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ n(
|
|
230
|
-
/* @__PURE__ */ n($, { variant: "outline", onClick: () =>
|
|
229
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
230
|
+
/* @__PURE__ */ n($, { variant: "outline", onClick: () => k(!1), disabled: x.isPending, children: [
|
|
231
231
|
/* @__PURE__ */ e(be, { className: "w-4 h-4 mr-2" }),
|
|
232
232
|
"Cancel"
|
|
233
233
|
] }),
|
|
234
|
-
/* @__PURE__ */ e($, { onClick: () =>
|
|
235
|
-
/* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e($, { onClick: () => x.mutate(), disabled: !C || x.isPending, children: x.isPending ? /* @__PURE__ */ n(Me, { children: [
|
|
235
|
+
/* @__PURE__ */ e(mt, { className: "w-4 h-4 mr-2 animate-spin" }),
|
|
236
236
|
"Snapshotting…"
|
|
237
237
|
] }) : /* @__PURE__ */ n(Me, { children: [
|
|
238
|
-
/* @__PURE__ */ e(
|
|
238
|
+
/* @__PURE__ */ e(ht, { className: "w-4 h-4 mr-2" }),
|
|
239
239
|
"Create & snapshot"
|
|
240
240
|
] }) })
|
|
241
241
|
] })
|
|
242
242
|
] }) });
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function xt({ status: t }) {
|
|
245
245
|
return /* @__PURE__ */ e("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium border ${t === "pushed" ? "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30" : "bg-muted text-muted-foreground border-border"}`, children: t });
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const s = ze.get("Release", "apiPath", "/releases"), { fetchJson: a } =
|
|
249
|
-
queryKey:
|
|
247
|
+
function Lt({ onOpen: t }) {
|
|
248
|
+
const s = ze.get("Release", "apiPath", "/releases"), { fetchJson: a } = ne(), { configs: i } = ye(), [l, c] = A(!1), o = ["imaginarium", "releases", s], { data: u, isLoading: p } = re({
|
|
249
|
+
queryKey: o,
|
|
250
250
|
queryFn: async () => {
|
|
251
|
-
const
|
|
252
|
-
return [...Array.isArray(
|
|
251
|
+
const d = await a(s);
|
|
252
|
+
return [...Array.isArray(d) ? d : (d == null ? void 0 : d.items) ?? []].sort((E, z) => (z.createdAt ?? "").localeCompare(E.createdAt ?? ""));
|
|
253
253
|
}
|
|
254
|
-
}),
|
|
255
|
-
const
|
|
256
|
-
return
|
|
257
|
-
}, [
|
|
254
|
+
}), w = B(() => {
|
|
255
|
+
const d = /* @__PURE__ */ new Map();
|
|
256
|
+
return i.forEach((h) => d.set(String(h.id), h.displayName)), d;
|
|
257
|
+
}, [i]), v = (d) => w.get(d) ?? d;
|
|
258
258
|
return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
259
259
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ n($, { onClick: () => c(!0), children: [
|
|
260
260
|
/* @__PURE__ */ e(De, { className: "w-4 h-4 mr-2" }),
|
|
@@ -270,42 +270,42 @@ function Jt({ onOpen: t }) {
|
|
|
270
270
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Pushed" }),
|
|
271
271
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium" })
|
|
272
272
|
] }) }),
|
|
273
|
-
/* @__PURE__ */ e("tbody", { children: u.map((
|
|
273
|
+
/* @__PURE__ */ e("tbody", { children: u.map((d) => /* @__PURE__ */ n(
|
|
274
274
|
"tr",
|
|
275
275
|
{
|
|
276
276
|
className: "border-b last:border-0 cursor-pointer hover:bg-muted/50",
|
|
277
|
-
onClick: () => t(
|
|
277
|
+
onClick: () => t(d.id),
|
|
278
278
|
children: [
|
|
279
279
|
/* @__PURE__ */ n("td", { className: "p-3", children: [
|
|
280
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
281
|
-
|
|
280
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: d.name }),
|
|
281
|
+
d.description ? /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: d.description }) : null
|
|
282
282
|
] }),
|
|
283
|
-
/* @__PURE__ */ e("td", { className: "p-3", children:
|
|
284
|
-
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: (
|
|
283
|
+
/* @__PURE__ */ e("td", { className: "p-3", children: v(d.originConfigId) }),
|
|
284
|
+
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: (d.targetConfigIds ?? []).map((h) => /* @__PURE__ */ e(
|
|
285
285
|
"span",
|
|
286
286
|
{
|
|
287
287
|
className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs",
|
|
288
|
-
children:
|
|
288
|
+
children: v(h)
|
|
289
289
|
},
|
|
290
290
|
h
|
|
291
291
|
)) }) }),
|
|
292
|
-
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(
|
|
293
|
-
/* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children:
|
|
294
|
-
/* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children:
|
|
292
|
+
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(xt, { status: d.status }) }),
|
|
293
|
+
/* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: d.snapshotAt ? new Date(d.snapshotAt).toLocaleString() : "—" }),
|
|
294
|
+
/* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: d.pushedAt ? new Date(d.pushedAt).toLocaleString() : "—" }),
|
|
295
295
|
/* @__PURE__ */ e("td", { className: "p-3 text-right", children: /* @__PURE__ */ e(
|
|
296
296
|
$,
|
|
297
297
|
{
|
|
298
298
|
variant: "ghost",
|
|
299
299
|
size: "sm",
|
|
300
300
|
onClick: (h) => {
|
|
301
|
-
h.stopPropagation(), t(
|
|
301
|
+
h.stopPropagation(), t(d.id);
|
|
302
302
|
},
|
|
303
303
|
children: "Open →"
|
|
304
304
|
}
|
|
305
305
|
) })
|
|
306
306
|
]
|
|
307
307
|
},
|
|
308
|
-
|
|
308
|
+
d.id
|
|
309
309
|
)) })
|
|
310
310
|
] }) }) }) : /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ n(Pe, { className: "py-12 text-center", children: [
|
|
311
311
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-4", children: "No releases yet" }),
|
|
@@ -315,9 +315,9 @@ function Jt({ onOpen: t }) {
|
|
|
315
315
|
] })
|
|
316
316
|
] }) }),
|
|
317
317
|
/* @__PURE__ */ e(
|
|
318
|
-
|
|
318
|
+
Jt,
|
|
319
319
|
{
|
|
320
|
-
open:
|
|
320
|
+
open: l,
|
|
321
321
|
onOpenChange: c,
|
|
322
322
|
onCreated: t
|
|
323
323
|
}
|
|
@@ -329,8 +329,8 @@ function Qt({
|
|
|
329
329
|
className: s
|
|
330
330
|
}) {
|
|
331
331
|
const a = t ? `Skipped in your last release from ${t}.` : "Skipped in your last release.";
|
|
332
|
-
return /* @__PURE__ */ e(
|
|
333
|
-
/* @__PURE__ */ e(
|
|
332
|
+
return /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ n(qt, { children: [
|
|
333
|
+
/* @__PURE__ */ e(jt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
334
334
|
"span",
|
|
335
335
|
{
|
|
336
336
|
className: ce(
|
|
@@ -341,10 +341,10 @@ function Qt({
|
|
|
341
341
|
children: "previously skipped"
|
|
342
342
|
}
|
|
343
343
|
) }),
|
|
344
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(zt, { side: "top", children: a })
|
|
345
345
|
] }) });
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Vt({ className: t }) {
|
|
348
348
|
return /* @__PURE__ */ e(
|
|
349
349
|
"span",
|
|
350
350
|
{
|
|
@@ -357,63 +357,63 @@ function Lt({ className: t }) {
|
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ut({
|
|
361
361
|
ignoreRule: t,
|
|
362
362
|
createPayload: s,
|
|
363
363
|
apiPath: a = "/release-ignores",
|
|
364
|
-
onChange:
|
|
365
|
-
className:
|
|
364
|
+
onChange: i,
|
|
365
|
+
className: l
|
|
366
366
|
}) {
|
|
367
|
-
const { toast: c } =
|
|
368
|
-
u.invalidateQueries({ queryKey: ["imaginarium", "release-ignores"] }),
|
|
367
|
+
const { toast: c } = le(), { fetchJson: o } = ne(), u = oe(), [p, w] = A(!1), v = !!t, d = () => {
|
|
368
|
+
u.invalidateQueries({ queryKey: ["imaginarium", "release-ignores"] }), i == null || i();
|
|
369
369
|
}, h = U({
|
|
370
|
-
mutationFn: () =>
|
|
370
|
+
mutationFn: () => o(a, {
|
|
371
371
|
method: "POST",
|
|
372
372
|
body: JSON.stringify(s)
|
|
373
373
|
}),
|
|
374
374
|
onSuccess: () => {
|
|
375
|
-
c({ title: "Item ignored", description: "Will be excluded from all future snapshots." }),
|
|
375
|
+
c({ title: "Item ignored", description: "Will be excluded from all future snapshots." }), w(!1), d();
|
|
376
376
|
},
|
|
377
|
-
onError: (
|
|
378
|
-
c({ title: "Error", description:
|
|
377
|
+
onError: (j) => {
|
|
378
|
+
c({ title: "Error", description: j.message, variant: "destructive" });
|
|
379
379
|
}
|
|
380
|
-
}),
|
|
381
|
-
mutationFn: () =>
|
|
380
|
+
}), E = U({
|
|
381
|
+
mutationFn: () => o(`${a}/${t.id}`, { method: "DELETE" }),
|
|
382
382
|
onSuccess: () => {
|
|
383
|
-
c({ title: "Item un-ignored", description: "Will appear normally in future snapshots." }),
|
|
383
|
+
c({ title: "Item un-ignored", description: "Will appear normally in future snapshots." }), d();
|
|
384
384
|
},
|
|
385
|
-
onError: (
|
|
386
|
-
c({ title: "Error", description:
|
|
385
|
+
onError: (j) => {
|
|
386
|
+
c({ title: "Error", description: j.message, variant: "destructive" });
|
|
387
387
|
}
|
|
388
|
-
}),
|
|
388
|
+
}), z = h.isPending || E.isPending;
|
|
389
389
|
return /* @__PURE__ */ n(Me, { children: [
|
|
390
390
|
/* @__PURE__ */ e(
|
|
391
391
|
$,
|
|
392
392
|
{
|
|
393
393
|
variant: "ghost",
|
|
394
394
|
size: "icon",
|
|
395
|
-
title:
|
|
396
|
-
disabled:
|
|
397
|
-
onClick: () =>
|
|
398
|
-
className: ce(
|
|
395
|
+
title: v ? "Remove from ignore list" : "Ignore this item",
|
|
396
|
+
disabled: z,
|
|
397
|
+
onClick: () => v ? E.mutate() : w(!0),
|
|
398
|
+
className: ce(v && "text-red-500 hover:text-red-500 dark:text-red-400 dark:hover:text-red-400", l),
|
|
399
399
|
children: /* @__PURE__ */ e(Fe, {})
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
|
-
/* @__PURE__ */ e(
|
|
403
|
-
/* @__PURE__ */ n(
|
|
402
|
+
/* @__PURE__ */ e(Ke, { open: p, onOpenChange: w, children: /* @__PURE__ */ n($e, { children: [
|
|
403
|
+
/* @__PURE__ */ n(Ie, { children: [
|
|
404
404
|
/* @__PURE__ */ e(Oe, { children: "Ignore this item?" }),
|
|
405
|
-
/* @__PURE__ */ n(
|
|
405
|
+
/* @__PURE__ */ n(Re, { children: [
|
|
406
406
|
"Ignoring excludes this item from ",
|
|
407
407
|
/* @__PURE__ */ e("strong", { children: "this and all future releases" }),
|
|
408
408
|
" for this origin cluster — it will never be pushed to any destination. You can un-ignore it later from the Ignored tab."
|
|
409
409
|
] })
|
|
410
410
|
] }),
|
|
411
|
-
/* @__PURE__ */ n(
|
|
411
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
412
412
|
/* @__PURE__ */ e(
|
|
413
413
|
$,
|
|
414
414
|
{
|
|
415
415
|
variant: "outline",
|
|
416
|
-
onClick: () =>
|
|
416
|
+
onClick: () => w(!1),
|
|
417
417
|
disabled: h.isPending,
|
|
418
418
|
children: "Cancel"
|
|
419
419
|
}
|
|
@@ -434,23 +434,23 @@ function Vt({
|
|
|
434
434
|
] }) })
|
|
435
435
|
] });
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Ht({
|
|
438
438
|
releaseId: t,
|
|
439
439
|
apiPath: s = "/releases",
|
|
440
440
|
onReset: a
|
|
441
441
|
}) {
|
|
442
|
-
const { toast:
|
|
443
|
-
mutationFn: () =>
|
|
442
|
+
const { toast: i } = le(), { fetchJson: l } = ne(), c = oe(), o = U({
|
|
443
|
+
mutationFn: () => l(`${s}/${t}/reset-exclusions`, {
|
|
444
444
|
method: "POST"
|
|
445
445
|
}),
|
|
446
446
|
onSuccess: (u) => {
|
|
447
|
-
c.invalidateQueries({ queryKey: ["imaginarium", "release-items", t] }),
|
|
447
|
+
c.invalidateQueries({ queryKey: ["imaginarium", "release-items", t] }), i({
|
|
448
448
|
title: "Exclusions reset",
|
|
449
449
|
description: `${u.reset} item${u.reset === 1 ? "" : "s"} re-enabled.`
|
|
450
450
|
}), a == null || a(u.reset);
|
|
451
451
|
},
|
|
452
452
|
onError: (u) => {
|
|
453
|
-
|
|
453
|
+
i({ title: "Error", description: u.message, variant: "destructive" });
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
return /* @__PURE__ */ n(
|
|
@@ -458,11 +458,11 @@ function Ut({
|
|
|
458
458
|
{
|
|
459
459
|
variant: "outline",
|
|
460
460
|
size: "sm",
|
|
461
|
-
onClick: () =>
|
|
462
|
-
disabled:
|
|
461
|
+
onClick: () => o.mutate(),
|
|
462
|
+
disabled: o.isPending,
|
|
463
463
|
children: [
|
|
464
|
-
/* @__PURE__ */ e(
|
|
465
|
-
|
|
464
|
+
/* @__PURE__ */ e(It, {}),
|
|
465
|
+
o.isPending ? "Resetting…" : "Reset exclusions"
|
|
466
466
|
]
|
|
467
467
|
}
|
|
468
468
|
);
|
|
@@ -471,15 +471,15 @@ function Ee({ label: t, value: s, highlightLines: a }) {
|
|
|
471
471
|
return /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
472
472
|
/* @__PURE__ */ e("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: t }),
|
|
473
473
|
/* @__PURE__ */ e("pre", { className: "flex-1 overflow-auto rounded border bg-muted/30 p-3 text-xs", children: a === void 0 ? s === void 0 ? "null" : JSON.stringify(s, null, 2) : (s === void 0 ? "null" : JSON.stringify(s, null, 2)).split(`
|
|
474
|
-
`).map((
|
|
474
|
+
`).map((i, l) => (
|
|
475
475
|
// eslint-disable-next-line react/no-array-index-key
|
|
476
476
|
/* @__PURE__ */ e(
|
|
477
477
|
"div",
|
|
478
478
|
{
|
|
479
|
-
className: a[
|
|
480
|
-
children:
|
|
479
|
+
className: a[l] ? "bg-yellow-200/70 text-yellow-950 dark:bg-yellow-400/20 dark:text-yellow-100" : void 0,
|
|
480
|
+
children: i === "" ? " " : i
|
|
481
481
|
},
|
|
482
|
-
|
|
482
|
+
l
|
|
483
483
|
)
|
|
484
484
|
)) })
|
|
485
485
|
] });
|
|
@@ -487,32 +487,32 @@ function Ee({ label: t, value: s, highlightLines: a }) {
|
|
|
487
487
|
function Ge(t) {
|
|
488
488
|
return t === void 0 ? "null" : JSON.stringify(t, null, 2);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
let
|
|
490
|
+
function yt(t, s, a) {
|
|
491
|
+
let i = Ge(t);
|
|
492
492
|
if (a && a.length > 0)
|
|
493
|
-
for (const { replace: h, with:
|
|
494
|
-
h && (
|
|
495
|
-
const
|
|
493
|
+
for (const { replace: h, with: E } of a)
|
|
494
|
+
h && (i = i.split(h).join(E));
|
|
495
|
+
const l = i.split(`
|
|
496
496
|
`), c = Ge(s).split(`
|
|
497
|
-
`),
|
|
498
|
-
for (let h =
|
|
499
|
-
for (let
|
|
500
|
-
p[h][
|
|
501
|
-
const
|
|
502
|
-
let
|
|
503
|
-
for (;
|
|
504
|
-
|
|
505
|
-
return
|
|
497
|
+
`), o = l.length, u = c.length, p = Array.from({ length: o + 1 }, () => new Array(u + 1).fill(0));
|
|
498
|
+
for (let h = o - 1; h >= 0; h -= 1)
|
|
499
|
+
for (let E = u - 1; E >= 0; E -= 1)
|
|
500
|
+
p[h][E] = l[h] === c[E] ? p[h + 1][E + 1] + 1 : Math.max(p[h + 1][E], p[h][E + 1]);
|
|
501
|
+
const w = new Array(o).fill(!0);
|
|
502
|
+
let v = 0, d = 0;
|
|
503
|
+
for (; v < o && d < u; )
|
|
504
|
+
l[v] === c[d] ? (w[v] = !1, v += 1, d += 1) : p[v + 1][d] >= p[v][d + 1] ? v += 1 : d += 1;
|
|
505
|
+
return w;
|
|
506
506
|
}
|
|
507
507
|
function Ce({
|
|
508
508
|
title: t,
|
|
509
509
|
values: s,
|
|
510
510
|
excluded: a,
|
|
511
|
-
editable:
|
|
512
|
-
onToggle:
|
|
511
|
+
editable: i,
|
|
512
|
+
onToggle: l,
|
|
513
513
|
formatLabel: c
|
|
514
514
|
}) {
|
|
515
|
-
const [
|
|
515
|
+
const [o, u] = A(a.length > 0);
|
|
516
516
|
return je(() => {
|
|
517
517
|
a.length > 0 && u(!0);
|
|
518
518
|
}, [a.length]), /* @__PURE__ */ n("div", { className: "border-b p-2", children: [
|
|
@@ -522,21 +522,21 @@ function Ce({
|
|
|
522
522
|
type: "button",
|
|
523
523
|
className: "flex w-full items-center justify-between gap-2",
|
|
524
524
|
onClick: () => u((p) => !p),
|
|
525
|
-
"aria-expanded":
|
|
525
|
+
"aria-expanded": o,
|
|
526
526
|
children: [
|
|
527
527
|
/* @__PURE__ */ n("span", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
|
|
528
|
-
|
|
528
|
+
o ? /* @__PURE__ */ e(ge, { size: 12 }) : /* @__PURE__ */ e(xe, { size: 12 }),
|
|
529
529
|
t,
|
|
530
530
|
" (",
|
|
531
531
|
a.length,
|
|
532
532
|
")"
|
|
533
533
|
] }),
|
|
534
|
-
|
|
534
|
+
i ? null : /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground", children: "read-only" })
|
|
535
535
|
]
|
|
536
536
|
}
|
|
537
537
|
),
|
|
538
|
-
|
|
539
|
-
const
|
|
538
|
+
o ? /* @__PURE__ */ e("div", { className: "mt-1 flex flex-col gap-1", children: s.map((p) => {
|
|
539
|
+
const w = !a.includes(p);
|
|
540
540
|
return /* @__PURE__ */ n(
|
|
541
541
|
"label",
|
|
542
542
|
{
|
|
@@ -547,12 +547,12 @@ function Ce({
|
|
|
547
547
|
{
|
|
548
548
|
type: "checkbox",
|
|
549
549
|
className: "mt-0.5 shrink-0",
|
|
550
|
-
checked:
|
|
551
|
-
disabled: !
|
|
552
|
-
onChange: (
|
|
550
|
+
checked: w,
|
|
551
|
+
disabled: !i,
|
|
552
|
+
onChange: (v) => l == null ? void 0 : l(p, v.target.checked)
|
|
553
553
|
}
|
|
554
554
|
),
|
|
555
|
-
/* @__PURE__ */ e("span", { className: `min-w-0 break-all font-mono ${
|
|
555
|
+
/* @__PURE__ */ e("span", { className: `min-w-0 break-all font-mono ${w ? "" : "text-muted-foreground line-through"}`, children: c ? c(p) : p })
|
|
556
556
|
]
|
|
557
557
|
},
|
|
558
558
|
p
|
|
@@ -560,39 +560,39 @@ function Ce({
|
|
|
560
560
|
}) }) : null
|
|
561
561
|
] });
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function _t({
|
|
564
564
|
item: t,
|
|
565
565
|
targets: s,
|
|
566
566
|
onClose: a,
|
|
567
|
-
unmetDependencyNames:
|
|
568
|
-
tags:
|
|
567
|
+
unmetDependencyNames: i = [],
|
|
568
|
+
tags: l = [],
|
|
569
569
|
excludedTags: c = [],
|
|
570
|
-
editable:
|
|
570
|
+
editable: o = !0,
|
|
571
571
|
onToggleTag: u,
|
|
572
572
|
metadataKeys: p = [],
|
|
573
|
-
excludedMetadataKeys:
|
|
574
|
-
onToggleMetadataKey:
|
|
575
|
-
i18nPaths:
|
|
573
|
+
excludedMetadataKeys: w = [],
|
|
574
|
+
onToggleMetadataKey: v,
|
|
575
|
+
i18nPaths: d = [],
|
|
576
576
|
excludedI18nPaths: h = [],
|
|
577
|
-
onToggleI18nPath:
|
|
578
|
-
permissionKeys:
|
|
579
|
-
excludedPermissions:
|
|
580
|
-
onTogglePermission:
|
|
581
|
-
formatPermissionLabel:
|
|
582
|
-
replacementMaps:
|
|
577
|
+
onToggleI18nPath: E,
|
|
578
|
+
permissionKeys: z = [],
|
|
579
|
+
excludedPermissions: j = [],
|
|
580
|
+
onTogglePermission: H,
|
|
581
|
+
formatPermissionLabel: _,
|
|
582
|
+
replacementMaps: J
|
|
583
583
|
}) {
|
|
584
|
-
var
|
|
585
|
-
const D = ((
|
|
584
|
+
var G, f, q, F;
|
|
585
|
+
const D = ((G = s[0]) == null ? void 0 : G.id) ?? null, [L, x] = A(D);
|
|
586
586
|
je(() => {
|
|
587
587
|
var I;
|
|
588
|
-
|
|
588
|
+
x(((I = s[0]) == null ? void 0 : I.id) ?? null);
|
|
589
589
|
}, [t == null ? void 0 : t.id]);
|
|
590
|
-
const
|
|
590
|
+
const k = s.find((I) => I.id === L) ?? s[0] ?? null, C = (f = t == null ? void 0 : t.diff) == null ? void 0 : f.byTarget, g = C != null, R = g ? C[(k == null ? void 0 : k.id) ?? ""] : (q = t == null ? void 0 : t.diff) == null ? void 0 : q.target, Q = g && k != null && !(k.id in C), X = B(
|
|
591
591
|
() => {
|
|
592
592
|
var I;
|
|
593
|
-
return
|
|
593
|
+
return Q ? void 0 : yt((I = t == null ? void 0 : t.diff) == null ? void 0 : I.origin, R, J == null ? void 0 : J[(k == null ? void 0 : k.id) ?? ""]);
|
|
594
594
|
},
|
|
595
|
-
[t,
|
|
595
|
+
[t, R, Q, J, k == null ? void 0 : k.id]
|
|
596
596
|
);
|
|
597
597
|
return t ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col rounded-md border bg-background", children: [
|
|
598
598
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-3", children: [
|
|
@@ -602,21 +602,21 @@ function Ht({
|
|
|
602
602
|
] }),
|
|
603
603
|
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", title: "Close", onClick: a, children: /* @__PURE__ */ e(be, {}) })
|
|
604
604
|
] }),
|
|
605
|
-
|
|
605
|
+
i.length > 0 ? /* @__PURE__ */ n("div", { className: "flex items-start gap-2 border-b bg-amber-50 p-2 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-300", children: [
|
|
606
606
|
/* @__PURE__ */ e(fe, { size: 14, className: "mt-0.5 shrink-0 text-amber-600 dark:text-amber-400" }),
|
|
607
607
|
/* @__PURE__ */ n("span", { children: [
|
|
608
608
|
"Depends on excluded items: ",
|
|
609
|
-
|
|
609
|
+
i.join(", "),
|
|
610
610
|
". Push will fail for this item until they're included."
|
|
611
611
|
] })
|
|
612
612
|
] }) : null,
|
|
613
|
-
|
|
613
|
+
l.length > 0 ? /* @__PURE__ */ e(
|
|
614
614
|
Ce,
|
|
615
615
|
{
|
|
616
616
|
title: "Tag Overrides",
|
|
617
|
-
values:
|
|
617
|
+
values: l,
|
|
618
618
|
excluded: c,
|
|
619
|
-
editable:
|
|
619
|
+
editable: o,
|
|
620
620
|
onToggle: u
|
|
621
621
|
}
|
|
622
622
|
) : null,
|
|
@@ -625,42 +625,42 @@ function Ht({
|
|
|
625
625
|
{
|
|
626
626
|
title: "Metadata Overrides",
|
|
627
627
|
values: p,
|
|
628
|
-
excluded:
|
|
629
|
-
editable:
|
|
630
|
-
onToggle:
|
|
628
|
+
excluded: w,
|
|
629
|
+
editable: o,
|
|
630
|
+
onToggle: v
|
|
631
631
|
}
|
|
632
632
|
) : null,
|
|
633
|
-
|
|
633
|
+
d.length > 0 ? /* @__PURE__ */ e(
|
|
634
634
|
Ce,
|
|
635
635
|
{
|
|
636
636
|
title: "Translation Overrides",
|
|
637
|
-
values:
|
|
637
|
+
values: d,
|
|
638
638
|
excluded: h,
|
|
639
|
-
editable:
|
|
640
|
-
onToggle:
|
|
639
|
+
editable: o,
|
|
640
|
+
onToggle: E
|
|
641
641
|
}
|
|
642
642
|
) : null,
|
|
643
|
-
|
|
643
|
+
z.length > 0 ? /* @__PURE__ */ e(
|
|
644
644
|
Ce,
|
|
645
645
|
{
|
|
646
646
|
title: "Permission Overrides",
|
|
647
|
-
values:
|
|
648
|
-
excluded:
|
|
649
|
-
editable:
|
|
650
|
-
onToggle:
|
|
651
|
-
formatLabel:
|
|
647
|
+
values: z,
|
|
648
|
+
excluded: j,
|
|
649
|
+
editable: o,
|
|
650
|
+
onToggle: H,
|
|
651
|
+
formatLabel: _
|
|
652
652
|
}
|
|
653
653
|
) : null,
|
|
654
654
|
s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1 border-b p-2", children: s.map((I) => {
|
|
655
|
-
const
|
|
655
|
+
const V = g && !(I.id in C);
|
|
656
656
|
return /* @__PURE__ */ n(
|
|
657
657
|
"button",
|
|
658
658
|
{
|
|
659
659
|
type: "button",
|
|
660
|
-
onClick: () =>
|
|
661
|
-
className: `inline-flex items-center gap-1 rounded px-2 py-1 text-xs ${I.id === (
|
|
660
|
+
onClick: () => x(I.id),
|
|
661
|
+
className: `inline-flex items-center gap-1 rounded px-2 py-1 text-xs ${I.id === (k == null ? void 0 : k.id) ? "bg-muted font-medium" : "hover:bg-muted/50"}`,
|
|
662
662
|
children: [
|
|
663
|
-
|
|
663
|
+
V ? /* @__PURE__ */ e(pt, { size: 12, className: "text-green-600" }) : /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-red-500", "aria-hidden": !0 }),
|
|
664
664
|
I.name
|
|
665
665
|
]
|
|
666
666
|
},
|
|
@@ -668,25 +668,25 @@ function Ht({
|
|
|
668
668
|
);
|
|
669
669
|
}) }) : null,
|
|
670
670
|
/* @__PURE__ */ n("div", { className: "flex flex-1 gap-3 overflow-auto p-3", children: [
|
|
671
|
-
/* @__PURE__ */ e(Ee, { label: "Origin", value: (
|
|
672
|
-
|
|
671
|
+
/* @__PURE__ */ e(Ee, { label: "Origin", value: (F = t.diff) == null ? void 0 : F.origin, highlightLines: X }),
|
|
672
|
+
Q ? /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-center justify-center rounded border bg-muted/30 p-3 text-xs text-muted-foreground", children: [
|
|
673
673
|
"Matches ",
|
|
674
|
-
|
|
674
|
+
k == null ? void 0 : k.name,
|
|
675
675
|
" — no differences."
|
|
676
|
-
] }) : /* @__PURE__ */ e(Ee, { label: (
|
|
676
|
+
] }) : /* @__PURE__ */ e(Ee, { label: (k == null ? void 0 : k.name) ?? "Target", value: R })
|
|
677
677
|
] })
|
|
678
678
|
] }) : null;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Yt({ state: t }) {
|
|
681
681
|
switch (t.status) {
|
|
682
682
|
case "pushing":
|
|
683
683
|
return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
684
|
-
/* @__PURE__ */ e(
|
|
684
|
+
/* @__PURE__ */ e(mt, { className: "h-4 w-4 animate-spin" }),
|
|
685
685
|
"Pushing…"
|
|
686
686
|
] });
|
|
687
687
|
case "success":
|
|
688
688
|
return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-emerald-600", children: [
|
|
689
|
-
/* @__PURE__ */ e(
|
|
689
|
+
/* @__PURE__ */ e(pt, { className: "h-4 w-4" }),
|
|
690
690
|
"Success"
|
|
691
691
|
] });
|
|
692
692
|
case "partial":
|
|
@@ -710,50 +710,50 @@ function _t({ state: t }) {
|
|
|
710
710
|
);
|
|
711
711
|
default:
|
|
712
712
|
return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
713
|
-
/* @__PURE__ */ e(
|
|
713
|
+
/* @__PURE__ */ e(Rt, { className: "h-3 w-3" }),
|
|
714
714
|
"Pending"
|
|
715
715
|
] });
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Wt({
|
|
719
719
|
open: t,
|
|
720
720
|
onOpenChange: s,
|
|
721
721
|
releaseId: a,
|
|
722
|
-
targetConfigIds:
|
|
723
|
-
targetNames:
|
|
722
|
+
targetConfigIds: i,
|
|
723
|
+
targetNames: l,
|
|
724
724
|
apiPath: c = "/releases",
|
|
725
|
-
onComplete:
|
|
725
|
+
onComplete: o,
|
|
726
726
|
dependencyWarnings: u = []
|
|
727
727
|
}) {
|
|
728
|
-
const { toast: p } =
|
|
729
|
-
h(!0),
|
|
730
|
-
let
|
|
731
|
-
for (const C of
|
|
732
|
-
|
|
728
|
+
const { toast: p } = le(), { fetchJson: w } = ne(), v = oe(), [d, h] = A(!1), [E, z] = A({}), [j, H] = A(!1), _ = (x) => (l == null ? void 0 : l[x]) ?? x, J = (x, k) => z((C) => ({ ...C, [x]: k })), D = async () => {
|
|
729
|
+
h(!0), H(!1), z(Object.fromEntries(i.map((C) => [C, { status: "idle" }])));
|
|
730
|
+
let x = 0, k = 0;
|
|
731
|
+
for (const C of i) {
|
|
732
|
+
J(C, { status: "pushing" });
|
|
733
733
|
try {
|
|
734
|
-
const
|
|
734
|
+
const g = await w(`${c}/${a}/push`, {
|
|
735
735
|
method: "POST",
|
|
736
736
|
body: JSON.stringify({ destConfigId: C })
|
|
737
|
-
}),
|
|
738
|
-
|
|
739
|
-
} catch (
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
|
|
737
|
+
}), R = (g.results ?? []).filter((Q) => !Q.ok);
|
|
738
|
+
g.status === "success" ? (x += 1, J(C, { status: "success" })) : g.status === "partial" ? (k += 1, J(C, { status: "partial", failed: R.length, failures: R })) : (k += 1, J(C, { status: "failed", failures: R }));
|
|
739
|
+
} catch (g) {
|
|
740
|
+
k += 1;
|
|
741
|
+
const R = g instanceof Error ? g.message : String(g);
|
|
742
|
+
J(C, { status: "failed", error: R });
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
|
|
745
|
+
v.invalidateQueries({ queryKey: ["imaginarium", "releases"] }), v.invalidateQueries({ queryKey: ["imaginarium", "release", a] }), v.invalidateQueries({ queryKey: ["imaginarium", "release-items", a] }), v.invalidateQueries({ queryKey: ["imaginarium", "release-pushes", a] }), p(k === 0 ? { title: "Push complete", description: `Pushed to ${x} target${x === 1 ? "" : "s"}.` } : {
|
|
746
746
|
title: "Push finished with errors",
|
|
747
|
-
description: `${
|
|
747
|
+
description: `${k} target${k === 1 ? "" : "s"} did not fully succeed.`,
|
|
748
748
|
variant: "destructive"
|
|
749
|
-
}), h(!1),
|
|
750
|
-
},
|
|
751
|
-
|
|
749
|
+
}), h(!1), H(!0), o == null || o();
|
|
750
|
+
}, L = (x) => {
|
|
751
|
+
d || (x || (z({}), H(!1)), s(x));
|
|
752
752
|
};
|
|
753
|
-
return /* @__PURE__ */ e(
|
|
754
|
-
/* @__PURE__ */ n(
|
|
753
|
+
return /* @__PURE__ */ e(Ke, { open: t, onOpenChange: L, children: /* @__PURE__ */ n($e, { children: [
|
|
754
|
+
/* @__PURE__ */ n(Ie, { children: [
|
|
755
755
|
/* @__PURE__ */ e(Oe, { children: "Push release" }),
|
|
756
|
-
/* @__PURE__ */ e(
|
|
756
|
+
/* @__PURE__ */ e(Re, { children: "Pushes the included items to each target cluster, one at a time. Each target re-compares against the latest origin before applying." })
|
|
757
757
|
] }),
|
|
758
758
|
u.length > 0 ? /* @__PURE__ */ n("div", { className: "space-y-1 rounded border border-amber-200 bg-amber-50 p-3 text-xs text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300", children: [
|
|
759
759
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
@@ -763,56 +763,56 @@ function Yt({
|
|
|
763
763
|
u.length === 1 ? "" : "s",
|
|
764
764
|
" reference excluded dependencies"
|
|
765
765
|
] }),
|
|
766
|
-
/* @__PURE__ */ e("ul", { className: "list-disc space-y-0.5 pl-8", children: u.map((
|
|
767
|
-
|
|
766
|
+
/* @__PURE__ */ e("ul", { className: "list-disc space-y-0.5 pl-8", children: u.map((x) => /* @__PURE__ */ n("li", { children: [
|
|
767
|
+
x.itemName,
|
|
768
768
|
" → ",
|
|
769
|
-
|
|
770
|
-
] },
|
|
769
|
+
x.missing.join(", ")
|
|
770
|
+
] }, x.itemName)) }),
|
|
771
771
|
/* @__PURE__ */ e("p", { className: "pl-8 text-amber-600", children: "Push may fail for these items. You can proceed anyway." })
|
|
772
772
|
] }) : null,
|
|
773
|
-
/* @__PURE__ */ e("div", { className: "space-y-2 py-2", children:
|
|
774
|
-
const
|
|
773
|
+
/* @__PURE__ */ e("div", { className: "space-y-2 py-2", children: i.length === 0 ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "This release has no targets." }) : i.map((x) => {
|
|
774
|
+
const k = E[x] ?? { status: "idle" }, C = k.failures ?? [];
|
|
775
775
|
return /* @__PURE__ */ n("div", { className: "rounded border px-3 py-2", children: [
|
|
776
776
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
777
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children:
|
|
778
|
-
/* @__PURE__ */ e(
|
|
777
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: _(x) }),
|
|
778
|
+
/* @__PURE__ */ e(Yt, { state: k })
|
|
779
779
|
] }),
|
|
780
|
-
C.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-2 max-h-48 space-y-1 overflow-auto border-t pt-2 text-xs", children: C.map((
|
|
780
|
+
C.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-2 max-h-48 space-y-1 overflow-auto border-t pt-2 text-xs", children: C.map((g, R) => /* @__PURE__ */ n("li", { className: "text-destructive", children: [
|
|
781
781
|
/* @__PURE__ */ n("span", { className: "font-mono", children: [
|
|
782
|
-
|
|
783
|
-
|
|
782
|
+
g.action ? `${g.action} ` : "",
|
|
783
|
+
g.itemKey ?? "item"
|
|
784
784
|
] }),
|
|
785
|
-
|
|
785
|
+
g.error ? /* @__PURE__ */ n("span", { className: "text-muted-foreground", children: [
|
|
786
786
|
" — ",
|
|
787
|
-
|
|
787
|
+
g.error
|
|
788
788
|
] }) : null
|
|
789
|
-
] }, `${
|
|
790
|
-
] },
|
|
789
|
+
] }, `${g.itemKey ?? "item"}-${R}`)) }) : null
|
|
790
|
+
] }, x);
|
|
791
791
|
}) }),
|
|
792
|
-
/* @__PURE__ */ n(
|
|
793
|
-
/* @__PURE__ */ e($, { variant: "outline", onClick: () =>
|
|
792
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
793
|
+
/* @__PURE__ */ e($, { variant: "outline", onClick: () => L(!1), disabled: d, children: "Close" }),
|
|
794
794
|
/* @__PURE__ */ n(
|
|
795
795
|
$,
|
|
796
796
|
{
|
|
797
797
|
variant: "destructive",
|
|
798
798
|
onClick: D,
|
|
799
|
-
disabled:
|
|
799
|
+
disabled: d || j || i.length === 0,
|
|
800
800
|
children: [
|
|
801
|
-
/* @__PURE__ */ e(
|
|
802
|
-
|
|
801
|
+
/* @__PURE__ */ e(Ot, { className: "w-4 h-4 mr-2" }),
|
|
802
|
+
d ? "Pushing…" : "Confirm push"
|
|
803
803
|
]
|
|
804
804
|
}
|
|
805
805
|
)
|
|
806
806
|
] })
|
|
807
807
|
] }) });
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Gt(t) {
|
|
810
810
|
var s;
|
|
811
811
|
return (((s = t.diff) == null ? void 0 : s.versions) ?? []).filter((a) => !a.existsOnTarget);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
var
|
|
815
|
-
const
|
|
813
|
+
function Xt({ item: t, disabled: s, onChange: a }) {
|
|
814
|
+
var l;
|
|
815
|
+
const i = ((l = t.diff) == null ? void 0 : l.versions) ?? [];
|
|
816
816
|
return /* @__PURE__ */ n(
|
|
817
817
|
"select",
|
|
818
818
|
{
|
|
@@ -824,15 +824,15 @@ function Gt({ item: t, disabled: s, onChange: a }) {
|
|
|
824
824
|
"aria-label": "Rule version",
|
|
825
825
|
children: [
|
|
826
826
|
/* @__PURE__ */ e("option", { value: "", disabled: !0, children: "Select a version" }),
|
|
827
|
-
|
|
828
|
-
const
|
|
829
|
-
return /* @__PURE__ */ e("option", { value:
|
|
827
|
+
i.map((c) => {
|
|
828
|
+
const o = String(c.version), u = c.existsOnTarget ? `v${c.version} — already on target` : `v${c.version}${c.isPublished ? " (published)" : ""}`;
|
|
829
|
+
return /* @__PURE__ */ e("option", { value: o, disabled: c.existsOnTarget, children: u }, o);
|
|
830
830
|
})
|
|
831
831
|
]
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const Zt = {
|
|
836
836
|
blueprint: "bg-blue-100 text-blue-700 dark:bg-blue-500/15 dark:text-blue-300",
|
|
837
837
|
rule: "bg-orange-100 text-orange-700 dark:bg-orange-500/15 dark:text-orange-300",
|
|
838
838
|
messageRoute: "bg-teal-100 text-teal-700 dark:bg-teal-500/15 dark:text-teal-300",
|
|
@@ -852,7 +852,7 @@ const Xt = {
|
|
|
852
852
|
project: "bg-fuchsia-50 text-fuchsia-800 dark:bg-fuchsia-500/15 dark:text-fuchsia-300"
|
|
853
853
|
};
|
|
854
854
|
function pe({ type: t }) {
|
|
855
|
-
const s =
|
|
855
|
+
const s = Zt[t] ?? "bg-muted text-muted-foreground";
|
|
856
856
|
return /* @__PURE__ */ e("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs font-semibold ${s}`, children: t });
|
|
857
857
|
}
|
|
858
858
|
function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
|
|
@@ -868,7 +868,7 @@ function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
|
|
|
868
868
|
className: "peer sr-only",
|
|
869
869
|
checked: t,
|
|
870
870
|
disabled: a,
|
|
871
|
-
onChange: (
|
|
871
|
+
onChange: (i) => s(i.target.checked)
|
|
872
872
|
}
|
|
873
873
|
),
|
|
874
874
|
/* @__PURE__ */ e("span", { className: "absolute inset-0 rounded-full bg-input transition-colors peer-checked:bg-primary" }),
|
|
@@ -877,43 +877,43 @@ function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
|
|
|
877
877
|
}
|
|
878
878
|
);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function en(t) {
|
|
881
881
|
const s = /* @__PURE__ */ new Map();
|
|
882
|
-
for (const
|
|
883
|
-
const
|
|
884
|
-
(!
|
|
882
|
+
for (const i of t) {
|
|
883
|
+
const l = s.get(i.destConfigId);
|
|
884
|
+
(!l || i.createdAt > l.createdAt) && s.set(i.destConfigId, i);
|
|
885
885
|
}
|
|
886
886
|
const a = /* @__PURE__ */ new Map();
|
|
887
|
-
for (const
|
|
888
|
-
for (const
|
|
889
|
-
if (!
|
|
887
|
+
for (const i of s.values())
|
|
888
|
+
for (const l of i.results ?? []) {
|
|
889
|
+
if (!l.itemKey)
|
|
890
890
|
continue;
|
|
891
|
-
let c = a.get(
|
|
892
|
-
c || (c = /* @__PURE__ */ new Map(), a.set(
|
|
891
|
+
let c = a.get(l.itemKey);
|
|
892
|
+
c || (c = /* @__PURE__ */ new Map(), a.set(l.itemKey, c)), c.set(i.destConfigId, { ok: l.ok, error: l.error });
|
|
893
893
|
}
|
|
894
894
|
return a;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
897
|
-
var
|
|
898
|
-
return (
|
|
896
|
+
function tn(t, s, a) {
|
|
897
|
+
var i;
|
|
898
|
+
return (i = t.get(s)) == null ? void 0 : i.get(a);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Dn(t, s) {
|
|
901
901
|
return t.filter((a) => !(s.type !== "all" && a.itemType !== s.type || s.included === "enabled" && (!a.included || a.ignored) || s.included === "disabled" && a.included && !a.ignored));
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function nn(t) {
|
|
904
904
|
const s = {};
|
|
905
905
|
for (const a of t)
|
|
906
906
|
s[a.itemType] = (s[a.itemType] ?? 0) + 1;
|
|
907
907
|
return s;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t,
|
|
909
|
+
function sn(t) {
|
|
910
|
+
const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, i = s >= 0 ? t.slice(s + 1) : t;
|
|
911
911
|
return {
|
|
912
912
|
id: "",
|
|
913
913
|
releaseId: "",
|
|
914
914
|
itemKey: t,
|
|
915
915
|
itemType: a,
|
|
916
|
-
itemName:
|
|
916
|
+
itemName: i,
|
|
917
917
|
parentKey: null,
|
|
918
918
|
selectedVersion: null,
|
|
919
919
|
status: "updated",
|
|
@@ -925,95 +925,95 @@ function nn(t) {
|
|
|
925
925
|
updatedAt: ""
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function an(t) {
|
|
929
929
|
var c;
|
|
930
930
|
const s = new Set(
|
|
931
|
-
t.filter((
|
|
932
|
-
), a = [],
|
|
933
|
-
for (const
|
|
934
|
-
if (
|
|
931
|
+
t.filter((o) => !o.parentKey).map((o) => o.itemKey)
|
|
932
|
+
), a = [], i = /* @__PURE__ */ new Map();
|
|
933
|
+
for (const o of t) {
|
|
934
|
+
if (o.parentKey)
|
|
935
935
|
continue;
|
|
936
|
-
const u = { item:
|
|
937
|
-
a.push(u),
|
|
936
|
+
const u = { item: o, children: [] };
|
|
937
|
+
a.push(u), i.set(o.itemKey, u);
|
|
938
938
|
}
|
|
939
|
-
const
|
|
940
|
-
for (const
|
|
941
|
-
if (!
|
|
939
|
+
const l = /* @__PURE__ */ new Map();
|
|
940
|
+
for (const o of t) {
|
|
941
|
+
if (!o.parentKey)
|
|
942
942
|
continue;
|
|
943
|
-
if (s.has(
|
|
944
|
-
(c =
|
|
943
|
+
if (s.has(o.parentKey)) {
|
|
944
|
+
(c = i.get(o.parentKey)) == null || c.children.push(o);
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
let u =
|
|
948
|
-
u || (u = { item:
|
|
947
|
+
let u = l.get(o.parentKey);
|
|
948
|
+
u || (u = { item: sn(o.parentKey), children: [], synthetic: !0 }, l.set(o.parentKey, u), a.push(u)), u.children.push(o);
|
|
949
949
|
}
|
|
950
950
|
return a;
|
|
951
951
|
}
|
|
952
|
-
function an(t) {
|
|
953
|
-
const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, r = s >= 0 ? t.slice(s + 1) : t;
|
|
954
|
-
return { itemKey: t, itemType: a, itemName: r, parentKey: null, cells: {} };
|
|
955
|
-
}
|
|
956
952
|
function rn(t) {
|
|
953
|
+
const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, i = s >= 0 ? t.slice(s + 1) : t;
|
|
954
|
+
return { itemKey: t, itemType: a, itemName: i, parentKey: null, cells: {} };
|
|
955
|
+
}
|
|
956
|
+
function ln(t) {
|
|
957
957
|
var c;
|
|
958
958
|
const s = new Set(
|
|
959
|
-
t.filter((
|
|
960
|
-
), a = [],
|
|
961
|
-
for (const
|
|
962
|
-
if (
|
|
959
|
+
t.filter((o) => !o.parentKey).map((o) => o.itemKey)
|
|
960
|
+
), a = [], i = /* @__PURE__ */ new Map();
|
|
961
|
+
for (const o of t) {
|
|
962
|
+
if (o.parentKey)
|
|
963
963
|
continue;
|
|
964
|
-
const u = { row:
|
|
965
|
-
a.push(u),
|
|
964
|
+
const u = { row: o, children: [] };
|
|
965
|
+
a.push(u), i.set(o.itemKey, u);
|
|
966
966
|
}
|
|
967
|
-
const
|
|
968
|
-
for (const
|
|
969
|
-
if (!
|
|
967
|
+
const l = /* @__PURE__ */ new Map();
|
|
968
|
+
for (const o of t) {
|
|
969
|
+
if (!o.parentKey)
|
|
970
970
|
continue;
|
|
971
|
-
if (s.has(
|
|
972
|
-
(c =
|
|
971
|
+
if (s.has(o.parentKey)) {
|
|
972
|
+
(c = i.get(o.parentKey)) == null || c.children.push(o);
|
|
973
973
|
continue;
|
|
974
974
|
}
|
|
975
|
-
let u =
|
|
976
|
-
u || (u = { row:
|
|
975
|
+
let u = l.get(o.parentKey);
|
|
976
|
+
u || (u = { row: rn(o.parentKey), children: [], synthetic: !0 }, l.set(o.parentKey, u), a.push(u)), u.children.push(o);
|
|
977
977
|
}
|
|
978
978
|
return a;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function on(t) {
|
|
981
981
|
let s = 0;
|
|
982
982
|
for (const a of t.children)
|
|
983
983
|
a.included && !a.ignored && (s += 1);
|
|
984
984
|
return { included: s, total: t.children.length };
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
var
|
|
986
|
+
function dn(t) {
|
|
987
|
+
var i, l;
|
|
988
988
|
const s = [];
|
|
989
989
|
for (const c of t) {
|
|
990
990
|
if (c.status !== "new")
|
|
991
991
|
continue;
|
|
992
|
-
const
|
|
992
|
+
const o = (i = c.diff) == null ? void 0 : i.origin, u = o == null ? void 0 : o.id;
|
|
993
993
|
if (typeof u == "string" && u && s.push({ token: u, depKey: c.itemKey }), c.itemType === "enum") {
|
|
994
|
-
const p =
|
|
994
|
+
const p = o == null ? void 0 : o.type;
|
|
995
995
|
typeof p == "string" && p && s.push({ token: p, depKey: c.itemKey });
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
998
|
const a = /* @__PURE__ */ new Map();
|
|
999
999
|
for (const c of t) {
|
|
1000
|
-
const
|
|
1001
|
-
for (const { token: p, depKey:
|
|
1002
|
-
|
|
1003
|
-
a.set(c.itemKey,
|
|
1000
|
+
const o = /* @__PURE__ */ new Set(), u = JSON.stringify(((l = c.diff) == null ? void 0 : l.origin) ?? null);
|
|
1001
|
+
for (const { token: p, depKey: w } of s)
|
|
1002
|
+
w !== c.itemKey && u.includes(p) && o.add(w);
|
|
1003
|
+
a.set(c.itemKey, o);
|
|
1004
1004
|
}
|
|
1005
1005
|
return a;
|
|
1006
1006
|
}
|
|
1007
1007
|
function Te(t, s, a) {
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1008
|
+
const i = s.get(t.itemKey);
|
|
1009
|
+
if (!i || i.size === 0)
|
|
1010
1010
|
return [];
|
|
1011
|
-
const
|
|
1012
|
-
for (const c of
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1011
|
+
const l = [];
|
|
1012
|
+
for (const c of i) {
|
|
1013
|
+
const o = a.get(c);
|
|
1014
|
+
o && o.status === "new" && (!o.included || o.ignored) && l.push(o);
|
|
1015
1015
|
}
|
|
1016
|
-
return
|
|
1016
|
+
return l;
|
|
1017
1017
|
}
|
|
1018
1018
|
const Ze = [
|
|
1019
1019
|
"blueprint",
|
|
@@ -1045,14 +1045,14 @@ function qe(t, s) {
|
|
|
1045
1045
|
const a = et(t) - et(s);
|
|
1046
1046
|
return a !== 0 ? a : t.localeCompare(s);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function cn(t) {
|
|
1049
1049
|
return t.tags + t.metadataKeys + t.i18nPaths + t.permissions;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function un(t) {
|
|
1052
1052
|
const s = [];
|
|
1053
1053
|
return t.tags > 0 && s.push(`${t.tags} tag${t.tags === 1 ? "" : "s"}`), t.metadataKeys > 0 && s.push(`${t.metadataKeys} metadata key${t.metadataKeys === 1 ? "" : "s"}`), t.i18nPaths > 0 && s.push(`${t.i18nPaths} translation${t.i18nPaths === 1 ? "" : "s"}`), t.permissions > 0 && s.push(`${t.permissions} permission${t.permissions === 1 ? "" : "s"}`), s.length === 0 ? "" : `${s.join(", ")} excluded from push`;
|
|
1054
1054
|
}
|
|
1055
|
-
const
|
|
1055
|
+
const mn = [
|
|
1056
1056
|
{ value: "all", label: "All" },
|
|
1057
1057
|
{ value: "enabled", label: "Enabled" },
|
|
1058
1058
|
{ value: "disabled", label: "Disabled" }
|
|
@@ -1063,7 +1063,7 @@ function tt(t, s) {
|
|
|
1063
1063
|
function nt({ status: t }) {
|
|
1064
1064
|
return /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium border bg-muted text-muted-foreground border-border", children: t });
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function Z(t) {
|
|
1067
1067
|
if (Array.isArray(t))
|
|
1068
1068
|
return t.filter((s) => typeof s == "string");
|
|
1069
1069
|
if (typeof t == "string" && t.length > 0)
|
|
@@ -1077,15 +1077,15 @@ function X(t) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
function st({ item: t }) {
|
|
1079
1079
|
const s = {
|
|
1080
|
-
tags:
|
|
1081
|
-
metadataKeys:
|
|
1082
|
-
i18nPaths:
|
|
1083
|
-
permissions:
|
|
1084
|
-
}, a =
|
|
1080
|
+
tags: Z(t.excludedTags).length,
|
|
1081
|
+
metadataKeys: Z(t.excludedMetadataKeys).length,
|
|
1082
|
+
i18nPaths: Z(t.excludedI18nPaths).length,
|
|
1083
|
+
permissions: Z(t.excludedPermissions).length
|
|
1084
|
+
}, a = cn(s);
|
|
1085
1085
|
return a <= 0 ? null : /* @__PURE__ */ n(
|
|
1086
1086
|
"span",
|
|
1087
1087
|
{
|
|
1088
|
-
title:
|
|
1088
|
+
title: un(s),
|
|
1089
1089
|
className: "inline-flex items-center rounded px-1.5 py-0.5 text-xs bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-300",
|
|
1090
1090
|
children: [
|
|
1091
1091
|
a,
|
|
@@ -1099,139 +1099,139 @@ function at({
|
|
|
1099
1099
|
item: t,
|
|
1100
1100
|
targetConfigIds: s,
|
|
1101
1101
|
results: a,
|
|
1102
|
-
pushedDests:
|
|
1103
|
-
displayName:
|
|
1102
|
+
pushedDests: i,
|
|
1103
|
+
displayName: l
|
|
1104
1104
|
}) {
|
|
1105
|
-
const c = t.included && !t.ignored,
|
|
1106
|
-
return
|
|
1107
|
-
const
|
|
1105
|
+
const c = t.included && !t.ignored, o = s.filter((u) => i.has(u)).map((u) => ({ id: u, result: tn(a, t.itemKey, u) })).filter((u) => u.result != null || c);
|
|
1106
|
+
return o.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-end gap-1", children: o.map(({ id: u, result: p }) => {
|
|
1107
|
+
const w = p ? p.ok ? "bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-300" : "bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-300" : "bg-muted text-muted-foreground", v = p ? p.ok ? "✓" : "✗" : "=", d = p ? p.ok ? void 0 : p.error : "No change — already in sync";
|
|
1108
1108
|
return /* @__PURE__ */ n(
|
|
1109
1109
|
"span",
|
|
1110
1110
|
{
|
|
1111
|
-
title:
|
|
1112
|
-
className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-semibold ${
|
|
1111
|
+
title: d,
|
|
1112
|
+
className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-semibold ${w}`,
|
|
1113
1113
|
children: [
|
|
1114
|
-
|
|
1114
|
+
l(u),
|
|
1115
1115
|
" ",
|
|
1116
|
-
|
|
1116
|
+
v
|
|
1117
1117
|
]
|
|
1118
1118
|
},
|
|
1119
1119
|
u
|
|
1120
1120
|
);
|
|
1121
1121
|
}) });
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
var Je,
|
|
1125
|
-
const a = ze.get("Release", "apiPath", "/releases"), { toast:
|
|
1123
|
+
function hn({ releaseId: t, onBack: s }) {
|
|
1124
|
+
var Je, Le, Qe;
|
|
1125
|
+
const a = ze.get("Release", "apiPath", "/releases"), { toast: i } = le(), { fetchJson: l } = ne(), { configs: c } = ye(), o = oe(), [u, p] = A("all"), [w, v] = A("all"), [d, h] = A(null), [E, z] = A(!1), [j, H] = A(() => /* @__PURE__ */ new Set()), _ = (r) => H((N) => {
|
|
1126
1126
|
const m = new Set(N);
|
|
1127
|
-
return m.has(
|
|
1128
|
-
}),
|
|
1129
|
-
queryKey:
|
|
1130
|
-
queryFn: () =>
|
|
1131
|
-
}), { data: C, isLoading:
|
|
1127
|
+
return m.has(r) ? m.delete(r) : m.add(r), m;
|
|
1128
|
+
}), J = ["imaginarium", "release", t], D = ["imaginarium", "release-items", t], L = ["imaginarium", "release-pushes", t], { data: x, isLoading: k } = re({
|
|
1129
|
+
queryKey: J,
|
|
1130
|
+
queryFn: () => l(`${a}/${t}`)
|
|
1131
|
+
}), { data: C, isLoading: g } = re({
|
|
1132
1132
|
queryKey: D,
|
|
1133
1133
|
queryFn: async () => {
|
|
1134
|
-
const
|
|
1135
|
-
return Array.isArray(
|
|
1134
|
+
const r = await l(`${a}/${t}/items`);
|
|
1135
|
+
return Array.isArray(r) ? r : (r == null ? void 0 : r.items) ?? [];
|
|
1136
1136
|
}
|
|
1137
|
-
}), { data:
|
|
1138
|
-
queryKey:
|
|
1137
|
+
}), { data: R } = re({
|
|
1138
|
+
queryKey: L,
|
|
1139
1139
|
queryFn: async () => {
|
|
1140
|
-
const
|
|
1141
|
-
return Array.isArray(
|
|
1140
|
+
const r = await l(`${a}/${t}/pushes`);
|
|
1141
|
+
return Array.isArray(r) ? r : (r == null ? void 0 : r.items) ?? [];
|
|
1142
1142
|
}
|
|
1143
|
-
}),
|
|
1144
|
-
() => new Set((
|
|
1145
|
-
[
|
|
1146
|
-
),
|
|
1147
|
-
const
|
|
1148
|
-
return c.forEach((N) =>
|
|
1149
|
-
}, [c]),
|
|
1150
|
-
() => new Map((C ?? []).map((
|
|
1143
|
+
}), Q = B(() => en(R ?? []), [R]), X = B(
|
|
1144
|
+
() => new Set((R ?? []).map((r) => r.destConfigId)),
|
|
1145
|
+
[R]
|
|
1146
|
+
), G = (R ?? []).length > 0, f = B(() => (x == null ? void 0 : x.targetConfigIds) ?? [], [x]), q = B(() => {
|
|
1147
|
+
const r = /* @__PURE__ */ new Map();
|
|
1148
|
+
return c.forEach((N) => r.set(String(N.id), N.displayName)), r;
|
|
1149
|
+
}, [c]), F = (r) => q.get(r) ?? r, I = B(() => an(C ?? []), [C]), V = B(() => I.map((r) => r.item), [I]), M = B(() => dn(C ?? []), [C]), y = B(
|
|
1150
|
+
() => new Map((C ?? []).map((r) => [r.itemKey, r])),
|
|
1151
1151
|
[C]
|
|
1152
|
-
),
|
|
1152
|
+
), O = (r) => {
|
|
1153
1153
|
var m;
|
|
1154
1154
|
let N;
|
|
1155
|
-
if (
|
|
1156
|
-
const K = (m =
|
|
1157
|
-
N = K ?? (
|
|
1155
|
+
if (r.parentKey) {
|
|
1156
|
+
const K = (m = y.get(r.parentKey)) == null ? void 0 : m.itemName, T = r.parentKey.indexOf(":");
|
|
1157
|
+
N = K ?? (T >= 0 ? r.parentKey.slice(T + 1) : void 0);
|
|
1158
1158
|
}
|
|
1159
|
-
return `${N ? N + " " : ""}${
|
|
1160
|
-
},
|
|
1159
|
+
return `${N ? N + " " : ""}${r.itemType} "${r.itemName}"`;
|
|
1160
|
+
}, S = B(() => {
|
|
1161
1161
|
var N, m;
|
|
1162
|
-
const
|
|
1162
|
+
const r = /* @__PURE__ */ new Map();
|
|
1163
1163
|
for (const K of C ?? []) {
|
|
1164
|
-
const
|
|
1165
|
-
typeof
|
|
1164
|
+
const T = (m = (N = K.diff) == null ? void 0 : N.origin) == null ? void 0 : m.id;
|
|
1165
|
+
typeof T == "string" && T && r.set(T, K.itemName);
|
|
1166
1166
|
}
|
|
1167
|
-
return
|
|
1168
|
-
}, [C]),
|
|
1169
|
-
() => (C ?? []).filter((
|
|
1170
|
-
itemName:
|
|
1171
|
-
missing: Te(
|
|
1172
|
-
})).filter((
|
|
1167
|
+
return r;
|
|
1168
|
+
}, [C]), de = B(
|
|
1169
|
+
() => (C ?? []).filter((r) => r.included && !r.ignored).map((r) => ({
|
|
1170
|
+
itemName: r.itemName,
|
|
1171
|
+
missing: Te(r, M, y).map(O)
|
|
1172
|
+
})).filter((r) => r.missing.length > 0),
|
|
1173
1173
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1174
|
-
[C,
|
|
1175
|
-
), ue =
|
|
1176
|
-
const N =
|
|
1177
|
-
return { node:
|
|
1174
|
+
[C, M, y]
|
|
1175
|
+
), ue = B(() => nn(V), [V]), Ne = B(() => Object.keys(ue).sort(qe), [ue]), Y = B(() => I.filter((r) => u === "all" || r.item.itemType === u).map((r) => {
|
|
1176
|
+
const N = w === "all" ? r.children : r.children.filter((m) => tt(m, w));
|
|
1177
|
+
return { node: r, renderChildren: N };
|
|
1178
1178
|
}).filter(
|
|
1179
|
-
({ node:
|
|
1180
|
-
).sort((
|
|
1181
|
-
const m = qe(
|
|
1182
|
-
return m !== 0 ? m :
|
|
1183
|
-
}), [I, u,
|
|
1184
|
-
mutationFn: () =>
|
|
1179
|
+
({ node: r, renderChildren: N }) => w === "all" || tt(r.item, w) || N.length > 0
|
|
1180
|
+
).sort((r, N) => {
|
|
1181
|
+
const m = qe(r.node.item.itemType, N.node.item.itemType);
|
|
1182
|
+
return m !== 0 ? m : r.node.item.itemName.localeCompare(N.node.item.itemName);
|
|
1183
|
+
}), [I, u, w]), ee = U({
|
|
1184
|
+
mutationFn: () => l(`${a}/${t}/refresh`, { method: "POST" }),
|
|
1185
1185
|
onSuccess: () => {
|
|
1186
|
-
|
|
1186
|
+
o.invalidateQueries({ queryKey: D }), i({ title: "Snapshot refreshed", description: "Items re-computed from origin." });
|
|
1187
1187
|
},
|
|
1188
|
-
onError: (
|
|
1189
|
-
|
|
1188
|
+
onError: (r) => {
|
|
1189
|
+
i({ title: "Error", description: r.message, variant: "destructive" });
|
|
1190
1190
|
}
|
|
1191
1191
|
}), ve = U({
|
|
1192
|
-
mutationFn: ({ itemId:
|
|
1192
|
+
mutationFn: ({ itemId: r, included: N }) => l(`${a}/${t}/items/${r}`, {
|
|
1193
1193
|
method: "PATCH",
|
|
1194
1194
|
body: JSON.stringify({ included: N })
|
|
1195
1195
|
}),
|
|
1196
1196
|
onSuccess: () => {
|
|
1197
|
-
|
|
1197
|
+
o.invalidateQueries({ queryKey: D });
|
|
1198
1198
|
},
|
|
1199
|
-
onError: (
|
|
1200
|
-
|
|
1199
|
+
onError: (r) => {
|
|
1200
|
+
i({ title: "Error", description: r.message, variant: "destructive" });
|
|
1201
1201
|
}
|
|
1202
1202
|
}), Be = U({
|
|
1203
|
-
mutationFn: ({ itemId:
|
|
1203
|
+
mutationFn: ({ itemId: r, selectedVersion: N }) => l(`${a}/${t}/items/${r}`, {
|
|
1204
1204
|
method: "PATCH",
|
|
1205
1205
|
body: JSON.stringify({ selectedVersion: N })
|
|
1206
1206
|
}),
|
|
1207
1207
|
onSuccess: () => {
|
|
1208
|
-
|
|
1208
|
+
o.invalidateQueries({ queryKey: D });
|
|
1209
1209
|
},
|
|
1210
|
-
onError: (
|
|
1211
|
-
|
|
1210
|
+
onError: (r) => {
|
|
1211
|
+
i({ title: "Error", description: r.message, variant: "destructive" });
|
|
1212
1212
|
}
|
|
1213
|
-
}), we = (
|
|
1214
|
-
mutationFn: ({ itemId: N, value: m }) =>
|
|
1213
|
+
}), we = (r) => ({
|
|
1214
|
+
mutationFn: ({ itemId: N, value: m }) => l(`${a}/${t}/items/${N}`, {
|
|
1215
1215
|
method: "PATCH",
|
|
1216
|
-
body: JSON.stringify({ [
|
|
1216
|
+
body: JSON.stringify({ [r]: m })
|
|
1217
1217
|
}),
|
|
1218
1218
|
onMutate: async ({ itemId: N, value: m }) => {
|
|
1219
|
-
await
|
|
1220
|
-
const K =
|
|
1221
|
-
return
|
|
1219
|
+
await o.cancelQueries({ queryKey: D });
|
|
1220
|
+
const K = o.getQueryData(D);
|
|
1221
|
+
return o.setQueryData(
|
|
1222
1222
|
D,
|
|
1223
|
-
(
|
|
1223
|
+
(T) => (T ?? []).map((se) => se.id === N ? { ...se, [r]: m } : se)
|
|
1224
1224
|
), { prev: K };
|
|
1225
1225
|
},
|
|
1226
1226
|
onError: (N, m, K) => {
|
|
1227
|
-
K != null && K.prev &&
|
|
1227
|
+
K != null && K.prev && o.setQueryData(D, K.prev), i({ title: "Error", description: N.message, variant: "destructive" });
|
|
1228
1228
|
},
|
|
1229
1229
|
onSettled: () => {
|
|
1230
|
-
|
|
1230
|
+
o.invalidateQueries({ queryKey: D });
|
|
1231
1231
|
}
|
|
1232
|
-
}),
|
|
1233
|
-
return
|
|
1234
|
-
|
|
1232
|
+
}), bt = U(we("excludedTags")), Nt = U(we("excludedMetadataKeys")), vt = U(we("excludedI18nPaths")), wt = U(we("excludedPermissions")), kt = () => o.invalidateQueries({ queryKey: D }), te = (x == null ? void 0 : x.status) === "pushed", b = d ? y.get(d.itemKey) ?? d : null;
|
|
1233
|
+
return k ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }) : x ? /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
1234
|
+
te && /* @__PURE__ */ e("div", { className: "bg-muted text-muted-foreground rounded-md px-3 py-2 text-sm", children: "This release was pushed and is read-only." }),
|
|
1235
1235
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
1236
1236
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
1237
1237
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
@@ -1239,16 +1239,16 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1239
1239
|
/* @__PURE__ */ e(We, {}),
|
|
1240
1240
|
"Back"
|
|
1241
1241
|
] }),
|
|
1242
|
-
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children:
|
|
1243
|
-
/* @__PURE__ */ e(
|
|
1242
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: x.name }),
|
|
1243
|
+
/* @__PURE__ */ e(xt, { status: x.status })
|
|
1244
1244
|
] }),
|
|
1245
1245
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1246
|
-
!
|
|
1247
|
-
|
|
1246
|
+
!te && /* @__PURE__ */ e(
|
|
1247
|
+
Ht,
|
|
1248
1248
|
{
|
|
1249
1249
|
releaseId: t,
|
|
1250
1250
|
apiPath: a,
|
|
1251
|
-
onReset:
|
|
1251
|
+
onReset: kt
|
|
1252
1252
|
}
|
|
1253
1253
|
),
|
|
1254
1254
|
/* @__PURE__ */ n(
|
|
@@ -1256,36 +1256,36 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1256
1256
|
{
|
|
1257
1257
|
variant: "outline",
|
|
1258
1258
|
size: "sm",
|
|
1259
|
-
onClick: () =>
|
|
1260
|
-
disabled:
|
|
1259
|
+
onClick: () => ee.mutate(),
|
|
1260
|
+
disabled: te || ee.isPending,
|
|
1261
1261
|
children: [
|
|
1262
|
-
/* @__PURE__ */ e(
|
|
1263
|
-
|
|
1262
|
+
/* @__PURE__ */ e(ft, {}),
|
|
1263
|
+
ee.isPending ? "Refreshing…" : "Refresh"
|
|
1264
1264
|
]
|
|
1265
1265
|
}
|
|
1266
1266
|
),
|
|
1267
|
-
|
|
1267
|
+
te ? /* @__PURE__ */ e($, { size: "sm", disabled: !0, children: "Pushed ✓" }) : /* @__PURE__ */ e(
|
|
1268
1268
|
$,
|
|
1269
1269
|
{
|
|
1270
1270
|
size: "sm",
|
|
1271
|
-
onClick: () =>
|
|
1272
|
-
disabled: (
|
|
1271
|
+
onClick: () => z(!0),
|
|
1272
|
+
disabled: (x.targetConfigIds ?? []).length === 0,
|
|
1273
1273
|
children: "Push"
|
|
1274
1274
|
}
|
|
1275
1275
|
)
|
|
1276
1276
|
] })
|
|
1277
1277
|
] }),
|
|
1278
1278
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground", children: [
|
|
1279
|
-
/* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children:
|
|
1279
|
+
/* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: F(x.originConfigId) }),
|
|
1280
1280
|
/* @__PURE__ */ e("span", { children: "→" }),
|
|
1281
|
-
(
|
|
1281
|
+
(x.targetConfigIds ?? []).map((r) => /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: F(r) }, r)),
|
|
1282
1282
|
/* @__PURE__ */ n("span", { className: "ml-2", children: [
|
|
1283
1283
|
"Snapshot: ",
|
|
1284
|
-
|
|
1284
|
+
x.snapshotAt ? new Date(x.snapshotAt).toLocaleString() : "—"
|
|
1285
1285
|
] }),
|
|
1286
1286
|
/* @__PURE__ */ n("span", { children: [
|
|
1287
1287
|
"Pushed: ",
|
|
1288
|
-
|
|
1288
|
+
x.pushedAt ? new Date(x.pushedAt).toLocaleString() : "—"
|
|
1289
1289
|
] })
|
|
1290
1290
|
] })
|
|
1291
1291
|
] }),
|
|
@@ -1299,40 +1299,40 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1299
1299
|
onClick: () => p("all"),
|
|
1300
1300
|
children: [
|
|
1301
1301
|
"All types (",
|
|
1302
|
-
|
|
1302
|
+
V.length,
|
|
1303
1303
|
")"
|
|
1304
1304
|
]
|
|
1305
1305
|
}
|
|
1306
1306
|
),
|
|
1307
|
-
Ne.map((
|
|
1307
|
+
Ne.map((r) => /* @__PURE__ */ n(
|
|
1308
1308
|
$,
|
|
1309
1309
|
{
|
|
1310
|
-
variant: u ===
|
|
1310
|
+
variant: u === r ? "secondary" : "ghost",
|
|
1311
1311
|
size: "sm",
|
|
1312
|
-
onClick: () => p(
|
|
1312
|
+
onClick: () => p(r),
|
|
1313
1313
|
children: [
|
|
1314
|
-
|
|
1314
|
+
r,
|
|
1315
1315
|
" (",
|
|
1316
|
-
ue[
|
|
1316
|
+
ue[r],
|
|
1317
1317
|
")"
|
|
1318
1318
|
]
|
|
1319
1319
|
},
|
|
1320
|
-
|
|
1320
|
+
r
|
|
1321
1321
|
))
|
|
1322
1322
|
] }),
|
|
1323
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1", children:
|
|
1323
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1", children: mn.map((r) => /* @__PURE__ */ e(
|
|
1324
1324
|
$,
|
|
1325
1325
|
{
|
|
1326
|
-
variant:
|
|
1326
|
+
variant: w === r.value ? "secondary" : "outline",
|
|
1327
1327
|
size: "sm",
|
|
1328
|
-
onClick: () =>
|
|
1329
|
-
children:
|
|
1328
|
+
onClick: () => v(r.value),
|
|
1329
|
+
children: r.label
|
|
1330
1330
|
},
|
|
1331
|
-
|
|
1331
|
+
r.value
|
|
1332
1332
|
)) })
|
|
1333
1333
|
] }),
|
|
1334
1334
|
/* @__PURE__ */ n("div", { className: "flex gap-4", children: [
|
|
1335
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children:
|
|
1335
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: g ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading items…" }) : Y.length === 0 ? /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "py-12 text-center text-muted-foreground", children: V.length === 0 ? "No items in this release yet." : "No items match the current filters." }) }) : /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "p-0", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
|
|
1336
1336
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b text-left text-muted-foreground", children: [
|
|
1337
1337
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium w-10", children: "Inc." }),
|
|
1338
1338
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Type" }),
|
|
@@ -1340,15 +1340,15 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1340
1340
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Status" }),
|
|
1341
1341
|
/* @__PURE__ */ e("th", { className: "p-3 font-medium" })
|
|
1342
1342
|
] }) }),
|
|
1343
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
1343
|
+
/* @__PURE__ */ e("tbody", { children: Y.map(({ node: r, renderChildren: N }) => {
|
|
1344
1344
|
var Ye;
|
|
1345
|
-
const m =
|
|
1346
|
-
return /* @__PURE__ */ n(
|
|
1347
|
-
|
|
1345
|
+
const m = r.item, K = N.length > 0, T = j.has(m.itemKey) || w !== "all", se = j.has(m.itemKey), ae = on(r), Ve = ((Ye = m.diff) == null ? void 0 : Ye.versions) ?? [], me = m.itemType === "rule" && Ve.length > 0, Ue = Ve.some((P) => P.isPublished), Ct = me ? Gt(m) : [], He = me && !Ue, _e = me && Ue && Ct.length === 0, ke = He || _e, Tt = me && !ke && m.selectedVersion == null;
|
|
1346
|
+
return /* @__PURE__ */ n(ut, { children: [
|
|
1347
|
+
r.synthetic ? /* @__PURE__ */ n(
|
|
1348
1348
|
"tr",
|
|
1349
1349
|
{
|
|
1350
1350
|
className: "border-b last:border-0 cursor-pointer hover:bg-muted/50",
|
|
1351
|
-
onClick: () =>
|
|
1351
|
+
onClick: () => _(m.itemKey),
|
|
1352
1352
|
children: [
|
|
1353
1353
|
/* @__PURE__ */ e("td", { className: "p-3" }),
|
|
1354
1354
|
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(pe, { type: m.itemType }) }),
|
|
@@ -1359,17 +1359,17 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1359
1359
|
type: "button",
|
|
1360
1360
|
className: "text-muted-foreground hover:text-foreground",
|
|
1361
1361
|
onClick: (P) => {
|
|
1362
|
-
P.stopPropagation(),
|
|
1362
|
+
P.stopPropagation(), _(m.itemKey);
|
|
1363
1363
|
},
|
|
1364
|
-
"aria-label":
|
|
1365
|
-
children:
|
|
1364
|
+
"aria-label": se ? "Collapse" : "Expand",
|
|
1365
|
+
children: se ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
|
|
1366
1366
|
}
|
|
1367
1367
|
),
|
|
1368
1368
|
/* @__PURE__ */ e("span", { className: "font-medium", children: m.itemName }),
|
|
1369
|
-
/* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${
|
|
1370
|
-
|
|
1369
|
+
/* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ae.included < ae.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
|
|
1370
|
+
ae.included,
|
|
1371
1371
|
"/",
|
|
1372
|
-
|
|
1372
|
+
ae.total,
|
|
1373
1373
|
" changes included"
|
|
1374
1374
|
] })
|
|
1375
1375
|
] }) }),
|
|
@@ -1380,14 +1380,14 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1380
1380
|
) : /* @__PURE__ */ n(
|
|
1381
1381
|
"tr",
|
|
1382
1382
|
{
|
|
1383
|
-
className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(
|
|
1383
|
+
className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(d == null ? void 0 : d.id) === m.id ? "bg-muted/50" : ""} ${ke ? "opacity-60" : ""}`,
|
|
1384
1384
|
onClick: () => h(m),
|
|
1385
1385
|
children: [
|
|
1386
1386
|
/* @__PURE__ */ e("td", { className: "p-3", onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1387
1387
|
Xe,
|
|
1388
1388
|
{
|
|
1389
1389
|
checked: m.included,
|
|
1390
|
-
disabled: m.ignored || ve.isPending ||
|
|
1390
|
+
disabled: m.ignored || ve.isPending || te || ke,
|
|
1391
1391
|
onChange: (P) => ve.mutate({ itemId: m.id, included: P })
|
|
1392
1392
|
}
|
|
1393
1393
|
) }),
|
|
@@ -1399,66 +1399,66 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1399
1399
|
type: "button",
|
|
1400
1400
|
className: "text-muted-foreground hover:text-foreground",
|
|
1401
1401
|
onClick: (P) => {
|
|
1402
|
-
P.stopPropagation(),
|
|
1402
|
+
P.stopPropagation(), _(m.itemKey);
|
|
1403
1403
|
},
|
|
1404
|
-
"aria-label":
|
|
1405
|
-
children:
|
|
1404
|
+
"aria-label": se ? "Collapse" : "Expand",
|
|
1405
|
+
children: se ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
|
|
1406
1406
|
}
|
|
1407
1407
|
) : null,
|
|
1408
1408
|
/* @__PURE__ */ e("span", { className: "font-medium", children: m.itemName }),
|
|
1409
1409
|
(() => {
|
|
1410
1410
|
if (!m.included || m.ignored)
|
|
1411
1411
|
return null;
|
|
1412
|
-
const P = Te(m,
|
|
1413
|
-
return P.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${P.map((
|
|
1412
|
+
const P = Te(m, M, y);
|
|
1413
|
+
return P.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${P.map((W) => W.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
|
|
1414
1414
|
})(),
|
|
1415
1415
|
/* @__PURE__ */ e(st, { item: m }),
|
|
1416
|
-
K ? /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${
|
|
1417
|
-
|
|
1416
|
+
K ? /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ae.included < ae.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
|
|
1417
|
+
ae.included,
|
|
1418
1418
|
"/",
|
|
1419
|
-
|
|
1419
|
+
ae.total,
|
|
1420
1420
|
" changes included"
|
|
1421
1421
|
] }) : null,
|
|
1422
|
-
m.carriedOver ? /* @__PURE__ */ e(Qt, { originName:
|
|
1423
|
-
m.ignored ? /* @__PURE__ */ e(
|
|
1422
|
+
m.carriedOver ? /* @__PURE__ */ e(Qt, { originName: F(x.originConfigId) }) : null,
|
|
1423
|
+
m.ignored ? /* @__PURE__ */ e(Vt, {}) : null,
|
|
1424
1424
|
me && !ke ? /* @__PURE__ */ e("span", { onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1425
|
-
|
|
1425
|
+
Xt,
|
|
1426
1426
|
{
|
|
1427
1427
|
item: m,
|
|
1428
|
-
disabled:
|
|
1428
|
+
disabled: te || Be.isPending,
|
|
1429
1429
|
onChange: (P) => Be.mutate({ itemId: m.id, selectedVersion: P })
|
|
1430
1430
|
}
|
|
1431
1431
|
) }) : null,
|
|
1432
1432
|
He ? /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Rules without a published version cannot be pushed" }) : null,
|
|
1433
1433
|
_e ? /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Nothing to push — all versions exist on target" }) : null,
|
|
1434
|
-
|
|
1434
|
+
Tt ? /* @__PURE__ */ e("span", { className: "text-xs text-amber-600", children: "Pushable version not selected" }) : null
|
|
1435
1435
|
] }) }),
|
|
1436
1436
|
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(nt, { status: m.status }) }),
|
|
1437
1437
|
/* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ n("div", { className: "flex items-center justify-end gap-2", children: [
|
|
1438
|
-
|
|
1438
|
+
G ? /* @__PURE__ */ e(
|
|
1439
1439
|
at,
|
|
1440
1440
|
{
|
|
1441
1441
|
item: m,
|
|
1442
|
-
targetConfigIds:
|
|
1443
|
-
results:
|
|
1444
|
-
pushedDests:
|
|
1445
|
-
displayName:
|
|
1442
|
+
targetConfigIds: f,
|
|
1443
|
+
results: Q,
|
|
1444
|
+
pushedDests: X,
|
|
1445
|
+
displayName: F
|
|
1446
1446
|
}
|
|
1447
1447
|
) : null,
|
|
1448
|
-
!m.ignored && !
|
|
1449
|
-
|
|
1448
|
+
!m.ignored && !te && /* @__PURE__ */ e(
|
|
1449
|
+
Ut,
|
|
1450
1450
|
{
|
|
1451
1451
|
createPayload: {
|
|
1452
|
-
originConfigId:
|
|
1452
|
+
originConfigId: x.originConfigId,
|
|
1453
1453
|
itemKey: m.itemKey,
|
|
1454
1454
|
itemType: m.itemType,
|
|
1455
1455
|
itemName: m.itemName
|
|
1456
1456
|
},
|
|
1457
1457
|
onChange: () => {
|
|
1458
|
-
|
|
1458
|
+
o.setQueryData(
|
|
1459
1459
|
D,
|
|
1460
|
-
(P) => (P ?? []).map((
|
|
1461
|
-
),
|
|
1460
|
+
(P) => (P ?? []).map((W) => W.id === m.id ? { ...W, ignored: !0, included: !1 } : W)
|
|
1461
|
+
), ee.mutate();
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
1464
|
)
|
|
@@ -1466,18 +1466,18 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1466
1466
|
]
|
|
1467
1467
|
}
|
|
1468
1468
|
),
|
|
1469
|
-
K &&
|
|
1469
|
+
K && T ? N.map((P) => /* @__PURE__ */ n(
|
|
1470
1470
|
"tr",
|
|
1471
1471
|
{
|
|
1472
|
-
className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(
|
|
1472
|
+
className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(d == null ? void 0 : d.id) === P.id ? "bg-muted/50" : ""}`,
|
|
1473
1473
|
onClick: () => h(P),
|
|
1474
1474
|
children: [
|
|
1475
|
-
/* @__PURE__ */ e("td", { className: "p-3 pl-8", onClick: (
|
|
1475
|
+
/* @__PURE__ */ e("td", { className: "p-3 pl-8", onClick: (W) => W.stopPropagation(), children: /* @__PURE__ */ e(
|
|
1476
1476
|
Xe,
|
|
1477
1477
|
{
|
|
1478
1478
|
checked: P.included,
|
|
1479
|
-
disabled: P.ignored || ve.isPending ||
|
|
1480
|
-
onChange: (
|
|
1479
|
+
disabled: P.ignored || ve.isPending || te,
|
|
1480
|
+
onChange: (W) => ve.mutate({ itemId: P.id, included: W })
|
|
1481
1481
|
}
|
|
1482
1482
|
) }),
|
|
1483
1483
|
/* @__PURE__ */ e("td", { className: "p-3 pl-8", children: /* @__PURE__ */ e(pe, { type: P.itemType }) }),
|
|
@@ -1486,109 +1486,109 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1486
1486
|
(() => {
|
|
1487
1487
|
if (!P.included || P.ignored)
|
|
1488
1488
|
return null;
|
|
1489
|
-
const
|
|
1490
|
-
return
|
|
1489
|
+
const W = Te(P, M, y);
|
|
1490
|
+
return W.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${W.map((St) => St.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
|
|
1491
1491
|
})(),
|
|
1492
1492
|
/* @__PURE__ */ e(st, { item: P })
|
|
1493
1493
|
] }) }),
|
|
1494
1494
|
/* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(nt, { status: P.status }) }),
|
|
1495
|
-
/* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (
|
|
1495
|
+
/* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (W) => W.stopPropagation(), children: G ? /* @__PURE__ */ e(
|
|
1496
1496
|
at,
|
|
1497
1497
|
{
|
|
1498
1498
|
item: P,
|
|
1499
|
-
targetConfigIds:
|
|
1500
|
-
results:
|
|
1501
|
-
pushedDests:
|
|
1502
|
-
displayName:
|
|
1499
|
+
targetConfigIds: f,
|
|
1500
|
+
results: Q,
|
|
1501
|
+
pushedDests: X,
|
|
1502
|
+
displayName: F
|
|
1503
1503
|
}
|
|
1504
1504
|
) : null })
|
|
1505
1505
|
]
|
|
1506
1506
|
},
|
|
1507
1507
|
P.id
|
|
1508
1508
|
)) : null
|
|
1509
|
-
] },
|
|
1509
|
+
] }, r.synthetic ? m.itemKey : m.id);
|
|
1510
1510
|
}) })
|
|
1511
1511
|
] }) }) }) }),
|
|
1512
|
-
|
|
1513
|
-
|
|
1512
|
+
d ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: /* @__PURE__ */ e(
|
|
1513
|
+
_t,
|
|
1514
1514
|
{
|
|
1515
1515
|
item: b,
|
|
1516
|
-
targets: (
|
|
1516
|
+
targets: (x.targetConfigIds ?? []).map((r) => ({ id: r, name: F(r) })),
|
|
1517
1517
|
onClose: () => h(null),
|
|
1518
|
-
unmetDependencyNames: b && b.included && !b.ignored ? Te(b,
|
|
1519
|
-
tags: Array.isArray((
|
|
1520
|
-
excludedTags:
|
|
1518
|
+
unmetDependencyNames: b && b.included && !b.ignored ? Te(b, M, y).map(O) : [],
|
|
1519
|
+
tags: Array.isArray((Le = (Je = b == null ? void 0 : b.diff) == null ? void 0 : Je.origin) == null ? void 0 : Le.tags) ? ((Qe = b == null ? void 0 : b.diff) == null ? void 0 : Qe.origin).tags ?? [] : [],
|
|
1520
|
+
excludedTags: Z(b == null ? void 0 : b.excludedTags),
|
|
1521
1521
|
metadataKeys: (() => {
|
|
1522
1522
|
var N, m;
|
|
1523
|
-
const
|
|
1524
|
-
return
|
|
1523
|
+
const r = (m = (N = b == null ? void 0 : b.diff) == null ? void 0 : N.origin) == null ? void 0 : m.metadata;
|
|
1524
|
+
return r != null && typeof r == "object" && !Array.isArray(r) ? Object.keys(r) : [];
|
|
1525
1525
|
})(),
|
|
1526
|
-
excludedMetadataKeys:
|
|
1526
|
+
excludedMetadataKeys: Z(b == null ? void 0 : b.excludedMetadataKeys),
|
|
1527
1527
|
i18nPaths: (() => {
|
|
1528
1528
|
var m, K;
|
|
1529
|
-
const
|
|
1530
|
-
if (!Array.isArray(
|
|
1529
|
+
const r = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.i18n;
|
|
1530
|
+
if (!Array.isArray(r))
|
|
1531
1531
|
return [];
|
|
1532
|
-
const N =
|
|
1532
|
+
const N = r.map((T) => T == null ? void 0 : T.path).filter((T) => typeof T == "string");
|
|
1533
1533
|
return Array.from(new Set(N));
|
|
1534
1534
|
})(),
|
|
1535
|
-
excludedI18nPaths:
|
|
1535
|
+
excludedI18nPaths: Z(b == null ? void 0 : b.excludedI18nPaths),
|
|
1536
1536
|
permissionKeys: (() => {
|
|
1537
1537
|
var m, K;
|
|
1538
1538
|
if ((b == null ? void 0 : b.itemType) !== "role")
|
|
1539
1539
|
return [];
|
|
1540
|
-
const
|
|
1541
|
-
if (!Array.isArray(
|
|
1540
|
+
const r = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.permissions;
|
|
1541
|
+
if (!Array.isArray(r))
|
|
1542
1542
|
return [];
|
|
1543
|
-
const N =
|
|
1543
|
+
const N = r.map((T) => `${(T == null ? void 0 : T.module) ?? ""}/${(T == null ? void 0 : T.name) ?? (T == null ? void 0 : T.id) ?? ""}`).filter((T) => T !== "/");
|
|
1544
1544
|
return Array.from(new Set(N));
|
|
1545
1545
|
})(),
|
|
1546
|
-
excludedPermissions:
|
|
1547
|
-
formatPermissionLabel: (
|
|
1546
|
+
excludedPermissions: Z(b == null ? void 0 : b.excludedPermissions),
|
|
1547
|
+
formatPermissionLabel: (r) => r.split(/([/.])/).map((N) => {
|
|
1548
1548
|
var m, K;
|
|
1549
|
-
return ((K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.nameMap) == null ? void 0 : K[N]) ??
|
|
1549
|
+
return ((K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.nameMap) == null ? void 0 : K[N]) ?? S.get(N) ?? N;
|
|
1550
1550
|
}).join(""),
|
|
1551
|
-
replacementMaps:
|
|
1552
|
-
editable: !
|
|
1553
|
-
onToggleTag: (
|
|
1551
|
+
replacementMaps: x.replacementMaps ?? void 0,
|
|
1552
|
+
editable: !te,
|
|
1553
|
+
onToggleTag: (r, N) => {
|
|
1554
1554
|
if (!b)
|
|
1555
1555
|
return;
|
|
1556
|
-
const m =
|
|
1557
|
-
yt.mutate({ itemId: b.id, value: K });
|
|
1558
|
-
},
|
|
1559
|
-
onToggleMetadataKey: (i, N) => {
|
|
1560
|
-
if (!b)
|
|
1561
|
-
return;
|
|
1562
|
-
const m = X(b.excludedMetadataKeys), K = N ? m.filter((S) => S !== i) : Array.from(/* @__PURE__ */ new Set([...m, i]));
|
|
1556
|
+
const m = Z(b.excludedTags), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
|
|
1563
1557
|
bt.mutate({ itemId: b.id, value: K });
|
|
1564
1558
|
},
|
|
1565
|
-
|
|
1559
|
+
onToggleMetadataKey: (r, N) => {
|
|
1566
1560
|
if (!b)
|
|
1567
1561
|
return;
|
|
1568
|
-
const m =
|
|
1562
|
+
const m = Z(b.excludedMetadataKeys), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
|
|
1569
1563
|
Nt.mutate({ itemId: b.id, value: K });
|
|
1570
1564
|
},
|
|
1571
|
-
|
|
1565
|
+
onToggleI18nPath: (r, N) => {
|
|
1572
1566
|
if (!b)
|
|
1573
1567
|
return;
|
|
1574
|
-
const m =
|
|
1568
|
+
const m = Z(b.excludedI18nPaths), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
|
|
1575
1569
|
vt.mutate({ itemId: b.id, value: K });
|
|
1570
|
+
},
|
|
1571
|
+
onTogglePermission: (r, N) => {
|
|
1572
|
+
if (!b)
|
|
1573
|
+
return;
|
|
1574
|
+
const m = Z(b.excludedPermissions), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
|
|
1575
|
+
wt.mutate({ itemId: b.id, value: K });
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
) }) : null
|
|
1579
1579
|
] }),
|
|
1580
1580
|
/* @__PURE__ */ e(
|
|
1581
|
-
|
|
1581
|
+
Wt,
|
|
1582
1582
|
{
|
|
1583
|
-
open:
|
|
1584
|
-
onOpenChange:
|
|
1583
|
+
open: E,
|
|
1584
|
+
onOpenChange: z,
|
|
1585
1585
|
releaseId: t,
|
|
1586
1586
|
apiPath: a,
|
|
1587
|
-
targetConfigIds:
|
|
1587
|
+
targetConfigIds: x.targetConfigIds ?? [],
|
|
1588
1588
|
targetNames: Object.fromEntries(
|
|
1589
|
-
(
|
|
1589
|
+
(x.targetConfigIds ?? []).map((r) => [r, F(r)])
|
|
1590
1590
|
),
|
|
1591
|
-
dependencyWarnings:
|
|
1591
|
+
dependencyWarnings: de
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
1594
1594
|
] }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
@@ -1599,14 +1599,14 @@ function mn({ releaseId: t, onBack: s }) {
|
|
|
1599
1599
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "Release not found." })
|
|
1600
1600
|
] });
|
|
1601
1601
|
}
|
|
1602
|
-
function it({ value: t, onChange: s, configs: a, label:
|
|
1603
|
-
const
|
|
1602
|
+
function it({ value: t, onChange: s, configs: a, label: i }) {
|
|
1603
|
+
const l = `cluster-select-${i.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1604
1604
|
return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1605
|
-
/* @__PURE__ */ e(
|
|
1605
|
+
/* @__PURE__ */ e(ie, { htmlFor: l, children: i }),
|
|
1606
1606
|
/* @__PURE__ */ n(
|
|
1607
1607
|
"select",
|
|
1608
1608
|
{
|
|
1609
|
-
id:
|
|
1609
|
+
id: l,
|
|
1610
1610
|
value: t,
|
|
1611
1611
|
onChange: (c) => s(c.target.value),
|
|
1612
1612
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
@@ -1618,12 +1618,12 @@ function it({ value: t, onChange: s, configs: a, label: r }) {
|
|
|
1618
1618
|
)
|
|
1619
1619
|
] });
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1622
|
-
var
|
|
1623
|
-
const a =
|
|
1621
|
+
function pn({ item: t, onClose: s }) {
|
|
1622
|
+
var i, l;
|
|
1623
|
+
const a = B(
|
|
1624
1624
|
() => {
|
|
1625
|
-
var c,
|
|
1626
|
-
return
|
|
1625
|
+
var c, o;
|
|
1626
|
+
return yt((c = t == null ? void 0 : t.diff) == null ? void 0 : c.origin, (o = t == null ? void 0 : t.diff) == null ? void 0 : o.target);
|
|
1627
1627
|
},
|
|
1628
1628
|
[t]
|
|
1629
1629
|
);
|
|
@@ -1636,8 +1636,8 @@ function hn({ item: t, onClose: s }) {
|
|
|
1636
1636
|
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", title: "Close", onClick: s, children: /* @__PURE__ */ e(be, {}) })
|
|
1637
1637
|
] }),
|
|
1638
1638
|
/* @__PURE__ */ n("div", { className: "flex flex-1 gap-3 overflow-auto p-3", children: [
|
|
1639
|
-
/* @__PURE__ */ e(Ee, { label: "Origin", value: (
|
|
1640
|
-
/* @__PURE__ */ e(Ee, { label: "Target", value: (
|
|
1639
|
+
/* @__PURE__ */ e(Ee, { label: "Origin", value: (i = t.diff) == null ? void 0 : i.origin, highlightLines: a }),
|
|
1640
|
+
/* @__PURE__ */ e(Ee, { label: "Target", value: (l = t.diff) == null ? void 0 : l.target })
|
|
1641
1641
|
] })
|
|
1642
1642
|
] }) : null;
|
|
1643
1643
|
}
|
|
@@ -1654,48 +1654,48 @@ function lt({
|
|
|
1654
1654
|
onClick: s,
|
|
1655
1655
|
active: a
|
|
1656
1656
|
}) {
|
|
1657
|
-
const
|
|
1657
|
+
const i = rt[t] ?? rt.match, l = t !== "match" && t !== "skip" && !!s;
|
|
1658
1658
|
return /* @__PURE__ */ e(
|
|
1659
1659
|
"button",
|
|
1660
1660
|
{
|
|
1661
1661
|
type: "button",
|
|
1662
|
-
onClick:
|
|
1663
|
-
disabled: !
|
|
1664
|
-
title:
|
|
1662
|
+
onClick: l ? s : void 0,
|
|
1663
|
+
disabled: !l,
|
|
1664
|
+
title: i.label,
|
|
1665
1665
|
className: ce(
|
|
1666
1666
|
"w-full text-center text-sm py-1 rounded",
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
!
|
|
1667
|
+
i.className,
|
|
1668
|
+
l && "hover:bg-muted cursor-pointer",
|
|
1669
|
+
!l && "cursor-default",
|
|
1670
1670
|
a && "bg-muted ring-1 ring-ring"
|
|
1671
1671
|
),
|
|
1672
|
-
children:
|
|
1672
|
+
children: i.symbol
|
|
1673
1673
|
}
|
|
1674
1674
|
);
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function fn({ stats: t, destConfigIds: s }) {
|
|
1677
1677
|
return /* @__PURE__ */ e("div", { className: "flex gap-6 text-xs text-muted-foreground py-2 px-1", children: s.map((a) => {
|
|
1678
|
-
const
|
|
1679
|
-
if (!
|
|
1678
|
+
const i = t[a];
|
|
1679
|
+
if (!i)
|
|
1680
1680
|
return null;
|
|
1681
|
-
const
|
|
1681
|
+
const l = i.match + i.diff + i.missing + i.extra;
|
|
1682
1682
|
return /* @__PURE__ */ n("span", { children: [
|
|
1683
1683
|
/* @__PURE__ */ n("span", { className: "font-mono font-medium", children: [
|
|
1684
|
-
|
|
1684
|
+
i.match,
|
|
1685
1685
|
"/",
|
|
1686
|
-
|
|
1686
|
+
l
|
|
1687
1687
|
] }),
|
|
1688
1688
|
" match",
|
|
1689
|
-
|
|
1690
|
-
|
|
1689
|
+
i.diff > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
|
|
1690
|
+
i.diff,
|
|
1691
1691
|
" diff"
|
|
1692
1692
|
] }),
|
|
1693
|
-
|
|
1694
|
-
|
|
1693
|
+
i.missing > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
|
|
1694
|
+
i.missing,
|
|
1695
1695
|
" missing"
|
|
1696
1696
|
] }),
|
|
1697
|
-
|
|
1698
|
-
|
|
1697
|
+
i.extra > 0 && /* @__PURE__ */ n("span", { className: "text-amber-600 ml-2", children: [
|
|
1698
|
+
i.extra,
|
|
1699
1699
|
" extra"
|
|
1700
1700
|
] })
|
|
1701
1701
|
] }, a);
|
|
@@ -1704,61 +1704,61 @@ function pn({ stats: t, destConfigIds: s }) {
|
|
|
1704
1704
|
function ot(t) {
|
|
1705
1705
|
return Object.values(t.cells).some((s) => s === "diff" || s === "missing" || s === "extra");
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function gn({
|
|
1708
1708
|
originConfigId: t,
|
|
1709
1709
|
destConfigIds: s,
|
|
1710
1710
|
apiPath: a = "/release-status"
|
|
1711
1711
|
}) {
|
|
1712
|
-
const { toast:
|
|
1713
|
-
const
|
|
1714
|
-
return
|
|
1715
|
-
}),
|
|
1716
|
-
const
|
|
1717
|
-
return c.forEach((
|
|
1718
|
-
}, [c]), D = (
|
|
1719
|
-
|
|
1720
|
-
const
|
|
1721
|
-
queryKey:
|
|
1722
|
-
queryFn: () =>
|
|
1723
|
-
enabled:
|
|
1724
|
-
}),
|
|
1725
|
-
mutationFn: () =>
|
|
1712
|
+
const { toast: i } = le(), { fetchJson: l } = ne(), { configs: c } = ye(), o = oe(), [u, p] = A("issues"), [w, v] = A(!1), [d, h] = A(null), [E, z] = A(/* @__PURE__ */ new Set()), [j, H] = A(() => /* @__PURE__ */ new Set()), _ = (y) => H((O) => {
|
|
1713
|
+
const S = new Set(O);
|
|
1714
|
+
return S.has(y) ? S.delete(y) : S.add(y), S;
|
|
1715
|
+
}), J = B(() => {
|
|
1716
|
+
const y = /* @__PURE__ */ new Map();
|
|
1717
|
+
return c.forEach((O) => y.set(O.id, O.displayName)), y;
|
|
1718
|
+
}, [c]), D = (y) => J.get(y) ?? y, L = s.filter((y) => !E.has(y)), x = new URLSearchParams();
|
|
1719
|
+
x.set("originConfigId", t), L.forEach((y) => x.append("destConfigIds[]", y));
|
|
1720
|
+
const k = ["imaginarium", "release-status", t, L], { data: C, isLoading: g, isError: R } = re({
|
|
1721
|
+
queryKey: k,
|
|
1722
|
+
queryFn: () => l(`${a}?${x.toString()}`),
|
|
1723
|
+
enabled: L.length > 0
|
|
1724
|
+
}), Q = U({
|
|
1725
|
+
mutationFn: () => l(`${a}/refresh`, {
|
|
1726
1726
|
method: "POST",
|
|
1727
|
-
body: JSON.stringify({ originConfigId: t, destConfigIds:
|
|
1727
|
+
body: JSON.stringify({ originConfigId: t, destConfigIds: L })
|
|
1728
1728
|
}),
|
|
1729
1729
|
onSuccess: () => {
|
|
1730
|
-
|
|
1730
|
+
o.invalidateQueries({ queryKey: k }), i({ title: "Cache cleared", description: "Refreshing comparison data…" });
|
|
1731
1731
|
},
|
|
1732
|
-
onError: (
|
|
1733
|
-
|
|
1732
|
+
onError: (y) => {
|
|
1733
|
+
i({ title: "Error", description: y.message, variant: "destructive" });
|
|
1734
1734
|
}
|
|
1735
1735
|
}), {
|
|
1736
|
-
data:
|
|
1737
|
-
isLoading:
|
|
1738
|
-
isError:
|
|
1739
|
-
} =
|
|
1740
|
-
queryKey: ["imaginarium", "release-status-diff", t,
|
|
1741
|
-
queryFn: () =>
|
|
1742
|
-
`${a}/diff?originConfigId=${encodeURIComponent(t)}&destConfigId=${encodeURIComponent(
|
|
1736
|
+
data: X,
|
|
1737
|
+
isLoading: G,
|
|
1738
|
+
isError: f
|
|
1739
|
+
} = re({
|
|
1740
|
+
queryKey: ["imaginarium", "release-status-diff", t, d == null ? void 0 : d.destConfigId, d == null ? void 0 : d.itemKey],
|
|
1741
|
+
queryFn: () => l(
|
|
1742
|
+
`${a}/diff?originConfigId=${encodeURIComponent(t)}&destConfigId=${encodeURIComponent(d.destConfigId)}&itemKey=${encodeURIComponent(d.itemKey)}`
|
|
1743
1743
|
),
|
|
1744
|
-
enabled: !!
|
|
1745
|
-
}),
|
|
1746
|
-
|
|
1747
|
-
const
|
|
1748
|
-
return
|
|
1744
|
+
enabled: !!d
|
|
1745
|
+
}), q = (y) => {
|
|
1746
|
+
z((O) => {
|
|
1747
|
+
const S = new Set(O);
|
|
1748
|
+
return S.has(y) ? S.delete(y) : S.add(y), S;
|
|
1749
1749
|
});
|
|
1750
|
-
},
|
|
1750
|
+
}, F = (y, O) => {
|
|
1751
1751
|
h(
|
|
1752
|
-
(
|
|
1752
|
+
(S) => (S == null ? void 0 : S.itemKey) === y && S.destConfigId === O ? null : { itemKey: y, destConfigId: O }
|
|
1753
1753
|
);
|
|
1754
|
-
}, I = (C == null ? void 0 : C.rows) ?? [],
|
|
1755
|
-
const
|
|
1756
|
-
return { node:
|
|
1754
|
+
}, I = (C == null ? void 0 : C.rows) ?? [], V = (C == null ? void 0 : C.stats) ?? {}, M = B(() => ln(I).map((O) => {
|
|
1755
|
+
const S = u === "issues" ? O.children.filter(ot) : O.children;
|
|
1756
|
+
return { node: O, renderChildren: S };
|
|
1757
1757
|
}).filter(
|
|
1758
|
-
({ node:
|
|
1759
|
-
).sort((
|
|
1760
|
-
const
|
|
1761
|
-
return
|
|
1758
|
+
({ node: O, renderChildren: S }) => u === "all" || ot(O.row) || S.length > 0
|
|
1759
|
+
).sort((O, S) => {
|
|
1760
|
+
const de = qe(O.node.row.itemType, S.node.row.itemType);
|
|
1761
|
+
return de !== 0 ? de : O.node.row.itemName.localeCompare(S.node.row.itemName);
|
|
1762
1762
|
}), [I, u]);
|
|
1763
1763
|
return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
1764
1764
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
@@ -1780,7 +1780,7 @@ function fn({
|
|
|
1780
1780
|
}
|
|
1781
1781
|
)
|
|
1782
1782
|
] }),
|
|
1783
|
-
/* @__PURE__ */ n($, { variant: "ghost", size: "sm", onClick: () =>
|
|
1783
|
+
/* @__PURE__ */ n($, { variant: "ghost", size: "sm", onClick: () => v((y) => !y), children: [
|
|
1784
1784
|
/* @__PURE__ */ e(At, {}),
|
|
1785
1785
|
"Stats"
|
|
1786
1786
|
] }),
|
|
@@ -1789,98 +1789,98 @@ function fn({
|
|
|
1789
1789
|
{
|
|
1790
1790
|
variant: "ghost",
|
|
1791
1791
|
size: "sm",
|
|
1792
|
-
onClick: () =>
|
|
1793
|
-
disabled:
|
|
1792
|
+
onClick: () => Q.mutate(),
|
|
1793
|
+
disabled: Q.isPending,
|
|
1794
1794
|
children: [
|
|
1795
|
-
/* @__PURE__ */ e(
|
|
1795
|
+
/* @__PURE__ */ e(ft, { className: ce(Q.isPending && "animate-spin") }),
|
|
1796
1796
|
"Refresh"
|
|
1797
1797
|
]
|
|
1798
1798
|
}
|
|
1799
1799
|
),
|
|
1800
|
-
[...
|
|
1800
|
+
[...E].map((y) => /* @__PURE__ */ n(
|
|
1801
1801
|
"button",
|
|
1802
1802
|
{
|
|
1803
|
-
onClick: () =>
|
|
1803
|
+
onClick: () => q(y),
|
|
1804
1804
|
className: "text-xs border rounded px-2 py-1 text-muted-foreground hover:bg-muted",
|
|
1805
1805
|
children: [
|
|
1806
1806
|
"+ ",
|
|
1807
|
-
D(
|
|
1807
|
+
D(y)
|
|
1808
1808
|
]
|
|
1809
1809
|
},
|
|
1810
|
-
|
|
1810
|
+
y
|
|
1811
1811
|
))
|
|
1812
1812
|
] }),
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
!
|
|
1817
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 rounded-md border overflow-
|
|
1813
|
+
w && C && /* @__PURE__ */ e(fn, { stats: V, destConfigIds: L }),
|
|
1814
|
+
g && /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }),
|
|
1815
|
+
R && /* @__PURE__ */ e("div", { className: "text-center text-destructive py-8", children: "Failed to load comparison data." }),
|
|
1816
|
+
!g && !R && /* @__PURE__ */ n("div", { className: "flex gap-4", children: [
|
|
1817
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 rounded-md border overflow-auto max-h-[70vh]", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
|
|
1818
1818
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b bg-muted/50", children: [
|
|
1819
|
-
/* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium min-w-[200px]", children: "Item" }),
|
|
1820
|
-
|
|
1821
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[120px]", title: D(
|
|
1819
|
+
/* @__PURE__ */ e("th", { className: "sticky top-0 z-10 bg-muted px-4 py-2 text-left font-medium min-w-[200px]", children: "Item" }),
|
|
1820
|
+
L.map((y) => /* @__PURE__ */ e("th", { className: "sticky top-0 z-10 bg-muted px-2 py-2 text-center font-medium min-w-[80px]", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-center gap-1", children: [
|
|
1821
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[120px]", title: D(y), children: D(y) }),
|
|
1822
1822
|
/* @__PURE__ */ e(
|
|
1823
1823
|
"button",
|
|
1824
1824
|
{
|
|
1825
1825
|
className: "text-muted-foreground hover:text-foreground",
|
|
1826
|
-
onClick: () =>
|
|
1826
|
+
onClick: () => q(y),
|
|
1827
1827
|
title: "Hide column",
|
|
1828
1828
|
children: "×"
|
|
1829
1829
|
}
|
|
1830
1830
|
)
|
|
1831
|
-
] }) },
|
|
1831
|
+
] }) }, y))
|
|
1832
1832
|
] }) }),
|
|
1833
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
1834
|
-
const
|
|
1835
|
-
return /* @__PURE__ */ n(
|
|
1833
|
+
/* @__PURE__ */ e("tbody", { children: M.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: L.length + 1, className: "text-center text-muted-foreground py-8", children: u === "issues" ? "No issues found — all clusters in sync." : "No items." }) }) : M.map(({ node: y, renderChildren: O }) => {
|
|
1834
|
+
const S = y.row, de = O.length > 0, ue = j.has(S.itemKey) || u === "issues", Ne = j.has(S.itemKey);
|
|
1835
|
+
return /* @__PURE__ */ n(ut, { children: [
|
|
1836
1836
|
/* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
|
|
1837
1837
|
/* @__PURE__ */ e("td", { className: "px-4 py-1.5", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1838
|
-
|
|
1838
|
+
de ? /* @__PURE__ */ e(
|
|
1839
1839
|
"button",
|
|
1840
1840
|
{
|
|
1841
1841
|
type: "button",
|
|
1842
1842
|
className: "text-muted-foreground hover:text-foreground",
|
|
1843
|
-
onClick: () =>
|
|
1843
|
+
onClick: () => _(S.itemKey),
|
|
1844
1844
|
"aria-label": Ne ? "Collapse" : "Expand",
|
|
1845
1845
|
children: Ne ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
|
|
1846
1846
|
}
|
|
1847
1847
|
) : null,
|
|
1848
|
-
/* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type:
|
|
1849
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
1848
|
+
/* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: S.itemType }) }),
|
|
1849
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: S.itemName })
|
|
1850
1850
|
] }) }),
|
|
1851
|
-
|
|
1851
|
+
L.map((Y) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
|
|
1852
1852
|
lt,
|
|
1853
1853
|
{
|
|
1854
|
-
state:
|
|
1855
|
-
active: (
|
|
1856
|
-
onClick: () =>
|
|
1854
|
+
state: S.cells[Y] ?? "match",
|
|
1855
|
+
active: (d == null ? void 0 : d.itemKey) === S.itemKey && d.destConfigId === Y,
|
|
1856
|
+
onClick: () => F(S.itemKey, Y)
|
|
1857
1857
|
}
|
|
1858
|
-
) },
|
|
1858
|
+
) }, Y))
|
|
1859
1859
|
] }),
|
|
1860
|
-
|
|
1860
|
+
de && ue ? O.map((Y) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
|
|
1861
1861
|
/* @__PURE__ */ e("td", { className: "px-4 py-1.5 pl-8", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1862
|
-
/* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type:
|
|
1863
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
1862
|
+
/* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: Y.itemType }) }),
|
|
1863
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: Y.itemName })
|
|
1864
1864
|
] }) }),
|
|
1865
|
-
|
|
1865
|
+
L.map((ee) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
|
|
1866
1866
|
lt,
|
|
1867
1867
|
{
|
|
1868
|
-
state:
|
|
1869
|
-
active: (
|
|
1870
|
-
onClick: () =>
|
|
1868
|
+
state: Y.cells[ee] ?? "match",
|
|
1869
|
+
active: (d == null ? void 0 : d.itemKey) === Y.itemKey && d.destConfigId === ee,
|
|
1870
|
+
onClick: () => F(Y.itemKey, ee)
|
|
1871
1871
|
}
|
|
1872
|
-
) },
|
|
1873
|
-
] },
|
|
1874
|
-
] },
|
|
1872
|
+
) }, ee))
|
|
1873
|
+
] }, Y.itemKey)) : null
|
|
1874
|
+
] }, S.itemKey);
|
|
1875
1875
|
}) })
|
|
1876
1876
|
] }) }),
|
|
1877
|
-
|
|
1878
|
-
|
|
1877
|
+
d ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: G ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "Loading diff…" }) : f || !X ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "No diff available." }) : /* @__PURE__ */ e(
|
|
1878
|
+
pn,
|
|
1879
1879
|
{
|
|
1880
1880
|
item: {
|
|
1881
|
-
itemName:
|
|
1882
|
-
itemType:
|
|
1883
|
-
diff: { origin:
|
|
1881
|
+
itemName: X.itemName,
|
|
1882
|
+
itemType: X.itemType,
|
|
1883
|
+
diff: { origin: X.origin, target: X.target }
|
|
1884
1884
|
},
|
|
1885
1885
|
onClose: () => h(null)
|
|
1886
1886
|
}
|
|
@@ -1888,11 +1888,6 @@ function fn({
|
|
|
1888
1888
|
] })
|
|
1889
1889
|
] });
|
|
1890
1890
|
}
|
|
1891
|
-
function gn(t, s) {
|
|
1892
|
-
return [...t].sort(
|
|
1893
|
-
(a, r) => (s[a] ?? a).localeCompare(s[r] ?? r, void 0, { sensitivity: "base" })
|
|
1894
|
-
);
|
|
1895
|
-
}
|
|
1896
1891
|
const dt = (t) => ({
|
|
1897
1892
|
name: "",
|
|
1898
1893
|
description: "",
|
|
@@ -1903,95 +1898,95 @@ function xn({
|
|
|
1903
1898
|
clusterNames: s = {},
|
|
1904
1899
|
apiPath: a = "/release-translations"
|
|
1905
1900
|
}) {
|
|
1906
|
-
const { toast:
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
return
|
|
1901
|
+
const { toast: i } = le(), { fetchJson: l } = ne(), c = oe(), [o, u] = A(!1), [p, w] = A(null), [v, d] = A(dt(t)), [h, E] = A(() => /* @__PURE__ */ new Set()), z = (f) => {
|
|
1902
|
+
E((q) => {
|
|
1903
|
+
const F = new Set(q);
|
|
1904
|
+
return F.has(f) ? F.delete(f) : F.add(f), F;
|
|
1910
1905
|
});
|
|
1911
|
-
},
|
|
1912
|
-
queryKey:
|
|
1906
|
+
}, j = ["imaginarium", "release-translations"], { data: H, isLoading: _ } = re({
|
|
1907
|
+
queryKey: j,
|
|
1913
1908
|
queryFn: async () => {
|
|
1914
|
-
const f = await
|
|
1909
|
+
const f = await l(a);
|
|
1915
1910
|
return (f == null ? void 0 : f.items) ?? [];
|
|
1916
1911
|
}
|
|
1917
|
-
}),
|
|
1912
|
+
}), J = U({
|
|
1918
1913
|
mutationFn: async (f) => {
|
|
1919
|
-
const
|
|
1914
|
+
const q = await l(a, {
|
|
1920
1915
|
method: "POST",
|
|
1921
1916
|
body: JSON.stringify({ name: f.name.trim(), description: f.description.trim() || null })
|
|
1922
1917
|
});
|
|
1923
|
-
await
|
|
1918
|
+
await x(q.id, f.values);
|
|
1924
1919
|
},
|
|
1925
1920
|
onSuccess: () => {
|
|
1926
|
-
c.invalidateQueries({ queryKey:
|
|
1921
|
+
c.invalidateQueries({ queryKey: j }), i({ title: "Translation created" }), g();
|
|
1927
1922
|
},
|
|
1928
|
-
onError: (f) =>
|
|
1929
|
-
}),
|
|
1923
|
+
onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
|
|
1924
|
+
}), D = U({
|
|
1930
1925
|
mutationFn: async (f) => {
|
|
1931
|
-
await
|
|
1926
|
+
await l(`${a}/${p.id}`, {
|
|
1932
1927
|
method: "PATCH",
|
|
1933
1928
|
body: JSON.stringify({ name: f.name.trim(), description: f.description.trim() || null })
|
|
1934
|
-
}), await
|
|
1929
|
+
}), await x(p.id, f.values);
|
|
1935
1930
|
},
|
|
1936
1931
|
onSuccess: () => {
|
|
1937
|
-
c.invalidateQueries({ queryKey:
|
|
1932
|
+
c.invalidateQueries({ queryKey: j }), i({ title: "Translation updated" }), g();
|
|
1938
1933
|
},
|
|
1939
|
-
onError: (f) =>
|
|
1940
|
-
}),
|
|
1941
|
-
mutationFn: (f) =>
|
|
1934
|
+
onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
|
|
1935
|
+
}), L = U({
|
|
1936
|
+
mutationFn: (f) => l(`${a}/${f}`, { method: "DELETE" }),
|
|
1942
1937
|
onSuccess: () => {
|
|
1943
|
-
c.invalidateQueries({ queryKey:
|
|
1938
|
+
c.invalidateQueries({ queryKey: j }), i({ title: "Translation deleted" });
|
|
1944
1939
|
},
|
|
1945
|
-
onError: (f) =>
|
|
1940
|
+
onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
|
|
1946
1941
|
});
|
|
1947
|
-
async function
|
|
1948
|
-
var
|
|
1949
|
-
const
|
|
1942
|
+
async function x(f, q) {
|
|
1943
|
+
var I;
|
|
1944
|
+
const F = (p == null ? void 0 : p.values) ?? [];
|
|
1950
1945
|
for (const V of t) {
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1946
|
+
const M = (I = q[V]) == null ? void 0 : I.trim(), y = F.find((S) => S.configId === V), O = `${a}/${f}/values`;
|
|
1947
|
+
y && M ? await l(`${O}/${y.id}`, {
|
|
1953
1948
|
method: "PATCH",
|
|
1954
|
-
body: JSON.stringify({ value:
|
|
1955
|
-
}) :
|
|
1949
|
+
body: JSON.stringify({ value: M })
|
|
1950
|
+
}) : y && !M ? await l(`${O}/${y.id}`, { method: "DELETE" }) : !y && M && await l(O, {
|
|
1956
1951
|
method: "POST",
|
|
1957
|
-
body: JSON.stringify({ translationId: f, configId: V, value:
|
|
1952
|
+
body: JSON.stringify({ translationId: f, configId: V, value: M })
|
|
1958
1953
|
});
|
|
1959
1954
|
}
|
|
1960
1955
|
}
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
},
|
|
1964
|
-
|
|
1965
|
-
const
|
|
1966
|
-
t.map((
|
|
1956
|
+
const k = () => {
|
|
1957
|
+
w(null), d(dt(t)), u(!0);
|
|
1958
|
+
}, C = (f) => {
|
|
1959
|
+
w(f);
|
|
1960
|
+
const q = f.values ?? [], F = Object.fromEntries(
|
|
1961
|
+
t.map((I) => {
|
|
1967
1962
|
var V;
|
|
1968
|
-
return [
|
|
1963
|
+
return [I, ((V = q.find((M) => M.configId === I)) == null ? void 0 : V.value) ?? ""];
|
|
1969
1964
|
})
|
|
1970
1965
|
);
|
|
1971
|
-
|
|
1972
|
-
},
|
|
1973
|
-
|
|
1974
|
-
},
|
|
1975
|
-
|
|
1976
|
-
},
|
|
1977
|
-
if (
|
|
1966
|
+
d({ name: f.name, description: f.description ?? "", values: F }), u(!0);
|
|
1967
|
+
}, g = () => {
|
|
1968
|
+
u(!1), w(null);
|
|
1969
|
+
}, R = () => {
|
|
1970
|
+
p ? D.mutate(v) : J.mutate(v);
|
|
1971
|
+
}, Q = J.isPending || D.isPending, X = !!v.name.trim();
|
|
1972
|
+
if (_)
|
|
1978
1973
|
return /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" });
|
|
1979
1974
|
const G = [...H ?? []].sort(
|
|
1980
|
-
(f,
|
|
1975
|
+
(f, q) => f.name.localeCompare(q.name, void 0, { sensitivity: "base" })
|
|
1981
1976
|
);
|
|
1982
1977
|
return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
1983
1978
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
1984
1979
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: G.length === 0 ? "No translation rules yet." : `${G.length} translation rule${G.length === 1 ? "" : "s"}.` }),
|
|
1985
|
-
/* @__PURE__ */ n($, { size: "sm", onClick:
|
|
1980
|
+
/* @__PURE__ */ n($, { size: "sm", onClick: k, children: [
|
|
1986
1981
|
/* @__PURE__ */ e(De, {}),
|
|
1987
1982
|
"Add translation"
|
|
1988
1983
|
] })
|
|
1989
1984
|
] }),
|
|
1990
1985
|
G.length > 0 && /* @__PURE__ */ e("div", { className: "rounded-md border divide-y text-sm", children: G.map((f) => {
|
|
1991
|
-
const
|
|
1992
|
-
var
|
|
1993
|
-
return ((
|
|
1994
|
-
}, V =
|
|
1986
|
+
const q = h.has(f.id), F = f.values ?? [], I = (M) => {
|
|
1987
|
+
var y;
|
|
1988
|
+
return ((y = F.find((O) => O.configId === M)) == null ? void 0 : y.value) ?? "";
|
|
1989
|
+
}, V = t.filter((M) => I(M)).length;
|
|
1995
1990
|
return /* @__PURE__ */ n("div", { children: [
|
|
1996
1991
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 px-4 py-2 hover:bg-muted/25", children: [
|
|
1997
1992
|
/* @__PURE__ */ n(
|
|
@@ -1999,11 +1994,14 @@ function xn({
|
|
|
1999
1994
|
{
|
|
2000
1995
|
type: "button",
|
|
2001
1996
|
onClick: () => z(f.id),
|
|
2002
|
-
"aria-expanded":
|
|
1997
|
+
"aria-expanded": q,
|
|
2003
1998
|
className: "flex flex-1 min-w-0 items-center gap-3 text-left",
|
|
2004
1999
|
children: [
|
|
2005
|
-
|
|
2006
|
-
/* @__PURE__ */
|
|
2000
|
+
q ? /* @__PURE__ */ e(ge, { className: "size-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(xe, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2001
|
+
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
2002
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: f.name }),
|
|
2003
|
+
f.description && /* @__PURE__ */ e("div", { className: "truncate text-xs text-muted-foreground", children: f.description })
|
|
2004
|
+
] }),
|
|
2007
2005
|
/* @__PURE__ */ n("div", { className: "shrink-0 whitespace-nowrap text-xs text-muted-foreground", children: [
|
|
2008
2006
|
V,
|
|
2009
2007
|
" of ",
|
|
@@ -2014,71 +2012,68 @@ function xn({
|
|
|
2014
2012
|
}
|
|
2015
2013
|
),
|
|
2016
2014
|
/* @__PURE__ */ n("div", { className: "flex shrink-0 gap-1", children: [
|
|
2017
|
-
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", onClick: () =>
|
|
2015
|
+
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", onClick: () => C(f), children: /* @__PURE__ */ e(Mt, {}) }),
|
|
2018
2016
|
/* @__PURE__ */ e(
|
|
2019
2017
|
$,
|
|
2020
2018
|
{
|
|
2021
2019
|
variant: "ghost",
|
|
2022
2020
|
size: "icon",
|
|
2023
2021
|
onClick: () => {
|
|
2024
|
-
window.confirm(`Delete translation "${f.name}"?`) &&
|
|
2022
|
+
window.confirm(`Delete translation "${f.name}"?`) && L.mutate(f.id);
|
|
2025
2023
|
},
|
|
2026
|
-
children: /* @__PURE__ */ e(
|
|
2024
|
+
children: /* @__PURE__ */ e(gt, {})
|
|
2027
2025
|
}
|
|
2028
2026
|
)
|
|
2029
2027
|
] })
|
|
2030
2028
|
] }),
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
/* @__PURE__ */ e("span", { className: "break-all font-mono", children: L(g) || /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "—" }) })
|
|
2036
|
-
] }, g))
|
|
2037
|
-
] })
|
|
2029
|
+
q && /* @__PURE__ */ e("div", { className: "space-y-1 px-4 pb-3 pl-11", children: t.map((M) => /* @__PURE__ */ n("div", { className: "grid grid-cols-[10rem_1fr] gap-2 text-xs", children: [
|
|
2030
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: s[M] ?? M }),
|
|
2031
|
+
/* @__PURE__ */ e("span", { className: "break-all font-mono", children: I(M) || /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "—" }) })
|
|
2032
|
+
] }, M)) })
|
|
2038
2033
|
] }, f.id);
|
|
2039
2034
|
}) }),
|
|
2040
|
-
/* @__PURE__ */ e(
|
|
2041
|
-
/* @__PURE__ */ n(
|
|
2042
|
-
/* @__PURE__ */ e(Oe, { children:
|
|
2043
|
-
/* @__PURE__ */ e(
|
|
2035
|
+
/* @__PURE__ */ e(Ke, { open: o, onOpenChange: u, children: /* @__PURE__ */ n($e, { className: "max-w-lg", children: [
|
|
2036
|
+
/* @__PURE__ */ n(Ie, { children: [
|
|
2037
|
+
/* @__PURE__ */ e(Oe, { children: p ? `Edit ${p.name}` : "New Translation Rule" }),
|
|
2038
|
+
/* @__PURE__ */ e(Re, { children: "Set the equivalent values for each cluster. Rules with values on only one side of a pair are silently skipped for that comparison." })
|
|
2044
2039
|
] }),
|
|
2045
2040
|
/* @__PURE__ */ n("div", { className: "space-y-4 py-2", children: [
|
|
2046
2041
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
2047
|
-
/* @__PURE__ */ e(
|
|
2042
|
+
/* @__PURE__ */ e(ie, { htmlFor: "tr-name", children: "Name" }),
|
|
2048
2043
|
/* @__PURE__ */ e(
|
|
2049
2044
|
he,
|
|
2050
2045
|
{
|
|
2051
2046
|
id: "tr-name",
|
|
2052
|
-
value:
|
|
2053
|
-
onChange: (f) =>
|
|
2047
|
+
value: v.name,
|
|
2048
|
+
onChange: (f) => d({ ...v, name: f.target.value }),
|
|
2054
2049
|
placeholder: "key (ex. molten-url)"
|
|
2055
2050
|
}
|
|
2056
2051
|
)
|
|
2057
2052
|
] }),
|
|
2058
2053
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
2059
|
-
/* @__PURE__ */ e(
|
|
2054
|
+
/* @__PURE__ */ e(ie, { htmlFor: "tr-desc", children: "Description (optional)" }),
|
|
2060
2055
|
/* @__PURE__ */ e(
|
|
2061
2056
|
he,
|
|
2062
2057
|
{
|
|
2063
2058
|
id: "tr-desc",
|
|
2064
|
-
value:
|
|
2065
|
-
onChange: (f) =>
|
|
2059
|
+
value: v.description,
|
|
2060
|
+
onChange: (f) => d({ ...v, description: f.target.value }),
|
|
2066
2061
|
placeholder: "Explain what this value represents"
|
|
2067
2062
|
}
|
|
2068
2063
|
)
|
|
2069
2064
|
] }),
|
|
2070
2065
|
/* @__PURE__ */ n("div", { className: "space-y-3 pt-1", children: [
|
|
2071
2066
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "Values per cluster" }),
|
|
2072
|
-
|
|
2073
|
-
/* @__PURE__ */ e(
|
|
2067
|
+
t.map((f) => /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
2068
|
+
/* @__PURE__ */ e(ie, { htmlFor: `tr-val-${f}`, className: "text-xs text-muted-foreground", children: s[f] ?? f }),
|
|
2074
2069
|
/* @__PURE__ */ e(
|
|
2075
2070
|
he,
|
|
2076
2071
|
{
|
|
2077
2072
|
id: `tr-val-${f}`,
|
|
2078
|
-
value:
|
|
2079
|
-
onChange: (
|
|
2080
|
-
...
|
|
2081
|
-
values: { ...
|
|
2073
|
+
value: v.values[f] ?? "",
|
|
2074
|
+
onChange: (q) => d({
|
|
2075
|
+
...v,
|
|
2076
|
+
values: { ...v.values, [f]: q.target.value }
|
|
2082
2077
|
}),
|
|
2083
2078
|
placeholder: "Leave blank to remove",
|
|
2084
2079
|
className: "font-mono text-xs"
|
|
@@ -2087,14 +2082,14 @@ function xn({
|
|
|
2087
2082
|
] }, f))
|
|
2088
2083
|
] })
|
|
2089
2084
|
] }),
|
|
2090
|
-
/* @__PURE__ */ n(
|
|
2091
|
-
/* @__PURE__ */ n($, { variant: "outline", onClick:
|
|
2085
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
2086
|
+
/* @__PURE__ */ n($, { variant: "outline", onClick: g, children: [
|
|
2092
2087
|
/* @__PURE__ */ e(be, {}),
|
|
2093
2088
|
"Cancel"
|
|
2094
2089
|
] }),
|
|
2095
|
-
/* @__PURE__ */ n($, { onClick:
|
|
2096
|
-
/* @__PURE__ */ e(
|
|
2097
|
-
|
|
2090
|
+
/* @__PURE__ */ n($, { onClick: R, disabled: !X || Q, children: [
|
|
2091
|
+
/* @__PURE__ */ e(ht, {}),
|
|
2092
|
+
Q ? "Saving…" : "Save"
|
|
2098
2093
|
] })
|
|
2099
2094
|
] })
|
|
2100
2095
|
] }) })
|
|
@@ -2104,63 +2099,63 @@ function yn({
|
|
|
2104
2099
|
originConfigId: t,
|
|
2105
2100
|
apiPath: s = "/release-ignores"
|
|
2106
2101
|
}) {
|
|
2107
|
-
const { toast: a } =
|
|
2102
|
+
const { toast: a } = le(), { fetchJson: i } = ne(), l = oe(), c = ["imaginarium", "release-ignores", t], { data: o, isLoading: u } = re({
|
|
2108
2103
|
queryKey: c,
|
|
2109
2104
|
queryFn: async () => {
|
|
2110
|
-
const h = await
|
|
2105
|
+
const h = await i(
|
|
2111
2106
|
`${s}?where[originConfigId]=${encodeURIComponent(t)}`
|
|
2112
2107
|
);
|
|
2113
2108
|
return (h == null ? void 0 : h.items) ?? [];
|
|
2114
2109
|
}
|
|
2115
2110
|
}), p = U({
|
|
2116
|
-
mutationFn: (h) =>
|
|
2111
|
+
mutationFn: (h) => i(`${s}/${h}`, { method: "DELETE" }),
|
|
2117
2112
|
onSuccess: () => {
|
|
2118
|
-
|
|
2113
|
+
l.invalidateQueries({ queryKey: c }), a({ title: "Item removed from ignore list" });
|
|
2119
2114
|
},
|
|
2120
2115
|
onError: (h) => {
|
|
2121
2116
|
a({ title: "Error", description: h.message, variant: "destructive" });
|
|
2122
2117
|
}
|
|
2123
|
-
}),
|
|
2124
|
-
mutationFn: () =>
|
|
2118
|
+
}), w = U({
|
|
2119
|
+
mutationFn: () => i(`${s}?originConfigId=${encodeURIComponent(t)}`, {
|
|
2125
2120
|
method: "DELETE"
|
|
2126
2121
|
}),
|
|
2127
2122
|
onSuccess: () => {
|
|
2128
|
-
|
|
2123
|
+
l.invalidateQueries({ queryKey: c }), a({ title: "All ignore rules cleared" });
|
|
2129
2124
|
},
|
|
2130
2125
|
onError: (h) => {
|
|
2131
2126
|
a({ title: "Error", description: h.message, variant: "destructive" });
|
|
2132
2127
|
}
|
|
2133
|
-
}),
|
|
2134
|
-
window.confirm("Remove all ignore rules for this cluster? Items will appear normally in future snapshots.") &&
|
|
2128
|
+
}), v = () => {
|
|
2129
|
+
window.confirm("Remove all ignore rules for this cluster? Items will appear normally in future snapshots.") && w.mutate();
|
|
2135
2130
|
};
|
|
2136
2131
|
if (u)
|
|
2137
2132
|
return /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" });
|
|
2138
|
-
const
|
|
2133
|
+
const d = o ?? [];
|
|
2139
2134
|
return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
2140
2135
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
2141
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children:
|
|
2142
|
-
|
|
2136
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: d.length === 0 ? "No items are permanently ignored." : `${d.length} item${d.length === 1 ? "" : "s"} permanently ignored for this cluster.` }),
|
|
2137
|
+
d.length > 0 && /* @__PURE__ */ n(
|
|
2143
2138
|
$,
|
|
2144
2139
|
{
|
|
2145
2140
|
variant: "outline",
|
|
2146
2141
|
size: "sm",
|
|
2147
|
-
onClick:
|
|
2148
|
-
disabled:
|
|
2142
|
+
onClick: v,
|
|
2143
|
+
disabled: w.isPending,
|
|
2149
2144
|
children: [
|
|
2150
2145
|
/* @__PURE__ */ e(Fe, {}),
|
|
2151
|
-
|
|
2146
|
+
w.isPending ? "Clearing…" : "Clear all"
|
|
2152
2147
|
]
|
|
2153
2148
|
}
|
|
2154
2149
|
)
|
|
2155
2150
|
] }),
|
|
2156
|
-
|
|
2151
|
+
d.length > 0 && /* @__PURE__ */ e("div", { className: "rounded-md border", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
|
|
2157
2152
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b bg-muted/50", children: [
|
|
2158
2153
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Type" }),
|
|
2159
2154
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Name" }),
|
|
2160
2155
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Reason" }),
|
|
2161
2156
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 text-right font-medium" })
|
|
2162
2157
|
] }) }),
|
|
2163
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
2158
|
+
/* @__PURE__ */ e("tbody", { children: d.map((h) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
|
|
2164
2159
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 text-muted-foreground font-mono text-xs", children: h.itemType }),
|
|
2165
2160
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 font-medium", children: h.itemName }),
|
|
2166
2161
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 text-muted-foreground", children: h.reason ?? /* @__PURE__ */ e("span", { className: "italic text-xs", children: "—" }) }),
|
|
@@ -2172,117 +2167,135 @@ function yn({
|
|
|
2172
2167
|
title: "Remove from ignore list",
|
|
2173
2168
|
onClick: () => p.mutate(h.id),
|
|
2174
2169
|
disabled: p.isPending,
|
|
2175
|
-
children: /* @__PURE__ */ e(
|
|
2170
|
+
children: /* @__PURE__ */ e(gt, {})
|
|
2176
2171
|
}
|
|
2177
2172
|
) })
|
|
2178
2173
|
] }, h.id)) })
|
|
2179
2174
|
] }) })
|
|
2180
2175
|
] });
|
|
2181
2176
|
}
|
|
2182
|
-
|
|
2177
|
+
function bn(t, s) {
|
|
2178
|
+
return [...t].sort(
|
|
2179
|
+
(a, i) => (s[a] ?? a).localeCompare(s[i] ?? i, void 0, { sensitivity: "base" })
|
|
2180
|
+
);
|
|
2181
|
+
}
|
|
2182
|
+
const ct = ["dev", "stg", "prd"];
|
|
2183
|
+
function Nn(t) {
|
|
2184
|
+
const s = (t.tags ?? []).map((i) => i.toLowerCase()), a = ct.findIndex((i) => s.includes(i));
|
|
2185
|
+
return a === -1 ? ct.length : a;
|
|
2186
|
+
}
|
|
2187
|
+
function vn(t) {
|
|
2188
|
+
const s = Object.fromEntries(t.map((l) => [l.id, l.displayName])), a = /* @__PURE__ */ new Map();
|
|
2189
|
+
for (const l of t) {
|
|
2190
|
+
const c = Nn(l);
|
|
2191
|
+
a.has(c) || a.set(c, []), a.get(c).push(l.id);
|
|
2192
|
+
}
|
|
2193
|
+
return [...a.keys()].sort((l, c) => l - c).flatMap((l) => bn(a.get(l), s));
|
|
2194
|
+
}
|
|
2195
|
+
const wn = [
|
|
2183
2196
|
{ id: "releases", label: "Releases" },
|
|
2184
2197
|
{ id: "status", label: "Status" },
|
|
2185
2198
|
{ id: "translations", label: "Translations" },
|
|
2186
2199
|
{ id: "ignored", label: "Ignored" }
|
|
2187
2200
|
];
|
|
2188
|
-
function
|
|
2189
|
-
var
|
|
2190
|
-
const [t, s] =
|
|
2201
|
+
function kn() {
|
|
2202
|
+
var d;
|
|
2203
|
+
const [t, s] = A("releases"), [a, i] = A(null), { configs: l } = ye(), [c, o] = A("");
|
|
2191
2204
|
je(() => {
|
|
2192
|
-
!c &&
|
|
2193
|
-
}, [c,
|
|
2194
|
-
const u =
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2197
|
-
|
|
2198
|
-
}),
|
|
2199
|
-
}, [
|
|
2205
|
+
!c && l.length > 0 && o(l[0].id);
|
|
2206
|
+
}, [c, l]);
|
|
2207
|
+
const u = B(() => {
|
|
2208
|
+
const h = {};
|
|
2209
|
+
return l.forEach((E) => {
|
|
2210
|
+
h[E.id] = E.displayName;
|
|
2211
|
+
}), h;
|
|
2212
|
+
}, [l]), p = c || ((d = l[0]) == null ? void 0 : d.id) || "", w = B(() => vn(l), [l]), v = w.filter((h) => h !== p);
|
|
2200
2213
|
return /* @__PURE__ */ n("div", { className: "space-y-6", children: [
|
|
2201
2214
|
/* @__PURE__ */ n("div", { children: [
|
|
2202
2215
|
/* @__PURE__ */ e("h2", { className: "text-2xl font-semibold", children: "imp" }),
|
|
2203
2216
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Manage releases across clusters" })
|
|
2204
2217
|
] }),
|
|
2205
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b pb-2", children:
|
|
2218
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b pb-2", children: wn.map(({ id: h, label: E }) => /* @__PURE__ */ e(
|
|
2206
2219
|
$,
|
|
2207
2220
|
{
|
|
2208
|
-
variant: t ===
|
|
2221
|
+
variant: t === h ? "secondary" : "ghost",
|
|
2209
2222
|
size: "sm",
|
|
2210
|
-
onClick: () => s(
|
|
2211
|
-
children:
|
|
2223
|
+
onClick: () => s(h),
|
|
2224
|
+
children: E
|
|
2212
2225
|
},
|
|
2213
|
-
|
|
2226
|
+
h
|
|
2214
2227
|
)) }),
|
|
2215
|
-
t === "releases" && (a == null ? /* @__PURE__ */ e(
|
|
2216
|
-
t === "status" && (
|
|
2228
|
+
t === "releases" && (a == null ? /* @__PURE__ */ e(Lt, { onOpen: i }) : /* @__PURE__ */ e(hn, { releaseId: a, onBack: () => i(null) })),
|
|
2229
|
+
t === "status" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
2217
2230
|
/* @__PURE__ */ e("div", { className: "max-w-xs", children: /* @__PURE__ */ e(
|
|
2218
2231
|
it,
|
|
2219
2232
|
{
|
|
2220
2233
|
label: "Reference",
|
|
2221
2234
|
value: p,
|
|
2222
|
-
onChange:
|
|
2223
|
-
configs:
|
|
2235
|
+
onChange: o,
|
|
2236
|
+
configs: l
|
|
2224
2237
|
}
|
|
2225
2238
|
) }),
|
|
2226
|
-
p ? /* @__PURE__ */ e(
|
|
2239
|
+
p ? /* @__PURE__ */ e(gn, { originConfigId: p, destConfigIds: v }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Select a reference cluster." })
|
|
2227
2240
|
] })),
|
|
2228
|
-
t === "translations" && (
|
|
2229
|
-
t === "ignored" && (
|
|
2241
|
+
t === "translations" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ e(xn, { configIds: w, clusterNames: u })),
|
|
2242
|
+
t === "ignored" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
2230
2243
|
/* @__PURE__ */ e("div", { className: "max-w-xs", children: /* @__PURE__ */ e(
|
|
2231
2244
|
it,
|
|
2232
2245
|
{
|
|
2233
2246
|
label: "Cluster",
|
|
2234
2247
|
value: p,
|
|
2235
|
-
onChange:
|
|
2236
|
-
configs:
|
|
2248
|
+
onChange: o,
|
|
2249
|
+
configs: l
|
|
2237
2250
|
}
|
|
2238
2251
|
) }),
|
|
2239
2252
|
p ? /* @__PURE__ */ e(yn, { originConfigId: p }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Select a cluster." })
|
|
2240
2253
|
] }))
|
|
2241
2254
|
] });
|
|
2242
2255
|
}
|
|
2243
|
-
const
|
|
2256
|
+
const Cn = {
|
|
2244
2257
|
id: "imaginarium.ui.ImpPage",
|
|
2245
2258
|
path: "/imp",
|
|
2246
|
-
element:
|
|
2247
|
-
},
|
|
2259
|
+
element: kn
|
|
2260
|
+
}, Tn = {
|
|
2248
2261
|
id: "imaginarium.ui.ImpNavItem",
|
|
2249
2262
|
path: "/imp",
|
|
2250
2263
|
label: "imp",
|
|
2251
|
-
icon:
|
|
2264
|
+
icon: Dt,
|
|
2252
2265
|
sort: 150
|
|
2253
|
-
},
|
|
2266
|
+
}, Fn = {
|
|
2254
2267
|
install(t) {
|
|
2255
|
-
t.addPlugin(
|
|
2268
|
+
t.addPlugin(Pt, Cn), t.addPlugin(Et, Tn), $t.register(t, Bt);
|
|
2256
2269
|
}
|
|
2257
2270
|
};
|
|
2258
2271
|
export {
|
|
2259
2272
|
it as C,
|
|
2260
|
-
|
|
2273
|
+
pn as D,
|
|
2261
2274
|
pe as E,
|
|
2262
|
-
|
|
2275
|
+
Ut as I,
|
|
2263
2276
|
Qt as P,
|
|
2264
|
-
|
|
2265
|
-
|
|
2277
|
+
hn as R,
|
|
2278
|
+
gn as S,
|
|
2266
2279
|
Xe as T,
|
|
2267
|
-
|
|
2268
|
-
|
|
2280
|
+
Jt as a,
|
|
2281
|
+
Vt as b,
|
|
2269
2282
|
yn as c,
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2283
|
+
Wt as d,
|
|
2284
|
+
_t as e,
|
|
2285
|
+
Lt as f,
|
|
2286
|
+
Fn as g,
|
|
2287
|
+
xt as h,
|
|
2288
|
+
kn as i,
|
|
2289
|
+
Ht as j,
|
|
2277
2290
|
xn as k,
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2291
|
+
an as l,
|
|
2292
|
+
en as m,
|
|
2293
|
+
dn as n,
|
|
2294
|
+
Dn as o,
|
|
2295
|
+
ln as p,
|
|
2296
|
+
on as q,
|
|
2297
|
+
tn as r,
|
|
2298
|
+
nn as t,
|
|
2286
2299
|
Te as u
|
|
2287
2300
|
};
|
|
2288
|
-
//# sourceMappingURL=PluginSetup-
|
|
2301
|
+
//# sourceMappingURL=PluginSetup-DK7SSyOS.js.map
|