@uipath/apollo-wind 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/archived-ui-path.svg +3 -0
- package/dist/components/ui/index.cjs +2 -2
- package/dist/examples/admin-layout-example.cjs +490 -0
- package/dist/examples/admin-layout-example.js +411 -0
- package/dist/examples/app-shell-example.cjs +452 -0
- package/dist/examples/app-shell-example.js +418 -0
- package/dist/examples/dashboard-example.cjs +590 -0
- package/dist/examples/dashboard-example.js +556 -0
- package/dist/examples/data-management-example.cjs +584 -0
- package/dist/examples/data-management-example.js +550 -0
- package/dist/examples/flow-editor-layout-example.cjs +309 -0
- package/dist/examples/flow-editor-layout-example.js +269 -0
- package/dist/examples/flow-start-example.cjs +467 -0
- package/dist/examples/flow-start-example.js +433 -0
- package/dist/examples/form-builder-example.cjs +674 -0
- package/dist/examples/form-builder-example.js +640 -0
- package/dist/examples/new-project-example.cjs +550 -0
- package/dist/examples/new-project-example.js +516 -0
- package/dist/examples/settings-example.cjs +864 -0
- package/dist/examples/settings-example.js +830 -0
- package/dist/examples/vscode-example.cjs +340 -0
- package/dist/examples/vscode-example.js +270 -0
- package/dist/templates/admin-layout-example.d.ts +92 -0
- package/dist/templates/app-shell-example.d.ts +52 -0
- package/dist/templates/dashboard-example.d.ts +11 -0
- package/dist/templates/data-management-example.d.ts +1 -0
- package/dist/templates/flow-editor-layout-example.d.ts +22 -0
- package/dist/templates/flow-start-example.d.ts +30 -0
- package/dist/templates/form-builder-example.d.ts +1 -0
- package/dist/templates/new-project-example.d.ts +30 -0
- package/dist/templates/settings-example.d.ts +1 -0
- package/dist/templates/vscode-example.d.ts +80 -0
- package/dist/ui-path.svg +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6179 17.3024H17.6084V9.47711H15.6179V17.3024ZM17.8341 7.34C17.8341 8.04697 17.3202 8.52899 16.6141 8.52899C15.9079 8.52899 15.394 8.04697 15.394 7.34C15.394 6.61697 15.9079 6.11888 16.6141 6.11888C17.3202 6.11888 17.8341 6.61697 17.8341 7.34ZM12.0546 7.34001H14.0452V13.1729C14.0452 15.808 12.5522 17.3989 10.032 17.3989C7.5599 17.3989 6.09905 15.8401 6.09905 13.1729V7.34001H8.0896V13.1729C8.0896 14.6351 8.69955 15.5188 10.0801 15.5188C11.4126 15.5188 12.0546 14.6833 12.0546 13.1729V7.34001ZM4.36597 19.6323H19.6158V4.36735H4.36597V19.6323ZM2.375 21.625H21.606V2.375H2.375V21.625Z" fill="#FA4616"/>
|
|
3
|
+
</svg>
|
|
@@ -159,7 +159,7 @@ var __webpack_modules__ = {
|
|
|
159
159
|
"./toggle-group": function(module) {
|
|
160
160
|
module.exports = require("./toggle-group.cjs");
|
|
161
161
|
},
|
|
162
|
-
"
|
|
162
|
+
"@/components/ui/toggle": function(module) {
|
|
163
163
|
module.exports = require("./toggle.cjs");
|
|
164
164
|
},
|
|
165
165
|
"./tooltip": function(module) {
|
|
@@ -527,7 +527,7 @@ var __webpack_exports__ = {};
|
|
|
527
527
|
return _toggle_group__WEBPACK_IMPORTED_MODULE_52__[key];
|
|
528
528
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
529
529
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
530
|
-
var _toggle__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__("
|
|
530
|
+
var _toggle__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__("@/components/ui/toggle");
|
|
531
531
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
532
532
|
for(var __WEBPACK_IMPORT_KEY__ in _toggle__WEBPACK_IMPORTED_MODULE_53__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
533
533
|
return _toggle__WEBPACK_IMPORTED_MODULE_53__[key];
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
AdminFilter: ()=>AdminFilter,
|
|
28
|
+
AdminHeaderActions: ()=>AdminHeaderActions,
|
|
29
|
+
AdminMain: ()=>AdminMain,
|
|
30
|
+
AdminSidebarHeader: ()=>AdminSidebarHeader,
|
|
31
|
+
AdminSidebarNav: ()=>AdminSidebarNav,
|
|
32
|
+
AdminContent: ()=>AdminContent,
|
|
33
|
+
AdminToolbar: ()=>AdminToolbar,
|
|
34
|
+
AdminSidebar: ()=>AdminSidebar,
|
|
35
|
+
AdminLayout: ()=>AdminLayout,
|
|
36
|
+
AdminHeader: ()=>AdminHeader,
|
|
37
|
+
DataTableSelectColumn: ()=>data_table_cjs_namespaceObject.DataTableSelectColumn,
|
|
38
|
+
AdminTable: ()=>data_table_cjs_namespaceObject.DataTable,
|
|
39
|
+
DataTableColumnHeader: ()=>data_table_cjs_namespaceObject.DataTableColumnHeader,
|
|
40
|
+
AdminPagination: ()=>AdminPagination,
|
|
41
|
+
AdminPageHeader: ()=>AdminPageHeader,
|
|
42
|
+
AdminBreadcrumb: ()=>AdminBreadcrumb
|
|
43
|
+
});
|
|
44
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
+
const external_react_namespaceObject = require("react");
|
|
46
|
+
const index_cjs_namespaceObject = require("../lib/index.cjs");
|
|
47
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
48
|
+
const button_cjs_namespaceObject = require("../components/ui/button.cjs");
|
|
49
|
+
const scroll_area_cjs_namespaceObject = require("../components/ui/scroll-area.cjs");
|
|
50
|
+
const select_cjs_namespaceObject = require("../components/ui/select.cjs");
|
|
51
|
+
const tabs_cjs_namespaceObject = require("../components/ui/tabs.cjs");
|
|
52
|
+
const breadcrumb_cjs_namespaceObject = require("../components/ui/breadcrumb.cjs");
|
|
53
|
+
const data_table_cjs_namespaceObject = require("../components/ui/data-table.cjs");
|
|
54
|
+
const pagination_cjs_namespaceObject = require("../components/ui/pagination.cjs");
|
|
55
|
+
const layout_index_cjs_namespaceObject = require("../components/ui/layout/index.cjs");
|
|
56
|
+
function AdminLayout({ className, children, ...props }) {
|
|
57
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
58
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-[700px] w-full flex-col overflow-hidden rounded-lg border bg-background', className),
|
|
59
|
+
...props,
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function AdminHeader({ className, logo, title, children, ...props }) {
|
|
64
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("header", {
|
|
65
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-14 items-center justify-between border-b bg-background px-4', className),
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
69
|
+
gap: 3,
|
|
70
|
+
align: "center",
|
|
71
|
+
children: [
|
|
72
|
+
logo,
|
|
73
|
+
title && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
74
|
+
className: "text-lg font-semibold",
|
|
75
|
+
children: title
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
|
|
80
|
+
gap: 2,
|
|
81
|
+
align: "center",
|
|
82
|
+
children: children
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function AdminHeaderActions({ notifications, avatar }) {
|
|
88
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
89
|
+
gap: 1,
|
|
90
|
+
align: "center",
|
|
91
|
+
children: [
|
|
92
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
size: "icon",
|
|
95
|
+
className: "relative",
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Bell, {
|
|
98
|
+
className: "h-5 w-5"
|
|
99
|
+
}),
|
|
100
|
+
notifications && notifications > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
101
|
+
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",
|
|
102
|
+
children: notifications
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
107
|
+
variant: "ghost",
|
|
108
|
+
size: "icon",
|
|
109
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.HelpCircle, {
|
|
110
|
+
className: "h-5 w-5"
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
avatar || /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
114
|
+
className: "ml-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
|
|
115
|
+
children: "SN"
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function AdminContent({ className, children, ...props }) {
|
|
121
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
|
|
122
|
+
flex: 1,
|
|
123
|
+
overflow: "hidden",
|
|
124
|
+
className: className,
|
|
125
|
+
...props,
|
|
126
|
+
children: children
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function AdminSidebar({ className, children, width = 280, ...props }) {
|
|
130
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
|
|
131
|
+
className: (0, index_cjs_namespaceObject.cn)('border-r bg-muted/30', className),
|
|
132
|
+
style: {
|
|
133
|
+
width
|
|
134
|
+
},
|
|
135
|
+
...props,
|
|
136
|
+
children: children
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function AdminSidebarHeader({ title, onSearch, onAdd }) {
|
|
140
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
141
|
+
justify: "between",
|
|
142
|
+
align: "center",
|
|
143
|
+
className: "border-b px-4 py-3",
|
|
144
|
+
children: [
|
|
145
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
146
|
+
className: "text-sm font-medium",
|
|
147
|
+
children: title
|
|
148
|
+
}),
|
|
149
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
150
|
+
gap: 1,
|
|
151
|
+
align: "center",
|
|
152
|
+
children: [
|
|
153
|
+
onSearch && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
154
|
+
variant: "ghost",
|
|
155
|
+
size: "icon",
|
|
156
|
+
className: "h-7 w-7",
|
|
157
|
+
onClick: onSearch,
|
|
158
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
159
|
+
className: "h-4 w-4"
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
onAdd && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
163
|
+
variant: "ghost",
|
|
164
|
+
size: "icon",
|
|
165
|
+
className: "h-7 w-7",
|
|
166
|
+
onClick: onAdd,
|
|
167
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
168
|
+
className: "h-4 w-4"
|
|
169
|
+
})
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function AdminSidebarNav({ items, selectedId, onSelect }) {
|
|
177
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
178
|
+
className: "flex-1",
|
|
179
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
|
|
180
|
+
className: "p-2",
|
|
181
|
+
children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
182
|
+
gap: 2,
|
|
183
|
+
align: "center",
|
|
184
|
+
className: (0, index_cjs_namespaceObject.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'),
|
|
185
|
+
onClick: ()=>onSelect?.(item.id),
|
|
186
|
+
children: [
|
|
187
|
+
item.icon,
|
|
188
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
189
|
+
className: "flex-1 truncate",
|
|
190
|
+
children: item.label
|
|
191
|
+
}),
|
|
192
|
+
item.badge
|
|
193
|
+
]
|
|
194
|
+
}, item.id))
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function AdminMain({ className, children, ...props }) {
|
|
199
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
|
|
200
|
+
flex: 1,
|
|
201
|
+
overflow: "hidden",
|
|
202
|
+
className: className,
|
|
203
|
+
...props,
|
|
204
|
+
children: children
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function AdminBreadcrumb({ items }) {
|
|
208
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.Breadcrumb, {
|
|
209
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbList, {
|
|
210
|
+
children: items.map((item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
|
|
211
|
+
children: [
|
|
212
|
+
index > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbSeparator, {}),
|
|
213
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbItem, {
|
|
214
|
+
children: index === items.length - 1 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbPage, {
|
|
215
|
+
children: item.label
|
|
216
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbLink, {
|
|
217
|
+
href: item.href || '#',
|
|
218
|
+
children: item.label
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
}, item.label))
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function AdminPageHeader({ title, breadcrumb, actions, tabs, activeTab, onTabChange }) {
|
|
227
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
228
|
+
className: "border-b px-6 py-4",
|
|
229
|
+
children: [
|
|
230
|
+
breadcrumb && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
231
|
+
className: "mb-2",
|
|
232
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdminBreadcrumb, {
|
|
233
|
+
items: breadcrumb
|
|
234
|
+
})
|
|
235
|
+
}),
|
|
236
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
237
|
+
justify: "between",
|
|
238
|
+
align: "center",
|
|
239
|
+
children: [
|
|
240
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
241
|
+
className: "text-xl font-semibold",
|
|
242
|
+
children: title
|
|
243
|
+
}),
|
|
244
|
+
actions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
|
|
245
|
+
gap: 2,
|
|
246
|
+
align: "center",
|
|
247
|
+
children: actions
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
}),
|
|
251
|
+
tabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.Tabs, {
|
|
252
|
+
value: activeTab,
|
|
253
|
+
onValueChange: onTabChange,
|
|
254
|
+
className: "mt-4",
|
|
255
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsList, {
|
|
256
|
+
className: "h-auto bg-transparent p-0",
|
|
257
|
+
children: tabs.map((tab)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
258
|
+
value: tab.value,
|
|
259
|
+
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",
|
|
260
|
+
children: tab.label
|
|
261
|
+
}, tab.value))
|
|
262
|
+
})
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function AdminToolbar({ children, actions }) {
|
|
268
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
269
|
+
justify: "between",
|
|
270
|
+
align: "center",
|
|
271
|
+
className: "border-b px-6 py-3",
|
|
272
|
+
children: [
|
|
273
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
|
|
274
|
+
gap: 3,
|
|
275
|
+
align: "center",
|
|
276
|
+
children: children
|
|
277
|
+
}),
|
|
278
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
|
|
279
|
+
gap: 2,
|
|
280
|
+
align: "center",
|
|
281
|
+
children: actions
|
|
282
|
+
})
|
|
283
|
+
]
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function AdminFilter({ label, value, options, onValueChange }) {
|
|
287
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
288
|
+
gap: 1.5,
|
|
289
|
+
align: "center",
|
|
290
|
+
className: "text-sm",
|
|
291
|
+
children: [
|
|
292
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
293
|
+
className: "text-muted-foreground",
|
|
294
|
+
children: [
|
|
295
|
+
label,
|
|
296
|
+
":"
|
|
297
|
+
]
|
|
298
|
+
}),
|
|
299
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
300
|
+
value: value,
|
|
301
|
+
onValueChange: onValueChange,
|
|
302
|
+
children: [
|
|
303
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
|
|
304
|
+
className: "h-7 w-auto gap-1 border-0 bg-transparent px-1 font-medium shadow-none",
|
|
305
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
|
|
306
|
+
}),
|
|
307
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectContent, {
|
|
308
|
+
children: options.map((option)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
309
|
+
value: option.value,
|
|
310
|
+
children: option.label
|
|
311
|
+
}, option.value))
|
|
312
|
+
})
|
|
313
|
+
]
|
|
314
|
+
})
|
|
315
|
+
]
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
function AdminPagination({ total, page, pageSize, onPageChange, onPageSizeChange }) {
|
|
319
|
+
const totalPages = Math.ceil(total / pageSize);
|
|
320
|
+
const start = (page - 1) * pageSize + 1;
|
|
321
|
+
const end = Math.min(page * pageSize, total);
|
|
322
|
+
const getPageNumbers = ()=>{
|
|
323
|
+
const pages = [];
|
|
324
|
+
const delta = 1;
|
|
325
|
+
for(let i = 1; i <= totalPages; i++)if (1 === i || i === totalPages || i >= page - delta && i <= page + delta) pages.push(i);
|
|
326
|
+
return pages;
|
|
327
|
+
};
|
|
328
|
+
const pageNumbers = getPageNumbers();
|
|
329
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
330
|
+
justify: "between",
|
|
331
|
+
align: "center",
|
|
332
|
+
className: "border-t px-6 py-3",
|
|
333
|
+
children: [
|
|
334
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
335
|
+
className: "text-sm text-muted-foreground",
|
|
336
|
+
children: [
|
|
337
|
+
start,
|
|
338
|
+
" - ",
|
|
339
|
+
end,
|
|
340
|
+
" / ",
|
|
341
|
+
total
|
|
342
|
+
]
|
|
343
|
+
}),
|
|
344
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
345
|
+
gap: 4,
|
|
346
|
+
align: "center",
|
|
347
|
+
children: [
|
|
348
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.Pagination, {
|
|
349
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(pagination_cjs_namespaceObject.PaginationContent, {
|
|
350
|
+
children: [
|
|
351
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
352
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
353
|
+
variant: "ghost",
|
|
354
|
+
size: "icon",
|
|
355
|
+
className: "h-8 w-8",
|
|
356
|
+
disabled: 1 === page,
|
|
357
|
+
onClick: ()=>onPageChange?.(1),
|
|
358
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsLeft, {
|
|
359
|
+
className: "h-4 w-4"
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
}),
|
|
363
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
364
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationPrevious, {
|
|
365
|
+
onClick: ()=>page > 1 && onPageChange?.(page - 1),
|
|
366
|
+
className: (0, index_cjs_namespaceObject.cn)(1 === page && 'pointer-events-none opacity-50')
|
|
367
|
+
})
|
|
368
|
+
}),
|
|
369
|
+
pageNumbers.map((pageNum, index)=>{
|
|
370
|
+
const prevPage = pageNumbers[index - 1];
|
|
371
|
+
const showEllipsis = prevPage && pageNum - prevPage > 1;
|
|
372
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
|
|
373
|
+
children: [
|
|
374
|
+
showEllipsis && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
375
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationEllipsis, {})
|
|
376
|
+
}),
|
|
377
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
378
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationLink, {
|
|
379
|
+
onClick: ()=>onPageChange?.(pageNum),
|
|
380
|
+
isActive: page === pageNum,
|
|
381
|
+
children: pageNum
|
|
382
|
+
})
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
}, pageNum);
|
|
386
|
+
}),
|
|
387
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
388
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationNext, {
|
|
389
|
+
onClick: ()=>page < totalPages && onPageChange?.(page + 1),
|
|
390
|
+
className: (0, index_cjs_namespaceObject.cn)(page === totalPages && 'pointer-events-none opacity-50')
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
|
|
394
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
395
|
+
variant: "ghost",
|
|
396
|
+
size: "icon",
|
|
397
|
+
className: "h-8 w-8",
|
|
398
|
+
disabled: page === totalPages,
|
|
399
|
+
onClick: ()=>onPageChange?.(totalPages),
|
|
400
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsRight, {
|
|
401
|
+
className: "h-4 w-4"
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
})
|
|
405
|
+
]
|
|
406
|
+
})
|
|
407
|
+
}),
|
|
408
|
+
onPageSizeChange && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
|
|
409
|
+
gap: 2,
|
|
410
|
+
align: "center",
|
|
411
|
+
className: "text-sm",
|
|
412
|
+
children: [
|
|
413
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
414
|
+
className: "text-muted-foreground",
|
|
415
|
+
children: "Items"
|
|
416
|
+
}),
|
|
417
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
418
|
+
value: String(pageSize),
|
|
419
|
+
onValueChange: (v)=>onPageSizeChange(Number(v)),
|
|
420
|
+
children: [
|
|
421
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
|
|
422
|
+
className: "h-8 w-16",
|
|
423
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
|
|
424
|
+
}),
|
|
425
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectContent, {
|
|
426
|
+
children: [
|
|
427
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
428
|
+
value: "10",
|
|
429
|
+
children: "10"
|
|
430
|
+
}),
|
|
431
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
432
|
+
value: "25",
|
|
433
|
+
children: "25"
|
|
434
|
+
}),
|
|
435
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
436
|
+
value: "50",
|
|
437
|
+
children: "50"
|
|
438
|
+
}),
|
|
439
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
440
|
+
value: "100",
|
|
441
|
+
children: "100"
|
|
442
|
+
})
|
|
443
|
+
]
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
})
|
|
447
|
+
]
|
|
448
|
+
})
|
|
449
|
+
]
|
|
450
|
+
})
|
|
451
|
+
]
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
exports.AdminBreadcrumb = __webpack_exports__.AdminBreadcrumb;
|
|
455
|
+
exports.AdminContent = __webpack_exports__.AdminContent;
|
|
456
|
+
exports.AdminFilter = __webpack_exports__.AdminFilter;
|
|
457
|
+
exports.AdminHeader = __webpack_exports__.AdminHeader;
|
|
458
|
+
exports.AdminHeaderActions = __webpack_exports__.AdminHeaderActions;
|
|
459
|
+
exports.AdminLayout = __webpack_exports__.AdminLayout;
|
|
460
|
+
exports.AdminMain = __webpack_exports__.AdminMain;
|
|
461
|
+
exports.AdminPageHeader = __webpack_exports__.AdminPageHeader;
|
|
462
|
+
exports.AdminPagination = __webpack_exports__.AdminPagination;
|
|
463
|
+
exports.AdminSidebar = __webpack_exports__.AdminSidebar;
|
|
464
|
+
exports.AdminSidebarHeader = __webpack_exports__.AdminSidebarHeader;
|
|
465
|
+
exports.AdminSidebarNav = __webpack_exports__.AdminSidebarNav;
|
|
466
|
+
exports.AdminTable = __webpack_exports__.AdminTable;
|
|
467
|
+
exports.AdminToolbar = __webpack_exports__.AdminToolbar;
|
|
468
|
+
exports.DataTableColumnHeader = __webpack_exports__.DataTableColumnHeader;
|
|
469
|
+
exports.DataTableSelectColumn = __webpack_exports__.DataTableSelectColumn;
|
|
470
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
471
|
+
"AdminBreadcrumb",
|
|
472
|
+
"AdminContent",
|
|
473
|
+
"AdminFilter",
|
|
474
|
+
"AdminHeader",
|
|
475
|
+
"AdminHeaderActions",
|
|
476
|
+
"AdminLayout",
|
|
477
|
+
"AdminMain",
|
|
478
|
+
"AdminPageHeader",
|
|
479
|
+
"AdminPagination",
|
|
480
|
+
"AdminSidebar",
|
|
481
|
+
"AdminSidebarHeader",
|
|
482
|
+
"AdminSidebarNav",
|
|
483
|
+
"AdminTable",
|
|
484
|
+
"AdminToolbar",
|
|
485
|
+
"DataTableColumnHeader",
|
|
486
|
+
"DataTableSelectColumn"
|
|
487
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
488
|
+
Object.defineProperty(exports, '__esModule', {
|
|
489
|
+
value: true
|
|
490
|
+
});
|