jett.admin.npmpackage 1.0.12 → 1.0.14
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/index.css +42 -3
- package/dist/index.js +140 -40
- package/dist/index.mjs +140 -40
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -381,12 +381,12 @@
|
|
|
381
381
|
.w-11 {
|
|
382
382
|
width: calc(var(--spacing) * 11);
|
|
383
383
|
}
|
|
384
|
-
.w-72 {
|
|
385
|
-
width: calc(var(--spacing) * 72);
|
|
386
|
-
}
|
|
387
384
|
.w-\[108px\] {
|
|
388
385
|
width: 108px;
|
|
389
386
|
}
|
|
387
|
+
.w-\[320px\] {
|
|
388
|
+
width: 320px;
|
|
389
|
+
}
|
|
390
390
|
.w-full {
|
|
391
391
|
width: 100%;
|
|
392
392
|
}
|
|
@@ -1066,4 +1066,43 @@
|
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
+
|
|
1070
|
+
/* src/RightSheet/RightSheet.css */
|
|
1071
|
+
.sheetPopIn {
|
|
1072
|
+
animation: popIn 50ms ease-in-out forwards;
|
|
1073
|
+
}
|
|
1074
|
+
.sheetRightSlide {
|
|
1075
|
+
animation: rightSlide 350ms ease-in-out forwards;
|
|
1076
|
+
}
|
|
1077
|
+
.sheetLeftSlide {
|
|
1078
|
+
animation: sheetLeftSlide 350ms ease-in-out forwards;
|
|
1079
|
+
}
|
|
1080
|
+
@keyframes sheetLeftSlide {
|
|
1081
|
+
0% {
|
|
1082
|
+
transform: translateX(-100%);
|
|
1083
|
+
opacity: 0;
|
|
1084
|
+
}
|
|
1085
|
+
100% {
|
|
1086
|
+
transform: translateX(0);
|
|
1087
|
+
opacity: 1;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
@keyframes rightSlide {
|
|
1091
|
+
0% {
|
|
1092
|
+
transform: translateX(100%);
|
|
1093
|
+
opacity: 0;
|
|
1094
|
+
}
|
|
1095
|
+
100% {
|
|
1096
|
+
transform: translateX(0);
|
|
1097
|
+
opacity: 1;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
@keyframes popIn {
|
|
1101
|
+
0% {
|
|
1102
|
+
opacity: 0;
|
|
1103
|
+
}
|
|
1104
|
+
100% {
|
|
1105
|
+
opacity: 1;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1069
1108
|
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
package/dist/index.js
CHANGED
|
@@ -445,41 +445,139 @@ var import_react11 = __toESM(require("react"));
|
|
|
445
445
|
// ConstantUI.js
|
|
446
446
|
var import_lucide_react4 = require("lucide-react");
|
|
447
447
|
var navItemsConstant = [
|
|
448
|
-
{
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
448
|
+
{
|
|
449
|
+
Icon: import_lucide_react4.Home,
|
|
450
|
+
label: "Home",
|
|
451
|
+
onClick: () => {
|
|
452
|
+
window.location.href = "/";
|
|
453
|
+
},
|
|
454
|
+
isDropDown: false
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
Icon: import_lucide_react4.Handshake,
|
|
458
|
+
label: "Supplier Ecosystem",
|
|
459
|
+
onClick: () => {
|
|
460
|
+
},
|
|
461
|
+
isDropDown: true,
|
|
462
|
+
options: [
|
|
463
|
+
{ label: "Suppliers", onClick: () => {
|
|
464
|
+
window.location.href = "/supplier/";
|
|
465
|
+
} }
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
Icon: import_lucide_react4.Building,
|
|
470
|
+
label: "Consumer Ecosystem",
|
|
471
|
+
onClick: () => {
|
|
472
|
+
},
|
|
473
|
+
options: [
|
|
474
|
+
{
|
|
475
|
+
label: "Corporate",
|
|
476
|
+
onClick: () => {
|
|
477
|
+
window.location.href = "/corporate/";
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{ label: "Trips", onClick: () => {
|
|
481
|
+
window.location.href = "/trips/";
|
|
482
|
+
} },
|
|
483
|
+
{ label: "Reports", onClick: () => {
|
|
484
|
+
window.location.href = "/reports/";
|
|
485
|
+
} },
|
|
486
|
+
{
|
|
487
|
+
label: "Tags",
|
|
488
|
+
onClick: () => {
|
|
489
|
+
window.location.href = "/tags/";
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
isDropDown: true
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
Icon: import_lucide_react4.Banknote,
|
|
497
|
+
label: "Finance",
|
|
498
|
+
onClick: () => {
|
|
499
|
+
},
|
|
500
|
+
isDropDown: true,
|
|
501
|
+
options: [
|
|
502
|
+
{ label: "Invoices", onClick: () => {
|
|
503
|
+
window.location.href = "/invoices/";
|
|
504
|
+
} },
|
|
505
|
+
{ label: "Ledger", onClick: () => {
|
|
506
|
+
window.location.href = "/ledger/";
|
|
507
|
+
} },
|
|
508
|
+
{ label: "Payments", onClick: () => {
|
|
509
|
+
window.location.href = "/payments/";
|
|
510
|
+
} }
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
Icon: import_lucide_react4.DollarSign,
|
|
515
|
+
label: "Revenue Management",
|
|
516
|
+
onClick: () => {
|
|
517
|
+
},
|
|
518
|
+
isDropDown: true,
|
|
519
|
+
options: [
|
|
520
|
+
{
|
|
521
|
+
label: "Pricing Policy",
|
|
522
|
+
onClick: () => {
|
|
523
|
+
window.location.href = "/pricing/";
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
{ label: "Offers", onClick: () => {
|
|
527
|
+
window.location.href = "/offers/";
|
|
528
|
+
} },
|
|
529
|
+
{ label: "Vouchers", onClick: () => {
|
|
530
|
+
window.location.href = "/vouchers/";
|
|
531
|
+
} },
|
|
532
|
+
{ label: "Supplier Deals", onClick: () => {
|
|
533
|
+
window.location.href = "/supplierdeals/";
|
|
534
|
+
} },
|
|
535
|
+
{
|
|
536
|
+
label: "Subscription Plans",
|
|
537
|
+
onClick: () => {
|
|
538
|
+
window.location.href = "/subscription/";
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
]
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
Icon: import_lucide_react4.Cog,
|
|
545
|
+
label: "Settings",
|
|
546
|
+
onClick: () => {
|
|
547
|
+
},
|
|
548
|
+
isDropDown: true,
|
|
549
|
+
options: [
|
|
550
|
+
{
|
|
551
|
+
label: "Admin user Management",
|
|
552
|
+
isDropDown: true,
|
|
553
|
+
onClick: () => {
|
|
554
|
+
},
|
|
555
|
+
options: [
|
|
556
|
+
{ label: "Admin Users", onClick: () => {
|
|
557
|
+
window.location.href = "/users/";
|
|
558
|
+
} },
|
|
559
|
+
{ label: "Admin User Attributes", onClick: () => {
|
|
560
|
+
} }
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
{ label: "TMC Markets", onClick: () => {
|
|
564
|
+
window.location.href = "/market/";
|
|
565
|
+
} },
|
|
566
|
+
{ label: "Permissions", onClick: () => {
|
|
567
|
+
window.location.href = "/permissions/";
|
|
568
|
+
} },
|
|
569
|
+
{ label: "Report Configurations", onClick: () => {
|
|
570
|
+
window.location.href = "/reports/";
|
|
571
|
+
} },
|
|
572
|
+
{ label: "Whitelabelling", onClick: () => {
|
|
573
|
+
window.location.href = "/whitelabelling/";
|
|
574
|
+
} }
|
|
575
|
+
]
|
|
576
|
+
}
|
|
480
577
|
];
|
|
481
578
|
var additionalItemsConstant = [
|
|
482
|
-
{ Icon: import_lucide_react4.LifeBuoy, label: "Help",
|
|
579
|
+
{ Icon: import_lucide_react4.LifeBuoy, label: "Help", onClick: () => {
|
|
580
|
+
window.location.href = "/help";
|
|
483
581
|
} }
|
|
484
582
|
];
|
|
485
583
|
|
|
@@ -511,7 +609,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
511
609
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
512
610
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
513
611
|
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
514
|
-
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-
|
|
612
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-[320px] transition-all ease-in-out delay-100 bg-transparent border-r border-gray-200 dark:border-[#303036] flex flex-col p-4 h-full max-h-[100vh]" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-2 mb-4" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-[108px] h-[40px] flex items-center \r\n justify-center" }, /* @__PURE__ */ import_react11.default.createElement("img", { src: sideBarLogoLocal, alt: "sidebarLogo", width: 108, height: 40 }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mb-6" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex ml-[20px] items-center gap-2 mb-2 dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.Globe, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("h3", { className: "text-[#3f3f46cc] dark:text-[#f4f4f5cc] font-medium" }, "Data Centers")), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement(CustomAutocomplete, { options: [] }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "overflow-y-auto" }, /* @__PURE__ */ import_react11.default.createElement("div", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
515
613
|
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer rounded-lg ml-2", onClick: (e) => {
|
|
516
614
|
item.onClick && item.onClick(e);
|
|
517
615
|
handleIconRotate(e, index);
|
|
@@ -521,7 +619,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
521
619
|
{
|
|
522
620
|
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] cursor-pointer",
|
|
523
621
|
onClick: (e) => {
|
|
524
|
-
options.
|
|
622
|
+
options.onClick && options.onClick();
|
|
525
623
|
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
526
624
|
}
|
|
527
625
|
},
|
|
@@ -534,7 +632,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
534
632
|
{
|
|
535
633
|
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] font-medium text-sm",
|
|
536
634
|
onClick: (e) => {
|
|
537
|
-
subOption.
|
|
635
|
+
subOption.onClick && options.onClick();
|
|
538
636
|
}
|
|
539
637
|
},
|
|
540
638
|
subOption.label
|
|
@@ -543,7 +641,9 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
543
641
|
})));
|
|
544
642
|
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "border-t border-[#e5e5e5] dark:border-[#303036] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
545
643
|
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, item.label));
|
|
546
|
-
}))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] cursor-pointer"
|
|
644
|
+
}))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] cursor-pointer", onClick: () => {
|
|
645
|
+
window.location.href = "/profile";
|
|
646
|
+
} }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "relative flex shrink-0 overflow-hidden rounded-full h-10 w-10" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-muted" }, username && username.split("")[0])), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("p", { className: "font-semibold" }, username), /* @__PURE__ */ import_react11.default.createElement("p", { className: "text-sm text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, role))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-[#18181b] dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.LogOut, null)))));
|
|
547
647
|
};
|
|
548
648
|
|
|
549
649
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -560,9 +660,9 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
560
660
|
};
|
|
561
661
|
}, [open]);
|
|
562
662
|
const handleClose = () => {
|
|
563
|
-
|
|
663
|
+
setVisible(false);
|
|
564
664
|
setTimeout(() => {
|
|
565
|
-
|
|
665
|
+
setOpen(false);
|
|
566
666
|
callBack();
|
|
567
667
|
}, 200);
|
|
568
668
|
};
|
|
@@ -571,7 +671,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
571
671
|
"div",
|
|
572
672
|
{
|
|
573
673
|
className: `absolute flex flex-col right-0 top-0 min-h-full min-w-[100%] md:min-w-[576px] bg-white
|
|
574
|
-
${
|
|
674
|
+
${visible ? "sheetRightSlide" : "transition-all duration-200 translate-x-[100%]"} justify-between `,
|
|
575
675
|
onClick: (e) => e.stopPropagation()
|
|
576
676
|
},
|
|
577
677
|
/* @__PURE__ */ import_react12.default.createElement("div", { className: "bg-white min-h-full " }, children),
|
package/dist/index.mjs
CHANGED
|
@@ -398,41 +398,139 @@ import React11 from "react";
|
|
|
398
398
|
// ConstantUI.js
|
|
399
399
|
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog, Building, Handshake, DollarSign } from "lucide-react";
|
|
400
400
|
var navItemsConstant = [
|
|
401
|
-
{
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
401
|
+
{
|
|
402
|
+
Icon: Home,
|
|
403
|
+
label: "Home",
|
|
404
|
+
onClick: () => {
|
|
405
|
+
window.location.href = "/";
|
|
406
|
+
},
|
|
407
|
+
isDropDown: false
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
Icon: Handshake,
|
|
411
|
+
label: "Supplier Ecosystem",
|
|
412
|
+
onClick: () => {
|
|
413
|
+
},
|
|
414
|
+
isDropDown: true,
|
|
415
|
+
options: [
|
|
416
|
+
{ label: "Suppliers", onClick: () => {
|
|
417
|
+
window.location.href = "/supplier/";
|
|
418
|
+
} }
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
Icon: Building,
|
|
423
|
+
label: "Consumer Ecosystem",
|
|
424
|
+
onClick: () => {
|
|
425
|
+
},
|
|
426
|
+
options: [
|
|
427
|
+
{
|
|
428
|
+
label: "Corporate",
|
|
429
|
+
onClick: () => {
|
|
430
|
+
window.location.href = "/corporate/";
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
{ label: "Trips", onClick: () => {
|
|
434
|
+
window.location.href = "/trips/";
|
|
435
|
+
} },
|
|
436
|
+
{ label: "Reports", onClick: () => {
|
|
437
|
+
window.location.href = "/reports/";
|
|
438
|
+
} },
|
|
439
|
+
{
|
|
440
|
+
label: "Tags",
|
|
441
|
+
onClick: () => {
|
|
442
|
+
window.location.href = "/tags/";
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
isDropDown: true
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
Icon: Banknote,
|
|
450
|
+
label: "Finance",
|
|
451
|
+
onClick: () => {
|
|
452
|
+
},
|
|
453
|
+
isDropDown: true,
|
|
454
|
+
options: [
|
|
455
|
+
{ label: "Invoices", onClick: () => {
|
|
456
|
+
window.location.href = "/invoices/";
|
|
457
|
+
} },
|
|
458
|
+
{ label: "Ledger", onClick: () => {
|
|
459
|
+
window.location.href = "/ledger/";
|
|
460
|
+
} },
|
|
461
|
+
{ label: "Payments", onClick: () => {
|
|
462
|
+
window.location.href = "/payments/";
|
|
463
|
+
} }
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
Icon: DollarSign,
|
|
468
|
+
label: "Revenue Management",
|
|
469
|
+
onClick: () => {
|
|
470
|
+
},
|
|
471
|
+
isDropDown: true,
|
|
472
|
+
options: [
|
|
473
|
+
{
|
|
474
|
+
label: "Pricing Policy",
|
|
475
|
+
onClick: () => {
|
|
476
|
+
window.location.href = "/pricing/";
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{ label: "Offers", onClick: () => {
|
|
480
|
+
window.location.href = "/offers/";
|
|
481
|
+
} },
|
|
482
|
+
{ label: "Vouchers", onClick: () => {
|
|
483
|
+
window.location.href = "/vouchers/";
|
|
484
|
+
} },
|
|
485
|
+
{ label: "Supplier Deals", onClick: () => {
|
|
486
|
+
window.location.href = "/supplierdeals/";
|
|
487
|
+
} },
|
|
488
|
+
{
|
|
489
|
+
label: "Subscription Plans",
|
|
490
|
+
onClick: () => {
|
|
491
|
+
window.location.href = "/subscription/";
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
Icon: Cog,
|
|
498
|
+
label: "Settings",
|
|
499
|
+
onClick: () => {
|
|
500
|
+
},
|
|
501
|
+
isDropDown: true,
|
|
502
|
+
options: [
|
|
503
|
+
{
|
|
504
|
+
label: "Admin user Management",
|
|
505
|
+
isDropDown: true,
|
|
506
|
+
onClick: () => {
|
|
507
|
+
},
|
|
508
|
+
options: [
|
|
509
|
+
{ label: "Admin Users", onClick: () => {
|
|
510
|
+
window.location.href = "/users/";
|
|
511
|
+
} },
|
|
512
|
+
{ label: "Admin User Attributes", onClick: () => {
|
|
513
|
+
} }
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
{ label: "TMC Markets", onClick: () => {
|
|
517
|
+
window.location.href = "/market/";
|
|
518
|
+
} },
|
|
519
|
+
{ label: "Permissions", onClick: () => {
|
|
520
|
+
window.location.href = "/permissions/";
|
|
521
|
+
} },
|
|
522
|
+
{ label: "Report Configurations", onClick: () => {
|
|
523
|
+
window.location.href = "/reports/";
|
|
524
|
+
} },
|
|
525
|
+
{ label: "Whitelabelling", onClick: () => {
|
|
526
|
+
window.location.href = "/whitelabelling/";
|
|
527
|
+
} }
|
|
528
|
+
]
|
|
529
|
+
}
|
|
433
530
|
];
|
|
434
531
|
var additionalItemsConstant = [
|
|
435
|
-
{ Icon: LifeBuoy, label: "Help",
|
|
532
|
+
{ Icon: LifeBuoy, label: "Help", onClick: () => {
|
|
533
|
+
window.location.href = "/help";
|
|
436
534
|
} }
|
|
437
535
|
];
|
|
438
536
|
|
|
@@ -464,7 +562,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
464
562
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
465
563
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
466
564
|
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
467
|
-
return /* @__PURE__ */ React11.createElement("div", { className: "w-
|
|
565
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "w-[320px] transition-all ease-in-out delay-100 bg-transparent border-r border-gray-200 dark:border-[#303036] flex flex-col p-4 h-full max-h-[100vh]" }, /* @__PURE__ */ React11.createElement("div", { className: "p-2 mb-4" }, /* @__PURE__ */ React11.createElement("div", { className: "w-[108px] h-[40px] flex items-center \r\n justify-center" }, /* @__PURE__ */ React11.createElement("img", { src: sideBarLogoLocal, alt: "sidebarLogo", width: 108, height: 40 }))), /* @__PURE__ */ React11.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React11.createElement("div", { className: "flex ml-[20px] items-center gap-2 mb-2 dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ React11.createElement(Globe2, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("h3", { className: "text-[#3f3f46cc] dark:text-[#f4f4f5cc] font-medium" }, "Data Centers")), /* @__PURE__ */ React11.createElement("div", null, /* @__PURE__ */ React11.createElement(CustomAutocomplete, { options: [] }))), /* @__PURE__ */ React11.createElement("div", { className: "overflow-y-auto" }, /* @__PURE__ */ React11.createElement("div", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
468
566
|
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer rounded-lg ml-2", onClick: (e) => {
|
|
469
567
|
item.onClick && item.onClick(e);
|
|
470
568
|
handleIconRotate(e, index);
|
|
@@ -474,7 +572,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
474
572
|
{
|
|
475
573
|
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] cursor-pointer",
|
|
476
574
|
onClick: (e) => {
|
|
477
|
-
options.
|
|
575
|
+
options.onClick && options.onClick();
|
|
478
576
|
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
479
577
|
}
|
|
480
578
|
},
|
|
@@ -487,7 +585,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
487
585
|
{
|
|
488
586
|
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] font-medium text-sm",
|
|
489
587
|
onClick: (e) => {
|
|
490
|
-
subOption.
|
|
588
|
+
subOption.onClick && options.onClick();
|
|
491
589
|
}
|
|
492
590
|
},
|
|
493
591
|
subOption.label
|
|
@@ -496,7 +594,9 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
496
594
|
})));
|
|
497
595
|
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] dark:border-[#303036] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
498
596
|
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, item.label));
|
|
499
|
-
}))), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] cursor-pointer"
|
|
597
|
+
}))), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] cursor-pointer", onClick: () => {
|
|
598
|
+
window.location.href = "/profile";
|
|
599
|
+
} }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("span", { className: "relative flex shrink-0 overflow-hidden rounded-full h-10 w-10" }, /* @__PURE__ */ React11.createElement("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-muted" }, username && username.split("")[0])), /* @__PURE__ */ React11.createElement("div", null, /* @__PURE__ */ React11.createElement("p", { className: "font-semibold" }, username), /* @__PURE__ */ React11.createElement("p", { className: "text-sm text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, role))), /* @__PURE__ */ React11.createElement("div", { className: "text-[#18181b] dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ React11.createElement(LogOut, null)))));
|
|
500
600
|
};
|
|
501
601
|
|
|
502
602
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -513,9 +613,9 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
513
613
|
};
|
|
514
614
|
}, [open]);
|
|
515
615
|
const handleClose = () => {
|
|
516
|
-
|
|
616
|
+
setVisible(false);
|
|
517
617
|
setTimeout(() => {
|
|
518
|
-
|
|
618
|
+
setOpen(false);
|
|
519
619
|
callBack();
|
|
520
620
|
}, 200);
|
|
521
621
|
};
|
|
@@ -524,7 +624,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
524
624
|
"div",
|
|
525
625
|
{
|
|
526
626
|
className: `absolute flex flex-col right-0 top-0 min-h-full min-w-[100%] md:min-w-[576px] bg-white
|
|
527
|
-
${
|
|
627
|
+
${visible ? "sheetRightSlide" : "transition-all duration-200 translate-x-[100%]"} justify-between `,
|
|
528
628
|
onClick: (e) => e.stopPropagation()
|
|
529
629
|
},
|
|
530
630
|
/* @__PURE__ */ React12.createElement("div", { className: "bg-white min-h-full " }, children),
|