@burdenoff/microfe-product 2026.608.1 → 2026.624.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/product/pages/ContentPageViewPage.js +1 -1
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +6 -6
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +1 -1
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +4 -4
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +13 -13
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +4 -4
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +4 -4
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +2 -2
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +175 -204
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +3 -3
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +11 -11
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.js +9 -9
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +6 -6
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductStatusBadge.js +1 -1
- package/dist/product-management/modules/products/components/ProductStatusBadge.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +4 -4
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +13 -13
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +4 -4
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +5 -5
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +13 -13
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/dist/product-management/shared/components/feedback/EmptyState.js +1 -1
- package/dist/product-management/shared/components/feedback/EmptyState.js.map +1 -1
- package/dist/product-management/shared/components/feedback/ErrorState.js +2 -2
- package/dist/product-management/shared/components/feedback/ErrorState.js.map +1 -1
- package/dist/product-management/shared/components/feedback/LoadingState.js +1 -1
- package/dist/product-management/shared/components/feedback/LoadingState.js.map +1 -1
- package/dist/product-management/shared/components/input/ProductCombobox.js +1 -1
- package/dist/product-management/shared/components/input/ProductCombobox.js.map +1 -1
- package/dist/product-management/shared/components/input/SearchInput.js +1 -1
- package/dist/product-management/shared/components/input/SearchInput.js.map +1 -1
- package/dist/shared/utils/renderMarkdown.js +1 -1
- package/dist/shared/utils/renderMarkdown.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFlagEditPage.js","names":[],"sources":["../../../../../src/product-management/modules/feature-flags/pages/FeatureFlagEditPage.tsx"],"sourcesContent":["/**\n * Feature Flag Edit Page\n */\nimport { AlertTriangle, ArrowLeft } from 'lucide-react';\nimport { type FC, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useFeatureFlags } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTr } from '../../../shared/hooks/useTr';\n\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { FeatureFlagForm } from '../components/FeatureFlagForm';\nimport { useFeatureFlag, useUpdateFeatureFlag } from '../hooks/useFeatureFlags';\nimport type { UpdateFeatureFlagInput } from '../types';\n\nexport const FeatureFlagEditPage: FC = () => {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath } = useProductConsole();\n const { featureFlag, loading: fetching, error, refetch } = useFeatureFlag(id!);\n const { updateFeatureFlag, loading: updating } = useUpdateFeatureFlag();\n const { refreshFlags } = useFeatureFlags();\n const [submitError, setSubmitError] = useState<string | null>(null);\n const tr = useTr();\n\n const handleSubmit = async (data: UpdateFeatureFlagInput) => {\n setSubmitError(null);\n try {\n const result = await updateFeatureFlag(id!, data);\n if (result.data?.updateFeatureFlag?.id) {\n void refreshFlags(); // invalidate gate cache so gated routes react immediately\n navigate(`${basePath}/feature-flags/${id}`);\n } else if (result.errors && result.errors.length > 0) {\n setSubmitError(result.errors[0]?.message ?? 'Failed to update feature flag');\n } else {\n navigate(`${basePath}/feature-flags/${id}`);\n }\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : 'An unexpected error occurred';\n setSubmitError(message);\n }\n };\n\n const handleCancel = () => {\n navigate(`${basePath}/feature-flags/${id}`);\n };\n\n if (fetching) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('featureFlags.loadingFeatureFlag', 'Loading feature flag...')} />\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n </div>\n );\n }\n\n if (!featureFlag) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState message={tr('featureFlags.featureFlagNotFound', 'Feature flag not found')} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-
|
|
1
|
+
{"version":3,"file":"FeatureFlagEditPage.js","names":[],"sources":["../../../../../src/product-management/modules/feature-flags/pages/FeatureFlagEditPage.tsx"],"sourcesContent":["/**\n * Feature Flag Edit Page\n */\nimport { AlertTriangle, ArrowLeft } from 'lucide-react';\nimport { type FC, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useFeatureFlags } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTr } from '../../../shared/hooks/useTr';\n\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { FeatureFlagForm } from '../components/FeatureFlagForm';\nimport { useFeatureFlag, useUpdateFeatureFlag } from '../hooks/useFeatureFlags';\nimport type { UpdateFeatureFlagInput } from '../types';\n\nexport const FeatureFlagEditPage: FC = () => {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath } = useProductConsole();\n const { featureFlag, loading: fetching, error, refetch } = useFeatureFlag(id!);\n const { updateFeatureFlag, loading: updating } = useUpdateFeatureFlag();\n const { refreshFlags } = useFeatureFlags();\n const [submitError, setSubmitError] = useState<string | null>(null);\n const tr = useTr();\n\n const handleSubmit = async (data: UpdateFeatureFlagInput) => {\n setSubmitError(null);\n try {\n const result = await updateFeatureFlag(id!, data);\n if (result.data?.updateFeatureFlag?.id) {\n void refreshFlags(); // invalidate gate cache so gated routes react immediately\n navigate(`${basePath}/feature-flags/${id}`);\n } else if (result.errors && result.errors.length > 0) {\n setSubmitError(result.errors[0]?.message ?? 'Failed to update feature flag');\n } else {\n navigate(`${basePath}/feature-flags/${id}`);\n }\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : 'An unexpected error occurred';\n setSubmitError(message);\n }\n };\n\n const handleCancel = () => {\n navigate(`${basePath}/feature-flags/${id}`);\n };\n\n if (fetching) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('featureFlags.loadingFeatureFlag', 'Loading feature flag...')} />\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n </div>\n );\n }\n\n if (!featureFlag) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState message={tr('featureFlags.featureFlagNotFound', 'Feature flag not found')} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n {/* Back button */}\n <button\n type=\"button\"\n onClick={handleCancel}\n className=\"inline-flex items-center gap-2 text-text-secondary hover:text-text-primary mb-4 transition-all duration-200\"\n >\n <ArrowLeft size={18} />\n {tr('featureFlags.backToFlagDetails', 'Back to Flag Details')}\n </button>\n\n {/* Header */}\n <h1 className=\"text-2xl font-bold text-text-primary mb-1\">\n {tr('featureFlags.editFeatureFlag', 'Edit Feature Flag')}\n </h1>\n <p className=\"text-sm text-text-secondary mb-6\">\n {tr('featureFlags.updateConfigurationFor', 'Update the configuration for')}{' '}\n <code className=\"font-mono bg-bg-sunken px-1 rounded\">{featureFlag.key}</code>\n </p>\n\n {/* Error banner */}\n {submitError && (\n <div className=\"max-w-2xl mb-4 flex items-center gap-2 p-3 bg-[var(--color-status-error-bg)] border border-[var(--color-status-error)] rounded-lg text-sm text-[var(--color-status-error)]\">\n <AlertTriangle size={16} className=\"shrink-0\" />\n {submitError}\n </div>\n )}\n\n {/* Form */}\n <div className=\"max-w-2xl\">\n <div className=\"bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)]\">\n <FeatureFlagForm\n featureFlag={featureFlag}\n onSubmit={handleSubmit}\n onCancel={handleCancel}\n loading={updating}\n />\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAgBA,IAAa,UAAgC;CAC3C,IAAM,EAAE,UAAO,GAA2B,EACpC,EAAE,aAAU,gBAAa,GAAmB,EAC5C,EAAE,gBAAa,SAAS,GAAU,UAAO,eAAY,EAAe,EAAI,EACxE,EAAE,sBAAmB,SAAS,MAAa,GAAsB,EACjE,EAAE,oBAAiB,GAAiB,EACpC,CAAC,GAAa,KAAkB,EAAwB,KAAK,EAC7D,IAAK,GAAO,EAEZ,IAAe,OAAO,MAAiC;AAC3D,IAAe,KAAK;AACpB,MAAI;GACF,IAAM,IAAS,MAAM,EAAkB,GAAK,EAAK;AACjD,GAAI,EAAO,MAAM,mBAAmB,MAC7B,GAAc,EACnB,EAAS,GAAG,EAAS,iBAAiB,IAAK,IAClC,EAAO,UAAU,EAAO,OAAO,SAAS,IACjD,EAAe,EAAO,OAAO,IAAI,WAAW,gCAAgC,GAE5E,EAAS,GAAG,EAAS,iBAAiB,IAAK;WAEtC,GAAc;AAErB,KADgB,aAAe,QAAQ,EAAI,UAAU,+BAC9B;;IAIrB,UAAqB;AACzB,IAAS,GAAG,EAAS,iBAAiB,IAAK;;AA8B7C,QA3BI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAc,SAAS,EAAG,mCAAmC,0BAA0B,EAAI,CAAA;EACvF,CAAA,GAIN,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,SAAS,EAAM;GACf,QAAQ;IAAE,OAAO,EAAG,uBAAuB,QAAQ;IAAE,eAAe,GAAS;IAAE;GAC/E,CAAA;EACE,CAAA,GAIL,IASH,kBAAC,OAAD;EAAK,WAAU;YAAf;GAEE,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EACtB,EAAG,kCAAkC,uBAAuB,CACtD;;GAGT,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,gCAAgC,oBAAoB;IACrD,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cAAb;KACG,EAAG,uCAAuC,+BAA+B;KAAE;KAC5E,kBAAC,QAAD;MAAM,WAAU;gBAAuC,EAAY;MAAW,CAAA;KAC5E;;GAGH,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KAAe,MAAM;KAAI,WAAU;KAAa,CAAA,EAC/C,EACG;;GAIR,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MACe;MACb,UAAU;MACV,UAAU;MACV,SAAS;MACT,CAAA;KACE,CAAA;IACF,CAAA;GACF;MA9CJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAY,SAAS,EAAG,oCAAoC,yBAAyB,EAAI,CAAA;EACrF,CAAA"}
|
|
@@ -11,11 +11,12 @@ import { FeatureFlagStatusBadge as m } from "../components/FeatureFlagStatusBadg
|
|
|
11
11
|
import { FeatureFlagTypeBadge as h } from "../components/FeatureFlagTypeBadge.js";
|
|
12
12
|
import { useState as g } from "react";
|
|
13
13
|
import { Download as _, Eye as v, Flag as y, Plus as b, RefreshCw as x, Sparkles as S, SquarePen as C, Trash2 as w } from "lucide-react";
|
|
14
|
-
import {
|
|
15
|
-
import { useFeatureFlags as
|
|
14
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
15
|
+
import { useFeatureFlags as ee } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
16
16
|
import { PermissionGate as O } from "@burdenoff/fe-libs/shared/components";
|
|
17
|
+
import { ResponsiveTable as k } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/product-management/modules/feature-flags/pages/FeatureFlagsListPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var A = [
|
|
19
20
|
{
|
|
20
21
|
key: "vibecontrols.overview",
|
|
21
22
|
name: "Overview Dashboard",
|
|
@@ -184,10 +185,10 @@ var k = [
|
|
|
184
185
|
previewable: !0,
|
|
185
186
|
defaultValue: !0
|
|
186
187
|
}
|
|
187
|
-
],
|
|
188
|
-
let { navigate:
|
|
189
|
-
|
|
190
|
-
let { featureFlags:
|
|
188
|
+
], j = () => {
|
|
189
|
+
let { navigate: j, basePath: M } = t(), [N, P] = g(""), F = e(), [I, L] = g(""), [R, z] = g(""), B = {};
|
|
190
|
+
N && (B.search = N), I && (B.status = I), R && (B.category = R);
|
|
191
|
+
let { featureFlags: V, total: H, loading: U, error: W, refetch: G } = f(B, { limit: 100 }), { deleteFeatureFlag: K } = d(), { createFeatureFlag: q } = u(), { updateFeatureFlag: J } = p(), { refreshFlags: Y } = ee(), [X, Z] = g(!1), Q = async () => {
|
|
191
192
|
s("light");
|
|
192
193
|
let e = "This will create default VibeControls feature flags and reconcile defaultValue on any that already exist. Continue?", t = await o({
|
|
193
194
|
title: "Seed defaults",
|
|
@@ -196,14 +197,14 @@ var k = [
|
|
|
196
197
|
cancelButtonTitle: "Cancel"
|
|
197
198
|
});
|
|
198
199
|
if (!(t === null ? window.confirm(e) : t)) return;
|
|
199
|
-
|
|
200
|
-
let n = 0, r = 0, i = [], a = new Map(
|
|
200
|
+
Z(!0);
|
|
201
|
+
let n = 0, r = 0, i = [], a = new Map(V.map((e) => [e.key, e]));
|
|
201
202
|
try {
|
|
202
|
-
for (let e of
|
|
203
|
+
for (let e of A) {
|
|
203
204
|
let t = a.get(e.key);
|
|
204
205
|
if (t) {
|
|
205
206
|
if (t.defaultValue !== e.defaultValue) try {
|
|
206
|
-
await
|
|
207
|
+
await J(t.id, { defaultValue: e.defaultValue }), r++;
|
|
207
208
|
} catch (t) {
|
|
208
209
|
let n = t instanceof Error ? t.message : String(t);
|
|
209
210
|
i.push(`${e.key} (update): ${n}`);
|
|
@@ -211,7 +212,7 @@ var k = [
|
|
|
211
212
|
continue;
|
|
212
213
|
}
|
|
213
214
|
try {
|
|
214
|
-
await
|
|
215
|
+
await q({
|
|
215
216
|
...e,
|
|
216
217
|
flagType: "BOOLEAN"
|
|
217
218
|
}), n++;
|
|
@@ -222,11 +223,11 @@ var k = [
|
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
} finally {
|
|
225
|
-
|
|
226
|
+
Z(!1);
|
|
226
227
|
}
|
|
227
228
|
let c = i.length > 0 ? `Created ${n}, updated ${r}. ${i.length} failed:\n${i.join("\n")}` : `Created ${n}, updated ${r}.`;
|
|
228
|
-
window.alert(c),
|
|
229
|
-
},
|
|
229
|
+
window.alert(c), Y(), G();
|
|
230
|
+
}, te = async (e, t) => {
|
|
230
231
|
s("medium");
|
|
231
232
|
let n = `Are you sure you want to delete the feature flag "${t}"? This will remove all workspace overrides and user preferences.`, r = await o({
|
|
232
233
|
title: "Delete feature flag",
|
|
@@ -235,119 +236,119 @@ var k = [
|
|
|
235
236
|
cancelButtonTitle: "Cancel"
|
|
236
237
|
});
|
|
237
238
|
if (r === null ? window.confirm(n) : r) try {
|
|
238
|
-
await
|
|
239
|
+
await K(e), Y(), c("success"), G();
|
|
239
240
|
} catch (e) {
|
|
240
241
|
throw c("error"), e;
|
|
241
242
|
}
|
|
242
|
-
}, $ = [...new Set(
|
|
243
|
-
if (
|
|
243
|
+
}, $ = [...new Set(V.flatMap((e) => e.category ? [e.category] : []))];
|
|
244
|
+
if (U && V.length === 0) return /* @__PURE__ */ E("div", {
|
|
244
245
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
245
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ E(n, { message: F("featureFlags.loadingFeatureFlags", "Loading feature flags...") })
|
|
246
247
|
});
|
|
247
|
-
if (
|
|
248
|
+
if (W) return /* @__PURE__ */ E("div", {
|
|
248
249
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
249
|
-
children: /* @__PURE__ */
|
|
250
|
-
message:
|
|
250
|
+
children: /* @__PURE__ */ E(r, {
|
|
251
|
+
message: W.message,
|
|
251
252
|
action: {
|
|
252
|
-
label:
|
|
253
|
-
onClick: () =>
|
|
253
|
+
label: F("productCommon.retry", "Retry"),
|
|
254
|
+
onClick: () => G()
|
|
254
255
|
}
|
|
255
256
|
})
|
|
256
257
|
});
|
|
257
|
-
let
|
|
258
|
+
let ne = (e) => new Date(e).toLocaleDateString("en-US", {
|
|
258
259
|
year: "numeric",
|
|
259
260
|
month: "short",
|
|
260
261
|
day: "numeric"
|
|
261
262
|
});
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-
|
|
263
|
+
return /* @__PURE__ */ D("div", {
|
|
264
|
+
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
264
265
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ D("div", {
|
|
266
267
|
className: "flex items-center justify-between mb-6",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
|
|
268
269
|
className: "text-2xl font-bold text-text-primary",
|
|
269
|
-
children:
|
|
270
|
-
}), /* @__PURE__ */
|
|
270
|
+
children: F("featureFlags.title", "Feature Flags")
|
|
271
|
+
}), /* @__PURE__ */ D("p", {
|
|
271
272
|
className: "text-sm text-text-secondary mt-1",
|
|
272
273
|
children: [
|
|
273
|
-
|
|
274
|
+
F("featureFlags.subtitle", "Manage platform-wide feature flags."),
|
|
274
275
|
" ",
|
|
275
|
-
|
|
276
|
+
H,
|
|
276
277
|
" ",
|
|
277
|
-
|
|
278
|
+
H === 1 ? F("featureFlags.flagTotal", "flag total") : F("featureFlags.flagsTotal", "flags total"),
|
|
278
279
|
"."
|
|
279
280
|
]
|
|
280
|
-
})] }), /* @__PURE__ */
|
|
281
|
+
})] }), /* @__PURE__ */ E(O, {
|
|
281
282
|
role: "super_admin",
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ D("div", {
|
|
283
284
|
className: "flex items-center gap-2",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ D("button", {
|
|
285
286
|
type: "button",
|
|
286
|
-
onClick:
|
|
287
|
-
disabled:
|
|
288
|
-
className: "inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-
|
|
289
|
-
children: [/* @__PURE__ */
|
|
290
|
-
}), /* @__PURE__ */
|
|
287
|
+
onClick: Q,
|
|
288
|
+
disabled: X,
|
|
289
|
+
className: "inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken disabled:opacity-50 transition-all duration-200",
|
|
290
|
+
children: [/* @__PURE__ */ E(S, { size: 18 }), X ? F("featureFlags.seeding", "Seeding...") : F("featureFlags.seedDefaults", "Seed Defaults")]
|
|
291
|
+
}), /* @__PURE__ */ D("button", {
|
|
291
292
|
type: "button",
|
|
292
|
-
onClick: () =>
|
|
293
|
-
className: "inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90
|
|
294
|
-
children: [/* @__PURE__ */
|
|
293
|
+
onClick: () => j(`${M}/feature-flags/new`),
|
|
294
|
+
className: "inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90 transition-all duration-200",
|
|
295
|
+
children: [/* @__PURE__ */ E(b, { size: 18 }), F("featureFlags.createFlag", "Create Flag")]
|
|
295
296
|
})]
|
|
296
297
|
})
|
|
297
298
|
})]
|
|
298
299
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ D("div", {
|
|
300
301
|
className: "flex flex-wrap items-center gap-3 mb-6",
|
|
301
302
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ E("div", {
|
|
303
304
|
className: "flex-1 min-w-[250px]",
|
|
304
|
-
children: /* @__PURE__ */
|
|
305
|
-
value:
|
|
306
|
-
onChange:
|
|
307
|
-
placeholder:
|
|
305
|
+
children: /* @__PURE__ */ E(i, {
|
|
306
|
+
value: N,
|
|
307
|
+
onChange: P,
|
|
308
|
+
placeholder: F("featureFlags.searchPlaceholder", "Search by key, name, or description...")
|
|
308
309
|
})
|
|
309
310
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
value:
|
|
312
|
-
onChange: (e) =>
|
|
311
|
+
/* @__PURE__ */ D("select", {
|
|
312
|
+
value: I,
|
|
313
|
+
onChange: (e) => L(e.target.value),
|
|
313
314
|
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",
|
|
314
315
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ E("option", {
|
|
316
317
|
value: "",
|
|
317
|
-
children:
|
|
318
|
+
children: F("featureFlags.allStatuses", "All Statuses")
|
|
318
319
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ E("option", {
|
|
320
321
|
value: "ACTIVE",
|
|
321
|
-
children:
|
|
322
|
+
children: F("featureFlags.statusActive", "Active")
|
|
322
323
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ E("option", {
|
|
324
325
|
value: "ARCHIVED",
|
|
325
|
-
children:
|
|
326
|
+
children: F("featureFlags.statusArchived", "Archived")
|
|
326
327
|
})
|
|
327
328
|
]
|
|
328
329
|
}),
|
|
329
|
-
$.length > 0 && /* @__PURE__ */
|
|
330
|
-
value:
|
|
331
|
-
onChange: (e) =>
|
|
330
|
+
$.length > 0 && /* @__PURE__ */ D("select", {
|
|
331
|
+
value: R,
|
|
332
|
+
onChange: (e) => z(e.target.value),
|
|
332
333
|
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",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ E("option", {
|
|
334
335
|
value: "",
|
|
335
|
-
children:
|
|
336
|
-
}), $.map((e) => /* @__PURE__ */
|
|
336
|
+
children: F("featureFlags.allCategories", "All Categories")
|
|
337
|
+
}), $.map((e) => /* @__PURE__ */ E("option", {
|
|
337
338
|
value: e,
|
|
338
339
|
children: e
|
|
339
340
|
}, e))]
|
|
340
341
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ E("button", {
|
|
342
343
|
type: "button",
|
|
343
|
-
onClick: () =>
|
|
344
|
-
className: "p-2 bg-surface border border-default rounded-lg text-text-secondary hover:text-text-primary hover:bg-
|
|
345
|
-
title:
|
|
346
|
-
children: /* @__PURE__ */
|
|
344
|
+
onClick: () => G(),
|
|
345
|
+
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",
|
|
346
|
+
title: F("productCommon.refresh", "Refresh"),
|
|
347
|
+
children: /* @__PURE__ */ E(x, { size: 18 })
|
|
347
348
|
}),
|
|
348
|
-
|
|
349
|
+
V.length > 0 && /* @__PURE__ */ E("button", {
|
|
349
350
|
type: "button",
|
|
350
|
-
onClick: () => a("feature-flags",
|
|
351
|
+
onClick: () => a("feature-flags", V.map((e) => ({
|
|
351
352
|
id: e.id,
|
|
352
353
|
key: e.key,
|
|
353
354
|
name: e.name,
|
|
@@ -360,147 +361,117 @@ var k = [
|
|
|
360
361
|
createdAt: e.createdAt,
|
|
361
362
|
updatedAt: e.updatedAt
|
|
362
363
|
}))),
|
|
363
|
-
className: "p-2 bg-surface border border-default rounded-lg text-text-secondary hover:text-text-primary hover:bg-
|
|
364
|
-
title:
|
|
365
|
-
children: /* @__PURE__ */
|
|
364
|
+
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",
|
|
365
|
+
title: F("featureFlags.exportCsv", "Export as CSV"),
|
|
366
|
+
children: /* @__PURE__ */ E(_, { size: 18 })
|
|
366
367
|
})
|
|
367
368
|
]
|
|
368
369
|
}),
|
|
369
|
-
|
|
370
|
-
icon: /* @__PURE__ */
|
|
371
|
-
title:
|
|
372
|
-
description:
|
|
370
|
+
V.length === 0 ? /* @__PURE__ */ E(l, {
|
|
371
|
+
icon: /* @__PURE__ */ E(y, { size: 48 }),
|
|
372
|
+
title: F("featureFlags.noFeatureFlagsFound", "No feature flags found"),
|
|
373
|
+
description: N || I || R ? F("featureFlags.tryAdjustingFilters", "Try adjusting your search or filters.") : F("featureFlags.createFirstFlagDescription", "Create your first feature flag to control feature rollout across products."),
|
|
373
374
|
action: {
|
|
374
|
-
label:
|
|
375
|
-
onClick: () =>
|
|
375
|
+
label: F("featureFlags.createFlag", "Create Flag"),
|
|
376
|
+
onClick: () => j(`${M}/feature-flags/new`)
|
|
376
377
|
}
|
|
377
|
-
}) : /* @__PURE__ */
|
|
378
|
-
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)]
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
className: "
|
|
425
|
-
children:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */ T("td", {
|
|
468
|
-
className: "px-4 py-3",
|
|
469
|
-
children: /* @__PURE__ */ E("div", {
|
|
470
|
-
className: "flex items-center justify-end gap-1",
|
|
471
|
-
children: [/* @__PURE__ */ T("button", {
|
|
472
|
-
type: "button",
|
|
473
|
-
onClick: () => A(`${j}/feature-flags/${e.id}`),
|
|
474
|
-
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-muted rounded-md transition-all duration-200",
|
|
475
|
-
title: P("featureFlags.viewDetails", "View details"),
|
|
476
|
-
children: /* @__PURE__ */ T(v, { size: 16 })
|
|
477
|
-
}), /* @__PURE__ */ E(O, {
|
|
478
|
-
role: "super_admin",
|
|
479
|
-
children: [/* @__PURE__ */ T("button", {
|
|
480
|
-
type: "button",
|
|
481
|
-
onClick: () => A(`${j}/feature-flags/${e.id}/edit`),
|
|
482
|
-
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-muted rounded-md transition-all duration-200",
|
|
483
|
-
title: P("featureFlags.edit", "Edit"),
|
|
484
|
-
children: /* @__PURE__ */ T(C, { size: 16 })
|
|
485
|
-
}), /* @__PURE__ */ T("button", {
|
|
486
|
-
type: "button",
|
|
487
|
-
onClick: () => Q(e.id, e.name),
|
|
488
|
-
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",
|
|
489
|
-
title: P("featureFlags.delete", "Delete"),
|
|
490
|
-
children: /* @__PURE__ */ T(w, { size: 16 })
|
|
491
|
-
})]
|
|
492
|
-
})]
|
|
493
|
-
})
|
|
494
|
-
})
|
|
495
|
-
]
|
|
496
|
-
}, e.id))
|
|
378
|
+
}) : /* @__PURE__ */ E(k, {
|
|
379
|
+
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)]",
|
|
380
|
+
data: V,
|
|
381
|
+
rowKey: (e) => e.id,
|
|
382
|
+
columns: [
|
|
383
|
+
{
|
|
384
|
+
key: "key",
|
|
385
|
+
header: F("featureFlags.columnKey", "Key"),
|
|
386
|
+
priority: "primary",
|
|
387
|
+
cell: (e) => /* @__PURE__ */ E("code", {
|
|
388
|
+
className: "text-sm font-mono text-text-primary bg-bg-sunken px-1.5 py-0.5 rounded",
|
|
389
|
+
children: e.key
|
|
390
|
+
})
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
key: "name",
|
|
394
|
+
header: F("featureFlags.columnName", "Name"),
|
|
395
|
+
cell: (e) => /* @__PURE__ */ E("span", {
|
|
396
|
+
className: "text-sm text-text-primary",
|
|
397
|
+
children: e.name
|
|
398
|
+
})
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
key: "type",
|
|
402
|
+
header: F("featureFlags.columnType", "Type"),
|
|
403
|
+
cell: (e) => /* @__PURE__ */ E(h, { flagType: e.flagType })
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
key: "status",
|
|
407
|
+
header: F("featureFlags.columnStatus", "Status"),
|
|
408
|
+
cell: (e) => /* @__PURE__ */ E(m, { status: e.status })
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
key: "category",
|
|
412
|
+
header: F("featureFlags.columnCategory", "Category"),
|
|
413
|
+
cell: (e) => /* @__PURE__ */ E("span", {
|
|
414
|
+
className: "text-sm text-text-secondary",
|
|
415
|
+
children: e.category || "—"
|
|
416
|
+
})
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
key: "preview",
|
|
420
|
+
header: F("featureFlags.columnPreview", "Preview"),
|
|
421
|
+
cell: (e) => e.previewable ? /* @__PURE__ */ E("span", {
|
|
422
|
+
className: "text-sm text-[var(--color-status-success)]",
|
|
423
|
+
children: F("featureFlags.yes", "Yes")
|
|
424
|
+
}) : /* @__PURE__ */ E("span", {
|
|
425
|
+
className: "text-sm text-text-tertiary",
|
|
426
|
+
children: F("featureFlags.no", "No")
|
|
427
|
+
})
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
key: "product",
|
|
431
|
+
header: F("featureFlags.columnProduct", "Product"),
|
|
432
|
+
priority: "hidden-on-mobile",
|
|
433
|
+
cell: (e) => /* @__PURE__ */ E("span", {
|
|
434
|
+
className: "text-sm text-text-secondary",
|
|
435
|
+
children: e.product?.name || "—"
|
|
436
|
+
})
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
key: "updated",
|
|
440
|
+
header: F("featureFlags.columnUpdated", "Updated"),
|
|
441
|
+
priority: "hidden-on-mobile",
|
|
442
|
+
cell: (e) => /* @__PURE__ */ E("span", {
|
|
443
|
+
className: "text-sm text-text-tertiary",
|
|
444
|
+
children: ne(e.updatedAt)
|
|
445
|
+
})
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
rowActions: (e) => /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("button", {
|
|
449
|
+
type: "button",
|
|
450
|
+
onClick: () => j(`${M}/feature-flags/${e.id}`),
|
|
451
|
+
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-all duration-200",
|
|
452
|
+
title: F("featureFlags.viewDetails", "View details"),
|
|
453
|
+
children: /* @__PURE__ */ E(v, { size: 16 })
|
|
454
|
+
}), /* @__PURE__ */ D(O, {
|
|
455
|
+
role: "super_admin",
|
|
456
|
+
children: [/* @__PURE__ */ E("button", {
|
|
457
|
+
type: "button",
|
|
458
|
+
onClick: () => j(`${M}/feature-flags/${e.id}/edit`),
|
|
459
|
+
className: "p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-all duration-200",
|
|
460
|
+
title: F("featureFlags.edit", "Edit"),
|
|
461
|
+
children: /* @__PURE__ */ E(C, { size: 16 })
|
|
462
|
+
}), /* @__PURE__ */ E("button", {
|
|
463
|
+
type: "button",
|
|
464
|
+
onClick: () => te(e.id, e.name),
|
|
465
|
+
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",
|
|
466
|
+
title: F("featureFlags.delete", "Delete"),
|
|
467
|
+
children: /* @__PURE__ */ E(w, { size: 16 })
|
|
497
468
|
})]
|
|
498
|
-
})
|
|
469
|
+
})] })
|
|
499
470
|
})
|
|
500
471
|
]
|
|
501
472
|
});
|
|
502
473
|
};
|
|
503
474
|
//#endregion
|
|
504
|
-
export {
|
|
475
|
+
export { j as FeatureFlagsListPage };
|
|
505
476
|
|
|
506
477
|
//# sourceMappingURL=FeatureFlagsListPage.js.map
|