@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b
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/forms/field-renderer.cjs +120 -69
- package/dist/components/forms/field-renderer.js +120 -69
- package/dist/components/forms/form-designer.cjs +2352 -1488
- package/dist/components/forms/form-designer.js +2353 -1489
- package/dist/components/forms/form-examples.cjs +10 -10
- package/dist/components/forms/form-examples.js +10 -10
- package/dist/components/forms/form-state-viewer.cjs +988 -433
- package/dist/components/forms/form-state-viewer.js +988 -433
- package/dist/components/forms/metadata-form.cjs +446 -170
- package/dist/components/forms/metadata-form.js +446 -170
- package/dist/components/forms/schema-viewer.cjs +173 -80
- package/dist/components/forms/schema-viewer.js +173 -80
- package/dist/components/ui/accordion.cjs +131 -27
- package/dist/components/ui/accordion.js +131 -27
- package/dist/components/ui/alert-dialog.cjs +273 -45
- package/dist/components/ui/alert-dialog.js +273 -45
- package/dist/components/ui/alert.cjs +106 -17
- package/dist/components/ui/alert.js +106 -17
- package/dist/components/ui/avatar.cjs +100 -15
- package/dist/components/ui/avatar.js +100 -15
- package/dist/components/ui/badge.cjs +36 -6
- package/dist/components/ui/badge.js +36 -6
- package/dist/components/ui/breadcrumb.cjs +258 -52
- package/dist/components/ui/breadcrumb.js +258 -52
- package/dist/components/ui/button-group.cjs +119 -19
- package/dist/components/ui/button-group.js +119 -19
- package/dist/components/ui/button.cjs +48 -8
- package/dist/components/ui/button.js +48 -8
- package/dist/components/ui/calendar.cjs +88 -30
- package/dist/components/ui/calendar.js +88 -30
- package/dist/components/ui/card.cjs +199 -30
- package/dist/components/ui/card.js +199 -30
- package/dist/components/ui/checkbox.cjs +42 -8
- package/dist/components/ui/checkbox.js +42 -8
- package/dist/components/ui/combobox.cjs +150 -53
- package/dist/components/ui/combobox.js +150 -53
- package/dist/components/ui/command.cjs +291 -53
- package/dist/components/ui/command.js +291 -53
- package/dist/components/ui/context-menu.cjs +370 -72
- package/dist/components/ui/context-menu.js +370 -72
- package/dist/components/ui/data-table.cjs +76 -39
- package/dist/components/ui/data-table.js +76 -39
- package/dist/components/ui/date-picker.cjs +179 -68
- package/dist/components/ui/date-picker.js +179 -68
- package/dist/components/ui/datetime-picker.cjs +225 -104
- package/dist/components/ui/datetime-picker.js +225 -104
- package/dist/components/ui/dialog.cjs +290 -78
- package/dist/components/ui/dialog.js +290 -78
- package/dist/components/ui/drawer.cjs +220 -39
- package/dist/components/ui/drawer.js +220 -39
- package/dist/components/ui/dropdown-menu.cjs +376 -73
- package/dist/components/ui/dropdown-menu.js +376 -73
- package/dist/components/ui/editable-cell.cjs +106 -42
- package/dist/components/ui/editable-cell.js +106 -42
- package/dist/components/ui/empty-state.cjs +106 -33
- package/dist/components/ui/empty-state.js +106 -33
- package/dist/components/ui/file-upload.cjs +405 -187
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +405 -187
- package/dist/components/ui/hover-card.cjs +46 -7
- package/dist/components/ui/hover-card.js +46 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/input.cjs +39 -6
- package/dist/components/ui/input.js +39 -6
- package/dist/components/ui/label.cjs +34 -5
- package/dist/components/ui/label.js +34 -5
- package/dist/components/ui/layout/column.cjs +209 -41
- package/dist/components/ui/layout/column.js +209 -41
- package/dist/components/ui/layout/grid.cjs +275 -60
- package/dist/components/ui/layout/grid.js +275 -60
- package/dist/components/ui/layout/row.cjs +209 -41
- package/dist/components/ui/layout/row.js +209 -41
- package/dist/components/ui/menubar.cjs +540 -106
- package/dist/components/ui/menubar.js +540 -106
- package/dist/components/ui/multi-select.cjs +289 -135
- package/dist/components/ui/multi-select.js +289 -135
- package/dist/components/ui/navigation-menu.cjs +244 -47
- package/dist/components/ui/navigation-menu.js +244 -47
- package/dist/components/ui/pagination.cjs +301 -65
- package/dist/components/ui/pagination.js +301 -65
- package/dist/components/ui/popover.cjs +48 -9
- package/dist/components/ui/popover.js +48 -9
- package/dist/components/ui/progress.cjs +48 -8
- package/dist/components/ui/progress.js +48 -8
- package/dist/components/ui/radio-group.cjs +74 -12
- package/dist/components/ui/radio-group.js +74 -12
- package/dist/components/ui/resizable.cjs +75 -10
- package/dist/components/ui/resizable.js +75 -10
- package/dist/components/ui/scroll-area.cjs +113 -21
- package/dist/components/ui/scroll-area.js +113 -21
- package/dist/components/ui/search.cjs +280 -98
- package/dist/components/ui/search.js +280 -98
- package/dist/components/ui/select.cjs +334 -68
- package/dist/components/ui/select.js +334 -68
- package/dist/components/ui/separator.cjs +48 -7
- package/dist/components/ui/separator.js +48 -7
- package/dist/components/ui/sheet.cjs +236 -50
- package/dist/components/ui/sheet.js +236 -50
- package/dist/components/ui/skeleton.cjs +31 -5
- package/dist/components/ui/skeleton.js +31 -5
- package/dist/components/ui/slider.cjs +71 -21
- package/dist/components/ui/slider.js +71 -21
- package/dist/components/ui/sonner.cjs +43 -15
- package/dist/components/ui/sonner.js +43 -15
- package/dist/components/ui/spinner.cjs +83 -21
- package/dist/components/ui/spinner.js +83 -21
- package/dist/components/ui/stats-card.cjs +169 -60
- package/dist/components/ui/stats-card.js +169 -60
- package/dist/components/ui/stepper.cjs +126 -57
- package/dist/components/ui/stepper.js +126 -57
- package/dist/components/ui/switch.cjs +42 -8
- package/dist/components/ui/switch.js +42 -8
- package/dist/components/ui/table.cjs +267 -42
- package/dist/components/ui/table.js +267 -42
- package/dist/components/ui/tabs.cjs +100 -15
- package/dist/components/ui/tabs.js +100 -15
- package/dist/components/ui/textarea.cjs +34 -5
- package/dist/components/ui/textarea.js +34 -5
- package/dist/components/ui/toggle-group.cjs +112 -19
- package/dist/components/ui/toggle-group.js +112 -19
- package/dist/components/ui/toggle.cjs +43 -6
- package/dist/components/ui/toggle.js +43 -6
- package/dist/components/ui/tooltip.cjs +40 -6
- package/dist/components/ui/tooltip.js +40 -6
- package/dist/examples/admin-layout-example.cjs +879 -347
- package/dist/examples/admin-layout-example.js +879 -347
- package/dist/examples/app-shell-example.cjs +14 -14
- package/dist/examples/app-shell-example.js +14 -14
- package/dist/examples/dashboard-example.cjs +495 -334
- package/dist/examples/dashboard-example.js +495 -334
- package/dist/examples/data-management-example.cjs +501 -303
- package/dist/examples/data-management-example.js +502 -304
- package/dist/examples/flow-editor-layout-example.cjs +435 -231
- package/dist/examples/flow-editor-layout-example.js +436 -232
- package/dist/examples/flow-start-example.cjs +508 -251
- package/dist/examples/flow-start-example.js +509 -252
- package/dist/examples/form-builder-example.cjs +1006 -602
- package/dist/examples/form-builder-example.js +1007 -603
- package/dist/examples/new-project-example.cjs +806 -474
- package/dist/examples/new-project-example.js +807 -475
- package/dist/examples/settings-example.cjs +792 -704
- package/dist/examples/settings-example.js +792 -704
- package/dist/examples/vscode-example.cjs +731 -236
- package/dist/examples/vscode-example.js +731 -236
- package/package.json +4 -1
|
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
DataManagementExample: ()=>DataManagementExample
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
30
31
|
const external_react_namespaceObject = require("react");
|
|
31
32
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
33
|
const badge_cjs_namespaceObject = require("../components/ui/badge.cjs");
|
|
@@ -254,326 +255,523 @@ const columns = [
|
|
|
254
255
|
}
|
|
255
256
|
];
|
|
256
257
|
function DataManagementExample() {
|
|
257
|
-
const
|
|
258
|
-
const [
|
|
258
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(48);
|
|
259
|
+
const [activeTab, setActiveTab] = external_react_namespaceObject.useState("all");
|
|
260
|
+
const [categoryFilter, setCategoryFilter] = external_react_namespaceObject.useState("all");
|
|
259
261
|
const [isCreateDialogOpen, setIsCreateDialogOpen] = external_react_namespaceObject.useState(false);
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
262
|
+
let filtered;
|
|
263
|
+
if ($[0] !== activeTab || $[1] !== categoryFilter) {
|
|
264
|
+
filtered = products;
|
|
265
|
+
if ("all" !== activeTab) {
|
|
266
|
+
let t0;
|
|
267
|
+
if ($[3] !== activeTab) {
|
|
268
|
+
t0 = (p)=>p.status === activeTab;
|
|
269
|
+
$[3] = activeTab;
|
|
270
|
+
$[4] = t0;
|
|
271
|
+
} else t0 = $[4];
|
|
272
|
+
filtered = products.filter(t0);
|
|
273
|
+
}
|
|
274
|
+
if ("all" !== categoryFilter) {
|
|
275
|
+
let t0;
|
|
276
|
+
if ($[5] !== categoryFilter) {
|
|
277
|
+
t0 = (p_0)=>p_0.category === categoryFilter;
|
|
278
|
+
$[5] = categoryFilter;
|
|
279
|
+
$[6] = t0;
|
|
280
|
+
} else t0 = $[6];
|
|
281
|
+
filtered = filtered.filter(t0);
|
|
282
|
+
}
|
|
283
|
+
$[0] = activeTab;
|
|
284
|
+
$[1] = categoryFilter;
|
|
285
|
+
$[2] = filtered;
|
|
286
|
+
} else filtered = $[2];
|
|
287
|
+
const filteredProducts = filtered;
|
|
288
|
+
let t0;
|
|
289
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
290
|
+
t0 = [
|
|
291
|
+
...new Set(products.map(_temp))
|
|
292
|
+
];
|
|
293
|
+
$[7] = t0;
|
|
294
|
+
} else t0 = $[7];
|
|
295
|
+
const categories = t0;
|
|
296
|
+
let t1;
|
|
297
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
298
|
+
t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Column, {
|
|
299
|
+
gap: 0,
|
|
300
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
301
|
+
className: "text-lg font-semibold",
|
|
302
|
+
children: "Products"
|
|
303
|
+
})
|
|
304
|
+
});
|
|
305
|
+
$[8] = t1;
|
|
306
|
+
} else t1 = $[8];
|
|
307
|
+
let t2;
|
|
308
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
309
|
+
t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
310
|
+
variant: "outline",
|
|
311
|
+
size: "sm",
|
|
312
|
+
children: [
|
|
313
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Upload, {
|
|
314
|
+
className: "mr-2 h-4 w-4"
|
|
315
|
+
}),
|
|
316
|
+
"Import"
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
$[9] = t2;
|
|
320
|
+
} else t2 = $[9];
|
|
321
|
+
let t3;
|
|
322
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
323
|
+
t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
324
|
+
variant: "outline",
|
|
325
|
+
size: "sm",
|
|
326
|
+
children: [
|
|
327
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Download, {
|
|
328
|
+
className: "mr-2 h-4 w-4"
|
|
329
|
+
}),
|
|
330
|
+
"Export"
|
|
331
|
+
]
|
|
332
|
+
});
|
|
333
|
+
$[10] = t3;
|
|
334
|
+
} else t3 = $[10];
|
|
335
|
+
let t4;
|
|
336
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
337
|
+
t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogTrigger, {
|
|
338
|
+
asChild: true,
|
|
339
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
340
|
+
size: "sm",
|
|
341
|
+
children: [
|
|
342
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
343
|
+
className: "mr-2 h-4 w-4"
|
|
344
|
+
}),
|
|
345
|
+
"Add Product"
|
|
346
|
+
]
|
|
347
|
+
})
|
|
348
|
+
});
|
|
349
|
+
$[11] = t4;
|
|
350
|
+
} else t4 = $[11];
|
|
351
|
+
let t5;
|
|
352
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
353
|
+
t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogHeader, {
|
|
354
|
+
children: [
|
|
355
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogTitle, {
|
|
356
|
+
children: "Add New Product"
|
|
357
|
+
}),
|
|
358
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_cjs_namespaceObject.DialogDescription, {
|
|
359
|
+
children: "Enter the details for the new product."
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
});
|
|
363
|
+
$[12] = t5;
|
|
364
|
+
} else t5 = $[12];
|
|
365
|
+
let t6;
|
|
366
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
367
|
+
t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
368
|
+
gap: 2,
|
|
369
|
+
children: [
|
|
370
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
371
|
+
htmlFor: "productName",
|
|
372
|
+
children: "Product name"
|
|
373
|
+
}),
|
|
374
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
375
|
+
id: "productName",
|
|
376
|
+
placeholder: "Enter product name"
|
|
377
|
+
})
|
|
378
|
+
]
|
|
379
|
+
});
|
|
380
|
+
$[13] = t6;
|
|
381
|
+
} else t6 = $[13];
|
|
382
|
+
let t7;
|
|
383
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
384
|
+
t7 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
385
|
+
gap: 2,
|
|
386
|
+
children: [
|
|
387
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
388
|
+
htmlFor: "sku",
|
|
389
|
+
children: "SKU"
|
|
390
|
+
}),
|
|
391
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
392
|
+
id: "sku",
|
|
393
|
+
placeholder: "XX-000"
|
|
394
|
+
})
|
|
395
|
+
]
|
|
396
|
+
});
|
|
397
|
+
$[14] = t7;
|
|
398
|
+
} else t7 = $[14];
|
|
399
|
+
let t8;
|
|
400
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
401
|
+
t8 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Grid, {
|
|
402
|
+
cols: 2,
|
|
403
|
+
gap: 4,
|
|
404
|
+
children: [
|
|
405
|
+
t7,
|
|
406
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
407
|
+
gap: 2,
|
|
283
408
|
children: [
|
|
284
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
285
|
-
|
|
286
|
-
children:
|
|
287
|
-
className: "text-lg font-semibold",
|
|
288
|
-
children: "Products"
|
|
289
|
-
})
|
|
409
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
410
|
+
htmlFor: "price",
|
|
411
|
+
children: "Price"
|
|
290
412
|
}),
|
|
291
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
-
]
|
|
413
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
414
|
+
id: "price",
|
|
415
|
+
type: "number",
|
|
416
|
+
placeholder: "0.00"
|
|
452
417
|
})
|
|
453
418
|
]
|
|
454
419
|
})
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
420
|
+
]
|
|
421
|
+
});
|
|
422
|
+
$[15] = t8;
|
|
423
|
+
} else t8 = $[15];
|
|
424
|
+
let t9;
|
|
425
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
426
|
+
t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
427
|
+
htmlFor: "category",
|
|
428
|
+
children: "Category"
|
|
429
|
+
});
|
|
430
|
+
$[16] = t9;
|
|
431
|
+
} else t9 = $[16];
|
|
432
|
+
let t10;
|
|
433
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
434
|
+
t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
|
|
435
|
+
id: "category",
|
|
436
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
|
|
437
|
+
placeholder: "Select category"
|
|
438
|
+
})
|
|
439
|
+
});
|
|
440
|
+
$[17] = t10;
|
|
441
|
+
} else t10 = $[17];
|
|
442
|
+
let t11;
|
|
443
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
444
|
+
t11 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
445
|
+
gap: 2,
|
|
446
|
+
children: [
|
|
447
|
+
t9,
|
|
448
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
449
|
+
children: [
|
|
450
|
+
t10,
|
|
451
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectContent, {
|
|
452
|
+
children: categories.map(_temp2)
|
|
453
|
+
})
|
|
454
|
+
]
|
|
455
|
+
})
|
|
456
|
+
]
|
|
457
|
+
});
|
|
458
|
+
$[18] = t11;
|
|
459
|
+
} else t11 = $[18];
|
|
460
|
+
let t12;
|
|
461
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
462
|
+
t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
463
|
+
gap: 4,
|
|
464
|
+
className: "py-4",
|
|
465
|
+
children: [
|
|
466
|
+
t6,
|
|
467
|
+
t8,
|
|
468
|
+
t11,
|
|
469
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
470
|
+
gap: 2,
|
|
471
|
+
children: [
|
|
472
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.Label, {
|
|
473
|
+
htmlFor: "stock",
|
|
474
|
+
children: "Initial stock"
|
|
475
|
+
}),
|
|
476
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
477
|
+
id: "stock",
|
|
478
|
+
type: "number",
|
|
479
|
+
placeholder: "0"
|
|
480
|
+
})
|
|
481
|
+
]
|
|
482
|
+
})
|
|
483
|
+
]
|
|
484
|
+
});
|
|
485
|
+
$[19] = t12;
|
|
486
|
+
} else t12 = $[19];
|
|
487
|
+
let t13;
|
|
488
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
489
|
+
t13 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
490
|
+
variant: "outline",
|
|
491
|
+
onClick: ()=>setIsCreateDialogOpen(false),
|
|
492
|
+
children: "Cancel"
|
|
493
|
+
});
|
|
494
|
+
$[20] = t13;
|
|
495
|
+
} else t13 = $[20];
|
|
496
|
+
let t14;
|
|
497
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
498
|
+
t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogContent, {
|
|
499
|
+
children: [
|
|
500
|
+
t5,
|
|
501
|
+
t12,
|
|
502
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.DialogFooter, {
|
|
503
|
+
children: [
|
|
504
|
+
t13,
|
|
505
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
506
|
+
onClick: ()=>setIsCreateDialogOpen(false),
|
|
507
|
+
children: "Create product"
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
})
|
|
511
|
+
]
|
|
512
|
+
});
|
|
513
|
+
$[21] = t14;
|
|
514
|
+
} else t14 = $[21];
|
|
515
|
+
let t15;
|
|
516
|
+
if ($[22] !== isCreateDialogOpen) {
|
|
517
|
+
t15 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("header", {
|
|
518
|
+
className: "border-b",
|
|
519
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
520
|
+
h: 14,
|
|
521
|
+
justify: "between",
|
|
522
|
+
align: "center",
|
|
523
|
+
className: "container mx-auto px-4",
|
|
458
524
|
children: [
|
|
525
|
+
t1,
|
|
459
526
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
460
|
-
gap:
|
|
461
|
-
justify: "between",
|
|
527
|
+
gap: 2,
|
|
462
528
|
align: "center",
|
|
463
|
-
className: "mb-4 flex-col sm:flex-row sm:items-center",
|
|
464
529
|
children: [
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
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",
|
|
530
|
+
t2,
|
|
531
|
+
t3,
|
|
532
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(dialog_cjs_namespaceObject.Dialog, {
|
|
533
|
+
open: isCreateDialogOpen,
|
|
534
|
+
onOpenChange: setIsCreateDialogOpen,
|
|
524
535
|
children: [
|
|
525
|
-
|
|
526
|
-
|
|
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
|
-
})
|
|
536
|
+
t4,
|
|
537
|
+
t14
|
|
561
538
|
]
|
|
562
539
|
})
|
|
563
540
|
]
|
|
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
541
|
})
|
|
573
542
|
]
|
|
574
543
|
})
|
|
575
|
-
|
|
576
|
-
|
|
544
|
+
});
|
|
545
|
+
$[22] = isCreateDialogOpen;
|
|
546
|
+
$[23] = t15;
|
|
547
|
+
} else t15 = $[23];
|
|
548
|
+
let t16;
|
|
549
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
550
|
+
t16 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
551
|
+
value: "all",
|
|
552
|
+
children: [
|
|
553
|
+
"All",
|
|
554
|
+
" ",
|
|
555
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
556
|
+
variant: "secondary",
|
|
557
|
+
className: "ml-2",
|
|
558
|
+
children: products.length
|
|
559
|
+
})
|
|
560
|
+
]
|
|
561
|
+
});
|
|
562
|
+
$[24] = t16;
|
|
563
|
+
} else t16 = $[24];
|
|
564
|
+
let t17;
|
|
565
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
566
|
+
t17 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
567
|
+
value: "active",
|
|
568
|
+
children: [
|
|
569
|
+
"Active",
|
|
570
|
+
" ",
|
|
571
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
572
|
+
variant: "secondary",
|
|
573
|
+
className: "ml-2",
|
|
574
|
+
children: products.filter(_temp3).length
|
|
575
|
+
})
|
|
576
|
+
]
|
|
577
|
+
});
|
|
578
|
+
$[25] = t17;
|
|
579
|
+
} else t17 = $[25];
|
|
580
|
+
let t18;
|
|
581
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
582
|
+
t18 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
583
|
+
value: "draft",
|
|
584
|
+
children: [
|
|
585
|
+
"Draft",
|
|
586
|
+
" ",
|
|
587
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
588
|
+
variant: "secondary",
|
|
589
|
+
className: "ml-2",
|
|
590
|
+
children: products.filter(_temp4).length
|
|
591
|
+
})
|
|
592
|
+
]
|
|
593
|
+
});
|
|
594
|
+
$[26] = t18;
|
|
595
|
+
} else t18 = $[26];
|
|
596
|
+
let t19;
|
|
597
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
598
|
+
t19 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsList, {
|
|
599
|
+
children: [
|
|
600
|
+
t16,
|
|
601
|
+
t17,
|
|
602
|
+
t18,
|
|
603
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
604
|
+
value: "archived",
|
|
605
|
+
children: [
|
|
606
|
+
"Archived",
|
|
607
|
+
" ",
|
|
608
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
609
|
+
variant: "secondary",
|
|
610
|
+
className: "ml-2",
|
|
611
|
+
children: products.filter(_temp5).length
|
|
612
|
+
})
|
|
613
|
+
]
|
|
614
|
+
})
|
|
615
|
+
]
|
|
616
|
+
});
|
|
617
|
+
$[27] = t19;
|
|
618
|
+
} else t19 = $[27];
|
|
619
|
+
let t20;
|
|
620
|
+
if ($[28] !== activeTab) {
|
|
621
|
+
t20 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.Tabs, {
|
|
622
|
+
value: activeTab,
|
|
623
|
+
onValueChange: setActiveTab,
|
|
624
|
+
children: t19
|
|
625
|
+
});
|
|
626
|
+
$[28] = activeTab;
|
|
627
|
+
$[29] = t20;
|
|
628
|
+
} else t20 = $[29];
|
|
629
|
+
let t21;
|
|
630
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
631
|
+
t21 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectTrigger, {
|
|
632
|
+
className: "w-[150px]",
|
|
633
|
+
children: [
|
|
634
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Filter, {
|
|
635
|
+
className: "mr-2 h-4 w-4"
|
|
636
|
+
}),
|
|
637
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
|
|
638
|
+
placeholder: "Category"
|
|
639
|
+
})
|
|
640
|
+
]
|
|
641
|
+
});
|
|
642
|
+
$[30] = t21;
|
|
643
|
+
} else t21 = $[30];
|
|
644
|
+
let t22;
|
|
645
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
646
|
+
t22 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectContent, {
|
|
647
|
+
children: [
|
|
648
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
649
|
+
value: "all",
|
|
650
|
+
children: "All categories"
|
|
651
|
+
}),
|
|
652
|
+
categories.map(_temp6)
|
|
653
|
+
]
|
|
654
|
+
});
|
|
655
|
+
$[31] = t22;
|
|
656
|
+
} else t22 = $[31];
|
|
657
|
+
let t23;
|
|
658
|
+
if ($[32] !== categoryFilter) {
|
|
659
|
+
t23 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
|
|
660
|
+
value: categoryFilter,
|
|
661
|
+
onValueChange: setCategoryFilter,
|
|
662
|
+
children: [
|
|
663
|
+
t21,
|
|
664
|
+
t22
|
|
665
|
+
]
|
|
666
|
+
});
|
|
667
|
+
$[32] = categoryFilter;
|
|
668
|
+
$[33] = t23;
|
|
669
|
+
} else t23 = $[33];
|
|
670
|
+
let t24;
|
|
671
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
672
|
+
t24 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
|
|
673
|
+
variant: "outline",
|
|
674
|
+
size: "icon",
|
|
675
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.RefreshCw, {
|
|
676
|
+
className: "h-4 w-4"
|
|
677
|
+
})
|
|
678
|
+
});
|
|
679
|
+
$[34] = t24;
|
|
680
|
+
} else t24 = $[34];
|
|
681
|
+
let t25;
|
|
682
|
+
if ($[35] !== t23) {
|
|
683
|
+
t25 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
684
|
+
gap: 2,
|
|
685
|
+
align: "center",
|
|
686
|
+
children: [
|
|
687
|
+
t23,
|
|
688
|
+
t24
|
|
689
|
+
]
|
|
690
|
+
});
|
|
691
|
+
$[35] = t23;
|
|
692
|
+
$[36] = t25;
|
|
693
|
+
} else t25 = $[36];
|
|
694
|
+
let t26;
|
|
695
|
+
if ($[37] !== t20 || $[38] !== t25) {
|
|
696
|
+
t26 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
697
|
+
gap: 4,
|
|
698
|
+
justify: "between",
|
|
699
|
+
align: "center",
|
|
700
|
+
className: "mb-4 flex-col sm:flex-row sm:items-center",
|
|
701
|
+
children: [
|
|
702
|
+
t20,
|
|
703
|
+
t25
|
|
704
|
+
]
|
|
705
|
+
});
|
|
706
|
+
$[37] = t20;
|
|
707
|
+
$[38] = t25;
|
|
708
|
+
$[39] = t26;
|
|
709
|
+
} else t26 = $[39];
|
|
710
|
+
let t27;
|
|
711
|
+
if ($[40] !== filteredProducts) {
|
|
712
|
+
t27 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(data_table_cjs_namespaceObject.DataTable, {
|
|
713
|
+
columns: columns,
|
|
714
|
+
data: filteredProducts,
|
|
715
|
+
searchKey: "name",
|
|
716
|
+
searchPlaceholder: "Search products...",
|
|
717
|
+
resizable: true,
|
|
718
|
+
compact: true
|
|
719
|
+
});
|
|
720
|
+
$[40] = filteredProducts;
|
|
721
|
+
$[41] = t27;
|
|
722
|
+
} else t27 = $[41];
|
|
723
|
+
let t28;
|
|
724
|
+
if ($[42] !== t26 || $[43] !== t27) {
|
|
725
|
+
t28 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("main", {
|
|
726
|
+
className: "container mx-auto p-4 md:p-6",
|
|
727
|
+
children: [
|
|
728
|
+
t26,
|
|
729
|
+
t27
|
|
730
|
+
]
|
|
731
|
+
});
|
|
732
|
+
$[42] = t26;
|
|
733
|
+
$[43] = t27;
|
|
734
|
+
$[44] = t28;
|
|
735
|
+
} else t28 = $[44];
|
|
736
|
+
let t29;
|
|
737
|
+
if ($[45] !== t15 || $[46] !== t28) {
|
|
738
|
+
t29 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
739
|
+
minH: "screen",
|
|
740
|
+
className: "bg-background",
|
|
741
|
+
children: [
|
|
742
|
+
t15,
|
|
743
|
+
t28
|
|
744
|
+
]
|
|
745
|
+
});
|
|
746
|
+
$[45] = t15;
|
|
747
|
+
$[46] = t28;
|
|
748
|
+
$[47] = t29;
|
|
749
|
+
} else t29 = $[47];
|
|
750
|
+
return t29;
|
|
751
|
+
}
|
|
752
|
+
function _temp6(cat_0) {
|
|
753
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
754
|
+
value: cat_0,
|
|
755
|
+
children: cat_0
|
|
756
|
+
}, cat_0);
|
|
757
|
+
}
|
|
758
|
+
function _temp5(p_4) {
|
|
759
|
+
return "archived" === p_4.status;
|
|
760
|
+
}
|
|
761
|
+
function _temp4(p_3) {
|
|
762
|
+
return "draft" === p_3.status;
|
|
763
|
+
}
|
|
764
|
+
function _temp3(p_2) {
|
|
765
|
+
return "active" === p_2.status;
|
|
766
|
+
}
|
|
767
|
+
function _temp2(cat) {
|
|
768
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
|
|
769
|
+
value: cat,
|
|
770
|
+
children: cat
|
|
771
|
+
}, cat);
|
|
772
|
+
}
|
|
773
|
+
function _temp(p_1) {
|
|
774
|
+
return p_1.category;
|
|
577
775
|
}
|
|
578
776
|
exports.DataManagementExample = __webpack_exports__.DataManagementExample;
|
|
579
777
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|