@uipath/apollo-wind 0.9.1 → 0.10.0-pr219.61d64eb
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/custom/canvas.cjs +44 -0
- package/dist/components/custom/canvas.d.ts +14 -0
- package/dist/components/custom/canvas.js +10 -0
- package/dist/components/custom/chat-composer.cjs +105 -0
- package/dist/components/custom/chat-composer.d.ts +15 -0
- package/dist/components/custom/chat-composer.js +71 -0
- package/dist/components/custom/chat-first-experience.cjs +87 -0
- package/dist/components/custom/chat-first-experience.d.ts +24 -0
- package/dist/components/custom/chat-first-experience.js +53 -0
- package/dist/components/custom/chat-prompt-suggestions.cjs +48 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +14 -0
- package/dist/components/custom/chat-steps-view.cjs +307 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +273 -0
- package/dist/components/custom/flow-node.cjs +76 -0
- package/dist/components/custom/flow-node.d.ts +20 -0
- package/dist/components/custom/flow-node.js +42 -0
- package/dist/components/custom/flow-properties-bar.cjs +101 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +67 -0
- package/dist/components/custom/flow-properties-expanded.cjs +324 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +19 -0
- package/dist/components/custom/flow-properties-expanded.js +290 -0
- package/dist/components/custom/flow-properties-simple.cjs +357 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +323 -0
- package/dist/components/custom/flow-properties.cjs +56 -0
- package/dist/components/custom/flow-properties.d.ts +28 -0
- package/dist/components/custom/flow-properties.js +22 -0
- package/dist/components/custom/global-header.cjs +415 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +381 -0
- package/dist/components/custom/grid-maestro.cjs +62 -0
- package/dist/components/custom/grid-maestro.d.ts +19 -0
- package/dist/components/custom/grid-maestro.js +22 -0
- package/dist/components/custom/panel-delegate.cjs +280 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +246 -0
- package/dist/components/custom/panel-flow.cjs +260 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +223 -0
- package/dist/components/custom/panel-maestro.cjs +73 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +39 -0
- package/dist/components/custom/toolbar-canvas.cjs +121 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +87 -0
- package/dist/components/custom/toolbar-view.cjs +119 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +85 -0
- package/dist/components/custom/viewport-guard.cjs +92 -0
- package/dist/components/custom/viewport-guard.d.ts +23 -0
- package/dist/components/custom/viewport-guard.js +55 -0
- package/dist/components/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +218 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +169 -0
- package/dist/components/ui/data-table.cjs +14 -2
- package/dist/components/ui/data-table.d.ts +4 -1
- package/dist/components/ui/data-table.js +15 -3
- package/dist/components/ui/empty-state.cjs +17 -6
- package/dist/components/ui/empty-state.d.ts +7 -0
- package/dist/components/ui/empty-state.js +17 -6
- package/dist/components/ui/file-upload.cjs +82 -42
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +82 -42
- package/dist/components/ui/index.cjs +289 -149
- package/dist/components/ui/index.d.ts +2 -3
- package/dist/components/ui/index.js +2 -3
- package/dist/components/ui/tree-view.cjs +1101 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1067 -0
- package/dist/foundation/Future/colors.cjs +92 -0
- package/dist/foundation/Future/colors.d.ts +132 -0
- package/dist/foundation/Future/colors.js +43 -0
- package/dist/foundation/Future/radius.cjs +46 -0
- package/dist/foundation/Future/radius.d.ts +33 -0
- package/dist/foundation/Future/radius.js +12 -0
- package/dist/foundation/Future/responsive.cjs +49 -0
- package/dist/foundation/Future/responsive.d.ts +40 -0
- package/dist/foundation/Future/responsive.js +12 -0
- package/dist/foundation/Future/shadows.cjs +48 -0
- package/dist/foundation/Future/shadows.d.ts +29 -0
- package/dist/foundation/Future/shadows.js +11 -0
- package/dist/foundation/Future/spacing.cjs +71 -0
- package/dist/foundation/Future/spacing.d.ts +80 -0
- package/dist/foundation/Future/spacing.js +31 -0
- package/dist/foundation/Future/strokes.cjs +59 -0
- package/dist/foundation/Future/strokes.d.ts +49 -0
- package/dist/foundation/Future/strokes.js +19 -0
- package/dist/foundation/Future/types.cjs +18 -0
- package/dist/foundation/Future/types.d.ts +18 -0
- package/dist/foundation/Future/types.js +0 -0
- package/dist/foundation/Future/typography.cjs +79 -0
- package/dist/foundation/Future/typography.d.ts +86 -0
- package/dist/foundation/Future/typography.js +33 -0
- package/dist/index.cjs +125 -219
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/src/foundation/Future/themes.css +371 -0
- package/dist/styles.css +1704 -582
- package/dist/tailwind.css +4 -0
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +105 -0
- package/dist/templates/Delegate/template-delegate.d.ts +26 -0
- package/dist/templates/EmptyErrors/error-components.d.ts +3 -0
- package/dist/templates/Experiments/ideas-AnimatedGradientText.d.ts +23 -0
- package/dist/templates/Flow/template-flow.d.ts +52 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +10 -1
- package/dist/components/ui/menubar.cjs +0 -210
- package/dist/components/ui/menubar.d.ts +0 -28
- package/dist/components/ui/menubar.js +0 -131
- package/dist/components/ui/navigation-menu.cjs +0 -122
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.js +0 -64
- package/dist/examples/admin-layout-example.cjs +0 -490
- package/dist/examples/admin-layout-example.d.ts +0 -92
- package/dist/examples/admin-layout-example.js +0 -411
- package/dist/examples/app-shell-example.cjs +0 -452
- package/dist/examples/app-shell-example.d.ts +0 -52
- package/dist/examples/app-shell-example.js +0 -418
- package/dist/examples/dashboard-example.cjs +0 -590
- package/dist/examples/dashboard-example.d.ts +0 -11
- package/dist/examples/dashboard-example.js +0 -556
- package/dist/examples/data-management-example.cjs +0 -584
- package/dist/examples/data-management-example.d.ts +0 -1
- package/dist/examples/data-management-example.js +0 -550
- package/dist/examples/flow-editor-layout-example.cjs +0 -309
- package/dist/examples/flow-editor-layout-example.d.ts +0 -22
- package/dist/examples/flow-editor-layout-example.js +0 -269
- package/dist/examples/flow-start-example.cjs +0 -467
- package/dist/examples/flow-start-example.d.ts +0 -30
- package/dist/examples/flow-start-example.js +0 -433
- package/dist/examples/form-builder-example.cjs +0 -674
- package/dist/examples/form-builder-example.js +0 -640
- package/dist/examples/new-project-example.cjs +0 -550
- package/dist/examples/new-project-example.d.ts +0 -30
- package/dist/examples/new-project-example.js +0 -516
- package/dist/examples/settings-example.cjs +0 -864
- package/dist/examples/settings-example.d.ts +0 -1
- package/dist/examples/settings-example.js +0 -830
- package/dist/examples/vscode-example.cjs +0 -340
- package/dist/examples/vscode-example.d.ts +0 -80
- package/dist/examples/vscode-example.js +0 -270
- package/dist/templates/admin-layout-example.d.ts +0 -92
- package/dist/templates/app-shell-example.d.ts +0 -52
- package/dist/templates/dashboard-example.d.ts +0 -11
- package/dist/templates/data-management-example.d.ts +0 -1
- package/dist/templates/flow-editor-layout-example.d.ts +0 -22
- package/dist/templates/flow-start-example.d.ts +0 -30
- package/dist/templates/form-builder-example.d.ts +0 -1
- package/dist/templates/new-project-example.d.ts +0 -30
- package/dist/templates/settings-example.d.ts +0 -1
- /package/dist/{examples → templates/Forms}/form-builder-example.d.ts +0 -0
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from "react";
|
|
3
|
-
import { cn } from "../lib/index.js";
|
|
4
|
-
import { Bell, ChevronsLeft, ChevronsRight, HelpCircle, Plus, Search } from "lucide-react";
|
|
5
|
-
import { Button } from "../components/ui/button.js";
|
|
6
|
-
import { ScrollArea } from "../components/ui/scroll-area.js";
|
|
7
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../components/ui/select.js";
|
|
8
|
-
import { Tabs, TabsList, TabsTrigger } from "../components/ui/tabs.js";
|
|
9
|
-
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../components/ui/breadcrumb.js";
|
|
10
|
-
import { DataTable, DataTableColumnHeader, DataTableSelectColumn } from "../components/ui/data-table.js";
|
|
11
|
-
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../components/ui/pagination.js";
|
|
12
|
-
import { Column, Row } from "../components/ui/layout/index.js";
|
|
13
|
-
function AdminLayout({ className, children, ...props }) {
|
|
14
|
-
return /*#__PURE__*/ jsx("div", {
|
|
15
|
-
className: cn('flex h-[700px] w-full flex-col overflow-hidden rounded-lg border bg-background', className),
|
|
16
|
-
...props,
|
|
17
|
-
children: children
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function AdminHeader({ className, logo, title, children, ...props }) {
|
|
21
|
-
return /*#__PURE__*/ jsxs("header", {
|
|
22
|
-
className: cn('flex h-14 items-center justify-between border-b bg-background px-4', className),
|
|
23
|
-
...props,
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
26
|
-
gap: 3,
|
|
27
|
-
align: "center",
|
|
28
|
-
children: [
|
|
29
|
-
logo,
|
|
30
|
-
title && /*#__PURE__*/ jsx("span", {
|
|
31
|
-
className: "text-lg font-semibold",
|
|
32
|
-
children: title
|
|
33
|
-
})
|
|
34
|
-
]
|
|
35
|
-
}),
|
|
36
|
-
/*#__PURE__*/ jsx(Row, {
|
|
37
|
-
gap: 2,
|
|
38
|
-
align: "center",
|
|
39
|
-
children: children
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function AdminHeaderActions({ notifications, avatar }) {
|
|
45
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
46
|
-
gap: 1,
|
|
47
|
-
align: "center",
|
|
48
|
-
children: [
|
|
49
|
-
/*#__PURE__*/ jsxs(Button, {
|
|
50
|
-
variant: "ghost",
|
|
51
|
-
size: "icon",
|
|
52
|
-
className: "relative",
|
|
53
|
-
children: [
|
|
54
|
-
/*#__PURE__*/ jsx(Bell, {
|
|
55
|
-
className: "h-5 w-5"
|
|
56
|
-
}),
|
|
57
|
-
notifications && notifications > 0 && /*#__PURE__*/ jsx("span", {
|
|
58
|
-
className: "absolute -right-0.5 -top-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground",
|
|
59
|
-
children: notifications
|
|
60
|
-
})
|
|
61
|
-
]
|
|
62
|
-
}),
|
|
63
|
-
/*#__PURE__*/ jsx(Button, {
|
|
64
|
-
variant: "ghost",
|
|
65
|
-
size: "icon",
|
|
66
|
-
children: /*#__PURE__*/ jsx(HelpCircle, {
|
|
67
|
-
className: "h-5 w-5"
|
|
68
|
-
})
|
|
69
|
-
}),
|
|
70
|
-
avatar || /*#__PURE__*/ jsx("div", {
|
|
71
|
-
className: "ml-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
|
|
72
|
-
children: "SN"
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function AdminContent({ className, children, ...props }) {
|
|
78
|
-
return /*#__PURE__*/ jsx(Row, {
|
|
79
|
-
flex: 1,
|
|
80
|
-
overflow: "hidden",
|
|
81
|
-
className: className,
|
|
82
|
-
...props,
|
|
83
|
-
children: children
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function AdminSidebar({ className, children, width = 280, ...props }) {
|
|
87
|
-
return /*#__PURE__*/ jsx(Column, {
|
|
88
|
-
className: cn('border-r bg-muted/30', className),
|
|
89
|
-
style: {
|
|
90
|
-
width
|
|
91
|
-
},
|
|
92
|
-
...props,
|
|
93
|
-
children: children
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function AdminSidebarHeader({ title, onSearch, onAdd }) {
|
|
97
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
98
|
-
justify: "between",
|
|
99
|
-
align: "center",
|
|
100
|
-
className: "border-b px-4 py-3",
|
|
101
|
-
children: [
|
|
102
|
-
/*#__PURE__*/ jsx("span", {
|
|
103
|
-
className: "text-sm font-medium",
|
|
104
|
-
children: title
|
|
105
|
-
}),
|
|
106
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
107
|
-
gap: 1,
|
|
108
|
-
align: "center",
|
|
109
|
-
children: [
|
|
110
|
-
onSearch && /*#__PURE__*/ jsx(Button, {
|
|
111
|
-
variant: "ghost",
|
|
112
|
-
size: "icon",
|
|
113
|
-
className: "h-7 w-7",
|
|
114
|
-
onClick: onSearch,
|
|
115
|
-
children: /*#__PURE__*/ jsx(Search, {
|
|
116
|
-
className: "h-4 w-4"
|
|
117
|
-
})
|
|
118
|
-
}),
|
|
119
|
-
onAdd && /*#__PURE__*/ jsx(Button, {
|
|
120
|
-
variant: "ghost",
|
|
121
|
-
size: "icon",
|
|
122
|
-
className: "h-7 w-7",
|
|
123
|
-
onClick: onAdd,
|
|
124
|
-
children: /*#__PURE__*/ jsx(Plus, {
|
|
125
|
-
className: "h-4 w-4"
|
|
126
|
-
})
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
})
|
|
130
|
-
]
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function AdminSidebarNav({ items, selectedId, onSelect }) {
|
|
134
|
-
return /*#__PURE__*/ jsx(ScrollArea, {
|
|
135
|
-
className: "flex-1",
|
|
136
|
-
children: /*#__PURE__*/ jsx("nav", {
|
|
137
|
-
className: "p-2",
|
|
138
|
-
children: items.map((item)=>/*#__PURE__*/ jsxs(Row, {
|
|
139
|
-
gap: 2,
|
|
140
|
-
align: "center",
|
|
141
|
-
className: cn('cursor-pointer rounded-md px-3 py-2 text-sm transition-colors', selectedId === item.id ? 'bg-primary/10 text-primary' : 'text-muted-foreground hover:bg-muted hover:text-foreground'),
|
|
142
|
-
onClick: ()=>onSelect?.(item.id),
|
|
143
|
-
children: [
|
|
144
|
-
item.icon,
|
|
145
|
-
/*#__PURE__*/ jsx("span", {
|
|
146
|
-
className: "flex-1 truncate",
|
|
147
|
-
children: item.label
|
|
148
|
-
}),
|
|
149
|
-
item.badge
|
|
150
|
-
]
|
|
151
|
-
}, item.id))
|
|
152
|
-
})
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function AdminMain({ className, children, ...props }) {
|
|
156
|
-
return /*#__PURE__*/ jsx(Column, {
|
|
157
|
-
flex: 1,
|
|
158
|
-
overflow: "hidden",
|
|
159
|
-
className: className,
|
|
160
|
-
...props,
|
|
161
|
-
children: children
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
function AdminBreadcrumb({ items }) {
|
|
165
|
-
return /*#__PURE__*/ jsx(Breadcrumb, {
|
|
166
|
-
children: /*#__PURE__*/ jsx(BreadcrumbList, {
|
|
167
|
-
children: items.map((item, index)=>/*#__PURE__*/ jsxs(Fragment, {
|
|
168
|
-
children: [
|
|
169
|
-
index > 0 && /*#__PURE__*/ jsx(BreadcrumbSeparator, {}),
|
|
170
|
-
/*#__PURE__*/ jsx(BreadcrumbItem, {
|
|
171
|
-
children: index === items.length - 1 ? /*#__PURE__*/ jsx(BreadcrumbPage, {
|
|
172
|
-
children: item.label
|
|
173
|
-
}) : /*#__PURE__*/ jsx(BreadcrumbLink, {
|
|
174
|
-
href: item.href || '#',
|
|
175
|
-
children: item.label
|
|
176
|
-
})
|
|
177
|
-
})
|
|
178
|
-
]
|
|
179
|
-
}, item.label))
|
|
180
|
-
})
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
function AdminPageHeader({ title, breadcrumb, actions, tabs, activeTab, onTabChange }) {
|
|
184
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
185
|
-
className: "border-b px-6 py-4",
|
|
186
|
-
children: [
|
|
187
|
-
breadcrumb && /*#__PURE__*/ jsx("div", {
|
|
188
|
-
className: "mb-2",
|
|
189
|
-
children: /*#__PURE__*/ jsx(AdminBreadcrumb, {
|
|
190
|
-
items: breadcrumb
|
|
191
|
-
})
|
|
192
|
-
}),
|
|
193
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
194
|
-
justify: "between",
|
|
195
|
-
align: "center",
|
|
196
|
-
children: [
|
|
197
|
-
/*#__PURE__*/ jsx("h1", {
|
|
198
|
-
className: "text-xl font-semibold",
|
|
199
|
-
children: title
|
|
200
|
-
}),
|
|
201
|
-
actions && /*#__PURE__*/ jsx(Row, {
|
|
202
|
-
gap: 2,
|
|
203
|
-
align: "center",
|
|
204
|
-
children: actions
|
|
205
|
-
})
|
|
206
|
-
]
|
|
207
|
-
}),
|
|
208
|
-
tabs && /*#__PURE__*/ jsx(Tabs, {
|
|
209
|
-
value: activeTab,
|
|
210
|
-
onValueChange: onTabChange,
|
|
211
|
-
className: "mt-4",
|
|
212
|
-
children: /*#__PURE__*/ jsx(TabsList, {
|
|
213
|
-
className: "h-auto bg-transparent p-0",
|
|
214
|
-
children: tabs.map((tab)=>/*#__PURE__*/ jsx(TabsTrigger, {
|
|
215
|
-
value: tab.value,
|
|
216
|
-
className: "rounded-none border-b-2 border-transparent px-4 pb-2 pt-1 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
217
|
-
children: tab.label
|
|
218
|
-
}, tab.value))
|
|
219
|
-
})
|
|
220
|
-
})
|
|
221
|
-
]
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
function AdminToolbar({ children, actions }) {
|
|
225
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
226
|
-
justify: "between",
|
|
227
|
-
align: "center",
|
|
228
|
-
className: "border-b px-6 py-3",
|
|
229
|
-
children: [
|
|
230
|
-
/*#__PURE__*/ jsx(Row, {
|
|
231
|
-
gap: 3,
|
|
232
|
-
align: "center",
|
|
233
|
-
children: children
|
|
234
|
-
}),
|
|
235
|
-
/*#__PURE__*/ jsx(Row, {
|
|
236
|
-
gap: 2,
|
|
237
|
-
align: "center",
|
|
238
|
-
children: actions
|
|
239
|
-
})
|
|
240
|
-
]
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
function AdminFilter({ label, value, options, onValueChange }) {
|
|
244
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
245
|
-
gap: 1.5,
|
|
246
|
-
align: "center",
|
|
247
|
-
className: "text-sm",
|
|
248
|
-
children: [
|
|
249
|
-
/*#__PURE__*/ jsxs("span", {
|
|
250
|
-
className: "text-muted-foreground",
|
|
251
|
-
children: [
|
|
252
|
-
label,
|
|
253
|
-
":"
|
|
254
|
-
]
|
|
255
|
-
}),
|
|
256
|
-
/*#__PURE__*/ jsxs(Select, {
|
|
257
|
-
value: value,
|
|
258
|
-
onValueChange: onValueChange,
|
|
259
|
-
children: [
|
|
260
|
-
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
261
|
-
className: "h-7 w-auto gap-1 border-0 bg-transparent px-1 font-medium shadow-none",
|
|
262
|
-
children: /*#__PURE__*/ jsx(SelectValue, {})
|
|
263
|
-
}),
|
|
264
|
-
/*#__PURE__*/ jsx(SelectContent, {
|
|
265
|
-
children: options.map((option)=>/*#__PURE__*/ jsx(SelectItem, {
|
|
266
|
-
value: option.value,
|
|
267
|
-
children: option.label
|
|
268
|
-
}, option.value))
|
|
269
|
-
})
|
|
270
|
-
]
|
|
271
|
-
})
|
|
272
|
-
]
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
function AdminPagination({ total, page, pageSize, onPageChange, onPageSizeChange }) {
|
|
276
|
-
const totalPages = Math.ceil(total / pageSize);
|
|
277
|
-
const start = (page - 1) * pageSize + 1;
|
|
278
|
-
const end = Math.min(page * pageSize, total);
|
|
279
|
-
const getPageNumbers = ()=>{
|
|
280
|
-
const pages = [];
|
|
281
|
-
const delta = 1;
|
|
282
|
-
for(let i = 1; i <= totalPages; i++)if (1 === i || i === totalPages || i >= page - delta && i <= page + delta) pages.push(i);
|
|
283
|
-
return pages;
|
|
284
|
-
};
|
|
285
|
-
const pageNumbers = getPageNumbers();
|
|
286
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
287
|
-
justify: "between",
|
|
288
|
-
align: "center",
|
|
289
|
-
className: "border-t px-6 py-3",
|
|
290
|
-
children: [
|
|
291
|
-
/*#__PURE__*/ jsxs("span", {
|
|
292
|
-
className: "text-sm text-muted-foreground",
|
|
293
|
-
children: [
|
|
294
|
-
start,
|
|
295
|
-
" - ",
|
|
296
|
-
end,
|
|
297
|
-
" / ",
|
|
298
|
-
total
|
|
299
|
-
]
|
|
300
|
-
}),
|
|
301
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
302
|
-
gap: 4,
|
|
303
|
-
align: "center",
|
|
304
|
-
children: [
|
|
305
|
-
/*#__PURE__*/ jsx(Pagination, {
|
|
306
|
-
children: /*#__PURE__*/ jsxs(PaginationContent, {
|
|
307
|
-
children: [
|
|
308
|
-
/*#__PURE__*/ jsx(PaginationItem, {
|
|
309
|
-
children: /*#__PURE__*/ jsx(Button, {
|
|
310
|
-
variant: "ghost",
|
|
311
|
-
size: "icon",
|
|
312
|
-
className: "h-8 w-8",
|
|
313
|
-
disabled: 1 === page,
|
|
314
|
-
onClick: ()=>onPageChange?.(1),
|
|
315
|
-
children: /*#__PURE__*/ jsx(ChevronsLeft, {
|
|
316
|
-
className: "h-4 w-4"
|
|
317
|
-
})
|
|
318
|
-
})
|
|
319
|
-
}),
|
|
320
|
-
/*#__PURE__*/ jsx(PaginationItem, {
|
|
321
|
-
children: /*#__PURE__*/ jsx(PaginationPrevious, {
|
|
322
|
-
onClick: ()=>page > 1 && onPageChange?.(page - 1),
|
|
323
|
-
className: cn(1 === page && 'pointer-events-none opacity-50')
|
|
324
|
-
})
|
|
325
|
-
}),
|
|
326
|
-
pageNumbers.map((pageNum, index)=>{
|
|
327
|
-
const prevPage = pageNumbers[index - 1];
|
|
328
|
-
const showEllipsis = prevPage && pageNum - prevPage > 1;
|
|
329
|
-
return /*#__PURE__*/ jsxs(Fragment, {
|
|
330
|
-
children: [
|
|
331
|
-
showEllipsis && /*#__PURE__*/ jsx(PaginationItem, {
|
|
332
|
-
children: /*#__PURE__*/ jsx(PaginationEllipsis, {})
|
|
333
|
-
}),
|
|
334
|
-
/*#__PURE__*/ jsx(PaginationItem, {
|
|
335
|
-
children: /*#__PURE__*/ jsx(PaginationLink, {
|
|
336
|
-
onClick: ()=>onPageChange?.(pageNum),
|
|
337
|
-
isActive: page === pageNum,
|
|
338
|
-
children: pageNum
|
|
339
|
-
})
|
|
340
|
-
})
|
|
341
|
-
]
|
|
342
|
-
}, pageNum);
|
|
343
|
-
}),
|
|
344
|
-
/*#__PURE__*/ jsx(PaginationItem, {
|
|
345
|
-
children: /*#__PURE__*/ jsx(PaginationNext, {
|
|
346
|
-
onClick: ()=>page < totalPages && onPageChange?.(page + 1),
|
|
347
|
-
className: cn(page === totalPages && 'pointer-events-none opacity-50')
|
|
348
|
-
})
|
|
349
|
-
}),
|
|
350
|
-
/*#__PURE__*/ jsx(PaginationItem, {
|
|
351
|
-
children: /*#__PURE__*/ jsx(Button, {
|
|
352
|
-
variant: "ghost",
|
|
353
|
-
size: "icon",
|
|
354
|
-
className: "h-8 w-8",
|
|
355
|
-
disabled: page === totalPages,
|
|
356
|
-
onClick: ()=>onPageChange?.(totalPages),
|
|
357
|
-
children: /*#__PURE__*/ jsx(ChevronsRight, {
|
|
358
|
-
className: "h-4 w-4"
|
|
359
|
-
})
|
|
360
|
-
})
|
|
361
|
-
})
|
|
362
|
-
]
|
|
363
|
-
})
|
|
364
|
-
}),
|
|
365
|
-
onPageSizeChange && /*#__PURE__*/ jsxs(Row, {
|
|
366
|
-
gap: 2,
|
|
367
|
-
align: "center",
|
|
368
|
-
className: "text-sm",
|
|
369
|
-
children: [
|
|
370
|
-
/*#__PURE__*/ jsx("span", {
|
|
371
|
-
className: "text-muted-foreground",
|
|
372
|
-
children: "Items"
|
|
373
|
-
}),
|
|
374
|
-
/*#__PURE__*/ jsxs(Select, {
|
|
375
|
-
value: String(pageSize),
|
|
376
|
-
onValueChange: (v)=>onPageSizeChange(Number(v)),
|
|
377
|
-
children: [
|
|
378
|
-
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
379
|
-
className: "h-8 w-16",
|
|
380
|
-
children: /*#__PURE__*/ jsx(SelectValue, {})
|
|
381
|
-
}),
|
|
382
|
-
/*#__PURE__*/ jsxs(SelectContent, {
|
|
383
|
-
children: [
|
|
384
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
385
|
-
value: "10",
|
|
386
|
-
children: "10"
|
|
387
|
-
}),
|
|
388
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
389
|
-
value: "25",
|
|
390
|
-
children: "25"
|
|
391
|
-
}),
|
|
392
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
393
|
-
value: "50",
|
|
394
|
-
children: "50"
|
|
395
|
-
}),
|
|
396
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
397
|
-
value: "100",
|
|
398
|
-
children: "100"
|
|
399
|
-
})
|
|
400
|
-
]
|
|
401
|
-
})
|
|
402
|
-
]
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
})
|
|
406
|
-
]
|
|
407
|
-
})
|
|
408
|
-
]
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
export { AdminBreadcrumb, AdminContent, AdminFilter, AdminHeader, AdminHeaderActions, AdminLayout, AdminMain, AdminPageHeader, AdminPagination, AdminSidebar, AdminSidebarHeader, AdminSidebarNav, DataTable as AdminTable, AdminToolbar, DataTableColumnHeader, DataTableSelectColumn };
|