@burdenoff/microfe-product 2026.624.3 → 2026.626.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.
Files changed (63) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +41 -36
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductCatalogPage.js +63 -50
  4. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  5. package/dist/product/pages/ProductViewPage.js +220 -178
  6. package/dist/product/pages/ProductViewPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
  8. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  9. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +28 -26
  10. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
  11. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +119 -90
  12. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +33 -31
  14. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
  15. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +171 -161
  16. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  17. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
  18. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  19. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +26 -24
  20. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  21. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +152 -125
  22. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  23. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +36 -34
  24. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  25. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +144 -136
  26. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  27. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
  28. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  29. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +28 -26
  30. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
  31. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +111 -84
  32. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  33. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +33 -31
  34. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
  35. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +85 -75
  36. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  37. package/dist/product-management/modules/products/components/ProductForm.js +8 -8
  38. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  39. package/dist/product-management/modules/products/components/ProductPlans.js +136 -147
  40. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  41. package/dist/product-management/modules/products/pages/ProductCreatePage.js +28 -26
  42. package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
  43. package/dist/product-management/modules/products/pages/ProductDetailPage.js +170 -140
  44. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  45. package/dist/product-management/modules/products/pages/ProductEditPage.js +32 -30
  46. package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
  47. package/dist/product-management/modules/products/pages/ProductsListPage.js +219 -202
  48. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  49. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
  50. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  51. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +28 -23
  52. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
  53. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +228 -209
  54. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  55. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +31 -26
  56. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
  57. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +209 -198
  58. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  59. package/dist/product-management/shared/components/AuditHistoryTab.js +19 -17
  60. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  61. package/dist/product-management/shared/components/feedback/EmptyState.js +2 -20
  62. package/package.json +2 -2
  63. package/dist/product-management/shared/components/feedback/EmptyState.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ShortcutsListPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutsListPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Plus,\n RefreshCw,\n Eye,\n SquarePen,\n Trash2,\n ToggleLeft,\n ToggleRight,\n Sparkles,\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 {\n useShortcuts,\n useDeleteShortcut,\n useToggleShortcut,\n useSeedDefaultShortcuts,\n} from '../hooks/useShortcuts';\nimport { ShortcutCategoryBadge } from '../components/ShortcutCategoryBadge';\nimport { ShortcutKeyBadge } from '../components/ShortcutKeyBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { KeyboardShortcutFilterInput } from '../types';\nimport { ShortcutCategories } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\nexport function ShortcutsListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\n const { confirm, ConfirmDialog } = useConfirmDialog();\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 [filter, setFilter] = useState<KeyboardShortcutFilterInput>({});\n\n const { shortcuts, loading, error, refetch } = useShortcuts(\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: 50 }\n );\n\n const { deleteShortcut, loading: deleteLoading } = useDeleteShortcut();\n const { toggleShortcut, loading: toggleLoading } = useToggleShortcut();\n const { seedDefaultShortcuts, loading: seedLoading } = useSeedDefaultShortcuts();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr('shortcuts.confirmDelete', 'Are you sure you want to delete this shortcut?');\n const native = await nativeConfirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteShortcut(id);\n void nativeNotify('success');\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete shortcut:', error);\n }\n };\n\n const handleToggle = async (id: string, currentEnabled: boolean) => {\n void nativeImpact('medium');\n try {\n await toggleShortcut(id, !currentEnabled);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to toggle shortcut:', error);\n }\n };\n\n const handleSeedDefaults = async () => {\n void nativeImpact('light');\n const message = tr(\n 'shortcuts.confirmSeedDefaults',\n 'This will create default global shortcuts. Continue?'\n );\n const native = await nativeConfirm({\n title: 'Seed defaults',\n message,\n okButtonTitle: 'Continue',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Seed defaults',\n message,\n okButtonTitle: 'Continue',\n cancelButtonTitle: 'Cancel',\n })\n : native;\n if (!ok) return;\n\n try {\n const result = await seedDefaultShortcuts();\n const count = result.data?.seedDefaultShortcuts || 0;\n void nativeNotify('success');\n alert(`Created ${count} default shortcuts.`);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to seed shortcuts:', error);\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('shortcuts.title', 'Keyboard Shortcuts')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('shortcuts.subtitle', 'Manage keyboard shortcuts across all Burdenoff products')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleSeedDefaults}\n disabled={seedLoading}\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 font-medium\n disabled:opacity-50\n \"\n >\n <Sparkles size={18} />\n {tr('shortcuts.seedDefaults', 'Seed Defaults')}\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/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('shortcuts.createShortcut', 'Create Shortcut')}\n </button>\n </div>\n </PermissionGate>\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('shortcuts.searchPlaceholder', 'Search shortcuts...')}\n className=\"flex-1\"\n />\n\n {/* Category Filter */}\n <select\n value={filter.category || ''}\n onChange={(e) =>\n setFilter({\n ...filter,\n category: e.target.value || undefined,\n })\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('shortcuts.allCategories', 'All Categories')}</option>\n {Object.values(ShortcutCategories).map((cat) => (\n <option key={cat} value={cat}>\n {cat}\n </option>\n ))}\n </select>\n\n {/* Enabled Filter */}\n <select\n value={\n filter.isEnabled === undefined || filter.isEnabled === null\n ? ''\n : filter.isEnabled.toString()\n }\n onChange={(e) =>\n setFilter({\n ...filter,\n isEnabled: e.target.value === '' ? undefined : e.target.value === 'true',\n })\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('shortcuts.allStatus', 'All Status')}</option>\n <option value=\"true\">{tr('shortcuts.enabled', 'Enabled')}</option>\n <option value=\"false\">{tr('shortcuts.disabled', 'Disabled')}</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 </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 && shortcuts.length === 0 ? (\n <LoadingState message={tr('shortcuts.loadingShortcuts', 'Loading keyboard shortcuts...')} />\n ) : shortcuts.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('shortcuts.noShortcutsFound', 'No keyboard shortcuts found')}\n </p>\n <div className=\"flex items-center justify-center gap-3\">\n <button\n type=\"button\"\n onClick={handleSeedDefaults}\n disabled={seedLoading}\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 font-medium\n \"\n >\n <Sparkles size={18} />\n {tr('shortcuts.seedDefaults', 'Seed Defaults')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/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('shortcuts.createShortcut', 'Create Shortcut')}\n </button>\n </div>\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('shortcuts.columnShortcut', 'Shortcut')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnLabel', 'Label')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnCategory', 'Category')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnEvent', 'Event')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnProduct', 'Product')}\n </th>\n <th className=\"text-center px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnEnabled', 'Enabled')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-[var(--color-border-default)]\">\n {shortcuts.map((shortcut) => (\n <tr key={shortcut.id} className=\"hover:bg-bg-sunken transition-all duration-200\">\n <td className=\"px-6 py-4\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </td>\n <td className=\"px-6 py-4\">\n <div>\n <p className=\"font-medium text-text-primary\">{shortcut.label}</p>\n {shortcut.description && (\n <p className=\"text-sm text-text-tertiary line-clamp-1\">\n {shortcut.description}\n </p>\n )}\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <ShortcutCategoryBadge category={shortcut.category} />\n </td>\n <td className=\"px-6 py-4\">\n <code className=\"text-sm text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded font-mono\">\n {shortcut.eventName}\n </code>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary\">\n {shortcut.product?.name || (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.global', 'Global')}\n </span>\n )}\n </span>\n </td>\n <td className=\"px-6 py-4 text-center\">\n <button\n type=\"button\"\n onClick={() => handleToggle(shortcut.id, shortcut.isEnabled)}\n disabled={toggleLoading}\n className={`\n p-1 rounded-lg transition-all duration-200\n ${\n shortcut.isEnabled\n ? 'text-[var(--color-status-success)] hover:bg-[var(--color-status-success-subtle)]'\n : 'text-text-tertiary hover:bg-bg-sunken'\n }\n disabled:opacity-50\n `}\n title={\n shortcut.isEnabled\n ? tr('shortcuts.disable', 'Disable')\n : tr('shortcuts.enable', 'Enable')\n }\n >\n {shortcut.isEnabled ? <ToggleRight size={24} /> : <ToggleLeft size={24} />}\n </button>\n </td>\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcut.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('shortcuts.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcut.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('shortcuts.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(shortcut.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('shortcuts.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,SAAgB,IAAoB;CAClC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,EAAE,YAAS,qBAAkB,GAAkB,EAC/C,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,CAAC,GAAQ,KAAa,EAAsC,EAAE,CAAC,EAE/D,EAAE,cAAW,YAAS,UAAO,eAAY,EAC7C;EAAE,GAAG;EAAQ,QAAQ,KAAwB,KAAA;EAAW,EACxD,EAAE,OAAO,IAAI,CACd,EAEK,EAAE,mBAAgB,SAAS,MAAkB,GAAmB,EAChE,EAAE,mBAAgB,SAAS,MAAkB,GAAmB,EAChE,EAAE,yBAAsB,SAAS,MAAgB,GAAyB,EAE1E,IAAe,OAAO,MAAe;AACpC,IAAa,SAAS;EAC3B,IAAM,IAAU,EAAG,2BAA2B,iDAAiD,EACzF,IAAS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C5D,UAAU;UACV,WAAW;;0BAGP,EAAS,YACL,qFACA,wCACL;;;UAGH,OACE,EAAS,YACL,EAAG,qBAAqB,UAAU,GAClC,EAAG,oBAAoB,SAAS;oBAGrC,EAAS,YAAY,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,GAAG,kBAAC,GAAD,EAAY,MAAM,IAAM,CAAA;UACnE,CAAA;SACN,CAAA;QACL,kBAAC,MAAD;SAAI,WAAU;mBACZ,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,UAAD;WACE,MAAK;WACL,eAAe,EAAS,GAAG,EAAS,aAAa,EAAS,KAAK;WAC/D,WAAU;WACV,OAAO,EAAG,yBAAyB,eAAe;qBAElD,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;WACV,CAAA,EACT,kBAAC,GAAD;WAAgB,MAAK;qBAArB,CACE,kBAAC,UAAD;YACE,MAAK;YACL,eAAe,EAAS,GAAG,EAAS,aAAa,EAAS,GAAG,OAAO;YACpE,WAAU;YACV,OAAO,EAAG,kBAAkB,OAAO;sBAEnC,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;YAChB,CAAA,EACT,kBAAC,UAAD;YACE,MAAK;YACL,eAAe,EAAa,EAAS,GAAG;YACxC,UAAU;YACV,WAAU;YACV,OAAO,EAAG,oBAAoB,SAAS;sBAEvC,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;YACb,CAAA,CACM;aACb;;SACH,CAAA;QACF;SAxFI,EAAS,GAwFb,CACL;MACI,CAAA,CACF;;IACJ,CAAA;GAEP;GACG"}
1
+ {"version":3,"file":"ShortcutsListPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutsListPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Plus,\n RefreshCw,\n Eye,\n SquarePen,\n Trash2,\n ToggleLeft,\n ToggleRight,\n Sparkles,\n} from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport {\n Button,\n CTAOverflowMenu,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport {\n useShortcuts,\n useDeleteShortcut,\n useToggleShortcut,\n useSeedDefaultShortcuts,\n} from '../hooks/useShortcuts';\nimport { ShortcutCategoryBadge } from '../components/ShortcutCategoryBadge';\nimport { ShortcutKeyBadge } from '../components/ShortcutKeyBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { KeyboardShortcutFilterInput } from '../types';\nimport { ShortcutCategories } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\nexport function ShortcutsListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\n const { confirm, ConfirmDialog } = useConfirmDialog();\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 [filter, setFilter] = useState<KeyboardShortcutFilterInput>({});\n\n const { shortcuts, loading, error, refetch } = useShortcuts(\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: 50 }\n );\n\n const { deleteShortcut, loading: deleteLoading } = useDeleteShortcut();\n const { toggleShortcut, loading: toggleLoading } = useToggleShortcut();\n const { seedDefaultShortcuts, loading: seedLoading } = useSeedDefaultShortcuts();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr('shortcuts.confirmDelete', 'Are you sure you want to delete this shortcut?');\n const native = await nativeConfirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteShortcut(id);\n void nativeNotify('success');\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete shortcut:', error);\n }\n };\n\n const handleToggle = async (id: string, currentEnabled: boolean) => {\n void nativeImpact('medium');\n try {\n await toggleShortcut(id, !currentEnabled);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to toggle shortcut:', error);\n }\n };\n\n const handleSeedDefaults = async () => {\n void nativeImpact('light');\n const message = tr(\n 'shortcuts.confirmSeedDefaults',\n 'This will create default global shortcuts. Continue?'\n );\n const native = await nativeConfirm({\n title: 'Seed defaults',\n message,\n okButtonTitle: 'Continue',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Seed defaults',\n message,\n okButtonTitle: 'Continue',\n cancelButtonTitle: 'Cancel',\n })\n : native;\n if (!ok) return;\n\n try {\n const result = await seedDefaultShortcuts();\n const count = result.data?.seedDefaultShortcuts || 0;\n void nativeNotify('success');\n alert(`Created ${count} default shortcuts.`);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to seed shortcuts:', error);\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 flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n <GradientText>{tr('shortcuts.title', 'Keyboard Shortcuts')}</GradientText>\n </h1>\n <p className=\"text-text-secondary\">\n {tr('shortcuts.subtitle', 'Manage keyboard shortcuts across all Burdenoff products')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <CTAOverflowMenu\n primary={{\n label: tr('shortcuts.createShortcut', 'Create Shortcut'),\n onSelect: () => navigate(`${basePath}/shortcuts/new`),\n icon: <Plus className=\"size-4\" />,\n }}\n actions={[\n {\n label: tr('shortcuts.seedDefaults', 'Seed Defaults'),\n onSelect: () => {\n void handleSeedDefaults();\n },\n disabled: seedLoading,\n icon: <Sparkles className=\"size-4\" />,\n },\n ]}\n />\n </PermissionGate>\n </div>\n\n <PagePurpose className=\"mb-4\">\n {tr(\n 'shortcuts.purpose',\n 'Keyboard shortcuts map a key combination to an in-app event so power users can move fast. Define product-specific or global shortcuts, enable or disable them on the fly, and use \"Seed Defaults\" to load the standard set in one click.'\n )}\n </PagePurpose>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('shortcuts.searchPlaceholder', 'Search shortcuts...')}\n className=\"flex-1\"\n />\n\n {/* Category Filter */}\n <select\n value={filter.category || ''}\n onChange={(e) =>\n setFilter({\n ...filter,\n category: e.target.value || undefined,\n })\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('shortcuts.allCategories', 'All Categories')}</option>\n {Object.values(ShortcutCategories).map((cat) => (\n <option key={cat} value={cat}>\n {cat}\n </option>\n ))}\n </select>\n\n {/* Enabled Filter */}\n <select\n value={\n filter.isEnabled === undefined || filter.isEnabled === null\n ? ''\n : filter.isEnabled.toString()\n }\n onChange={(e) =>\n setFilter({\n ...filter,\n isEnabled: e.target.value === '' ? undefined : e.target.value === 'true',\n })\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('shortcuts.allStatus', 'All Status')}</option>\n <option value=\"true\">{tr('shortcuts.enabled', 'Enabled')}</option>\n <option value=\"false\">{tr('shortcuts.disabled', 'Disabled')}</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 </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 && shortcuts.length === 0 ? (\n <LoadingState message={tr('shortcuts.loadingShortcuts', 'Loading keyboard shortcuts...')} />\n ) : shortcuts.length === 0 ? (\n <GlassCard treatment=\"insight\" className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={\n searchQuery || filter.category || filter.isEnabled !== undefined\n ? 'empty-search'\n : 'empty-data'\n }\n title={tr('shortcuts.noShortcutsFound', 'No keyboard shortcuts found')}\n action={\n <div className=\"flex flex-wrap items-center justify-center gap-3\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleSeedDefaults}\n disabled={seedLoading}\n >\n <Sparkles className=\"size-4\" />\n {tr('shortcuts.seedDefaults', 'Seed Defaults')}\n </Button>\n <Button type=\"button\" onClick={() => navigate(`${basePath}/shortcuts/new`)}>\n <Plus className=\"size-4\" />\n {tr('shortcuts.createShortcut', 'Create Shortcut')}\n </Button>\n </div>\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"glass\" glow className=\"overflow-hidden p-0\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken/60 border-b border-border-seam\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnShortcut', 'Shortcut')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnLabel', 'Label')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnCategory', 'Category')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnEvent', 'Event')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnProduct', 'Product')}\n </th>\n <th className=\"text-center px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnEnabled', 'Enabled')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('shortcuts.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border-seam\">\n {shortcuts.map((shortcut) => (\n <tr\n key={shortcut.id}\n className=\"hover:bg-bg-sunken/70 transition-colors duration-200\"\n >\n <td className=\"px-6 py-4\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </td>\n <td className=\"px-6 py-4\">\n <div>\n <p className=\"font-medium text-text-primary\">{shortcut.label}</p>\n {shortcut.description && (\n <p className=\"text-sm text-text-tertiary line-clamp-1\">\n {shortcut.description}\n </p>\n )}\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <ShortcutCategoryBadge category={shortcut.category} />\n </td>\n <td className=\"px-6 py-4\">\n <code className=\"text-sm text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded font-mono\">\n {shortcut.eventName}\n </code>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary\">\n {shortcut.product?.name || (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.global', 'Global')}\n </span>\n )}\n </span>\n </td>\n <td className=\"px-6 py-4 text-center\">\n <button\n type=\"button\"\n onClick={() => handleToggle(shortcut.id, shortcut.isEnabled)}\n disabled={toggleLoading}\n className={`\n p-1 rounded-lg transition-all duration-200\n ${\n shortcut.isEnabled\n ? 'text-[var(--color-status-success)] hover:bg-[var(--color-status-success-subtle)]'\n : 'text-text-tertiary hover:bg-bg-sunken'\n }\n disabled:opacity-50\n `}\n title={\n shortcut.isEnabled\n ? tr('shortcuts.disable', 'Disable')\n : tr('shortcuts.enable', 'Enable')\n }\n >\n {shortcut.isEnabled ? <ToggleRight size={24} /> : <ToggleLeft size={24} />}\n </button>\n </td>\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcut.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('shortcuts.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcut.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('shortcuts.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(shortcut.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('shortcuts.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </GlassCard>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA,SAAgB,IAAoB;CAClC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,EAAE,YAAS,qBAAkB,GAAkB,EAC/C,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,CAAC,GAAQ,KAAa,EAAsC,EAAE,CAAC,EAE/D,EAAE,cAAW,YAAS,UA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Aa,EAAS,GAAG;YACxC,UAAU;YACV,WAAU;YACV,OAAO,EAAG,oBAAoB,SAAS;sBAEvC,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;YACb,CAAA,CACM;aACb;;SACH,CAAA;QACF;SA1FE,EAAS,GA0FX,CACL;MACI,CAAA,CACF;;IACE,CAAA;GAEb;GACG"}
@@ -2,32 +2,34 @@ import { LoadingState as e } from "./feedback/LoadingState.js";
2
2
  import { GetEntityActivityLogsDocument as t } from "../../../generated/global-operations.js";
3
3
  import { AlertCircle as n, Clock as r, User as i } from "lucide-react";
4
4
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { useQuery as s } from "@apollo/client/react";
5
+ import { IllustratedEmptyState as s } from "@burdenoff/fe-libs/ui";
6
+ import { useQuery as c } from "@apollo/client/react";
6
7
  //#region src/product-management/shared/components/AuditHistoryTab.tsx
7
- function c({ resourceId: c, resourceType: l }) {
8
- let { data: u, loading: d, error: f } = s(t, {
8
+ function l({ resourceId: l, resourceType: u }) {
9
+ let { data: d, loading: f, error: p } = c(t, {
9
10
  variables: {
10
- resourceId: c,
11
- resourceType: l,
11
+ resourceId: l,
12
+ resourceType: u,
12
13
  limit: 50,
13
14
  offset: 0
14
15
  },
15
16
  fetchPolicy: "cache-and-network"
16
17
  });
17
- if (d) return /* @__PURE__ */ a(e, { message: "Loading activity history…" });
18
- if (f) return /* @__PURE__ */ o("div", {
18
+ if (f) return /* @__PURE__ */ a(e, { message: "Loading activity history…" });
19
+ if (p) return /* @__PURE__ */ o("div", {
19
20
  className: "flex items-center gap-2 text-[var(--color-status-error)] p-4",
20
21
  children: [/* @__PURE__ */ a(n, { size: 16 }), /* @__PURE__ */ a("span", {
21
22
  className: "text-sm",
22
- children: f.message
23
+ children: p.message
23
24
  })]
24
25
  });
25
- let p = u?.activityLogs?.nodes ?? [];
26
- if (p.length === 0) return /* @__PURE__ */ a("p", {
27
- className: "text-sm text-text-secondary p-4",
28
- children: "No activity recorded yet."
26
+ let m = d?.activityLogs?.nodes ?? [];
27
+ if (m.length === 0) return /* @__PURE__ */ a(s, {
28
+ illustration: "empty-notifications",
29
+ title: "No activity yet",
30
+ description: "Changes to this item — who edited what and when — will appear here as they happen."
29
31
  });
30
- let m = (e) => new Date(e).toLocaleString("en-US", {
32
+ let h = (e) => new Date(e).toLocaleString("en-US", {
31
33
  year: "numeric",
32
34
  month: "short",
33
35
  day: "numeric",
@@ -35,8 +37,8 @@ function c({ resourceId: c, resourceType: l }) {
35
37
  minute: "2-digit"
36
38
  });
37
39
  return /* @__PURE__ */ a("div", {
38
- className: "divide-y divide-[var(--color-border-default)]",
39
- children: p.map((e) => /* @__PURE__ */ o("div", {
40
+ className: "divide-y divide-border-seam",
41
+ children: m.map((e) => /* @__PURE__ */ o("div", {
40
42
  className: "flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors",
41
43
  children: [
42
44
  /* @__PURE__ */ a("div", {
@@ -68,13 +70,13 @@ function c({ resourceId: c, resourceType: l }) {
68
70
  }),
69
71
  /* @__PURE__ */ o("div", {
70
72
  className: "flex items-center gap-1 text-xs text-text-tertiary shrink-0",
71
- children: [/* @__PURE__ */ a(r, { size: 12 }), /* @__PURE__ */ a("span", { children: m(e.createdAt) })]
73
+ children: [/* @__PURE__ */ a(r, { size: 12 }), /* @__PURE__ */ a("span", { children: h(e.createdAt) })]
72
74
  })
73
75
  ]
74
76
  }, e.id))
75
77
  });
76
78
  }
77
79
  //#endregion
78
- export { c as AuditHistoryTab };
80
+ export { l as AuditHistoryTab };
79
81
 
80
82
  //# sourceMappingURL=AuditHistoryTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuditHistoryTab.js","names":[],"sources":["../../../../src/product-management/shared/components/AuditHistoryTab.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport { Clock, User, AlertCircle } from 'lucide-react';\nimport {\n GetEntityActivityLogsDocument,\n type GetEntityActivityLogsQuery,\n} from '../../../generated/global-operations';\nimport { LoadingState } from './feedback/LoadingState';\n\ntype ActivityLog = NonNullable<GetEntityActivityLogsQuery['activityLogs']['nodes'][number]>;\n\ninterface AuditHistoryTabProps {\n resourceId: string;\n resourceType: string;\n}\n\nexport function AuditHistoryTab({ resourceId, resourceType }: AuditHistoryTabProps) {\n const { data, loading, error } = useQuery(GetEntityActivityLogsDocument, {\n variables: { resourceId, resourceType, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n if (loading) return <LoadingState message=\"Loading activity history…\" />;\n\n if (error) {\n return (\n <div className=\"flex items-center gap-2 text-[var(--color-status-error)] p-4\">\n <AlertCircle size={16} />\n <span className=\"text-sm\">{error.message}</span>\n </div>\n );\n }\n\n const logs = data?.activityLogs?.nodes ?? [];\n\n if (logs.length === 0) {\n return <p className=\"text-sm text-text-secondary p-4\">No activity recorded yet.</p>;\n }\n\n const formatDate = (dateString: string) =>\n new Date(dateString).toLocaleString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n\n return (\n <div className=\"divide-y divide-[var(--color-border-default)]\">\n {logs.map((log: ActivityLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"size-8 rounded-full bg-[var(--color-status-info-subtle)] flex items-center justify-center shrink-0\">\n <User size={14} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-medium\">{log.actorId ?? 'system'}</span>{' '}\n <span className=\"text-text-secondary\">{log.description ?? log.action}</span>\n </p>\n {log.metadata &&\n typeof log.metadata === 'object' &&\n Object.keys(log.metadata as object).length > 0 && (\n <p className=\"text-xs text-text-tertiary font-mono mt-0.5 truncate\">\n {JSON.stringify(log.metadata)}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-1 text-xs text-text-tertiary shrink-0\">\n <Clock size={12} />\n <span>{formatDate(log.createdAt)}</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K,UAAU,EAAI,SAAS;MAC3B,CAAA,CAEJ;;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA,EACnB,kBAAC,QAAD,EAAA,UAAO,EAAW,EAAI,UAAU,EAAQ,CAAA,CACpC;;IACF;KAvBC,EAAI,GAuBL,CACN;EACE,CAAA"}
1
+ {"version":3,"file":"AuditHistoryTab.js","names":[],"sources":["../../../../src/product-management/shared/components/AuditHistoryTab.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport { Clock, User, AlertCircle } from 'lucide-react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport {\n GetEntityActivityLogsDocument,\n type GetEntityActivityLogsQuery,\n} from '../../../generated/global-operations';\nimport { LoadingState } from './feedback/LoadingState';\n\ntype ActivityLog = NonNullable<GetEntityActivityLogsQuery['activityLogs']['nodes'][number]>;\n\ninterface AuditHistoryTabProps {\n resourceId: string;\n resourceType: string;\n}\n\nexport function AuditHistoryTab({ resourceId, resourceType }: AuditHistoryTabProps) {\n const { data, loading, error } = useQuery(GetEntityActivityLogsDocument, {\n variables: { resourceId, resourceType, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n if (loading) return <LoadingState message=\"Loading activity history…\" />;\n\n if (error) {\n return (\n <div className=\"flex items-center gap-2 text-[var(--color-status-error)] p-4\">\n <AlertCircle size={16} />\n <span className=\"text-sm\">{error.message}</span>\n </div>\n );\n }\n\n const logs = data?.activityLogs?.nodes ?? [];\n\n if (logs.length === 0) {\n return (\n <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title=\"No activity yet\"\n description=\"Changes to this item — who edited what and when — will appear here as they happen.\"\n />\n );\n }\n\n const formatDate = (dateString: string) =>\n new Date(dateString).toLocaleString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n\n return (\n <div className=\"divide-y divide-border-seam\">\n {logs.map((log: ActivityLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"size-8 rounded-full bg-[var(--color-status-info-subtle)] flex items-center justify-center shrink-0\">\n <User size={14} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-medium\">{log.actorId ?? 'system'}</span>{' '}\n <span className=\"text-text-secondary\">{log.description ?? log.action}</span>\n </p>\n {log.metadata &&\n typeof log.metadata === 'object' &&\n Object.keys(log.metadata as object).length > 0 && (\n <p className=\"text-xs text-text-tertiary font-mono mt-0.5 truncate\">\n {JSON.stringify(log.metadata)}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-1 text-xs text-text-tertiary shrink-0\">\n <Clock size={12} />\n <span>{formatDate(log.createdAt)}</span>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,EAAgB,EAAE,eAAY,mBAAsC;CAClF,IAAM,EAAE,SAAM,YAAS,aAAU,EAAS,GAA+B;EACvE,WAAW;GAAE;GAAY;GAAc,OAAO;GAAI,QAAQ;GAAG;EAC7D,aAAa;EACd,CAAC;AAEF,KAAI,EAAS,QAAO,kBAAC,GAAD,EAAc,SAAQ,6BAA8B,CAAA;AAExE,KAAI,EACF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,EACzB,kBAAC,QAAD;GAAM,WAAU;aAAW,EAAM;GAAe,CAAA,CAC5C;;CAIV,IAAM,IAAO,GAAM,cAAc,SAAS,EAAE;AAE5C,KAAI,EAAK,WAAW,EAClB,QACE,kBAAC,GAAD;EACE,cAAa;EACb,OAAM;EACN,aAAY;EACZ,CAAA;CAIN,IAAM,KAAc,MAClB,IAAI,KAAK,EAAW,CAAC,eAAe,SAAS;EAC3C,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;EACT,CAAC;AAEJ,QACE,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAK,KAAK,MACT,kBAAC,OAAD;GAEE,WAAU;aAFZ;IAIE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAM,MAAM;MAAI,WAAU;MAAoC,CAAA;KAC1D,CAAA;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,KAAD;MAAG,WAAU;gBAAb;OACE,kBAAC,QAAD;QAAM,WAAU;kBAAe,EAAI,WAAW;QAAgB,CAAA;OAAC;OAC/D,kBAAC,QAAD;QAAM,WAAU;kBAAuB,EAAI,eAAe,EAAI;QAAc,CAAA;OAC1E;SACH,EAAI,YACH,OAAO,EAAI,YAAa,YACxB,OAAO,KAAK,EAAI,SAAmB,CAAC,SAAS,KAC3C,kBAAC,KAAD;MAAG,WAAU;gBACV,KAAK,UAAU,EAAI,SAAS;MAC3B,CAAA,CAEJ;;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA,EACnB,kBAAC,QAAD,EAAA,UAAO,EAAW,EAAI,UAAU,EAAQ,CAAA,CACpC;;IACF;KAvBC,EAAI,GAuBL,CACN;EACE,CAAA"}
@@ -1,20 +1,2 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { EmptyState as t } from "@burdenoff/fe-libs/ui";
3
- //#region src/product-management/shared/components/feedback/EmptyState.tsx
4
- function n({ icon: n, title: r, description: i, action: a }) {
5
- return /* @__PURE__ */ e(t, {
6
- icon: n,
7
- title: r,
8
- description: i,
9
- action: a ? /* @__PURE__ */ e("button", {
10
- type: "button",
11
- onClick: a.onClick,
12
- 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 ",
13
- children: a.label
14
- }) : void 0
15
- });
16
- }
17
- //#endregion
18
- export { n as EmptyState };
19
-
20
- //# sourceMappingURL=EmptyState.js.map
1
+ import "react/jsx-runtime";
2
+ import "@burdenoff/fe-libs/ui";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-product",
3
- "version": "2026.624.3",
3
+ "version": "2026.626.1",
4
4
  "description": "Product management microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@apollo/client": "^3.12.0",
44
- "@burdenoff/fe-libs": "2026.529.5",
44
+ "@burdenoff/fe-libs": "2026.625.5",
45
45
  "@tanstack/react-query": "^5.90.16",
46
46
  "@xmldom/xmldom": "0.8.13",
47
47
  "ajv": "8.20.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmptyState.js","names":[],"sources":["../../../../../src/product-management/shared/components/feedback/EmptyState.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { EmptyState as CanonicalEmptyState } from '@burdenoff/fe-libs/ui';\n\ninterface EmptyStateProps {\n icon: ReactNode;\n title: string;\n description: string;\n action?: {\n label: string;\n onClick: () => void;\n };\n}\n\n/**\n * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n *\n * Maps the legacy microfe-product local shape (`action: { label, onClick }`)\n * onto the canonical shape (`action: ReactNode`). Keeps existing call sites\n * stable while routing all empty-state rendering through the shared primitive.\n */\nexport function EmptyState({ icon, title, description, action }: EmptyStateProps) {\n return (\n <CanonicalEmptyState\n icon={icon}\n title={title}\n description={description}\n action={\n action ? (\n <button\n type=\"button\"\n onClick={action.onClick}\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 {action.label}\n </button>\n ) : undefined\n }\n />\n );\n}\n"],"mappings":";;;AAoBA,SAAgB,EAAW,EAAE,SAAM,UAAO,gBAAa,aAA2B;AAChF,QACE,kBAAC,GAAD;EACQ;EACC;EACM;EACb,QACE,IACE,kBAAC,UAAD;GACE,MAAK;GACL,SAAS,EAAO;GAChB,WAAU;aAUT,EAAO;GACD,CAAA,GACP,KAAA;EAEN,CAAA"}