@burdenoff/microfe-product 2026.624.2 → 2026.624.3

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.
Files changed (23) hide show
  1. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +241 -230
  2. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  3. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +292 -281
  4. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  5. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +143 -135
  6. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  7. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +25 -12
  8. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  9. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +94 -86
  10. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  11. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +249 -238
  12. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  13. package/dist/product-management/modules/products/pages/ProductDetailPage.js +406 -395
  14. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  15. package/dist/product-management/modules/products/pages/ProductsListPage.js +285 -274
  16. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  17. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +235 -224
  18. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  19. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +260 -244
  20. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  21. package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
  22. package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
  23. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPagesListPage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Download,\n FileText,\n Plus,\n Eye,\n SquarePen,\n Trash2,\n RefreshCw,\n} from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPages, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { ContentPageFilterInput } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\n\n/** Type tabs — each filters the list server-side by tag ('' = All). */\nconst TYPE_TABS: { label: string; tag: string }[] = [\n { label: 'All', tag: '' },\n { label: 'Blog', tag: 'blog' },\n { label: 'Legal', tag: 'legal' },\n { label: 'Docs', tag: 'docs' },\n { label: 'Press', tag: 'press' },\n { label: 'Pages', tag: 'page' },\n];\n\nconst PAGE_SIZE = 20;\n\nexport function ContentPagesListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<ContentPageFilterInput>({});\n const [page, setPage] = useState(0);\n\n const { contentPages, total, hasMore, loading, error, refetch } = useContentPages(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: PAGE_SIZE, offset: page * PAGE_SIZE }\n );\n\n const totalPages = Math.max(1, Math.ceil(total / PAGE_SIZE));\n // Footer is gated on `total > PAGE_SIZE`, so total === 0 never reaches the renderer; no empty-state special case needed.\n const showingFrom = page * PAGE_SIZE + 1;\n const showingTo = Math.min((page + 1) * PAGE_SIZE, total);\n\n // Clamp `page` when total shrinks below the current offset (e.g. concurrent delete strands the user past the last page).\n useEffect(() => {\n if (total === 0) {\n setPage(0);\n return;\n }\n const lastPage = Math.ceil(total / PAGE_SIZE) - 1;\n setPage((current) => (current > lastPage ? lastPage : current));\n }, [total]);\n\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr(\n 'contentPages.confirmDelete',\n 'Are you sure you want to delete this content page?'\n );\n const native = await nativeConfirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok = native === null ? window.confirm(message) : native;\n if (!ok) return;\n\n try {\n await deleteContentPage(id);\n void nativeNotify('success');\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\n }\n };\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\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 {/* Page Header */}\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <h1 className=\"text-3xl font-bold text-text-primary mb-2\">\n {tr('contentPages.title', 'Content Pages')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.subtitle', 'Manage content pages and documentation')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </PermissionGate>\n </div>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-default pb-px\">\n {TYPE_TABS.map((t) => {\n const active = (filter.tag ?? '') === t.tag;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() => {\n setFilter({ ...filter, tag: t.tag || undefined });\n setPage(0);\n }}\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {tr(`contentPages.tab.${t.label.toLowerCase()}`, t.label)}\n </button>\n );\n })}\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={(v) => {\n // Reset to page 1 synchronously with the keystroke: by the time the\n // debounced query fires, the offset is already 0 — one fetch with the\n // correct slice, no stale-offset/empty window from a post-debounce reset.\n setSearchQuery(v);\n setPage(0);\n }}\n placeholder={tr('contentPages.searchPlaceholder', 'Search content pages...')}\n className=\"flex-1\"\n />\n\n {/* Published Filter */}\n <select\n value={filter.isPublished === undefined ? '' : filter.isPublished ? 'published' : 'all'}\n onChange={(e) => {\n setFilter({\n ...filter,\n isPublished: e.target.value === 'published' ? true : undefined,\n });\n setPage(0);\n }}\n className=\"\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \"\n >\n <option value=\"\">{tr('contentPages.filterAll', 'All')}</option>\n <option value=\"published\">{tr('contentPages.publishedOnly', 'Published Only')}</option>\n </select>\n\n {/* Refresh */}\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'content-pages',\n contentPages.map((p) => ({\n id: p.id,\n slug: p.slug,\n title: p.title,\n isPublished: p.isPublished,\n contentFormat: p.contentFormat,\n tags: (p.tags ?? []).join(', '),\n sortOrder: p.sortOrder,\n productId: p.productId ?? '',\n createdAt: p.createdAt,\n updatedAt: p.updatedAt,\n }))\n )\n }\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n \"\n title={tr('contentPages.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && contentPages.length === 0 ? (\n <LoadingState\n message={tr('contentPages.loadingContentPages', 'Loading content pages...')}\n />\n ) : contentPages.length === 0 ? (\n <div className=\"bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200\">\n <p className=\"text-text-secondary mb-4\">\n {tr('contentPages.noContentPagesFound', 'No content pages found')}\n </p>\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </div>\n ) : (\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken border-b border-default\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnPage', 'Page')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnSlug', 'Slug')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnStatus', 'Status')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnVersion', 'Version')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnLastUpdated', 'Last Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-[var(--color-border-default)]\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-bg-sunken transition-all duration-200 cursor-pointer\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{page.title}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-tertiary font-mono\">/{page.slug}</span>\n </td>\n <td className=\"px-6 py-4\">\n <ContentPageStatusBadge isPublished={page.isPublished} />\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary font-mono\">v{page.version}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(page.lastUpdated || page.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(page.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('contentPages.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n\n {/* Pagination — hidden when total fits on one page to avoid always-disabled buttons. */}\n {total > PAGE_SIZE && (\n <div className=\"flex items-center justify-between px-6 py-3 border-t border-default bg-bg-sunken/50\">\n <p className=\"text-sm text-text-secondary\">\n {tr('contentPages.showing', 'Showing')} {showingFrom}–{showingTo}{' '}\n {tr('contentPages.of', 'of')} {total}{' '}\n {tr('contentPages.contentPages', 'content pages')}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0 || loading}\n aria-label={tr('contentPages.prevPage', 'Previous page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n <ChevronLeft size={16} />\n {tr('contentPages.prev', 'Prev')}\n </button>\n <span className=\"text-sm text-text-secondary px-2\">\n {page + 1} / {totalPages}\n </span>\n {/* Belt-and-suspenders: `page+1 >= totalPages` alone is enough when backend `total` is reliable; `!hasMore` guards against stale/lying counts. */}\n <button\n type=\"button\"\n onClick={() => setPage((p) => p + 1)}\n disabled={(!hasMore && page + 1 >= totalPages) || loading}\n aria-label={tr('contentPages.nextPage', 'Next page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n {tr('contentPages.next', 'Next')}\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;EAAI;CACzB;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAS,KAAK;EAAQ;CAChC,EAEK,IAAY;AAElB,SAAgB,IAAuB;CACrC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAuB,GAAG,EAAS,iBACnC,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAiC,EAAE,CAAC,EAC1D,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,iBAAc,UAAO,YAAS,YAAS,UAAO,eAAY,EAChE,KAAA,GACA;EAAE,GAAG;EAAQ,QAAQ,KAAwB,KAAA;EAAW,EACxD;EAAE,OAAO;EAAW,QAAQ,IAAO;EAAW,CAC/C,EAEK,IAAa,KAAK,IAAI,GAAG,KAAK,KAAK,IAAQ,EAAU,CAAC,EAEtD,IAAc,IAAO,IAAY,GACjC,IAAY,KAAK,KAAK,IAAO,KAAK,GAAW,EAAM;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}
1
+ {"version":3,"file":"ContentPagesListPage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Download,\n FileText,\n Plus,\n Eye,\n SquarePen,\n Trash2,\n RefreshCw,\n} from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPages, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { ContentPageFilterInput } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/** Type tabs — each filters the list server-side by tag ('' = All). */\nconst TYPE_TABS: { label: string; tag: string }[] = [\n { label: 'All', tag: '' },\n { label: 'Blog', tag: 'blog' },\n { label: 'Legal', tag: 'legal' },\n { label: 'Docs', tag: 'docs' },\n { label: 'Press', tag: 'press' },\n { label: 'Pages', tag: 'page' },\n];\n\nconst PAGE_SIZE = 20;\n\nexport function ContentPagesListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<ContentPageFilterInput>({});\n const [page, setPage] = useState(0);\n\n const { contentPages, total, hasMore, loading, error, refetch } = useContentPages(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: PAGE_SIZE, offset: page * PAGE_SIZE }\n );\n\n const totalPages = Math.max(1, Math.ceil(total / PAGE_SIZE));\n // Footer is gated on `total > PAGE_SIZE`, so total === 0 never reaches the renderer; no empty-state special case needed.\n const showingFrom = page * PAGE_SIZE + 1;\n const showingTo = Math.min((page + 1) * PAGE_SIZE, total);\n\n // Clamp `page` when total shrinks below the current offset (e.g. concurrent delete strands the user past the last page).\n useEffect(() => {\n if (total === 0) {\n setPage(0);\n return;\n }\n const lastPage = Math.ceil(total / PAGE_SIZE) - 1;\n setPage((current) => (current > lastPage ? lastPage : current));\n }, [total]);\n\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr(\n 'contentPages.confirmDelete',\n 'Are you sure you want to delete this content page?'\n );\n const native = await nativeConfirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteContentPage(id);\n void nativeNotify('success');\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\n }\n };\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\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 {/* Page Header */}\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <h1 className=\"text-3xl font-bold text-text-primary mb-2\">\n {tr('contentPages.title', 'Content Pages')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.subtitle', 'Manage content pages and documentation')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </PermissionGate>\n </div>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-default pb-px\">\n {TYPE_TABS.map((t) => {\n const active = (filter.tag ?? '') === t.tag;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() => {\n setFilter({ ...filter, tag: t.tag || undefined });\n setPage(0);\n }}\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {tr(`contentPages.tab.${t.label.toLowerCase()}`, t.label)}\n </button>\n );\n })}\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={(v) => {\n // Reset to page 1 synchronously with the keystroke: by the time the\n // debounced query fires, the offset is already 0 — one fetch with the\n // correct slice, no stale-offset/empty window from a post-debounce reset.\n setSearchQuery(v);\n setPage(0);\n }}\n placeholder={tr('contentPages.searchPlaceholder', 'Search content pages...')}\n className=\"flex-1\"\n />\n\n {/* Published Filter */}\n <select\n value={filter.isPublished === undefined ? '' : filter.isPublished ? 'published' : 'all'}\n onChange={(e) => {\n setFilter({\n ...filter,\n isPublished: e.target.value === 'published' ? true : undefined,\n });\n setPage(0);\n }}\n className=\"\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \"\n >\n <option value=\"\">{tr('contentPages.filterAll', 'All')}</option>\n <option value=\"published\">{tr('contentPages.publishedOnly', 'Published Only')}</option>\n </select>\n\n {/* Refresh */}\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'content-pages',\n contentPages.map((p) => ({\n id: p.id,\n slug: p.slug,\n title: p.title,\n isPublished: p.isPublished,\n contentFormat: p.contentFormat,\n tags: (p.tags ?? []).join(', '),\n sortOrder: p.sortOrder,\n productId: p.productId ?? '',\n createdAt: p.createdAt,\n updatedAt: p.updatedAt,\n }))\n )\n }\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n \"\n title={tr('contentPages.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && contentPages.length === 0 ? (\n <LoadingState\n message={tr('contentPages.loadingContentPages', 'Loading content pages...')}\n />\n ) : contentPages.length === 0 ? (\n <div className=\"bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200\">\n <p className=\"text-text-secondary mb-4\">\n {tr('contentPages.noContentPagesFound', 'No content pages found')}\n </p>\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </div>\n ) : (\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken border-b border-default\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnPage', 'Page')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnSlug', 'Slug')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnStatus', 'Status')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnVersion', 'Version')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnLastUpdated', 'Last Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-[var(--color-border-default)]\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-bg-sunken transition-all duration-200 cursor-pointer\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{page.title}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-tertiary font-mono\">/{page.slug}</span>\n </td>\n <td className=\"px-6 py-4\">\n <ContentPageStatusBadge isPublished={page.isPublished} />\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary font-mono\">v{page.version}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(page.lastUpdated || page.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(page.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('contentPages.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n\n {/* Pagination — hidden when total fits on one page to avoid always-disabled buttons. */}\n {total > PAGE_SIZE && (\n <div className=\"flex items-center justify-between px-6 py-3 border-t border-default bg-bg-sunken/50\">\n <p className=\"text-sm text-text-secondary\">\n {tr('contentPages.showing', 'Showing')} {showingFrom}–{showingTo}{' '}\n {tr('contentPages.of', 'of')} {total}{' '}\n {tr('contentPages.contentPages', 'content pages')}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0 || loading}\n aria-label={tr('contentPages.prevPage', 'Previous page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n <ChevronLeft size={16} />\n {tr('contentPages.prev', 'Prev')}\n </button>\n <span className=\"text-sm text-text-secondary px-2 tabular-nums\">\n {page + 1} / {totalPages}\n </span>\n {/* Belt-and-suspenders: `page+1 >= totalPages` alone is enough when backend `total` is reliable; `!hasMore` guards against stale/lying counts. */}\n <button\n type=\"button\"\n onClick={() => setPage((p) => p + 1)}\n disabled={(!hasMore && page + 1 >= totalPages) || loading}\n aria-label={tr('contentPages.nextPage', 'Next page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n {tr('contentPages.next', 'Next')}\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </div>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,IAAM,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;EAAI;CACzB;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAS,KAAK;EAAQ;CAChC,EAEK,IAAY;AAElB,SAAgB,IAAuB;CACrC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAuB,GAAG,EAAS,iBACnC,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAiC,EAAE,CAAC,EAC1D,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,iBAAc,UAAO,YAAS,YAAS,UAAO,eAAY,EAChE,KAAA,GACA;EAAE,GAAG;EAAQ,QAAQ,KAAwB,KAAA;EAAW,EACxD;EA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E;SAAI;SACT;;OAEP,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,GAAS,MAAM,IAAI,EAAE;QACpC,UAAW,CAAC,KAAW,IAAO,KAAK,KAAe;QAClD,cAAY,EAAG,yBAAyB,YAAY;QACpD,WAAU;kBALZ,CAaG,EAAG,qBAAqB,OAAO,EAChC,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA,CACnB;;OACL;QACF;OAEJ;;GAEP;GACG"}
@@ -3,293 +3,301 @@ import { useProductConsole as t } from "../../../providers/ProductConsoleProvide
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
5
  import { nativeConfirm as i, nativeImpact as a, nativeNotify as o } from "../../../../utils/nativeBridge.js";
6
- import { TagList as s } from "../../../shared/components/TagList.js";
7
- import { AuditHistoryTab as c } from "../../../shared/components/AuditHistoryTab.js";
8
- import { useDeleteFeatureFlag as l, useFeatureFlag as u } from "../hooks/useFeatureFlags.js";
9
- import { FeatureFlagStatusBadge as d } from "../components/FeatureFlagStatusBadge.js";
10
- import { FeatureFlagTypeBadge as f } from "../components/FeatureFlagTypeBadge.js";
11
- import { ArrowLeft as p, SquarePen as m, Trash2 as h } from "lucide-react";
12
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
- import { useFeatureFlags as v } from "@burdenoff/fe-libs/shared/feature-flags";
14
- import { useParams as y } from "react-router-dom";
6
+ import { useConfirmDialog as s } from "../../../shared/hooks/useConfirmDialog.js";
7
+ import { TagList as c } from "../../../shared/components/TagList.js";
8
+ import { AuditHistoryTab as l } from "../../../shared/components/AuditHistoryTab.js";
9
+ import { useDeleteFeatureFlag as u, useFeatureFlag as d } from "../hooks/useFeatureFlags.js";
10
+ import { FeatureFlagStatusBadge as f } from "../components/FeatureFlagStatusBadge.js";
11
+ import { FeatureFlagTypeBadge as p } from "../components/FeatureFlagTypeBadge.js";
12
+ import { ArrowLeft as m, SquarePen as h, Trash2 as g } from "lucide-react";
13
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
14
+ import { useFeatureFlags as y } from "@burdenoff/fe-libs/shared/feature-flags";
15
+ import { useParams as b } from "react-router-dom";
15
16
  //#region src/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.tsx
16
- var b = () => {
17
- let { id: b } = y(), { navigate: x, basePath: S } = t(), { featureFlag: C, loading: w, error: T, refetch: E } = u(b), { deleteFeatureFlag: D } = l(), { refreshFlags: O } = v(), k = e(), A = async () => {
18
- if (!C) return;
17
+ var x = () => {
18
+ let { id: x } = b(), { navigate: S, basePath: C } = t(), { featureFlag: w, loading: T, error: E, refetch: D } = d(x), { deleteFeatureFlag: O } = u(), { refreshFlags: k } = y(), A = e(), { confirm: j, ConfirmDialog: M } = s(), N = async () => {
19
+ if (!w) return;
19
20
  a("medium");
20
- let e = `Are you sure you want to delete "${C.name}"? This will remove all workspace overrides and user preferences.`, t = await i({
21
+ let e = `Are you sure you want to delete "${w.name}"? This will remove all workspace overrides and user preferences.`, t = await i({
21
22
  title: "Delete feature flag",
22
23
  message: e,
23
24
  okButtonTitle: "Delete",
24
25
  cancelButtonTitle: "Cancel"
25
26
  });
26
- if (t === null ? window.confirm(e) : t) try {
27
- await D(C.id), O(), o("success"), x(`${S}/feature-flags`);
27
+ if (t === null ? await j({
28
+ title: "Delete feature flag",
29
+ message: e,
30
+ okButtonTitle: "Delete",
31
+ cancelButtonTitle: "Cancel",
32
+ destructive: !0
33
+ }) : t) try {
34
+ await O(w.id), k(), o("success"), S(`${C}/feature-flags`);
28
35
  } catch (e) {
29
36
  throw o("error"), e;
30
37
  }
31
38
  };
32
- if (w) return /* @__PURE__ */ g("div", {
39
+ if (T) return /* @__PURE__ */ _("div", {
33
40
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
34
- children: /* @__PURE__ */ g(n, { message: k("featureFlags.loadingFeatureFlag", "Loading feature flag...") })
41
+ children: /* @__PURE__ */ _(n, { message: A("featureFlags.loadingFeatureFlag", "Loading feature flag...") })
35
42
  });
36
- if (T) return /* @__PURE__ */ g("div", {
43
+ if (E) return /* @__PURE__ */ _("div", {
37
44
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
38
- children: /* @__PURE__ */ g(r, {
39
- message: T.message,
45
+ children: /* @__PURE__ */ _(r, {
46
+ message: E.message,
40
47
  action: {
41
- label: k("productCommon.retry", "Retry"),
42
- onClick: () => E()
48
+ label: A("productCommon.retry", "Retry"),
49
+ onClick: () => D()
43
50
  }
44
51
  })
45
52
  });
46
- if (!C) return /* @__PURE__ */ g("div", {
53
+ if (!w) return /* @__PURE__ */ _("div", {
47
54
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
48
- children: /* @__PURE__ */ g(r, { message: k("featureFlags.featureFlagNotFound", "Feature flag not found") })
55
+ children: /* @__PURE__ */ _(r, { message: A("featureFlags.featureFlagNotFound", "Feature flag not found") })
49
56
  });
50
- let j = (e) => new Date(e).toLocaleDateString("en-US", {
57
+ let P = (e) => new Date(e).toLocaleDateString("en-US", {
51
58
  year: "numeric",
52
59
  month: "short",
53
60
  day: "numeric",
54
61
  hour: "2-digit",
55
62
  minute: "2-digit"
56
63
  });
57
- return /* @__PURE__ */ _("div", {
64
+ return /* @__PURE__ */ v("div", {
58
65
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
59
66
  children: [
60
- /* @__PURE__ */ _("button", {
67
+ /* @__PURE__ */ v("button", {
61
68
  type: "button",
62
- onClick: () => x(`${S}/feature-flags`),
69
+ onClick: () => S(`${C}/feature-flags`),
63
70
  className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary mb-4 transition-all duration-200",
64
- children: [/* @__PURE__ */ g(p, { size: 18 }), k("featureFlags.backToFeatureFlags", "Back to Feature Flags")]
71
+ children: [/* @__PURE__ */ _(m, { size: 18 }), A("featureFlags.backToFeatureFlags", "Back to Feature Flags")]
65
72
  }),
66
- /* @__PURE__ */ _("div", {
73
+ /* @__PURE__ */ v("div", {
67
74
  className: "flex items-start justify-between mb-6",
68
- children: [/* @__PURE__ */ _("div", { children: [
69
- /* @__PURE__ */ _("div", {
75
+ children: [/* @__PURE__ */ v("div", { children: [
76
+ /* @__PURE__ */ v("div", {
70
77
  className: "flex items-center gap-3 mb-2",
71
78
  children: [
72
- /* @__PURE__ */ g("h1", {
79
+ /* @__PURE__ */ _("h1", {
73
80
  className: "text-2xl font-bold text-text-primary",
74
- children: C.name
81
+ children: w.name
75
82
  }),
76
- /* @__PURE__ */ g(d, { status: C.status }),
77
- /* @__PURE__ */ g(f, { flagType: C.flagType })
83
+ /* @__PURE__ */ _(f, { status: w.status }),
84
+ /* @__PURE__ */ _(p, { flagType: w.flagType })
78
85
  ]
79
86
  }),
80
- /* @__PURE__ */ g("code", {
87
+ /* @__PURE__ */ _("code", {
81
88
  className: "text-sm font-mono text-text-secondary bg-bg-sunken px-2 py-1 rounded",
82
- children: C.key
89
+ children: w.key
83
90
  }),
84
- C.description && /* @__PURE__ */ g("p", {
91
+ w.description && /* @__PURE__ */ _("p", {
85
92
  className: "text-sm text-text-secondary mt-2",
86
- children: C.description
93
+ children: w.description
87
94
  }),
88
- C.tags && C.tags.length > 0 && /* @__PURE__ */ g("div", {
95
+ w.tags && w.tags.length > 0 && /* @__PURE__ */ _("div", {
89
96
  className: "mt-2",
90
- children: /* @__PURE__ */ g(s, { tags: C.tags })
97
+ children: /* @__PURE__ */ _(c, { tags: w.tags })
91
98
  })
92
- ] }), /* @__PURE__ */ _("div", {
99
+ ] }), /* @__PURE__ */ v("div", {
93
100
  className: "flex items-center gap-2",
94
- children: [/* @__PURE__ */ _("button", {
101
+ children: [/* @__PURE__ */ v("button", {
95
102
  type: "button",
96
- onClick: () => x(`${S}/feature-flags/${C.id}/edit`),
103
+ onClick: () => S(`${C}/feature-flags/${w.id}/edit`),
97
104
  className: "inline-flex items-center gap-2 px-3 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200",
98
- children: [/* @__PURE__ */ g(m, { size: 16 }), k("featureFlags.edit", "Edit")]
99
- }), /* @__PURE__ */ _("button", {
105
+ children: [/* @__PURE__ */ _(h, { size: 16 }), A("featureFlags.edit", "Edit")]
106
+ }), /* @__PURE__ */ v("button", {
100
107
  type: "button",
101
- onClick: A,
108
+ onClick: N,
102
109
  className: "inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-status-error-subtle)] text-[var(--color-status-error)] border border-[var(--color-status-error-border)] rounded-lg hover:opacity-80 transition-all duration-200",
103
- children: [/* @__PURE__ */ g(h, { size: 16 }), k("featureFlags.delete", "Delete")]
110
+ children: [/* @__PURE__ */ _(g, { size: 16 }), A("featureFlags.delete", "Delete")]
104
111
  })]
105
112
  })]
106
113
  }),
107
- /* @__PURE__ */ _("div", {
114
+ /* @__PURE__ */ v("div", {
108
115
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
109
116
  children: [
110
- /* @__PURE__ */ _("div", {
117
+ /* @__PURE__ */ v("div", {
111
118
  className: "bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)]",
112
- children: [/* @__PURE__ */ g("h2", {
119
+ children: [/* @__PURE__ */ _("h2", {
113
120
  className: "text-lg font-semibold text-text-primary mb-4",
114
- children: k("featureFlags.configuration", "Configuration")
115
- }), /* @__PURE__ */ _("dl", {
121
+ children: A("featureFlags.configuration", "Configuration")
122
+ }), /* @__PURE__ */ v("dl", {
116
123
  className: "space-y-3",
117
124
  children: [
118
- /* @__PURE__ */ _("div", {
125
+ /* @__PURE__ */ v("div", {
119
126
  className: "flex justify-between",
120
- children: [/* @__PURE__ */ g("dt", {
127
+ children: [/* @__PURE__ */ _("dt", {
121
128
  className: "text-sm text-text-secondary",
122
- children: k("featureFlags.defaultValue", "Default Value")
123
- }), /* @__PURE__ */ g("dd", {
129
+ children: A("featureFlags.defaultValue", "Default Value")
130
+ }), /* @__PURE__ */ _("dd", {
124
131
  className: "text-sm font-mono text-text-primary",
125
- children: JSON.stringify(C.defaultValue)
132
+ children: JSON.stringify(w.defaultValue)
126
133
  })]
127
134
  }),
128
- /* @__PURE__ */ _("div", {
135
+ /* @__PURE__ */ v("div", {
129
136
  className: "flex justify-between",
130
- children: [/* @__PURE__ */ g("dt", {
137
+ children: [/* @__PURE__ */ _("dt", {
131
138
  className: "text-sm text-text-secondary",
132
- children: k("featureFlags.category", "Category")
133
- }), /* @__PURE__ */ g("dd", {
139
+ children: A("featureFlags.category", "Category")
140
+ }), /* @__PURE__ */ _("dd", {
134
141
  className: "text-sm text-text-primary",
135
- children: C.category || "—"
142
+ children: w.category || "—"
136
143
  })]
137
144
  }),
138
- /* @__PURE__ */ _("div", {
145
+ /* @__PURE__ */ v("div", {
139
146
  className: "flex justify-between",
140
- children: [/* @__PURE__ */ g("dt", {
147
+ children: [/* @__PURE__ */ _("dt", {
141
148
  className: "text-sm text-text-secondary",
142
- children: k("featureFlags.previewable", "Previewable")
143
- }), /* @__PURE__ */ g("dd", {
149
+ children: A("featureFlags.previewable", "Previewable")
150
+ }), /* @__PURE__ */ _("dd", {
144
151
  className: "text-sm text-text-primary",
145
- children: C.previewable ? /* @__PURE__ */ g("span", {
152
+ children: w.previewable ? /* @__PURE__ */ _("span", {
146
153
  className: "text-[var(--color-status-success)]",
147
- children: k("featureFlags.yesUsersCanOptIn", "Yes — users can opt-in")
154
+ children: A("featureFlags.yesUsersCanOptIn", "Yes — users can opt-in")
148
155
  }) : "No"
149
156
  })]
150
157
  }),
151
- /* @__PURE__ */ _("div", {
158
+ /* @__PURE__ */ v("div", {
152
159
  className: "flex justify-between",
153
- children: [/* @__PURE__ */ g("dt", {
160
+ children: [/* @__PURE__ */ _("dt", {
154
161
  className: "text-sm text-text-secondary",
155
- children: k("featureFlags.product", "Product")
156
- }), /* @__PURE__ */ g("dd", {
162
+ children: A("featureFlags.product", "Product")
163
+ }), /* @__PURE__ */ _("dd", {
157
164
  className: "text-sm text-text-primary",
158
- children: C.product?.name || k("featureFlags.allProductsGlobal", "All products (global)")
165
+ children: w.product?.name || A("featureFlags.allProductsGlobal", "All products (global)")
159
166
  })]
160
167
  })
161
168
  ]
162
169
  })]
163
170
  }),
164
- /* @__PURE__ */ _("div", {
171
+ /* @__PURE__ */ v("div", {
165
172
  className: "bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)]",
166
- children: [/* @__PURE__ */ g("h2", {
173
+ children: [/* @__PURE__ */ _("h2", {
167
174
  className: "text-lg font-semibold text-text-primary mb-4",
168
- children: k("featureFlags.auditTrail", "Audit Trail")
169
- }), /* @__PURE__ */ _("dl", {
175
+ children: A("featureFlags.auditTrail", "Audit Trail")
176
+ }), /* @__PURE__ */ v("dl", {
170
177
  className: "space-y-3",
171
178
  children: [
172
- /* @__PURE__ */ _("div", {
179
+ /* @__PURE__ */ v("div", {
173
180
  className: "flex justify-between",
174
- children: [/* @__PURE__ */ g("dt", {
181
+ children: [/* @__PURE__ */ _("dt", {
175
182
  className: "text-sm text-text-secondary",
176
- children: k("featureFlags.created", "Created")
177
- }), /* @__PURE__ */ g("dd", {
183
+ children: A("featureFlags.created", "Created")
184
+ }), /* @__PURE__ */ _("dd", {
178
185
  className: "text-sm text-text-primary",
179
- children: j(C.createdAt)
186
+ children: P(w.createdAt)
180
187
  })]
181
188
  }),
182
- /* @__PURE__ */ _("div", {
189
+ /* @__PURE__ */ v("div", {
183
190
  className: "flex justify-between",
184
- children: [/* @__PURE__ */ g("dt", {
191
+ children: [/* @__PURE__ */ _("dt", {
185
192
  className: "text-sm text-text-secondary",
186
- children: k("featureFlags.createdBy", "Created By")
187
- }), /* @__PURE__ */ g("dd", {
193
+ children: A("featureFlags.createdBy", "Created By")
194
+ }), /* @__PURE__ */ _("dd", {
188
195
  className: "text-sm font-mono text-text-primary",
189
- children: C.createdBy
196
+ children: w.createdBy
190
197
  })]
191
198
  }),
192
- /* @__PURE__ */ _("div", {
199
+ /* @__PURE__ */ v("div", {
193
200
  className: "flex justify-between",
194
- children: [/* @__PURE__ */ g("dt", {
201
+ children: [/* @__PURE__ */ _("dt", {
195
202
  className: "text-sm text-text-secondary",
196
- children: k("featureFlags.lastUpdated", "Last Updated")
197
- }), /* @__PURE__ */ g("dd", {
203
+ children: A("featureFlags.lastUpdated", "Last Updated")
204
+ }), /* @__PURE__ */ _("dd", {
198
205
  className: "text-sm text-text-primary",
199
- children: j(C.updatedAt)
206
+ children: P(w.updatedAt)
200
207
  })]
201
208
  }),
202
- /* @__PURE__ */ _("div", {
209
+ /* @__PURE__ */ v("div", {
203
210
  className: "flex justify-between",
204
- children: [/* @__PURE__ */ g("dt", {
211
+ children: [/* @__PURE__ */ _("dt", {
205
212
  className: "text-sm text-text-secondary",
206
- children: k("featureFlags.updatedBy", "Updated By")
207
- }), /* @__PURE__ */ g("dd", {
213
+ children: A("featureFlags.updatedBy", "Updated By")
214
+ }), /* @__PURE__ */ _("dd", {
208
215
  className: "text-sm font-mono text-text-primary",
209
- children: C.updatedBy || "—"
216
+ children: w.updatedBy || "—"
210
217
  })]
211
218
  })
212
219
  ]
213
220
  })]
214
221
  }),
215
- /* @__PURE__ */ _("div", {
222
+ /* @__PURE__ */ v("div", {
216
223
  className: "lg:col-span-2 bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)]",
217
- children: [/* @__PURE__ */ g("h2", {
224
+ children: [/* @__PURE__ */ _("h2", {
218
225
  className: "text-lg font-semibold text-text-primary p-6 pb-0",
219
- children: k("featureFlags.activityHistory", "Activity History")
220
- }), /* @__PURE__ */ g(c, {
221
- resourceId: C.id,
226
+ children: A("featureFlags.activityHistory", "Activity History")
227
+ }), /* @__PURE__ */ _(l, {
228
+ resourceId: w.id,
222
229
  resourceType: "FeatureFlag"
223
230
  })]
224
231
  }),
225
- /* @__PURE__ */ _("div", {
232
+ /* @__PURE__ */ v("div", {
226
233
  className: "lg:col-span-2 bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)]",
227
- children: [/* @__PURE__ */ g("h2", {
234
+ children: [/* @__PURE__ */ _("h2", {
228
235
  className: "text-lg font-semibold text-text-primary mb-4",
229
- children: k("featureFlags.workspaceOverrides", "Workspace Overrides")
230
- }), C.workspaceOverrides && C.workspaceOverrides.length > 0 ? /* @__PURE__ */ g("div", {
236
+ children: A("featureFlags.workspaceOverrides", "Workspace Overrides")
237
+ }), w.workspaceOverrides && w.workspaceOverrides.length > 0 ? /* @__PURE__ */ _("div", {
231
238
  className: "overflow-hidden rounded-lg border border-default",
232
- children: /* @__PURE__ */ _("table", {
239
+ children: /* @__PURE__ */ v("table", {
233
240
  className: "w-full",
234
- children: [/* @__PURE__ */ g("thead", {
241
+ children: [/* @__PURE__ */ _("thead", {
235
242
  className: "bg-bg-sunken",
236
- children: /* @__PURE__ */ _("tr", { children: [
237
- /* @__PURE__ */ g("th", {
243
+ children: /* @__PURE__ */ v("tr", { children: [
244
+ /* @__PURE__ */ _("th", {
238
245
  className: "px-4 py-2 text-left text-xs font-semibold text-text-secondary uppercase",
239
- children: k("featureFlags.workspaceId", "Workspace ID")
246
+ children: A("featureFlags.workspaceId", "Workspace ID")
240
247
  }),
241
- /* @__PURE__ */ g("th", {
248
+ /* @__PURE__ */ _("th", {
242
249
  className: "px-4 py-2 text-left text-xs font-semibold text-text-secondary uppercase",
243
- children: k("featureFlags.enabled", "Enabled")
250
+ children: A("featureFlags.enabled", "Enabled")
244
251
  }),
245
- /* @__PURE__ */ g("th", {
252
+ /* @__PURE__ */ _("th", {
246
253
  className: "px-4 py-2 text-left text-xs font-semibold text-text-secondary uppercase",
247
- children: k("featureFlags.userOptIn", "User Opt-In")
254
+ children: A("featureFlags.userOptIn", "User Opt-In")
248
255
  }),
249
- /* @__PURE__ */ g("th", {
256
+ /* @__PURE__ */ _("th", {
250
257
  className: "px-4 py-2 text-left text-xs font-semibold text-text-secondary uppercase",
251
- children: k("featureFlags.updated", "Updated")
258
+ children: A("featureFlags.updated", "Updated")
252
259
  })
253
260
  ] })
254
- }), /* @__PURE__ */ g("tbody", {
261
+ }), /* @__PURE__ */ _("tbody", {
255
262
  className: "divide-y divide-default",
256
- children: C.workspaceOverrides.map((e) => /* @__PURE__ */ _("tr", { children: [
257
- /* @__PURE__ */ g("td", {
263
+ children: w.workspaceOverrides.map((e) => /* @__PURE__ */ v("tr", { children: [
264
+ /* @__PURE__ */ _("td", {
258
265
  className: "px-4 py-2 text-sm font-mono text-text-primary",
259
266
  children: e.workspaceId
260
267
  }),
261
- /* @__PURE__ */ g("td", {
268
+ /* @__PURE__ */ _("td", {
262
269
  className: "px-4 py-2 text-sm",
263
- children: e.enabled ? /* @__PURE__ */ g("span", {
270
+ children: e.enabled ? /* @__PURE__ */ _("span", {
264
271
  className: "text-[var(--color-status-success)]",
265
- children: k("featureFlags.statusEnabled", "Enabled")
266
- }) : /* @__PURE__ */ g("span", {
272
+ children: A("featureFlags.statusEnabled", "Enabled")
273
+ }) : /* @__PURE__ */ _("span", {
267
274
  className: "text-[var(--color-status-error)]",
268
- children: k("featureFlags.statusDisabled", "Disabled")
275
+ children: A("featureFlags.statusDisabled", "Disabled")
269
276
  })
270
277
  }),
271
- /* @__PURE__ */ g("td", {
278
+ /* @__PURE__ */ _("td", {
272
279
  className: "px-4 py-2 text-sm text-text-secondary",
273
- children: e.allowUserOptIn ? k("featureFlags.allowed", "Allowed") : k("featureFlags.blocked", "Blocked")
280
+ children: e.allowUserOptIn ? A("featureFlags.allowed", "Allowed") : A("featureFlags.blocked", "Blocked")
274
281
  }),
275
- /* @__PURE__ */ g("td", {
282
+ /* @__PURE__ */ _("td", {
276
283
  className: "px-4 py-2 text-sm text-text-tertiary",
277
- children: j(e.updatedAt)
284
+ children: P(e.updatedAt)
278
285
  })
279
286
  ] }, e.id))
280
287
  })]
281
288
  })
282
- }) : /* @__PURE__ */ g("p", {
289
+ }) : /* @__PURE__ */ _("p", {
283
290
  className: "text-sm text-text-tertiary",
284
- children: k("featureFlags.noWorkspaceOverrides", "No workspace overrides configured. All workspaces use the platform default.")
291
+ children: A("featureFlags.noWorkspaceOverrides", "No workspace overrides configured. All workspaces use the platform default.")
285
292
  })]
286
293
  })
287
294
  ]
288
- })
295
+ }),
296
+ M
289
297
  ]
290
298
  });
291
299
  };
292
300
  //#endregion
293
- export { b as FeatureFlagDetailPage };
301
+ export { x as FeatureFlagDetailPage };
294
302
 
295
303
  //# sourceMappingURL=FeatureFlagDetailPage.js.map