@allbluecn/admin-app 0.3.3 → 0.3.5

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 (109) hide show
  1. package/package.json +4 -3
  2. package/src/components/admin/admin-user-menu.tsx +4 -4
  3. package/src/components/admin/developer-log.tsx +7 -7
  4. package/src/components/ai-memory/memory-facts-panel.tsx +9 -9
  5. package/src/components/ai-prompts/preview-panel.tsx +1 -1
  6. package/src/components/ai-prompts/prompt-editor.tsx +8 -8
  7. package/src/components/ai-prompts/prompt-table.tsx +6 -6
  8. package/src/components/ai-prompts/section-editor.tsx +3 -3
  9. package/src/components/ai-prompts/variable-panel.tsx +2 -2
  10. package/src/components/ai-prompts/version-history.tsx +5 -5
  11. package/src/components/ai-provider/model-list-editor.tsx +2 -2
  12. package/src/components/ai-provider/provider-form.tsx +7 -7
  13. package/src/components/ai-provider/provider-table.tsx +6 -6
  14. package/src/components/auth/admin-login-form.tsx +6 -6
  15. package/src/components/auth/icon-input.tsx +2 -2
  16. package/src/components/auth/password-input.tsx +2 -2
  17. package/src/components/component/component-form-dialog.tsx +8 -8
  18. package/src/components/component/component-import-dialog.tsx +6 -6
  19. package/src/components/component/component-table.tsx +3 -3
  20. package/src/components/confirm-dialog.tsx +94 -0
  21. package/src/components/data-table/data-table-pagination.tsx +121 -0
  22. package/src/components/data-table/data-table.tsx +218 -0
  23. package/src/components/data-table/table-detail-layout.tsx +97 -0
  24. package/src/components/dependency/changelog-dialog.tsx +2 -2
  25. package/src/components/dependency/columns.tsx +3 -3
  26. package/src/components/dependency/dependency-table.tsx +7 -7
  27. package/src/components/dependency/edit-dialog.tsx +8 -8
  28. package/src/components/invitations/invitations-page.tsx +13 -13
  29. package/src/components/knowledge-public/bookmark-form-dialog.tsx +6 -6
  30. package/src/components/knowledge-public/compliance-form-dialog.tsx +6 -6
  31. package/src/components/knowledge-public/legal-form-dialog.tsx +7 -7
  32. package/src/components/layout/sidebar-02/app-sidebar.tsx +1 -1
  33. package/src/components/layout/sidebar-02/index.tsx +1 -1
  34. package/src/components/layout/sidebar-02/nav-main.tsx +2 -2
  35. package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -3
  36. package/src/components/market/columns.tsx +4 -4
  37. package/src/components/market/market-app-form.tsx +6 -6
  38. package/src/components/market/market-app-list.tsx +4 -4
  39. package/src/components/monitoring/error-list.tsx +1 -1
  40. package/src/components/monitoring/metrics-stats.tsx +1 -1
  41. package/src/components/monitoring/request-log-table.tsx +1 -1
  42. package/src/components/notion-avatar.tsx +126 -0
  43. package/src/components/oauth-providers/provider-page.tsx +9 -9
  44. package/src/components/permissions/assign-dialog.tsx +5 -5
  45. package/src/components/permissions/create-role-dialog.tsx +6 -6
  46. package/src/components/ui/alert-dialog.tsx +185 -0
  47. package/src/components/ui/alert.tsx +75 -0
  48. package/src/components/ui/avatar.tsx +106 -0
  49. package/src/components/ui/badge.tsx +51 -0
  50. package/src/components/ui/button.tsx +57 -0
  51. package/src/components/ui/card.tsx +102 -0
  52. package/src/components/ui/checkbox.tsx +27 -0
  53. package/src/components/ui/collapsible.tsx +19 -0
  54. package/src/components/ui/dialog.tsx +155 -0
  55. package/src/components/ui/dropdown-menu.tsx +265 -0
  56. package/src/components/ui/field.tsx +236 -0
  57. package/src/components/ui/input-group.tsx +157 -0
  58. package/src/components/ui/input.tsx +19 -0
  59. package/src/components/ui/label.tsx +17 -0
  60. package/src/components/ui/pagination.tsx +130 -0
  61. package/src/components/ui/select.tsx +232 -0
  62. package/src/components/ui/separator.tsx +23 -0
  63. package/src/components/ui/sheet.tsx +134 -0
  64. package/src/components/ui/sidebar.tsx +721 -0
  65. package/src/components/ui/skeleton.tsx +13 -0
  66. package/src/components/ui/switch.tsx +30 -0
  67. package/src/components/ui/table.tsx +113 -0
  68. package/src/components/ui/textarea.tsx +17 -0
  69. package/src/components/ui/toast.tsx +308 -0
  70. package/src/components/ui/tooltip.tsx +64 -0
  71. package/src/components/user/columns.tsx +4 -4
  72. package/src/components/user/settings-activity-log.tsx +7 -7
  73. package/src/components/user/settings-profile/avatar-uploader.tsx +2 -2
  74. package/src/components/user/settings-profile/social-links.tsx +2 -2
  75. package/src/components/user/settings-profile.tsx +6 -6
  76. package/src/components/user/user-create-dialog.tsx +6 -6
  77. package/src/components/user/user-detail/error-boundary.tsx +1 -1
  78. package/src/components/user/user-detail/user-detail-dialogs.tsx +6 -6
  79. package/src/components/user/user-filters.tsx +3 -3
  80. package/src/components/user-avatar.tsx +82 -0
  81. package/src/hooks/use-mobile.ts +19 -0
  82. package/src/lib/datetime.ts +226 -0
  83. package/src/lib/sanitize.ts +18 -0
  84. package/src/providers/index.tsx +1 -1
  85. package/src/routes/__root.tsx +1 -1
  86. package/src/routes/_nav/audit/route.lazy.tsx +1 -1
  87. package/src/routes/_nav/compliance/route.lazy.tsx +3 -3
  88. package/src/routes/_nav/components/route.lazy.tsx +4 -4
  89. package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +6 -6
  90. package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +6 -6
  91. package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +6 -6
  92. package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +3 -3
  93. package/src/routes/_nav/licenses/new/route.lazy.tsx +5 -5
  94. package/src/routes/_nav/licenses/route.lazy.tsx +1 -1
  95. package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +2 -2
  96. package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
  97. package/src/routes/_nav/monitoring/health/route.lazy.tsx +3 -3
  98. package/src/routes/_nav/monitoring/logs/route.lazy.tsx +3 -3
  99. package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +3 -3
  100. package/src/routes/_nav/monitoring/route.lazy.tsx +2 -2
  101. package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
  102. package/src/routes/_nav/permissions/route.lazy.tsx +4 -4
  103. package/src/routes/_nav/sso/route.lazy.tsx +2 -2
  104. package/src/routes/_nav/users/$userId/route.lazy.tsx +8 -8
  105. package/src/routes/_nav/users/-components/users-table.tsx +1 -1
  106. package/src/routes/_nav/users/route.lazy.tsx +1 -1
  107. package/src/routes/setup/route.lazy.tsx +2 -2
  108. package/src/server/dependency/helpers.ts +0 -1
  109. package/src/styles/globals.css +3 -3
@@ -18,14 +18,14 @@
18
18
  import { createLazyFileRoute } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useEffect, useRef } from 'react'
21
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
21
+ import { formatTimestamp } from '@/lib/datetime'
22
22
  import { HeartPulse, Play, Square, RefreshCw } from 'lucide-react'
23
23
  import { PageHeader } from '@/components/common/page-header'
24
24
  import { HealthCards } from '@/components/monitoring/health-cards'
25
- import { DataTable } from '@allbluecn/ui/data-table'
25
+ import { DataTable } from '@/components/data-table/data-table'
26
26
  import { getHealthStatus } from '@/server/serverFns/monitoring/get-health'
27
27
  import { getHealthCheckSettings, updateHealthCheckSettings } from '@/server/serverFns/monitoring/get-health-settings'
28
- import { toast } from '@allbluecn/ui/toast'
28
+ import { toast } from '@/components/ui/toast'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
30
 
31
31
  export const Route = createLazyFileRoute('/_nav/monitoring/health')({
@@ -21,11 +21,11 @@ import { useState, useEffect, useRef } from 'react'
21
21
  import { Activity, Filter, RefreshCw, Trash2 } from 'lucide-react'
22
22
  import { PageHeader } from '@/components/common/page-header'
23
23
  import { RequestLogTable } from '@/components/monitoring/request-log-table'
24
- import { Checkbox } from '@allbluecn/ui/checkbox'
24
+ import { Checkbox } from '@/components/ui/checkbox'
25
25
  import { getRequestLogs } from '@/server/serverFns/monitoring/get-request-logs'
26
26
  import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
27
- import { DataTablePagination } from '@allbluecn/ui/data-table/pagination'
28
- import { toast } from '@allbluecn/ui/toast'
27
+ import { DataTablePagination } from '@/components/data-table/data-table-pagination'
28
+ import { toast } from '@/components/ui/toast'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
30
  import { RequestLogEntry } from '@/components/monitoring/request-log-table'
31
31
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  import { m } from '@/paraglide/messages.js'
19
19
  import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
20
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
20
+ import { formatTimestamp } from '@/lib/datetime'
21
21
  import { createLazyFileRoute } from '@tanstack/react-router'
22
22
  import { useState } from 'react'
23
23
  import { BarChart3, RefreshCw, Trash2, MemoryStick } from 'lucide-react'
@@ -27,8 +27,8 @@ import { MetricsStats } from '@/components/monitoring/metrics-stats'
27
27
  import { getMetrics } from '@/server/serverFns/monitoring/get-metrics'
28
28
  import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
- import { DataTable } from '@allbluecn/ui/data-table'
31
- import { toast } from '@allbluecn/ui/toast'
30
+ import { DataTable } from '@/components/data-table/data-table'
31
+ import { toast } from '@/components/ui/toast'
32
32
 
33
33
  export const Route = createLazyFileRoute('/_nav/monitoring/metrics')({
34
34
  component: MonitoringMetrics,
@@ -17,8 +17,8 @@
17
17
 
18
18
  import { createLazyFileRoute, Link, Outlet, useLocation } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { SidebarTrigger } from '@allbluecn/ui/sidebar'
21
- import { Separator } from '@allbluecn/ui/separator'
20
+ import { SidebarTrigger } from '@/components/ui/sidebar'
21
+ import { Separator } from '@/components/ui/separator'
22
22
 
23
23
  export const Route = createLazyFileRoute('/_nav/monitoring')({
24
24
  component: MonitoringLayout,
@@ -21,7 +21,7 @@ import * as Sentry from '@sentry/tanstackstart-react'
21
21
  import { BugPlay, ExternalLink, Bug, Activity, Eye, EyeOff, Save, CheckCircle2, XCircle, RefreshCw, ShieldCheck } from 'lucide-react'
22
22
  import { IconBrandSentry } from '@tabler/icons-react';
23
23
  import { useEffect, useState } from 'react'
24
- import { toast } from '@allbluecn/ui/toast'
24
+ import { toast } from '@/components/ui/toast'
25
25
  import { getSentryConfig, saveSentryConfig, reconfigureSentryServer } from '@/server/serverFns/sentry/config'
26
26
  import type { SentryConfig } from '@/server/serverFns/sentry/config'
27
27
 
@@ -2,15 +2,15 @@ import { createLazyFileRoute, Link, useLocation } from '@tanstack/react-router'
2
2
  import { m } from '@/paraglide/messages.js'
3
3
  import { getLocale } from '@/paraglide/runtime.js'
4
4
  import { useServerFn } from '@tanstack/react-start'
5
- import { toast } from '@allbluecn/ui/toast'
5
+ import { toast } from '@/components/ui/toast'
6
6
  import { useEffect, useState } from 'react'
7
7
  import type React from 'react'
8
8
  import {
9
9
  listRolesFn,
10
10
  deleteRoleFn,
11
11
  } from '@/server/serverFns/permissions'
12
- import { Badge } from '@allbluecn/ui/badge'
13
- import { Button } from '@allbluecn/ui/button'
12
+ import { Badge } from '@/components/ui/badge'
13
+ import { Button } from '@/components/ui/button'
14
14
  import {
15
15
  Table,
16
16
  TableBody,
@@ -18,7 +18,7 @@ import {
18
18
  TableHead,
19
19
  TableHeader,
20
20
  TableRow,
21
- } from '@allbluecn/ui/table'
21
+ } from '@/components/ui/table'
22
22
  import { CreateRoleDialog } from '@/components/permissions/create-role-dialog'
23
23
  import { AssignDialog } from '@/components/permissions/assign-dialog'
24
24
  import type { RoleItem } from '@/components/permissions/types'
@@ -18,10 +18,10 @@
18
18
  import { createLazyFileRoute } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useServerFn } from '@tanstack/react-start'
21
- import { toast } from '@allbluecn/ui/toast'
21
+ import { toast } from '@/components/ui/toast'
22
22
  import type React from 'react'
23
23
  import { deleteSsoProviderFn, toggleSsoProviderFn } from '@/server/serverFns/sso-config'
24
- import { Badge } from '@allbluecn/ui/badge'
24
+ import { Badge } from '@/components/ui/badge'
25
25
 
26
26
  export const Route = createLazyFileRoute('/_nav/sso')({
27
27
  pendingComponent: () => (
@@ -18,17 +18,17 @@
18
18
  import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useTransition } from 'react'
21
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
21
+ import { formatTimestamp } from '@/lib/datetime'
22
22
  import { getUserDetailFn } from '@/server/serverFns/user/detail'
23
23
  import { updateUserRoleFn } from '@/server/serverFns/user/update-role'
24
24
  import { updateUserStatusFn } from '@/server/serverFns/user/update-status'
25
25
  import { resetUserPasswordFn } from '@/server/serverFns/user/reset-password'
26
26
  import { deleteUserFn } from '@/server/serverFns/user/delete'
27
- import { TableDetailLayout } from '@allbluecn/ui/data-table/table-detail-layout'
28
- import { Badge } from '@allbluecn/ui/badge'
29
- import { Separator } from '@allbluecn/ui/separator'
30
- import { Button } from '@allbluecn/ui/button'
31
- import { UserAvatar } from '@allbluecn/ui/components/user-avatar'
27
+ import { TableDetailLayout } from '@/components/data-table/table-detail-layout'
28
+ import { Badge } from '@/components/ui/badge'
29
+ import { Separator } from '@/components/ui/separator'
30
+ import { Button } from '@/components/ui/button'
31
+ import { UserAvatar } from '@/components/user-avatar'
32
32
 
33
33
  const STATUS_LABELS: Record<string, () => string> = {
34
34
  active: m['admin-users_status_active'],
@@ -48,7 +48,7 @@ import {
48
48
  ShoppingBagIcon,
49
49
  ShieldCheckIcon,
50
50
  } from 'lucide-react'
51
- import { toast } from '@allbluecn/ui/toast'
51
+ import { toast } from '@/components/ui/toast'
52
52
  import { parseUserAgent, formatParsedUA } from '@allbluecn/kernel'
53
53
  import type { AvatarConfig } from '@allbluecn/kernel'
54
54
  import SettingsActivityLog, {
@@ -61,7 +61,7 @@ import {
61
61
  CardDescription,
62
62
  CardHeader,
63
63
  CardTitle,
64
- } from '@allbluecn/ui/card'
64
+ } from '@/components/ui/card'
65
65
  import { AdminUserErrorBoundary } from '@/components/user/user-detail/error-boundary'
66
66
  import {
67
67
  UserDeleteDialog,
@@ -16,7 +16,7 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { DataTable } from "@allbluecn/ui/data-table"
19
+ import { DataTable } from "@/components/data-table/data-table"
20
20
  import { getUserColumns } from "@/components/user/columns"
21
21
  import type { UserRow } from "@/components/user/columns"
22
22
  import { useNavigate } from "@tanstack/react-router"
@@ -21,7 +21,7 @@ import { useState } from 'react'
21
21
  import { UsersTable } from './-components/users-table'
22
22
  import { UserFilters } from '@/components/user/user-filters'
23
23
  import { UserCreateDialog } from '@/components/user/user-create-dialog'
24
- import { Button } from '@allbluecn/ui/button'
24
+ import { Button } from '@/components/ui/button'
25
25
  import { PlusIcon } from 'lucide-react'
26
26
 
27
27
  export const Route = createLazyFileRoute('/_nav/users')({
@@ -18,14 +18,14 @@
18
18
  import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState } from 'react'
21
- import { toast } from '@allbluecn/ui/toast'
21
+ import { toast } from '@/components/ui/toast'
22
22
  import { Loader2, ShieldCheck, User, Mail, Database } from 'lucide-react'
23
23
  import { AuthLayout, AuthLayoutLeft, AuthLayoutRight } from '@/components/auth/auth-layout'
24
24
  import { AuthHeader } from '@/components/auth/auth-header'
25
25
  import { AuthBrandPanel } from '@/components/auth/auth-brand-panel'
26
26
  import { PasswordInput } from '@/components/auth/password-input'
27
27
  import { IconInput } from '@/components/auth/icon-input'
28
- import { Button } from '@allbluecn/ui/button'
28
+ import { Button } from '@/components/ui/button'
29
29
  import { setupAdminFn } from '@/server/serverFns/auth/setup'
30
30
 
31
31
  export const Route = createLazyFileRoute('/setup')({
@@ -44,7 +44,6 @@ const PACKAGE_FILES = [
44
44
  "apps/admin/package.json",
45
45
  "packages/database/package.json",
46
46
  "packages/shared/package.json",
47
- "packages/ui/package.json",
48
47
  ]
49
48
 
50
49
  interface ParsedPkgFile {
@@ -3,9 +3,9 @@
3
3
 
4
4
  @import "tailwindcss";
5
5
 
6
- /* 共享 UI 包源码类名扫描(Tailwind v4 自动探测不覆盖 workspace 包,
7
- 缺失则 @allbluecn/ui 内组件的全部工具类不生成) */
8
- @source "../../../../packages/ui/src/**/*.{ts,tsx}";
6
+ /* src 源码类名扫描(含 components/ui 内联组件,
7
+ Tailwind v4 自动探测不覆盖的路径由此显式声明) */
8
+ @source "../";
9
9
 
10
10
  @import "tw-animate-css";
11
11