@burdenoff/microfe-product 2026.626.2 → 2026.715.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +201 -168
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js +1 -0
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +37 -34
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +183 -138
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/products/hooks/useProducts.js +20 -7
- package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,21 +2,23 @@ import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
|
2
2
|
import { useProductConsole as t } from "../../../providers/ProductConsoleProvider.js";
|
|
3
3
|
import { LoadingState as n } from "../../../shared/components/feedback/LoadingState.js";
|
|
4
4
|
import { ErrorState as r } from "../../../shared/components/feedback/ErrorState.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { useProductBySlug as i, useProducts as a } from "../../products/hooks/useProducts.js";
|
|
6
|
+
import { SearchInput as o } from "../../../shared/components/input/SearchInput.js";
|
|
7
|
+
import { exportToCsv as s } from "../../../shared/utils/exportUtils.js";
|
|
8
|
+
import { nativeConfirm as c, nativeImpact as l, nativeNotify as u } from "../../../../utils/nativeBridge.js";
|
|
9
|
+
import { useConfirmDialog as d } from "../../../shared/hooks/useConfirmDialog.js";
|
|
10
|
+
import { useCreateFeatureFlag as f, useDeleteFeatureFlag as p, useFeatureFlags as m, useUpdateFeatureFlag as h } from "../hooks/useFeatureFlags.js";
|
|
11
|
+
import { FeatureFlagStatusBadge as g } from "../components/FeatureFlagStatusBadge.js";
|
|
12
|
+
import { FeatureFlagTypeBadge as _ } from "../components/FeatureFlagTypeBadge.js";
|
|
13
|
+
import { useState as v } from "react";
|
|
14
|
+
import { Download as ee, Eye as te, Plus as y, RefreshCw as ne, Sparkles as re, SquarePen as b, Trash2 as x } from "lucide-react";
|
|
15
|
+
import { Fragment as ie, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
16
|
+
import { useFeatureFlags as w } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
17
|
+
import { useAppShell as T } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
|
+
import { PermissionGate as E } from "@burdenoff/fe-libs/shared/components";
|
|
19
|
+
import { Button as ae, CTAOverflowMenu as oe, GlassCard as se, GradientText as ce, IllustratedEmptyState as le, PagePurpose as ue, ResponsiveTable as de } from "@burdenoff/fe-libs/ui";
|
|
18
20
|
//#region src/product-management/modules/feature-flags/pages/FeatureFlagsListPage.tsx
|
|
19
|
-
var
|
|
21
|
+
var D = [
|
|
20
22
|
{
|
|
21
23
|
key: "vibecontrols.overview",
|
|
22
24
|
name: "Overview Dashboard",
|
|
@@ -185,31 +187,34 @@ var k = [
|
|
|
185
187
|
previewable: !0,
|
|
186
188
|
defaultValue: !0
|
|
187
189
|
}
|
|
188
|
-
],
|
|
189
|
-
let { navigate:
|
|
190
|
-
|
|
191
|
-
let { featureFlags:
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
], O = () => {
|
|
191
|
+
let { navigate: O, basePath: k } = t(), [A, j] = v(""), M = e(), [N, P] = v(""), [F, I] = v(""), { productSlug: L } = T(), { product: R, loading: z } = i(L), B = !z, V = B && !!R, [H, fe] = v("product-and-platform"), [U, pe] = v(""), { products: me } = a(void 0, { limit: 200 }), W = {};
|
|
192
|
+
A && (W.search = A), N && (W.status = N), F && (W.category = F), V ? H === "platform-only" ? W.platformOnly = !0 : (W.productSlug = L, W.includePlatformFlags = H === "product-and-platform") : B && (U === "PLATFORM" ? W.platformOnly = !0 : U && (W.productId = U));
|
|
193
|
+
let { featureFlags: G, total: K, loading: he, error: q, refetch: J } = m(W, {
|
|
194
|
+
limit: 100,
|
|
195
|
+
skip: !B
|
|
196
|
+
}), { deleteFeatureFlag: ge } = p(), { createFeatureFlag: _e } = f(), { updateFeatureFlag: ve } = h(), { refreshFlags: Y } = w(), [X, Z] = v(!1), { confirm: Q, ConfirmDialog: ye } = d(), be = async () => {
|
|
197
|
+
l("light");
|
|
198
|
+
let e = "This will create default VibeControls feature flags and reconcile defaultValue on any that already exist. Continue?", t = await c({
|
|
194
199
|
title: "Seed defaults",
|
|
195
200
|
message: e,
|
|
196
201
|
okButtonTitle: "Continue",
|
|
197
202
|
cancelButtonTitle: "Cancel"
|
|
198
203
|
});
|
|
199
|
-
if (!(t === null ? await
|
|
204
|
+
if (!(t === null ? await Q({
|
|
200
205
|
title: "Seed defaults",
|
|
201
206
|
message: e,
|
|
202
207
|
okButtonTitle: "Continue",
|
|
203
208
|
cancelButtonTitle: "Cancel"
|
|
204
209
|
}) : t)) return;
|
|
205
|
-
|
|
206
|
-
let n = 0, r = 0, i = [], a = new Map(
|
|
210
|
+
Z(!0);
|
|
211
|
+
let n = 0, r = 0, i = [], a = new Map(G.map((e) => [e.key, e]));
|
|
207
212
|
try {
|
|
208
|
-
for (let e of
|
|
213
|
+
for (let e of D) {
|
|
209
214
|
let t = a.get(e.key);
|
|
210
215
|
if (t) {
|
|
211
216
|
if (t.defaultValue !== e.defaultValue) try {
|
|
212
|
-
await
|
|
217
|
+
await ve(t.id, { defaultValue: e.defaultValue }), r++;
|
|
213
218
|
} catch (t) {
|
|
214
219
|
let n = t instanceof Error ? t.message : String(t);
|
|
215
220
|
i.push(`${e.key} (update): ${n}`);
|
|
@@ -217,9 +222,10 @@ var k = [
|
|
|
217
222
|
continue;
|
|
218
223
|
}
|
|
219
224
|
try {
|
|
220
|
-
await
|
|
225
|
+
await _e({
|
|
221
226
|
...e,
|
|
222
|
-
flagType: "BOOLEAN"
|
|
227
|
+
flagType: "BOOLEAN",
|
|
228
|
+
productId: R?.id
|
|
223
229
|
}), n++;
|
|
224
230
|
} catch (t) {
|
|
225
231
|
let n = t instanceof Error ? t.message : String(t);
|
|
@@ -228,142 +234,181 @@ var k = [
|
|
|
228
234
|
}
|
|
229
235
|
}
|
|
230
236
|
} finally {
|
|
231
|
-
|
|
237
|
+
Z(!1);
|
|
232
238
|
}
|
|
233
|
-
let
|
|
234
|
-
window.alert(
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
let n = `Are you sure you want to delete the feature flag "${t}"? This will remove all workspace overrides and user preferences.`, r = await
|
|
239
|
+
let o = i.length > 0 ? `Created ${n}, updated ${r}. ${i.length} failed:\n${i.join("\n")}` : `Created ${n}, updated ${r}.`;
|
|
240
|
+
window.alert(o), Y(), J();
|
|
241
|
+
}, xe = async (e, t) => {
|
|
242
|
+
l("medium");
|
|
243
|
+
let n = `Are you sure you want to delete the feature flag "${t}"? This will remove all workspace overrides and user preferences.`, r = await c({
|
|
238
244
|
title: "Delete feature flag",
|
|
239
245
|
message: n,
|
|
240
246
|
okButtonTitle: "Delete",
|
|
241
247
|
cancelButtonTitle: "Cancel"
|
|
242
248
|
});
|
|
243
|
-
if (r === null ? await
|
|
249
|
+
if (r === null ? await Q({
|
|
244
250
|
title: "Delete feature flag",
|
|
245
251
|
message: n,
|
|
246
252
|
okButtonTitle: "Delete",
|
|
247
253
|
cancelButtonTitle: "Cancel",
|
|
248
254
|
destructive: !0
|
|
249
255
|
}) : r) try {
|
|
250
|
-
await
|
|
256
|
+
await ge(e), Y(), u("success"), J();
|
|
251
257
|
} catch (e) {
|
|
252
|
-
throw
|
|
258
|
+
throw u("error"), e;
|
|
253
259
|
}
|
|
254
|
-
},
|
|
255
|
-
if (
|
|
260
|
+
}, $ = [...new Set(G.flatMap((e) => e.category ? [e.category] : []))];
|
|
261
|
+
if ((!B || he) && G.length === 0) return /* @__PURE__ */ S("div", {
|
|
256
262
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
257
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ S(n, { message: M("featureFlags.loadingFeatureFlags", "Loading feature flags...") })
|
|
258
264
|
});
|
|
259
|
-
if (
|
|
265
|
+
if (q) return /* @__PURE__ */ S("div", {
|
|
260
266
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
-
message:
|
|
267
|
+
children: /* @__PURE__ */ S(r, {
|
|
268
|
+
message: q.message,
|
|
263
269
|
action: {
|
|
264
|
-
label:
|
|
265
|
-
onClick: () =>
|
|
270
|
+
label: M("productCommon.retry", "Retry"),
|
|
271
|
+
onClick: () => J()
|
|
266
272
|
}
|
|
267
273
|
})
|
|
268
274
|
});
|
|
269
|
-
let
|
|
275
|
+
let Se = (e) => new Date(e).toLocaleDateString("en-US", {
|
|
270
276
|
year: "numeric",
|
|
271
277
|
month: "short",
|
|
272
278
|
day: "numeric"
|
|
273
279
|
});
|
|
274
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ C("div", {
|
|
275
281
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
276
282
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ C("div", {
|
|
278
284
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
|
|
280
286
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
}), /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ S(ce, { children: M("featureFlags.title", "Feature Flags") })
|
|
288
|
+
}), /* @__PURE__ */ C("p", {
|
|
283
289
|
className: "text-sm text-text-secondary mt-1",
|
|
284
290
|
children: [
|
|
285
|
-
|
|
291
|
+
V ? `${M("featureFlags.subtitleScopedPrefix", "Feature flags for")} ${R?.name ?? L} ${M("featureFlags.subtitleScopedSuffix", "plus platform-wide flags.")}` : M("featureFlags.subtitle", "Manage platform-wide feature flags."),
|
|
286
292
|
" ",
|
|
287
|
-
|
|
293
|
+
K,
|
|
288
294
|
" ",
|
|
289
|
-
|
|
295
|
+
K === 1 ? M("featureFlags.flagTotal", "flag total") : M("featureFlags.flagsTotal", "flags total"),
|
|
290
296
|
"."
|
|
291
297
|
]
|
|
292
|
-
})] }), /* @__PURE__ */
|
|
298
|
+
})] }), /* @__PURE__ */ S(E, {
|
|
293
299
|
role: "super_admin",
|
|
294
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ S(oe, {
|
|
295
301
|
primary: {
|
|
296
|
-
label:
|
|
297
|
-
onSelect: () =>
|
|
298
|
-
icon: /* @__PURE__ */
|
|
302
|
+
label: M("featureFlags.createFlag", "Create Flag"),
|
|
303
|
+
onSelect: () => O(`${k}/feature-flags/new`),
|
|
304
|
+
icon: /* @__PURE__ */ S(y, { className: "size-4" })
|
|
299
305
|
},
|
|
300
306
|
actions: [{
|
|
301
|
-
label:
|
|
307
|
+
label: X ? M("featureFlags.seeding", "Seeding...") : M("featureFlags.seedDefaults", "Seed Defaults"),
|
|
302
308
|
onSelect: () => {
|
|
303
|
-
|
|
309
|
+
be();
|
|
304
310
|
},
|
|
305
|
-
disabled:
|
|
306
|
-
icon: /* @__PURE__ */
|
|
311
|
+
disabled: X,
|
|
312
|
+
icon: /* @__PURE__ */ S(re, { className: "size-4" })
|
|
307
313
|
}]
|
|
308
314
|
})
|
|
309
315
|
})]
|
|
310
316
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ S(ue, {
|
|
312
318
|
className: "mb-6",
|
|
313
|
-
children:
|
|
319
|
+
children: M("featureFlags.purpose", "Feature flags let you turn product capabilities on or off without shipping new code — roll out a feature gradually, gate it behind a preview, or kill-switch it instantly. Use \"Seed Defaults\" to create the standard VibeControls flag set in one click.")
|
|
314
320
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ C("div", {
|
|
316
322
|
className: "flex flex-wrap items-center gap-3 mb-6",
|
|
317
323
|
children: [
|
|
318
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ S("div", {
|
|
319
325
|
className: "flex-1 min-w-[250px]",
|
|
320
|
-
children: /* @__PURE__ */
|
|
321
|
-
value:
|
|
322
|
-
onChange:
|
|
323
|
-
placeholder:
|
|
326
|
+
children: /* @__PURE__ */ S(o, {
|
|
327
|
+
value: A,
|
|
328
|
+
onChange: j,
|
|
329
|
+
placeholder: M("featureFlags.searchPlaceholder", "Search by key, name, or description...")
|
|
324
330
|
})
|
|
325
331
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
332
|
+
/* @__PURE__ */ C("select", {
|
|
333
|
+
value: N,
|
|
334
|
+
onChange: (e) => P(e.target.value),
|
|
329
335
|
className: "px-3 py-2 bg-surface border border-default rounded-lg text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] transition-all duration-200",
|
|
330
336
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ S("option", {
|
|
332
338
|
value: "",
|
|
333
|
-
children:
|
|
339
|
+
children: M("featureFlags.allStatuses", "All Statuses")
|
|
334
340
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ S("option", {
|
|
336
342
|
value: "ACTIVE",
|
|
337
|
-
children:
|
|
343
|
+
children: M("featureFlags.statusActive", "Active")
|
|
338
344
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ S("option", {
|
|
340
346
|
value: "ARCHIVED",
|
|
341
|
-
children:
|
|
347
|
+
children: M("featureFlags.statusArchived", "Archived")
|
|
342
348
|
})
|
|
343
349
|
]
|
|
344
350
|
}),
|
|
345
|
-
|
|
346
|
-
value:
|
|
347
|
-
onChange: (e) =>
|
|
351
|
+
$.length > 0 && /* @__PURE__ */ C("select", {
|
|
352
|
+
value: F,
|
|
353
|
+
onChange: (e) => I(e.target.value),
|
|
348
354
|
className: "px-3 py-2 bg-surface border border-default rounded-lg text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] transition-all duration-200",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ S("option", {
|
|
350
356
|
value: "",
|
|
351
|
-
children:
|
|
352
|
-
}),
|
|
357
|
+
children: M("featureFlags.allCategories", "All Categories")
|
|
358
|
+
}), $.map((e) => /* @__PURE__ */ S("option", {
|
|
353
359
|
value: e,
|
|
354
360
|
children: e
|
|
355
361
|
}, e))]
|
|
356
362
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
363
|
+
V ? /* @__PURE__ */ C("select", {
|
|
364
|
+
value: H,
|
|
365
|
+
onChange: (e) => fe(e.target.value),
|
|
366
|
+
className: "px-3 py-2 bg-surface border border-default rounded-lg text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] transition-all duration-200",
|
|
367
|
+
title: M("featureFlags.scopeFilter", "Scope"),
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ S("option", {
|
|
370
|
+
value: "product-and-platform",
|
|
371
|
+
children: `${R?.name ?? L} + ${M("featureFlags.platform", "Platform")}`
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ S("option", {
|
|
374
|
+
value: "product-only",
|
|
375
|
+
children: R?.name ?? L
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ S("option", {
|
|
378
|
+
value: "platform-only",
|
|
379
|
+
children: M("featureFlags.platformOnly", "Platform only")
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
}) : B && /* @__PURE__ */ C("select", {
|
|
383
|
+
value: U,
|
|
384
|
+
onChange: (e) => pe(e.target.value),
|
|
385
|
+
className: "px-3 py-2 bg-surface border border-default rounded-lg text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] transition-all duration-200",
|
|
386
|
+
title: M("featureFlags.productFilter", "Product"),
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ S("option", {
|
|
389
|
+
value: "",
|
|
390
|
+
children: M("featureFlags.allProducts", "All Products")
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ S("option", {
|
|
393
|
+
value: "PLATFORM",
|
|
394
|
+
children: M("featureFlags.platformOnly", "Platform only")
|
|
395
|
+
}),
|
|
396
|
+
me.map((e) => /* @__PURE__ */ S("option", {
|
|
397
|
+
value: e.id,
|
|
398
|
+
children: e.name
|
|
399
|
+
}, e.id))
|
|
400
|
+
]
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ S("button", {
|
|
358
403
|
type: "button",
|
|
359
|
-
onClick: () =>
|
|
404
|
+
onClick: () => J(),
|
|
360
405
|
className: "p-2 bg-surface border border-default rounded-lg text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-all duration-200",
|
|
361
|
-
title:
|
|
362
|
-
children: /* @__PURE__ */
|
|
406
|
+
title: M("productCommon.refresh", "Refresh"),
|
|
407
|
+
children: /* @__PURE__ */ S(ne, { size: 18 })
|
|
363
408
|
}),
|
|
364
|
-
|
|
409
|
+
G.length > 0 && /* @__PURE__ */ S("button", {
|
|
365
410
|
type: "button",
|
|
366
|
-
onClick: () =>
|
|
411
|
+
onClick: () => s("feature-flags", G.map((e) => ({
|
|
367
412
|
id: e.id,
|
|
368
413
|
key: e.key,
|
|
369
414
|
name: e.name,
|
|
@@ -377,122 +422,122 @@ var k = [
|
|
|
377
422
|
updatedAt: e.updatedAt
|
|
378
423
|
}))),
|
|
379
424
|
className: "p-2 bg-surface border border-default rounded-lg text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-all duration-200",
|
|
380
|
-
title:
|
|
381
|
-
children: /* @__PURE__ */
|
|
425
|
+
title: M("featureFlags.exportCsv", "Export as CSV"),
|
|
426
|
+
children: /* @__PURE__ */ S(ee, { size: 18 })
|
|
382
427
|
})
|
|
383
428
|
]
|
|
384
429
|
}),
|
|
385
|
-
|
|
430
|
+
G.length === 0 ? /* @__PURE__ */ S(se, {
|
|
386
431
|
treatment: "insight",
|
|
387
432
|
className: "animate-in fade-in duration-200",
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
-
illustration:
|
|
390
|
-
title:
|
|
391
|
-
description:
|
|
392
|
-
action: /* @__PURE__ */
|
|
433
|
+
children: /* @__PURE__ */ S(le, {
|
|
434
|
+
illustration: A || N || F ? "empty-search" : "empty-data",
|
|
435
|
+
title: M("featureFlags.noFeatureFlagsFound", "No feature flags found"),
|
|
436
|
+
description: A || N || F ? M("featureFlags.tryAdjustingFilters", "Try adjusting your search or filters.") : M("featureFlags.createFirstFlagDescription", "Create your first feature flag to control feature rollout across products."),
|
|
437
|
+
action: /* @__PURE__ */ C(ae, {
|
|
393
438
|
type: "button",
|
|
394
|
-
onClick: () =>
|
|
395
|
-
children: [/* @__PURE__ */
|
|
439
|
+
onClick: () => O(`${k}/feature-flags/new`),
|
|
440
|
+
children: [/* @__PURE__ */ S(y, { className: "size-4" }), M("featureFlags.createFlag", "Create Flag")]
|
|
396
441
|
})
|
|
397
442
|
})
|
|
398
|
-
}) : /* @__PURE__ */
|
|
443
|
+
}) : /* @__PURE__ */ S(de, {
|
|
399
444
|
className: "bg-bg-surface rounded-card border border-[color-mix(in_oklab,var(--color-action-primary-bg)_34%,transparent)] shadow-[var(--shadow-glow)]",
|
|
400
|
-
data:
|
|
445
|
+
data: G,
|
|
401
446
|
rowKey: (e) => e.id,
|
|
402
447
|
columns: [
|
|
403
448
|
{
|
|
404
449
|
key: "key",
|
|
405
|
-
header:
|
|
450
|
+
header: M("featureFlags.columnKey", "Key"),
|
|
406
451
|
priority: "primary",
|
|
407
|
-
cell: (e) => /* @__PURE__ */
|
|
452
|
+
cell: (e) => /* @__PURE__ */ S("code", {
|
|
408
453
|
className: "text-sm font-mono text-text-primary bg-bg-sunken px-1.5 py-0.5 rounded",
|
|
409
454
|
children: e.key
|
|
410
455
|
})
|
|
411
456
|
},
|
|
412
457
|
{
|
|
413
458
|
key: "name",
|
|
414
|
-
header:
|
|
415
|
-
cell: (e) => /* @__PURE__ */
|
|
459
|
+
header: M("featureFlags.columnName", "Name"),
|
|
460
|
+
cell: (e) => /* @__PURE__ */ S("span", {
|
|
416
461
|
className: "text-sm text-text-primary",
|
|
417
462
|
children: e.name
|
|
418
463
|
})
|
|
419
464
|
},
|
|
420
465
|
{
|
|
421
466
|
key: "type",
|
|
422
|
-
header:
|
|
423
|
-
cell: (e) => /* @__PURE__ */
|
|
467
|
+
header: M("featureFlags.columnType", "Type"),
|
|
468
|
+
cell: (e) => /* @__PURE__ */ S(_, { flagType: e.flagType })
|
|
424
469
|
},
|
|
425
470
|
{
|
|
426
471
|
key: "status",
|
|
427
|
-
header:
|
|
428
|
-
cell: (e) => /* @__PURE__ */
|
|
472
|
+
header: M("featureFlags.columnStatus", "Status"),
|
|
473
|
+
cell: (e) => /* @__PURE__ */ S(g, { status: e.status })
|
|
429
474
|
},
|
|
430
475
|
{
|
|
431
476
|
key: "category",
|
|
432
|
-
header:
|
|
433
|
-
cell: (e) => /* @__PURE__ */
|
|
477
|
+
header: M("featureFlags.columnCategory", "Category"),
|
|
478
|
+
cell: (e) => /* @__PURE__ */ S("span", {
|
|
434
479
|
className: "text-sm text-text-secondary",
|
|
435
480
|
children: e.category || "—"
|
|
436
481
|
})
|
|
437
482
|
},
|
|
438
483
|
{
|
|
439
484
|
key: "preview",
|
|
440
|
-
header:
|
|
441
|
-
cell: (e) => e.previewable ? /* @__PURE__ */
|
|
485
|
+
header: M("featureFlags.columnPreview", "Preview"),
|
|
486
|
+
cell: (e) => e.previewable ? /* @__PURE__ */ C("span", {
|
|
442
487
|
className: "inline-flex items-center gap-1.5 text-sm text-[var(--color-status-success)]",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
444
|
-
}) : /* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ S("span", { className: "size-1.5 rounded-full bg-[var(--color-status-success)] motion-safe:animate-vc-glow-pulse" }), M("featureFlags.yes", "Yes")]
|
|
489
|
+
}) : /* @__PURE__ */ S("span", {
|
|
445
490
|
className: "text-sm text-text-tertiary",
|
|
446
|
-
children:
|
|
491
|
+
children: M("featureFlags.no", "No")
|
|
447
492
|
})
|
|
448
493
|
},
|
|
449
494
|
{
|
|
450
495
|
key: "product",
|
|
451
|
-
header:
|
|
496
|
+
header: M("featureFlags.columnProduct", "Product"),
|
|
452
497
|
priority: "hidden-on-mobile",
|
|
453
|
-
cell: (e) => /* @__PURE__ */
|
|
498
|
+
cell: (e) => /* @__PURE__ */ S("span", {
|
|
454
499
|
className: "text-sm text-text-secondary",
|
|
455
500
|
children: e.product?.name || "—"
|
|
456
501
|
})
|
|
457
502
|
},
|
|
458
503
|
{
|
|
459
504
|
key: "updated",
|
|
460
|
-
header:
|
|
505
|
+
header: M("featureFlags.columnUpdated", "Updated"),
|
|
461
506
|
priority: "hidden-on-mobile",
|
|
462
|
-
cell: (e) => /* @__PURE__ */
|
|
507
|
+
cell: (e) => /* @__PURE__ */ S("span", {
|
|
463
508
|
className: "text-sm text-text-tertiary",
|
|
464
|
-
children:
|
|
509
|
+
children: Se(e.updatedAt)
|
|
465
510
|
})
|
|
466
511
|
}
|
|
467
512
|
],
|
|
468
|
-
rowActions: (e) => /* @__PURE__ */
|
|
513
|
+
rowActions: (e) => /* @__PURE__ */ C(ie, { children: [/* @__PURE__ */ S("button", {
|
|
469
514
|
type: "button",
|
|
470
|
-
onClick: () =>
|
|
515
|
+
onClick: () => O(`${k}/feature-flags/${e.id}`),
|
|
471
516
|
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-all duration-200",
|
|
472
|
-
title:
|
|
473
|
-
children: /* @__PURE__ */
|
|
474
|
-
}), /* @__PURE__ */
|
|
517
|
+
title: M("featureFlags.viewDetails", "View details"),
|
|
518
|
+
children: /* @__PURE__ */ S(te, { size: 16 })
|
|
519
|
+
}), /* @__PURE__ */ C(E, {
|
|
475
520
|
role: "super_admin",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ S("button", {
|
|
477
522
|
type: "button",
|
|
478
|
-
onClick: () =>
|
|
523
|
+
onClick: () => O(`${k}/feature-flags/${e.id}/edit`),
|
|
479
524
|
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-all duration-200",
|
|
480
|
-
title:
|
|
481
|
-
children: /* @__PURE__ */
|
|
482
|
-
}), /* @__PURE__ */
|
|
525
|
+
title: M("featureFlags.edit", "Edit"),
|
|
526
|
+
children: /* @__PURE__ */ S(b, { size: 16 })
|
|
527
|
+
}), /* @__PURE__ */ S("button", {
|
|
483
528
|
type: "button",
|
|
484
|
-
onClick: () =>
|
|
529
|
+
onClick: () => xe(e.id, e.name),
|
|
485
530
|
className: "p-1.5 text-text-secondary hover:text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] rounded-md transition-all duration-200",
|
|
486
|
-
title:
|
|
487
|
-
children: /* @__PURE__ */ x
|
|
531
|
+
title: M("featureFlags.delete", "Delete"),
|
|
532
|
+
children: /* @__PURE__ */ S(x, { size: 16 })
|
|
488
533
|
})]
|
|
489
534
|
})] })
|
|
490
535
|
}),
|
|
491
|
-
|
|
536
|
+
ye
|
|
492
537
|
]
|
|
493
538
|
});
|
|
494
539
|
};
|
|
495
540
|
//#endregion
|
|
496
|
-
export {
|
|
541
|
+
export { O as FeatureFlagsListPage };
|
|
497
542
|
|
|
498
543
|
//# sourceMappingURL=FeatureFlagsListPage.js.map
|