@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,584 @@
|
|
|
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
|
+
DataManagementExample: ()=>DataManagementExample
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_react_namespaceObject = require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const badge_cjs_namespaceObject = require("../components/ui/badge.cjs");
|
|
33
|
+
const button_cjs_namespaceObject = require("../components/ui/button.cjs");
|
|
34
|
+
const data_table_cjs_namespaceObject = require("../components/ui/data-table.cjs");
|
|
35
|
+
const dialog_cjs_namespaceObject = require("../components/ui/dialog.cjs");
|
|
36
|
+
const dropdown_menu_cjs_namespaceObject = require("../components/ui/dropdown-menu.cjs");
|
|
37
|
+
const input_cjs_namespaceObject = require("../components/ui/input.cjs");
|
|
38
|
+
const label_cjs_namespaceObject = require("../components/ui/label.cjs");
|
|
39
|
+
const select_cjs_namespaceObject = require("../components/ui/select.cjs");
|
|
40
|
+
const tabs_cjs_namespaceObject = require("../components/ui/tabs.cjs");
|
|
41
|
+
const index_cjs_namespaceObject = require("../components/ui/layout/index.cjs");
|
|
42
|
+
const products = [
|
|
43
|
+
{
|
|
44
|
+
id: '1',
|
|
45
|
+
name: 'Wireless Headphones',
|
|
46
|
+
sku: 'WH-001',
|
|
47
|
+
category: 'Electronics',
|
|
48
|
+
price: 99.99,
|
|
49
|
+
stock: 150,
|
|
50
|
+
status: 'active',
|
|
51
|
+
createdAt: '2024-01-10'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: '2',
|
|
55
|
+
name: 'USB-C Cable',
|
|
56
|
+
sku: 'UC-002',
|
|
57
|
+
category: 'Accessories',
|
|
58
|
+
price: 12.99,
|
|
59
|
+
stock: 500,
|
|
60
|
+
status: 'active',
|
|
61
|
+
createdAt: '2024-01-09'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: '3',
|
|
65
|
+
name: 'Laptop Stand',
|
|
66
|
+
sku: 'LS-003',
|
|
67
|
+
category: 'Accessories',
|
|
68
|
+
price: 49.99,
|
|
69
|
+
stock: 75,
|
|
70
|
+
status: 'active',
|
|
71
|
+
createdAt: '2024-01-08'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: '4',
|
|
75
|
+
name: 'Mechanical Keyboard',
|
|
76
|
+
sku: 'MK-004',
|
|
77
|
+
category: 'Electronics',
|
|
78
|
+
price: 149.99,
|
|
79
|
+
stock: 0,
|
|
80
|
+
status: 'draft',
|
|
81
|
+
createdAt: '2024-01-07'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: '5',
|
|
85
|
+
name: 'Monitor Light Bar',
|
|
86
|
+
sku: 'ML-005',
|
|
87
|
+
category: 'Electronics',
|
|
88
|
+
price: 59.99,
|
|
89
|
+
stock: 200,
|
|
90
|
+
status: 'active',
|
|
91
|
+
createdAt: '2024-01-06'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: '6',
|
|
95
|
+
name: 'Webcam HD',
|
|
96
|
+
sku: 'WC-006',
|
|
97
|
+
category: 'Electronics',
|
|
98
|
+
price: 79.99,
|
|
99
|
+
stock: 45,
|
|
100
|
+
status: 'active',
|
|
101
|
+
createdAt: '2024-01-05'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: '7',
|
|
105
|
+
name: 'Mouse Pad XL',
|
|
106
|
+
sku: 'MP-007',
|
|
107
|
+
category: 'Accessories',
|
|
108
|
+
price: 24.99,
|
|
109
|
+
stock: 300,
|
|
110
|
+
status: 'active',
|
|
111
|
+
createdAt: '2024-01-04'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: '8',
|
|
115
|
+
name: 'Phone Holder',
|
|
116
|
+
sku: 'PH-008',
|
|
117
|
+
category: 'Accessories',
|
|
118
|
+
price: 19.99,
|
|
119
|
+
stock: 0,
|
|
120
|
+
status: 'archived',
|
|
121
|
+
createdAt: '2024-01-03'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: '9',
|
|
125
|
+
name: 'Bluetooth Speaker',
|
|
126
|
+
sku: 'BS-009',
|
|
127
|
+
category: 'Electronics',
|
|
128
|
+
price: 39.99,
|
|
129
|
+
stock: 120,
|
|
130
|
+
status: 'active',
|
|
131
|
+
createdAt: '2024-01-02'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: '10',
|
|
135
|
+
name: 'Screen Protector',
|
|
136
|
+
sku: 'SP-010',
|
|
137
|
+
category: 'Accessories',
|
|
138
|
+
price: 9.99,
|
|
139
|
+
stock: 1000,
|
|
140
|
+
status: 'active',
|
|
141
|
+
createdAt: '2024-01-01'
|
|
142
|
+
}
|
|
143
|
+
];
|
|
144
|
+
const columns = [
|
|
145
|
+
(0, data_table_cjs_namespaceObject.DataTableSelectColumn)(),
|
|
146
|
+
{
|
|
147
|
+
accessorKey: 'name',
|
|
148
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
149
|
+
column: column,
|
|
150
|
+
title: "Product"
|
|
151
|
+
}),
|
|
152
|
+
cell: ({ row })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
153
|
+
children: [
|
|
154
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
155
|
+
className: "font-medium",
|
|
156
|
+
children: row.original.name
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
159
|
+
className: "text-xs text-muted-foreground",
|
|
160
|
+
children: row.original.sku
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
})
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
accessorKey: 'category',
|
|
167
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
168
|
+
column: column,
|
|
169
|
+
title: "Category"
|
|
170
|
+
})
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
accessorKey: 'price',
|
|
174
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
175
|
+
column: column,
|
|
176
|
+
title: "Price"
|
|
177
|
+
}),
|
|
178
|
+
cell: ({ row })=>{
|
|
179
|
+
const price = parseFloat(row.getValue('price'));
|
|
180
|
+
return new Intl.NumberFormat('en-US', {
|
|
181
|
+
style: 'currency',
|
|
182
|
+
currency: 'USD'
|
|
183
|
+
}).format(price);
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
accessorKey: 'stock',
|
|
188
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
189
|
+
column: column,
|
|
190
|
+
title: "Stock"
|
|
191
|
+
}),
|
|
192
|
+
cell: ({ row })=>{
|
|
193
|
+
const stock = row.getValue('stock');
|
|
194
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
195
|
+
className: 0 === stock ? 'text-destructive font-medium' : '',
|
|
196
|
+
children: 0 === stock ? 'Out of stock' : stock
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
accessorKey: 'status',
|
|
202
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
203
|
+
column: column,
|
|
204
|
+
title: "Status"
|
|
205
|
+
}),
|
|
206
|
+
cell: ({ row })=>{
|
|
207
|
+
const status = row.getValue('status');
|
|
208
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
209
|
+
variant: 'active' === status ? 'default' : 'draft' === status ? 'secondary' : 'outline',
|
|
210
|
+
children: status
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
accessorKey: 'createdAt',
|
|
216
|
+
header: ({ column })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTableColumnHeader, {
|
|
217
|
+
column: column,
|
|
218
|
+
title: "Created"
|
|
219
|
+
})
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: 'actions',
|
|
223
|
+
cell: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dropdown_menu_cjs_namespaceObject.DropdownMenu, {
|
|
224
|
+
children: [
|
|
225
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_cjs_namespaceObject.DropdownMenuTrigger, {
|
|
226
|
+
asChild: true,
|
|
227
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
228
|
+
variant: "ghost",
|
|
229
|
+
size: "icon",
|
|
230
|
+
className: "h-8 w-8",
|
|
231
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MoreHorizontal, {
|
|
232
|
+
className: "h-4 w-4"
|
|
233
|
+
})
|
|
234
|
+
})
|
|
235
|
+
}),
|
|
236
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dropdown_menu_cjs_namespaceObject.DropdownMenuContent, {
|
|
237
|
+
align: "end",
|
|
238
|
+
children: [
|
|
239
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
|
|
240
|
+
children: "Edit"
|
|
241
|
+
}),
|
|
242
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
|
|
243
|
+
children: "Duplicate"
|
|
244
|
+
}),
|
|
245
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_cjs_namespaceObject.DropdownMenuSeparator, {}),
|
|
246
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
|
|
247
|
+
className: "text-destructive",
|
|
248
|
+
children: "Delete"
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
];
|
|
256
|
+
function DataManagementExample() {
|
|
257
|
+
const [activeTab, setActiveTab] = external_react_namespaceObject.useState('all');
|
|
258
|
+
const [categoryFilter, setCategoryFilter] = external_react_namespaceObject.useState('all');
|
|
259
|
+
const [isCreateDialogOpen, setIsCreateDialogOpen] = external_react_namespaceObject.useState(false);
|
|
260
|
+
const filteredProducts = external_react_namespaceObject.useMemo(()=>{
|
|
261
|
+
let filtered = products;
|
|
262
|
+
if ('all' !== activeTab) filtered = filtered.filter((p)=>p.status === activeTab);
|
|
263
|
+
if ('all' !== categoryFilter) filtered = filtered.filter((p)=>p.category === categoryFilter);
|
|
264
|
+
return filtered;
|
|
265
|
+
}, [
|
|
266
|
+
activeTab,
|
|
267
|
+
categoryFilter
|
|
268
|
+
]);
|
|
269
|
+
const categories = [
|
|
270
|
+
...new Set(products.map((p)=>p.category))
|
|
271
|
+
];
|
|
272
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
273
|
+
minH: "screen",
|
|
274
|
+
className: "bg-background",
|
|
275
|
+
children: [
|
|
276
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("header", {
|
|
277
|
+
className: "border-b",
|
|
278
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
279
|
+
h: 14,
|
|
280
|
+
justify: "between",
|
|
281
|
+
align: "center",
|
|
282
|
+
className: "container mx-auto px-4",
|
|
283
|
+
children: [
|
|
284
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Column, {
|
|
285
|
+
gap: 0,
|
|
286
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
287
|
+
className: "text-lg font-semibold",
|
|
288
|
+
children: "Products"
|
|
289
|
+
})
|
|
290
|
+
}),
|
|
291
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
292
|
+
gap: 2,
|
|
293
|
+
align: "center",
|
|
294
|
+
children: [
|
|
295
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
296
|
+
variant: "outline",
|
|
297
|
+
size: "sm",
|
|
298
|
+
children: [
|
|
299
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Upload, {
|
|
300
|
+
className: "mr-2 h-4 w-4"
|
|
301
|
+
}),
|
|
302
|
+
"Import"
|
|
303
|
+
]
|
|
304
|
+
}),
|
|
305
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
306
|
+
variant: "outline",
|
|
307
|
+
size: "sm",
|
|
308
|
+
children: [
|
|
309
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Download, {
|
|
310
|
+
className: "mr-2 h-4 w-4"
|
|
311
|
+
}),
|
|
312
|
+
"Export"
|
|
313
|
+
]
|
|
314
|
+
}),
|
|
315
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.Dialog, {
|
|
316
|
+
open: isCreateDialogOpen,
|
|
317
|
+
onOpenChange: setIsCreateDialogOpen,
|
|
318
|
+
children: [
|
|
319
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogTrigger, {
|
|
320
|
+
asChild: true,
|
|
321
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
322
|
+
size: "sm",
|
|
323
|
+
children: [
|
|
324
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
325
|
+
className: "mr-2 h-4 w-4"
|
|
326
|
+
}),
|
|
327
|
+
"Add Product"
|
|
328
|
+
]
|
|
329
|
+
})
|
|
330
|
+
}),
|
|
331
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogContent, {
|
|
332
|
+
children: [
|
|
333
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogHeader, {
|
|
334
|
+
children: [
|
|
335
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogTitle, {
|
|
336
|
+
children: "Add New Product"
|
|
337
|
+
}),
|
|
338
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogDescription, {
|
|
339
|
+
children: "Enter the details for the new product."
|
|
340
|
+
})
|
|
341
|
+
]
|
|
342
|
+
}),
|
|
343
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
344
|
+
gap: 4,
|
|
345
|
+
className: "py-4",
|
|
346
|
+
children: [
|
|
347
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
348
|
+
gap: 2,
|
|
349
|
+
children: [
|
|
350
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
351
|
+
htmlFor: "productName",
|
|
352
|
+
children: "Product name"
|
|
353
|
+
}),
|
|
354
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
355
|
+
id: "productName",
|
|
356
|
+
placeholder: "Enter product name"
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
}),
|
|
360
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Grid, {
|
|
361
|
+
cols: 2,
|
|
362
|
+
gap: 4,
|
|
363
|
+
children: [
|
|
364
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
365
|
+
gap: 2,
|
|
366
|
+
children: [
|
|
367
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
368
|
+
htmlFor: "sku",
|
|
369
|
+
children: "SKU"
|
|
370
|
+
}),
|
|
371
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
372
|
+
id: "sku",
|
|
373
|
+
placeholder: "XX-000"
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
}),
|
|
377
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
378
|
+
gap: 2,
|
|
379
|
+
children: [
|
|
380
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
381
|
+
htmlFor: "price",
|
|
382
|
+
children: "Price"
|
|
383
|
+
}),
|
|
384
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
385
|
+
id: "price",
|
|
386
|
+
type: "number",
|
|
387
|
+
placeholder: "0.00"
|
|
388
|
+
})
|
|
389
|
+
]
|
|
390
|
+
})
|
|
391
|
+
]
|
|
392
|
+
}),
|
|
393
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
394
|
+
gap: 2,
|
|
395
|
+
children: [
|
|
396
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
397
|
+
htmlFor: "category",
|
|
398
|
+
children: "Category"
|
|
399
|
+
}),
|
|
400
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
401
|
+
children: [
|
|
402
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
|
|
403
|
+
id: "category",
|
|
404
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
|
|
405
|
+
placeholder: "Select category"
|
|
406
|
+
})
|
|
407
|
+
}),
|
|
408
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectContent, {
|
|
409
|
+
children: categories.map((cat)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
410
|
+
value: cat,
|
|
411
|
+
children: cat
|
|
412
|
+
}, cat))
|
|
413
|
+
})
|
|
414
|
+
]
|
|
415
|
+
})
|
|
416
|
+
]
|
|
417
|
+
}),
|
|
418
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
419
|
+
gap: 2,
|
|
420
|
+
children: [
|
|
421
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
422
|
+
htmlFor: "stock",
|
|
423
|
+
children: "Initial stock"
|
|
424
|
+
}),
|
|
425
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
426
|
+
id: "stock",
|
|
427
|
+
type: "number",
|
|
428
|
+
placeholder: "0"
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
})
|
|
432
|
+
]
|
|
433
|
+
}),
|
|
434
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogFooter, {
|
|
435
|
+
children: [
|
|
436
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
437
|
+
variant: "outline",
|
|
438
|
+
onClick: ()=>setIsCreateDialogOpen(false),
|
|
439
|
+
children: "Cancel"
|
|
440
|
+
}),
|
|
441
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
442
|
+
onClick: ()=>setIsCreateDialogOpen(false),
|
|
443
|
+
children: "Create product"
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
})
|
|
447
|
+
]
|
|
448
|
+
})
|
|
449
|
+
]
|
|
450
|
+
})
|
|
451
|
+
]
|
|
452
|
+
})
|
|
453
|
+
]
|
|
454
|
+
})
|
|
455
|
+
}),
|
|
456
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("main", {
|
|
457
|
+
className: "container mx-auto p-4 md:p-6",
|
|
458
|
+
children: [
|
|
459
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
460
|
+
gap: 4,
|
|
461
|
+
justify: "between",
|
|
462
|
+
align: "center",
|
|
463
|
+
className: "mb-4 flex-col sm:flex-row sm:items-center",
|
|
464
|
+
children: [
|
|
465
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.Tabs, {
|
|
466
|
+
value: activeTab,
|
|
467
|
+
onValueChange: setActiveTab,
|
|
468
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsList, {
|
|
469
|
+
children: [
|
|
470
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
471
|
+
value: "all",
|
|
472
|
+
children: [
|
|
473
|
+
"All",
|
|
474
|
+
' ',
|
|
475
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
476
|
+
variant: "secondary",
|
|
477
|
+
className: "ml-2",
|
|
478
|
+
children: products.length
|
|
479
|
+
})
|
|
480
|
+
]
|
|
481
|
+
}),
|
|
482
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
483
|
+
value: "active",
|
|
484
|
+
children: [
|
|
485
|
+
"Active",
|
|
486
|
+
' ',
|
|
487
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
488
|
+
variant: "secondary",
|
|
489
|
+
className: "ml-2",
|
|
490
|
+
children: products.filter((p)=>'active' === p.status).length
|
|
491
|
+
})
|
|
492
|
+
]
|
|
493
|
+
}),
|
|
494
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
495
|
+
value: "draft",
|
|
496
|
+
children: [
|
|
497
|
+
"Draft",
|
|
498
|
+
' ',
|
|
499
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
500
|
+
variant: "secondary",
|
|
501
|
+
className: "ml-2",
|
|
502
|
+
children: products.filter((p)=>'draft' === p.status).length
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
}),
|
|
506
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
507
|
+
value: "archived",
|
|
508
|
+
children: [
|
|
509
|
+
"Archived",
|
|
510
|
+
' ',
|
|
511
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
512
|
+
variant: "secondary",
|
|
513
|
+
className: "ml-2",
|
|
514
|
+
children: products.filter((p)=>'archived' === p.status).length
|
|
515
|
+
})
|
|
516
|
+
]
|
|
517
|
+
})
|
|
518
|
+
]
|
|
519
|
+
})
|
|
520
|
+
}),
|
|
521
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
522
|
+
gap: 2,
|
|
523
|
+
align: "center",
|
|
524
|
+
children: [
|
|
525
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
526
|
+
value: categoryFilter,
|
|
527
|
+
onValueChange: setCategoryFilter,
|
|
528
|
+
children: [
|
|
529
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectTrigger, {
|
|
530
|
+
className: "w-[150px]",
|
|
531
|
+
children: [
|
|
532
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Filter, {
|
|
533
|
+
className: "mr-2 h-4 w-4"
|
|
534
|
+
}),
|
|
535
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
|
|
536
|
+
placeholder: "Category"
|
|
537
|
+
})
|
|
538
|
+
]
|
|
539
|
+
}),
|
|
540
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectContent, {
|
|
541
|
+
children: [
|
|
542
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
543
|
+
value: "all",
|
|
544
|
+
children: "All categories"
|
|
545
|
+
}),
|
|
546
|
+
categories.map((cat)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
547
|
+
value: cat,
|
|
548
|
+
children: cat
|
|
549
|
+
}, cat))
|
|
550
|
+
]
|
|
551
|
+
})
|
|
552
|
+
]
|
|
553
|
+
}),
|
|
554
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
555
|
+
variant: "outline",
|
|
556
|
+
size: "icon",
|
|
557
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.RefreshCw, {
|
|
558
|
+
className: "h-4 w-4"
|
|
559
|
+
})
|
|
560
|
+
})
|
|
561
|
+
]
|
|
562
|
+
})
|
|
563
|
+
]
|
|
564
|
+
}),
|
|
565
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTable, {
|
|
566
|
+
columns: columns,
|
|
567
|
+
data: filteredProducts,
|
|
568
|
+
searchKey: "name",
|
|
569
|
+
searchPlaceholder: "Search products...",
|
|
570
|
+
resizable: true,
|
|
571
|
+
compact: true
|
|
572
|
+
})
|
|
573
|
+
]
|
|
574
|
+
})
|
|
575
|
+
]
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
exports.DataManagementExample = __webpack_exports__.DataManagementExample;
|
|
579
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
580
|
+
"DataManagementExample"
|
|
581
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
582
|
+
Object.defineProperty(exports, '__esModule', {
|
|
583
|
+
value: true
|
|
584
|
+
});
|