@burdenoff/microfe-product 2026.608.1 → 2026.624.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 (53) hide show
  1. package/dist/product/pages/ProductCatalogPage.js +4 -4
  2. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  3. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +6 -6
  4. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  5. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +3 -3
  6. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +11 -11
  8. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  9. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +3 -3
  10. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  11. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +3 -3
  12. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +1 -1
  14. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  15. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +9 -9
  16. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  17. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +3 -3
  18. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  19. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +2 -2
  20. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  21. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +9 -9
  22. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  23. package/dist/product-management/modules/products/components/ProductForm.js +8 -8
  24. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  25. package/dist/product-management/modules/products/components/ProductPlans.js +6 -6
  26. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  27. package/dist/product-management/modules/products/components/ProductStatusBadge.js +1 -1
  28. package/dist/product-management/modules/products/components/ProductStatusBadge.js.map +1 -1
  29. package/dist/product-management/modules/products/pages/ProductDetailPage.js +3 -3
  30. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  31. package/dist/product-management/modules/products/pages/ProductsListPage.js +11 -11
  32. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  33. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
  34. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  35. package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js +1 -1
  36. package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js.map +1 -1
  37. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +4 -4
  38. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  39. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +11 -11
  40. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  41. package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
  42. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  43. package/dist/product-management/shared/components/feedback/EmptyState.js +1 -1
  44. package/dist/product-management/shared/components/feedback/EmptyState.js.map +1 -1
  45. package/dist/product-management/shared/components/feedback/ErrorState.js +1 -1
  46. package/dist/product-management/shared/components/feedback/ErrorState.js.map +1 -1
  47. package/dist/product-management/shared/components/input/ProductCombobox.js +1 -1
  48. package/dist/product-management/shared/components/input/ProductCombobox.js.map +1 -1
  49. package/dist/product-management/shared/components/input/SearchInput.js +1 -1
  50. package/dist/product-management/shared/components/input/SearchInput.js.map +1 -1
  51. package/dist/shared/utils/renderMarkdown.js +1 -1
  52. package/dist/shared/utils/renderMarkdown.js.map +1 -1
  53. package/package.json +1 -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';\n\nexport function ShortcutsListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\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 = native === null ? window.confirm(message) : 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 = native === null ? window.confirm(message) : 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-300\">\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-muted\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 hover:scale-[1.02]\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-muted\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-300\">\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-muted\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 hover:scale-[1.02]\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-muted 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-muted 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-muted 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-muted'\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-muted 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-muted 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 </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAoB;CAClC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,CAAC,GAAa,KAAkB,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AxFI,EAAS,GAwFb,CACL;KACI,CAAA,CACF;;GACJ,CAAA,CAEJ"}
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';\n\nexport function ShortcutsListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\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 = native === null ? window.confirm(message) : 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 = native === null ? window.confirm(message) : 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-300\">\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-300\">\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 </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAoB;CAClC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,CAAC,GAAa,KAAkB,EAAS,GAA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S,GAwFb,CACL;KACI,CAAA,CACF;;GACJ,CAAA,CAEJ"}
@@ -37,7 +37,7 @@ function c({ resourceId: c, resourceType: l }) {
37
37
  return /* @__PURE__ */ a("div", {
38
38
  className: "divide-y divide-[var(--color-border-default)]",
39
39
  children: p.map((e) => /* @__PURE__ */ o("div", {
40
- className: "flex items-start gap-3 px-4 py-3 hover:bg-muted transition-colors",
40
+ className: "flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors",
41
41
  children: [
42
42
  /* @__PURE__ */ a("div", {
43
43
  className: "size-8 rounded-full bg-[var(--color-status-info-subtle)] flex items-center justify-center shrink-0",
@@ -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-muted 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":";;;;;;AAeA,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,QAAO,kBAAC,KAAD;EAAG,WAAU;YAAkC;EAA6B,CAAA;CAGrF,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
+ {"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)}</span>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;AAeA,SAAgB,EAAgB,EAAE,eAAY,mBAAsC;CAClF,IAAM,EAAE,SAAM,YAAS,aAAU,EAAS,GAA+B;EACvE,WA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,EAAW,EAAI,UAAU,EAAQ,CAAA,CACpC;;IACF;KAvBC,EAAI,GAuBL,CACN;EACE,CAAA"}
@@ -9,7 +9,7 @@ function n({ icon: n, title: r, description: i, action: a }) {
9
9
  action: a ? /* @__PURE__ */ e("button", {
10
10
  type: "button",
11
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 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n ",
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
13
  children: a.label
14
14
  }) : void 0
15
15
  });
@@ -1 +1 @@
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 hover:scale-[1.02]\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"}
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"}
@@ -23,7 +23,7 @@ function r({ title: r = "Something went wrong", message: i, action: a }) {
23
23
  a && /* @__PURE__ */ t("button", {
24
24
  type: "button",
25
25
  onClick: a.onClick,
26
- 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 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n ",
26
+ 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 ",
27
27
  children: a.label
28
28
  })
29
29
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorState.js","names":[],"sources":["../../../../../src/product-management/shared/components/feedback/ErrorState.tsx"],"sourcesContent":["import { AlertCircle } from 'lucide-react';\n\ninterface ErrorStateProps {\n title?: string;\n message: string;\n action?: {\n label: string;\n onClick: () => void;\n };\n}\n\n/**\n * ErrorState — generic error display.\n *\n * The `title` prop is intentionally English-only by default. Translation\n * should happen at the call site (where the calling module's i18n\n * namespace is loaded), e.g. `<ErrorState title={tr('foo.error', 'Something went wrong')} ... />`.\n */\nexport function ErrorState({ title = 'Something went wrong', message, action }: ErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <div className=\"size-16 rounded-full bg-[var(--color-status-error-subtle)] flex items-center justify-center mb-4\">\n <AlertCircle size={32} className=\"text-[var(--color-status-error)]\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">{title}</h3>\n <p className=\"text-sm text-text-tertiary mb-6 max-w-md\">{message}</p>\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 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n \"\n >\n {action.label}\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;AAkBA,SAAgB,EAAW,EAAE,WAAQ,wBAAwB,YAAS,aAA2B;AAC/F,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD;KAAa,MAAM;KAAI,WAAU;KAAqC,CAAA;IAClE,CAAA;GACN,kBAAC,MAAD;IAAI,WAAU;cAAgD;IAAW,CAAA;GACzE,kBAAC,KAAD;IAAG,WAAU;cAA4C;IAAY,CAAA;GACpE,KACC,kBAAC,UAAD;IACE,MAAK;IACL,SAAS,EAAO;IAChB,WAAU;cAUT,EAAO;IACD,CAAA;GAEP"}
1
+ {"version":3,"file":"ErrorState.js","names":[],"sources":["../../../../../src/product-management/shared/components/feedback/ErrorState.tsx"],"sourcesContent":["import { AlertCircle } from 'lucide-react';\n\ninterface ErrorStateProps {\n title?: string;\n message: string;\n action?: {\n label: string;\n onClick: () => void;\n };\n}\n\n/**\n * ErrorState — generic error display.\n *\n * The `title` prop is intentionally English-only by default. Translation\n * should happen at the call site (where the calling module's i18n\n * namespace is loaded), e.g. `<ErrorState title={tr('foo.error', 'Something went wrong')} ... />`.\n */\nexport function ErrorState({ title = 'Something went wrong', message, action }: ErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <div className=\"size-16 rounded-full bg-[var(--color-status-error-subtle)] flex items-center justify-center mb-4\">\n <AlertCircle size={32} className=\"text-[var(--color-status-error)]\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">{title}</h3>\n <p className=\"text-sm text-text-tertiary mb-6 max-w-md\">{message}</p>\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 )}\n </div>\n );\n}\n"],"mappings":";;;AAkBA,SAAgB,EAAW,EAAE,WAAQ,wBAAwB,YAAS,aAA2B;AAC/F,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD;KAAa,MAAM;KAAI,WAAU;KAAqC,CAAA;IAClE,CAAA;GACN,kBAAC,MAAD;IAAI,WAAU;cAAgD;IAAW,CAAA;GACzE,kBAAC,KAAD;IAAG,WAAU;cAA4C;IAAY,CAAA;GACpE,KACC,kBAAC,UAAD;IACE,MAAK;IACL,SAAS,EAAO;IAChB,WAAU;cAUT,EAAO;IACD,CAAA;GAEP"}
@@ -13,7 +13,7 @@ function _(e, t) {
13
13
  }, [e, t]), n;
14
14
  }
15
15
  function v({ value: r, onChange: v, disabled: y = !1, required: b = !1, placeholder: x = "Select a product…", id: S, error: C }) {
16
- let [w, T] = i(!1), [E, D] = i(""), O = _(E.trim(), 200), { products: k, loading: A } = t(O ? { search: O } : void 0, { limit: 100 }), { product: j, loading: M } = e(r), N = j ? `${j.name} (${j.slug})` : r ? M ? "Loading…" : r : x, P = n("w-full flex items-center justify-between gap-2 px-3 py-2", "bg-surface", "border border-default", "rounded-lg", "text-left text-sm text-text-primary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]", "disabled:bg-muted disabled:cursor-not-allowed", "transition-all duration-200", C && "border-[var(--color-status-error)]", !j && "text-text-tertiary");
16
+ let [w, T] = i(!1), [E, D] = i(""), O = _(E.trim(), 200), { products: k, loading: A } = t(O ? { search: O } : void 0, { limit: 100 }), { product: j, loading: M } = e(r), N = j ? `${j.name} (${j.slug})` : r ? M ? "Loading…" : r : x, P = n("w-full flex items-center justify-between gap-2 px-3 py-2", "bg-surface", "border border-default", "rounded-lg", "text-left text-sm text-text-primary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]", "disabled:bg-bg-sunken disabled:cursor-not-allowed", "transition-all duration-200", C && "border-[var(--color-status-error)]", !j && "text-text-tertiary");
17
17
  return /* @__PURE__ */ c(m, {
18
18
  open: w,
19
19
  onOpenChange: (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductCombobox.js","names":[],"sources":["../../../../../src/product-management/shared/components/input/ProductCombobox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../../utils/cn';\nimport { useProduct, useProducts } from '../../../modules/products/hooks/useProducts';\n\ninterface ProductComboboxProps {\n /** Selected product id (controlled). Empty string = nothing selected. */\n value: string;\n /** Called with the selected product id ('' when cleared). */\n onChange: (id: string) => void;\n disabled?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Id for the trigger button — pairs with an external <label htmlFor>. */\n id?: string;\n /** Optional error message — toggles the invalid border + aria-invalid. */\n error?: string;\n}\n\n/** Debounce a value so each keystroke doesn't fire a query. */\nfunction useDebounced<T>(value: T, ms: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n const t = setTimeout(() => setDebounced(value), ms);\n return () => clearTimeout(t);\n }, [value, ms]);\n return debounced;\n}\n\n/**\n * ProductCombobox — searchable single-select for platform products.\n *\n * A button trigger shows the selected product as `name (slug)` (or a\n * placeholder) and opens a Popover with a cmdk Command. Built entirely on the\n * existing fe-libs `ui` primitives (Command + Popover) — no new dependencies.\n *\n * Search is performed **server-side** (`useProducts({ search })`) so any\n * product is reachable, not just the first page — important now that the\n * free-text product-id input was replaced by this control. The current\n * selection's label is resolved independently via `useProduct(value)`, so it\n * renders correctly even while the list is filtered to a different search.\n */\nexport function ProductCombobox({\n value,\n onChange,\n disabled = false,\n required = false,\n placeholder = 'Select a product…',\n id,\n error,\n}: ProductComboboxProps) {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n const debouncedSearch = useDebounced(search.trim(), 200);\n\n // Options: server-side search, so any product is reachable (no client-only cap).\n const { products, loading } = useProducts(\n debouncedSearch ? { search: debouncedSearch } : undefined,\n { limit: 100 }\n );\n\n // Resolve the selected product's label independently of the (searchable) list,\n // so a current selection still shows even when the list is filtered elsewhere.\n const { product: selectedProduct, loading: selectedLoading } = useProduct(value);\n\n // Resolved → name (slug). Still fetching → \"Loading…\". Set but unresolved\n // (e.g. a deleted/stale product id) → show the raw id, not a permanent spinner.\n // Empty → placeholder.\n const triggerLabel = selectedProduct\n ? `${selectedProduct.name} (${selectedProduct.slug})`\n : value\n ? selectedLoading\n ? 'Loading…'\n : value\n : placeholder;\n\n const triggerClassName = cn(\n 'w-full flex items-center justify-between gap-2 px-3 py-2',\n 'bg-surface',\n 'border border-default',\n 'rounded-lg',\n 'text-left text-sm text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]',\n 'disabled:bg-muted disabled:cursor-not-allowed',\n 'transition-all duration-200',\n error && 'border-[var(--color-status-error)]',\n !selectedProduct && 'text-text-tertiary'\n );\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n // Reset the query on close so reopening starts fresh, not pre-filtered.\n if (!next) setSearch('');\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n id={id}\n role=\"combobox\"\n aria-expanded={open}\n aria-required={required}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n className={triggerClassName}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <ChevronsUpDown size={16} className=\"shrink-0 text-text-tertiary\" aria-hidden=\"true\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0 border border-default bg-surface\"\n >\n {/* Search is server-side → disable cmdk's client filter so we render\n exactly what the query returned. */}\n <Command shouldFilter={false} className=\"bg-surface text-text-primary\">\n <CommandInput\n value={search}\n onValueChange={setSearch}\n placeholder=\"Search products…\"\n className=\"text-text-primary placeholder:text-text-tertiary\"\n />\n <CommandList>\n <CommandEmpty className=\"text-text-tertiary\">\n {loading ? 'Searching…' : 'No products found.'}\n </CommandEmpty>\n {/* Optional fields need a way back to \"no product\" — emit '' so\n callers like ContentPageForm (productId || undefined) can clear\n an existing association. Hidden when the field is required. */}\n {!required && (\n <CommandItem\n value=\"__none__\"\n onSelect={() => {\n onChange('');\n setOpen(false);\n }}\n className=\"text-text-tertiary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', value === '' ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate italic\">None</span>\n </CommandItem>\n )}\n {products.map((product) => (\n <CommandItem\n key={product.id}\n value={product.id}\n onSelect={() => {\n onChange(product.id);\n setOpen(false);\n }}\n className=\"text-text-primary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', product.id === value ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {product.name} <span className=\"text-text-tertiary\">({product.slug})</span>\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;AA+BA,SAAS,EAAgB,GAAU,GAAe;CAChD,IAAM,CAAC,GAAW,KAAgB,EAAS,EAAM;AAKjD,QAJA,QAAgB;EACd,IAAM,IAAI,iBAAiB,EAAa,EAAM,EAAE,EAAG;AACnD,eAAa,aAAa,EAAE;IAC3B,CAAC,GAAO,EAAG,CAAC,EACR;;AAgBT,SAAgB,EAAgB,EAC9B,UACA,aACA,cAAW,IACX,cAAW,IACX,iBAAc,qBACd,OACA,YACuB;CACvB,IAAM,CAAC,GAAM,KAAW,EAAS,GAAM,EACjC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,IAAkB,EAAa,EAAO,MAAM,EAAE,IAAI,EAGlD,EAAE,aAAU,eAAY,EAC5B,IAAkB,EAAE,QAAQ,GAAiB,GAAG,KAAA,GAChD,EAAE,OAAO,KAAK,CACf,EAIK,EAAE,SAAS,GAAiB,SAAS,MAAoB,EAAW,EAAM,EAK1E,IAAe,IACjB,GAAG,EAAgB,KAAK,IAAI,EAAgB,KAAK,KACjD,IACE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AY,EAAQ,OAAO,IAAQ,gBAAgB,YAAY;OAC7E,eAAY;OACZ,CAAA,EACF,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QACG,EAAQ;QAAK;QAAC,kBAAC,QAAD;SAAM,WAAU;mBAAhB;UAAqC;UAAE,EAAQ;UAAK;UAAQ;;QACtE;SACK;QAhBP,EAAQ,GAgBD,CACd;KACU,EAAA,CAAA,CACN;;GACK,CAAA,CACT"}
1
+ {"version":3,"file":"ProductCombobox.js","names":[],"sources":["../../../../../src/product-management/shared/components/input/ProductCombobox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../../utils/cn';\nimport { useProduct, useProducts } from '../../../modules/products/hooks/useProducts';\n\ninterface ProductComboboxProps {\n /** Selected product id (controlled). Empty string = nothing selected. */\n value: string;\n /** Called with the selected product id ('' when cleared). */\n onChange: (id: string) => void;\n disabled?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Id for the trigger button — pairs with an external <label htmlFor>. */\n id?: string;\n /** Optional error message — toggles the invalid border + aria-invalid. */\n error?: string;\n}\n\n/** Debounce a value so each keystroke doesn't fire a query. */\nfunction useDebounced<T>(value: T, ms: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n const t = setTimeout(() => setDebounced(value), ms);\n return () => clearTimeout(t);\n }, [value, ms]);\n return debounced;\n}\n\n/**\n * ProductCombobox — searchable single-select for platform products.\n *\n * A button trigger shows the selected product as `name (slug)` (or a\n * placeholder) and opens a Popover with a cmdk Command. Built entirely on the\n * existing fe-libs `ui` primitives (Command + Popover) — no new dependencies.\n *\n * Search is performed **server-side** (`useProducts({ search })`) so any\n * product is reachable, not just the first page — important now that the\n * free-text product-id input was replaced by this control. The current\n * selection's label is resolved independently via `useProduct(value)`, so it\n * renders correctly even while the list is filtered to a different search.\n */\nexport function ProductCombobox({\n value,\n onChange,\n disabled = false,\n required = false,\n placeholder = 'Select a product…',\n id,\n error,\n}: ProductComboboxProps) {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n const debouncedSearch = useDebounced(search.trim(), 200);\n\n // Options: server-side search, so any product is reachable (no client-only cap).\n const { products, loading } = useProducts(\n debouncedSearch ? { search: debouncedSearch } : undefined,\n { limit: 100 }\n );\n\n // Resolve the selected product's label independently of the (searchable) list,\n // so a current selection still shows even when the list is filtered elsewhere.\n const { product: selectedProduct, loading: selectedLoading } = useProduct(value);\n\n // Resolved → name (slug). Still fetching → \"Loading…\". Set but unresolved\n // (e.g. a deleted/stale product id) → show the raw id, not a permanent spinner.\n // Empty → placeholder.\n const triggerLabel = selectedProduct\n ? `${selectedProduct.name} (${selectedProduct.slug})`\n : value\n ? selectedLoading\n ? 'Loading…'\n : value\n : placeholder;\n\n const triggerClassName = cn(\n 'w-full flex items-center justify-between gap-2 px-3 py-2',\n 'bg-surface',\n 'border border-default',\n 'rounded-lg',\n 'text-left text-sm text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]',\n 'disabled:bg-bg-sunken disabled:cursor-not-allowed',\n 'transition-all duration-200',\n error && 'border-[var(--color-status-error)]',\n !selectedProduct && 'text-text-tertiary'\n );\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n // Reset the query on close so reopening starts fresh, not pre-filtered.\n if (!next) setSearch('');\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n id={id}\n role=\"combobox\"\n aria-expanded={open}\n aria-required={required}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n className={triggerClassName}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <ChevronsUpDown size={16} className=\"shrink-0 text-text-tertiary\" aria-hidden=\"true\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0 border border-default bg-surface\"\n >\n {/* Search is server-side → disable cmdk's client filter so we render\n exactly what the query returned. */}\n <Command shouldFilter={false} className=\"bg-surface text-text-primary\">\n <CommandInput\n value={search}\n onValueChange={setSearch}\n placeholder=\"Search products…\"\n className=\"text-text-primary placeholder:text-text-tertiary\"\n />\n <CommandList>\n <CommandEmpty className=\"text-text-tertiary\">\n {loading ? 'Searching…' : 'No products found.'}\n </CommandEmpty>\n {/* Optional fields need a way back to \"no product\" — emit '' so\n callers like ContentPageForm (productId || undefined) can clear\n an existing association. Hidden when the field is required. */}\n {!required && (\n <CommandItem\n value=\"__none__\"\n onSelect={() => {\n onChange('');\n setOpen(false);\n }}\n className=\"text-text-tertiary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', value === '' ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate italic\">None</span>\n </CommandItem>\n )}\n {products.map((product) => (\n <CommandItem\n key={product.id}\n value={product.id}\n onSelect={() => {\n onChange(product.id);\n setOpen(false);\n }}\n className=\"text-text-primary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', product.id === value ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {product.name} <span className=\"text-text-tertiary\">({product.slug})</span>\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;AA+BA,SAAS,EAAgB,GAAU,GAAe;CAChD,IAAM,CAAC,GAAW,KAAgB,EAAS,EAAM;AAKjD,QAJA,QAAgB;EACd,IAAM,IAAI,iBAAiB,EAAa,EAAM,EAAE,EAAG;AACnD,eAAa,aAAa,EAAE;IAC3B,CAAC,GAAO,EAAG,CAAC,EACR;;AAgBT,SAAgB,EAAgB,EAC9B,UACA,aACA,cAAW,IACX,cAAW,IACX,iBAAc,qBACd,OACA,YACuB;CACvB,IAAM,CAAC,GAAM,KAAW,EAAS,GAA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AAY,MAAU,KAAK,gBAAgB,YAAY;OACrE,eAAY;OACZ,CAAA,EACF,kBAAC,QAAD;OAAM,WAAU;iBAAkB;OAAW,CAAA,CACjC;;KAEf,EAAS,KAAK,MACb,kBAAC,GAAD;MAEE,OAAO,EAAQ;MACf,gBAAgB;AAEd,OADA,EAAS,EAAQ,GAAG,EACpB,EAAQ,GAAM;;MAEhB,WAAU;gBAPZ,CASE,kBAAC,GAAD;OACE,MAAM;OACN,WAAW,EAAG,YAAY,EAAQ,OAAO,IAAQ,gBAAgB,YAAY;OAC7E,eAAY;OACZ,CAAA,EACF,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QACG,EAAQ;QAAK;QAAC,kBAAC,QAAD;SAAM,WAAU;mBAAhB;UAAqC;UAAE,EAAQ;UAAK;UAAQ;;QACtE;SACK;QAhBP,EAAQ,GAgBD,CACd;KACU,EAAA,CAAA,CACN;;GACK,CAAA,CACT"}
@@ -19,7 +19,7 @@ function i({ value: i, onChange: a, placeholder: o = "Search...", clearAriaLabel
19
19
  i && /* @__PURE__ */ n("button", {
20
20
  type: "button",
21
21
  onClick: () => a(""),
22
- className: "\n absolute right-3 top-1/2 -translate-y-1/2\n p-1 rounded-md\n text-text-tertiary\n hover:text-text-primary\n hover:bg-muted\n transition-all duration-200\n ",
22
+ className: "\n absolute right-3 top-1/2 -translate-y-1/2\n p-1 rounded-md\n text-text-tertiary\n hover:text-text-primary\n hover:bg-bg-sunken\n transition-all duration-200\n ",
23
23
  "aria-label": s,
24
24
  children: /* @__PURE__ */ n(t, { size: 16 })
25
25
  })
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","names":[],"sources":["../../../../../src/product-management/shared/components/input/SearchInput.tsx"],"sourcesContent":["import { Search, X } from 'lucide-react';\n\ninterface SearchInputProps {\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n clearAriaLabel?: string;\n className?: string;\n}\n\n/**\n * SearchInput — reusable search input with clear button.\n *\n * The `placeholder` and `clearAriaLabel` props are intentionally English-only\n * by default. Translation should happen at the call site (where the calling\n * module's i18n namespace is loaded), e.g.:\n * <SearchInput\n * placeholder={tr('foo.search', 'Search...')}\n * clearAriaLabel={tr('foo.clearSearch', 'Clear search')}\n * ...\n * />\n */\nexport function SearchInput({\n value,\n onChange,\n placeholder = 'Search...',\n clearAriaLabel = 'Clear search',\n className = '',\n}: SearchInputProps) {\n return (\n <div className={`relative ${className}`}>\n <Search size={18} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary\" />\n <input\n type=\"text\"\n value={value}\n onChange={(e) => onChange(e.target.value)}\n placeholder={placeholder}\n className=\"\n w-full pl-[3.25rem] pr-10 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \"\n />\n {value && (\n <button\n type=\"button\"\n onClick={() => onChange('')}\n className=\"\n absolute right-3 top-1/2 -translate-y-1/2\n p-1 rounded-md\n text-text-tertiary\n hover:text-text-primary\n hover:bg-muted\n transition-all duration-200\n \"\n aria-label={clearAriaLabel}\n >\n <X size={16} />\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;AAsBA,SAAgB,EAAY,EAC1B,UACA,aACA,iBAAc,aACd,oBAAiB,gBACjB,eAAY,MACO;AACnB,QACE,kBAAC,OAAD;EAAK,WAAW,YAAY;YAA5B;GACE,kBAAC,GAAD;IAAQ,MAAM;IAAI,WAAU;IAAgE,CAAA;GAC5F,kBAAC,SAAD;IACE,MAAK;IACE;IACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;IAC5B;IACb,WAAU;IAUV,CAAA;GACD,KACC,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAS,GAAG;IAC3B,WAAU;IAQV,cAAY;cAEZ,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;IACR,CAAA;GAEP"}
1
+ {"version":3,"file":"SearchInput.js","names":[],"sources":["../../../../../src/product-management/shared/components/input/SearchInput.tsx"],"sourcesContent":["import { Search, X } from 'lucide-react';\n\ninterface SearchInputProps {\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n clearAriaLabel?: string;\n className?: string;\n}\n\n/**\n * SearchInput — reusable search input with clear button.\n *\n * The `placeholder` and `clearAriaLabel` props are intentionally English-only\n * by default. Translation should happen at the call site (where the calling\n * module's i18n namespace is loaded), e.g.:\n * <SearchInput\n * placeholder={tr('foo.search', 'Search...')}\n * clearAriaLabel={tr('foo.clearSearch', 'Clear search')}\n * ...\n * />\n */\nexport function SearchInput({\n value,\n onChange,\n placeholder = 'Search...',\n clearAriaLabel = 'Clear search',\n className = '',\n}: SearchInputProps) {\n return (\n <div className={`relative ${className}`}>\n <Search size={18} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary\" />\n <input\n type=\"text\"\n value={value}\n onChange={(e) => onChange(e.target.value)}\n placeholder={placeholder}\n className=\"\n w-full pl-[3.25rem] pr-10 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \"\n />\n {value && (\n <button\n type=\"button\"\n onClick={() => onChange('')}\n className=\"\n absolute right-3 top-1/2 -translate-y-1/2\n p-1 rounded-md\n text-text-tertiary\n hover:text-text-primary\n hover:bg-bg-sunken\n transition-all duration-200\n \"\n aria-label={clearAriaLabel}\n >\n <X size={16} />\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;AAsBA,SAAgB,EAAY,EAC1B,UACA,aACA,iBAAc,aACd,oBAAiB,gBACjB,eAAY,MACO;AACnB,QACE,kBAAC,OAAD;EAAK,WAAW,YAAY;YAA5B;GACE,kBAAC,GAAD;IAAQ,MAAM;IAAI,WAAU;IAAgE,CAAA;GAC5F,kBAAC,SAAD;IACE,MAAK;IACE;IACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;IAC5B;IACb,WAAU;IAUV,CAAA;GACD,KACC,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAS,GAAG;IAC3B,WAAU;IAQV,cAAY;cAEZ,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;IACR,CAAA;GAEP"}
@@ -1,6 +1,6 @@
1
1
  //#region src/shared/utils/renderMarkdown.ts
2
2
  function e(e) {
3
- return e.replace(/^### (.+)$/gm, "<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>").replace(/^## (.+)$/gm, "<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>").replace(/^# (.+)$/gm, "<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/`(.+?)`/g, "<code class=\"px-1.5 py-0.5 bg-muted rounded text-sm font-mono\">$1</code>").replace(/```[\s\S]*?```/g, (e) => `<pre class="bg-muted rounded-lg p-4 overflow-x-auto my-3"><code class="text-sm font-mono">${e.replace(/```\w*\n?/, "").replace(/\n?```$/, "")}</code></pre>`).replace(/\[(.+?)\]\((.+?)\)/g, "<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>").replace(/^- (.+)$/gm, "<li class=\"ml-4 list-disc\">$1</li>").replace(/\n\n/g, "</p><p class=\"mb-3\">").replace(/\n/g, "<br/>");
3
+ return e.replace(/^### (.+)$/gm, "<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>").replace(/^## (.+)$/gm, "<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>").replace(/^# (.+)$/gm, "<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/`(.+?)`/g, "<code class=\"px-1.5 py-0.5 bg-bg-sunken rounded text-sm font-mono\">$1</code>").replace(/```[\s\S]*?```/g, (e) => `<pre class="bg-bg-sunken rounded-lg p-4 overflow-x-auto my-3"><code class="text-sm font-mono">${e.replace(/```\w*\n?/, "").replace(/\n?```$/, "")}</code></pre>`).replace(/\[(.+?)\]\((.+?)\)/g, "<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>").replace(/^- (.+)$/gm, "<li class=\"ml-4 list-disc\">$1</li>").replace(/\n\n/g, "</p><p class=\"mb-3\">").replace(/\n/g, "<br/>");
4
4
  }
5
5
  //#endregion
6
6
  export { e as renderMarkdown };
@@ -1 +1 @@
1
- {"version":3,"file":"renderMarkdown.js","names":[],"sources":["../../../src/shared/utils/renderMarkdown.ts"],"sourcesContent":["/**\n * Simple markdown renderer that converts basic markdown syntax to HTML.\n * Handles: headers, bold, italic, inline code, code blocks, links,\n * unordered lists, paragraphs, and line breaks.\n *\n * Output should always be sanitized (e.g. with DOMPurify) before rendering\n * via dangerouslySetInnerHTML.\n */\nexport function renderMarkdown(content: string): string {\n return (\n content\n // Headers\n .replace(/^### (.+)$/gm, '<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>')\n .replace(/^## (.+)$/gm, '<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>')\n .replace(/^# (.+)$/gm, '<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>')\n // Bold and italic\n .replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.+?)\\*/g, '<em>$1</em>')\n // Inline code\n .replace(\n /`(.+?)`/g,\n '<code class=\"px-1.5 py-0.5 bg-muted rounded text-sm font-mono\">$1</code>'\n )\n // Code blocks\n .replace(/```[\\s\\S]*?```/g, (match) => {\n const code = match.replace(/```\\w*\\n?/, '').replace(/\\n?```$/, '');\n return `<pre class=\"bg-muted rounded-lg p-4 overflow-x-auto my-3\"><code class=\"text-sm font-mono\">${code}</code></pre>`;\n })\n // Links\n .replace(\n /\\[(.+?)\\]\\((.+?)\\)/g,\n '<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>'\n )\n // Unordered lists\n .replace(/^- (.+)$/gm, '<li class=\"ml-4 list-disc\">$1</li>')\n // Paragraphs (double newline)\n .replace(/\\n\\n/g, '</p><p class=\"mb-3\">')\n // Single newlines\n .replace(/\\n/g, '<br/>')\n );\n}\n"],"mappings":";AAQA,SAAgB,EAAe,GAAyB;AACtD,QACE,EAEG,QAAQ,gBAAgB,wDAAsD,CAC9E,QAAQ,eAAe,wDAAsD,CAC7E,QAAQ,cAAc,qDAAmD,CAEzE,QAAQ,kBAAkB,sBAAsB,CAChD,QAAQ,cAAc,cAAc,CAEpC,QACC,YACA,6EACD,CAEA,QAAQ,oBAAoB,MAEpB,6FADM,EAAM,QAAQ,aAAa,GAAG,CAAC,QAAQ,WAAW,GACqC,CAAK,eACzG,CAED,QACC,uBACA,4EACD,CAEA,QAAQ,cAAc,uCAAqC,CAE3D,QAAQ,SAAS,yBAAuB,CAExC,QAAQ,OAAO,QAAQ"}
1
+ {"version":3,"file":"renderMarkdown.js","names":[],"sources":["../../../src/shared/utils/renderMarkdown.ts"],"sourcesContent":["/**\n * Simple markdown renderer that converts basic markdown syntax to HTML.\n * Handles: headers, bold, italic, inline code, code blocks, links,\n * unordered lists, paragraphs, and line breaks.\n *\n * Output should always be sanitized (e.g. with DOMPurify) before rendering\n * via dangerouslySetInnerHTML.\n */\nexport function renderMarkdown(content: string): string {\n return (\n content\n // Headers\n .replace(/^### (.+)$/gm, '<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>')\n .replace(/^## (.+)$/gm, '<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>')\n .replace(/^# (.+)$/gm, '<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>')\n // Bold and italic\n .replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.+?)\\*/g, '<em>$1</em>')\n // Inline code\n .replace(\n /`(.+?)`/g,\n '<code class=\"px-1.5 py-0.5 bg-bg-sunken rounded text-sm font-mono\">$1</code>'\n )\n // Code blocks\n .replace(/```[\\s\\S]*?```/g, (match) => {\n const code = match.replace(/```\\w*\\n?/, '').replace(/\\n?```$/, '');\n return `<pre class=\"bg-bg-sunken rounded-lg p-4 overflow-x-auto my-3\"><code class=\"text-sm font-mono\">${code}</code></pre>`;\n })\n // Links\n .replace(\n /\\[(.+?)\\]\\((.+?)\\)/g,\n '<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>'\n )\n // Unordered lists\n .replace(/^- (.+)$/gm, '<li class=\"ml-4 list-disc\">$1</li>')\n // Paragraphs (double newline)\n .replace(/\\n\\n/g, '</p><p class=\"mb-3\">')\n // Single newlines\n .replace(/\\n/g, '<br/>')\n );\n}\n"],"mappings":";AAQA,SAAgB,EAAe,GAAyB;AACtD,QACE,EAEG,QAAQ,gBAAgB,wDAAsD,CAC9E,QAAQ,eAAe,wDAAsD,CAC7E,QAAQ,cAAc,qDAAmD,CAEzE,QAAQ,kBAAkB,sBAAsB,CAChD,QAAQ,cAAc,cAAc,CAEpC,QACC,YACA,iFACD,CAEA,QAAQ,oBAAoB,MAEpB,iGADM,EAAM,QAAQ,aAAa,GAAG,CAAC,QAAQ,WAAW,GACyC,CAAK,eAC7G,CAED,QACC,uBACA,4EACD,CAEA,QAAQ,cAAc,uCAAqC,CAE3D,QAAQ,SAAS,yBAAuB,CAExC,QAAQ,OAAO,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-product",
3
- "version": "2026.608.1",
3
+ "version": "2026.624.1",
4
4
  "description": "Product management microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [