@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
@@ -0,0 +1,218 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // AllBlue - 理想之海
3
+ // Copyright (C) 2026 AllBlue Contributors
4
+ //
5
+ // This program is free software: you can redistribute it and/or modify
6
+ // it under the terms of the GNU Affero General Public License as published by
7
+ // the Free Software Foundation, either version 3 of the License, or
8
+ // (at your option) any later version.
9
+ //
10
+ // This program is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU Affero General Public License for more details.
14
+ //
15
+ // You should have received a copy of the GNU Affero General Public License
16
+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ import type { CSSProperties } from 'react'
19
+ import { useRef } from 'react'
20
+ import {
21
+ type ColumnDef,
22
+ type RowData,
23
+ columnVisibilityFeature,
24
+ flexRender,
25
+ tableFeatures,
26
+ useTable,
27
+ } from '@tanstack/react-table'
28
+ import { useVirtualizer } from '@tanstack/react-virtual'
29
+ import {
30
+ Table,
31
+ TableBody,
32
+ TableCell,
33
+ TableHead,
34
+ TableHeader,
35
+ TableRow,
36
+ } from '../ui/table'
37
+ import { VIRTUALIZE_THRESHOLD } from '@allbluecn/kernel'
38
+
39
+ export const dataTableFeatures = tableFeatures({
40
+ columnVisibilityFeature,
41
+ })
42
+
43
+ export type AdminColumnDef<
44
+ TData extends RowData,
45
+ TValue = unknown,
46
+ > = ColumnDef<typeof dataTableFeatures, TData, TValue> & {
47
+ meta?: { style?: CSSProperties }
48
+ }
49
+
50
+ export interface DataTableProps<TData extends RowData> {
51
+ columns: AdminColumnDef<TData>[];
52
+ data: TData[];
53
+ onRowClick?: (row: TData) => void;
54
+ actions?: React.ReactNode;
55
+ }
56
+
57
+ const ROW_HEIGHT = 48
58
+
59
+ function ColGroup({ columns }: { columns: AdminColumnDef<any>[] }) {
60
+ return (
61
+ <colgroup>
62
+ {columns.map((col, i) => {
63
+ const style = (col.meta as { style?: CSSProperties } | undefined)?.style
64
+ const width = style?.width
65
+ return width != null ? <col key={i} style={{ width }} /> : null
66
+ })}
67
+ </colgroup>
68
+ )
69
+ }
70
+
71
+ export function DataTable<TData extends RowData>({
72
+ columns,
73
+ data,
74
+ onRowClick,
75
+ actions,
76
+ }: DataTableProps<TData>) {
77
+ const table = useTable({
78
+ features: dataTableFeatures,
79
+ data,
80
+ columns,
81
+ });
82
+
83
+ const { rows } = table.getRowModel();
84
+ const parentRef = useRef<HTMLDivElement>(null);
85
+
86
+ const shouldVirtualize = rows.length > VIRTUALIZE_THRESHOLD;
87
+
88
+ const rowVirtualizer = useVirtualizer({
89
+ count: shouldVirtualize ? rows.length : 0,
90
+ getScrollElement: () => parentRef.current,
91
+ estimateSize: () => ROW_HEIGHT,
92
+ overscan: 10,
93
+ enabled: shouldVirtualize,
94
+ });
95
+
96
+ const virtualRows = shouldVirtualize ? rowVirtualizer.getVirtualItems() : [];
97
+ const totalHeight = shouldVirtualize ? rowVirtualizer.getTotalSize() : 0;
98
+ const paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
99
+ const paddingBottom =
100
+ virtualRows.length > 0
101
+ ? totalHeight - virtualRows[virtualRows.length - 1].end
102
+ : 0;
103
+
104
+ const headerGroups = table.getHeaderGroups();
105
+
106
+ const renderRows = () => {
107
+ if (!shouldVirtualize) {
108
+ return rows.map((row) => (
109
+ <TableRow
110
+ key={row.id}
111
+ className={onRowClick ? 'cursor-pointer' : undefined}
112
+ onClick={() => onRowClick?.(row.original)}
113
+ >
114
+ {row.getVisibleCells().map((cell) => {
115
+ const style = (cell.column.columnDef.meta as
116
+ | { style?: CSSProperties }
117
+ | undefined)?.style
118
+ const alignClass =
119
+ style?.textAlign === 'right' ? 'text-right' : undefined
120
+ return (
121
+ <TableCell
122
+ key={cell.id}
123
+ className={alignClass}
124
+ style={{ width: style?.width }}
125
+ >
126
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
127
+ </TableCell>
128
+ )
129
+ })}
130
+ </TableRow>
131
+ ))
132
+ }
133
+
134
+ return (
135
+ <>
136
+ {paddingTop > 0 && <tr style={{ height: paddingTop }} />}
137
+ {virtualRows.map((virtualRow) => {
138
+ const row = rows[virtualRow.index]
139
+ return (
140
+ <TableRow
141
+ key={row.id}
142
+ style={{
143
+ position: 'absolute',
144
+ transform: `translateY(${virtualRow.start}px)`,
145
+ height: ROW_HEIGHT,
146
+ }}
147
+ className={onRowClick ? 'cursor-pointer' : undefined}
148
+ onClick={() => onRowClick?.(row.original)}
149
+ >
150
+ {row.getVisibleCells().map((cell) => {
151
+ const style = (cell.column.columnDef.meta as
152
+ | { style?: CSSProperties }
153
+ | undefined)?.style
154
+ const alignClass =
155
+ style?.textAlign === 'right' ? 'text-right' : undefined
156
+ return (
157
+ <TableCell
158
+ key={cell.id}
159
+ className={alignClass}
160
+ style={{ width: style?.width }}
161
+ >
162
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
163
+ </TableCell>
164
+ )
165
+ })}
166
+ </TableRow>
167
+ )
168
+ })}
169
+ {paddingBottom > 0 && <tr style={{ height: paddingBottom }} />}
170
+ </>
171
+ );
172
+ };
173
+
174
+ return (
175
+ <div className="rounded-md border flex flex-col min-h-0 flex-1 overflow-x-hidden">
176
+ <div className="shrink-0">
177
+ <Table className="table-fixed">
178
+ <ColGroup columns={columns} />
179
+ <TableHeader>
180
+ {headerGroups.map((headerGroup) => (
181
+ <TableRow key={headerGroup.id}>
182
+ {headerGroup.headers.map((header) => {
183
+ const style = (
184
+ header.column.columnDef.meta as
185
+ | { style?: CSSProperties }
186
+ | undefined
187
+ )?.style
188
+ const alignClass =
189
+ style?.textAlign === 'right' ? 'text-right' : undefined
190
+ return (
191
+ <TableHead
192
+ key={header.id}
193
+ className={alignClass}
194
+ style={{ width: style?.width }}
195
+ >
196
+ {header.isPlaceholder
197
+ ? null
198
+ : flexRender(header.column.columnDef.header, header.getContext())}
199
+ </TableHead>
200
+ )
201
+ })}
202
+ </TableRow>
203
+ ))}
204
+ </TableHeader>
205
+ </Table>
206
+ </div>
207
+ <div ref={parentRef} className="overflow-y-auto flex-1 min-h-0">
208
+ <div style={{ position: "relative", height: shouldVirtualize ? totalHeight : undefined }}>
209
+ <Table className="table-fixed">
210
+ <ColGroup columns={columns} />
211
+ <TableBody>{renderRows()}</TableBody>
212
+ </Table>
213
+ </div>
214
+ </div>
215
+ {actions && <div className="shrink-0 border-t">{actions}</div>}
216
+ </div>
217
+ );
218
+ }
@@ -0,0 +1,97 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // AllBlue - 理想之海
3
+ // Copyright (C) 2026 AllBlue Contributors
4
+ //
5
+ // This program is free software: you can redistribute it and/or modify
6
+ // it under the terms of the GNU Affero General Public License as published by
7
+ // the Free Software Foundation, either version 3 of the License, or
8
+ // (at your option) any later version.
9
+ //
10
+ // This program is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU Affero General Public License for more details.
14
+ //
15
+ // You should have received a copy of the GNU Affero General Public License
16
+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ import { useNavigate } from "@tanstack/react-router";
19
+ import { Button } from "../ui/button";
20
+ import { Skeleton } from "../ui/skeleton";
21
+ import { ArrowLeftIcon } from "lucide-react";
22
+
23
+ interface TableDetailLayoutProps {
24
+ backHref: string;
25
+ // i18n 由消费方注入(包内不依赖 @/paraglide),原 admin 实现默认回退文案由调用方显式传入
26
+ backLabel: string;
27
+ title: string;
28
+ subtitle?: string;
29
+ avatar?: React.ReactNode;
30
+ badges?: React.ReactNode;
31
+ actions?: React.ReactNode;
32
+ loading?: boolean;
33
+ children: React.ReactNode;
34
+ }
35
+
36
+ export function TableDetailLayout({
37
+ backHref,
38
+ backLabel,
39
+ title,
40
+ subtitle,
41
+ avatar,
42
+ badges,
43
+ actions,
44
+ loading,
45
+ children,
46
+ }: TableDetailLayoutProps) {
47
+ const navigate = useNavigate();
48
+
49
+ if (loading) {
50
+ return (
51
+ <div className="p-6 space-y-6">
52
+ <Skeleton className="h-8 w-24" />
53
+ <div className="flex items-center gap-4">
54
+ <Skeleton className="h-12 w-12 rounded-full" />
55
+ <div className="space-y-2">
56
+ <Skeleton className="h-6 w-40" />
57
+ <Skeleton className="h-4 w-60" />
58
+ </div>
59
+ </div>
60
+ <Skeleton className="h-64 w-full" />
61
+ </div>
62
+ );
63
+ }
64
+
65
+ return (
66
+ <div>
67
+ <div className="sticky top-0 z-10 bg-background border-b px-6 py-2.5">
68
+ <Button
69
+ variant="ghost"
70
+ size="sm"
71
+ onClick={() => navigate({ to: backHref })}
72
+ className="gap-1.5 text-muted-foreground hover:text-foreground"
73
+ >
74
+ <ArrowLeftIcon className="h-4 w-4" />
75
+ {backLabel}
76
+ </Button>
77
+ </div>
78
+ <div className="p-6 pt-4 space-y-6">
79
+ <div className="flex items-start justify-between">
80
+ <div className="flex items-center gap-4">
81
+ {avatar}
82
+ <div>
83
+ <div className="flex items-center gap-2">
84
+ <h1 className="text-2xl font-bold">{title}</h1>
85
+ {badges}
86
+ </div>
87
+ {subtitle && <p className="text-muted-foreground mt-1">{subtitle}</p>}
88
+ </div>
89
+ </div>
90
+ {actions && <div className="flex gap-2">{actions}</div>}
91
+ </div>
92
+
93
+ {children}
94
+ </div>
95
+ </div>
96
+ );
97
+ }
@@ -21,14 +21,14 @@ import ReactMarkdown from "react-markdown"
21
21
  import remarkGfm from "remark-gfm"
22
22
  import { ExternalLink, FileText } from "lucide-react"
23
23
  import type { ThirdPartyDependencyRow } from "@allbluecn/kernel"
24
- import { Button } from "@allbluecn/ui/button"
24
+ import { Button } from "@/components/ui/button"
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogHeader,
29
29
  DialogTitle,
30
30
  DialogTrigger,
31
- } from "@allbluecn/ui/dialog"
31
+ } from "@/components/ui/dialog"
32
32
 
33
33
  export function ChangelogDialog({ row }: { row: ThirdPartyDependencyRow }) {
34
34
  const [open, setOpen] = useState(false)
@@ -29,9 +29,9 @@ import {
29
29
  type ThirdPartyDependencyRow,
30
30
  type VersionStatus,
31
31
  } from "@allbluecn/kernel"
32
- import { Badge } from "@allbluecn/ui/badge"
33
- import { Button } from "@allbluecn/ui/button"
34
- import { Tooltip, TooltipContent, TooltipTrigger } from "@allbluecn/ui/tooltip"
32
+ import { Badge } from "@/components/ui/badge"
33
+ import { Button } from "@/components/ui/button"
34
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
35
35
  import { cn } from "@/lib/utils"
36
36
  import { EditDependencyDialog } from "./edit-dialog"
37
37
  import { ChangelogDialog } from "./changelog-dialog"
@@ -22,7 +22,7 @@ import {
22
22
  useTable,
23
23
  type PaginationState,
24
24
  } from "@tanstack/react-table"
25
- import { toast } from '@allbluecn/ui/toast'
25
+ import { toast } from '@/components/ui/toast'
26
26
  import { RefreshCw, Search, TriangleAlert, Loader2 } from "lucide-react"
27
27
  import {
28
28
  DEPENDENCY_CATEGORIES,
@@ -31,10 +31,10 @@ import {
31
31
  type VersionStatus,
32
32
  } from "@allbluecn/kernel"
33
33
  import { syncAllDependenciesFn, syncDependencyFn } from "@/server/serverFns/dependency/sync"
34
- import { Badge } from "@allbluecn/ui/badge"
35
- import { Button } from "@allbluecn/ui/button"
36
- import { Input } from "@allbluecn/ui/input"
37
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@allbluecn/ui/select"
34
+ import { Badge } from "@/components/ui/badge"
35
+ import { Button } from "@/components/ui/button"
36
+ import { Input } from "@/components/ui/input"
37
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
38
38
  import {
39
39
  Table,
40
40
  TableBody,
@@ -42,7 +42,7 @@ import {
42
42
  TableHead,
43
43
  TableHeader,
44
44
  TableRow,
45
- } from "@allbluecn/ui/table"
45
+ } from "@/components/ui/table"
46
46
  import {
47
47
  Pagination,
48
48
  PaginationContent,
@@ -51,7 +51,7 @@ import {
51
51
  PaginationLink,
52
52
  PaginationNext,
53
53
  PaginationPrevious,
54
- } from "@allbluecn/ui/pagination"
54
+ } from "@/components/ui/pagination"
55
55
  import { cn } from "@/lib/utils"
56
56
  import { dependencyTableFeatures, getDependencyColumns } from "./columns"
57
57
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  import { useState } from "react"
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { toast } from '@allbluecn/ui/toast'
20
+ import { toast } from '@/components/ui/toast'
21
21
  import { Loader2, Pencil } from "lucide-react"
22
22
  import {
23
23
  DEPENDENCY_CATEGORIES,
@@ -26,13 +26,13 @@ import {
26
26
  type ThirdPartyDependencyRow,
27
27
  } from "@allbluecn/kernel"
28
28
  import { updateDependencyFn } from "@/server/serverFns/dependency/update"
29
- import { Button } from "@allbluecn/ui/button"
30
- import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@allbluecn/ui/dialog"
31
- import { Input } from "@allbluecn/ui/input"
32
- import { Label } from "@allbluecn/ui/label"
33
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@allbluecn/ui/select"
34
- import { Textarea } from "@allbluecn/ui/textarea"
35
- import { Tooltip, TooltipContent, TooltipTrigger } from "@allbluecn/ui/tooltip"
29
+ import { Button } from "@/components/ui/button"
30
+ import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
31
+ import { Input } from "@/components/ui/input"
32
+ import { Label } from "@/components/ui/label"
33
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
34
+ import { Textarea } from "@/components/ui/textarea"
35
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
36
36
 
37
37
  export function EditDependencyDialog({
38
38
  row,
@@ -19,15 +19,15 @@ import { useState } from "react"
19
19
  import type React from "react"
20
20
  import { m } from "@/paraglide/messages.js"
21
21
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
22
- import { toast } from "@allbluecn/ui/toast"
22
+ import { toast } from "@/components/ui/toast"
23
23
  import { Ticket, Plus, Copy, Ban, CheckCircle2, Trash2, Users } from "lucide-react"
24
24
  import { PageHeader } from "@/components/common/page-header"
25
- import { Button } from "@allbluecn/ui/button"
26
- import { Badge } from "@allbluecn/ui/badge"
27
- import { Input } from "@allbluecn/ui/input"
28
- import { Label } from "@allbluecn/ui/label"
29
- import { Switch } from "@allbluecn/ui/switch"
30
- import { Skeleton } from "@allbluecn/ui/skeleton"
25
+ import { Button } from "@/components/ui/button"
26
+ import { Badge } from "@/components/ui/badge"
27
+ import { Input } from "@/components/ui/input"
28
+ import { Label } from "@/components/ui/label"
29
+ import { Switch } from "@/components/ui/switch"
30
+ import { Skeleton } from "@/components/ui/skeleton"
31
31
  import {
32
32
  Dialog,
33
33
  DialogContent,
@@ -35,8 +35,8 @@ import {
35
35
  DialogFooter,
36
36
  DialogHeader,
37
37
  DialogTitle,
38
- } from "@allbluecn/ui/dialog"
39
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
38
+ } from "@/components/ui/dialog"
39
+ import { ConfirmDialog } from "@/components/confirm-dialog"
40
40
  import {
41
41
  Table,
42
42
  TableBody,
@@ -44,13 +44,13 @@ import {
44
44
  TableHead,
45
45
  TableHeader,
46
46
  TableRow,
47
- } from "@allbluecn/ui/table"
47
+ } from "@/components/ui/table"
48
48
  import {
49
49
  Tooltip,
50
50
  TooltipContent,
51
51
  TooltipTrigger,
52
- } from "@allbluecn/ui/tooltip"
53
- import { Card, CardContent } from "@allbluecn/ui/card"
52
+ } from "@/components/ui/tooltip"
53
+ import { Card, CardContent } from "@/components/ui/card"
54
54
  import {
55
55
  listInvitationCodesFn,
56
56
  createInvitationCodeFn,
@@ -59,7 +59,7 @@ import {
59
59
  getRegistrationModeFn,
60
60
  setRegistrationModeFn,
61
61
  } from "@/server/serverFns/invitations"
62
- import { formatTimestamp } from "@allbluecn/ui/lib/datetime"
62
+ import { formatTimestamp } from "@/lib/datetime"
63
63
 
64
64
  type RegistrationMode = "invite" | "open"
65
65
 
@@ -17,18 +17,18 @@
17
17
 
18
18
  import { useState, useEffect } from 'react'
19
19
  import { Loader2 } from 'lucide-react'
20
- import { toast } from '@allbluecn/ui/toast'
21
- import { Button } from '@allbluecn/ui/button'
22
- import { Input } from '@allbluecn/ui/input'
23
- import { Label } from '@allbluecn/ui/label'
24
- import { Textarea } from '@allbluecn/ui/textarea'
20
+ import { toast } from '@/components/ui/toast'
21
+ import { Button } from '@/components/ui/button'
22
+ import { Input } from '@/components/ui/input'
23
+ import { Label } from '@/components/ui/label'
24
+ import { Textarea } from '@/components/ui/textarea'
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogFooter,
29
29
  DialogHeader,
30
30
  DialogTitle,
31
- } from '@allbluecn/ui/dialog'
31
+ } from '@/components/ui/dialog'
32
32
  import { adminCreateBookmarkFn } from '@/server/serverFns/knowledge-public/bookmarks/create'
33
33
  import { adminUpdateBookmarkFn } from '@/server/serverFns/knowledge-public/bookmarks/update'
34
34
  import { adminGetBookmarkDetailFn } from '@/server/serverFns/knowledge-public/bookmarks/detail'
@@ -17,18 +17,18 @@
17
17
 
18
18
  import { useState, useEffect } from 'react'
19
19
  import { Loader2, PlusIcon, Trash2Icon } from 'lucide-react'
20
- import { toast } from '@allbluecn/ui/toast'
21
- import { Button } from '@allbluecn/ui/button'
22
- import { Input } from '@allbluecn/ui/input'
23
- import { Label } from '@allbluecn/ui/label'
24
- import { Textarea } from '@allbluecn/ui/textarea'
20
+ import { toast } from '@/components/ui/toast'
21
+ import { Button } from '@/components/ui/button'
22
+ import { Input } from '@/components/ui/input'
23
+ import { Label } from '@/components/ui/label'
24
+ import { Textarea } from '@/components/ui/textarea'
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogFooter,
29
29
  DialogHeader,
30
30
  DialogTitle,
31
- } from '@allbluecn/ui/dialog'
31
+ } from '@/components/ui/dialog'
32
32
  import { adminCreateComplianceFn } from '@/server/serverFns/knowledge-public/compliance/create'
33
33
  import { adminUpdateComplianceFn } from '@/server/serverFns/knowledge-public/compliance/update'
34
34
  import { adminGetComplianceDetailFn } from '@/server/serverFns/knowledge-public/compliance/detail'
@@ -18,25 +18,25 @@
18
18
  import { useState, useEffect } from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { Loader2 } from 'lucide-react'
21
- import { toast } from '@allbluecn/ui/toast'
22
- import { Button } from '@allbluecn/ui/button'
23
- import { Input } from '@allbluecn/ui/input'
24
- import { Label } from '@allbluecn/ui/label'
25
- import { Textarea } from '@allbluecn/ui/textarea'
21
+ import { toast } from '@/components/ui/toast'
22
+ import { Button } from '@/components/ui/button'
23
+ import { Input } from '@/components/ui/input'
24
+ import { Label } from '@/components/ui/label'
25
+ import { Textarea } from '@/components/ui/textarea'
26
26
  import {
27
27
  Select,
28
28
  SelectContent,
29
29
  SelectItem,
30
30
  SelectTrigger,
31
31
  SelectValue,
32
- } from '@allbluecn/ui/select'
32
+ } from '@/components/ui/select'
33
33
  import {
34
34
  Dialog,
35
35
  DialogContent,
36
36
  DialogFooter,
37
37
  DialogHeader,
38
38
  DialogTitle,
39
- } from '@allbluecn/ui/dialog'
39
+ } from '@/components/ui/dialog'
40
40
  import { adminCreateLegalFn } from '@/server/serverFns/knowledge-public/legal/create'
41
41
  import { adminUpdateLegalFn } from '@/server/serverFns/knowledge-public/legal/update'
42
42
  import { adminGetLegalDetailFn } from '@/server/serverFns/knowledge-public/legal/detail'
@@ -22,7 +22,7 @@ import {
22
22
  SidebarHeader,
23
23
  SidebarTrigger,
24
24
  useSidebar,
25
- } from "@allbluecn/ui/sidebar";
25
+ } from "@/components/ui/sidebar";
26
26
  import { cn } from "@/lib/utils";
27
27
  import { m } from '@/paraglide/messages.js'
28
28
  import { motion } from "motion/react";
@@ -16,7 +16,7 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  import type { ReactNode } from "react"
19
- import { SidebarInset, SidebarProvider } from "@allbluecn/ui/sidebar";
19
+ import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
20
20
  import { DashboardSidebar } from "@/components/layout/sidebar-02/app-sidebar";
21
21
 
22
22
  export default function Sidebar02({ children }: { children?: ReactNode }) {
@@ -19,7 +19,7 @@
19
19
  import {
20
20
  Collapsible,
21
21
  CollapsibleContent,
22
- } from "@allbluecn/ui/collapsible";
22
+ } from "@/components/ui/collapsible";
23
23
  import {
24
24
  SidebarMenu,
25
25
  SidebarMenuButton,
@@ -28,7 +28,7 @@ import {
28
28
  SidebarMenuSubButton,
29
29
  SidebarMenuItem as SidebarMenuSubItem,
30
30
  useSidebar,
31
- } from "@allbluecn/ui/sidebar";
31
+ } from "@/components/ui/sidebar";
32
32
  import { cn } from "@/lib/utils";
33
33
  import { ChevronDown, ChevronUp } from "lucide-react";
34
34
  import { Link } from "@tanstack/react-router";
@@ -16,8 +16,8 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { Avatar, AvatarFallback, AvatarImage } from "@allbluecn/ui/avatar";
20
- import { Button } from "@allbluecn/ui/button";
19
+ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
20
+ import { Button } from "@/components/ui/button";
21
21
  import {
22
22
  DropdownMenu,
23
23
  DropdownMenuContent,
@@ -25,7 +25,7 @@ import {
25
25
  DropdownMenuLabel,
26
26
  DropdownMenuSeparator,
27
27
  DropdownMenuTrigger,
28
- } from "@allbluecn/ui/dropdown-menu";
28
+ } from "@/components/ui/dropdown-menu";
29
29
  import { BellIcon } from "lucide-react";
30
30
 
31
31
  type Notification = {
@@ -15,17 +15,17 @@
15
15
  // You should have received a copy of the GNU Affero General Public License
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
- import type { AdminColumnDef } from "@allbluecn/ui/data-table";
18
+ import type { AdminColumnDef } from "@/components/data-table/data-table";
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Badge } from "@allbluecn/ui/badge"
21
- import { Button } from "@allbluecn/ui/button"
20
+ import { Badge } from "@/components/ui/badge"
21
+ import { Button } from "@/components/ui/button"
22
22
  import {
23
23
  DropdownMenu,
24
24
  DropdownMenuContent,
25
25
  DropdownMenuItem,
26
26
  DropdownMenuSeparator,
27
27
  DropdownMenuTrigger,
28
- } from "@allbluecn/ui/dropdown-menu"
28
+ } from "@/components/ui/dropdown-menu"
29
29
  import { MoreHorizontalIcon, PencilIcon, TrashIcon, EyeIcon, EyeOffIcon } from "lucide-react"
30
30
 
31
31
  export type MarketAppRow = {