dishui 0.0.84 → 0.0.89
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.
- package/dist/components/Input/index.js +52 -62
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/LayoutSuite/index.d.ts +10 -0
- package/dist/components/LayoutSuite/index.js +27 -18
- package/dist/components/LayoutSuite/index.js.map +1 -1
- package/dist/components/Markdown/markdownComponents.js +1 -0
- package/dist/components/Markdown/markdownComponents.js.map +1 -1
- package/dist/components/Markdown/useMarkdownSource.js +46 -31
- package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
- package/dist/components/Markdown/useMarkmapRenderer.js +44 -31
- package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
- package/dist/components/Markdown/useMermaidRenderer.js +49 -31
- package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
- package/dist/components/ProtectedRoute/index.d.ts +2 -1
- package/dist/components/ProtectedRoute/index.js +16 -6
- package/dist/components/ProtectedRoute/index.js.map +1 -1
- package/dist/components/Select/index.d.ts +6 -0
- package/dist/components/Select/index.js +166 -136
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +12 -1
- package/dist/components/Tabs/index.js +42 -17
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/pro/ArticleContextMenu/index.js +7 -7
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js +200 -189
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/types.d.ts +3 -0
- package/dist/components/pro/DataTable/DataTable.d.ts +1 -1
- package/dist/components/pro/DataTable/DataTable.js +98 -240
- package/dist/components/pro/DataTable/DataTable.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableBody.js +14 -16
- package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
- package/dist/components/pro/DataTable/components/TablePagination.d.ts +3 -9
- package/dist/components/pro/DataTable/components/TablePagination.js +29 -25
- package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
- package/dist/components/pro/DataTable/tanstack-table.d.ts +2 -2
- package/dist/components/pro/DataTable/tanstack-table.js +29 -21
- package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
- package/dist/components/pro/DataTable/treeDataUtils.d.ts +2 -0
- package/dist/components/pro/DataTable/treeDataUtils.js +18 -19
- package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
- package/dist/components/pro/DataTable/types.d.ts +24 -0
- package/dist/components/pro/DataTable/useDataTableModel.d.ts +16 -0
- package/dist/components/pro/DataTable/useDataTableModel.js +148 -0
- package/dist/components/pro/DataTable/useDataTableModel.js.map +1 -0
- package/dist/components/pro/FileExplorer/Breadcrumb.js +12 -12
- package/dist/components/pro/Flow/nodes/DataNodeView.js +87 -82
- package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/Model3DView.js +69 -63
- package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.d.ts +14 -0
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.js +76 -0
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.js.map +1 -0
- package/dist/components/pro/Flow/nodes/demandRender.d.ts +11 -0
- package/dist/components/pro/Flow/nodes/demandRender.js +26 -0
- package/dist/components/pro/Flow/nodes/demandRender.js.map +1 -0
- package/dist/components/pro/RichTextEditor/SlashMenu.js +68 -58
- package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
- package/dist/contexts/AppContext.d.ts +1 -0
- package/dist/contexts/AppContext.js +144 -145
- package/dist/contexts/AppContext.js.map +1 -1
- package/dist/contexts/authentication.d.ts +7 -0
- package/dist/contexts/authentication.js +22 -0
- package/dist/contexts/authentication.js.map +1 -0
- package/dist/dishui.css +1 -1
- package/dist/hooks/useControllableState.d.ts +6 -14
- package/dist/hooks/useControllableState.js +21 -15
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useTableColumns.d.ts +3 -3
- package/dist/hooks/useTableColumns.js +2 -2
- package/dist/hooks/useTableColumns.js.map +1 -1
- package/dist/hooks/useTableData.d.ts +11 -4
- package/dist/hooks/useTableData.js +44 -26
- package/dist/hooks/useTableData.js.map +1 -1
- package/dist/index-nostyled.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +97 -97
- package/dist/utils/i18n.js +1 -1
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/routerBuilder.d.ts +7 -5
- package/dist/utils/routerBuilder.js +11 -15
- package/dist/utils/routerBuilder.js.map +1 -1
- package/dist/utils/safeStorage.d.ts +8 -0
- package/dist/utils/safeStorage.js +45 -0
- package/dist/utils/safeStorage.js.map +1 -0
- package/package.json +22 -5
package/dist/index.js
CHANGED
|
@@ -31,100 +31,100 @@ import { DesktopSidebarToggleButton as L, MobileSidebarToggleButton as R, Sideba
|
|
|
31
31
|
import B from "./layouts/Sidebar.js";
|
|
32
32
|
import V, { Container as H, Flex as U, Grid as W, GridItem as G, Group as K, Space as q } from "./components/Layout/index.js";
|
|
33
33
|
import { DashboardSuite as J } from "./components/LayoutSuite/DashboardSuite.js";
|
|
34
|
-
import { AdminSuite as Y, BlankSuite as X, BlogSuite as Z, LayoutSuite as Q, WikiSuite as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import { getThemes as
|
|
54
|
-
import
|
|
55
|
-
import { AppLayoutWrapper as
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import { defineExtension as
|
|
59
|
-
import { computePivot as
|
|
60
|
-
import { PivotView as
|
|
61
|
-
import { PivotPanel as
|
|
62
|
-
import { usePivotExtension as
|
|
63
|
-
import { useRowDetailExtension as
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import { getDefaultSnippets as
|
|
71
|
-
import { jsJumpableKeywords as
|
|
72
|
-
import { pyJumpableKeywords as
|
|
73
|
-
import { getJumpableKeywords as
|
|
74
|
-
import { bracketMatchingStyle as
|
|
75
|
-
import { createThemeExtension as
|
|
76
|
-
import { collectVariables as
|
|
77
|
-
import { defaultContextMenu as
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import { ProtectedRoute as
|
|
87
|
-
import { buildRouter as
|
|
88
|
-
import { DropZone as
|
|
89
|
-
import { FileItem as
|
|
90
|
-
import { UploadQueue as
|
|
91
|
-
import { FileUploader as
|
|
92
|
-
import { FileIcon as
|
|
93
|
-
import { Breadcrumb as
|
|
94
|
-
import { Toolbar as
|
|
95
|
-
import { ListView as
|
|
96
|
-
import { GridView as
|
|
97
|
-
import { CreateDialog as
|
|
98
|
-
import { FileExplorer as
|
|
99
|
-
import { defaultLabels as
|
|
100
|
-
import { MarkdownBlockExtension as
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import { CodeBlockExtension as
|
|
104
|
-
import
|
|
105
|
-
import { BORDER_STYLE_OPTIONS as
|
|
106
|
-
import { FlowProvider as
|
|
107
|
-
import { FlowUIProvider as
|
|
108
|
-
import { downloadDataURL as
|
|
109
|
-
import { useLayoutActions as
|
|
110
|
-
import
|
|
111
|
-
import
|
|
112
|
-
import { FLOW_NODE_TYPES as
|
|
113
|
-
import
|
|
114
|
-
import
|
|
115
|
-
import
|
|
116
|
-
import { useClipboard as
|
|
117
|
-
import
|
|
118
|
-
import { useNodeMutations as
|
|
119
|
-
import { useEdgeMutations as
|
|
120
|
-
import { useLineMutations as
|
|
121
|
-
import { useSelection as
|
|
122
|
-
import { DEFAULT_CATEGORY_CONFIG as
|
|
123
|
-
import { useGanttState as
|
|
124
|
-
import { useGanttDrag as
|
|
125
|
-
import
|
|
126
|
-
import { DEFAULT_COLOR_OPTIONS as
|
|
127
|
-
import { useCalendarState as
|
|
128
|
-
import { useCalendarDrag as
|
|
129
|
-
import
|
|
130
|
-
export {
|
|
34
|
+
import { AdminSuite as Y, BlankSuite as X, BlogSuite as Z, LayoutSuite as Q, MailSuite as $, WikiSuite as ee } from "./components/LayoutSuite/index.js";
|
|
35
|
+
import te from "./components/EmptyState/index.js";
|
|
36
|
+
import ne from "./components/Avatar/index.js";
|
|
37
|
+
import re from "./components/Accordion/index.js";
|
|
38
|
+
import ie from "./components/Modal/index.js";
|
|
39
|
+
import ae from "./components/Tabs/index.js";
|
|
40
|
+
import oe from "./components/List/index.js";
|
|
41
|
+
import se from "./components/Row/index.js";
|
|
42
|
+
import ce from "./components/Column/index.js";
|
|
43
|
+
import le from "./components/Image/index.js";
|
|
44
|
+
import ue from "./components/Icon/index.js";
|
|
45
|
+
import de from "./components/Slider/index.js";
|
|
46
|
+
import fe from "./components/DateTimeInput/index.js";
|
|
47
|
+
import pe from "./components/MultipleChoice/index.js";
|
|
48
|
+
import me from "./components/ChoicePicker/index.js";
|
|
49
|
+
import he from "./layouts/headbar/Headbar.js";
|
|
50
|
+
import ge from "./layouts/headbar/HeadbarTitle.js";
|
|
51
|
+
import _e from "./layouts/headbar/HeadbarSearch.js";
|
|
52
|
+
import ve from "./layouts/headbar/HeadbarLangSwitcher.js";
|
|
53
|
+
import { getThemes as ye } from "./utils/themes.js";
|
|
54
|
+
import be from "./layouts/headbar/HeadbarThemeSwitcher.js";
|
|
55
|
+
import { AppLayoutWrapper as xe, AppProvider as Se, AppShell as Ce, useAppContext as we, useAuth as Te } from "./contexts/AppContext.js";
|
|
56
|
+
import Ee from "./hooks/useTableColumns.js";
|
|
57
|
+
import De from "./hooks/useTableData.js";
|
|
58
|
+
import { defineExtension as Oe } from "./components/pro/DataTable/extension.js";
|
|
59
|
+
import { computePivot as ke } from "./components/pro/DataTable/pivotEngine.js";
|
|
60
|
+
import { PivotView as Ae } from "./components/pro/DataTable/PivotView.js";
|
|
61
|
+
import { PivotPanel as je } from "./components/pro/DataTable/PivotPanel.js";
|
|
62
|
+
import { usePivotExtension as Me } from "./components/pro/DataTable/pivotExtension.js";
|
|
63
|
+
import { useRowDetailExtension as Ne } from "./components/pro/DataTable/rowDetailExtension.js";
|
|
64
|
+
import Pe, { createActionColumn as Fe, createColumn as Ie, createComputedColumn as Le, createSelectOptions as Re, createSelectionColumn as ze, dateSort as Be, defaultFilterFunctions as Ve, extractUniqueOptions as He, numericSort as Ue, stringSort as We, treeSort as Ge } from "./data-table.js";
|
|
65
|
+
import Ke from "./components/Chart/Chart.js";
|
|
66
|
+
import qe from "./components/Demo/index.js";
|
|
67
|
+
import Je from "./components/pro/ArticleControl/ArticleControl2.js";
|
|
68
|
+
import Ye from "./components/pro/ArticleContextMenu/index.js";
|
|
69
|
+
import Xe from "./components/Markdown/Markdown.js";
|
|
70
|
+
import { getDefaultSnippets as Ze, javascriptSnippets as Qe, pythonSnippets as $e } from "./components/pro/CodeEditor/langs/snippets.js";
|
|
71
|
+
import { jsJumpableKeywords as et, jsKeywords as tt } from "./components/pro/CodeEditor/langs/javascript.js";
|
|
72
|
+
import { pyJumpableKeywords as nt, pyKeywords as rt } from "./components/pro/CodeEditor/langs/python.js";
|
|
73
|
+
import { getJumpableKeywords as it, getLanguageKeywords as at } from "./components/pro/CodeEditor/langs/index.js";
|
|
74
|
+
import { bracketMatchingStyle as ot, jumpTargetHighlight as st, jumpToDefinition as ct, lineHighlightStyle as lt, smartAutocompletion as ut } from "./components/pro/CodeEditor/extensions/index.js";
|
|
75
|
+
import { createThemeExtension as dt } from "./components/pro/CodeEditor/themes.js";
|
|
76
|
+
import { collectVariables as ft, generateOutline as pt } from "./components/pro/CodeEditor/utils.js";
|
|
77
|
+
import { defaultContextMenu as mt } from "./components/pro/CodeEditor/extensions/contextMenu.js";
|
|
78
|
+
import ht from "./components/pro/CodeEditor/editors/CodeEditor.js";
|
|
79
|
+
import gt from "./components/pro/CodeEditor/panels/TableOfContentsPanel.js";
|
|
80
|
+
import _t from "./components/pro/CodeEditor/panels/FootnotePanel.js";
|
|
81
|
+
import vt from "./components/pro/CodeEditor/editors/MarkdownEditor.js";
|
|
82
|
+
import yt from "./components/pro/CodeEditor/panels/OutlinePanel.js";
|
|
83
|
+
import bt from "./components/pro/CodeEditor/panels/VariablePanel.js";
|
|
84
|
+
import xt from "./layouts/MainLayout.js";
|
|
85
|
+
import St from "./layouts/Navbar.js";
|
|
86
|
+
import { ProtectedRoute as Ct } from "./components/ProtectedRoute/index.js";
|
|
87
|
+
import { buildRouter as wt, createRouterFromConfig as Tt } from "./utils/routerBuilder.js";
|
|
88
|
+
import { DropZone as Et, formatFileSize as Dt } from "./components/FileUploader/DropZone.js";
|
|
89
|
+
import { FileItem as Ot } from "./components/FileUploader/FileItem.js";
|
|
90
|
+
import { UploadQueue as kt } from "./components/FileUploader/UploadQueue.js";
|
|
91
|
+
import { FileUploader as At } from "./components/FileUploader/FileUploader.js";
|
|
92
|
+
import { FileIcon as jt } from "./components/pro/FileExplorer/FileIcon.js";
|
|
93
|
+
import { Breadcrumb as Mt } from "./components/pro/FileExplorer/Breadcrumb.js";
|
|
94
|
+
import { Toolbar as Nt } from "./components/pro/FileExplorer/Toolbar.js";
|
|
95
|
+
import { ListView as Pt } from "./components/pro/FileExplorer/ListView.js";
|
|
96
|
+
import { GridView as Ft } from "./components/pro/FileExplorer/GridView.js";
|
|
97
|
+
import { CreateDialog as It } from "./components/pro/FileExplorer/CreateDialog.js";
|
|
98
|
+
import { FileExplorer as Lt } from "./components/pro/FileExplorer/FileExplorer.js";
|
|
99
|
+
import { defaultLabels as Rt } from "./components/pro/RichTextEditor/types.js";
|
|
100
|
+
import { MarkdownBlockExtension as zt } from "./components/pro/RichTextEditor/extensions/MarkdownBlock.js";
|
|
101
|
+
import Bt from "./components/pro/RichTextEditor/Toolbar/Toolbar.js";
|
|
102
|
+
import Vt from "./components/pro/RichTextEditor/AIRewrite.js";
|
|
103
|
+
import { CodeBlockExtension as Ht } from "./components/pro/RichTextEditor/extensions/CodeBlockView.js";
|
|
104
|
+
import Ut from "./components/pro/RichTextEditor/RichTextEditor.js";
|
|
105
|
+
import { BORDER_STYLE_OPTIONS as Wt, DASH_DENSITY_OPTIONS as Gt, DEFAULT_EDGE_DATA as Kt, DEFAULT_NODE_DATA as qt, EDGE_LINE_STYLE_OPTIONS as Jt, EDGE_MARKER_OPTIONS as Yt, EDGE_TYPE_OPTIONS as Xt, GRADIENT_DIRECTION_OPTIONS as Zt, PALETTE_ITEMS as Qt, ROOT_CANVAS_ID as $t, createEmptyDocument as en } from "./components/pro/Flow/constants.js";
|
|
106
|
+
import { FlowProvider as tn, useFlowContext as nn } from "./components/pro/Flow/context/FlowContext.js";
|
|
107
|
+
import { FlowUIProvider as rn, useFlowUI as an } from "./components/pro/Flow/context/FlowUIContext.js";
|
|
108
|
+
import { downloadDataURL as on, exportCanvasToPNG as sn, useFlowImportExport as cn } from "./components/pro/Flow/hooks/useFlowImportExport.js";
|
|
109
|
+
import { useLayoutActions as ln } from "./components/pro/Flow/hooks/useLayoutActions.js";
|
|
110
|
+
import un from "./components/pro/Flow/panels/FlowToolbar.js";
|
|
111
|
+
import dn from "./components/pro/Flow/panels/ShapePalette.js";
|
|
112
|
+
import { FLOW_NODE_TYPES as fn } from "./components/pro/Flow/types.js";
|
|
113
|
+
import pn from "./components/pro/Flow/panels/InspectorPanel.js";
|
|
114
|
+
import mn from "./components/pro/Flow/panels/OutlinePanel.js";
|
|
115
|
+
import hn from "./components/pro/Flow/panels/ContextMenu.js";
|
|
116
|
+
import { useClipboard as gn } from "./components/pro/Flow/hooks/useClipboard.js";
|
|
117
|
+
import _n from "./components/pro/Flow/Flow.js";
|
|
118
|
+
import { useNodeMutations as vn } from "./components/pro/Flow/hooks/useNodeMutations.js";
|
|
119
|
+
import { useEdgeMutations as yn } from "./components/pro/Flow/hooks/useEdgeMutations.js";
|
|
120
|
+
import { useLineMutations as bn } from "./components/pro/Flow/hooks/useLineMutations.js";
|
|
121
|
+
import { useSelection as xn } from "./components/pro/Flow/hooks/useSelection.js";
|
|
122
|
+
import { DEFAULT_CATEGORY_CONFIG as Sn, DEFAULT_SCALE_CONFIGS as Cn, DEFAULT_TIME_WINDOW as wn, addDays as Tn, addWorkingDays as En, calculateWorkingDays as Dn, computeDateRange as On, dateToX as kn, daysBetween as An, flattenTree as jn, formatDate as Mn, generateDateRange as Nn, generateHeaderGroups as Pn, getISOWeekNumber as Fn, getISOWeekYear as In, isNonWorkingDay as Ln, isWeekend as Rn, parseDate as zn, startOfDay as Bn, xToDate as Vn } from "./components/pro/Gantt/utils.js";
|
|
123
|
+
import { useGanttState as Hn } from "./components/pro/Gantt/hooks/useGanttState.js";
|
|
124
|
+
import { useGanttDrag as Un } from "./components/pro/Gantt/hooks/useGanttDrag.js";
|
|
125
|
+
import Wn from "./components/pro/Gantt/Gantt.js";
|
|
126
|
+
import { DEFAULT_COLOR_OPTIONS as Gn, LABELS_EN as Kn, LABELS_ZH as qn, SLOT_HEIGHT as Jn, TIME_GRID_HEIGHT as Yn, TIME_SLOTS as Xn, addDays as Zn, clamp as Qn, formatDate as $n, formatTime as er, generateId as tr, generateTimeSlots as nr, getDaysInMonth as rr, getFirstDayOfMonth as ir, getHolidayEntry as ar, getMonthDates as or, getWeekDates as sr, isHoliday as cr, isNonWorkingDay as lr, isSameDay as ur, isToday as dr, isWeekend as fr, minutesToTime as pr, parseDate as mr, parseTime as hr, timeToMinutes as gr, todayStr as _r } from "./components/pro/Calendar/utils.js";
|
|
127
|
+
import { useCalendarState as vr } from "./components/pro/Calendar/hooks/useCalendarState.js";
|
|
128
|
+
import { useCalendarDrag as yr } from "./components/pro/Calendar/hooks/useCalendarDrag.js";
|
|
129
|
+
import br from "./components/pro/Calendar/Calendar.js";
|
|
130
|
+
export { Vt as AIRewrite, re as Accordion, Y as AdminSuite, xe as AppLayoutWrapper, Se as AppProvider, Ce as AppShell, Ye as ArticleContextMenu, Je as ArticleControl, ne as Avatar, Wt as BORDER_STYLE_OPTIONS, m as Badge, X as BlankSuite, Z as BlogSuite, Mt as Breadcrumb, a as Button, p as ButtonMenu, Gn as CALENDAR_DEFAULT_COLOR_OPTIONS, Kn as CALENDAR_LABELS_EN, qn as CALENDAR_LABELS_ZH, Jn as CALENDAR_SLOT_HEIGHT, Yn as CALENDAR_TIME_GRID_HEIGHT, Xn as CALENDAR_TIME_SLOTS, br as Calendar, w as Card, Ke as Chart, y as Checkbox, me as ChoicePicker, Ht as CodeBlockExtension, ht as CodeEditor, ce as Column, H as Container, It as CreateDialog, Gt as DASH_DENSITY_OPTIONS, Sn as DEFAULT_CATEGORY_CONFIG, Kt as DEFAULT_EDGE_DATA, qt as DEFAULT_NODE_DATA, Cn as DEFAULT_SCALE_CONFIGS, wn as DEFAULT_TIME_WINDOW, J as DashboardSuite, Pe as DataTable, fe as DateTimeInput, qe as Demo, L as DesktopSidebarToggleButton, S as Divider, Et as DropZone, Jt as EDGE_LINE_STYLE_OPTIONS, Yt as EDGE_MARKER_OPTIONS, Xt as EDGE_TYPE_OPTIONS, te as EmptyState, fn as FLOW_NODE_TYPES, g as Field, Lt as FileExplorer, Nt as FileExplorerToolbar, jt as FileIcon, At as FileUploader, U as Flex, _n as Flow, hn as FlowContextMenu, pn as FlowInspectorPanel, mn as FlowOutlinePanel, tn as FlowProvider, dn as FlowShapePalette, un as FlowToolbar, rn as FlowUIProvider, _t as FootnotePanel, Zt as GRADIENT_DIRECTION_OPTIONS, Wn as Gantt, W as Grid, G as GridItem, Ft as GridView, K as Group, o as GroupButton, l as GroupedTable, he as Headbar, ve as HeadbarLangSwitcher, _e as HeadbarSearch, be as HeadbarThemeSwitcher, ge as HeadbarTitle, ue as Icon, le as Image, h as Input, v as Label, V as Layout, Q as LayoutSuite, oe as List, Pt as ListView, $ as MailSuite, xt as MainLayout, Xe as Markdown, zt as MarkdownBlockExtension, vt as MarkdownEditor, R as MobileSidebarToggleButton, ie as Modal, pe as MultipleChoice, St as Navbar, u as NavigationList, yt as OutlinePanel, Qt as PALETTE_ITEMS, D as Page, O as PageBody, E as PageFloat, k as PageFooter, T as PageHeader, A as PageLeft, j as PageMain, M as PageRight, je as PivotPanel, Ae as PivotView, Ct as ProtectedRoute, $t as ROOT_CANVAS_ID, t as Resizable, n as ResizableHandle, r as ResizablePanel, Ut as RichTextEditor, Bt as RichTextToolbar, se as Row, d as Section, C as Select, B as Sidebar, z as SidebarToggleButtons, c as Skeleton, de as Slider, q as Space, b as Switch, s as Table, gt as TableOfContentsPanel, ae as Tabs, f as Text, _ as Textarea, x as Tooltip, I as Tree, Ot as UploadFileItem, kt as UploadQueue, bt as VariablePanel, ee as WikiSuite, Zn as addCalendarDays, Tn as addGanttDays, En as addWorkingDays, ot as bracketMatchingStyle, wt as buildRouter, Dn as calculateWorkingDays, Qn as calendarClamp, pr as calendarMinutesToTime, gr as calendarTimeToMinutes, _r as calendarTodayStr, i as cn, ft as collectVariables, On as computeDateRange, ke as computePivot, Fe as createActionColumn, Ie as createColumn, Le as createComputedColumn, en as createEmptyDocument, Tt as createRouterFromConfig, Re as createSelectOptions, ze as createSelectionColumn, dt as createThemeExtension, Be as dateSort, An as daysBetween, mt as defaultContextMenu, Ve as defaultFilterFunctions, Oe as defineExtension, on as downloadDataURL, sn as exportCanvasToPNG, He as extractUniqueOptions, jn as flattenGanttTree, $n as formatCalendarDate, er as formatCalendarTime, Dt as formatFileSize, Mn as formatGanttDate, kn as ganttDateToX, Vn as ganttXToDate, tr as generateCalendarId, nr as generateCalendarTimeSlots, Nn as generateDateRange, Pn as generateHeaderGroups, pt as generateOutline, N as generateSidebarActiveStyles, P as generateTreeActiveStyles, rr as getCalendarDaysInMonth, ir as getCalendarFirstDayOfMonth, ar as getCalendarHolidayEntry, or as getCalendarMonthDates, sr as getCalendarWeekDates, Ze as getDefaultSnippets, Fn as getISOWeekNumber, In as getISOWeekYear, it as getJumpableKeywords, at as getLanguageKeywords, ye as getThemes, cr as isCalendarHoliday, lr as isCalendarNonWorkingDay, ur as isCalendarSameDay, dr as isCalendarToday, fr as isCalendarWeekend, Ln as isGanttNonWorkingDay, Rn as isGanttWeekend, Qe as javascriptSnippets, et as jsJumpableKeywords, tt as jsKeywords, st as jumpTargetHighlight, ct as jumpToDefinition, lt as lineHighlightStyle, Ue as numericSort, mr as parseCalendarDate, hr as parseCalendarTime, zn as parseGanttDate, nt as pyJumpableKeywords, rt as pyKeywords, $e as pythonSnippets, Rt as richTextDefaultLabels, ut as smartAutocompletion, Bn as startOfGanttDay, We as stringSort, F as themeActiveStyles, Ge as treeSort, we as useAppContext, Te as useAuth, yr as useCalendarDrag, vr as useCalendarState, yn as useEdgeMutations, gn as useFlowClipboard, nn as useFlowContext, cn as useFlowImportExport, xn as useFlowSelection, an as useFlowUI, Un as useGanttDrag, Hn as useGanttState, ln as useLayoutActions, bn as useLineMutations, vn as useNodeMutations, Me as usePivotExtension, e as useResize, Ne as useRowDetailExtension, Ee as useTableColumns, De as useTableData };
|
package/dist/utils/i18n.js
CHANGED
package/dist/utils/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":[],"sources":["../../src/utils/i18n.tsx"],"sourcesContent":["// 导入类型\nimport { MenuItem } from '../types/menu';\n\n// 定义语言类型\nexport type Language = 'zh' | 'en';\n\n// 定义翻译类型\nexport type Translations = {\n navbar: {\n search: string;\n searchPlaceholder: string;\n searchShortcut: string;\n noResults: string;\n };\n sidebar: {\n menu: {\n home: MenuItem;\n components: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n layouts: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n advanced: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n charts: MenuItem;\n showcase: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n };\n };\n};\n\n// 中文翻译\nexport const zhTranslations: Translations = {\n navbar: {\n search: '搜索组件',\n searchPlaceholder: '搜索组件、文档、示例...',\n searchShortcut: 'Cmd+K',\n noResults: '没有找到匹配的结果',\n },\n sidebar: {\n menu: {\n home: {\n id: 'home',\n label: '主页',\n path: '/',\n },\n components: {\n id: 'components',\n label: '组件',\n children: {\n button: {\n id: 'button',\n label: '按钮',\n path: '/components/button',\n },\n badge: {\n id: 'badge',\n label: '徽章',\n path: '/components/badge',\n },\n groupbutton: {\n id: 'groupbutton',\n label: '选择按钮组',\n path: '/components/group-button',\n },\n cardinfo: {\n id: 'cardinfo',\n label: '信息卡',\n path: '/components/card/info',\n },\n cardstat: {\n id: 'cardstat',\n label: '统计卡',\n path: '/components/card/stat',\n },\n cardmetric: {\n id: 'cardmetric',\n label: '指标卡',\n path: '/components/card-metric',\n },\n groupedtable: {\n id: 'groupedtable',\n label: '分组表格',\n path: '/components/grouped-table',\n },\n navigationlist: {\n id: 'navigationlist',\n label: '导航列表',\n path: '/components/navigation-list',\n },\n skeleton: {\n id: 'skeleton',\n label: '骨架',\n path: '/components/skeleton',\n },\n input: {\n id: 'input',\n label: '输入框',\n path: '/components/input',\n },\n label: {\n id: 'label',\n label: '标签',\n path: '/components/label',\n },\n checkbox: {\n id: 'checkbox',\n label: '复选框',\n path: '/components/checkbox',\n },\n select: {\n id: 'select',\n label: '选择器',\n path: '/components/select',\n },\n card: {\n id: 'card',\n label: '卡片',\n path: '/components/card',\n },\n avatar: {\n id: 'avatar',\n label: '头像',\n path: '/components/avatar',\n },\n accordion: {\n id: 'accordion',\n label: '手风琴',\n path: '/components/accordion',\n },\n emptystate: {\n id: 'emptystate',\n label: '空状态',\n path: '/components/emptystate',\n },\n modal: {\n id: 'modal',\n label: '模态框',\n path: '/components/modal',\n },\n tabs: {\n id: 'tabs',\n label: '标签页',\n path: '/components/tabs',\n },\n list: {\n id: 'list',\n label: '列表',\n path: '/components/list',\n },\n table: {\n id: 'table',\n label: '表格',\n path: '/components/table',\n },\n markdown: {\n id: 'markdown',\n label: 'Markdown文档',\n path: '/components/markdown',\n },\n tree: {\n id: 'tree',\n label: '树形控件',\n path: '/components/tree',\n },\n fileuploader: {\n id: 'fileuploader',\n label: '文件上传',\n path: '/components/fileuploader',\n },\n text: {\n id: 'text',\n label: '文本',\n path: '/components/text',\n },\n image: {\n id: 'image',\n label: '图片',\n path: '/components/image',\n },\n icon: {\n id: 'icon',\n label: '图标',\n path: '/components/icon',\n },\n slider: {\n id: 'slider',\n label: '滑块',\n path: '/components/slider',\n },\n datetimeinput: {\n id: 'datetimeinput',\n label: '日期时间',\n path: '/components/datetime-input',\n },\n multiplechoice: {\n id: 'multiplechoice',\n label: '多选组',\n path: '/components/multiple-choice',\n },\n choicepicker: {\n id: 'choicepicker',\n label: '单选组',\n path: '/components/choice-picker',\n },\n },\n },\n layouts: {\n id: 'layouts',\n label: '布局',\n children: {\n layout: { id: 'layout', label: '布局总览', path: '/layouts/layout' },\n resizable: { id: 'resizable', label: '可调节布局', path: '/layouts/resizable' },\n container: { id: 'container', label: '容器', path: '/layouts/container' },\n grid: { id: 'grid', label: '栅格', path: '/layouts/grid' },\n flex: { id: 'flex', label: '弹性布局', path: '/layouts/flex' },\n group: { id: 'group', label: '布局组', path: '/layouts/group' },\n space: { id: 'space', label: '占位', path: '/layouts/space' },\n page: { id: 'page', label: '页面布局', path: '/layouts/page' },\n row: { id: 'row', label: '行布局', path: '/layouts/row' },\n column: { id: 'column', label: '列布局', path: '/layouts/column' },\n },\n },\n charts: {\n id: 'charts',\n label: '图表',\n path: '/components/chart',\n children: [\n { id: 'chart-line', label: '折线图', path: '/components/chart/line' },\n { id: 'chart-area', label: '面积图', path: '/components/chart/area' },\n { id: 'chart-bar', label: '柱状图', path: '/components/chart/bar' },\n { id: 'chart-pie', label: '饼图', path: '/components/chart/pie' },\n { id: 'chart-scatter', label: '散点图', path: '/components/chart/scatter' },\n { id: 'chart-combo', label: '组合图', path: '/components/chart/complex/combo' },\n { id: 'chart-stacked', label: '堆叠面积图', path: '/components/chart/complex/stacked' },\n { id: 'chart-heatmap', label: '热力图', path: '/components/chart/complex/heatmap' },\n { id: 'chart-regression', label: '回归分析', path: '/components/chart/complex/regression' },\n { id: 'chart-radar', label: '雷达图', path: '/components/chart/special/radar' },\n { id: 'chart-sankey', label: '桑基图', path: '/components/chart/special/sankey' },\n { id: 'chart-network', label: '网络图', path: '/components/chart/special/network' },\n { id: 'chart-calendar', label: '日历热力图', path: '/components/chart/special/calendar' },\n { id: 'chart-stacked-pie', label: '堆叠饼图', path: '/components/chart/special/stacked-pie' },\n { id: 'chart-funnel', label: '销售漏斗图', path: '/components/chart/special/funnel' },\n { id: 'chart-treemap', label: '矩形树图', path: '/components/chart/special/treemap' },\n { id: 'chart-globe', label: '地球', path: '/components/chart/special/globe' },\n { id: 'chart-world-map', label: '世界地图', path: '/components/chart/special/world-map' },\n ],\n },\n advanced: {\n id: 'advanced-components',\n label: '高级组件',\n children: {\n datatable: {\n id: 'datatable',\n label: '数据表格',\n path: '/components/datatable',\n },\n datatableAdvanced: {\n id: 'datatableadvanced',\n label: '高级表格',\n path: '/components/datatable/advanced',\n },\n datatableAdvancedTree: {\n id: 'datatableadvancedtree',\n label: '高级树形表格',\n path: '/components/datatable/advancedTreeTable',\n },\n datatableHooks: {\n id: 'datatablehooks',\n label: '钩子简化示例',\n path: '/components/datatable/hooks',\n },\n datatablePivot: {\n id: 'datatablepivot',\n label: '透视与扩展',\n path: '/components/datatable/pivot',\n },\n\n jukebox: {\n id: 'jukebox',\n label: '音乐播放器',\n path: '/components/jukebox',\n },\n articlecontrol: {\n id: 'articlecontrol',\n label: '文档悬浮控件',\n path: '/components/articlecontrol',\n },\n codeeditor: {\n id: 'codeeditor',\n label: '代码编辑器',\n path: '/components/codeeditor',\n },\n markdowneditor: {\n id: 'markdowneditor',\n label: '文档编辑器',\n path: '/components/markdowneditor',\n },\n sidebar: {\n id: 'sidebar-demo',\n label: '侧边栏',\n path: '/components/sidebar',\n },\n fileexplorer: {\n id: 'fileexplorer',\n label: '文件浏览器',\n path: '/components/fileexplorer',\n },\n richtexteditor: {\n id: 'richtexteditor',\n label: '富文本编辑器',\n path: '/components/richtexteditor',\n },\n richtexteditorMobile: {\n id: 'richtexteditor-mobile',\n label: '富文本编辑器移动端示例',\n path: '/components/richtexteditor/mobile',\n },\n flow: {\n id: 'flow',\n label: 'Flowchart',\n path: '/components/flow',\n },\n flowUsage: {\n id: 'flow-usage',\n label: '流程图使用示例',\n path: '/components/flow/usage',\n },\n flowMobile: {\n id: 'flow-mobile',\n label: '流程图移动端示例',\n path: '/components/flow/mobile',\n },\n gantt: {\n id: 'gantt',\n label: '甘特图',\n path: '/components/gantt',\n },\n ganttScenarios: {\n id: 'gantt-scenarios',\n label: '甘特图场景示例',\n path: '/components/gantt/scenarios',\n },\n calendar: {\n id: 'calendar',\n label: '日历',\n path: '/components/calendar',\n },\n calendarScenarios: {\n id: 'calendar-scenarios',\n label: '日历场景示例',\n path: '/components/calendar/scenarios',\n },\n },\n },\n showcase: {\n id: 'showcase',\n label: '案例',\n children: {\n itbudget: {\n id: 'showcase-it-budget',\n label: '信息技术预算',\n path: '/showcase/it-budget',\n },\n },\n },\n },\n },\n};\n\n// 英文翻译\nexport const enTranslations: Translations = {\n navbar: {\n search: 'Search Components',\n searchPlaceholder: 'Search components, docs, examples...',\n searchShortcut: 'Cmd+K',\n noResults: 'No results found',\n },\n sidebar: {\n menu: {\n home: {\n id: 'home',\n label: 'Home',\n path: '/',\n },\n components: {\n id: 'components',\n label: 'Components',\n children: {\n button: {\n id: 'button',\n label: 'Button',\n path: '/components/button',\n },\n badge: {\n id: 'badge',\n label: 'Badge',\n path: '/components/badge',\n },\n groupbutton: {\n id: 'groupbutton',\n label: 'GroupButton',\n path: '/components/group-button',\n },\n cardinfo: {\n id: 'cardinfo',\n label: 'Card.Info',\n path: '/components/card/info',\n },\n cardstat: {\n id: 'cardstat',\n label: 'Card.Stat',\n path: '/components/card/stat',\n },\n cardmetric: {\n id: 'cardmetric',\n label: 'Card.Metric',\n path: '/components/card-metric',\n },\n groupedtable: {\n id: 'groupedtable',\n label: 'GroupedTable',\n path: '/components/grouped-table',\n },\n navigationlist: {\n id: 'navigationlist',\n label: 'NavigationList',\n path: '/components/navigation-list',\n },\n skeleton: {\n id: 'skeleton',\n label: 'Skeleton',\n path: '/components/skeleton',\n },\n input: {\n id: 'input',\n label: 'Input',\n path: '/components/input',\n },\n label: {\n id: 'label',\n label: 'Label',\n path: '/components/label',\n },\n checkbox: {\n id: 'checkbox',\n label: 'Checkbox',\n path: '/components/checkbox',\n },\n select: {\n id: 'select',\n label: 'Select',\n path: '/components/select',\n },\n card: {\n id: 'card',\n label: 'Card',\n path: '/components/card',\n },\n avatar: {\n id: 'avatar',\n label: 'Avatar',\n path: '/components/avatar',\n },\n accordion: {\n id: 'accordion',\n label: 'Accordion',\n path: '/components/accordion',\n },\n emptystate: {\n id: 'emptystate',\n label: 'EmptyState',\n path: '/components/emptystate',\n },\n modal: {\n id: 'modal',\n label: 'Modal',\n path: '/components/modal',\n },\n tabs: {\n id: 'tabs',\n label: 'Tabs',\n path: '/components/tabs',\n },\n list: {\n id: 'list',\n label: 'List',\n path: '/components/list',\n },\n table: {\n id: 'table',\n label: 'Table',\n path: '/components/table',\n },\n markdown: {\n id: 'markdown',\n label: 'Markdown',\n path: '/components/markdown',\n },\n tree: {\n id: 'tree',\n label: 'Tree',\n path: '/components/tree',\n },\n fileuploader: {\n id: 'fileuploader',\n label: 'FileUploader',\n path: '/components/fileuploader',\n },\n text: {\n id: 'text',\n label: 'Text',\n path: '/components/text',\n },\n image: {\n id: 'image',\n label: 'Image',\n path: '/components/image',\n },\n icon: {\n id: 'icon',\n label: 'Icon',\n path: '/components/icon',\n },\n slider: {\n id: 'slider',\n label: 'Slider',\n path: '/components/slider',\n },\n datetimeinput: {\n id: 'datetimeinput',\n label: 'DateTimeInput',\n path: '/components/datetime-input',\n },\n multiplechoice: {\n id: 'multiplechoice',\n label: 'MultipleChoice',\n path: '/components/multiple-choice',\n },\n choicepicker: {\n id: 'choicepicker',\n label: 'ChoicePicker',\n path: '/components/choice-picker',\n },\n },\n },\n layouts: {\n id: 'layouts',\n label: 'Layout',\n children: {\n layout: { id: 'layout', label: 'Layout Overview', path: '/layouts/layout' },\n resizable: { id: 'resizable', label: 'Resizable', path: '/layouts/resizable' },\n container: { id: 'container', label: 'Container', path: '/layouts/container' },\n grid: { id: 'grid', label: 'Grid', path: '/layouts/grid' },\n flex: { id: 'flex', label: 'Flex', path: '/layouts/flex' },\n group: { id: 'group', label: 'Group', path: '/layouts/group' },\n space: { id: 'space', label: 'Space', path: '/layouts/space' },\n page: { id: 'page', label: 'Page Layout', path: '/layouts/page' },\n row: { id: 'row', label: 'Row', path: '/layouts/row' },\n column: { id: 'column', label: 'Column', path: '/layouts/column' },\n },\n },\n charts: {\n id: 'charts',\n label: 'Charts',\n path: '/components/chart',\n children: [\n { id: 'chart-line', label: 'Line Chart', path: '/components/chart/line' },\n { id: 'chart-area', label: 'Area Chart', path: '/components/chart/area' },\n { id: 'chart-bar', label: 'Bar Chart', path: '/components/chart/bar' },\n { id: 'chart-pie', label: 'Pie Chart', path: '/components/chart/pie' },\n { id: 'chart-scatter', label: 'Scatter Chart', path: '/components/chart/scatter' },\n { id: 'chart-combo', label: 'Combo Chart', path: '/components/chart/complex/combo' },\n { id: 'chart-stacked', label: 'Stacked Area', path: '/components/chart/complex/stacked' },\n { id: 'chart-heatmap', label: 'Heatmap', path: '/components/chart/complex/heatmap' },\n { id: 'chart-regression', label: 'Regression Analysis', path: '/components/chart/complex/regression' },\n { id: 'chart-radar', label: 'Radar Chart', path: '/components/chart/special/radar' },\n { id: 'chart-sankey', label: 'Sankey Diagram', path: '/components/chart/special/sankey' },\n { id: 'chart-network', label: 'Network Graph', path: '/components/chart/special/network' },\n { id: 'chart-calendar', label: 'Calendar Heatmap', path: '/components/chart/special/calendar' },\n { id: 'chart-stacked-pie', label: 'Stacked Pie', path: '/components/chart/special/stacked-pie' },\n { id: 'chart-funnel', label: 'Sales Funnel', path: '/components/chart/special/funnel' },\n { id: 'chart-treemap', label: 'Treemap', path: '/components/chart/special/treemap' },\n { id: 'chart-globe', label: 'Globe', path: '/components/chart/special/globe' },\n { id: 'chart-world-map', label: 'World Map', path: '/components/chart/special/world-map' }\n ],\n },\n advanced: {\n id: 'advanced-components',\n label: 'Advanced Components',\n children: {\n datatable: {\n id: 'datatable',\n label: 'DataTable',\n path: '/components/datatable',\n },\n datatableAdvanced: {\n id: 'datatableadvanced',\n label: 'Advanced Table',\n path: '/components/datatable/advanced',\n },\n datatableAdvancedTree: {\n id: 'datatableadvancedtree',\n label: 'Advanced Tree Table',\n path: '/components/datatable/advancedTreeTable',\n },\n datatableHooks: {\n id: 'datatablehooks',\n label: 'Hooks Simplification',\n path: '/components/datatable/hooks',\n },\n datatablePivot: {\n id: 'datatablepivot',\n label: 'Pivot & Extensions',\n path: '/components/datatable/pivot',\n },\n\n jukebox: {\n id: 'jukebox',\n label: 'Jukebox',\n path: '/components/jukebox',\n },\n articlecontrol: {\n id: 'articlecontrol',\n label: 'ArticleControl',\n path: '/components/articlecontrol',\n },\n codeeditor: {\n id: 'codeeditor',\n label: 'CodeEditor',\n path: '/components/codeeditor',\n },\n markdowneditor: {\n id: 'markdowneditor',\n label: 'MarkdownEditor',\n path: '/components/markdowneditor',\n },\n sidebar: {\n id: 'sidebar-demo',\n label: 'Sidebar',\n path: '/components/sidebar',\n },\n fileexplorer: {\n id: 'fileexplorer',\n label: 'FileExplorer',\n path: '/components/fileexplorer',\n },\n richtexteditor: {\n id: 'richtexteditor',\n label: 'RichTextEditor',\n path: '/components/richtexteditor',\n },\n richtexteditorMobile: {\n id: 'richtexteditor-mobile',\n label: 'RichTextEditor Mobile Guide',\n path: '/components/richtexteditor/mobile',\n },\n flow: {\n id: 'flow',\n label: 'Flow Editor',\n path: '/components/flow',\n },\n flowUsage: {\n id: 'flow-usage',\n label: 'Flow Usage Guide',\n path: '/components/flow/usage',\n },\n flowMobile: {\n id: 'flow-mobile',\n label: 'Flow Mobile Guide',\n path: '/components/flow/mobile',\n },\n gantt: {\n id: 'gantt',\n label: 'Gantt Chart',\n path: '/components/gantt',\n },\n ganttScenarios: {\n id: 'gantt-scenarios',\n label: 'Gantt Scenarios',\n path: '/components/gantt/scenarios',\n },\n calendar: {\n id: 'calendar',\n label: 'Calendar',\n path: '/components/calendar',\n },\n calendarScenarios: {\n id: 'calendar-scenarios',\n label: 'Calendar Scenarios',\n path: '/components/calendar/scenarios',\n },\n },\n },\n showcase: {\n id: 'showcase',\n label: 'Showcase',\n children: {\n itbudget: {\n id: 'showcase-it-budget',\n label: 'IT Budget',\n path: '/showcase/it-budget',\n },\n },\n },\n },\n },\n};\n\n// 根据语言获取翻译\nexport const getTranslations = (language: Language): Translations => {\n return language === 'zh' ? zhTranslations : enTranslations;\n};\n"],"mappings":";AAmCA,IAAa,IAA+B;CAC1C,QAAQ;EACN,QAAQ;EACR,mBAAmB;EACnB,gBAAgB;EAChB,WAAW;CACb;CACA,SAAS,EACP,MAAM;EACJ,MAAM;GACJ,IAAI;GACJ,OAAO;GACP,MAAM;EACR;EACA,YAAY;GACV,IAAI;GACJ,OAAO;GACP,UAAU;IACR,QAAQ;KACN,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,OAAO;KACL,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,aAAa;KACX,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,UAAU;KACR,IAAI;KACJ,OAA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AI;GACJ,OAAO;GACP,UAAU,EACR,UAAU;IACR,IAAI;IACJ,OAAO;IACP,MAAM;GACR,EACF;EACF;CACF,EACF;AACF,GAGa,KAAmB,MACvB,MAAa,OAAO,IAAiB"}
|
|
1
|
+
{"version":3,"file":"i18n.js","names":[],"sources":["../../src/utils/i18n.tsx"],"sourcesContent":["// 导入类型\nimport { MenuItem } from '../types/menu';\n\n// 定义语言类型\nexport type Language = 'zh' | 'en';\n\n// 定义翻译类型\nexport type Translations = {\n navbar: {\n search: string;\n searchPlaceholder: string;\n searchShortcut: string;\n noResults: string;\n };\n sidebar: {\n menu: {\n home: MenuItem;\n components: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n layouts: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n advanced: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n charts: MenuItem;\n showcase: Omit<MenuItem, 'children'> & {\n children: Record<string, MenuItem>;\n };\n };\n };\n};\n\n// 中文翻译\nexport const zhTranslations: Translations = {\n navbar: {\n search: '搜索组件',\n searchPlaceholder: '搜索组件、文档、示例...',\n searchShortcut: 'Cmd+K',\n noResults: '没有找到匹配的结果',\n },\n sidebar: {\n menu: {\n home: {\n id: 'home',\n label: '主页',\n path: '/',\n },\n components: {\n id: 'components',\n label: '组件',\n children: {\n button: {\n id: 'button',\n label: '按钮',\n path: '/components/button',\n },\n badge: {\n id: 'badge',\n label: '徽章',\n path: '/components/badge',\n },\n groupbutton: {\n id: 'groupbutton',\n label: '选择按钮组',\n path: '/components/group-button',\n },\n cardinfo: {\n id: 'cardinfo',\n label: '信息卡',\n path: '/components/card/info',\n },\n cardstat: {\n id: 'cardstat',\n label: '统计卡',\n path: '/components/card/stat',\n },\n cardmetric: {\n id: 'cardmetric',\n label: '指标卡',\n path: '/components/card-metric',\n },\n groupedtable: {\n id: 'groupedtable',\n label: '分组表格',\n path: '/components/grouped-table',\n },\n navigationlist: {\n id: 'navigationlist',\n label: '导航列表',\n path: '/components/navigation-list',\n },\n skeleton: {\n id: 'skeleton',\n label: '骨架',\n path: '/components/skeleton',\n },\n input: {\n id: 'input',\n label: '输入框',\n path: '/components/input',\n },\n label: {\n id: 'label',\n label: '标签',\n path: '/components/label',\n },\n checkbox: {\n id: 'checkbox',\n label: '复选框',\n path: '/components/checkbox',\n },\n select: {\n id: 'select',\n label: '选择器',\n path: '/components/select',\n },\n card: {\n id: 'card',\n label: '卡片',\n path: '/components/card',\n },\n avatar: {\n id: 'avatar',\n label: '头像',\n path: '/components/avatar',\n },\n accordion: {\n id: 'accordion',\n label: '手风琴',\n path: '/components/accordion',\n },\n emptystate: {\n id: 'emptystate',\n label: '空状态',\n path: '/components/emptystate',\n },\n modal: {\n id: 'modal',\n label: '模态框',\n path: '/components/modal',\n },\n tabs: {\n id: 'tabs',\n label: '标签页',\n path: '/components/tabs',\n },\n list: {\n id: 'list',\n label: '列表',\n path: '/components/list',\n },\n table: {\n id: 'table',\n label: '表格',\n path: '/components/table',\n },\n markdown: {\n id: 'markdown',\n label: 'Markdown文档',\n path: '/components/markdown',\n },\n tree: {\n id: 'tree',\n label: '树形控件',\n path: '/components/tree',\n },\n fileuploader: {\n id: 'fileuploader',\n label: '文件上传',\n path: '/components/fileuploader',\n },\n text: {\n id: 'text',\n label: '文本',\n path: '/components/text',\n },\n image: {\n id: 'image',\n label: '图片',\n path: '/components/image',\n },\n icon: {\n id: 'icon',\n label: '图标',\n path: '/components/icon',\n },\n slider: {\n id: 'slider',\n label: '滑块',\n path: '/components/slider',\n },\n datetimeinput: {\n id: 'datetimeinput',\n label: '日期时间',\n path: '/components/datetime-input',\n },\n multiplechoice: {\n id: 'multiplechoice',\n label: '多选组',\n path: '/components/multiple-choice',\n },\n choicepicker: {\n id: 'choicepicker',\n label: '单选组',\n path: '/components/choice-picker',\n },\n },\n },\n layouts: {\n id: 'layouts',\n label: '布局',\n children: {\n layout: { id: 'layout', label: '布局总览', path: '/layouts/layout' },\n resizable: { id: 'resizable', label: '可调节布局', path: '/layouts/resizable' },\n container: { id: 'container', label: '容器', path: '/layouts/container' },\n grid: { id: 'grid', label: '栅格', path: '/layouts/grid' },\n flex: { id: 'flex', label: '弹性布局', path: '/layouts/flex' },\n group: { id: 'group', label: '布局组', path: '/layouts/group' },\n space: { id: 'space', label: '占位', path: '/layouts/space' },\n page: { id: 'page', label: '页面布局', path: '/layouts/page' },\n row: { id: 'row', label: '行布局', path: '/layouts/row' },\n column: { id: 'column', label: '列布局', path: '/layouts/column' },\n },\n },\n charts: {\n id: 'charts',\n label: '图表',\n path: '/components/chart',\n children: [\n { id: 'chart-line', label: '折线图', path: '/components/chart/line' },\n { id: 'chart-area', label: '面积图', path: '/components/chart/area' },\n { id: 'chart-bar', label: '柱状图', path: '/components/chart/bar' },\n { id: 'chart-pie', label: '饼图', path: '/components/chart/pie' },\n { id: 'chart-scatter', label: '散点图', path: '/components/chart/scatter' },\n { id: 'chart-combo', label: '组合图', path: '/components/chart/complex/combo' },\n { id: 'chart-stacked', label: '堆叠面积图', path: '/components/chart/complex/stacked' },\n { id: 'chart-heatmap', label: '热力图', path: '/components/chart/complex/heatmap' },\n { id: 'chart-regression', label: '回归分析', path: '/components/chart/complex/regression' },\n { id: 'chart-radar', label: '雷达图', path: '/components/chart/special/radar' },\n { id: 'chart-sankey', label: '桑基图', path: '/components/chart/special/sankey' },\n { id: 'chart-network', label: '网络图', path: '/components/chart/special/network' },\n { id: 'chart-calendar', label: '日历热力图', path: '/components/chart/special/calendar' },\n { id: 'chart-stacked-pie', label: '堆叠饼图', path: '/components/chart/special/stacked-pie' },\n { id: 'chart-funnel', label: '销售漏斗图', path: '/components/chart/special/funnel' },\n { id: 'chart-treemap', label: '矩形树图', path: '/components/chart/special/treemap' },\n { id: 'chart-globe', label: '地球', path: '/components/chart/special/globe' },\n { id: 'chart-world-map', label: '世界地图', path: '/components/chart/special/world-map' },\n ],\n },\n advanced: {\n id: 'advanced-components',\n label: '高级组件',\n children: {\n datatable: {\n id: 'datatable',\n label: '数据表格',\n path: '/components/datatable',\n },\n datatableAdvanced: {\n id: 'datatableadvanced',\n label: '高级表格',\n path: '/components/datatable/advanced',\n },\n datatableAdvancedTree: {\n id: 'datatableadvancedtree',\n label: '高级树形表格',\n path: '/components/datatable/advancedTreeTable',\n },\n datatableHooks: {\n id: 'datatablehooks',\n label: '钩子简化示例',\n path: '/components/datatable/hooks',\n },\n datatablePivot: {\n id: 'datatablepivot',\n label: '透视与扩展',\n path: '/components/datatable/pivot',\n },\n\n jukebox: {\n id: 'jukebox',\n label: '音乐播放器',\n path: '/components/jukebox',\n },\n articlecontrol: {\n id: 'articlecontrol',\n label: '文档悬浮控件',\n path: '/components/articlecontrol',\n },\n codeeditor: {\n id: 'codeeditor',\n label: '代码编辑器',\n path: '/components/codeeditor',\n },\n markdowneditor: {\n id: 'markdowneditor',\n label: '文档编辑器',\n path: '/components/markdowneditor',\n },\n sidebar: {\n id: 'sidebar-demo',\n label: '侧边栏',\n path: '/components/sidebar',\n },\n fileexplorer: {\n id: 'fileexplorer',\n label: '文件浏览器',\n path: '/components/fileexplorer',\n },\n richtexteditor: {\n id: 'richtexteditor',\n label: '富文本编辑器',\n path: '/components/richtexteditor',\n },\n richtexteditorMobile: {\n id: 'richtexteditor-mobile',\n label: '富文本编辑器移动端示例',\n path: '/components/richtexteditor/mobile',\n },\n flow: {\n id: 'flow',\n label: '流程图',\n path: '/components/flow',\n },\n flowUsage: {\n id: 'flow-usage',\n label: '流程图使用示例',\n path: '/components/flow/usage',\n },\n flowMobile: {\n id: 'flow-mobile',\n label: '流程图移动端示例',\n path: '/components/flow/mobile',\n },\n gantt: {\n id: 'gantt',\n label: '甘特图',\n path: '/components/gantt',\n },\n ganttScenarios: {\n id: 'gantt-scenarios',\n label: '甘特图场景示例',\n path: '/components/gantt/scenarios',\n },\n calendar: {\n id: 'calendar',\n label: '日历',\n path: '/components/calendar',\n },\n calendarScenarios: {\n id: 'calendar-scenarios',\n label: '日历场景示例',\n path: '/components/calendar/scenarios',\n },\n },\n },\n showcase: {\n id: 'showcase',\n label: '案例',\n children: {\n itbudget: {\n id: 'showcase-it-budget',\n label: '信息技术预算',\n path: '/showcase/it-budget',\n },\n },\n },\n },\n },\n};\n\n// 英文翻译\nexport const enTranslations: Translations = {\n navbar: {\n search: 'Search Components',\n searchPlaceholder: 'Search components, docs, examples...',\n searchShortcut: 'Cmd+K',\n noResults: 'No results found',\n },\n sidebar: {\n menu: {\n home: {\n id: 'home',\n label: 'Home',\n path: '/',\n },\n components: {\n id: 'components',\n label: 'Components',\n children: {\n button: {\n id: 'button',\n label: 'Button',\n path: '/components/button',\n },\n badge: {\n id: 'badge',\n label: 'Badge',\n path: '/components/badge',\n },\n groupbutton: {\n id: 'groupbutton',\n label: 'GroupButton',\n path: '/components/group-button',\n },\n cardinfo: {\n id: 'cardinfo',\n label: 'Card.Info',\n path: '/components/card/info',\n },\n cardstat: {\n id: 'cardstat',\n label: 'Card.Stat',\n path: '/components/card/stat',\n },\n cardmetric: {\n id: 'cardmetric',\n label: 'Card.Metric',\n path: '/components/card-metric',\n },\n groupedtable: {\n id: 'groupedtable',\n label: 'GroupedTable',\n path: '/components/grouped-table',\n },\n navigationlist: {\n id: 'navigationlist',\n label: 'NavigationList',\n path: '/components/navigation-list',\n },\n skeleton: {\n id: 'skeleton',\n label: 'Skeleton',\n path: '/components/skeleton',\n },\n input: {\n id: 'input',\n label: 'Input',\n path: '/components/input',\n },\n label: {\n id: 'label',\n label: 'Label',\n path: '/components/label',\n },\n checkbox: {\n id: 'checkbox',\n label: 'Checkbox',\n path: '/components/checkbox',\n },\n select: {\n id: 'select',\n label: 'Select',\n path: '/components/select',\n },\n card: {\n id: 'card',\n label: 'Card',\n path: '/components/card',\n },\n avatar: {\n id: 'avatar',\n label: 'Avatar',\n path: '/components/avatar',\n },\n accordion: {\n id: 'accordion',\n label: 'Accordion',\n path: '/components/accordion',\n },\n emptystate: {\n id: 'emptystate',\n label: 'EmptyState',\n path: '/components/emptystate',\n },\n modal: {\n id: 'modal',\n label: 'Modal',\n path: '/components/modal',\n },\n tabs: {\n id: 'tabs',\n label: 'Tabs',\n path: '/components/tabs',\n },\n list: {\n id: 'list',\n label: 'List',\n path: '/components/list',\n },\n table: {\n id: 'table',\n label: 'Table',\n path: '/components/table',\n },\n markdown: {\n id: 'markdown',\n label: 'Markdown',\n path: '/components/markdown',\n },\n tree: {\n id: 'tree',\n label: 'Tree',\n path: '/components/tree',\n },\n fileuploader: {\n id: 'fileuploader',\n label: 'FileUploader',\n path: '/components/fileuploader',\n },\n text: {\n id: 'text',\n label: 'Text',\n path: '/components/text',\n },\n image: {\n id: 'image',\n label: 'Image',\n path: '/components/image',\n },\n icon: {\n id: 'icon',\n label: 'Icon',\n path: '/components/icon',\n },\n slider: {\n id: 'slider',\n label: 'Slider',\n path: '/components/slider',\n },\n datetimeinput: {\n id: 'datetimeinput',\n label: 'DateTimeInput',\n path: '/components/datetime-input',\n },\n multiplechoice: {\n id: 'multiplechoice',\n label: 'MultipleChoice',\n path: '/components/multiple-choice',\n },\n choicepicker: {\n id: 'choicepicker',\n label: 'ChoicePicker',\n path: '/components/choice-picker',\n },\n },\n },\n layouts: {\n id: 'layouts',\n label: 'Layout',\n children: {\n layout: { id: 'layout', label: 'Layout Overview', path: '/layouts/layout' },\n resizable: { id: 'resizable', label: 'Resizable', path: '/layouts/resizable' },\n container: { id: 'container', label: 'Container', path: '/layouts/container' },\n grid: { id: 'grid', label: 'Grid', path: '/layouts/grid' },\n flex: { id: 'flex', label: 'Flex', path: '/layouts/flex' },\n group: { id: 'group', label: 'Group', path: '/layouts/group' },\n space: { id: 'space', label: 'Space', path: '/layouts/space' },\n page: { id: 'page', label: 'Page Layout', path: '/layouts/page' },\n row: { id: 'row', label: 'Row', path: '/layouts/row' },\n column: { id: 'column', label: 'Column', path: '/layouts/column' },\n },\n },\n charts: {\n id: 'charts',\n label: 'Charts',\n path: '/components/chart',\n children: [\n { id: 'chart-line', label: 'Line Chart', path: '/components/chart/line' },\n { id: 'chart-area', label: 'Area Chart', path: '/components/chart/area' },\n { id: 'chart-bar', label: 'Bar Chart', path: '/components/chart/bar' },\n { id: 'chart-pie', label: 'Pie Chart', path: '/components/chart/pie' },\n { id: 'chart-scatter', label: 'Scatter Chart', path: '/components/chart/scatter' },\n { id: 'chart-combo', label: 'Combo Chart', path: '/components/chart/complex/combo' },\n { id: 'chart-stacked', label: 'Stacked Area', path: '/components/chart/complex/stacked' },\n { id: 'chart-heatmap', label: 'Heatmap', path: '/components/chart/complex/heatmap' },\n { id: 'chart-regression', label: 'Regression Analysis', path: '/components/chart/complex/regression' },\n { id: 'chart-radar', label: 'Radar Chart', path: '/components/chart/special/radar' },\n { id: 'chart-sankey', label: 'Sankey Diagram', path: '/components/chart/special/sankey' },\n { id: 'chart-network', label: 'Network Graph', path: '/components/chart/special/network' },\n { id: 'chart-calendar', label: 'Calendar Heatmap', path: '/components/chart/special/calendar' },\n { id: 'chart-stacked-pie', label: 'Stacked Pie', path: '/components/chart/special/stacked-pie' },\n { id: 'chart-funnel', label: 'Sales Funnel', path: '/components/chart/special/funnel' },\n { id: 'chart-treemap', label: 'Treemap', path: '/components/chart/special/treemap' },\n { id: 'chart-globe', label: 'Globe', path: '/components/chart/special/globe' },\n { id: 'chart-world-map', label: 'World Map', path: '/components/chart/special/world-map' }\n ],\n },\n advanced: {\n id: 'advanced-components',\n label: 'Advanced Components',\n children: {\n datatable: {\n id: 'datatable',\n label: 'DataTable',\n path: '/components/datatable',\n },\n datatableAdvanced: {\n id: 'datatableadvanced',\n label: 'Advanced Table',\n path: '/components/datatable/advanced',\n },\n datatableAdvancedTree: {\n id: 'datatableadvancedtree',\n label: 'Advanced Tree Table',\n path: '/components/datatable/advancedTreeTable',\n },\n datatableHooks: {\n id: 'datatablehooks',\n label: 'Hooks Simplification',\n path: '/components/datatable/hooks',\n },\n datatablePivot: {\n id: 'datatablepivot',\n label: 'Pivot & Extensions',\n path: '/components/datatable/pivot',\n },\n\n jukebox: {\n id: 'jukebox',\n label: 'Jukebox',\n path: '/components/jukebox',\n },\n articlecontrol: {\n id: 'articlecontrol',\n label: 'ArticleControl',\n path: '/components/articlecontrol',\n },\n codeeditor: {\n id: 'codeeditor',\n label: 'CodeEditor',\n path: '/components/codeeditor',\n },\n markdowneditor: {\n id: 'markdowneditor',\n label: 'MarkdownEditor',\n path: '/components/markdowneditor',\n },\n sidebar: {\n id: 'sidebar-demo',\n label: 'Sidebar',\n path: '/components/sidebar',\n },\n fileexplorer: {\n id: 'fileexplorer',\n label: 'FileExplorer',\n path: '/components/fileexplorer',\n },\n richtexteditor: {\n id: 'richtexteditor',\n label: 'RichTextEditor',\n path: '/components/richtexteditor',\n },\n richtexteditorMobile: {\n id: 'richtexteditor-mobile',\n label: 'RichTextEditor Mobile Guide',\n path: '/components/richtexteditor/mobile',\n },\n flow: {\n id: 'flow',\n label: 'Flow Editor',\n path: '/components/flow',\n },\n flowUsage: {\n id: 'flow-usage',\n label: 'Flow Usage Guide',\n path: '/components/flow/usage',\n },\n flowMobile: {\n id: 'flow-mobile',\n label: 'Flow Mobile Guide',\n path: '/components/flow/mobile',\n },\n gantt: {\n id: 'gantt',\n label: 'Gantt Chart',\n path: '/components/gantt',\n },\n ganttScenarios: {\n id: 'gantt-scenarios',\n label: 'Gantt Scenarios',\n path: '/components/gantt/scenarios',\n },\n calendar: {\n id: 'calendar',\n label: 'Calendar',\n path: '/components/calendar',\n },\n calendarScenarios: {\n id: 'calendar-scenarios',\n label: 'Calendar Scenarios',\n path: '/components/calendar/scenarios',\n },\n },\n },\n showcase: {\n id: 'showcase',\n label: 'Showcase',\n children: {\n itbudget: {\n id: 'showcase-it-budget',\n label: 'IT Budget',\n path: '/showcase/it-budget',\n },\n },\n },\n },\n },\n};\n\n// 根据语言获取翻译\nexport const getTranslations = (language: Language): Translations => {\n return language === 'zh' ? zhTranslations : enTranslations;\n};\n"],"mappings":";AAmCA,IAAa,IAA+B;CAC1C,QAAQ;EACN,QAAQ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KACP,MAAM;IACR;IACA,WAAW;KACT,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,YAAY;KACV,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,OAAO;KACL,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,gBAAgB;KACd,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,UAAU;KACR,IAAI;KACJ,OAAO;KACP,MAAM;IACR;IACA,mBAAmB;KACjB,IAAI;KACJ,OAAO;KACP,MAAM;IACR;GACF;EACF;EACA,UAAU;GACR,IAAI;GACJ,OAAO;GACP,UAAU,EACR,UAAU;IACR,IAAI;IACJ,OAAO;IACP,MAAM;GACR,EACF;EACF;CACF,EACF;AACF,GAGa,KAAmB,MACvB,MAAa,OAAO,IAAiB"}
|
|
@@ -11,6 +11,9 @@ export interface RouteConfig {
|
|
|
11
11
|
children?: RouteConfig[];
|
|
12
12
|
/** 路由 ID(仅用于无路径的布局路由,不能与 path 同时使用) */
|
|
13
13
|
id?: string;
|
|
14
|
+
/** Native TanStack guard. Throw redirect(...) or an error to stop this route's loaders. */
|
|
15
|
+
beforeLoad?: AnyRoute['options']['beforeLoad'];
|
|
16
|
+
loader?: AnyRoute['options']['loader'];
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* 路由构建器配置
|
|
@@ -24,20 +27,19 @@ export interface RouterBuilderConfig {
|
|
|
24
27
|
basepath?: string;
|
|
25
28
|
/** 自定义 404 组件 */
|
|
26
29
|
notFoundComponent?: RouteComponent;
|
|
30
|
+
/** Runs before descendant loaders, including preloads. Must allow public/login routes explicitly. */
|
|
31
|
+
beforeLoad?: AnyRoute['options']['beforeLoad'];
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
29
34
|
* 构建路由器
|
|
30
35
|
* @param config 路由构建器配置
|
|
31
36
|
* @returns TanStack Router 实例
|
|
32
37
|
*/
|
|
33
|
-
export declare function buildRouter(config: RouterBuilderConfig): import("@tanstack/router-core").RouterCore<import("@tanstack/router-core").Route<import("@tanstack/router-core").Register, any, "/", "/", string, "__root__", undefined, {}, {}, import("@tanstack/router-core").AnyContext,
|
|
38
|
+
export declare function buildRouter(config: RouterBuilderConfig): import("@tanstack/router-core").RouterCore<import("@tanstack/router-core").Route<import("@tanstack/router-core").Register, any, "/", "/", string, "__root__", undefined, {}, {}, import("@tanstack/router-core").AnyContext, any, {}, undefined, AnyRoute[], unknown, unknown, unknown, undefined>, "never", false, import("@tanstack/history").RouterHistory, Record<string, any>>;
|
|
34
39
|
/**
|
|
35
40
|
* 从扁平路由配置创建路由器(简化版)
|
|
36
41
|
* @param routes 路由配置数组
|
|
37
42
|
* @param rootComponent 根路由组件
|
|
38
43
|
* @returns TanStack Router 实例
|
|
39
44
|
*/
|
|
40
|
-
export declare function createRouterFromConfig(routes: RouteConfig[], rootComponent?: RouteComponent, options?: {
|
|
41
|
-
basepath?: string;
|
|
42
|
-
notFoundComponent?: RouteComponent;
|
|
43
|
-
}): import("@tanstack/router-core").RouterCore<import("@tanstack/router-core").Route<import("@tanstack/router-core").Register, any, "/", "/", string, "__root__", undefined, {}, {}, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, AnyRoute[], unknown, unknown, unknown, undefined>, "never", false, import("@tanstack/history").RouterHistory, Record<string, any>>;
|
|
45
|
+
export declare function createRouterFromConfig(routes: RouteConfig[], rootComponent?: RouteComponent, options?: Pick<RouterBuilderConfig, 'basepath' | 'notFoundComponent' | 'beforeLoad'>): import("@tanstack/router-core").RouterCore<import("@tanstack/router-core").Route<import("@tanstack/router-core").Register, any, "/", "/", string, "__root__", undefined, {}, {}, import("@tanstack/router-core").AnyContext, any, {}, undefined, AnyRoute[], unknown, unknown, unknown, undefined>, "never", false, import("@tanstack/history").RouterHistory, Record<string, any>>;
|
|
@@ -3,29 +3,24 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
3
3
|
import { createRootRoute as n, createRoute as r, createRouter as i } from "@tanstack/react-router";
|
|
4
4
|
//#region src/utils/routerBuilder.tsx
|
|
5
5
|
function a(e, t) {
|
|
6
|
-
let n =
|
|
6
|
+
let n = {
|
|
7
7
|
getParentRoute: () => t,
|
|
8
|
-
component: e.component
|
|
8
|
+
component: e.component,
|
|
9
|
+
beforeLoad: e.beforeLoad,
|
|
10
|
+
loader: e.loader
|
|
9
11
|
};
|
|
10
|
-
e.path ?
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
let t = a(e, o);
|
|
14
|
-
n.push(...t);
|
|
15
|
-
}), n;
|
|
12
|
+
e.path ? n.path = e.path : e.id && (n.id = e.id);
|
|
13
|
+
let i = r(n);
|
|
14
|
+
return e.children && e.children.length > 0 && i.addChildren(e.children.map((e) => a(e, i))), i;
|
|
16
15
|
}
|
|
17
16
|
function o(e) {
|
|
18
17
|
let t = n({
|
|
19
18
|
component: e.rootComponent,
|
|
19
|
+
beforeLoad: e.beforeLoad,
|
|
20
20
|
notFoundComponent: e.notFoundComponent ?? s
|
|
21
|
-
}), r =
|
|
22
|
-
e.routes.forEach((e) => {
|
|
23
|
-
let n = a(e, t);
|
|
24
|
-
r.push(...n);
|
|
25
|
-
});
|
|
26
|
-
let o = t.addChildren(r);
|
|
21
|
+
}), r = t.addChildren(e.routes.map((e) => a(e, t)));
|
|
27
22
|
return i({
|
|
28
|
-
routeTree:
|
|
23
|
+
routeTree: r,
|
|
29
24
|
basepath: e.basepath,
|
|
30
25
|
defaultNotFoundComponent: e.notFoundComponent ?? s
|
|
31
26
|
});
|
|
@@ -57,6 +52,7 @@ function c(e, t, n) {
|
|
|
57
52
|
routes: e,
|
|
58
53
|
rootComponent: t,
|
|
59
54
|
basepath: n?.basepath,
|
|
55
|
+
beforeLoad: n?.beforeLoad,
|
|
60
56
|
notFoundComponent: n?.notFoundComponent
|
|
61
57
|
});
|
|
62
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerBuilder.js","names":[],"sources":["../../src/utils/routerBuilder.tsx"],"sourcesContent":["import React from 'react';\nimport {\n createRouter,\n createRootRoute,\n createRoute,\n RootRoute,\n AnyRoute,\n RouteComponent,\n} from '@tanstack/react-router';\n\n/**\n * 路由配置接口\n */\nexport interface RouteConfig {\n /** 路由路径(与 id 二选一,优先使用 path) */\n path?: string;\n /** 路由组件 */\n component?: RouteComponent;\n /** 子路由配置 */\n children?: RouteConfig[];\n /** 路由 ID(仅用于无路径的布局路由,不能与 path 同时使用) */\n id?: string;\n}\n\n/**\n * 路由构建器配置\n */\nexport interface RouterBuilderConfig {\n /** 路由配置数组 */\n routes: RouteConfig[];\n /** 根路由组件,默认使用 AppLayoutWrapper */\n rootComponent?: RouteComponent;\n /** 路由基础路径,部署在子路径时使用(如 '/dish-ui') */\n basepath?: string;\n /** 自定义 404 组件 */\n notFoundComponent?: RouteComponent;\n}\n\n/**\n * 递归创建路由树\n * @param config 路由配置\n * @param parentRoute 父路由\n * @returns
|
|
1
|
+
{"version":3,"file":"routerBuilder.js","names":[],"sources":["../../src/utils/routerBuilder.tsx"],"sourcesContent":["import React from 'react';\nimport {\n createRouter,\n createRootRoute,\n createRoute,\n RootRoute,\n AnyRoute,\n RouteComponent,\n} from '@tanstack/react-router';\n\n/**\n * 路由配置接口\n */\nexport interface RouteConfig {\n /** 路由路径(与 id 二选一,优先使用 path) */\n path?: string;\n /** 路由组件 */\n component?: RouteComponent;\n /** 子路由配置 */\n children?: RouteConfig[];\n /** 路由 ID(仅用于无路径的布局路由,不能与 path 同时使用) */\n id?: string;\n /** Native TanStack guard. Throw redirect(...) or an error to stop this route's loaders. */\n beforeLoad?: AnyRoute['options']['beforeLoad'];\n loader?: AnyRoute['options']['loader'];\n}\n\n/**\n * 路由构建器配置\n */\nexport interface RouterBuilderConfig {\n /** 路由配置数组 */\n routes: RouteConfig[];\n /** 根路由组件,默认使用 AppLayoutWrapper */\n rootComponent?: RouteComponent;\n /** 路由基础路径,部署在子路径时使用(如 '/dish-ui') */\n basepath?: string;\n /** 自定义 404 组件 */\n notFoundComponent?: RouteComponent;\n /** Runs before descendant loaders, including preloads. Must allow public/login routes explicitly. */\n beforeLoad?: AnyRoute['options']['beforeLoad'];\n}\n\n/**\n * 递归创建路由树\n * @param config 路由配置\n * @param parentRoute 父路由\n * @returns 带有子路由的当前路由\n */\nfunction createRoutesRecursive(\n config: RouteConfig,\n parentRoute: RootRoute | AnyRoute\n): AnyRoute {\n\n // 创建当前路由\n // 注意:TanStack Router 不允许同时设置 id 和 path\n // id 只用于无路径的布局路由\n const routeOptions: any = {\n getParentRoute: () => parentRoute,\n component: config.component,\n beforeLoad: config.beforeLoad,\n loader: config.loader,\n };\n\n // 如果有 path,使用 path;否则使用 id(用于布局路由)\n if (config.path) {\n routeOptions.path = config.path;\n } else if (config.id) {\n routeOptions.id = config.id;\n }\n\n const currentRoute = createRoute(routeOptions);\n\n // Keep the actual hierarchy so pathless/layout guards and context reach descendants.\n if (config.children && config.children.length > 0) {\n currentRoute.addChildren(config.children.map(childConfig => createRoutesRecursive(childConfig, currentRoute)));\n }\n\n return currentRoute;\n}\n\n/**\n * 构建路由器\n * @param config 路由构建器配置\n * @returns TanStack Router 实例\n */\nexport function buildRouter(config: RouterBuilderConfig) {\n const rootRoute = createRootRoute({\n component: config.rootComponent,\n beforeLoad: config.beforeLoad,\n notFoundComponent: config.notFoundComponent ?? DefaultNotFound,\n });\n\n const routeTree = rootRoute.addChildren(config.routes.map(routeConfig => createRoutesRecursive(routeConfig, rootRoute)));\n\n const router = createRouter({\n routeTree,\n basepath: config.basepath,\n defaultNotFoundComponent: config.notFoundComponent ?? DefaultNotFound,\n });\n\n return router;\n}\n\nfunction DefaultNotFound() {\n return (\n <div style={{ textAlign: 'center', padding: '4rem 1rem' }}>\n <h1 style={{ fontSize: '3rem', fontWeight: 700, margin: 0 }}>404</h1>\n <p style={{ color: '#666', marginTop: '0.5rem' }}>Page not found</p>\n </div>\n );\n}\n\n/**\n * 从扁平路由配置创建路由器(简化版)\n * @param routes 路由配置数组\n * @param rootComponent 根路由组件\n * @returns TanStack Router 实例\n */\nexport function createRouterFromConfig(\n routes: RouteConfig[],\n rootComponent?: RouteComponent,\n options?: Pick<RouterBuilderConfig, 'basepath' | 'notFoundComponent' | 'beforeLoad'>\n) {\n return buildRouter({\n routes,\n rootComponent,\n basepath: options?.basepath,\n beforeLoad: options?.beforeLoad,\n notFoundComponent: options?.notFoundComponent,\n });\n}\n\n"],"mappings":";;;;AAiDA,SAAS,EACL,GACA,GACQ;CAKR,IAAM,IAAoB;EACtB,sBAAsB;EACtB,WAAW,EAAO;EAClB,YAAY,EAAO;EACnB,QAAQ,EAAO;CACnB;CAGA,AAAI,EAAO,OACP,EAAa,OAAO,EAAO,OACpB,EAAO,OACd,EAAa,KAAK,EAAO;CAG7B,IAAM,IAAe,EAAY,CAAY;CAO7C,OAJI,EAAO,YAAY,EAAO,SAAS,SAAS,KAC5C,EAAa,YAAY,EAAO,SAAS,KAAI,MAAe,EAAsB,GAAa,CAAY,CAAC,CAAC,GAG1G;AACX;AAOA,SAAgB,EAAY,GAA6B;CACrD,IAAM,IAAY,EAAgB;EAC9B,WAAW,EAAO;EAClB,YAAY,EAAO;EACnB,mBAAmB,EAAO,qBAAqB;CACnD,CAAC,GAEK,IAAY,EAAU,YAAY,EAAO,OAAO,KAAI,MAAe,EAAsB,GAAa,CAAS,CAAC,CAAC;CAQvH,OANe,EAAa;EACxB;EACA,UAAU,EAAO;EACjB,0BAA0B,EAAO,qBAAqB;CAC1D,CAEO;AACX;AAEA,SAAS,IAAkB;CACvB,OACI,kBAAC,OAAD;EAAK,OAAO;GAAE,WAAW;GAAU,SAAS;EAAY;EAAxD,UAAA,CACI,kBAAC,MAAD;GAAI,OAAO;IAAE,UAAU;IAAQ,YAAY;IAAK,QAAQ;GAAE;GAAG,UAAA;EAAO,CAAA,GACpE,kBAAC,KAAD;GAAG,OAAO;IAAE,OAAO;IAAQ,WAAW;GAAS;GAAG,UAAA;EAAiB,CAAA,CAClE;;AAEb;AAQA,SAAgB,EACZ,GACA,GACA,GACF;CACE,OAAO,EAAY;EACf;EACA;EACA,UAAU,GAAS;EACnB,YAAY,GAAS;EACrB,mBAAmB,GAAS;CAChC,CAAC;AACL"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Best-effort persistence: unavailable/blocked storage must not break in-memory UI state. */
|
|
2
|
+
export declare const safeStorage: {
|
|
3
|
+
getItem(key: string): string | null;
|
|
4
|
+
setItem(key: string, value: string): boolean;
|
|
5
|
+
removeItem(key: string): boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function readStoredJSON<T>(key: string, isValid: (value: unknown) => value is T, fallback: T): T;
|
|
8
|
+
export declare function writeStoredJSON(key: string, value: unknown): boolean;
|