@underverse-ui/underverse 0.1.4 → 0.1.5
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/README.md +59 -3
- package/dist/index.cjs +273 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +248 -9
- package/dist/index.d.ts +248 -9
- package/dist/index.js +259 -294
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -69,7 +69,6 @@ __export(index_exports, {
|
|
|
69
69
|
Pagination: () => Pagination,
|
|
70
70
|
PillTabs: () => PillTabs,
|
|
71
71
|
Popover: () => Popover,
|
|
72
|
-
ProductImageUpload: () => ProductImageUpload_default,
|
|
73
72
|
Progress: () => Progress_default,
|
|
74
73
|
PulseBadge: () => PulseBadge,
|
|
75
74
|
RadioGroup: () => RadioGroup_default,
|
|
@@ -102,6 +101,8 @@ __export(index_exports, {
|
|
|
102
101
|
VARIANT_STYLES_BTN: () => VARIANT_STYLES_BTN,
|
|
103
102
|
VerticalTabs: () => VerticalTabs,
|
|
104
103
|
cn: () => cn,
|
|
104
|
+
getUnderverseMessages: () => getUnderverseMessages,
|
|
105
|
+
underverseMessages: () => underverseMessages,
|
|
105
106
|
useToast: () => useToast
|
|
106
107
|
});
|
|
107
108
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -5449,220 +5450,52 @@ function ImageUpload({
|
|
|
5449
5450
|
] });
|
|
5450
5451
|
}
|
|
5451
5452
|
|
|
5452
|
-
// ../../components/ui/
|
|
5453
|
-
var
|
|
5454
|
-
var import_image2 = __toESM(require("next/image"), 1);
|
|
5453
|
+
// ../../components/ui/Carousel.tsx
|
|
5454
|
+
var React27 = __toESM(require("react"), 1);
|
|
5455
5455
|
var import_lucide_react18 = require("lucide-react");
|
|
5456
5456
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5457
|
-
var ProductImageUpload = ({ value, onChange, disabled = false, className }) => {
|
|
5458
|
-
const [uploading, setUploading] = (0, import_react18.useState)(false);
|
|
5459
|
-
const [error, setError] = (0, import_react18.useState)(null);
|
|
5460
|
-
const [isDragging, setIsDragging] = (0, import_react18.useState)(false);
|
|
5461
|
-
const fileInputRef = (0, import_react18.useRef)(null);
|
|
5462
|
-
const handleFileChange = async (e) => {
|
|
5463
|
-
const file = e.target.files?.[0];
|
|
5464
|
-
if (!file) return;
|
|
5465
|
-
await uploadFile(file);
|
|
5466
|
-
};
|
|
5467
|
-
const uploadFile = async (file) => {
|
|
5468
|
-
const acceptedFormats = ["image/jpeg", "image/png", "image/webp", "image/gif"];
|
|
5469
|
-
if (!acceptedFormats.includes(file.type)) {
|
|
5470
|
-
setError(`\u0110\u1ECBnh d\u1EA1ng kh\xF4ng h\u1ED7 tr\u1EE3. Ch\u1EC9 ch\u1EA5p nh\u1EADn: JPG, PNG, WEBP, GIF`);
|
|
5471
|
-
return;
|
|
5472
|
-
}
|
|
5473
|
-
const maxSizeBytes = 10 * 1024 * 1024;
|
|
5474
|
-
if (file.size > maxSizeBytes) {
|
|
5475
|
-
setError(`File qu\xE1 l\u1EDBn. K\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a: 10MB`);
|
|
5476
|
-
return;
|
|
5477
|
-
}
|
|
5478
|
-
setError(null);
|
|
5479
|
-
setUploading(true);
|
|
5480
|
-
try {
|
|
5481
|
-
const formData = new FormData();
|
|
5482
|
-
formData.append("file", file);
|
|
5483
|
-
const response = await fetch("/api/upload/product-image", {
|
|
5484
|
-
method: "POST",
|
|
5485
|
-
body: formData,
|
|
5486
|
-
credentials: "include"
|
|
5487
|
-
});
|
|
5488
|
-
if (!response.ok) {
|
|
5489
|
-
throw new Error("Upload failed");
|
|
5490
|
-
}
|
|
5491
|
-
const result = await response.json();
|
|
5492
|
-
if (result.success && result.data?.path) {
|
|
5493
|
-
onChange(result.data.path);
|
|
5494
|
-
} else {
|
|
5495
|
-
throw new Error(result.message || "Upload failed");
|
|
5496
|
-
}
|
|
5497
|
-
} catch (err) {
|
|
5498
|
-
setError(err.message || "Kh\xF4ng th\u1EC3 upload \u1EA3nh");
|
|
5499
|
-
console.error("Upload error:", err);
|
|
5500
|
-
} finally {
|
|
5501
|
-
setUploading(false);
|
|
5502
|
-
if (fileInputRef.current) {
|
|
5503
|
-
fileInputRef.current.value = "";
|
|
5504
|
-
}
|
|
5505
|
-
}
|
|
5506
|
-
};
|
|
5507
|
-
const handleDragOver = (e) => {
|
|
5508
|
-
e.preventDefault();
|
|
5509
|
-
e.stopPropagation();
|
|
5510
|
-
if (!disabled && !uploading) {
|
|
5511
|
-
setIsDragging(true);
|
|
5512
|
-
}
|
|
5513
|
-
};
|
|
5514
|
-
const handleDragLeave = (e) => {
|
|
5515
|
-
e.preventDefault();
|
|
5516
|
-
e.stopPropagation();
|
|
5517
|
-
setIsDragging(false);
|
|
5518
|
-
};
|
|
5519
|
-
const handleDrop = async (e) => {
|
|
5520
|
-
e.preventDefault();
|
|
5521
|
-
e.stopPropagation();
|
|
5522
|
-
setIsDragging(false);
|
|
5523
|
-
if (disabled || uploading) return;
|
|
5524
|
-
const file = e.dataTransfer.files?.[0];
|
|
5525
|
-
if (file) {
|
|
5526
|
-
await uploadFile(file);
|
|
5527
|
-
}
|
|
5528
|
-
};
|
|
5529
|
-
const handleRemove = () => {
|
|
5530
|
-
onChange("");
|
|
5531
|
-
setError(null);
|
|
5532
|
-
};
|
|
5533
|
-
const handleClickUpload = () => {
|
|
5534
|
-
fileInputRef.current?.click();
|
|
5535
|
-
};
|
|
5536
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("space-y-4", className), children: [
|
|
5537
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5538
|
-
"input",
|
|
5539
|
-
{
|
|
5540
|
-
ref: fileInputRef,
|
|
5541
|
-
type: "file",
|
|
5542
|
-
accept: "image/jpeg,image/png,image/webp,image/gif",
|
|
5543
|
-
onChange: handleFileChange,
|
|
5544
|
-
disabled: disabled || uploading,
|
|
5545
|
-
className: "hidden"
|
|
5546
|
-
}
|
|
5547
|
-
),
|
|
5548
|
-
value ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-4", children: [
|
|
5549
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative w-full aspect-square max-w-md rounded-xl overflow-hidden border-2 border-border bg-muted shadow-lg group", children: [
|
|
5550
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5551
|
-
import_image2.default,
|
|
5552
|
-
{
|
|
5553
|
-
src: value,
|
|
5554
|
-
alt: "Product image",
|
|
5555
|
-
fill: true,
|
|
5556
|
-
className: "object-cover transition-transform duration-300 group-hover:scale-105",
|
|
5557
|
-
unoptimized: true
|
|
5558
|
-
}
|
|
5559
|
-
),
|
|
5560
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute inset-0 bg-foreground/0 group-hover:bg-foreground/30 transition-colors duration-300 flex items-center justify-center opacity-0 group-hover:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex gap-2", children: [
|
|
5561
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Button_default, { type: "button", variant: "default", size: "sm", onClick: handleClickUpload, disabled: disabled || uploading, children: [
|
|
5562
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Upload, { className: "w-4 h-4 mr-2" }),
|
|
5563
|
-
"Thay \u0111\u1ED5i"
|
|
5564
|
-
] }),
|
|
5565
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Button_default, { type: "button", variant: "danger", size: "sm", onClick: handleRemove, disabled: disabled || uploading, children: [
|
|
5566
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.X, { className: "w-4 h-4 mr-2" }),
|
|
5567
|
-
"X\xF3a"
|
|
5568
|
-
] })
|
|
5569
|
-
] }) })
|
|
5570
|
-
] }),
|
|
5571
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
5572
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Image, { className: "w-4 h-4" }),
|
|
5573
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "\u1EA2nh s\u1EA3n ph\u1EA9m \u0111\xE3 t\u1EA3i l\xEAn th\xE0nh c\xF4ng" })
|
|
5574
|
-
] })
|
|
5575
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5576
|
-
"div",
|
|
5577
|
-
{
|
|
5578
|
-
className: cn(
|
|
5579
|
-
"w-full aspect-square max-w-md rounded-xl border-2 border-dashed transition-all duration-200",
|
|
5580
|
-
"bg-gradient-to-br from-muted/30 to-muted/10",
|
|
5581
|
-
"flex flex-col items-center justify-center cursor-pointer",
|
|
5582
|
-
"hover:border-primary/60 hover:bg-primary/5 hover:shadow-lg hover:scale-[1.02]",
|
|
5583
|
-
isDragging && "border-primary bg-primary/10 shadow-lg scale-[1.02]",
|
|
5584
|
-
(disabled || uploading) && "opacity-50 cursor-not-allowed hover:scale-100",
|
|
5585
|
-
!isDragging && !disabled && !uploading && "border-border"
|
|
5586
|
-
),
|
|
5587
|
-
onClick: !disabled && !uploading ? handleClickUpload : void 0,
|
|
5588
|
-
onDragOver: handleDragOver,
|
|
5589
|
-
onDragLeave: handleDragLeave,
|
|
5590
|
-
onDrop: handleDrop,
|
|
5591
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 text-center", children: [
|
|
5592
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5593
|
-
"div",
|
|
5594
|
-
{
|
|
5595
|
-
className: cn(
|
|
5596
|
-
"w-20 h-20 rounded-full flex items-center justify-center mb-4 transition-colors",
|
|
5597
|
-
isDragging ? "bg-primary/20" : "bg-primary/10"
|
|
5598
|
-
),
|
|
5599
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Upload, { className: cn("w-10 h-10 transition-colors", isDragging ? "text-primary" : "text-muted-foreground") })
|
|
5600
|
-
}
|
|
5601
|
-
),
|
|
5602
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-lg font-semibold text-foreground mb-2", children: uploading ? "\u0110ang t\u1EA3i l\xEAn..." : isDragging ? "Th\u1EA3 \u1EA3nh v\xE0o \u0111\xE2y" : "T\u1EA3i \u1EA3nh s\u1EA3n ph\u1EA9m" }),
|
|
5603
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-muted-foreground mb-3 max-w-xs", children: uploading ? "Vui l\xF2ng \u0111\u1EE3i trong gi\xE2y l\xE1t" : "Click \u0111\u1EC3 ch\u1ECDn ho\u1EB7c k\xE9o th\u1EA3 \u1EA3nh v\xE0o \u0111\xE2y" }),
|
|
5604
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 text-xs text-muted-foreground mt-2", children: [
|
|
5605
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-3 py-1.5 bg-muted rounded-full", children: "JPG, PNG, WEBP, GIF" }),
|
|
5606
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-3 py-1.5 bg-muted rounded-full", children: "T\u1ED1i \u0111a 10MB" })
|
|
5607
|
-
] }),
|
|
5608
|
-
uploading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4 w-48 h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "h-full bg-primary rounded-full animate-[progress_1s_ease-in-out_infinite]" }) })
|
|
5609
|
-
] })
|
|
5610
|
-
}
|
|
5611
|
-
),
|
|
5612
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/20", children: [
|
|
5613
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.X, { className: "w-4 h-4 text-destructive flex-shrink-0" }),
|
|
5614
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-destructive", children: error })
|
|
5615
|
-
] })
|
|
5616
|
-
] });
|
|
5617
|
-
};
|
|
5618
|
-
var ProductImageUpload_default = ProductImageUpload;
|
|
5619
|
-
|
|
5620
|
-
// ../../components/ui/Carousel.tsx
|
|
5621
|
-
var React28 = __toESM(require("react"), 1);
|
|
5622
|
-
var import_lucide_react19 = require("lucide-react");
|
|
5623
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5624
5457
|
function Carousel({ children, autoScroll = true, autoScrollInterval = 5e3 }) {
|
|
5625
|
-
const [currentIndex, setCurrentIndex] =
|
|
5626
|
-
const totalSlides =
|
|
5627
|
-
const [isPaused, setIsPaused] =
|
|
5628
|
-
const scrollPrev =
|
|
5458
|
+
const [currentIndex, setCurrentIndex] = React27.useState(0);
|
|
5459
|
+
const totalSlides = React27.Children.count(children);
|
|
5460
|
+
const [isPaused, setIsPaused] = React27.useState(false);
|
|
5461
|
+
const scrollPrev = React27.useCallback(() => {
|
|
5629
5462
|
setCurrentIndex((prev) => prev > 0 ? prev - 1 : totalSlides - 1);
|
|
5630
5463
|
}, [totalSlides]);
|
|
5631
|
-
const scrollNext =
|
|
5464
|
+
const scrollNext = React27.useCallback(() => {
|
|
5632
5465
|
setCurrentIndex((prev) => prev < totalSlides - 1 ? prev + 1 : 0);
|
|
5633
5466
|
}, [totalSlides]);
|
|
5634
|
-
|
|
5467
|
+
React27.useEffect(() => {
|
|
5635
5468
|
if (!autoScroll || isPaused || totalSlides <= 1) return;
|
|
5636
5469
|
const interval = setInterval(() => {
|
|
5637
5470
|
scrollNext();
|
|
5638
5471
|
}, autoScrollInterval);
|
|
5639
5472
|
return () => clearInterval(interval);
|
|
5640
5473
|
}, [autoScroll, isPaused, totalSlides, autoScrollInterval, scrollNext]);
|
|
5641
|
-
return /* @__PURE__ */ (0,
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
5643
|
-
totalSlides > 1 && /* @__PURE__ */ (0,
|
|
5644
|
-
/* @__PURE__ */ (0,
|
|
5474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative w-full overflow-hidden", onMouseEnter: () => setIsPaused(true), onMouseLeave: () => setIsPaused(false), children: [
|
|
5475
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex transition-transform duration-500 ease-in-out", style: { transform: `translateX(-${currentIndex * 100}%)` }, children: React27.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 w-full h-full", children: child }, idx)) }),
|
|
5476
|
+
totalSlides > 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
5477
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5645
5478
|
Button_default,
|
|
5646
5479
|
{
|
|
5647
5480
|
onClick: scrollPrev,
|
|
5648
5481
|
variant: "outline",
|
|
5649
5482
|
size: "icon",
|
|
5650
|
-
icon:
|
|
5483
|
+
icon: import_lucide_react18.ArrowLeft,
|
|
5651
5484
|
className: "absolute left-4 top-1/2 -translate-y-1/2 hover:-translate-y-1/2 z-10 rounded-full will-change-transform bg-background/80 hover:bg-background border-border/50 hover:border-border text-foreground"
|
|
5652
5485
|
}
|
|
5653
5486
|
),
|
|
5654
|
-
/* @__PURE__ */ (0,
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5655
5488
|
Button_default,
|
|
5656
5489
|
{
|
|
5657
5490
|
onClick: scrollNext,
|
|
5658
5491
|
variant: "outline",
|
|
5659
5492
|
size: "icon",
|
|
5660
|
-
icon:
|
|
5493
|
+
icon: import_lucide_react18.ArrowRight,
|
|
5661
5494
|
className: "absolute right-4 top-1/2 -translate-y-1/2 hover:-translate-y-1/2 z-10 rounded-full will-change-transform bg-background/80 hover:bg-background border-border/50 hover:border-border text-foreground"
|
|
5662
5495
|
}
|
|
5663
5496
|
)
|
|
5664
5497
|
] }),
|
|
5665
|
-
totalSlides > 1 && /* @__PURE__ */ (0,
|
|
5498
|
+
totalSlides > 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: Array.from({ length: totalSlides }, (_, idx) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5666
5499
|
"button",
|
|
5667
5500
|
{
|
|
5668
5501
|
onClick: () => setCurrentIndex(idx),
|
|
@@ -5675,22 +5508,22 @@ function Carousel({ children, autoScroll = true, autoScrollInterval = 5e3 }) {
|
|
|
5675
5508
|
}
|
|
5676
5509
|
|
|
5677
5510
|
// ../../components/ui/ClientOnly.tsx
|
|
5678
|
-
var
|
|
5679
|
-
var
|
|
5511
|
+
var import_react18 = require("react");
|
|
5512
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5680
5513
|
function ClientOnly({ children, fallback = null }) {
|
|
5681
|
-
const [hasMounted, setHasMounted] = (0,
|
|
5682
|
-
(0,
|
|
5514
|
+
const [hasMounted, setHasMounted] = (0, import_react18.useState)(false);
|
|
5515
|
+
(0, import_react18.useEffect)(() => {
|
|
5683
5516
|
setHasMounted(true);
|
|
5684
5517
|
}, []);
|
|
5685
5518
|
if (!hasMounted) {
|
|
5686
|
-
return /* @__PURE__ */ (0,
|
|
5519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: fallback });
|
|
5687
5520
|
}
|
|
5688
|
-
return /* @__PURE__ */ (0,
|
|
5521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children });
|
|
5689
5522
|
}
|
|
5690
5523
|
|
|
5691
5524
|
// ../../components/ui/Loading.tsx
|
|
5692
|
-
var
|
|
5693
|
-
var
|
|
5525
|
+
var import_lucide_react19 = require("lucide-react");
|
|
5526
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5694
5527
|
var LoadingSpinner = ({
|
|
5695
5528
|
size = "md",
|
|
5696
5529
|
className,
|
|
@@ -5706,8 +5539,8 @@ var LoadingSpinner = ({
|
|
|
5706
5539
|
foreground: "text-foreground",
|
|
5707
5540
|
muted: "text-muted-foreground"
|
|
5708
5541
|
};
|
|
5709
|
-
return /* @__PURE__ */ (0,
|
|
5710
|
-
|
|
5542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5543
|
+
import_lucide_react19.Activity,
|
|
5711
5544
|
{
|
|
5712
5545
|
className: cn(
|
|
5713
5546
|
"animate-spin",
|
|
@@ -5727,7 +5560,7 @@ var LoadingDots = ({
|
|
|
5727
5560
|
foreground: "bg-foreground",
|
|
5728
5561
|
muted: "bg-muted-foreground"
|
|
5729
5562
|
};
|
|
5730
|
-
return /* @__PURE__ */ (0,
|
|
5563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex items-center space-x-1", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5731
5564
|
"div",
|
|
5732
5565
|
{
|
|
5733
5566
|
className: cn(
|
|
@@ -5749,7 +5582,7 @@ var LoadingBar = ({
|
|
|
5749
5582
|
label
|
|
5750
5583
|
}) => {
|
|
5751
5584
|
const pct = progress ? Math.min(Math.max(progress, 0), 100) : void 0;
|
|
5752
|
-
return /* @__PURE__ */ (0,
|
|
5585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5753
5586
|
"div",
|
|
5754
5587
|
{
|
|
5755
5588
|
className: cn("w-full bg-muted rounded-full h-2", className),
|
|
@@ -5758,7 +5591,7 @@ var LoadingBar = ({
|
|
|
5758
5591
|
"aria-valuemax": pct === void 0 ? void 0 : 100,
|
|
5759
5592
|
"aria-valuenow": pct === void 0 ? void 0 : Math.round(pct),
|
|
5760
5593
|
"aria-label": label || "Loading",
|
|
5761
|
-
children: /* @__PURE__ */ (0,
|
|
5594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5762
5595
|
"div",
|
|
5763
5596
|
{
|
|
5764
5597
|
className: cn(
|
|
@@ -5775,10 +5608,10 @@ var LoadingBar = ({
|
|
|
5775
5608
|
};
|
|
5776
5609
|
|
|
5777
5610
|
// ../../components/ui/Table.tsx
|
|
5778
|
-
var
|
|
5779
|
-
var
|
|
5780
|
-
var Table =
|
|
5781
|
-
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5611
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
5612
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5613
|
+
var Table = import_react19.default.forwardRef(
|
|
5614
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5782
5615
|
"div",
|
|
5783
5616
|
{
|
|
5784
5617
|
className: cn(
|
|
@@ -5788,7 +5621,7 @@ var Table = import_react20.default.forwardRef(
|
|
|
5788
5621
|
"backdrop-blur-sm transition-all duration-300",
|
|
5789
5622
|
containerClassName
|
|
5790
5623
|
),
|
|
5791
|
-
children: /* @__PURE__ */ (0,
|
|
5624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5792
5625
|
"table",
|
|
5793
5626
|
{
|
|
5794
5627
|
ref,
|
|
@@ -5800,8 +5633,8 @@ var Table = import_react20.default.forwardRef(
|
|
|
5800
5633
|
)
|
|
5801
5634
|
);
|
|
5802
5635
|
Table.displayName = "Table";
|
|
5803
|
-
var TableHeader =
|
|
5804
|
-
({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5636
|
+
var TableHeader = import_react19.default.forwardRef(
|
|
5637
|
+
({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5805
5638
|
"thead",
|
|
5806
5639
|
{
|
|
5807
5640
|
ref,
|
|
@@ -5819,7 +5652,7 @@ var TableHeader = import_react20.default.forwardRef(
|
|
|
5819
5652
|
)
|
|
5820
5653
|
);
|
|
5821
5654
|
TableHeader.displayName = "TableHeader";
|
|
5822
|
-
var TableBody =
|
|
5655
|
+
var TableBody = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5823
5656
|
"tbody",
|
|
5824
5657
|
{
|
|
5825
5658
|
ref,
|
|
@@ -5828,7 +5661,7 @@ var TableBody = import_react20.default.forwardRef(({ className, ...props }, ref)
|
|
|
5828
5661
|
}
|
|
5829
5662
|
));
|
|
5830
5663
|
TableBody.displayName = "TableBody";
|
|
5831
|
-
var TableFooter =
|
|
5664
|
+
var TableFooter = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5832
5665
|
"tfoot",
|
|
5833
5666
|
{
|
|
5834
5667
|
ref,
|
|
@@ -5840,7 +5673,7 @@ var TableFooter = import_react20.default.forwardRef(({ className, ...props }, re
|
|
|
5840
5673
|
}
|
|
5841
5674
|
));
|
|
5842
5675
|
TableFooter.displayName = "TableFooter";
|
|
5843
|
-
var TableRow =
|
|
5676
|
+
var TableRow = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5844
5677
|
"tr",
|
|
5845
5678
|
{
|
|
5846
5679
|
ref,
|
|
@@ -5854,7 +5687,7 @@ var TableRow = import_react20.default.forwardRef(({ className, ...props }, ref)
|
|
|
5854
5687
|
}
|
|
5855
5688
|
));
|
|
5856
5689
|
TableRow.displayName = "TableRow";
|
|
5857
|
-
var TableHead =
|
|
5690
|
+
var TableHead = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5858
5691
|
"th",
|
|
5859
5692
|
{
|
|
5860
5693
|
ref,
|
|
@@ -5866,7 +5699,7 @@ var TableHead = import_react20.default.forwardRef(({ className, ...props }, ref)
|
|
|
5866
5699
|
}
|
|
5867
5700
|
));
|
|
5868
5701
|
TableHead.displayName = "TableHead";
|
|
5869
|
-
var TableCell =
|
|
5702
|
+
var TableCell = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5870
5703
|
"td",
|
|
5871
5704
|
{
|
|
5872
5705
|
ref,
|
|
@@ -5875,7 +5708,7 @@ var TableCell = import_react20.default.forwardRef(({ className, ...props }, ref)
|
|
|
5875
5708
|
}
|
|
5876
5709
|
));
|
|
5877
5710
|
TableCell.displayName = "TableCell";
|
|
5878
|
-
var TableCaption =
|
|
5711
|
+
var TableCaption = import_react19.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5879
5712
|
"caption",
|
|
5880
5713
|
{
|
|
5881
5714
|
ref,
|
|
@@ -5886,13 +5719,13 @@ var TableCaption = import_react20.default.forwardRef(({ className, ...props }, r
|
|
|
5886
5719
|
TableCaption.displayName = "TableCaption";
|
|
5887
5720
|
|
|
5888
5721
|
// ../../components/ui/DataTable.tsx
|
|
5889
|
-
var
|
|
5890
|
-
var
|
|
5722
|
+
var import_lucide_react20 = require("lucide-react");
|
|
5723
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
5891
5724
|
var import_next_intl7 = require("next-intl");
|
|
5892
|
-
var
|
|
5725
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5893
5726
|
function useDebounced(value, delay = 300) {
|
|
5894
|
-
const [debounced, setDebounced] =
|
|
5895
|
-
|
|
5727
|
+
const [debounced, setDebounced] = import_react20.default.useState(value);
|
|
5728
|
+
import_react20.default.useEffect(() => {
|
|
5896
5729
|
const id = setTimeout(() => setDebounced(value), delay);
|
|
5897
5730
|
return () => clearTimeout(id);
|
|
5898
5731
|
}, [value, delay]);
|
|
@@ -5916,14 +5749,14 @@ function DataTable({
|
|
|
5916
5749
|
className
|
|
5917
5750
|
}) {
|
|
5918
5751
|
const t = (0, import_next_intl7.useTranslations)("Common");
|
|
5919
|
-
const [visibleCols, setVisibleCols] =
|
|
5920
|
-
const [filters, setFilters] =
|
|
5921
|
-
const [sort, setSort] =
|
|
5922
|
-
const [density, setDensity] =
|
|
5923
|
-
const [curPage, setCurPage] =
|
|
5924
|
-
const [curPageSize, setCurPageSize] =
|
|
5752
|
+
const [visibleCols, setVisibleCols] = import_react20.default.useState(() => columns.filter((c) => c.visible !== false).map((c) => c.key));
|
|
5753
|
+
const [filters, setFilters] = import_react20.default.useState({});
|
|
5754
|
+
const [sort, setSort] = import_react20.default.useState(null);
|
|
5755
|
+
const [density, setDensity] = import_react20.default.useState("normal");
|
|
5756
|
+
const [curPage, setCurPage] = import_react20.default.useState(page);
|
|
5757
|
+
const [curPageSize, setCurPageSize] = import_react20.default.useState(pageSize);
|
|
5925
5758
|
const debouncedFilters = useDebounced(filters, 350);
|
|
5926
|
-
|
|
5759
|
+
import_react20.default.useEffect(() => {
|
|
5927
5760
|
if (!onQueryChange) return;
|
|
5928
5761
|
onQueryChange({ filters: debouncedFilters, sort, page: curPage, pageSize: curPageSize });
|
|
5929
5762
|
}, [debouncedFilters, sort, curPage, curPageSize]);
|
|
@@ -5942,7 +5775,7 @@ function DataTable({
|
|
|
5942
5775
|
className: "h-8 w-full text-sm"
|
|
5943
5776
|
};
|
|
5944
5777
|
if (col.filter.type === "text") {
|
|
5945
|
-
return /* @__PURE__ */ (0,
|
|
5778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5946
5779
|
Input_default,
|
|
5947
5780
|
{
|
|
5948
5781
|
...commonProps,
|
|
@@ -5957,7 +5790,7 @@ function DataTable({
|
|
|
5957
5790
|
}
|
|
5958
5791
|
if (col.filter.type === "select") {
|
|
5959
5792
|
const options = col.filter.options || [];
|
|
5960
|
-
return /* @__PURE__ */ (0,
|
|
5793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5961
5794
|
Combobox,
|
|
5962
5795
|
{
|
|
5963
5796
|
options: ["", ...options],
|
|
@@ -5973,7 +5806,7 @@ function DataTable({
|
|
|
5973
5806
|
);
|
|
5974
5807
|
}
|
|
5975
5808
|
if (col.filter.type === "date") {
|
|
5976
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5977
5810
|
DatePicker,
|
|
5978
5811
|
{
|
|
5979
5812
|
placeholder: col.filter.placeholder || `Select ${String(col.title)}`,
|
|
@@ -5987,15 +5820,15 @@ function DataTable({
|
|
|
5987
5820
|
}
|
|
5988
5821
|
return null;
|
|
5989
5822
|
};
|
|
5990
|
-
const renderHeader = /* @__PURE__ */ (0,
|
|
5823
|
+
const renderHeader = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableRow, { children: visibleColumns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5991
5824
|
TableHead,
|
|
5992
5825
|
{
|
|
5993
5826
|
style: { width: col.width },
|
|
5994
5827
|
className: cn(col.align === "right" && "text-right", col.align === "center" && "text-center"),
|
|
5995
|
-
children: /* @__PURE__ */ (0,
|
|
5996
|
-
/* @__PURE__ */ (0,
|
|
5997
|
-
/* @__PURE__ */ (0,
|
|
5998
|
-
col.sortable && /* @__PURE__ */ (0,
|
|
5828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between gap-2 select-none min-h-[2.5rem]", children: [
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-1 min-w-0 flex-1", children: [
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate font-medium text-sm", children: col.title }),
|
|
5831
|
+
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5999
5832
|
"button",
|
|
6000
5833
|
{
|
|
6001
5834
|
className: cn(
|
|
@@ -6012,8 +5845,8 @@ function DataTable({
|
|
|
6012
5845
|
},
|
|
6013
5846
|
"aria-label": "Sort",
|
|
6014
5847
|
title: `Sort by ${String(col.title)}`,
|
|
6015
|
-
children: /* @__PURE__ */ (0,
|
|
6016
|
-
/* @__PURE__ */ (0,
|
|
5848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", className: "inline-block", children: [
|
|
5849
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6017
5850
|
"path",
|
|
6018
5851
|
{
|
|
6019
5852
|
d: "M7 8l3-3 3 3",
|
|
@@ -6024,7 +5857,7 @@ function DataTable({
|
|
|
6024
5857
|
opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
|
|
6025
5858
|
}
|
|
6026
5859
|
),
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
5860
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6028
5861
|
"path",
|
|
6029
5862
|
{
|
|
6030
5863
|
d: "M7 12l3 3 3-3",
|
|
@@ -6039,11 +5872,11 @@ function DataTable({
|
|
|
6039
5872
|
}
|
|
6040
5873
|
)
|
|
6041
5874
|
] }),
|
|
6042
|
-
col.filter && /* @__PURE__ */ (0,
|
|
5875
|
+
col.filter && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6043
5876
|
Popover,
|
|
6044
5877
|
{
|
|
6045
5878
|
placement: "bottom-start",
|
|
6046
|
-
trigger: /* @__PURE__ */ (0,
|
|
5879
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6047
5880
|
"button",
|
|
6048
5881
|
{
|
|
6049
5882
|
className: cn(
|
|
@@ -6053,16 +5886,16 @@ function DataTable({
|
|
|
6053
5886
|
),
|
|
6054
5887
|
"aria-label": "Filter",
|
|
6055
5888
|
title: "Filter",
|
|
6056
|
-
children: /* @__PURE__ */ (0,
|
|
5889
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Filter, { className: "h-4 w-4" })
|
|
6057
5890
|
}
|
|
6058
5891
|
),
|
|
6059
|
-
children: /* @__PURE__ */ (0,
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
5892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-48 p-2 space-y-2", children: [
|
|
5893
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "text-xs font-medium text-muted-foreground mb-2", children: [
|
|
6061
5894
|
"Filter ",
|
|
6062
5895
|
col.title
|
|
6063
5896
|
] }),
|
|
6064
5897
|
renderFilterControl(col),
|
|
6065
|
-
filters[col.key] && /* @__PURE__ */ (0,
|
|
5898
|
+
filters[col.key] && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6066
5899
|
"button",
|
|
6067
5900
|
{
|
|
6068
5901
|
onClick: () => {
|
|
@@ -6084,15 +5917,15 @@ function DataTable({
|
|
|
6084
5917
|
},
|
|
6085
5918
|
col.key
|
|
6086
5919
|
)) });
|
|
6087
|
-
return /* @__PURE__ */ (0,
|
|
6088
|
-
/* @__PURE__ */ (0,
|
|
6089
|
-
/* @__PURE__ */ (0,
|
|
6090
|
-
/* @__PURE__ */ (0,
|
|
6091
|
-
enableDensityToggle && /* @__PURE__ */ (0,
|
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("space-y-2", className), children: [
|
|
5921
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
|
|
5922
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-sm text-muted-foreground", children: caption }),
|
|
5923
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5924
|
+
enableDensityToggle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6092
5925
|
DropdownMenu_default,
|
|
6093
5926
|
{
|
|
6094
|
-
trigger: /* @__PURE__ */ (0,
|
|
6095
|
-
/* @__PURE__ */ (0,
|
|
5927
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
5928
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) }),
|
|
6096
5929
|
t("density")
|
|
6097
5930
|
] }),
|
|
6098
5931
|
items: [
|
|
@@ -6102,11 +5935,11 @@ function DataTable({
|
|
|
6102
5935
|
]
|
|
6103
5936
|
}
|
|
6104
5937
|
),
|
|
6105
|
-
enableColumnVisibilityToggle && /* @__PURE__ */ (0,
|
|
5938
|
+
enableColumnVisibilityToggle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6106
5939
|
DropdownMenu_default,
|
|
6107
5940
|
{
|
|
6108
|
-
trigger: /* @__PURE__ */ (0,
|
|
6109
|
-
/* @__PURE__ */ (0,
|
|
5941
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
5942
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6110
5943
|
"path",
|
|
6111
5944
|
{
|
|
6112
5945
|
strokeLinecap: "round",
|
|
@@ -6117,15 +5950,15 @@ function DataTable({
|
|
|
6117
5950
|
) }),
|
|
6118
5951
|
t("columns")
|
|
6119
5952
|
] }),
|
|
6120
|
-
children: columns.map((c) => /* @__PURE__ */ (0,
|
|
5953
|
+
children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6121
5954
|
DropdownMenuItem,
|
|
6122
5955
|
{
|
|
6123
5956
|
onClick: () => {
|
|
6124
5957
|
setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
|
|
6125
5958
|
},
|
|
6126
5959
|
children: [
|
|
6127
|
-
/* @__PURE__ */ (0,
|
|
6128
|
-
/* @__PURE__ */ (0,
|
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("input", { type: "checkbox", className: "mr-2 rounded border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
5961
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate", children: c.title })
|
|
6129
5962
|
]
|
|
6130
5963
|
},
|
|
6131
5964
|
c.key
|
|
@@ -6135,17 +5968,17 @@ function DataTable({
|
|
|
6135
5968
|
toolbar
|
|
6136
5969
|
] })
|
|
6137
5970
|
] }),
|
|
6138
|
-
/* @__PURE__ */ (0,
|
|
5971
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("relative rounded-lg border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6139
5972
|
Table,
|
|
6140
5973
|
{
|
|
6141
5974
|
containerClassName: "border-0 rounded-none shadow-none",
|
|
6142
5975
|
className: "[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-[5] [&_thead]:bg-background [&_thead]:backdrop-blur-sm",
|
|
6143
5976
|
children: [
|
|
6144
|
-
/* @__PURE__ */ (0,
|
|
6145
|
-
/* @__PURE__ */ (0,
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
5977
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableHeader, { children: renderHeader }),
|
|
5978
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableBody, { children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableCell, { colSpan: visibleColumns.length, className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
5980
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6149
5982
|
"path",
|
|
6150
5983
|
{
|
|
6151
5984
|
className: "opacity-75",
|
|
@@ -6154,10 +5987,10 @@ function DataTable({
|
|
|
6154
5987
|
}
|
|
6155
5988
|
)
|
|
6156
5989
|
] }),
|
|
6157
|
-
/* @__PURE__ */ (0,
|
|
6158
|
-
] }) }) }) : !data || data.length === 0 ? /* @__PURE__ */ (0,
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm", children: "Loading..." })
|
|
5991
|
+
] }) }) }) : !data || data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableCell, { colSpan: visibleColumns.length, className: "text-center py-6 text-muted-foreground", children: "No data" }) }) : data.map((row, idx) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/30"), children: visibleColumns.map((col) => {
|
|
6159
5992
|
const value = col.dataIndex ? row[col.dataIndex] : void 0;
|
|
6160
|
-
return /* @__PURE__ */ (0,
|
|
5993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6161
5994
|
TableCell,
|
|
6162
5995
|
{
|
|
6163
5996
|
className: cn(
|
|
@@ -6175,7 +6008,7 @@ function DataTable({
|
|
|
6175
6008
|
]
|
|
6176
6009
|
}
|
|
6177
6010
|
) }),
|
|
6178
|
-
total > 0 && /* @__PURE__ */ (0,
|
|
6011
|
+
total > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "border-t bg-muted/30 p-4 rounded-b-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6179
6012
|
Pagination,
|
|
6180
6013
|
{
|
|
6181
6014
|
page: curPage,
|
|
@@ -6192,9 +6025,9 @@ function DataTable({
|
|
|
6192
6025
|
var DataTable_default = DataTable;
|
|
6193
6026
|
|
|
6194
6027
|
// ../../components/ui/NotificationModal.tsx
|
|
6195
|
-
var
|
|
6028
|
+
var import_lucide_react21 = require("lucide-react");
|
|
6196
6029
|
var import_next_intl8 = require("next-intl");
|
|
6197
|
-
var
|
|
6030
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6198
6031
|
function NotificationModal({ isOpen, onClose, notification }) {
|
|
6199
6032
|
const t = (0, import_next_intl8.useTranslations)("Common");
|
|
6200
6033
|
if (!notification) return null;
|
|
@@ -6215,26 +6048,26 @@ function NotificationModal({ isOpen, onClose, notification }) {
|
|
|
6215
6048
|
onClose();
|
|
6216
6049
|
}
|
|
6217
6050
|
};
|
|
6218
|
-
return /* @__PURE__ */ (0,
|
|
6051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6219
6052
|
Modal_default,
|
|
6220
6053
|
{
|
|
6221
6054
|
isOpen,
|
|
6222
6055
|
onClose,
|
|
6223
6056
|
title: t("notifications"),
|
|
6224
6057
|
size: "md",
|
|
6225
|
-
children: /* @__PURE__ */ (0,
|
|
6226
|
-
/* @__PURE__ */ (0,
|
|
6227
|
-
/* @__PURE__ */ (0,
|
|
6058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2 pb-2 border-b border-border", children: [
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn(
|
|
6228
6061
|
"w-2 h-2 rounded-full",
|
|
6229
6062
|
!notification.is_read ? "bg-primary" : "bg-border"
|
|
6230
6063
|
) }),
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6064
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs text-muted-foreground", children: !notification.is_read ? t("newNotification") : t("readStatus") })
|
|
6232
6065
|
] }),
|
|
6233
|
-
notification.title && /* @__PURE__ */ (0,
|
|
6234
|
-
notification.body && /* @__PURE__ */ (0,
|
|
6235
|
-
/* @__PURE__ */ (0,
|
|
6236
|
-
/* @__PURE__ */ (0,
|
|
6237
|
-
hasLink && /* @__PURE__ */ (0,
|
|
6066
|
+
notification.title && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-lg font-semibold text-foreground", children: notification.title }),
|
|
6067
|
+
notification.body && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed", children: notification.body }),
|
|
6068
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-xs text-muted-foreground border-t border-border pt-2", children: formatTime2(notification.created_at) }),
|
|
6069
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-2 justify-end pt-2", children: [
|
|
6070
|
+
hasLink && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6238
6071
|
Button_default,
|
|
6239
6072
|
{
|
|
6240
6073
|
variant: "primary",
|
|
@@ -6242,12 +6075,12 @@ function NotificationModal({ isOpen, onClose, notification }) {
|
|
|
6242
6075
|
onClick: handleLinkClick,
|
|
6243
6076
|
className: "gap-2",
|
|
6244
6077
|
children: [
|
|
6245
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.ExternalLink, { className: "w-4 h-4" }),
|
|
6246
6079
|
t("openLink")
|
|
6247
6080
|
]
|
|
6248
6081
|
}
|
|
6249
6082
|
),
|
|
6250
|
-
/* @__PURE__ */ (0,
|
|
6083
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6251
6084
|
Button_default,
|
|
6252
6085
|
{
|
|
6253
6086
|
variant: "ghost",
|
|
@@ -6266,13 +6099,13 @@ var NotificationModal_default = NotificationModal;
|
|
|
6266
6099
|
// ../../components/ui/FloatingContacts.tsx
|
|
6267
6100
|
var import_link2 = __toESM(require("next/link"), 1);
|
|
6268
6101
|
var import_navigation = require("next/navigation");
|
|
6269
|
-
var
|
|
6102
|
+
var import_lucide_react22 = require("lucide-react");
|
|
6270
6103
|
|
|
6271
6104
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
|
6272
|
-
var
|
|
6105
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
6273
6106
|
|
|
6274
6107
|
// ../../node_modules/react-icons/lib/iconContext.mjs
|
|
6275
|
-
var
|
|
6108
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
6276
6109
|
var DefaultContext = {
|
|
6277
6110
|
color: void 0,
|
|
6278
6111
|
size: void 0,
|
|
@@ -6280,7 +6113,7 @@ var DefaultContext = {
|
|
|
6280
6113
|
style: void 0,
|
|
6281
6114
|
attr: void 0
|
|
6282
6115
|
};
|
|
6283
|
-
var IconContext =
|
|
6116
|
+
var IconContext = import_react21.default.createContext && /* @__PURE__ */ import_react21.default.createContext(DefaultContext);
|
|
6284
6117
|
|
|
6285
6118
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
|
6286
6119
|
var _excluded = ["attr", "size", "title"];
|
|
@@ -6369,12 +6202,12 @@ function _toPrimitive(t, r) {
|
|
|
6369
6202
|
return ("string" === r ? String : Number)(t);
|
|
6370
6203
|
}
|
|
6371
6204
|
function Tree2Element(tree) {
|
|
6372
|
-
return tree && tree.map((node, i) => /* @__PURE__ */
|
|
6205
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ import_react22.default.createElement(node.tag, _objectSpread({
|
|
6373
6206
|
key: i
|
|
6374
6207
|
}, node.attr), Tree2Element(node.child)));
|
|
6375
6208
|
}
|
|
6376
6209
|
function GenIcon(data) {
|
|
6377
|
-
return (props) => /* @__PURE__ */
|
|
6210
|
+
return (props) => /* @__PURE__ */ import_react22.default.createElement(IconBase, _extends({
|
|
6378
6211
|
attr: _objectSpread({}, data.attr)
|
|
6379
6212
|
}, props), Tree2Element(data.child));
|
|
6380
6213
|
}
|
|
@@ -6389,7 +6222,7 @@ function IconBase(props) {
|
|
|
6389
6222
|
var className;
|
|
6390
6223
|
if (conf.className) className = conf.className;
|
|
6391
6224
|
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
6392
|
-
return /* @__PURE__ */
|
|
6225
|
+
return /* @__PURE__ */ import_react22.default.createElement("svg", _extends({
|
|
6393
6226
|
stroke: "currentColor",
|
|
6394
6227
|
fill: "currentColor",
|
|
6395
6228
|
strokeWidth: "0"
|
|
@@ -6401,9 +6234,9 @@ function IconBase(props) {
|
|
|
6401
6234
|
height: computedSize,
|
|
6402
6235
|
width: computedSize,
|
|
6403
6236
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6404
|
-
}), title && /* @__PURE__ */
|
|
6237
|
+
}), title && /* @__PURE__ */ import_react22.default.createElement("title", null, title), props.children);
|
|
6405
6238
|
};
|
|
6406
|
-
return IconContext !== void 0 ? /* @__PURE__ */
|
|
6239
|
+
return IconContext !== void 0 ? /* @__PURE__ */ import_react22.default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
6407
6240
|
}
|
|
6408
6241
|
|
|
6409
6242
|
// ../../node_modules/react-icons/fa/index.mjs
|
|
@@ -6417,9 +6250,9 @@ function SiZalo(props) {
|
|
|
6417
6250
|
}
|
|
6418
6251
|
|
|
6419
6252
|
// ../../components/ui/FloatingContacts.tsx
|
|
6420
|
-
var
|
|
6253
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6421
6254
|
function MessengerIcon(props) {
|
|
6422
|
-
return /* @__PURE__ */ (0,
|
|
6255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6423
6256
|
"path",
|
|
6424
6257
|
{
|
|
6425
6258
|
d: "M12 2C6.477 2 2 6.145 2 11.235c0 2.93 1.35 5.542 3.464 7.25v3.515l3.344-1.836c.894.247 1.843.375 2.192.375 5.523 0 10-4.145 10-9.235S17.523 2 12 2zm.994 12.444l-2.563-2.73-5.004 2.73 5.507-5.84 2.626 2.729 4.942-2.729-5.508 5.84z",
|
|
@@ -6428,10 +6261,10 @@ function MessengerIcon(props) {
|
|
|
6428
6261
|
) });
|
|
6429
6262
|
}
|
|
6430
6263
|
function ZaloIcon(props) {
|
|
6431
|
-
return /* @__PURE__ */ (0,
|
|
6264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SiZalo, { size: 20, ...props });
|
|
6432
6265
|
}
|
|
6433
6266
|
function InstagramIcon(props) {
|
|
6434
|
-
return /* @__PURE__ */ (0,
|
|
6267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FaInstagram, { size: 20, ...props });
|
|
6435
6268
|
}
|
|
6436
6269
|
function FloatingContacts({ className }) {
|
|
6437
6270
|
const pathname = (0, import_navigation.usePathname)();
|
|
@@ -6466,8 +6299,8 @@ function FloatingContacts({ className }) {
|
|
|
6466
6299
|
external: true
|
|
6467
6300
|
}
|
|
6468
6301
|
];
|
|
6469
|
-
return /* @__PURE__ */ (0,
|
|
6470
|
-
/* @__PURE__ */ (0,
|
|
6302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("fixed bottom-6 right-4 z-[100000]", "flex flex-col items-end gap-3", className), "aria-label": "Quick contacts", children: [
|
|
6303
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6471
6304
|
import_link2.default,
|
|
6472
6305
|
{
|
|
6473
6306
|
href: `tel:${hotline.replace(/\D/g, "")}`,
|
|
@@ -6478,10 +6311,10 @@ function FloatingContacts({ className }) {
|
|
|
6478
6311
|
"hover:scale-105 active:scale-95 transition-transform",
|
|
6479
6312
|
"bg-[#22c55e]"
|
|
6480
6313
|
),
|
|
6481
|
-
children: /* @__PURE__ */ (0,
|
|
6314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Phone, { className: "w-6 h-6" })
|
|
6482
6315
|
}
|
|
6483
6316
|
),
|
|
6484
|
-
moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */ (0,
|
|
6317
|
+
moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6485
6318
|
import_link2.default,
|
|
6486
6319
|
{
|
|
6487
6320
|
href,
|
|
@@ -6493,7 +6326,7 @@ function FloatingContacts({ className }) {
|
|
|
6493
6326
|
"hover:scale-105 active:scale-95 transition-transform",
|
|
6494
6327
|
bg
|
|
6495
6328
|
),
|
|
6496
|
-
children: /* @__PURE__ */ (0,
|
|
6329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { className: "w-6 h-6" })
|
|
6497
6330
|
},
|
|
6498
6331
|
key
|
|
6499
6332
|
))
|
|
@@ -6501,17 +6334,17 @@ function FloatingContacts({ className }) {
|
|
|
6501
6334
|
}
|
|
6502
6335
|
|
|
6503
6336
|
// ../../components/ui/AccessDenied.tsx
|
|
6504
|
-
var
|
|
6505
|
-
var
|
|
6337
|
+
var import_lucide_react23 = require("lucide-react");
|
|
6338
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6506
6339
|
var VARIANT_STYLES = {
|
|
6507
6340
|
destructive: { bg: "bg-destructive/5", border: "border-destructive/20", text: "text-destructive" },
|
|
6508
6341
|
warning: { bg: "bg-warning/5", border: "border-warning/20", text: "text-warning" },
|
|
6509
6342
|
info: { bg: "bg-info/5", border: "border-info/20", text: "text-info" }
|
|
6510
6343
|
};
|
|
6511
6344
|
var DEFAULT_ICONS = {
|
|
6512
|
-
destructive:
|
|
6513
|
-
warning:
|
|
6514
|
-
info:
|
|
6345
|
+
destructive: import_lucide_react23.ShieldAlert,
|
|
6346
|
+
warning: import_lucide_react23.Ban,
|
|
6347
|
+
info: import_lucide_react23.Lock
|
|
6515
6348
|
};
|
|
6516
6349
|
function AccessDenied({
|
|
6517
6350
|
title = "Access Restricted",
|
|
@@ -6523,15 +6356,147 @@ function AccessDenied({
|
|
|
6523
6356
|
}) {
|
|
6524
6357
|
const styles = VARIANT_STYLES[variant];
|
|
6525
6358
|
const UsedIcon = Icon || DEFAULT_ICONS[variant];
|
|
6526
|
-
return /* @__PURE__ */ (0,
|
|
6527
|
-
/* @__PURE__ */ (0,
|
|
6528
|
-
/* @__PURE__ */ (0,
|
|
6529
|
-
/* @__PURE__ */ (0,
|
|
6530
|
-
/* @__PURE__ */ (0,
|
|
6359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Card_default, { className: cn("p-8 text-center shadow-sm", styles.bg, styles.border, className), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
6360
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn("p-3 rounded-lg", styles.bg.replace("/5", "/10")), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UsedIcon, { className: cn("w-8 h-8", styles.text) }) }),
|
|
6361
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
|
|
6362
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: cn("font-semibold mb-2", styles.text), children: title }),
|
|
6363
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: cn(styles.text.replace("text-", "text-") + "/80", "text-sm"), children: description })
|
|
6531
6364
|
] }),
|
|
6532
|
-
children && /* @__PURE__ */ (0,
|
|
6365
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-2 flex flex-wrap gap-2 justify-center", children })
|
|
6533
6366
|
] }) });
|
|
6534
6367
|
}
|
|
6368
|
+
|
|
6369
|
+
// locales/en.json
|
|
6370
|
+
var en_default = {
|
|
6371
|
+
Common: {
|
|
6372
|
+
close: "Close",
|
|
6373
|
+
closeAlert: "Close alert",
|
|
6374
|
+
notifications: "Notifications",
|
|
6375
|
+
newNotification: "New",
|
|
6376
|
+
readStatus: "Read",
|
|
6377
|
+
openLink: "Open link",
|
|
6378
|
+
theme: "Theme",
|
|
6379
|
+
lightTheme: "Light",
|
|
6380
|
+
darkTheme: "Dark",
|
|
6381
|
+
systemTheme: "System",
|
|
6382
|
+
density: "Density",
|
|
6383
|
+
compact: "Compact",
|
|
6384
|
+
normal: "Normal",
|
|
6385
|
+
comfortable: "Comfortable",
|
|
6386
|
+
columns: "Columns"
|
|
6387
|
+
},
|
|
6388
|
+
ValidationInput: {
|
|
6389
|
+
required: "This field is required",
|
|
6390
|
+
typeMismatch: "Invalid format",
|
|
6391
|
+
pattern: "Invalid pattern",
|
|
6392
|
+
tooShort: "Too short",
|
|
6393
|
+
tooLong: "Too long",
|
|
6394
|
+
rangeUnderflow: "Below minimum",
|
|
6395
|
+
rangeOverflow: "Above maximum",
|
|
6396
|
+
stepMismatch: "Step mismatch",
|
|
6397
|
+
badInput: "Bad input",
|
|
6398
|
+
invalid: "Invalid value"
|
|
6399
|
+
},
|
|
6400
|
+
Loading: {
|
|
6401
|
+
loadingPage: "Loading page",
|
|
6402
|
+
pleaseWait: "Please wait"
|
|
6403
|
+
},
|
|
6404
|
+
DatePicker: {
|
|
6405
|
+
placeholder: "Select date",
|
|
6406
|
+
today: "Today",
|
|
6407
|
+
clear: "Clear"
|
|
6408
|
+
},
|
|
6409
|
+
Pagination: {
|
|
6410
|
+
navigationLabel: "Pagination navigation",
|
|
6411
|
+
showingResults: "Showing {startItem}\u2013{endItem} of {totalItems}",
|
|
6412
|
+
firstPage: "First page",
|
|
6413
|
+
previousPage: "Previous page",
|
|
6414
|
+
previous: "Previous",
|
|
6415
|
+
nextPage: "Next page",
|
|
6416
|
+
next: "Next",
|
|
6417
|
+
lastPage: "Last page",
|
|
6418
|
+
pageNumber: "Page {page}",
|
|
6419
|
+
itemsPerPage: "Items per page",
|
|
6420
|
+
search: "Search",
|
|
6421
|
+
noOptions: "No options"
|
|
6422
|
+
},
|
|
6423
|
+
OCR: {
|
|
6424
|
+
imageUpload: {
|
|
6425
|
+
dragDropText: "Drag & drop files here",
|
|
6426
|
+
browseFiles: "Browse files",
|
|
6427
|
+
supportedFormats: "Supported formats: images"
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6430
|
+
};
|
|
6431
|
+
|
|
6432
|
+
// locales/vi.json
|
|
6433
|
+
var vi_default = {
|
|
6434
|
+
Common: {
|
|
6435
|
+
close: "\u0110\xF3ng",
|
|
6436
|
+
closeAlert: "\u0110\xF3ng c\u1EA3nh b\xE1o",
|
|
6437
|
+
notifications: "Th\xF4ng b\xE1o",
|
|
6438
|
+
newNotification: "M\u1EDBi",
|
|
6439
|
+
readStatus: "\u0110\xE3 \u0111\u1ECDc",
|
|
6440
|
+
openLink: "M\u1EDF li\xEAn k\u1EBFt",
|
|
6441
|
+
theme: "Ch\u1EE7 \u0111\u1EC1",
|
|
6442
|
+
lightTheme: "Giao di\u1EC7n s\xE1ng",
|
|
6443
|
+
darkTheme: "Giao di\u1EC7n t\u1ED1i",
|
|
6444
|
+
systemTheme: "Theo h\u1EC7 th\u1ED1ng",
|
|
6445
|
+
density: "M\u1EADt \u0111\u1ED9",
|
|
6446
|
+
compact: "G\u1ECDn",
|
|
6447
|
+
normal: "Th\u01B0\u1EDDng",
|
|
6448
|
+
comfortable: "Tho\u1EA3i m\xE1i",
|
|
6449
|
+
columns: "C\u1ED9t"
|
|
6450
|
+
},
|
|
6451
|
+
ValidationInput: {
|
|
6452
|
+
required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c",
|
|
6453
|
+
typeMismatch: "\u0110\u1ECBnh d\u1EA1ng kh\xF4ng h\u1EE3p l\u1EC7",
|
|
6454
|
+
pattern: "Sai m\u1EABu",
|
|
6455
|
+
tooShort: "Qu\xE1 ng\u1EAFn",
|
|
6456
|
+
tooLong: "Qu\xE1 d\xE0i",
|
|
6457
|
+
rangeUnderflow: "Nh\u1ECF h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i thi\u1EC3u",
|
|
6458
|
+
rangeOverflow: "L\u1EDBn h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i \u0111a",
|
|
6459
|
+
stepMismatch: "Sai b\u01B0\u1EDBc",
|
|
6460
|
+
badInput: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",
|
|
6461
|
+
invalid: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7"
|
|
6462
|
+
},
|
|
6463
|
+
Loading: {
|
|
6464
|
+
loadingPage: "\u0110ang t\u1EA3i trang",
|
|
6465
|
+
pleaseWait: "Vui l\xF2ng ch\u1EDD"
|
|
6466
|
+
},
|
|
6467
|
+
DatePicker: {
|
|
6468
|
+
placeholder: "Ch\u1ECDn ng\xE0y",
|
|
6469
|
+
today: "H\xF4m nay",
|
|
6470
|
+
clear: "X\xF3a"
|
|
6471
|
+
},
|
|
6472
|
+
Pagination: {
|
|
6473
|
+
navigationLabel: "\u0110i\u1EC1u h\u01B0\u1EDBng ph\xE2n trang",
|
|
6474
|
+
showingResults: "Hi\u1EC3n th\u1ECB {startItem}\u2013{endItem} trong t\u1ED5ng {totalItems}",
|
|
6475
|
+
firstPage: "Trang \u0111\u1EA7u",
|
|
6476
|
+
previousPage: "Trang tr\u01B0\u1EDBc",
|
|
6477
|
+
previous: "Tr\u01B0\u1EDBc",
|
|
6478
|
+
nextPage: "Trang sau",
|
|
6479
|
+
next: "Sau",
|
|
6480
|
+
lastPage: "Trang cu\u1ED1i",
|
|
6481
|
+
pageNumber: "Trang {page}",
|
|
6482
|
+
itemsPerPage: "S\u1ED1 m\u1EE5c/trang",
|
|
6483
|
+
search: "T\xECm ki\u1EBFm",
|
|
6484
|
+
noOptions: "Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn"
|
|
6485
|
+
},
|
|
6486
|
+
OCR: {
|
|
6487
|
+
imageUpload: {
|
|
6488
|
+
dragDropText: "K\xE9o & th\u1EA3 \u1EA3nh v\xE0o \u0111\xE2y",
|
|
6489
|
+
browseFiles: "Ch\u1ECDn t\u1EC7p",
|
|
6490
|
+
supportedFormats: "H\u1ED7 tr\u1EE3 c\xE1c \u0111\u1ECBnh d\u1EA1ng \u1EA3nh"
|
|
6491
|
+
}
|
|
6492
|
+
}
|
|
6493
|
+
};
|
|
6494
|
+
|
|
6495
|
+
// src/index.ts
|
|
6496
|
+
var underverseMessages = { en: en_default, vi: vi_default };
|
|
6497
|
+
function getUnderverseMessages(locale = "en") {
|
|
6498
|
+
return underverseMessages[locale] || underverseMessages.en;
|
|
6499
|
+
}
|
|
6535
6500
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6536
6501
|
0 && (module.exports = {
|
|
6537
6502
|
AccessDenied,
|
|
@@ -6573,7 +6538,6 @@ function AccessDenied({
|
|
|
6573
6538
|
Pagination,
|
|
6574
6539
|
PillTabs,
|
|
6575
6540
|
Popover,
|
|
6576
|
-
ProductImageUpload,
|
|
6577
6541
|
Progress,
|
|
6578
6542
|
PulseBadge,
|
|
6579
6543
|
RadioGroup,
|
|
@@ -6606,6 +6570,8 @@ function AccessDenied({
|
|
|
6606
6570
|
VARIANT_STYLES_BTN,
|
|
6607
6571
|
VerticalTabs,
|
|
6608
6572
|
cn,
|
|
6573
|
+
getUnderverseMessages,
|
|
6574
|
+
underverseMessages,
|
|
6609
6575
|
useToast
|
|
6610
6576
|
});
|
|
6611
6577
|
//# sourceMappingURL=index.cjs.map
|