@seliseblocks/genesis-os 4.4.6 → 4.4.8
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/{all-OJ5YSNAN.js → all-O45OXFJ7.js} +80 -80
- package/dist/{all-OJ5YSNAN.js.map → all-O45OXFJ7.js.map} +1 -1
- package/dist/{all-2UHIE3HU.cjs → all-UJTAKIGL.cjs} +80 -80
- package/dist/all-UJTAKIGL.cjs.map +1 -0
- package/dist/aspnet-4V2TYHQE.cjs +13 -0
- package/dist/{aspnet-7QL7EKM4.cjs.map → aspnet-4V2TYHQE.cjs.map} +1 -1
- package/dist/aspnet-R3X2H2AO.js +7 -0
- package/dist/{aspnet-I623QV26.js.map → aspnet-R3X2H2AO.js.map} +1 -1
- package/dist/chunk-2MP66EX3.cjs +16 -0
- package/dist/chunk-2MP66EX3.cjs.map +1 -0
- package/dist/chunk-3LBTW4A3.cjs +70 -0
- package/dist/chunk-3LBTW4A3.cjs.map +1 -0
- package/dist/{chunk-ZR6LRRN6.js → chunk-3OO2YVXW.js} +13 -7
- package/dist/chunk-3OO2YVXW.js.map +1 -0
- package/dist/chunk-3V7O45KN.js +86 -0
- package/dist/chunk-3V7O45KN.js.map +1 -0
- package/dist/{chunk-5L6BSYZR.cjs → chunk-45XWYZ67.cjs} +3 -3
- package/dist/{chunk-5L6BSYZR.cjs.map → chunk-45XWYZ67.cjs.map} +1 -1
- package/dist/{chunk-356ZGDMJ.cjs → chunk-5IOXQBUO.cjs} +3 -3
- package/dist/{chunk-356ZGDMJ.cjs.map → chunk-5IOXQBUO.cjs.map} +1 -1
- package/dist/chunk-6QSPMPJD.js +3 -0
- package/dist/chunk-6QSPMPJD.js.map +1 -0
- package/dist/chunk-7ZZ3KLZD.js +14 -0
- package/dist/chunk-7ZZ3KLZD.js.map +1 -0
- package/dist/{chunk-JQ4U53QV.cjs → chunk-A373J4BR.cjs} +82 -82
- package/dist/{chunk-JQ4U53QV.cjs.map → chunk-A373J4BR.cjs.map} +1 -1
- package/dist/{chunk-QTSTAWK3.cjs → chunk-AIUUCMAI.cjs} +8 -7
- package/dist/chunk-AIUUCMAI.cjs.map +1 -0
- package/dist/{chunk-IJMKS4XG.cjs → chunk-CTIGX76P.cjs} +15 -8
- package/dist/chunk-CTIGX76P.cjs.map +1 -0
- package/dist/{chunk-XRAO7JBH.js → chunk-ECDNFX6H.js} +11 -4
- package/dist/chunk-ECDNFX6H.js.map +1 -0
- package/dist/{chunk-WL6LTNZN.js → chunk-G24RPSJG.js} +79 -79
- package/dist/{chunk-WL6LTNZN.js.map → chunk-G24RPSJG.js.map} +1 -1
- package/dist/chunk-GAQGM46C.cjs +4 -0
- package/dist/chunk-GAQGM46C.cjs.map +1 -0
- package/dist/{chunk-VJAVGV6Z.js → chunk-GFUHF4DC.js} +3 -3
- package/dist/{chunk-VJAVGV6Z.js.map → chunk-GFUHF4DC.js.map} +1 -1
- package/dist/chunk-GSCW3WIQ.cjs +90 -0
- package/dist/chunk-GSCW3WIQ.cjs.map +1 -0
- package/dist/{chunk-4CMIWUZW.cjs → chunk-IPMRZNNS.cjs} +25 -24
- package/dist/chunk-IPMRZNNS.cjs.map +1 -0
- package/dist/{chunk-JITR3QYC.js → chunk-JYA5S4XN.js} +3 -64
- package/dist/chunk-JYA5S4XN.js.map +1 -0
- package/dist/{chunk-NPMO67H6.js → chunk-KA2OOMCU.js} +743 -544
- package/dist/chunk-KA2OOMCU.js.map +1 -0
- package/dist/{chunk-R5OAGX3J.js → chunk-ND6E3LWI.js} +3 -3
- package/dist/{chunk-R5OAGX3J.js.map → chunk-ND6E3LWI.js.map} +1 -1
- package/dist/chunk-OPMWK5SY.cjs +871 -0
- package/dist/chunk-OPMWK5SY.cjs.map +1 -0
- package/dist/{chunk-JUVLHPQI.js → chunk-POJIHGRY.js} +3 -14
- package/dist/chunk-POJIHGRY.js.map +1 -0
- package/dist/{chunk-CGVT7IFM.cjs → chunk-QBL4VIE4.cjs} +909 -710
- package/dist/chunk-QBL4VIE4.cjs.map +1 -0
- package/dist/{chunk-JSXAKNHQ.js → chunk-QHNZOBXR.js} +7 -6
- package/dist/chunk-QHNZOBXR.js.map +1 -0
- package/dist/{chunk-4QN4CYSC.cjs → chunk-RO55MFZA.cjs} +2 -64
- package/dist/chunk-RO55MFZA.cjs.map +1 -0
- package/dist/{chunk-VGOVEFEP.cjs → chunk-SAK3QQCD.cjs} +3 -3
- package/dist/{chunk-VGOVEFEP.cjs.map → chunk-SAK3QQCD.cjs.map} +1 -1
- package/dist/chunk-SQG7DJNY.js +68 -0
- package/dist/chunk-SQG7DJNY.js.map +1 -0
- package/dist/{chunk-X4YCRWXO.cjs → chunk-TSRDXJUG.cjs} +2 -14
- package/dist/chunk-TSRDXJUG.cjs.map +1 -0
- package/dist/{chunk-6GCU5LM7.cjs → chunk-U2LA7LBX.cjs} +2 -84
- package/dist/chunk-U2LA7LBX.cjs.map +1 -0
- package/dist/{chunk-XL7EULGP.js → chunk-U6GTLTLO.js} +3 -3
- package/dist/{chunk-XL7EULGP.js.map → chunk-U6GTLTLO.js.map} +1 -1
- package/dist/{chunk-O5ACQLWB.js → chunk-UDFH7SJI.js} +5 -4
- package/dist/chunk-UDFH7SJI.js.map +1 -0
- package/dist/{chunk-IRIDGVV2.cjs → chunk-VLZJP6FH.cjs} +70 -64
- package/dist/chunk-VLZJP6FH.cjs.map +1 -0
- package/dist/chunk-XYPSBVXL.js +842 -0
- package/dist/chunk-XYPSBVXL.js.map +1 -0
- package/dist/{chunk-4UHGGHI6.js → chunk-Z4ZDSA2A.js} +3 -82
- package/dist/chunk-Z4ZDSA2A.js.map +1 -0
- package/dist/components/index.cjs +438 -433
- package/dist/components/index.d.cts +5 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +91 -86
- package/dist/cshtml-IPCDTLX7.cjs +13 -0
- package/dist/{cshtml-ETL7US3D.cjs.map → cshtml-IPCDTLX7.cjs.map} +1 -1
- package/dist/cshtml-XPUEHA6K.js +7 -0
- package/dist/{cshtml-TVLCSBKU.js.map → cshtml-XPUEHA6K.js.map} +1 -1
- package/dist/eslint/index.cjs +33 -0
- package/dist/eslint/index.cjs.map +1 -0
- package/dist/eslint/index.d.cts +12 -0
- package/dist/eslint/index.d.ts +12 -0
- package/dist/eslint/index.js +28 -0
- package/dist/eslint/index.js.map +1 -0
- package/dist/guards/index.cjs +97 -92
- package/dist/guards/index.js +91 -86
- package/dist/hooks/index.cjs +65 -62
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +8 -5
- package/dist/i18n/index.cjs +125 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +137 -0
- package/dist/i18n/index.d.ts +137 -0
- package/dist/i18n/index.js +8 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +747 -630
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +91 -86
- package/dist/layouts/index.cjs +98 -93
- package/dist/layouts/index.js +91 -86
- package/dist/lib/index.cjs +38 -36
- package/dist/lib/index.js +5 -3
- package/dist/observability/index.cjs +102 -25
- package/dist/observability/index.cjs.map +1 -1
- package/dist/observability/index.d.cts +47 -5
- package/dist/observability/index.d.ts +47 -5
- package/dist/observability/index.js +98 -23
- package/dist/observability/index.js.map +1 -1
- package/dist/pages/index.cjs +96 -91
- package/dist/pages/index.js +91 -86
- package/dist/providers/index.cjs +11 -7
- package/dist/providers/index.js +7 -3
- package/dist/store/index.cjs +15 -13
- package/dist/store/index.js +4 -2
- package/dist/{tsx-PN3P5NJP.cjs → tsx-MALMUEWS.cjs} +5 -5
- package/dist/tsx-MALMUEWS.cjs.map +1 -0
- package/dist/{tsx-UJQQBLY4.js → tsx-MJR7GSNC.js} +4 -4
- package/dist/tsx-MJR7GSNC.js.map +1 -0
- package/dist/utils/index.cjs +77 -72
- package/dist/utils/index.js +9 -4
- package/package.json +11 -1
- package/dist/all-2UHIE3HU.cjs.map +0 -1
- package/dist/aspnet-7QL7EKM4.cjs +0 -13
- package/dist/aspnet-I623QV26.js +0 -7
- package/dist/chunk-4CMIWUZW.cjs.map +0 -1
- package/dist/chunk-4QN4CYSC.cjs.map +0 -1
- package/dist/chunk-4UHGGHI6.js.map +0 -1
- package/dist/chunk-6GCU5LM7.cjs.map +0 -1
- package/dist/chunk-CGVT7IFM.cjs.map +0 -1
- package/dist/chunk-IJMKS4XG.cjs.map +0 -1
- package/dist/chunk-IRIDGVV2.cjs.map +0 -1
- package/dist/chunk-JITR3QYC.js.map +0 -1
- package/dist/chunk-JSXAKNHQ.js.map +0 -1
- package/dist/chunk-JUVLHPQI.js.map +0 -1
- package/dist/chunk-NPMO67H6.js.map +0 -1
- package/dist/chunk-O5ACQLWB.js.map +0 -1
- package/dist/chunk-QTSTAWK3.cjs.map +0 -1
- package/dist/chunk-X4YCRWXO.cjs.map +0 -1
- package/dist/chunk-XRAO7JBH.js.map +0 -1
- package/dist/chunk-ZR6LRRN6.js.map +0 -1
- package/dist/cshtml-ETL7US3D.cjs +0 -13
- package/dist/cshtml-TVLCSBKU.js +0 -7
- package/dist/tsx-PN3P5NJP.cjs.map +0 -1
- package/dist/tsx-UJQQBLY4.js.map +0 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
4
|
+
var chunkVLZJP6FH_cjs = require('./chunk-VLZJP6FH.cjs');
|
|
5
|
+
var chunkAIUUCMAI_cjs = require('./chunk-AIUUCMAI.cjs');
|
|
6
|
+
var chunkIPMRZNNS_cjs = require('./chunk-IPMRZNNS.cjs');
|
|
7
|
+
var chunk2MP66EX3_cjs = require('./chunk-2MP66EX3.cjs');
|
|
8
|
+
var chunkCTIGX76P_cjs = require('./chunk-CTIGX76P.cjs');
|
|
9
9
|
var chunkBPJM3L7O_cjs = require('./chunk-BPJM3L7O.cjs');
|
|
10
|
+
var chunkOPMWK5SY_cjs = require('./chunk-OPMWK5SY.cjs');
|
|
10
11
|
var chunkYAF2X7W5_cjs = require('./chunk-YAF2X7W5.cjs');
|
|
11
12
|
var chunkF2LXD7RI_cjs = require('./chunk-F2LXD7RI.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
13
|
+
var chunkTSRDXJUG_cjs = require('./chunk-TSRDXJUG.cjs');
|
|
14
|
+
var chunkRO55MFZA_cjs = require('./chunk-RO55MFZA.cjs');
|
|
15
|
+
var chunkU2LA7LBX_cjs = require('./chunk-U2LA7LBX.cjs');
|
|
16
|
+
var chunkGSCW3WIQ_cjs = require('./chunk-GSCW3WIQ.cjs');
|
|
14
17
|
var chunkQJOVCH5A_cjs = require('./chunk-QJOVCH5A.cjs');
|
|
15
18
|
var React8 = require('react');
|
|
16
19
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
@@ -61,6 +64,7 @@ var SelectPrimitive = require('@radix-ui/react-select');
|
|
|
61
64
|
var reactRouter = require('react-router');
|
|
62
65
|
var reactQuery = require('@tanstack/react-query');
|
|
63
66
|
var signalr = require('@microsoft/signalr');
|
|
67
|
+
var de = require('date-fns/locale/de');
|
|
64
68
|
var reactTable = require('@tanstack/react-table');
|
|
65
69
|
var zod$1 = require('@hookform/resolvers/zod');
|
|
66
70
|
var zod = require('zod');
|
|
@@ -424,6 +428,10 @@ var Separator = React8__namespace.forwardRef(
|
|
|
424
428
|
)
|
|
425
429
|
);
|
|
426
430
|
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
431
|
+
var SrClose = () => {
|
|
432
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
433
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("common:CLOSE") });
|
|
434
|
+
};
|
|
427
435
|
var Sheet = SheetPrimitive__namespace.Root;
|
|
428
436
|
var SheetTrigger = SheetPrimitive__namespace.Trigger;
|
|
429
437
|
var SheetClose = SheetPrimitive__namespace.Close;
|
|
@@ -468,7 +476,7 @@ var SheetContent = React8__namespace.forwardRef(({ side = "right", className, hi
|
|
|
468
476
|
children,
|
|
469
477
|
!hideClose && /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "absolute right-6 top-8 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
470
478
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
471
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
+
/* @__PURE__ */ jsxRuntime.jsx(SrClose, {})
|
|
472
480
|
] })
|
|
473
481
|
]
|
|
474
482
|
}
|
|
@@ -559,6 +567,7 @@ function useSidebar() {
|
|
|
559
567
|
}
|
|
560
568
|
return context;
|
|
561
569
|
}
|
|
570
|
+
var TOGGLE_KEY = "SIDEBAR.TOGGLE";
|
|
562
571
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
563
572
|
var SIDEBAR_WIDTH = "16rem";
|
|
564
573
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
@@ -586,7 +595,7 @@ var SidebarProvider = React8__namespace.forwardRef(
|
|
|
586
595
|
} else {
|
|
587
596
|
_setOpen(openState);
|
|
588
597
|
}
|
|
589
|
-
const cookieStore = new
|
|
598
|
+
const cookieStore = new chunkGSCW3WIQ_cjs.CookieStorage();
|
|
590
599
|
cookieStore.setItem(SIDEBAR_COOKIE_NAME, String(openState));
|
|
591
600
|
},
|
|
592
601
|
[setOpenProp, open]
|
|
@@ -660,6 +669,7 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
660
669
|
...props
|
|
661
670
|
}, ref) => {
|
|
662
671
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
672
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
663
673
|
if (collapsible === "none") {
|
|
664
674
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
665
675
|
"div",
|
|
@@ -687,8 +697,8 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
687
697
|
side,
|
|
688
698
|
children: [
|
|
689
699
|
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: "sr-only", children: [
|
|
690
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "
|
|
691
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: "
|
|
700
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: t("SIDEBAR.TITLE") }),
|
|
701
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: t("SIDEBAR.DESCRIPTION") })
|
|
692
702
|
] }),
|
|
693
703
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
694
704
|
]
|
|
@@ -754,6 +764,7 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
754
764
|
);
|
|
755
765
|
Sidebar.displayName = "Sidebar";
|
|
756
766
|
var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
767
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
757
768
|
const { toggleSidebar } = useSidebar();
|
|
758
769
|
const PanelLeftIcon = lucideReact.PanelLeft;
|
|
759
770
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -771,23 +782,24 @@ var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...prop
|
|
|
771
782
|
...props,
|
|
772
783
|
children: [
|
|
773
784
|
/* @__PURE__ */ jsxRuntime.jsx(PanelLeftIcon, {}),
|
|
774
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children:
|
|
785
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t(TOGGLE_KEY) })
|
|
775
786
|
]
|
|
776
787
|
}
|
|
777
788
|
);
|
|
778
789
|
});
|
|
779
790
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
780
791
|
var SidebarRail = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
792
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
781
793
|
const { toggleSidebar } = useSidebar();
|
|
782
794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
783
795
|
"button",
|
|
784
796
|
{
|
|
785
797
|
ref,
|
|
786
798
|
"data-sidebar": "rail",
|
|
787
|
-
"aria-label":
|
|
799
|
+
"aria-label": t(TOGGLE_KEY),
|
|
788
800
|
tabIndex: -1,
|
|
789
801
|
onClick: toggleSidebar,
|
|
790
|
-
title:
|
|
802
|
+
title: t(TOGGLE_KEY),
|
|
791
803
|
className: chunkYAF2X7W5_cjs.cn(
|
|
792
804
|
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
793
805
|
"in-data-[side=left]:cursor-w-resize",
|
|
@@ -1141,7 +1153,7 @@ var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size
|
|
|
1141
1153
|
});
|
|
1142
1154
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1143
1155
|
function useRightSidePanel() {
|
|
1144
|
-
return React8.useContext(
|
|
1156
|
+
return React8.useContext(chunkCTIGX76P_cjs.RightSidePanelContext) ?? chunkCTIGX76P_cjs.defaultRightSidePanelContextValue;
|
|
1145
1157
|
}
|
|
1146
1158
|
function RenderConditionally({
|
|
1147
1159
|
condition,
|
|
@@ -1155,6 +1167,7 @@ function RenderConditionally({
|
|
|
1155
1167
|
function RightSidePanelResizer({
|
|
1156
1168
|
onHandlePointerDown
|
|
1157
1169
|
}) {
|
|
1170
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1158
1171
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pointer-events-none absolute inset-y-0 -left-0.5 w-1.5", children: [
|
|
1159
1172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
1173
|
"div",
|
|
@@ -1169,7 +1182,7 @@ function RightSidePanelResizer({
|
|
|
1169
1182
|
"data-resize-handle": true,
|
|
1170
1183
|
role: "separator",
|
|
1171
1184
|
"aria-orientation": "vertical",
|
|
1172
|
-
"aria-label": "
|
|
1185
|
+
"aria-label": t("RIGHT_SIDE_PANEL.RESIZE_PANEL"),
|
|
1173
1186
|
onPointerDown: onHandlePointerDown,
|
|
1174
1187
|
className: chunkYAF2X7W5_cjs.cn(
|
|
1175
1188
|
"pointer-events-auto",
|
|
@@ -1227,7 +1240,7 @@ function DesktopPanel({
|
|
|
1227
1240
|
setLiveWidth,
|
|
1228
1241
|
topOffset
|
|
1229
1242
|
} = useRightSidePanel();
|
|
1230
|
-
const { setLayoutSetting } =
|
|
1243
|
+
const { setLayoutSetting } = chunkRO55MFZA_cjs.useLayoutSettingsStore();
|
|
1231
1244
|
const containerRef = React8__namespace.useRef(null);
|
|
1232
1245
|
React8__namespace.useLayoutEffect(() => {
|
|
1233
1246
|
const container = containerRef.current;
|
|
@@ -1403,13 +1416,14 @@ var RightSidePanelDescription = React8__namespace.forwardRef(({ className, ...pr
|
|
|
1403
1416
|
RightSidePanelDescription.displayName = "RightSidePanelDescription";
|
|
1404
1417
|
var RightSidePanelClose = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1405
1418
|
const { isMobile, close } = useRightSidePanel();
|
|
1419
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1406
1420
|
const Comp = isMobile ? vaul.Drawer.Close : SheetPrimitive__namespace.Close;
|
|
1407
1421
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1408
1422
|
Comp,
|
|
1409
1423
|
{
|
|
1410
1424
|
ref,
|
|
1411
1425
|
"data-slot": "right-side-panel-close",
|
|
1412
|
-
"aria-label": "
|
|
1426
|
+
"aria-label": t("RIGHT_SIDE_PANEL.CLOSE_PANEL"),
|
|
1413
1427
|
className: chunkYAF2X7W5_cjs.cn(
|
|
1414
1428
|
"ring-offset-background focus:ring-ring rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
1415
1429
|
className
|
|
@@ -1421,7 +1435,7 @@ var RightSidePanelClose = React8__namespace.forwardRef(({ className, ...props },
|
|
|
1421
1435
|
...props,
|
|
1422
1436
|
children: [
|
|
1423
1437
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1424
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
1438
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("common:CLOSE") })
|
|
1425
1439
|
]
|
|
1426
1440
|
}
|
|
1427
1441
|
);
|
|
@@ -1481,7 +1495,7 @@ function RightSidePanelProvider({
|
|
|
1481
1495
|
const generatedId = React8__namespace.useId();
|
|
1482
1496
|
const resolvedPanelId = panelId ?? `right-side-panel-${generatedId}`;
|
|
1483
1497
|
const resolvedTopOffset = parseWidth(topOffset, "0px");
|
|
1484
|
-
const { layout } =
|
|
1498
|
+
const { layout } = chunkRO55MFZA_cjs.useLayoutSettingsStore();
|
|
1485
1499
|
const sizing = React8__namespace.useMemo(
|
|
1486
1500
|
() => ({
|
|
1487
1501
|
width: parseWidth(width, DEFAULT_SIZING_VALUES.width),
|
|
@@ -1523,7 +1537,7 @@ function RightSidePanelProvider({
|
|
|
1523
1537
|
const close = React8__namespace.useCallback(() => {
|
|
1524
1538
|
setOpen(false);
|
|
1525
1539
|
}, [setOpen]);
|
|
1526
|
-
|
|
1540
|
+
chunkVLZJP6FH_cjs.useKeyboardShortcut(shortcut, toggle);
|
|
1527
1541
|
React8__namespace.useEffect(() => {
|
|
1528
1542
|
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1529
1543
|
const handleHashChange = () => {
|
|
@@ -1579,7 +1593,7 @@ function RightSidePanelProvider({
|
|
|
1579
1593
|
resolvedTopOffset
|
|
1580
1594
|
]
|
|
1581
1595
|
);
|
|
1582
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCTIGX76P_cjs.RightSidePanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
1597
|
"div",
|
|
1584
1598
|
{
|
|
1585
1599
|
"data-slot": "right-side-panel-provider",
|
|
@@ -1615,10 +1629,11 @@ var RightSidePanelTrigger = React8__namespace.forwardRef(
|
|
|
1615
1629
|
type,
|
|
1616
1630
|
...props
|
|
1617
1631
|
}, ref) => {
|
|
1632
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1618
1633
|
const { open, toggle, panelId } = useRightSidePanel();
|
|
1619
1634
|
const Comp = asChild ? reactSlot.Slot : Button;
|
|
1620
1635
|
const isFloating = position !== "inline";
|
|
1621
|
-
const computedLabel = ariaLabel ?? label ?? "
|
|
1636
|
+
const computedLabel = ariaLabel ?? label ?? t("RIGHT_SIDE_PANEL.TOGGLE_PANEL");
|
|
1622
1637
|
const handleClick = (event) => {
|
|
1623
1638
|
onClick?.(event);
|
|
1624
1639
|
if (!event.defaultPrevented) toggle();
|
|
@@ -1735,15 +1750,19 @@ var DrawerDescription = React8__namespace.forwardRef(({ className, ...props }, r
|
|
|
1735
1750
|
}
|
|
1736
1751
|
));
|
|
1737
1752
|
DrawerDescription.displayName = vaul.Drawer.Description.displayName;
|
|
1738
|
-
var
|
|
1739
|
-
|
|
1740
|
-
{
|
|
1741
|
-
|
|
1742
|
-
"
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
)
|
|
1753
|
+
var I18N_MODULE = "genesis.shared";
|
|
1754
|
+
var Pagination = ({ className, ...props }) => {
|
|
1755
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1756
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1757
|
+
"nav",
|
|
1758
|
+
{
|
|
1759
|
+
role: "navigation",
|
|
1760
|
+
"aria-label": t("PAGINATION.NAV_ARIA"),
|
|
1761
|
+
className: chunkYAF2X7W5_cjs.cn("mx-auto flex w-full justify-center", className),
|
|
1762
|
+
...props
|
|
1763
|
+
}
|
|
1764
|
+
);
|
|
1765
|
+
};
|
|
1747
1766
|
Pagination.displayName = "Pagination";
|
|
1748
1767
|
var PaginationContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1749
1768
|
"ul",
|
|
@@ -1780,16 +1799,17 @@ var PaginationPrevious = ({
|
|
|
1780
1799
|
className,
|
|
1781
1800
|
...props
|
|
1782
1801
|
}) => {
|
|
1802
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1783
1803
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1784
1804
|
PaginationLink,
|
|
1785
1805
|
{
|
|
1786
|
-
"aria-label": "
|
|
1806
|
+
"aria-label": t("PAGINATION.PREVIOUS_PAGE"),
|
|
1787
1807
|
size: "default",
|
|
1788
1808
|
className: chunkYAF2X7W5_cjs.cn("gap-1 pl-2.5", className),
|
|
1789
1809
|
...props,
|
|
1790
1810
|
children: [
|
|
1791
1811
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }),
|
|
1792
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
1812
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("common:PREVIOUS") })
|
|
1793
1813
|
]
|
|
1794
1814
|
}
|
|
1795
1815
|
);
|
|
@@ -1799,15 +1819,16 @@ var PaginationNext = ({
|
|
|
1799
1819
|
className,
|
|
1800
1820
|
...props
|
|
1801
1821
|
}) => {
|
|
1822
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1802
1823
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1803
1824
|
PaginationLink,
|
|
1804
1825
|
{
|
|
1805
|
-
"aria-label": "
|
|
1826
|
+
"aria-label": t("PAGINATION.NEXT_PAGE"),
|
|
1806
1827
|
size: "default",
|
|
1807
1828
|
className: chunkYAF2X7W5_cjs.cn("gap-1 pr-2.5", className),
|
|
1808
1829
|
...props,
|
|
1809
1830
|
children: [
|
|
1810
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
1831
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("common:NEXT") }),
|
|
1811
1832
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
1812
1833
|
]
|
|
1813
1834
|
}
|
|
@@ -1818,6 +1839,7 @@ var PaginationEllipsis = ({
|
|
|
1818
1839
|
className,
|
|
1819
1840
|
...props
|
|
1820
1841
|
}) => {
|
|
1842
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1821
1843
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1822
1844
|
"span",
|
|
1823
1845
|
{
|
|
@@ -1826,7 +1848,7 @@ var PaginationEllipsis = ({
|
|
|
1826
1848
|
...props,
|
|
1827
1849
|
children: [
|
|
1828
1850
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
1829
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
1851
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("PAGINATION.MORE_PAGES") })
|
|
1830
1852
|
]
|
|
1831
1853
|
}
|
|
1832
1854
|
);
|
|
@@ -2124,6 +2146,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2124
2146
|
align = "start"
|
|
2125
2147
|
}, ref) => {
|
|
2126
2148
|
const [open, setOpen] = React8__namespace.useState(false);
|
|
2149
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
2127
2150
|
const [draft, setDraft] = React8__namespace.useState(value);
|
|
2128
2151
|
React8__namespace.useEffect(() => {
|
|
2129
2152
|
if (open) setDraft(value);
|
|
@@ -2167,7 +2190,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2167
2190
|
onChange?.(void 0);
|
|
2168
2191
|
setOpen(false);
|
|
2169
2192
|
},
|
|
2170
|
-
children: "
|
|
2193
|
+
children: t("common:RESET")
|
|
2171
2194
|
}
|
|
2172
2195
|
),
|
|
2173
2196
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2179,7 +2202,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2179
2202
|
onChange?.(draft);
|
|
2180
2203
|
setOpen(false);
|
|
2181
2204
|
},
|
|
2182
|
-
children: "
|
|
2205
|
+
children: t("common:APPLY")
|
|
2183
2206
|
}
|
|
2184
2207
|
)
|
|
2185
2208
|
] })
|
|
@@ -2388,7 +2411,7 @@ var WizardStepIndicator = ({
|
|
|
2388
2411
|
color: indicatorColor,
|
|
2389
2412
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "transparent"
|
|
2390
2413
|
},
|
|
2391
|
-
transition:
|
|
2414
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2392
2415
|
className: chunkYAF2X7W5_cjs.cn(
|
|
2393
2416
|
"flex size-8 items-center justify-center rounded-full border text-lg font-bold",
|
|
2394
2417
|
className
|
|
@@ -2399,7 +2422,7 @@ var WizardStepIndicator = ({
|
|
|
2399
2422
|
initial: { scale: 0, opacity: 0 },
|
|
2400
2423
|
animate: { scale: 1, opacity: 1 },
|
|
2401
2424
|
exit: { scale: 0, opacity: 0 },
|
|
2402
|
-
transition:
|
|
2425
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2403
2426
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-[18px]", "aria-hidden": true })
|
|
2404
2427
|
},
|
|
2405
2428
|
"check"
|
|
@@ -2409,7 +2432,7 @@ var WizardStepIndicator = ({
|
|
|
2409
2432
|
initial: { scale: 0.8, opacity: 0 },
|
|
2410
2433
|
animate: { scale: 1, opacity: 1 },
|
|
2411
2434
|
exit: { scale: 0.8, opacity: 0 },
|
|
2412
|
-
transition:
|
|
2435
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2413
2436
|
children: stepNumber
|
|
2414
2437
|
},
|
|
2415
2438
|
"number"
|
|
@@ -2420,7 +2443,7 @@ var WizardStepIndicator = ({
|
|
|
2420
2443
|
var WizardVerticalTrackBar = () => {
|
|
2421
2444
|
const { currentStep, totalSteps, goToStep, completedSteps, getSteps } = useWizardStepper();
|
|
2422
2445
|
const steps = getSteps();
|
|
2423
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition:
|
|
2446
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition: chunkIPMRZNNS_cjs.fadeTransition, children: steps.map((step, index) => {
|
|
2424
2447
|
const stepNumber = index + 1;
|
|
2425
2448
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
2426
2449
|
const isCurrent = currentStep === stepNumber;
|
|
@@ -2434,7 +2457,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2434
2457
|
{
|
|
2435
2458
|
layout: true,
|
|
2436
2459
|
className: "flex items-center gap-2",
|
|
2437
|
-
transition:
|
|
2460
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2438
2461
|
children: [
|
|
2439
2462
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2440
2463
|
Button,
|
|
@@ -2461,7 +2484,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2461
2484
|
animate: {
|
|
2462
2485
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2463
2486
|
},
|
|
2464
|
-
transition:
|
|
2487
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2465
2488
|
className: "ml-4 text-base font-medium",
|
|
2466
2489
|
children: step.title
|
|
2467
2490
|
}
|
|
@@ -2478,7 +2501,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2478
2501
|
scaleY: isCompleted ? 1 : 0.35,
|
|
2479
2502
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "hsl(var(--border))"
|
|
2480
2503
|
},
|
|
2481
|
-
transition:
|
|
2504
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition
|
|
2482
2505
|
}
|
|
2483
2506
|
) : null
|
|
2484
2507
|
]
|
|
@@ -2495,7 +2518,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2495
2518
|
{
|
|
2496
2519
|
layout: true,
|
|
2497
2520
|
className: "flex w-full flex-row flex-wrap justify-between",
|
|
2498
|
-
transition:
|
|
2521
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2499
2522
|
children: steps.map((step, index) => {
|
|
2500
2523
|
const stepNumber = index + 1;
|
|
2501
2524
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
@@ -2534,7 +2557,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2534
2557
|
animate: {
|
|
2535
2558
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2536
2559
|
},
|
|
2537
|
-
transition:
|
|
2560
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2538
2561
|
className: "hidden md:block",
|
|
2539
2562
|
children: step.title
|
|
2540
2563
|
}
|
|
@@ -2555,11 +2578,11 @@ var WizardStepViewport = ({
|
|
|
2555
2578
|
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
2579
|
framerMotion.motion.div,
|
|
2557
2580
|
{
|
|
2558
|
-
variants:
|
|
2581
|
+
variants: chunkIPMRZNNS_cjs.fadeInUp,
|
|
2559
2582
|
initial: "initial",
|
|
2560
2583
|
animate: "animate",
|
|
2561
2584
|
exit: "exit",
|
|
2562
|
-
transition:
|
|
2585
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2563
2586
|
className,
|
|
2564
2587
|
children
|
|
2565
2588
|
},
|
|
@@ -3326,7 +3349,7 @@ var DialogContent = React8__namespace.forwardRef(({ className, children, hideClo
|
|
|
3326
3349
|
children,
|
|
3327
3350
|
!hideCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
3328
3351
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
3329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3352
|
+
/* @__PURE__ */ jsxRuntime.jsx(SrClose, {})
|
|
3330
3353
|
] })
|
|
3331
3354
|
]
|
|
3332
3355
|
}
|
|
@@ -3499,7 +3522,8 @@ function MultiSelect({
|
|
|
3499
3522
|
onChange,
|
|
3500
3523
|
value: selectedValues
|
|
3501
3524
|
}) {
|
|
3502
|
-
const [buttonRef, popoverWidth] =
|
|
3525
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
3526
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
3503
3527
|
const onSelectHandler = (value) => {
|
|
3504
3528
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
3505
3529
|
onChange(nextValues);
|
|
@@ -3530,15 +3554,14 @@ function MultiSelect({
|
|
|
3530
3554
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
3531
3555
|
}
|
|
3532
3556
|
),
|
|
3533
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.
|
|
3557
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3534
3558
|
Badge,
|
|
3535
3559
|
{
|
|
3536
3560
|
variant: "secondary",
|
|
3537
3561
|
className: "rounded-sm px-1 font-normal",
|
|
3538
|
-
children:
|
|
3539
|
-
selectedValues.length
|
|
3540
|
-
|
|
3541
|
-
]
|
|
3562
|
+
children: t("MULTI_SELECT.SELECTED_COUNT", {
|
|
3563
|
+
count: selectedValues.length
|
|
3564
|
+
})
|
|
3542
3565
|
}
|
|
3543
3566
|
) : options.filter((option) => selectedValues.includes(option.value)).map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3544
3567
|
Badge,
|
|
@@ -3562,7 +3585,7 @@ function MultiSelect({
|
|
|
3562
3585
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
3563
3586
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: label }),
|
|
3564
3587
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
3565
|
-
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "
|
|
3588
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: t("MULTI_SELECT.NO_RESULTS") }),
|
|
3566
3589
|
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: options.map((option) => {
|
|
3567
3590
|
const isSelected = selectedValues.includes(option.value);
|
|
3568
3591
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3593,7 +3616,7 @@ function MultiSelect({
|
|
|
3593
3616
|
{
|
|
3594
3617
|
onSelect: () => onResetHandler(),
|
|
3595
3618
|
className: "justify-center text-center",
|
|
3596
|
-
children: "
|
|
3619
|
+
children: t("common:CLEAR")
|
|
3597
3620
|
}
|
|
3598
3621
|
) })
|
|
3599
3622
|
] })
|
|
@@ -3815,7 +3838,7 @@ var CopyToClipboardButton = ({
|
|
|
3815
3838
|
),
|
|
3816
3839
|
initial: false,
|
|
3817
3840
|
animate: { opacity: isHoverable ? void 0 : 1 },
|
|
3818
|
-
transition:
|
|
3841
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3819
3842
|
children: [
|
|
3820
3843
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3821
3844
|
Button,
|
|
@@ -3832,7 +3855,7 @@ var CopyToClipboardButton = ({
|
|
|
3832
3855
|
initial: { scale: 0.6, opacity: 0 },
|
|
3833
3856
|
animate: { scale: 1, opacity: 1 },
|
|
3834
3857
|
exit: { scale: 0.6, opacity: 0 },
|
|
3835
|
-
transition:
|
|
3858
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3836
3859
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3837
3860
|
lucideReact.Check,
|
|
3838
3861
|
{
|
|
@@ -3848,7 +3871,7 @@ var CopyToClipboardButton = ({
|
|
|
3848
3871
|
initial: { scale: 0.6, opacity: 0 },
|
|
3849
3872
|
animate: { scale: 1, opacity: 1 },
|
|
3850
3873
|
exit: { scale: 0.6, opacity: 0 },
|
|
3851
|
-
transition:
|
|
3874
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3852
3875
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4 text-muted-foreground", "aria-hidden": true })
|
|
3853
3876
|
},
|
|
3854
3877
|
"copy"
|
|
@@ -3861,7 +3884,7 @@ var CopyToClipboardButton = ({
|
|
|
3861
3884
|
layout: true,
|
|
3862
3885
|
className: "pointer-events-none absolute left-8 top-1/2 z-10 hidden -translate-y-1/2 whitespace-nowrap rounded bg-popover px-2 py-1 text-xs text-popover-foreground shadow-md peer-hover:block",
|
|
3863
3886
|
animate: { opacity: isCopying ? 1 : 0.9 },
|
|
3864
|
-
transition:
|
|
3887
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3865
3888
|
children: isCopying ? copiedLabel : copyLabel
|
|
3866
3889
|
}
|
|
3867
3890
|
)
|
|
@@ -3948,11 +3971,12 @@ function StepperItem({
|
|
|
3948
3971
|
}
|
|
3949
3972
|
var Stepper = React8__namespace.forwardRef(
|
|
3950
3973
|
({ steps, currentStep, orientation = "horizontal", className, ...props }, ref) => {
|
|
3974
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
3951
3975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3952
3976
|
"ol",
|
|
3953
3977
|
{
|
|
3954
3978
|
ref,
|
|
3955
|
-
"aria-label": "
|
|
3979
|
+
"aria-label": t("STEPPER.PROGRESS"),
|
|
3956
3980
|
className: chunkYAF2X7W5_cjs.cn(
|
|
3957
3981
|
"flex w-full",
|
|
3958
3982
|
orientation === "vertical" ? "flex-col gap-4" : "flex-row items-start gap-2",
|
|
@@ -4142,6 +4166,7 @@ var CarouselItem = React8__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
4142
4166
|
});
|
|
4143
4167
|
CarouselItem.displayName = "CarouselItem";
|
|
4144
4168
|
var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4169
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4145
4170
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
4146
4171
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4147
4172
|
Button,
|
|
@@ -4159,13 +4184,14 @@ var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "out
|
|
|
4159
4184
|
...props,
|
|
4160
4185
|
children: [
|
|
4161
4186
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "h-4 w-4" }),
|
|
4162
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4187
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("CAROUSEL.PREVIOUS_SLIDE") })
|
|
4163
4188
|
]
|
|
4164
4189
|
}
|
|
4165
4190
|
);
|
|
4166
4191
|
});
|
|
4167
4192
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
4168
4193
|
var CarouselNext = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4194
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4169
4195
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
4170
4196
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4171
4197
|
Button,
|
|
@@ -4183,7 +4209,7 @@ var CarouselNext = React8__namespace.forwardRef(({ className, variant = "outline
|
|
|
4183
4209
|
...props,
|
|
4184
4210
|
children: [
|
|
4185
4211
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4" }),
|
|
4186
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4212
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("CAROUSEL.NEXT_SLIDE") })
|
|
4187
4213
|
]
|
|
4188
4214
|
}
|
|
4189
4215
|
);
|
|
@@ -4389,7 +4415,8 @@ var ContextMenuShortcut = ({
|
|
|
4389
4415
|
};
|
|
4390
4416
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
4391
4417
|
var PasswordInput = React8__namespace.forwardRef(
|
|
4392
|
-
({ className, toggleAriaLabel
|
|
4418
|
+
({ className, toggleAriaLabel, ...props }, ref) => {
|
|
4419
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4393
4420
|
const [visible, setVisible] = React8__namespace.useState(false);
|
|
4394
4421
|
const Icon2 = visible ? lucideReact.EyeOff : lucideReact.Eye;
|
|
4395
4422
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYAF2X7W5_cjs.cn("relative", className), children: [
|
|
@@ -4406,7 +4433,7 @@ var PasswordInput = React8__namespace.forwardRef(
|
|
|
4406
4433
|
"button",
|
|
4407
4434
|
{
|
|
4408
4435
|
type: "button",
|
|
4409
|
-
"aria-label": toggleAriaLabel,
|
|
4436
|
+
"aria-label": toggleAriaLabel ?? t("PASSWORD_INPUT.TOGGLE_VISIBILITY"),
|
|
4410
4437
|
onClick: () => setVisible((v) => !v),
|
|
4411
4438
|
className: "absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4412
4439
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4" })
|
|
@@ -4587,6 +4614,7 @@ var CollapsibleContent2 = React8__namespace.forwardRef(({ className, children, .
|
|
|
4587
4614
|
});
|
|
4588
4615
|
CollapsibleContent2.displayName = CollapsiblePrimitive__namespace.CollapsibleContent.displayName;
|
|
4589
4616
|
var KanbanTaskCard = ({ task, isOverlay }) => {
|
|
4617
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4590
4618
|
const {
|
|
4591
4619
|
setNodeRef,
|
|
4592
4620
|
attributes,
|
|
@@ -4642,12 +4670,12 @@ var KanbanTaskCard = ({ task, isOverlay }) => {
|
|
|
4642
4670
|
...listeners,
|
|
4643
4671
|
className: "-ml-2 h-auto cursor-grab p-1 text-muted-foreground hover:text-foreground",
|
|
4644
4672
|
children: [
|
|
4645
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4673
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("KANBAN_TASK_CARD.MOVE_TASK") }),
|
|
4646
4674
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, {})
|
|
4647
4675
|
]
|
|
4648
4676
|
}
|
|
4649
4677
|
),
|
|
4650
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "ml-auto font-semibold", children: "
|
|
4678
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "ml-auto font-semibold", children: t("KANBAN_TASK_CARD.TASK") })
|
|
4651
4679
|
] }),
|
|
4652
4680
|
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "whitespace-pre-wrap px-3 pb-6 pt-3 text-left", children: task.content })
|
|
4653
4681
|
]
|
|
@@ -5228,7 +5256,7 @@ var InfiniteScroller = ({
|
|
|
5228
5256
|
initial: { opacity: 0, height: 0 },
|
|
5229
5257
|
animate: { opacity: 1, height: "auto" },
|
|
5230
5258
|
exit: { opacity: 0, height: 0 },
|
|
5231
|
-
transition:
|
|
5259
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5232
5260
|
children: loadingIndicator
|
|
5233
5261
|
},
|
|
5234
5262
|
"loading"
|
|
@@ -5239,10 +5267,10 @@ var InfiniteScroller = ({
|
|
|
5239
5267
|
framerMotion.motion.div,
|
|
5240
5268
|
{
|
|
5241
5269
|
layout: true,
|
|
5242
|
-
variants:
|
|
5270
|
+
variants: chunkIPMRZNNS_cjs.fadeInUp,
|
|
5243
5271
|
initial: "initial",
|
|
5244
5272
|
animate: "animate",
|
|
5245
|
-
transition:
|
|
5273
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5246
5274
|
children: renderItem(item, index)
|
|
5247
5275
|
},
|
|
5248
5276
|
key
|
|
@@ -5254,7 +5282,7 @@ var InfiniteScroller = ({
|
|
|
5254
5282
|
className: "flex h-full items-center justify-center text-muted-foreground",
|
|
5255
5283
|
initial: { opacity: 0 },
|
|
5256
5284
|
animate: { opacity: 1 },
|
|
5257
|
-
transition:
|
|
5285
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5258
5286
|
children: emptyContent ?? "No items"
|
|
5259
5287
|
}
|
|
5260
5288
|
) }),
|
|
@@ -5265,7 +5293,7 @@ var InfiniteScroller = ({
|
|
|
5265
5293
|
initial: { opacity: 0, y: 16 },
|
|
5266
5294
|
animate: { opacity: 1, y: 0 },
|
|
5267
5295
|
exit: { opacity: 0, y: 12 },
|
|
5268
|
-
transition:
|
|
5296
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5269
5297
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5270
5298
|
framerMotion.motion.div,
|
|
5271
5299
|
{
|
|
@@ -5310,6 +5338,7 @@ var useFileUpload = () => {
|
|
|
5310
5338
|
}
|
|
5311
5339
|
return context;
|
|
5312
5340
|
};
|
|
5341
|
+
var I18N_MODULE2 = "genesis.shared";
|
|
5313
5342
|
var FileUploader = React8.forwardRef(
|
|
5314
5343
|
({
|
|
5315
5344
|
className,
|
|
@@ -5345,14 +5374,18 @@ var FileUploader = React8.forwardRef(
|
|
|
5345
5374
|
);
|
|
5346
5375
|
React8.useEffect(() => {
|
|
5347
5376
|
if (isFileTooBig) {
|
|
5348
|
-
|
|
5377
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5378
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_BIG")
|
|
5379
|
+
});
|
|
5349
5380
|
}
|
|
5350
5381
|
}, [isFileTooBig]);
|
|
5351
5382
|
const onDrop = React8.useCallback(
|
|
5352
5383
|
(acceptedFiles, rejectedFiles) => {
|
|
5353
5384
|
const files = acceptedFiles;
|
|
5354
5385
|
if (!files) {
|
|
5355
|
-
|
|
5386
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5387
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.FILE_ERROR")
|
|
5388
|
+
});
|
|
5356
5389
|
return;
|
|
5357
5390
|
}
|
|
5358
5391
|
const newValues = value ? [...value] : [];
|
|
@@ -5370,17 +5403,21 @@ var FileUploader = React8.forwardRef(
|
|
|
5370
5403
|
const firstError = rejection?.errors[0];
|
|
5371
5404
|
if (!firstError) continue;
|
|
5372
5405
|
if (firstError.code === "file-too-large") {
|
|
5373
|
-
|
|
5374
|
-
errors:
|
|
5406
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5407
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_LARGE", {
|
|
5408
|
+
size: maxSize / 1024 / 1024
|
|
5409
|
+
})
|
|
5375
5410
|
});
|
|
5376
5411
|
break;
|
|
5377
5412
|
}
|
|
5378
5413
|
if (firstError.code === "file-invalid-type") {
|
|
5379
|
-
|
|
5414
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5415
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.INVALID_TYPE")
|
|
5416
|
+
});
|
|
5380
5417
|
break;
|
|
5381
5418
|
}
|
|
5382
5419
|
if (firstError.message) {
|
|
5383
|
-
|
|
5420
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: firstError.message });
|
|
5384
5421
|
break;
|
|
5385
5422
|
}
|
|
5386
5423
|
}
|
|
@@ -5526,6 +5563,7 @@ var FileUploaderContent = React8.forwardRef(({ children, className, ...props },
|
|
|
5526
5563
|
});
|
|
5527
5564
|
FileUploaderContent.displayName = "FileUploaderContent";
|
|
5528
5565
|
var FileUploaderItem = React8.forwardRef(({ className, index, children, ...props }, ref) => {
|
|
5566
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE2);
|
|
5529
5567
|
const { removeFileFromSet, activeIndex, direction } = useFileUpload();
|
|
5530
5568
|
const isSelected = index === activeIndex;
|
|
5531
5569
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5551,10 +5589,7 @@ var FileUploaderItem = React8.forwardRef(({ className, index, children, ...props
|
|
|
5551
5589
|
),
|
|
5552
5590
|
onClick: () => removeFileFromSet(index),
|
|
5553
5591
|
children: [
|
|
5554
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5555
|
-
"remove item ",
|
|
5556
|
-
index
|
|
5557
|
-
] }),
|
|
5592
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("FILE_UPLOADER.REMOVE_ITEM", { index }) }),
|
|
5558
5593
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4 duration-200 ease-in-out hover:stroke-destructive" })
|
|
5559
5594
|
]
|
|
5560
5595
|
}
|
|
@@ -5767,7 +5802,10 @@ var SelectSeparator = React8__namespace.forwardRef(({ className, ...props }, ref
|
|
|
5767
5802
|
}
|
|
5768
5803
|
));
|
|
5769
5804
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5770
|
-
var Breadcrumb = React8__namespace.forwardRef(({ ...props }, ref) =>
|
|
5805
|
+
var Breadcrumb = React8__namespace.forwardRef(({ ...props }, ref) => {
|
|
5806
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
5807
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": t("BREADCRUMB.NAV_ARIA"), ...props });
|
|
5808
|
+
});
|
|
5771
5809
|
Breadcrumb.displayName = "Breadcrumb";
|
|
5772
5810
|
var BreadcrumbList = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5773
5811
|
"ol",
|
|
@@ -5832,19 +5870,21 @@ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
|
5832
5870
|
var BreadcrumbEllipsis = ({
|
|
5833
5871
|
className,
|
|
5834
5872
|
...props
|
|
5835
|
-
}) =>
|
|
5836
|
-
"
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5873
|
+
}) => {
|
|
5874
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
5875
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5876
|
+
"span",
|
|
5877
|
+
{
|
|
5878
|
+
"aria-hidden": "true",
|
|
5879
|
+
className: chunkYAF2X7W5_cjs.cn("flex h-9 w-9 items-center justify-center", className),
|
|
5880
|
+
...props,
|
|
5881
|
+
children: [
|
|
5882
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
5883
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("BREADCRUMB.MORE") })
|
|
5884
|
+
]
|
|
5885
|
+
}
|
|
5886
|
+
);
|
|
5887
|
+
};
|
|
5848
5888
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
5849
5889
|
var Timeline = ({
|
|
5850
5890
|
events,
|
|
@@ -5903,14 +5943,14 @@ var Timeline = ({
|
|
|
5903
5943
|
framerMotion.motion.div,
|
|
5904
5944
|
{
|
|
5905
5945
|
className: chunkYAF2X7W5_cjs.cn("mt-4 flex flex-col items-start md:mt-5", className),
|
|
5906
|
-
variants:
|
|
5946
|
+
variants: chunkIPMRZNNS_cjs.staggerContainer,
|
|
5907
5947
|
initial: "initial",
|
|
5908
5948
|
animate: "animate",
|
|
5909
5949
|
children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5910
5950
|
framerMotion.motion.div,
|
|
5911
5951
|
{
|
|
5912
|
-
variants:
|
|
5913
|
-
transition:
|
|
5952
|
+
variants: chunkIPMRZNNS_cjs.staggerItem,
|
|
5953
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5914
5954
|
className: "flex min-h-[66px] w-full",
|
|
5915
5955
|
children: [
|
|
5916
5956
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYAF2X7W5_cjs.cn("relative", isMobile ? "w-[30%]" : "w-[16%]"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5919,7 +5959,7 @@ var Timeline = ({
|
|
|
5919
5959
|
className: "absolute -top-1.5 w-full pr-[18px] text-right md:pr-5",
|
|
5920
5960
|
initial: { opacity: 0, x: -6 },
|
|
5921
5961
|
animate: { opacity: 1, x: 0 },
|
|
5922
|
-
transition: { ...
|
|
5962
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 },
|
|
5923
5963
|
children: leftContent ? leftContent(event) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5924
5964
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.time }),
|
|
5925
5965
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.date })
|
|
@@ -5936,7 +5976,7 @@ var Timeline = ({
|
|
|
5936
5976
|
),
|
|
5937
5977
|
initial: { scaleY: 0 },
|
|
5938
5978
|
animate: { scaleY: 1 },
|
|
5939
|
-
transition: { ...
|
|
5979
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 }
|
|
5940
5980
|
}
|
|
5941
5981
|
) : null,
|
|
5942
5982
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5945,7 +5985,7 @@ var Timeline = ({
|
|
|
5945
5985
|
className: "bg-primary relative z-10 size-4 rounded-full",
|
|
5946
5986
|
initial: { scale: 0 },
|
|
5947
5987
|
animate: { scale: 1 },
|
|
5948
|
-
transition: { ...
|
|
5988
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 + 0.04 }
|
|
5949
5989
|
}
|
|
5950
5990
|
)
|
|
5951
5991
|
] }),
|
|
@@ -5959,14 +5999,18 @@ var Timeline = ({
|
|
|
5959
5999
|
};
|
|
5960
6000
|
var DefaultDropzoneContent = ({
|
|
5961
6001
|
acceptedFormatsLabel = "SVG, PNG, JPG or GIF"
|
|
5962
|
-
}) =>
|
|
5963
|
-
|
|
5964
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5965
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5966
|
-
"
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
6002
|
+
}) => {
|
|
6003
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6004
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6005
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CloudUpload, { className: "mb-3 size-8 text-muted-foreground", "aria-hidden": true }),
|
|
6006
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-1 text-sm text-foreground", children: [
|
|
6007
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-primary", children: t("IMPORT_FILE_MODAL.CLICK_TO_UPLOAD") }),
|
|
6008
|
+
" ",
|
|
6009
|
+
t("IMPORT_FILE_MODAL.OR_DRAG_AND_DROP")
|
|
6010
|
+
] }),
|
|
6011
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: acceptedFormatsLabel })
|
|
6012
|
+
] });
|
|
6013
|
+
};
|
|
5970
6014
|
var ImportFileModalContent = ({
|
|
5971
6015
|
dialogTitle,
|
|
5972
6016
|
dialogDescription = "Upload a file using the template format.",
|
|
@@ -5998,11 +6042,11 @@ var ImportFileModalContent = ({
|
|
|
5998
6042
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: chunkYAF2X7W5_cjs.cn("rounded-md sm:max-w-[450px]", className), children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: !showConfirmation ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5999
6043
|
framerMotion.motion.div,
|
|
6000
6044
|
{
|
|
6001
|
-
variants:
|
|
6045
|
+
variants: chunkIPMRZNNS_cjs.fadeInScale,
|
|
6002
6046
|
initial: "initial",
|
|
6003
6047
|
animate: "animate",
|
|
6004
6048
|
exit: "exit",
|
|
6005
|
-
transition:
|
|
6049
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6006
6050
|
children: [
|
|
6007
6051
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6008
6052
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: dialogTitle }),
|
|
@@ -6014,7 +6058,7 @@ var ImportFileModalContent = ({
|
|
|
6014
6058
|
className: "flex flex-col rounded-md bg-muted/50 px-3 py-2",
|
|
6015
6059
|
initial: { opacity: 0, y: 6 },
|
|
6016
6060
|
animate: { opacity: 1, y: 0 },
|
|
6017
|
-
transition: { ...
|
|
6061
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: 0.05 },
|
|
6018
6062
|
children: [
|
|
6019
6063
|
/* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.div, { className: "flex flex-row items-center", children: [
|
|
6020
6064
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6051,7 +6095,7 @@ var ImportFileModalContent = ({
|
|
|
6051
6095
|
initial: { opacity: 0, x: -8 },
|
|
6052
6096
|
animate: { opacity: 1, x: 0 },
|
|
6053
6097
|
exit: { opacity: 0, x: 8 },
|
|
6054
|
-
transition:
|
|
6098
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6055
6099
|
children: /* @__PURE__ */ jsxRuntime.jsxs(FileUploaderItem, { index, children: [
|
|
6056
6100
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6057
6101
|
lucideReact.Paperclip,
|
|
@@ -6101,11 +6145,11 @@ var ImportFileModalContent = ({
|
|
|
6101
6145
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6102
6146
|
framerMotion.motion.div,
|
|
6103
6147
|
{
|
|
6104
|
-
variants:
|
|
6148
|
+
variants: chunkIPMRZNNS_cjs.fadeInScale,
|
|
6105
6149
|
initial: "initial",
|
|
6106
6150
|
animate: "animate",
|
|
6107
6151
|
exit: "exit",
|
|
6108
|
-
transition:
|
|
6152
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6109
6153
|
children: [
|
|
6110
6154
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6111
6155
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: processingTitle }),
|
|
@@ -6476,6 +6520,7 @@ var AppTile = ({
|
|
|
6476
6520
|
app,
|
|
6477
6521
|
isLoading
|
|
6478
6522
|
}) => {
|
|
6523
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6479
6524
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6480
6525
|
"a",
|
|
6481
6526
|
{
|
|
@@ -6493,24 +6538,26 @@ var AppTile = ({
|
|
|
6493
6538
|
),
|
|
6494
6539
|
children: [
|
|
6495
6540
|
/* @__PURE__ */ jsxRuntime.jsx(AppIcon, { icon: app.icon, label: app.label }),
|
|
6496
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground line-clamp-1 max-w-[90px] text-[12px] font-medium leading-tight", children: isLoading ? "
|
|
6541
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground line-clamp-1 max-w-[90px] text-[12px] font-medium leading-tight", children: isLoading ? t("APP_SWITCHER_CONTENT.LOADING") : app.label })
|
|
6497
6542
|
]
|
|
6498
6543
|
}
|
|
6499
6544
|
);
|
|
6500
6545
|
};
|
|
6501
6546
|
function AppSwitcherContent({ apps }) {
|
|
6547
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6502
6548
|
if (!apps.length)
|
|
6503
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/50 border-t p-3 flex h-12 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: "
|
|
6549
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/50 border-t p-3 flex h-12 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: t("APP_SWITCHER_CONTENT.NO_APPS") }) });
|
|
6504
6550
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 border-t px-3 pb-4 pt-3", children: [
|
|
6505
6551
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-2 px-1 text-[13px] font-semibold", children: "SELISE Blocks" }),
|
|
6506
6552
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3", children: apps.map((app) => /* @__PURE__ */ jsxRuntime.jsx(AppTile, { app, isLoading: app.isLoading }, app.id)) })
|
|
6507
6553
|
] });
|
|
6508
6554
|
}
|
|
6509
6555
|
function AppSwitcherTrigger({ open }) {
|
|
6556
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6510
6557
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6511
6558
|
"button",
|
|
6512
6559
|
{
|
|
6513
|
-
"aria-label": "
|
|
6560
|
+
"aria-label": t("APP_SWITCHER_TRIGGER.ARIA"),
|
|
6514
6561
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6515
6562
|
"text-muted-foreground flex h-9 w-9 items-center justify-center rounded-full transition-colors",
|
|
6516
6563
|
"hover:bg-accent hover:text-foreground focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2",
|
|
@@ -6667,7 +6714,7 @@ var parseAllowedServices = (raw) => {
|
|
|
6667
6714
|
);
|
|
6668
6715
|
};
|
|
6669
6716
|
var allowedServiceIds = parseAllowedServices(
|
|
6670
|
-
|
|
6717
|
+
chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_ALLOWED_SERVICES")
|
|
6671
6718
|
);
|
|
6672
6719
|
var isAppAllowed = (app) => {
|
|
6673
6720
|
if (!allowedServiceIds) return true;
|
|
@@ -6686,8 +6733,8 @@ function useAppRedirectUrls({
|
|
|
6686
6733
|
}) {
|
|
6687
6734
|
const queryClient = reactQuery.useQueryClient();
|
|
6688
6735
|
const requests = apps.map((app) => {
|
|
6689
|
-
const clientId =
|
|
6690
|
-
const redirectUri =
|
|
6736
|
+
const clientId = chunkTSRDXJUG_cjs.getRuntimeEnv(app.clientId);
|
|
6737
|
+
const redirectUri = chunkTSRDXJUG_cjs.getRuntimeEnv(app.redirectUri);
|
|
6691
6738
|
const forwardedTo = resolveForwardedTo(app);
|
|
6692
6739
|
return {
|
|
6693
6740
|
app,
|
|
@@ -6701,7 +6748,7 @@ function useAppRedirectUrls({
|
|
|
6701
6748
|
queries: requests.map(
|
|
6702
6749
|
({ clientId, redirectUri, forwardedTo, queryKey }) => ({
|
|
6703
6750
|
queryKey,
|
|
6704
|
-
queryFn: ({ signal }) =>
|
|
6751
|
+
queryFn: ({ signal }) => chunkVLZJP6FH_cjs.initiateService.fetchRedirectUrl(
|
|
6705
6752
|
{ clientId, redirectUri, forwardedTo },
|
|
6706
6753
|
signal
|
|
6707
6754
|
),
|
|
@@ -6740,13 +6787,13 @@ function useAppRedirectUrls({
|
|
|
6740
6787
|
}
|
|
6741
6788
|
var AppSwitcher = ({ forwardedTo }) => {
|
|
6742
6789
|
const [open, setOpen] = React8.useState(false);
|
|
6743
|
-
const config =
|
|
6790
|
+
const config = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
6744
6791
|
const filteredApps = React8.useMemo(
|
|
6745
6792
|
() => filteredAppSwitcherData.filter((app) => app.id !== config.name),
|
|
6746
6793
|
[config.name]
|
|
6747
6794
|
);
|
|
6748
6795
|
const resolveForwardedTo = React8.useCallback(
|
|
6749
|
-
(app) => app.forwardedTo ?? forwardedTo ??
|
|
6796
|
+
(app) => app.forwardedTo ?? forwardedTo ?? chunkAIUUCMAI_cjs.getForwardedToPath(),
|
|
6750
6797
|
[forwardedTo]
|
|
6751
6798
|
);
|
|
6752
6799
|
const blocksApps = useAppRedirectUrls({
|
|
@@ -6768,9 +6815,19 @@ var AppSwitcher = ({ forwardedTo }) => {
|
|
|
6768
6815
|
] });
|
|
6769
6816
|
};
|
|
6770
6817
|
var OPTIONS = {
|
|
6771
|
-
system: { Icon: lucideReact.Monitor
|
|
6772
|
-
light: { Icon: lucideReact.Sun
|
|
6773
|
-
dark: { Icon: lucideReact.Moon
|
|
6818
|
+
system: { Icon: lucideReact.Monitor },
|
|
6819
|
+
light: { Icon: lucideReact.Sun },
|
|
6820
|
+
dark: { Icon: lucideReact.Moon }
|
|
6821
|
+
};
|
|
6822
|
+
var getLabel = (t, option) => {
|
|
6823
|
+
switch (option) {
|
|
6824
|
+
case "system":
|
|
6825
|
+
return t("THEME_SWITCHER.AUTO");
|
|
6826
|
+
case "light":
|
|
6827
|
+
return t("THEME_SWITCHER.LIGHT");
|
|
6828
|
+
default:
|
|
6829
|
+
return t("THEME_SWITCHER.DARK");
|
|
6830
|
+
}
|
|
6774
6831
|
};
|
|
6775
6832
|
var OPTION_ORDER = ["system", "light", "dark"];
|
|
6776
6833
|
var TRIGGER_BASE_CLASSES = "relative z-50 inline-flex h-9 items-center justify-center gap-1 px-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";
|
|
@@ -6779,14 +6836,15 @@ function ThemeSwitcher({
|
|
|
6779
6836
|
className,
|
|
6780
6837
|
showChevron = true
|
|
6781
6838
|
} = {}) {
|
|
6782
|
-
const {
|
|
6839
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6840
|
+
const { theme, setTheme } = chunkVLZJP6FH_cjs.useTheme();
|
|
6783
6841
|
const { Icon: ThemeIcon } = OPTIONS[theme];
|
|
6784
6842
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6785
6843
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6786
6844
|
"button",
|
|
6787
6845
|
{
|
|
6788
6846
|
type: "button",
|
|
6789
|
-
"aria-label": "
|
|
6847
|
+
"aria-label": t("THEME_SWITCHER.CHANGE_THEME"),
|
|
6790
6848
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6791
6849
|
TRIGGER_BASE_CLASSES,
|
|
6792
6850
|
className ?? TRIGGER_DEFAULT_TYPOGRAPHY_CLASSES
|
|
@@ -6804,14 +6862,15 @@ function ThemeSwitcher({
|
|
|
6804
6862
|
}
|
|
6805
6863
|
) }),
|
|
6806
6864
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "min-w-40", children: [
|
|
6807
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: "
|
|
6865
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: t("THEME_SWITCHER.APPEARANCE") }),
|
|
6808
6866
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6809
6867
|
DropdownMenuRadioGroup,
|
|
6810
6868
|
{
|
|
6811
6869
|
value: theme,
|
|
6812
6870
|
onValueChange: (value) => setTheme(value),
|
|
6813
6871
|
children: OPTION_ORDER.map((value) => {
|
|
6814
|
-
const { Icon: Icon2
|
|
6872
|
+
const { Icon: Icon2 } = OPTIONS[value];
|
|
6873
|
+
const label = getLabel(t, value);
|
|
6815
6874
|
const isActive = value === theme;
|
|
6816
6875
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6817
6876
|
DropdownMenuRadioItem,
|
|
@@ -6847,12 +6906,12 @@ function ThemeSwitcher({
|
|
|
6847
6906
|
// src/services/user.service.ts
|
|
6848
6907
|
var UserService = class {
|
|
6849
6908
|
async getUserInfo() {
|
|
6850
|
-
return
|
|
6909
|
+
return chunkIPMRZNNS_cjs.iamClient.get(`${chunkIPMRZNNS_cjs.PROFILE_ENDPOINTS.ME}`);
|
|
6851
6910
|
}
|
|
6852
6911
|
};
|
|
6853
6912
|
var userService = new UserService();
|
|
6854
6913
|
var useGetUserInfo = (options) => {
|
|
6855
|
-
const userStore =
|
|
6914
|
+
const userStore = chunkRO55MFZA_cjs.useUserStore();
|
|
6856
6915
|
return reactQuery.useQuery({
|
|
6857
6916
|
queryKey: ["user-info"],
|
|
6858
6917
|
queryFn: async () => {
|
|
@@ -6864,7 +6923,7 @@ var useGetUserInfo = (options) => {
|
|
|
6864
6923
|
});
|
|
6865
6924
|
};
|
|
6866
6925
|
function UserAvatar({ size = "sm" }) {
|
|
6867
|
-
const { userDetails: userData } =
|
|
6926
|
+
const { userDetails: userData } = chunkRO55MFZA_cjs.useUserStore();
|
|
6868
6927
|
const initials = `${userData?.firstName?.[0] || ""}${userData?.lastName?.[0] || ""}`.toUpperCase();
|
|
6869
6928
|
const sizeClass = size === "lg" ? "h-14 w-14 text-xl" : "h-10 w-10 text-base";
|
|
6870
6929
|
if (userData?.profileImageUrl) {
|
|
@@ -6889,14 +6948,15 @@ function UserAvatar({ size = "sm" }) {
|
|
|
6889
6948
|
);
|
|
6890
6949
|
}
|
|
6891
6950
|
function UserDropdownMenu() {
|
|
6892
|
-
const {
|
|
6951
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6952
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
6893
6953
|
const { data } = useGetUserInfo();
|
|
6894
6954
|
const userData = data?.data;
|
|
6895
|
-
const { isPending, mutateAsync } =
|
|
6896
|
-
const { resetProjectStore } =
|
|
6897
|
-
const { setUnAuthenticated, clearTokens } =
|
|
6898
|
-
const { resetSelectedLanguages } =
|
|
6899
|
-
const { data: myOrgsData, isLoading: isOrgsLoading } =
|
|
6955
|
+
const { isPending, mutateAsync } = chunkVLZJP6FH_cjs.useLogout();
|
|
6956
|
+
const { resetProjectStore } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
6957
|
+
const { setUnAuthenticated, clearTokens } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
6958
|
+
const { resetSelectedLanguages } = chunkRO55MFZA_cjs.useLanguageViewStore();
|
|
6959
|
+
const { data: myOrgsData, isLoading: isOrgsLoading } = chunkVLZJP6FH_cjs.useGetMyOrganizations();
|
|
6900
6960
|
const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
|
|
6901
6961
|
const email = userData?.email || "";
|
|
6902
6962
|
const roles = Object.values(userData?.roles || {}).flat();
|
|
@@ -6921,7 +6981,7 @@ function UserDropdownMenu() {
|
|
|
6921
6981
|
variant: "link",
|
|
6922
6982
|
size: "icon",
|
|
6923
6983
|
className: "relative h-10 w-10 overflow-hidden rounded-full bg-[hsl(var(--avatar-surface-default))] p-0 text-base font-normal text-[hsl(var(--avatar-text-high-emphasis))] hover:no-underline focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
6924
|
-
"aria-label": "
|
|
6984
|
+
"aria-label": t("USER_DROPDOWN_MENU.OPEN_MENU"),
|
|
6925
6985
|
children: /* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { size: "sm" })
|
|
6926
6986
|
}
|
|
6927
6987
|
) }),
|
|
@@ -6935,7 +6995,10 @@ function UserDropdownMenu() {
|
|
|
6935
6995
|
/* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { size: "lg" }),
|
|
6936
6996
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6937
6997
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-sm font-semibold text-foreground", children: [
|
|
6938
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6998
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
|
|
6999
|
+
t("USER_DROPDOWN_MENU.USER_NAME"),
|
|
7000
|
+
" "
|
|
7001
|
+
] }),
|
|
6939
7002
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: fullName })
|
|
6940
7003
|
] }),
|
|
6941
7004
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: email }),
|
|
@@ -6943,7 +7006,8 @@ function UserDropdownMenu() {
|
|
|
6943
7006
|
roles.join(", "),
|
|
6944
7007
|
userData?.lastUsedOrganizationId && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground/60", children: [
|
|
6945
7008
|
" ",
|
|
6946
|
-
"\u2022
|
|
7009
|
+
"\u2022 ",
|
|
7010
|
+
t("USER_DROPDOWN_MENU.DEFAULT")
|
|
6947
7011
|
] })
|
|
6948
7012
|
] })
|
|
6949
7013
|
] })
|
|
@@ -6957,7 +7021,7 @@ function UserDropdownMenu() {
|
|
|
6957
7021
|
className: "cursor-pointer rounded-md px-4 py-3.5",
|
|
6958
7022
|
children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouter.Link, { to: "/app/profile", className: "flex items-center gap-4", children: [
|
|
6959
7023
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserRound, { className: "h-5 w-5 shrink-0 text-foreground/90" }),
|
|
6960
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "
|
|
7024
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: t("USER_DROPDOWN_MENU.MY_PROFILE") })
|
|
6961
7025
|
] })
|
|
6962
7026
|
}
|
|
6963
7027
|
) })
|
|
@@ -6967,7 +7031,7 @@ function UserDropdownMenu() {
|
|
|
6967
7031
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuGroup, { className: "p-1.5", children: [
|
|
6968
7032
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "flex items-center gap-4 px-4 py-3.5 text-sm font-medium text-muted-foreground/70", children: [
|
|
6969
7033
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "h-5 w-5 shrink-0 text-foreground/90" }),
|
|
6970
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: "
|
|
7034
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: t("USER_DROPDOWN_MENU.ORGANIZATIONS") })
|
|
6971
7035
|
] }),
|
|
6972
7036
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-56 overflow-y-auto", children: isOrgsLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 px-4 py-2", children: [
|
|
6973
7037
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-9 w-full rounded-md" }),
|
|
@@ -7011,7 +7075,7 @@ function UserDropdownMenu() {
|
|
|
7011
7075
|
},
|
|
7012
7076
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
7013
7077
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "h-5 w-5 shrink-0" }),
|
|
7014
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "
|
|
7078
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: t("USER_DROPDOWN_MENU.LOG_OUT") })
|
|
7015
7079
|
] })
|
|
7016
7080
|
}
|
|
7017
7081
|
) })
|
|
@@ -7020,13 +7084,11 @@ function UserDropdownMenu() {
|
|
|
7020
7084
|
)
|
|
7021
7085
|
] });
|
|
7022
7086
|
}
|
|
7023
|
-
var languages = [
|
|
7024
|
-
{ key: "en", title: "English" },
|
|
7025
|
-
{ key: "de", title: "German" },
|
|
7026
|
-
{ key: "fr", title: "French" }
|
|
7027
|
-
];
|
|
7028
7087
|
function LanguageSelector() {
|
|
7029
|
-
const { changeLanguage
|
|
7088
|
+
const { changeLanguage } = chunkVLZJP6FH_cjs.useLanguageSwitcher();
|
|
7089
|
+
const language = chunkOPMWK5SY_cjs.useDocumentLanguage();
|
|
7090
|
+
const languages = chunkOPMWK5SY_cjs.useLanguagesStore((state) => state.languages);
|
|
7091
|
+
if (languages.length < 2) return null;
|
|
7030
7092
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
7031
7093
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7032
7094
|
"button",
|
|
@@ -7039,18 +7101,18 @@ function LanguageSelector() {
|
|
|
7039
7101
|
]
|
|
7040
7102
|
}
|
|
7041
7103
|
) }),
|
|
7042
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: languages.map((lang, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7104
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: languages.map((lang, index) => /* @__PURE__ */ jsxRuntime.jsxs(React8.Fragment, { children: [
|
|
7043
7105
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7044
7106
|
DropdownMenuItem,
|
|
7045
7107
|
{
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7108
|
+
lang: lang.code,
|
|
7109
|
+
className: lang.code === language ? "font-semibold" : "",
|
|
7110
|
+
onClick: () => changeLanguage(lang.code),
|
|
7049
7111
|
children: lang.title
|
|
7050
7112
|
}
|
|
7051
7113
|
),
|
|
7052
7114
|
index !== languages.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
|
|
7053
|
-
] }, lang.
|
|
7115
|
+
] }, lang.code)) })
|
|
7054
7116
|
] });
|
|
7055
7117
|
}
|
|
7056
7118
|
|
|
@@ -7090,7 +7152,7 @@ function Logo({
|
|
|
7090
7152
|
)
|
|
7091
7153
|
] });
|
|
7092
7154
|
}
|
|
7093
|
-
var logicOrigin = () =>
|
|
7155
|
+
var logicOrigin = () => chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_LOGIC_BASE_URL").trim().replace(/\/$/, "");
|
|
7094
7156
|
var RETRY_DELAYS_MS = [2e3, 5e3, 15e3, 3e4];
|
|
7095
7157
|
var STEADY_RETRY_MS = 6e4;
|
|
7096
7158
|
var isLoggedOut = (error) => error?.status === 401;
|
|
@@ -7111,7 +7173,7 @@ var NotificationListenerService = class {
|
|
|
7111
7173
|
inFlight;
|
|
7112
7174
|
constructor() {
|
|
7113
7175
|
this.connection = new signalr.HubConnectionBuilder().withUrl(
|
|
7114
|
-
`${logicOrigin()}/api/NotificationHub?x-blocks-key=${
|
|
7176
|
+
`${logicOrigin()}/api/NotificationHub?x-blocks-key=${chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_X_BLOCKS_KEY")}`,
|
|
7115
7177
|
{
|
|
7116
7178
|
transport: signalr.HttpTransportType.WebSockets,
|
|
7117
7179
|
// One request opens the socket, so it cannot split across Api pods without sticky sessions.
|
|
@@ -7164,7 +7226,7 @@ var NotificationListenerService = class {
|
|
|
7164
7226
|
if (refreshLogin && navigator.onLine === false) return;
|
|
7165
7227
|
try {
|
|
7166
7228
|
if (refreshLogin)
|
|
7167
|
-
await refreshLoginCall(
|
|
7229
|
+
await refreshLoginCall(chunkVLZJP6FH_cjs.notificationService.getNotifications(1, 1));
|
|
7168
7230
|
if (!this.wanted) return;
|
|
7169
7231
|
await this.connection.start();
|
|
7170
7232
|
this.attempt = 0;
|
|
@@ -7189,7 +7251,7 @@ var notificationListenerService = new NotificationListenerService();
|
|
|
7189
7251
|
|
|
7190
7252
|
// src/components/common/notification/use-notification-socket.ts
|
|
7191
7253
|
function useNotificationSocket() {
|
|
7192
|
-
const { data: configData } =
|
|
7254
|
+
const { data: configData } = chunkVLZJP6FH_cjs.useGetBlocksNotificationConfig(0, 100);
|
|
7193
7255
|
const queryClient = reactQuery.useQueryClient();
|
|
7194
7256
|
notificationListenerService.connect();
|
|
7195
7257
|
React8.useEffect(() => {
|
|
@@ -7204,7 +7266,7 @@ function useNotificationSocket() {
|
|
|
7204
7266
|
notificationListenerService.connection.on(
|
|
7205
7267
|
config.notifyMethod,
|
|
7206
7268
|
(message) => {
|
|
7207
|
-
|
|
7269
|
+
chunkVLZJP6FH_cjs.notificationService.getNotificationConfig(config, message);
|
|
7208
7270
|
try {
|
|
7209
7271
|
const notice = typeof message === "string" ? JSON.parse(message) : message;
|
|
7210
7272
|
const denom = JSON.parse(
|
|
@@ -7228,12 +7290,12 @@ function useNotificationFeed(open) {
|
|
|
7228
7290
|
const [notifications, setNotifications] = React8.useState([]);
|
|
7229
7291
|
const [hasMore, setHasMore] = React8.useState(true);
|
|
7230
7292
|
const listRef = React8.useRef(null);
|
|
7231
|
-
const { data, isLoading, isFetching } =
|
|
7293
|
+
const { data, isLoading, isFetching } = chunkVLZJP6FH_cjs.useGetNotifications(
|
|
7232
7294
|
pageNumber,
|
|
7233
7295
|
PAGE_SIZE
|
|
7234
7296
|
);
|
|
7235
|
-
const markAsRead =
|
|
7236
|
-
const markAllAsRead =
|
|
7297
|
+
const markAsRead = chunkVLZJP6FH_cjs.useMarkAsRead();
|
|
7298
|
+
const markAllAsRead = chunkVLZJP6FH_cjs.useMarkAllAsRead();
|
|
7237
7299
|
React8.useEffect(() => {
|
|
7238
7300
|
if (!data?.notifications) return;
|
|
7239
7301
|
setNotifications((prev) => {
|
|
@@ -7312,24 +7374,27 @@ function NotificationBell({ unreadCount }) {
|
|
|
7312
7374
|
function NotificationHeader({
|
|
7313
7375
|
onMarkAllAsRead
|
|
7314
7376
|
}) {
|
|
7377
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7315
7378
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
|
|
7316
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-primary", children: "
|
|
7379
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-primary", children: t("NOTIFICATION_HEADER.TITLE") }),
|
|
7317
7380
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7318
7381
|
"button",
|
|
7319
7382
|
{
|
|
7320
7383
|
onClick: onMarkAllAsRead,
|
|
7321
7384
|
className: "text-xs text-muted-foreground hover:text-primary hover:underline",
|
|
7322
|
-
children: "
|
|
7385
|
+
children: t("NOTIFICATION_HEADER.MARK_ALL_READ")
|
|
7323
7386
|
}
|
|
7324
7387
|
)
|
|
7325
7388
|
] });
|
|
7326
7389
|
}
|
|
7327
7390
|
|
|
7328
7391
|
// src/components/common/notification/utils.ts
|
|
7329
|
-
|
|
7330
|
-
|
|
7392
|
+
var MODULE = "genesis.shared";
|
|
7393
|
+
var defaultT = (key, values) => chunkOPMWK5SY_cjs.tStatic(MODULE, key, values);
|
|
7394
|
+
function formatKBTitle(str, t = defaultT) {
|
|
7395
|
+
if (!str) return t("NOTIFICATION_UTILS.NO_TITLE");
|
|
7331
7396
|
if (str === "agent_kb_processing_status")
|
|
7332
|
-
return "
|
|
7397
|
+
return t("NOTIFICATION_UTILS.KB_STATUS_TITLE");
|
|
7333
7398
|
return str.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
7334
7399
|
}
|
|
7335
7400
|
function getKBMetaInfo(meta) {
|
|
@@ -7341,20 +7406,23 @@ function getKBMetaInfo(meta) {
|
|
|
7341
7406
|
}
|
|
7342
7407
|
return {};
|
|
7343
7408
|
}
|
|
7344
|
-
function formatKBMetaDescription(meta, fallbackDescription) {
|
|
7409
|
+
function formatKBMetaDescription(meta, fallbackDescription, t = defaultT) {
|
|
7345
7410
|
const { status, kb_id } = getKBMetaInfo(meta);
|
|
7346
|
-
const formattedStatus = status ?
|
|
7347
|
-
|
|
7411
|
+
const formattedStatus = status ? t("NOTIFICATION_UTILS.STATUS", {
|
|
7412
|
+
status: status.charAt(0).toUpperCase() + status.slice(1)
|
|
7413
|
+
}) : null;
|
|
7414
|
+
const formattedKbId = kb_id ? t("NOTIFICATION_UTILS.KB_ID", { id: kb_id.split("-")[0] ?? kb_id }) : null;
|
|
7348
7415
|
if (formattedStatus && formattedKbId)
|
|
7349
7416
|
return `${formattedStatus} | ${formattedKbId}`;
|
|
7350
7417
|
if (formattedStatus) return formattedStatus;
|
|
7351
7418
|
if (formattedKbId) return formattedKbId;
|
|
7352
|
-
return fallbackDescription || "
|
|
7419
|
+
return fallbackDescription || t("NOTIFICATION_UTILS.NO_DESCRIPTION");
|
|
7353
7420
|
}
|
|
7354
7421
|
function NotificationItem({
|
|
7355
7422
|
notification,
|
|
7356
7423
|
onMarkAsRead
|
|
7357
7424
|
}) {
|
|
7425
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7358
7426
|
let denorm = {
|
|
7359
7427
|
title: "",
|
|
7360
7428
|
description: "",
|
|
@@ -7380,9 +7448,9 @@ function NotificationItem({
|
|
|
7380
7448
|
if (!notification.isRead) onMarkAsRead(notification.id);
|
|
7381
7449
|
},
|
|
7382
7450
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7383
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: formatKBTitle(denorm.title) }),
|
|
7384
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: formatKBMetaDescription(denorm.meta, denorm.description) }),
|
|
7385
|
-
notification.createdTime && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[11px] text-muted-foreground", children: new Date(notification.createdTime).toLocaleString() })
|
|
7451
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: formatKBTitle(denorm.title, t) }),
|
|
7452
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: formatKBMetaDescription(denorm.meta, denorm.description, t) }),
|
|
7453
|
+
notification.createdTime && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[11px] text-muted-foreground", children: new Date(notification.createdTime).toLocaleString(language) })
|
|
7386
7454
|
] })
|
|
7387
7455
|
}
|
|
7388
7456
|
);
|
|
@@ -7395,13 +7463,14 @@ function NotificationList({
|
|
|
7395
7463
|
onScroll,
|
|
7396
7464
|
onMarkAsRead
|
|
7397
7465
|
}) {
|
|
7466
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7398
7467
|
const isEmpty = notifications.length === 0;
|
|
7399
7468
|
const renderNotifications = () => {
|
|
7400
7469
|
if (isLoading && isEmpty) {
|
|
7401
7470
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground" });
|
|
7402
7471
|
}
|
|
7403
7472
|
if (isEmpty) {
|
|
7404
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "
|
|
7473
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: t("NOTIFICATION_LIST.EMPTY") });
|
|
7405
7474
|
}
|
|
7406
7475
|
return notifications.map((notification, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7407
7476
|
NotificationItem,
|
|
@@ -7420,7 +7489,7 @@ function NotificationList({
|
|
|
7420
7489
|
onScroll,
|
|
7421
7490
|
children: [
|
|
7422
7491
|
renderNotifications(),
|
|
7423
|
-
isFetching && !isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 text-center text-xs text-muted-foreground", children: "
|
|
7492
|
+
isFetching && !isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 text-center text-xs text-muted-foreground", children: t("common:LOADING") })
|
|
7424
7493
|
]
|
|
7425
7494
|
}
|
|
7426
7495
|
);
|
|
@@ -7467,7 +7536,7 @@ function ConsoleHeader() {
|
|
|
7467
7536
|
window.addEventListener("scroll", handleScroll);
|
|
7468
7537
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
7469
7538
|
}, []);
|
|
7470
|
-
const { appLightLogo, appDarkLogo } =
|
|
7539
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
7471
7540
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7472
7541
|
"div",
|
|
7473
7542
|
{
|
|
@@ -7531,9 +7600,9 @@ function ConsoleHeader() {
|
|
|
7531
7600
|
var HeaderHeight = 60;
|
|
7532
7601
|
function DashboardHeader(props) {
|
|
7533
7602
|
const { forwardedTo, redirectPaths, navigationMenus } = props;
|
|
7534
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
7603
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkCTIGX76P_cjs.SidebarContext);
|
|
7535
7604
|
const { pathname } = reactRouter.useLocation();
|
|
7536
|
-
const { selectedProject } =
|
|
7605
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7537
7606
|
const projectName = selectedProject?.name;
|
|
7538
7607
|
const environment = selectedProject?.environment;
|
|
7539
7608
|
const isProjectOverviewRoute = pathname.includes("/project");
|
|
@@ -7590,54 +7659,87 @@ function DashboardHeader(props) {
|
|
|
7590
7659
|
}
|
|
7591
7660
|
|
|
7592
7661
|
// src/constants/environment-options.ts
|
|
7662
|
+
var MODULE2 = "genesis.shared";
|
|
7593
7663
|
var environmentOptions = [
|
|
7594
7664
|
{
|
|
7595
7665
|
index: 0,
|
|
7596
|
-
label
|
|
7666
|
+
get label() {
|
|
7667
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_LABEL");
|
|
7668
|
+
},
|
|
7597
7669
|
value: "dev",
|
|
7598
|
-
subtext
|
|
7670
|
+
get subtext() {
|
|
7671
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_SUBTEXT");
|
|
7672
|
+
}
|
|
7599
7673
|
},
|
|
7600
7674
|
{
|
|
7601
7675
|
index: 1,
|
|
7602
|
-
label
|
|
7676
|
+
get label() {
|
|
7677
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_LABEL");
|
|
7678
|
+
},
|
|
7603
7679
|
value: "test",
|
|
7604
|
-
subtext
|
|
7680
|
+
get subtext() {
|
|
7681
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_SUBTEXT");
|
|
7682
|
+
}
|
|
7605
7683
|
},
|
|
7606
7684
|
{
|
|
7607
7685
|
index: 2,
|
|
7608
|
-
label
|
|
7686
|
+
get label() {
|
|
7687
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_LABEL");
|
|
7688
|
+
},
|
|
7609
7689
|
value: "stg",
|
|
7610
|
-
subtext
|
|
7690
|
+
get subtext() {
|
|
7691
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_SUBTEXT");
|
|
7692
|
+
}
|
|
7611
7693
|
},
|
|
7612
7694
|
{
|
|
7613
7695
|
index: 3,
|
|
7614
|
-
label
|
|
7696
|
+
get label() {
|
|
7697
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_LABEL");
|
|
7698
|
+
},
|
|
7615
7699
|
value: "iat",
|
|
7616
|
-
subtext
|
|
7700
|
+
get subtext() {
|
|
7701
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_SUBTEXT");
|
|
7702
|
+
}
|
|
7617
7703
|
},
|
|
7618
7704
|
{
|
|
7619
7705
|
index: 4,
|
|
7620
|
-
label
|
|
7706
|
+
get label() {
|
|
7707
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_LABEL");
|
|
7708
|
+
},
|
|
7621
7709
|
value: "uat",
|
|
7622
|
-
subtext
|
|
7710
|
+
get subtext() {
|
|
7711
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_SUBTEXT");
|
|
7712
|
+
}
|
|
7623
7713
|
},
|
|
7624
7714
|
{
|
|
7625
7715
|
index: 5,
|
|
7626
|
-
label
|
|
7716
|
+
get label() {
|
|
7717
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_LABEL");
|
|
7718
|
+
},
|
|
7627
7719
|
value: "prod-shadow",
|
|
7628
|
-
subtext
|
|
7720
|
+
get subtext() {
|
|
7721
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_SUBTEXT");
|
|
7722
|
+
}
|
|
7629
7723
|
},
|
|
7630
7724
|
{
|
|
7631
7725
|
index: 6,
|
|
7632
|
-
label
|
|
7726
|
+
get label() {
|
|
7727
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_LABEL");
|
|
7728
|
+
},
|
|
7633
7729
|
value: "pre-prod",
|
|
7634
|
-
subtext
|
|
7730
|
+
get subtext() {
|
|
7731
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_SUBTEXT");
|
|
7732
|
+
}
|
|
7635
7733
|
},
|
|
7636
7734
|
{
|
|
7637
7735
|
index: 7,
|
|
7638
|
-
label
|
|
7736
|
+
get label() {
|
|
7737
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_LABEL");
|
|
7738
|
+
},
|
|
7639
7739
|
value: "prod",
|
|
7640
|
-
subtext
|
|
7740
|
+
get subtext() {
|
|
7741
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SUBTEXT");
|
|
7742
|
+
}
|
|
7641
7743
|
}
|
|
7642
7744
|
];
|
|
7643
7745
|
var EnvironmentCard = ({
|
|
@@ -7645,8 +7747,9 @@ var EnvironmentCard = ({
|
|
|
7645
7747
|
isMigrationOngoing,
|
|
7646
7748
|
className
|
|
7647
7749
|
}) => {
|
|
7648
|
-
const {
|
|
7649
|
-
const {
|
|
7750
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7751
|
+
const { setSelectedProject, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7752
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStartImpersonation();
|
|
7650
7753
|
const navigate = reactRouter.useNavigate();
|
|
7651
7754
|
const handleCardClick = async () => {
|
|
7652
7755
|
try {
|
|
@@ -7671,7 +7774,7 @@ var EnvironmentCard = ({
|
|
|
7671
7774
|
)?.label }),
|
|
7672
7775
|
isMigrationOngoing && /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
7673
7776
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HourglassIcon, { className: "text-icon-warning h-4 w-4 cursor-pointer" }) }),
|
|
7674
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "border-none bg-neutral-500 text-white shadow-none", children: "
|
|
7777
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "border-none bg-neutral-500 text-white shadow-none", children: t("ENVIRONMENT_CARD.MIGRATION") })
|
|
7675
7778
|
] }) })
|
|
7676
7779
|
] }) }),
|
|
7677
7780
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-4 w-4 opacity-0 transition-opacity duration-200 group-hover:opacity-100" })
|
|
@@ -7685,7 +7788,7 @@ var EnvironmentCard = ({
|
|
|
7685
7788
|
);
|
|
7686
7789
|
};
|
|
7687
7790
|
function SelectedEnvironment() {
|
|
7688
|
-
const { selectedProject } =
|
|
7791
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7689
7792
|
const environment = selectedProject?.environment;
|
|
7690
7793
|
if (!environment) return null;
|
|
7691
7794
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-sm w-fit bg-[hsl(var(--blocks-primary-50))] px-1.5 py-0.5 text-[11px] font-semibold text-[hsl(var(--high-emphasis))]", children: environment });
|
|
@@ -7698,13 +7801,14 @@ function EnvironmentList({
|
|
|
7698
7801
|
redirectPaths,
|
|
7699
7802
|
collapsed = false
|
|
7700
7803
|
}) {
|
|
7804
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7701
7805
|
const navigate = reactRouter.useNavigate();
|
|
7702
7806
|
const { pathname } = reactRouter.useLocation();
|
|
7703
|
-
const { data: projectGroups = [], isLoading } =
|
|
7807
|
+
const { data: projectGroups = [], isLoading } = chunkVLZJP6FH_cjs.useGetProjects({
|
|
7704
7808
|
enabled: true
|
|
7705
7809
|
});
|
|
7706
|
-
const { selectedProject, setSelectedProject } =
|
|
7707
|
-
const { data: projectData } =
|
|
7810
|
+
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7811
|
+
const { data: projectData } = chunkVLZJP6FH_cjs.useGetProject();
|
|
7708
7812
|
const pendingProjectRef = React8.useRef(null);
|
|
7709
7813
|
const redirectRegexMap = React8.useMemo(
|
|
7710
7814
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -7741,7 +7845,7 @@ function EnvironmentList({
|
|
|
7741
7845
|
const environment = projectData?.data?.environment || selectedProject?.environment;
|
|
7742
7846
|
const applicationDomain = projectData?.data?.customDomain || selectedProject?.customDomain;
|
|
7743
7847
|
const environmentDomainSuffix = applicationDomain ? ` \xB7 ${applicationDomain}` : "";
|
|
7744
|
-
const environmentLabel = environment ? `${environment}${environmentDomainSuffix}` : "
|
|
7848
|
+
const environmentLabel = environment ? `${environment}${environmentDomainSuffix}` : t("ENVIRONMENT_LIST.SELECT_ENVIRONMENT");
|
|
7745
7849
|
const projects = React8.useMemo(() => {
|
|
7746
7850
|
if (!selectedProject) return [];
|
|
7747
7851
|
const groupWithSelected = projectGroups.find(
|
|
@@ -7770,8 +7874,8 @@ function EnvironmentList({
|
|
|
7770
7874
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
7771
7875
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
7772
7876
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
|
|
7773
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: "
|
|
7774
|
-
environment ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-1 leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-sm bg-[hsl(var(--blocks-primary-50))] px-1.5 py-0.5 text-[11px] font-semibold leading-none text-[hsl(var(--high-emphasis))]", children: environment }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-tight", children: "
|
|
7877
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: t("ENVIRONMENT_LIST.ENVIRONMENT") }),
|
|
7878
|
+
environment ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-1 leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-sm bg-[hsl(var(--blocks-primary-50))] px-1.5 py-0.5 text-[11px] font-semibold leading-none text-[hsl(var(--high-emphasis))]", children: environment }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-tight", children: t("ENVIRONMENT_LIST.SELECT_ENVIRONMENT") })
|
|
7775
7879
|
] })
|
|
7776
7880
|
] })
|
|
7777
7881
|
}
|
|
@@ -7784,11 +7888,11 @@ function EnvironmentList({
|
|
|
7784
7888
|
sideOffset: collapsed ? 8 : 4,
|
|
7785
7889
|
className: collapsed ? "min-w-48" : "w-[--radix-dropdown-menu-trigger-width]",
|
|
7786
7890
|
children: [
|
|
7787
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "
|
|
7891
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: t("ENVIRONMENT_LIST.YOUR_ENVIRONMENTS") }),
|
|
7788
7892
|
(() => {
|
|
7789
7893
|
const others = projects.filter((project) => project.itemId !== selectedProject?.itemId).slice(0, 5);
|
|
7790
7894
|
if (others.length === 0) {
|
|
7791
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "
|
|
7895
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: t("ENVIRONMENT_LIST.NO_OTHERS") }) });
|
|
7792
7896
|
}
|
|
7793
7897
|
return others.map((project) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7794
7898
|
DropdownMenuItem,
|
|
@@ -7800,27 +7904,28 @@ function EnvironmentList({
|
|
|
7800
7904
|
));
|
|
7801
7905
|
})(),
|
|
7802
7906
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
7803
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: "
|
|
7907
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: t("ENVIRONMENT_LIST.OVERVIEW_UNAVAILABLE") })
|
|
7804
7908
|
]
|
|
7805
7909
|
}
|
|
7806
7910
|
)
|
|
7807
7911
|
] });
|
|
7808
7912
|
}
|
|
7809
7913
|
function BackToConsoleNavigator() {
|
|
7914
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7810
7915
|
return /* @__PURE__ */ jsxRuntime.jsx(reactRouter.Link, { to: "console", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7811
7916
|
Button,
|
|
7812
7917
|
{
|
|
7813
7918
|
variant: "outline",
|
|
7814
7919
|
className: "bg-transparent hover:bg-slate-200 dark:hover:bg-gray-800",
|
|
7815
7920
|
children: [
|
|
7816
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-row items-center md:flex", children: "
|
|
7817
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center text-xs md:hidden", children: "
|
|
7921
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-row items-center md:flex", children: t("BACK_TO_CONSOLE_NAVIGATOR.BACK") }),
|
|
7922
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center text-xs md:hidden", children: t("BACK_TO_CONSOLE_NAVIGATOR.CONSOLE") })
|
|
7818
7923
|
]
|
|
7819
7924
|
}
|
|
7820
7925
|
) });
|
|
7821
7926
|
}
|
|
7822
7927
|
function SelectedProject() {
|
|
7823
|
-
const { selectedProject } =
|
|
7928
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7824
7929
|
const projectName = selectedProject?.name;
|
|
7825
7930
|
if (!projectName) return null;
|
|
7826
7931
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
@@ -7832,13 +7937,13 @@ function ProtectedGuard({
|
|
|
7832
7937
|
children,
|
|
7833
7938
|
defaultPublicPath = "/login"
|
|
7834
7939
|
}) {
|
|
7835
|
-
const { isAuthenticated } =
|
|
7940
|
+
const { isAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7836
7941
|
const navigate = reactRouter.useNavigate();
|
|
7837
7942
|
React8.useEffect(() => {
|
|
7838
7943
|
if (!isAuthenticated) navigate(defaultPublicPath);
|
|
7839
7944
|
}, [isAuthenticated, defaultPublicPath, navigate]);
|
|
7840
7945
|
React8.useEffect(
|
|
7841
|
-
() =>
|
|
7946
|
+
() => chunkIPMRZNNS_cjs.subscribeToSignOut(
|
|
7842
7947
|
() => window.location.replace(
|
|
7843
7948
|
`${window.location.origin}${defaultPublicPath}`
|
|
7844
7949
|
)
|
|
@@ -7861,7 +7966,7 @@ function PublicGuard({
|
|
|
7861
7966
|
children,
|
|
7862
7967
|
defaultProtectedPath = "/app/console"
|
|
7863
7968
|
}) {
|
|
7864
|
-
const { isAuthenticated } =
|
|
7969
|
+
const { isAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7865
7970
|
const { isMounted } = useAppState();
|
|
7866
7971
|
const navigate = reactRouter.useNavigate();
|
|
7867
7972
|
const { pathname } = reactRouter.useLocation();
|
|
@@ -7880,7 +7985,7 @@ function PublicGuard({
|
|
|
7880
7985
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
7881
7986
|
}
|
|
7882
7987
|
function AuthResolver({ children }) {
|
|
7883
|
-
const { setUser, setAuthenticated, setUnAuthenticated } =
|
|
7988
|
+
const { setUser, setAuthenticated, setUnAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7884
7989
|
const hasResolved = React8.useRef(false);
|
|
7885
7990
|
React8.useEffect(() => {
|
|
7886
7991
|
if (hasResolved.current) return;
|
|
@@ -7888,7 +7993,7 @@ function AuthResolver({ children }) {
|
|
|
7888
7993
|
if (isSignInCallbackPath(window.location.pathname)) return;
|
|
7889
7994
|
async function resolve() {
|
|
7890
7995
|
try {
|
|
7891
|
-
const res = await
|
|
7996
|
+
const res = await chunkIPMRZNNS_cjs.iamClient.get(`${chunkIPMRZNNS_cjs.AUTH_ENDPOINTS.ME}`);
|
|
7892
7997
|
setUser(res);
|
|
7893
7998
|
setAuthenticated();
|
|
7894
7999
|
} catch {
|
|
@@ -7967,13 +8072,14 @@ var AppLoadingSpinner = ({ size = 64 }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
|
|
|
7967
8072
|
` }),
|
|
7968
8073
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-background fixed inset-0 z-50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-breathe", children: /* @__PURE__ */ jsxRuntime.jsx(BlocksIcon, { size }) }) })
|
|
7969
8074
|
] });
|
|
8075
|
+
var GENESIS_SHARED_MODULE = "genesis.shared";
|
|
7970
8076
|
var projectNameFor = (projects, tenantId) => tenantId && projects.find((p) => p.tenantId === tenantId)?.name || null;
|
|
7971
8077
|
var claimKeyOf = (claim) => claim ? `${claim.tabId}|${claim.tenantId}|${claim.ts}` : null;
|
|
7972
8078
|
var SESSION_ENDED_CODES = /* @__PURE__ */ new Set([
|
|
7973
8079
|
"invalid_refresh_token",
|
|
7974
8080
|
"session_expired"
|
|
7975
8081
|
]);
|
|
7976
|
-
var isSessionEnded = (error) => error instanceof
|
|
8082
|
+
var isSessionEnded = (error) => error instanceof chunk2MP66EX3_cjs.HttpError && error.status === 401 && SESSION_ENDED_CODES.has(String(error.errors?.error ?? ""));
|
|
7977
8083
|
var useLiveOwnerProbe = ({
|
|
7978
8084
|
cookieTenantId,
|
|
7979
8085
|
ownTenantId,
|
|
@@ -7983,8 +8089,8 @@ var useLiveOwnerProbe = ({
|
|
|
7983
8089
|
if (!cookieTenantId || !ownTenantId || cookieTenantId === ownTenantId) {
|
|
7984
8090
|
return null;
|
|
7985
8091
|
}
|
|
7986
|
-
const owner =
|
|
7987
|
-
return owner && owner.tabId !==
|
|
8092
|
+
const owner = chunkIPMRZNNS_cjs.readCurrentOwner();
|
|
8093
|
+
return owner && owner.tabId !== chunkIPMRZNNS_cjs.TAB_ID && owner.tenantId === cookieTenantId ? owner : null;
|
|
7988
8094
|
}, [cookieTenantId, ownTenantId]);
|
|
7989
8095
|
const claimKey = claimKeyOf(foreignClaim);
|
|
7990
8096
|
const [probedKey, setProbedKey] = React8.useState(null);
|
|
@@ -7996,9 +8102,9 @@ var useLiveOwnerProbe = ({
|
|
|
7996
8102
|
const claim = foreignClaimRef.current;
|
|
7997
8103
|
if (!claim || !claimKey) return;
|
|
7998
8104
|
let cancelled = false;
|
|
7999
|
-
void
|
|
8105
|
+
void chunkIPMRZNNS_cjs.isTenantHeldElsewhere(claim.tenantId).then((held) => {
|
|
8000
8106
|
if (cancelled) return;
|
|
8001
|
-
if (held &&
|
|
8107
|
+
if (held && chunkIPMRZNNS_cjs.isSameClaim(chunkIPMRZNNS_cjs.readCurrentOwner(), claim)) {
|
|
8002
8108
|
onHeldElsewhereRef.current(claim.tenantId);
|
|
8003
8109
|
}
|
|
8004
8110
|
setProbedKey(claimKey);
|
|
@@ -8012,10 +8118,10 @@ var useLiveOwnerProbe = ({
|
|
|
8012
8118
|
var ImpersonationChecker = ({
|
|
8013
8119
|
children
|
|
8014
8120
|
}) => {
|
|
8015
|
-
const { data } =
|
|
8016
|
-
const { setImpersonation, isInitialized, setInitialized } =
|
|
8017
|
-
|
|
8018
|
-
|
|
8121
|
+
const { data } = chunkVLZJP6FH_cjs.useImpersonationStatusChecker();
|
|
8122
|
+
const { setImpersonation, isInitialized, setInitialized } = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8123
|
+
chunkVLZJP6FH_cjs.useSessionTenantGuard();
|
|
8124
|
+
chunkVLZJP6FH_cjs.useStatusFirstOnTabReturn();
|
|
8019
8125
|
React8.useEffect(() => {
|
|
8020
8126
|
if (!data) return;
|
|
8021
8127
|
setImpersonation(
|
|
@@ -8037,6 +8143,7 @@ function ImpersonationBlocked({
|
|
|
8037
8143
|
onSecondary,
|
|
8038
8144
|
consolePath
|
|
8039
8145
|
}) {
|
|
8146
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8040
8147
|
const navigate = reactRouter.useNavigate();
|
|
8041
8148
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-[320px] w-full flex-col items-center justify-center gap-4 p-8 text-center", children: [
|
|
8042
8149
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -8051,7 +8158,7 @@ function ImpersonationBlocked({
|
|
|
8051
8158
|
{
|
|
8052
8159
|
variant: primaryLabel && onPrimary ? "outline" : "default",
|
|
8053
8160
|
onClick: () => navigate(consolePath),
|
|
8054
|
-
children: "
|
|
8161
|
+
children: t("IMPERSONATION_GUARD.GO_TO_CONSOLE")
|
|
8055
8162
|
}
|
|
8056
8163
|
)
|
|
8057
8164
|
] })
|
|
@@ -8073,10 +8180,10 @@ function ImpersonationTerminator({
|
|
|
8073
8180
|
detachedReason,
|
|
8074
8181
|
detachedTenantId,
|
|
8075
8182
|
setDetached
|
|
8076
|
-
} =
|
|
8077
|
-
const { mutateAsync } =
|
|
8078
|
-
const recordClaimedTenant =
|
|
8079
|
-
const { projects } =
|
|
8183
|
+
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8184
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStopImpersonation();
|
|
8185
|
+
const recordClaimedTenant = chunkVLZJP6FH_cjs.useRecordClaimedTenant();
|
|
8186
|
+
const { projects } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8080
8187
|
const isTriggering = React8.useRef(false);
|
|
8081
8188
|
const [isTerminating, setIsTerminating] = React8.useState(false);
|
|
8082
8189
|
const rootTenantId = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
|
|
@@ -8087,7 +8194,7 @@ function ImpersonationTerminator({
|
|
|
8087
8194
|
});
|
|
8088
8195
|
React8.useEffect(() => {
|
|
8089
8196
|
if (!rootTenantId) return;
|
|
8090
|
-
return
|
|
8197
|
+
return chunkIPMRZNNS_cjs.subscribeToTenantClaims((claim) => {
|
|
8091
8198
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8092
8199
|
if (claim.tenantId === rootTenantId) {
|
|
8093
8200
|
setDetached(null);
|
|
@@ -8103,7 +8210,8 @@ function ImpersonationTerminator({
|
|
|
8103
8210
|
const [returnFailure, setReturnFailure] = React8.useState(
|
|
8104
8211
|
null
|
|
8105
8212
|
);
|
|
8106
|
-
const
|
|
8213
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8214
|
+
const signOut = chunkVLZJP6FH_cjs.useSignOut();
|
|
8107
8215
|
React8.useEffect(() => {
|
|
8108
8216
|
if (!isImpersonated) setReturnFailure(null);
|
|
8109
8217
|
}, [isImpersonated]);
|
|
@@ -8119,7 +8227,7 @@ function ImpersonationTerminator({
|
|
|
8119
8227
|
const { status, stopError } = await mutateAsync(void 0);
|
|
8120
8228
|
if (!status.impersonated) {
|
|
8121
8229
|
terminate(rootTenantId);
|
|
8122
|
-
if (rootTenantId)
|
|
8230
|
+
if (rootTenantId) chunkIPMRZNNS_cjs.claimTenant(rootTenantId);
|
|
8123
8231
|
return;
|
|
8124
8232
|
}
|
|
8125
8233
|
console.error("Error stopping impersonation:", stopError);
|
|
@@ -8149,9 +8257,9 @@ function ImpersonationTerminator({
|
|
|
8149
8257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8150
8258
|
ImpersonationBlocked,
|
|
8151
8259
|
{
|
|
8152
|
-
title: name ?
|
|
8153
|
-
description: "
|
|
8154
|
-
primaryLabel: name ?
|
|
8260
|
+
title: name ? t("IMPERSONATION_GUARD.DETACHED_TITLE_NAMED", { name }) : t("IMPERSONATION_GUARD.DETACHED_TITLE"),
|
|
8261
|
+
description: t("IMPERSONATION_GUARD.DETACHED_DESCRIPTION"),
|
|
8262
|
+
primaryLabel: name ? t("IMPERSONATION_GUARD.LEAVE_NAMED", { name }) : t("IMPERSONATION_GUARD.LEAVE"),
|
|
8155
8263
|
onPrimary: () => {
|
|
8156
8264
|
setReturnFailure(null);
|
|
8157
8265
|
setDetached(null);
|
|
@@ -8163,9 +8271,9 @@ function ImpersonationTerminator({
|
|
|
8163
8271
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8164
8272
|
ImpersonationBlocked,
|
|
8165
8273
|
{
|
|
8166
|
-
title: "
|
|
8167
|
-
description: "
|
|
8168
|
-
primaryLabel: "
|
|
8274
|
+
title: t("IMPERSONATION_GUARD.SESSION_ENDED_TITLE"),
|
|
8275
|
+
description: t("IMPERSONATION_GUARD.SESSION_ENDED_DESCRIPTION"),
|
|
8276
|
+
primaryLabel: t("IMPERSONATION_GUARD.SIGN_IN_AGAIN"),
|
|
8169
8277
|
onPrimary: signOut
|
|
8170
8278
|
}
|
|
8171
8279
|
);
|
|
@@ -8175,17 +8283,17 @@ function ImpersonationTerminator({
|
|
|
8175
8283
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8176
8284
|
ImpersonationBlocked,
|
|
8177
8285
|
{
|
|
8178
|
-
title:
|
|
8179
|
-
description: name ?
|
|
8180
|
-
primaryLabel: "
|
|
8286
|
+
title: t("IMPERSONATION_GUARD.RETURN_FAILED_TITLE"),
|
|
8287
|
+
description: name ? t("IMPERSONATION_GUARD.RETURN_FAILED_NAMED", { name }) : t("IMPERSONATION_GUARD.RETURN_FAILED"),
|
|
8288
|
+
primaryLabel: t("IMPERSONATION_GUARD.TRY_AGAIN"),
|
|
8181
8289
|
onPrimary: () => setReturnFailure(null),
|
|
8182
|
-
secondaryLabel: "
|
|
8290
|
+
secondaryLabel: t("IMPERSONATION_GUARD.SIGN_OUT"),
|
|
8183
8291
|
onSecondary: signOut
|
|
8184
8292
|
}
|
|
8185
8293
|
);
|
|
8186
8294
|
}
|
|
8187
8295
|
if (isImpersonated || isTerminating) {
|
|
8188
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "
|
|
8296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: t("IMPERSONATION_GUARD.RETURNING") });
|
|
8189
8297
|
}
|
|
8190
8298
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
8191
8299
|
}
|
|
@@ -8202,11 +8310,12 @@ function ImpersonationSynchronizer({
|
|
|
8202
8310
|
detachedTenantId,
|
|
8203
8311
|
setImpersonationError,
|
|
8204
8312
|
setDetached
|
|
8205
|
-
} =
|
|
8206
|
-
const {
|
|
8207
|
-
const
|
|
8208
|
-
const
|
|
8209
|
-
const {
|
|
8313
|
+
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8314
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8315
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStartImpersonation();
|
|
8316
|
+
const recordClaimedTenant = chunkVLZJP6FH_cjs.useRecordClaimedTenant();
|
|
8317
|
+
const { data: _data } = chunkVLZJP6FH_cjs.useGetProjects({ enabled: true });
|
|
8318
|
+
const { selectedProject, setSelectedProject, projects, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8210
8319
|
const isTriggering = React8.useRef(false);
|
|
8211
8320
|
const [isImpersonating, setIsImpersonating] = React8.useState(false);
|
|
8212
8321
|
const { itemId } = reactRouter.useParams();
|
|
@@ -8240,7 +8349,7 @@ function ImpersonationSynchronizer({
|
|
|
8240
8349
|
]);
|
|
8241
8350
|
const getImpersonatedProject = async () => {
|
|
8242
8351
|
try {
|
|
8243
|
-
const res =
|
|
8352
|
+
const res = chunkVLZJP6FH_cjs.projectService.getProject();
|
|
8244
8353
|
return (await res).data;
|
|
8245
8354
|
} catch (error) {
|
|
8246
8355
|
console.error("Error fetching projects:", error);
|
|
@@ -8301,10 +8410,10 @@ function ImpersonationSynchronizer({
|
|
|
8301
8410
|
const isAttached = !!routeTenantId && routeTenantId === impersonatedTenantId && !detachedHere && !impersonationError && !isProbingOwner;
|
|
8302
8411
|
React8.useEffect(() => {
|
|
8303
8412
|
if (!isAttached || !routeTenantId) return;
|
|
8304
|
-
return
|
|
8413
|
+
return chunkIPMRZNNS_cjs.holdTenant(routeTenantId);
|
|
8305
8414
|
}, [isAttached, routeTenantId]);
|
|
8306
8415
|
React8.useEffect(() => {
|
|
8307
|
-
return
|
|
8416
|
+
return chunkIPMRZNNS_cjs.subscribeToTenantClaims((claim) => {
|
|
8308
8417
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8309
8418
|
const mine = routeTenantIdRef.current;
|
|
8310
8419
|
if (!mine) return;
|
|
@@ -8342,7 +8451,7 @@ function ImpersonationSynchronizer({
|
|
|
8342
8451
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8343
8452
|
ImpersonationWaiting,
|
|
8344
8453
|
{
|
|
8345
|
-
label: thisProjectName ?
|
|
8454
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.OPENING_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.OPENING")
|
|
8346
8455
|
}
|
|
8347
8456
|
);
|
|
8348
8457
|
}
|
|
@@ -8354,25 +8463,29 @@ function ImpersonationSynchronizer({
|
|
|
8354
8463
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8355
8464
|
ImpersonationWaiting,
|
|
8356
8465
|
{
|
|
8357
|
-
label: thisProjectName ?
|
|
8466
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.OPENING_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.OPENING")
|
|
8358
8467
|
}
|
|
8359
8468
|
);
|
|
8360
8469
|
}
|
|
8361
8470
|
if (impersonationError) {
|
|
8362
|
-
const accessDenied = impersonationError instanceof
|
|
8471
|
+
const accessDenied = impersonationError instanceof chunk2MP66EX3_cjs.HttpError && impersonationError.status === 403;
|
|
8363
8472
|
return accessDenied ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8364
8473
|
ImpersonationBlocked,
|
|
8365
8474
|
{
|
|
8366
|
-
title: thisProjectName ?
|
|
8367
|
-
|
|
8475
|
+
title: thisProjectName ? t("IMPERSONATION_GUARD.NO_ACCESS_NAMED", {
|
|
8476
|
+
name: thisProjectName
|
|
8477
|
+
}) : t("IMPERSONATION_GUARD.NO_ACCESS"),
|
|
8478
|
+
description: t("IMPERSONATION_GUARD.NO_ACCESS_DESCRIPTION"),
|
|
8368
8479
|
consolePath
|
|
8369
8480
|
}
|
|
8370
8481
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8371
8482
|
ImpersonationBlocked,
|
|
8372
8483
|
{
|
|
8373
|
-
title: thisProjectName ?
|
|
8374
|
-
|
|
8375
|
-
|
|
8484
|
+
title: thisProjectName ? t("IMPERSONATION_GUARD.OPEN_FAILED_NAMED", {
|
|
8485
|
+
name: thisProjectName
|
|
8486
|
+
}) : t("IMPERSONATION_GUARD.OPEN_FAILED"),
|
|
8487
|
+
description: t("IMPERSONATION_GUARD.OPEN_FAILED_DESCRIPTION"),
|
|
8488
|
+
primaryLabel: t("IMPERSONATION_GUARD.TRY_AGAIN"),
|
|
8376
8489
|
onPrimary: takeSession,
|
|
8377
8490
|
consolePath
|
|
8378
8491
|
}
|
|
@@ -8382,9 +8495,11 @@ function ImpersonationSynchronizer({
|
|
|
8382
8495
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8383
8496
|
ImpersonationBlocked,
|
|
8384
8497
|
{
|
|
8385
|
-
title: "
|
|
8386
|
-
description: thisProjectName ?
|
|
8387
|
-
|
|
8498
|
+
title: t("IMPERSONATION_GUARD.CONSOLE_RETURNED_TITLE"),
|
|
8499
|
+
description: thisProjectName ? t("IMPERSONATION_GUARD.CONSOLE_RETURNED_NAMED", {
|
|
8500
|
+
name: thisProjectName
|
|
8501
|
+
}) : t("IMPERSONATION_GUARD.CONSOLE_RETURNED"),
|
|
8502
|
+
primaryLabel: thisProjectName ? t("IMPERSONATION_GUARD.REOPEN_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.REOPEN"),
|
|
8388
8503
|
onPrimary: takeSession,
|
|
8389
8504
|
consolePath
|
|
8390
8505
|
}
|
|
@@ -8395,21 +8510,27 @@ function ImpersonationSynchronizer({
|
|
|
8395
8510
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8396
8511
|
ImpersonationBlocked,
|
|
8397
8512
|
{
|
|
8398
|
-
title: "
|
|
8399
|
-
description: otherName ?
|
|
8400
|
-
|
|
8513
|
+
title: t("IMPERSONATION_GUARD.ANOTHER_PROJECT_TITLE"),
|
|
8514
|
+
description: otherName ? t("IMPERSONATION_GUARD.ANOTHER_PROJECT_NAMED", {
|
|
8515
|
+
name: otherName
|
|
8516
|
+
}) : t("IMPERSONATION_GUARD.ANOTHER_PROJECT"),
|
|
8517
|
+
primaryLabel: thisProjectName ? t("IMPERSONATION_GUARD.CONTINUE_NAMED", {
|
|
8518
|
+
name: thisProjectName
|
|
8519
|
+
}) : t("IMPERSONATION_GUARD.CONTINUE"),
|
|
8401
8520
|
onPrimary: takeSession,
|
|
8402
8521
|
consolePath
|
|
8403
8522
|
}
|
|
8404
8523
|
);
|
|
8405
8524
|
}
|
|
8406
8525
|
if (!routeTenantId)
|
|
8407
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "
|
|
8526
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: t("IMPERSONATION_GUARD.LOADING_PROJECTS") });
|
|
8408
8527
|
if (routeTenantId !== impersonatedTenantId) {
|
|
8409
8528
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8410
8529
|
ImpersonationWaiting,
|
|
8411
8530
|
{
|
|
8412
|
-
label: thisProjectName ?
|
|
8531
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.SWITCHING_NAMED", {
|
|
8532
|
+
name: thisProjectName
|
|
8533
|
+
}) : t("IMPERSONATION_GUARD.SWITCHING")
|
|
8413
8534
|
}
|
|
8414
8535
|
);
|
|
8415
8536
|
}
|
|
@@ -8441,7 +8562,7 @@ function DashboardLayout({
|
|
|
8441
8562
|
navigationMenus,
|
|
8442
8563
|
forwardedTo
|
|
8443
8564
|
}) {
|
|
8444
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8565
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(chunkCTIGX76P_cjs.DashboardLayoutProvider, { isOpen: true, children: /* @__PURE__ */ jsxRuntime.jsx(RightSidePanelProvider, { resizable: true, topOffset: HeaderHeight, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full overflow-hidden", children: [
|
|
8445
8566
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8446
8567
|
SidebarMenuDesktop,
|
|
8447
8568
|
{
|
|
@@ -8519,9 +8640,10 @@ var LoginHeader = ({
|
|
|
8519
8640
|
blocksUrl = "https://seliseblocks.com",
|
|
8520
8641
|
githubUrl = "https://github.com/SELISEdigitalplatforms"
|
|
8521
8642
|
}) => {
|
|
8643
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
8522
8644
|
const {
|
|
8523
8645
|
config: { appLogoUrl }
|
|
8524
|
-
} =
|
|
8646
|
+
} = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state);
|
|
8525
8647
|
const resolveLogo = (variant) => {
|
|
8526
8648
|
if (!appLogoUrl) return void 0;
|
|
8527
8649
|
if (typeof appLogoUrl === "string") return appLogoUrl;
|
|
@@ -8541,7 +8663,7 @@ var LoginHeader = ({
|
|
|
8541
8663
|
}
|
|
8542
8664
|
),
|
|
8543
8665
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nav-right", children: [
|
|
8544
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: docsUrl, target: "_blank", rel: "noreferrer", className: "nav-link", children: "
|
|
8666
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: docsUrl, target: "_blank", rel: "noreferrer", className: "nav-link", children: t("LOGIN_HEADER.DOCS") }),
|
|
8545
8667
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8546
8668
|
"a",
|
|
8547
8669
|
{
|
|
@@ -9182,32 +9304,35 @@ function useAtmosphericCanvas(canvasRef) {
|
|
|
9182
9304
|
}
|
|
9183
9305
|
|
|
9184
9306
|
// src/pages/login/login.constant.ts
|
|
9185
|
-
var
|
|
9307
|
+
var VISIT_KEY = "LOGIN_CONSTANT.VISIT";
|
|
9308
|
+
var getBlocksProducts = (t) => [
|
|
9186
9309
|
{
|
|
9187
9310
|
name: "blocks-os",
|
|
9188
9311
|
appName: "blocks OS",
|
|
9189
|
-
badge: "
|
|
9190
|
-
tagline: "
|
|
9191
|
-
descriptionTitle: "
|
|
9312
|
+
badge: t("LOGIN_CONSTANT.OS_BADGE"),
|
|
9313
|
+
tagline: t("LOGIN_CONSTANT.OS_TAGLINE"),
|
|
9314
|
+
descriptionTitle: t("LOGIN_CONSTANT.OS_TITLE"),
|
|
9315
|
+
// Not shown in the UI.
|
|
9192
9316
|
keywords: ["secure", "isolated", "auditable"],
|
|
9193
|
-
shortDescription: "
|
|
9194
|
-
description: "
|
|
9317
|
+
shortDescription: t("LOGIN_CONSTANT.OS_SHORT"),
|
|
9318
|
+
description: t("LOGIN_CONSTANT.OS_DESCRIPTION"),
|
|
9195
9319
|
featureChips: [
|
|
9196
|
-
"
|
|
9197
|
-
"
|
|
9198
|
-
"
|
|
9199
|
-
"
|
|
9200
|
-
"
|
|
9320
|
+
t("LOGIN_CONSTANT.OS_CHIP_1"),
|
|
9321
|
+
t("LOGIN_CONSTANT.OS_CHIP_2"),
|
|
9322
|
+
t("LOGIN_CONSTANT.OS_CHIP_3"),
|
|
9323
|
+
t("LOGIN_CONSTANT.OS_CHIP_4"),
|
|
9324
|
+
t("LOGIN_CONSTANT.OS_CHIP_5")
|
|
9201
9325
|
],
|
|
9202
9326
|
url: "",
|
|
9203
|
-
cta: "
|
|
9327
|
+
cta: t(VISIT_KEY, { name: "blocks OS" })
|
|
9204
9328
|
},
|
|
9205
9329
|
{
|
|
9206
9330
|
name: "blocks-localization",
|
|
9207
9331
|
appName: "blocks Localization",
|
|
9208
|
-
badge: "
|
|
9209
|
-
tagline: "
|
|
9210
|
-
descriptionTitle: "
|
|
9332
|
+
badge: t("LOGIN_CONSTANT.LOCALIZATION_BADGE"),
|
|
9333
|
+
tagline: t("LOGIN_CONSTANT.LOCALIZATION_TAGLINE"),
|
|
9334
|
+
descriptionTitle: t("LOGIN_CONSTANT.LOCALIZATION_TITLE"),
|
|
9335
|
+
// Not shown in the UI.
|
|
9211
9336
|
keywords: [
|
|
9212
9337
|
"multilingual",
|
|
9213
9338
|
"contextual",
|
|
@@ -9215,42 +9340,44 @@ var BLOCKS_PRODUCTS = [
|
|
|
9215
9340
|
"instant",
|
|
9216
9341
|
"scalable"
|
|
9217
9342
|
],
|
|
9218
|
-
shortDescription: "
|
|
9219
|
-
description: "
|
|
9343
|
+
shortDescription: t("LOGIN_CONSTANT.LOCALIZATION_SHORT"),
|
|
9344
|
+
description: t("LOGIN_CONSTANT.LOCALIZATION_DESCRIPTION"),
|
|
9220
9345
|
featureChips: [
|
|
9221
|
-
"
|
|
9222
|
-
"
|
|
9223
|
-
"
|
|
9224
|
-
"
|
|
9346
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_1"),
|
|
9347
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_2"),
|
|
9348
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_3"),
|
|
9349
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_4")
|
|
9225
9350
|
],
|
|
9226
9351
|
url: "",
|
|
9227
|
-
cta: "
|
|
9352
|
+
cta: t(VISIT_KEY, { name: "blocks Localization" })
|
|
9228
9353
|
},
|
|
9229
9354
|
{
|
|
9230
9355
|
name: "blocks-iam",
|
|
9231
9356
|
appName: "blocks IAM",
|
|
9232
|
-
badge: "
|
|
9233
|
-
tagline: "
|
|
9234
|
-
descriptionTitle: "
|
|
9357
|
+
badge: t("LOGIN_CONSTANT.IAM_BADGE"),
|
|
9358
|
+
tagline: t("LOGIN_CONSTANT.IAM_TAGLINE"),
|
|
9359
|
+
descriptionTitle: t("LOGIN_CONSTANT.IAM_TITLE"),
|
|
9360
|
+
// Not shown in the UI.
|
|
9235
9361
|
keywords: ["secure", "unified", "seamless"],
|
|
9236
|
-
shortDescription: "
|
|
9237
|
-
description: "
|
|
9362
|
+
shortDescription: t("LOGIN_CONSTANT.IAM_SHORT"),
|
|
9363
|
+
description: t("LOGIN_CONSTANT.IAM_DESCRIPTION"),
|
|
9238
9364
|
featureChips: [
|
|
9239
|
-
"
|
|
9240
|
-
"
|
|
9241
|
-
"
|
|
9242
|
-
"
|
|
9243
|
-
"
|
|
9365
|
+
t("LOGIN_CONSTANT.IAM_CHIP_1"),
|
|
9366
|
+
t("LOGIN_CONSTANT.IAM_CHIP_2"),
|
|
9367
|
+
t("LOGIN_CONSTANT.IAM_CHIP_3"),
|
|
9368
|
+
t("LOGIN_CONSTANT.IAM_CHIP_4"),
|
|
9369
|
+
t("LOGIN_CONSTANT.IAM_CHIP_5")
|
|
9244
9370
|
],
|
|
9245
9371
|
url: "",
|
|
9246
|
-
cta: "
|
|
9372
|
+
cta: t(VISIT_KEY, { name: "blocks IAM" })
|
|
9247
9373
|
},
|
|
9248
9374
|
{
|
|
9249
9375
|
name: "blocks-data",
|
|
9250
9376
|
appName: "blocks Data",
|
|
9251
|
-
badge: "
|
|
9252
|
-
tagline: "
|
|
9253
|
-
descriptionTitle: "
|
|
9377
|
+
badge: t("LOGIN_CONSTANT.DATA_BADGE"),
|
|
9378
|
+
tagline: t("LOGIN_CONSTANT.DATA_TAGLINE"),
|
|
9379
|
+
descriptionTitle: t("LOGIN_CONSTANT.DATA_TITLE"),
|
|
9380
|
+
// Not shown in the UI.
|
|
9254
9381
|
keywords: [
|
|
9255
9382
|
"queryable",
|
|
9256
9383
|
"structured",
|
|
@@ -9258,43 +9385,45 @@ var BLOCKS_PRODUCTS = [
|
|
|
9258
9385
|
"versioned",
|
|
9259
9386
|
"accessible"
|
|
9260
9387
|
],
|
|
9261
|
-
shortDescription: "
|
|
9262
|
-
description: "
|
|
9388
|
+
shortDescription: t("LOGIN_CONSTANT.DATA_SHORT"),
|
|
9389
|
+
description: t("LOGIN_CONSTANT.DATA_DESCRIPTION"),
|
|
9263
9390
|
featureChips: [
|
|
9264
|
-
"
|
|
9265
|
-
"
|
|
9266
|
-
"
|
|
9267
|
-
"
|
|
9268
|
-
"
|
|
9391
|
+
t("LOGIN_CONSTANT.DATA_CHIP_1"),
|
|
9392
|
+
t("LOGIN_CONSTANT.DATA_CHIP_2"),
|
|
9393
|
+
t("LOGIN_CONSTANT.DATA_CHIP_3"),
|
|
9394
|
+
t("LOGIN_CONSTANT.DATA_CHIP_4"),
|
|
9395
|
+
t("LOGIN_CONSTANT.DATA_CHIP_5")
|
|
9269
9396
|
],
|
|
9270
9397
|
url: "",
|
|
9271
|
-
cta: "
|
|
9398
|
+
cta: t(VISIT_KEY, { name: "blocks Data" })
|
|
9272
9399
|
},
|
|
9273
9400
|
{
|
|
9274
9401
|
name: "blocks-logic",
|
|
9275
9402
|
appName: "blocks Logic",
|
|
9276
|
-
badge: "
|
|
9277
|
-
tagline: "
|
|
9278
|
-
descriptionTitle: "
|
|
9403
|
+
badge: t("LOGIN_CONSTANT.LOGIC_BADGE"),
|
|
9404
|
+
tagline: t("LOGIN_CONSTANT.LOGIC_TAGLINE"),
|
|
9405
|
+
descriptionTitle: t("LOGIN_CONSTANT.LOGIC_TITLE"),
|
|
9406
|
+
// Not shown in the UI.
|
|
9279
9407
|
keywords: ["visual", "automated", "event-driven", "codeless"],
|
|
9280
|
-
shortDescription: "
|
|
9281
|
-
description: "
|
|
9408
|
+
shortDescription: t("LOGIN_CONSTANT.LOGIC_SHORT"),
|
|
9409
|
+
description: t("LOGIN_CONSTANT.LOGIC_DESCRIPTION"),
|
|
9282
9410
|
featureChips: [
|
|
9283
|
-
"
|
|
9284
|
-
"
|
|
9285
|
-
"
|
|
9286
|
-
"
|
|
9287
|
-
"
|
|
9411
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_1"),
|
|
9412
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_2"),
|
|
9413
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_3"),
|
|
9414
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_4"),
|
|
9415
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_5")
|
|
9288
9416
|
],
|
|
9289
9417
|
url: "",
|
|
9290
|
-
cta: "
|
|
9418
|
+
cta: t(VISIT_KEY, { name: "blocks Logic" })
|
|
9291
9419
|
},
|
|
9292
9420
|
{
|
|
9293
9421
|
name: "blocks-studio",
|
|
9294
9422
|
appName: "blocks Studio",
|
|
9295
|
-
badge: "
|
|
9296
|
-
tagline: "
|
|
9297
|
-
descriptionTitle: "
|
|
9423
|
+
badge: t("LOGIN_CONSTANT.STUDIO_BADGE"),
|
|
9424
|
+
tagline: t("LOGIN_CONSTANT.STUDIO_TAGLINE"),
|
|
9425
|
+
descriptionTitle: t("LOGIN_CONSTANT.STUDIO_TITLE"),
|
|
9426
|
+
// Not shown in the UI.
|
|
9298
9427
|
keywords: [
|
|
9299
9428
|
"intelligent",
|
|
9300
9429
|
"generative",
|
|
@@ -9302,24 +9431,25 @@ var BLOCKS_PRODUCTS = [
|
|
|
9302
9431
|
"instant",
|
|
9303
9432
|
"adaptive"
|
|
9304
9433
|
],
|
|
9305
|
-
shortDescription: "
|
|
9306
|
-
description: "
|
|
9434
|
+
shortDescription: t("LOGIN_CONSTANT.STUDIO_SHORT"),
|
|
9435
|
+
description: t("LOGIN_CONSTANT.STUDIO_DESCRIPTION"),
|
|
9307
9436
|
featureChips: [
|
|
9308
|
-
"
|
|
9309
|
-
"
|
|
9310
|
-
"
|
|
9311
|
-
"
|
|
9312
|
-
"
|
|
9437
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_1"),
|
|
9438
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_2"),
|
|
9439
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_3"),
|
|
9440
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_4"),
|
|
9441
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_5")
|
|
9313
9442
|
],
|
|
9314
9443
|
url: "",
|
|
9315
|
-
cta: "
|
|
9444
|
+
cta: t(VISIT_KEY, { name: "blocks Studio" })
|
|
9316
9445
|
},
|
|
9317
9446
|
{
|
|
9318
9447
|
name: "blocks-agents",
|
|
9319
9448
|
appName: "Blocks Agents",
|
|
9320
|
-
badge: "
|
|
9321
|
-
tagline: "
|
|
9322
|
-
descriptionTitle: "
|
|
9449
|
+
badge: t("LOGIN_CONSTANT.AGENTS_BADGE"),
|
|
9450
|
+
tagline: t("LOGIN_CONSTANT.AGENTS_TAGLINE"),
|
|
9451
|
+
descriptionTitle: t("LOGIN_CONSTANT.AGENTS_TITLE"),
|
|
9452
|
+
// Not shown in the UI.
|
|
9323
9453
|
keywords: [
|
|
9324
9454
|
"reasoning",
|
|
9325
9455
|
"autonomous",
|
|
@@ -9327,95 +9457,99 @@ var BLOCKS_PRODUCTS = [
|
|
|
9327
9457
|
"intelligent",
|
|
9328
9458
|
"adaptive"
|
|
9329
9459
|
],
|
|
9330
|
-
shortDescription: "
|
|
9331
|
-
description: "
|
|
9460
|
+
shortDescription: t("LOGIN_CONSTANT.AGENTS_SHORT"),
|
|
9461
|
+
description: t("LOGIN_CONSTANT.AGENTS_DESCRIPTION"),
|
|
9332
9462
|
featureChips: [
|
|
9333
|
-
"
|
|
9334
|
-
"
|
|
9335
|
-
"
|
|
9336
|
-
"
|
|
9463
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_1"),
|
|
9464
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_2"),
|
|
9465
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_3"),
|
|
9466
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_4")
|
|
9337
9467
|
],
|
|
9338
9468
|
url: "",
|
|
9339
|
-
cta: "
|
|
9469
|
+
cta: t(VISIT_KEY, { name: "Blocks Agents" })
|
|
9340
9470
|
},
|
|
9341
9471
|
{
|
|
9342
9472
|
name: "blocks-release",
|
|
9343
9473
|
appName: "blocks Release",
|
|
9344
|
-
badge: "
|
|
9345
|
-
tagline: "
|
|
9346
|
-
descriptionTitle: "
|
|
9474
|
+
badge: t("LOGIN_CONSTANT.RELEASE_BADGE"),
|
|
9475
|
+
tagline: t("LOGIN_CONSTANT.RELEASE_TAGLINE"),
|
|
9476
|
+
descriptionTitle: t("LOGIN_CONSTANT.RELEASE_TITLE"),
|
|
9477
|
+
// Not shown in the UI.
|
|
9347
9478
|
keywords: ["secure", "compliant", "automated", "fast"],
|
|
9348
|
-
shortDescription: "
|
|
9349
|
-
description: "
|
|
9479
|
+
shortDescription: t("LOGIN_CONSTANT.RELEASE_SHORT"),
|
|
9480
|
+
description: t("LOGIN_CONSTANT.RELEASE_DESCRIPTION"),
|
|
9350
9481
|
featureChips: [
|
|
9351
|
-
"
|
|
9352
|
-
"
|
|
9353
|
-
"
|
|
9354
|
-
"
|
|
9355
|
-
"
|
|
9482
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_1"),
|
|
9483
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_2"),
|
|
9484
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_3"),
|
|
9485
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_4"),
|
|
9486
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_5")
|
|
9356
9487
|
],
|
|
9357
9488
|
url: "",
|
|
9358
|
-
cta: "
|
|
9489
|
+
cta: t(VISIT_KEY, { name: "blocks Release" })
|
|
9359
9490
|
},
|
|
9360
9491
|
{
|
|
9361
9492
|
name: "blocks-monitor",
|
|
9362
9493
|
appName: "blocks Monitor",
|
|
9363
|
-
badge: "
|
|
9364
|
-
tagline: "
|
|
9365
|
-
descriptionTitle: "
|
|
9494
|
+
badge: t("LOGIN_CONSTANT.MONITOR_BADGE"),
|
|
9495
|
+
tagline: t("LOGIN_CONSTANT.MONITOR_TAGLINE"),
|
|
9496
|
+
descriptionTitle: t("LOGIN_CONSTANT.MONITOR_TITLE"),
|
|
9497
|
+
// Not shown in the UI.
|
|
9366
9498
|
keywords: ["observable", "traceable", "real-time", "intelligent"],
|
|
9367
|
-
shortDescription: "
|
|
9368
|
-
description: "
|
|
9499
|
+
shortDescription: t("LOGIN_CONSTANT.MONITOR_SHORT"),
|
|
9500
|
+
description: t("LOGIN_CONSTANT.MONITOR_DESCRIPTION"),
|
|
9369
9501
|
featureChips: [
|
|
9370
|
-
"
|
|
9371
|
-
"
|
|
9372
|
-
"
|
|
9373
|
-
"
|
|
9374
|
-
"
|
|
9502
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_1"),
|
|
9503
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_2"),
|
|
9504
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_3"),
|
|
9505
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_4"),
|
|
9506
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_5")
|
|
9375
9507
|
],
|
|
9376
9508
|
url: "",
|
|
9377
|
-
cta: "
|
|
9509
|
+
cta: t(VISIT_KEY, { name: "blocks Monitor" })
|
|
9378
9510
|
},
|
|
9379
9511
|
{
|
|
9380
9512
|
name: "blocks-utilities",
|
|
9381
9513
|
appName: "blocks Utilities",
|
|
9382
|
-
badge: "
|
|
9383
|
-
tagline: "
|
|
9384
|
-
descriptionTitle: "
|
|
9514
|
+
badge: t("LOGIN_CONSTANT.UTILITIES_BADGE"),
|
|
9515
|
+
tagline: t("LOGIN_CONSTANT.UTILITIES_TAGLINE"),
|
|
9516
|
+
descriptionTitle: t("LOGIN_CONSTANT.UTILITIES_TITLE"),
|
|
9517
|
+
// Not shown in the UI.
|
|
9385
9518
|
keywords: ["reliable", "real-time", "automated", "scalable"],
|
|
9386
|
-
shortDescription: "
|
|
9387
|
-
description: "
|
|
9519
|
+
shortDescription: t("LOGIN_CONSTANT.UTILITIES_SHORT"),
|
|
9520
|
+
description: t("LOGIN_CONSTANT.UTILITIES_DESCRIPTION"),
|
|
9388
9521
|
featureChips: [
|
|
9389
|
-
"
|
|
9390
|
-
"
|
|
9391
|
-
"
|
|
9392
|
-
"
|
|
9393
|
-
"
|
|
9522
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_1"),
|
|
9523
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_2"),
|
|
9524
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_3"),
|
|
9525
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_4"),
|
|
9526
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_5")
|
|
9394
9527
|
],
|
|
9395
9528
|
url: "",
|
|
9396
|
-
cta: "
|
|
9529
|
+
cta: t(VISIT_KEY, { name: "blocks Utilities" })
|
|
9397
9530
|
}
|
|
9398
9531
|
];
|
|
9399
|
-
var
|
|
9532
|
+
var getDefaultBlocksProducts = (t) => [
|
|
9400
9533
|
{
|
|
9401
9534
|
name: "blocks-os",
|
|
9402
9535
|
appName: "blocks OS Platform",
|
|
9403
|
-
badge: "
|
|
9404
|
-
tagline: "
|
|
9405
|
-
descriptionTitle: "
|
|
9536
|
+
badge: t("LOGIN_CONSTANT.DEFAULT_OS_BADGE"),
|
|
9537
|
+
tagline: t("LOGIN_CONSTANT.DEFAULT_OS_TAGLINE"),
|
|
9538
|
+
descriptionTitle: t("LOGIN_CONSTANT.DEFAULT_OS_TITLE"),
|
|
9539
|
+
// Not shown in the UI.
|
|
9406
9540
|
keywords: ["observable", "intelligent", "scalable", "resilient", "secure"],
|
|
9407
|
-
shortDescription: "
|
|
9408
|
-
description: "
|
|
9541
|
+
shortDescription: t("LOGIN_CONSTANT.DEFAULT_OS_SHORT"),
|
|
9542
|
+
description: t("LOGIN_CONSTANT.DEFAULT_OS_DESCRIPTION"),
|
|
9409
9543
|
featureChips: [
|
|
9410
|
-
"
|
|
9411
|
-
"
|
|
9412
|
-
"
|
|
9413
|
-
"
|
|
9414
|
-
"
|
|
9415
|
-
"
|
|
9544
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_1"),
|
|
9545
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_2"),
|
|
9546
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_3"),
|
|
9547
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_4"),
|
|
9548
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_5"),
|
|
9549
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_6")
|
|
9416
9550
|
],
|
|
9417
9551
|
url: "",
|
|
9418
|
-
cta: "
|
|
9552
|
+
cta: t(VISIT_KEY, { name: "blocks OS" })
|
|
9419
9553
|
}
|
|
9420
9554
|
];
|
|
9421
9555
|
|
|
@@ -9432,13 +9566,15 @@ function useLoginCarousel({
|
|
|
9432
9566
|
name,
|
|
9433
9567
|
carouselItems
|
|
9434
9568
|
}) {
|
|
9569
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9570
|
+
const defaultProducts = React8.useMemo(() => getDefaultBlocksProducts(t), [t]);
|
|
9435
9571
|
const active = React8.useMemo(() => {
|
|
9436
|
-
const products = carouselItems?.filter(isBlocksProduct) ??
|
|
9572
|
+
const products = carouselItems?.filter(isBlocksProduct) ?? defaultProducts;
|
|
9437
9573
|
return products.find((p) => p.name === name) ?? products[0];
|
|
9438
|
-
}, [name, carouselItems]);
|
|
9574
|
+
}, [name, carouselItems, defaultProducts]);
|
|
9439
9575
|
const otherProducts = React8.useMemo(
|
|
9440
|
-
() =>
|
|
9441
|
-
[active?.name]
|
|
9576
|
+
() => defaultProducts.filter((p) => p.name !== active?.name),
|
|
9577
|
+
[defaultProducts, active?.name]
|
|
9442
9578
|
);
|
|
9443
9579
|
const carouselSource = carouselItems ?? otherProducts;
|
|
9444
9580
|
const [titleHead, titleTail] = splitAppName(active?.appName ?? "");
|
|
@@ -9463,15 +9599,20 @@ var BlocksLoginPage = ({
|
|
|
9463
9599
|
name,
|
|
9464
9600
|
onLogin,
|
|
9465
9601
|
isLoading = false,
|
|
9466
|
-
eyebrow
|
|
9467
|
-
loginLabel
|
|
9602
|
+
eyebrow,
|
|
9603
|
+
loginLabel,
|
|
9468
9604
|
docsUrl = "https://docs.seliseblocks.com/",
|
|
9469
|
-
footerLink
|
|
9605
|
+
footerLink,
|
|
9470
9606
|
showSignUp = false,
|
|
9471
9607
|
onSignUp,
|
|
9472
9608
|
isSignUpLoading = false,
|
|
9473
9609
|
carouselItems
|
|
9474
9610
|
}) => {
|
|
9611
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9612
|
+
const footer = footerLink ?? {
|
|
9613
|
+
label: t("BLOCKS_LOGIN_PAGE.FOOTER_LINK"),
|
|
9614
|
+
url: "https://seliseblocks.com"
|
|
9615
|
+
};
|
|
9475
9616
|
const canvasRef = React8.useRef(null);
|
|
9476
9617
|
useAtmosphericCanvas(canvasRef);
|
|
9477
9618
|
const {
|
|
@@ -9593,7 +9734,7 @@ var BlocksLoginPage = ({
|
|
|
9593
9734
|
/* @__PURE__ */ jsxRuntime.jsx(LoginHeader, {}),
|
|
9594
9735
|
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "main", children: [
|
|
9595
9736
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-left", children: [
|
|
9596
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "eyebrow", children: eyebrow }),
|
|
9737
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "eyebrow", children: eyebrow ?? t("BLOCKS_LOGIN_PAGE.EYEBROW") }),
|
|
9597
9738
|
/* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "title-main", children: [
|
|
9598
9739
|
titleHead,
|
|
9599
9740
|
titleTail && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -9614,7 +9755,7 @@ var BlocksLoginPage = ({
|
|
|
9614
9755
|
className: "launch-btn blocks-gradient",
|
|
9615
9756
|
disabled: isLoading,
|
|
9616
9757
|
onClick: onLogin,
|
|
9617
|
-
children: isLoading ? "
|
|
9758
|
+
children: isLoading ? t("BLOCKS_LOGIN_PAGE.REDIRECTING") : loginLabel ?? t("BLOCKS_LOGIN_PAGE.LOGIN_LABEL")
|
|
9618
9759
|
}
|
|
9619
9760
|
)
|
|
9620
9761
|
] }),
|
|
@@ -9626,7 +9767,7 @@ var BlocksLoginPage = ({
|
|
|
9626
9767
|
rel: "noreferrer",
|
|
9627
9768
|
className: "cta-docs",
|
|
9628
9769
|
children: [
|
|
9629
|
-
"
|
|
9770
|
+
t("BLOCKS_LOGIN_PAGE.VIEW_DOCUMENTATION"),
|
|
9630
9771
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9631
9772
|
"svg",
|
|
9632
9773
|
{
|
|
@@ -9644,7 +9785,7 @@ var BlocksLoginPage = ({
|
|
|
9644
9785
|
)
|
|
9645
9786
|
] }),
|
|
9646
9787
|
showSignUp && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "cta-signup", children: [
|
|
9647
|
-
"
|
|
9788
|
+
t("BLOCKS_LOGIN_PAGE.NOT_A_MEMBER"),
|
|
9648
9789
|
" ",
|
|
9649
9790
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9650
9791
|
"button",
|
|
@@ -9654,7 +9795,7 @@ var BlocksLoginPage = ({
|
|
|
9654
9795
|
disabled: isSignUpLoading,
|
|
9655
9796
|
className: "cta-signup-link",
|
|
9656
9797
|
children: [
|
|
9657
|
-
isSignUpLoading ? "
|
|
9798
|
+
isSignUpLoading ? t("BLOCKS_LOGIN_PAGE.REDIRECTING") : t("BLOCKS_LOGIN_PAGE.SIGN_UP"),
|
|
9658
9799
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9659
9800
|
"svg",
|
|
9660
9801
|
{
|
|
@@ -9674,11 +9815,10 @@ var BlocksLoginPage = ({
|
|
|
9674
9815
|
] }),
|
|
9675
9816
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-right", children: [
|
|
9676
9817
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sdk-header-row", children: [
|
|
9677
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "sdk-header-label", children: "
|
|
9678
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9679
|
-
carouselSource.length
|
|
9680
|
-
|
|
9681
|
-
] })
|
|
9818
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "sdk-header-label", children: t("BLOCKS_LOGIN_PAGE.SERVICES_HEADER") }),
|
|
9819
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "sdk-count-badge", children: t("BLOCKS_LOGIN_PAGE.SERVICES_COUNT", {
|
|
9820
|
+
count: carouselSource.length
|
|
9821
|
+
}) })
|
|
9682
9822
|
] }),
|
|
9683
9823
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "carousel-track", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "carousel-inner", children: carouselCards.map((item, i) => {
|
|
9684
9824
|
const isBlocksProductItem = isBlocksProduct(item);
|
|
@@ -9758,12 +9898,12 @@ var BlocksLoginPage = ({
|
|
|
9758
9898
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9759
9899
|
"a",
|
|
9760
9900
|
{
|
|
9761
|
-
href:
|
|
9901
|
+
href: footer.url,
|
|
9762
9902
|
target: "_blank",
|
|
9763
9903
|
rel: "noreferrer",
|
|
9764
9904
|
className: "visit-construct",
|
|
9765
9905
|
children: [
|
|
9766
|
-
|
|
9906
|
+
footer.label,
|
|
9767
9907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9768
9908
|
"svg",
|
|
9769
9909
|
{
|
|
@@ -9779,17 +9919,19 @@ var BlocksLoginPage = ({
|
|
|
9779
9919
|
]
|
|
9780
9920
|
}
|
|
9781
9921
|
),
|
|
9782
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sdk-open-source", children: "
|
|
9922
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sdk-open-source", children: t("BLOCKS_LOGIN_PAGE.OPEN_SOURCE") })
|
|
9783
9923
|
] })
|
|
9784
9924
|
] })
|
|
9785
9925
|
] })
|
|
9786
9926
|
] });
|
|
9787
9927
|
};
|
|
9788
9928
|
var LoginPage = () => {
|
|
9789
|
-
const
|
|
9790
|
-
const
|
|
9791
|
-
const
|
|
9792
|
-
const { start
|
|
9929
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9930
|
+
const products = React8.useMemo(() => getBlocksProducts(t), [t]);
|
|
9931
|
+
const config = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
9932
|
+
const { start, isLoading } = chunkVLZJP6FH_cjs.useLogin();
|
|
9933
|
+
const { canSignUp } = chunkVLZJP6FH_cjs.useSignUpAffordance();
|
|
9934
|
+
const { start: startSignUp, isLoading: isSignUpLoading } = chunkVLZJP6FH_cjs.useSignUpRedirect();
|
|
9793
9935
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9794
9936
|
BlocksLoginPage,
|
|
9795
9937
|
{
|
|
@@ -9799,7 +9941,7 @@ var LoginPage = () => {
|
|
|
9799
9941
|
showSignUp: canSignUp,
|
|
9800
9942
|
onSignUp: startSignUp,
|
|
9801
9943
|
isSignUpLoading,
|
|
9802
|
-
carouselItems:
|
|
9944
|
+
carouselItems: products
|
|
9803
9945
|
}
|
|
9804
9946
|
);
|
|
9805
9947
|
};
|
|
@@ -9812,33 +9954,33 @@ var resource_cli_default = 'data:image/svg+xml,<svg width="160" height="120" vie
|
|
|
9812
9954
|
|
|
9813
9955
|
// src/assets/images/console/resource-skills.svg
|
|
9814
9956
|
var resource_skills_default = 'data:image/svg+xml,<svg width="160" height="120" viewBox="0 0 160 120" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <defs>%0A <linearGradient id="skills-top" x1="48" y1="30" x2="113" y2="68" gradientUnits="userSpaceOnUse">%0A <stop stop-color="hsl(218 78% 75%)"/>%0A <stop offset="1" stop-color="hsl(218 78% 58%)"/>%0A </linearGradient>%0A <linearGradient id="skills-left" x1="43" y1="49" x2="80" y2="99" gradientUnits="userSpaceOnUse">%0A <stop stop-color="hsl(218 78% 58%)"/>%0A <stop offset="1" stop-color="hsl(218 78% 44%)"/>%0A </linearGradient>%0A <linearGradient id="skills-right" x1="80" y1="62" x2="119" y2="97" gradientUnits="userSpaceOnUse">%0A <stop stop-color="hsl(218 78% 44%)"/>%0A <stop offset="1" stop-color="hsl(218 78% 32%)"/>%0A </linearGradient>%0A <filter id="skills-shadow" x="28" y="17" width="111" height="99" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">%0A <feDropShadow dx="0" dy="9" stdDeviation="7" flood-color="hsl(218 78% 32%)" flood-opacity="0.16"/>%0A </filter>%0A </defs>%0A%0A <ellipse cx="80" cy="101" rx="43" ry="8" fill="hsl(218 78% 32%)" fill-opacity="0.08"/>%0A <g filter="url(%23skills-shadow)">%0A <path d="M42 52L80 31L118 52L80 74L42 52Z" fill="url(%23skills-top)"/>%0A <path d="M42 52L80 74V100L42 78V52Z" fill="url(%23skills-left)"/>%0A <path d="M80 74L118 52V78L80 100V74Z" fill="url(%23skills-right)"/>%0A <path d="M61 41.5L99 63.5L110 57L72 35L61 41.5Z" fill="hsl(218 78% 90%)" fill-opacity="0.7"/>%0A <path d="M99 63.5V76.5L110 70V57L99 63.5Z" fill="hsl(218 78% 32%)"/>%0A <path d="M61 41.5V54.5L99 76.5V63.5L61 41.5Z" fill="hsl(218 78% 58%)"/>%0A <path d="M52 65L69 74.8M52 72L65 79.5" stroke="hsl(218 78% 75%)" stroke-width="3" stroke-linecap="round"/>%0A <path d="M90 85L107 75" stroke="hsl(218 78% 75%)" stroke-width="3" stroke-linecap="round"/>%0A </g>%0A <g transform="rotate(-12 111 34)">%0A <rect x="108" y="30" width="7" height="43" rx="3.5" fill="hsl(218 78% 44%)"/>%0A <rect x="108" y="30" width="7" height="13" rx="3.5" fill="hsl(218 78% 75%)"/>%0A </g>%0A <path d="M111 28C110 20.9 107.1 18 100 17C107.1 16 110 13.1 111 6C112 13.1 114.9 16 122 17C114.9 18 112 20.9 111 28Z" fill="hsl(218 78% 58%)"/>%0A <path d="M133 44C132.4 39.7 130.3 37.6 126 37C130.3 36.4 132.4 34.3 133 30C133.6 34.3 135.7 36.4 140 37C135.7 37.6 133.6 39.7 133 44Z" fill="hsl(218 78% 75%)"/>%0A <circle cx="128" cy="57" r="3" fill="hsl(218 78% 90%)"/>%0A</svg>%0A';
|
|
9815
|
-
var
|
|
9957
|
+
var getResources = (t) => [
|
|
9816
9958
|
{
|
|
9817
|
-
eyebrow: "
|
|
9818
|
-
label: "
|
|
9819
|
-
description: "
|
|
9959
|
+
eyebrow: t("DEFAULT_DOC.LEARN_EYEBROW"),
|
|
9960
|
+
label: t("DEFAULT_DOC.LEARN_LABEL"),
|
|
9961
|
+
description: t("DEFAULT_DOC.LEARN_DESCRIPTION"),
|
|
9820
9962
|
image: resource_docs_default,
|
|
9821
9963
|
url: "https://docs.seliseblocks.com",
|
|
9822
9964
|
icon: lucideReact.BookOpenText,
|
|
9823
|
-
actionLabel: "
|
|
9965
|
+
actionLabel: t("DEFAULT_DOC.LEARN_ACTION")
|
|
9824
9966
|
},
|
|
9825
9967
|
{
|
|
9826
|
-
eyebrow: "
|
|
9827
|
-
label: "
|
|
9828
|
-
description: "
|
|
9968
|
+
eyebrow: t("DEFAULT_DOC.BUILD_EYEBROW"),
|
|
9969
|
+
label: t("DEFAULT_DOC.BUILD_LABEL"),
|
|
9970
|
+
description: t("DEFAULT_DOC.BUILD_DESCRIPTION"),
|
|
9829
9971
|
image: resource_cli_default,
|
|
9830
9972
|
url: "https://github.com/SELISEdigitalplatforms/blocks-cli",
|
|
9831
9973
|
icon: lucideReact.SquareTerminal,
|
|
9832
|
-
actionLabel: "
|
|
9974
|
+
actionLabel: t("DEFAULT_DOC.BUILD_ACTION")
|
|
9833
9975
|
},
|
|
9834
9976
|
{
|
|
9835
|
-
eyebrow: "
|
|
9836
|
-
label: "
|
|
9837
|
-
description: "
|
|
9977
|
+
eyebrow: t("DEFAULT_DOC.AUTOMATE_EYEBROW"),
|
|
9978
|
+
label: t("DEFAULT_DOC.AUTOMATE_LABEL"),
|
|
9979
|
+
description: t("DEFAULT_DOC.AUTOMATE_DESCRIPTION"),
|
|
9838
9980
|
image: resource_skills_default,
|
|
9839
9981
|
url: "https://github.com/SELISEdigitalplatforms/blocks-skills",
|
|
9840
9982
|
icon: lucideReact.Sparkles,
|
|
9841
|
-
actionLabel: "
|
|
9983
|
+
actionLabel: t("DEFAULT_DOC.AUTOMATE_ACTION")
|
|
9842
9984
|
}
|
|
9843
9985
|
];
|
|
9844
9986
|
var BentoGrid = ({
|
|
@@ -9902,14 +10044,17 @@ var BentoCard = ({
|
|
|
9902
10044
|
]
|
|
9903
10045
|
}
|
|
9904
10046
|
);
|
|
9905
|
-
var DefaultDoc = () =>
|
|
10047
|
+
var DefaultDoc = () => {
|
|
10048
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: getResources(t).map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
|
|
10050
|
+
};
|
|
9906
10051
|
function useCreateProjectRedirect() {
|
|
9907
|
-
const { name } =
|
|
10052
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
9908
10053
|
const navigate = reactRouter.useNavigate();
|
|
9909
10054
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
9910
|
-
const { isFetching, isReady, redirect } =
|
|
9911
|
-
clientId: osApp ?
|
|
9912
|
-
redirectUri: osApp ?
|
|
10055
|
+
const { isFetching, isReady, redirect } = chunkVLZJP6FH_cjs.usePrefetchRedirect({
|
|
10056
|
+
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10057
|
+
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
9913
10058
|
forwardedTo: "/app/create-project",
|
|
9914
10059
|
enabled: name !== "blocks-os" && !!osApp
|
|
9915
10060
|
});
|
|
@@ -9928,6 +10073,7 @@ function useCreateProjectRedirect() {
|
|
|
9928
10073
|
};
|
|
9929
10074
|
}
|
|
9930
10075
|
var AddProjectCard = () => {
|
|
10076
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
9931
10077
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
9932
10078
|
if (isFetching) {
|
|
9933
10079
|
return /* @__PURE__ */ jsxRuntime.jsx(ProjectCardLoadingSkeleton, {});
|
|
@@ -9943,12 +10089,13 @@ var AddProjectCard = () => {
|
|
|
9943
10089
|
style: { pointerEvents: isDisabled ? "none" : "auto" },
|
|
9944
10090
|
children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-0 text-center", children: [
|
|
9945
10091
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "text-primary", strokeWidth: 2, size: 50 }) }),
|
|
9946
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-primary mt-2 font-bold", children: "
|
|
10092
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-primary mt-2 font-bold", children: t("ADD_PROJECT_CARD.ADD_PROJECT") })
|
|
9947
10093
|
] })
|
|
9948
10094
|
}
|
|
9949
10095
|
);
|
|
9950
10096
|
};
|
|
9951
10097
|
function ConsoleCreateProject() {
|
|
10098
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
9952
10099
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
9953
10100
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9954
10101
|
framerMotion.motion.div,
|
|
@@ -9963,10 +10110,10 @@ function ConsoleCreateProject() {
|
|
|
9963
10110
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute -left-10 bottom-0 h-32 w-32 rounded-full bg-white/[0.03]" }),
|
|
9964
10111
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 bg-[radial-gradient(hsl(210_100%_100%/0.07)_1px,transparent_1px)] [background-size:22px_22px]" }),
|
|
9965
10112
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center gap-5 px-8 py-14 text-center sm:px-12 sm:py-20", children: [
|
|
9966
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.15em] text-primary-foreground/60", children: "
|
|
10113
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.15em] text-primary-foreground/60", children: t("CONSOLE_CREATE.EYEBROW") }),
|
|
9967
10114
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-xl border border-white/15 bg-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layers, { className: "h-6 w-6 text-primary-foreground" }) }),
|
|
9968
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl", children: "
|
|
9969
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm leading-relaxed text-primary-foreground/70", children: "
|
|
10115
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl", children: t("CONSOLE_CREATE.TITLE") }),
|
|
10116
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm leading-relaxed text-primary-foreground/70", children: t("CONSOLE_CREATE.DESCRIPTION") }),
|
|
9970
10117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap justify-center gap-3 pt-1", children: [
|
|
9971
10118
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9972
10119
|
Button,
|
|
@@ -9974,7 +10121,7 @@ function ConsoleCreateProject() {
|
|
|
9974
10121
|
onClick: handleClick,
|
|
9975
10122
|
disabled: isDisabled,
|
|
9976
10123
|
className: "inline-flex items-center rounded-lg bg-white px-5 py-2.5 text-sm font-semibold text-primary shadow-sm transition-colors hover:bg-white/90",
|
|
9977
|
-
children: isFetching ? "
|
|
10124
|
+
children: isFetching ? t("CONSOLE_CREATE.REDIRECTING") : t("CONSOLE_CREATE.CREATE_PROJECT")
|
|
9978
10125
|
}
|
|
9979
10126
|
),
|
|
9980
10127
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9985,7 +10132,7 @@ function ConsoleCreateProject() {
|
|
|
9985
10132
|
className: "inline-flex items-center gap-2 rounded-lg bg-white/15 px-4 py-2.5 text-sm font-semibold text-white backdrop-blur-sm transition-colors hover:bg-white/25",
|
|
9986
10133
|
children: [
|
|
9987
10134
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BookOpenText, { className: "h-4 w-4" }),
|
|
9988
|
-
"
|
|
10135
|
+
t("CONSOLE_CREATE.VIEW_DOCUMENTATION")
|
|
9989
10136
|
]
|
|
9990
10137
|
}
|
|
9991
10138
|
)
|
|
@@ -9999,12 +10146,12 @@ function useProjectOverviewRedirect({
|
|
|
9999
10146
|
tenantGroupId
|
|
10000
10147
|
}) {
|
|
10001
10148
|
const navigate = reactRouter.useNavigate();
|
|
10002
|
-
const { name } =
|
|
10149
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
10003
10150
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
10004
10151
|
const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
|
|
10005
|
-
const { isFetching, isReady, redirect } =
|
|
10006
|
-
clientId: osApp ?
|
|
10007
|
-
redirectUri: osApp ?
|
|
10152
|
+
const { isFetching, isReady, redirect } = chunkVLZJP6FH_cjs.usePrefetchRedirect({
|
|
10153
|
+
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10154
|
+
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
10008
10155
|
forwardedTo: redirectedRoute,
|
|
10009
10156
|
enabled: name !== "blocks-os" && !!osApp
|
|
10010
10157
|
});
|
|
@@ -10022,16 +10169,19 @@ function useProjectOverviewRedirect({
|
|
|
10022
10169
|
isFetching
|
|
10023
10170
|
};
|
|
10024
10171
|
}
|
|
10025
|
-
var getActionLabels = (canOpen, isShared) => {
|
|
10172
|
+
var getActionLabels = (t, canOpen, isShared) => {
|
|
10026
10173
|
if (canOpen) {
|
|
10027
|
-
return isShared ? {
|
|
10028
|
-
accessibleLabel: "
|
|
10029
|
-
tooltipLabel: "
|
|
10174
|
+
return isShared ? {
|
|
10175
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.OPEN_SHARED_ARIA"),
|
|
10176
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.OPEN_SHARED_TOOLTIP")
|
|
10177
|
+
} : {
|
|
10178
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.CONFIGURE_ARIA"),
|
|
10179
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.CONFIGURE_TOOLTIP")
|
|
10030
10180
|
};
|
|
10031
10181
|
}
|
|
10032
10182
|
return {
|
|
10033
|
-
accessibleLabel: "
|
|
10034
|
-
tooltipLabel: "
|
|
10183
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.ACCESS_UNAVAILABLE"),
|
|
10184
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.ACCESS_UNAVAILABLE")
|
|
10035
10185
|
};
|
|
10036
10186
|
};
|
|
10037
10187
|
var ProjectActionButton = ({
|
|
@@ -10039,12 +10189,17 @@ var ProjectActionButton = ({
|
|
|
10039
10189
|
isShared,
|
|
10040
10190
|
canOpen = true
|
|
10041
10191
|
}) => {
|
|
10042
|
-
const {
|
|
10192
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10193
|
+
const { setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10043
10194
|
const { handleClick, isDisabled, isFetching } = useProjectOverviewRedirect({
|
|
10044
10195
|
tenantGroupId: project.tenantGroupId
|
|
10045
10196
|
});
|
|
10046
10197
|
const isActionDisabled = !canOpen || isDisabled || isFetching;
|
|
10047
|
-
const { accessibleLabel, tooltipLabel } = getActionLabels(
|
|
10198
|
+
const { accessibleLabel, tooltipLabel } = getActionLabels(
|
|
10199
|
+
t,
|
|
10200
|
+
canOpen,
|
|
10201
|
+
isShared
|
|
10202
|
+
);
|
|
10048
10203
|
const onClick = () => {
|
|
10049
10204
|
setTenantGroup(project.tenantGroupId);
|
|
10050
10205
|
handleClick();
|
|
@@ -10079,8 +10234,9 @@ var getLatestProjectUpdate = (group) => group.projects.reduce((latest, project)
|
|
|
10079
10234
|
var getEnvironmentLabel = (environment) => environmentOptions.find((option) => option.value === environment)?.label ?? environment;
|
|
10080
10235
|
var INLINE_LIMIT = 3;
|
|
10081
10236
|
var ProjectEnvironments = ({ projects }) => {
|
|
10237
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10082
10238
|
const navigate = reactRouter.useNavigate();
|
|
10083
|
-
const { setTenantGroup, setSelectedProject } =
|
|
10239
|
+
const { setTenantGroup, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10084
10240
|
const onEnvironmentClick = async (event, project) => {
|
|
10085
10241
|
event.stopPropagation();
|
|
10086
10242
|
try {
|
|
@@ -10105,7 +10261,7 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10105
10261
|
project.environment
|
|
10106
10262
|
);
|
|
10107
10263
|
if (projects.length === 0) {
|
|
10108
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-border/60 bg-muted/40 text-muted-foreground inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs", children: "
|
|
10264
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-border/60 bg-muted/40 text-muted-foreground inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs", children: t("PROJECT_ENVIRONMENTS.NO_ENVIRONMENTS") });
|
|
10109
10265
|
}
|
|
10110
10266
|
const hasOverflow = projects.length > INLINE_LIMIT;
|
|
10111
10267
|
const visibleProjects = hasOverflow ? projects.slice(0, INLINE_LIMIT) : projects;
|
|
@@ -10113,17 +10269,13 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10113
10269
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
10114
10270
|
visibleProjects.map(renderEnvironmentChip),
|
|
10115
10271
|
hasOverflow && /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
10116
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.
|
|
10272
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10117
10273
|
"button",
|
|
10118
10274
|
{
|
|
10119
10275
|
type: "button",
|
|
10120
10276
|
onClick: (event) => event.stopPropagation(),
|
|
10121
10277
|
className: "border-border/60 bg-muted/40 text-muted-foreground hover:bg-muted hover:text-foreground inline-flex cursor-pointer items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",
|
|
10122
|
-
children:
|
|
10123
|
-
"+",
|
|
10124
|
-
overflowCount,
|
|
10125
|
-
" more"
|
|
10126
|
-
]
|
|
10278
|
+
children: t("PROJECT_ENVIRONMENTS.MORE", { count: overflowCount })
|
|
10127
10279
|
}
|
|
10128
10280
|
) }),
|
|
10129
10281
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10133,7 +10285,7 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10133
10285
|
align: "start",
|
|
10134
10286
|
onClick: (event) => event.stopPropagation(),
|
|
10135
10287
|
children: [
|
|
10136
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-2 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-wider", children: "
|
|
10288
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-2 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-wider", children: t("PROJECT_ENVIRONMENTS.ALL_ENVIRONMENTS") }),
|
|
10137
10289
|
projects.map((project) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10138
10290
|
"button",
|
|
10139
10291
|
{
|
|
@@ -10159,6 +10311,7 @@ var ProjectCard = ({
|
|
|
10159
10311
|
isShared,
|
|
10160
10312
|
canOpen = true
|
|
10161
10313
|
}) => {
|
|
10314
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10162
10315
|
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "border-border/60 bg-card hover:border-primary/30 group flex h-40 flex-col overflow-hidden rounded-xl border p-4 shadow-sm transition-all duration-200 hover:shadow-md", children: [
|
|
10163
10316
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-start justify-between gap-2", children: [
|
|
10164
10317
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "line-clamp-3 break-all text-base font-semibold leading-snug", children: project.name }) }),
|
|
@@ -10174,7 +10327,7 @@ var ProjectCard = ({
|
|
|
10174
10327
|
className: "flex items-center gap-1 shrink-0",
|
|
10175
10328
|
children: [
|
|
10176
10329
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
|
|
10177
|
-
"
|
|
10330
|
+
t("PROJECT_CARD.SHARED")
|
|
10178
10331
|
]
|
|
10179
10332
|
}
|
|
10180
10333
|
),
|
|
@@ -10194,13 +10347,18 @@ var ProjectCard = ({
|
|
|
10194
10347
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects }) })
|
|
10195
10348
|
] });
|
|
10196
10349
|
};
|
|
10197
|
-
var
|
|
10350
|
+
var MODULE3 = "genesis.console";
|
|
10351
|
+
var timeAgo = (timestamp, language) => dateFns.formatDistanceToNow(timestamp, {
|
|
10352
|
+
addSuffix: true,
|
|
10353
|
+
locale: language === "de" ? de.de : void 0
|
|
10354
|
+
});
|
|
10355
|
+
var getLastUpdatedLabel = (group, t, language) => {
|
|
10198
10356
|
const timestamp = getLatestProjectUpdate(group);
|
|
10199
|
-
return timestamp === 0 ? "
|
|
10357
|
+
return timestamp === 0 ? t("PROJECT_LIST.UNKNOWN") : timeAgo(timestamp, language);
|
|
10200
10358
|
};
|
|
10201
|
-
var getLastUpdatedCellLabel = (group) => {
|
|
10359
|
+
var getLastUpdatedCellLabel = (group, t, language) => {
|
|
10202
10360
|
const timestamp = getLatestProjectUpdate(group);
|
|
10203
|
-
return timestamp === 0 ? "
|
|
10361
|
+
return timestamp === 0 ? t("PROJECT_LIST.NOT_UPDATED_YET") : t("PROJECT_LIST.UPDATED", { time: timeAgo(timestamp, language) });
|
|
10204
10362
|
};
|
|
10205
10363
|
var CARD_RADIUS = "0.75rem";
|
|
10206
10364
|
var ROW_SPACING = "0 0.5rem";
|
|
@@ -10214,11 +10372,15 @@ var cardCorners = {
|
|
|
10214
10372
|
borderBottomRightRadius: CARD_RADIUS
|
|
10215
10373
|
}
|
|
10216
10374
|
};
|
|
10217
|
-
var SharedStatus = ({ isShared }) =>
|
|
10218
|
-
|
|
10219
|
-
"
|
|
10220
|
-
|
|
10375
|
+
var SharedStatus = ({ isShared }) => {
|
|
10376
|
+
const { t } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10377
|
+
return isShared ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", className: "flex w-fit items-center gap-1", children: [
|
|
10378
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
|
|
10379
|
+
t("PROJECT_LIST.SHARED")
|
|
10380
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10381
|
+
};
|
|
10221
10382
|
var AddProjectListAction = ({ mobile = false }) => {
|
|
10383
|
+
const { t } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10222
10384
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
10223
10385
|
const action = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10224
10386
|
Button,
|
|
@@ -10230,7 +10392,7 @@ var AddProjectListAction = ({ mobile = false }) => {
|
|
|
10230
10392
|
onClick: handleClick,
|
|
10231
10393
|
children: [
|
|
10232
10394
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" }),
|
|
10233
|
-
"
|
|
10395
|
+
t("PROJECT_LIST.ADD_PROJECT")
|
|
10234
10396
|
]
|
|
10235
10397
|
}
|
|
10236
10398
|
);
|
|
@@ -10257,46 +10419,49 @@ var AddProjectListAction = ({ mobile = false }) => {
|
|
|
10257
10419
|
var ProjectMobileList = ({
|
|
10258
10420
|
projectGroups,
|
|
10259
10421
|
showAddProject
|
|
10260
|
-
}) =>
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
/* @__PURE__ */ jsxRuntime.
|
|
10422
|
+
}) => {
|
|
10423
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10424
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", "data-testid": "project-list-mobile", children: [
|
|
10425
|
+
showAddProject && /* @__PURE__ */ jsxRuntime.jsx(AddProjectListAction, { mobile: true }),
|
|
10426
|
+
projectGroups.map((group) => {
|
|
10427
|
+
const project = group.projects[0];
|
|
10428
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10429
|
+
Card,
|
|
10430
|
+
{
|
|
10431
|
+
"data-testid": "project-list-row",
|
|
10432
|
+
className: "border-border/60 space-y-3 rounded-xl border p-4 shadow-sm",
|
|
10433
|
+
children: [
|
|
10434
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10435
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-2", children: [
|
|
10436
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "break-all text-base", children: getProjectGroupName(group) || t("PROJECT_LIST.UNNAMED_PROJECT") }),
|
|
10437
|
+
/* @__PURE__ */ jsxRuntime.jsx(SharedStatus, { isShared: group.isShared })
|
|
10438
|
+
] }),
|
|
10439
|
+
project && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10440
|
+
ProjectActionButton,
|
|
10441
|
+
{
|
|
10442
|
+
project,
|
|
10443
|
+
isShared: group.isShared,
|
|
10444
|
+
canOpen: canOpenProject(group)
|
|
10445
|
+
}
|
|
10446
|
+
)
|
|
10274
10447
|
] }),
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
"Last updated ",
|
|
10287
|
-
getLastUpdatedLabel(group)
|
|
10288
|
-
] })
|
|
10289
|
-
]
|
|
10290
|
-
},
|
|
10291
|
-
group.tenantGroupId
|
|
10292
|
-
);
|
|
10293
|
-
})
|
|
10294
|
-
] });
|
|
10448
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects: group.projects }),
|
|
10449
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs", children: t("PROJECT_LIST.LAST_UPDATED", {
|
|
10450
|
+
time: getLastUpdatedLabel(group, t, language)
|
|
10451
|
+
}) })
|
|
10452
|
+
]
|
|
10453
|
+
},
|
|
10454
|
+
group.tenantGroupId
|
|
10455
|
+
);
|
|
10456
|
+
})
|
|
10457
|
+
] });
|
|
10458
|
+
};
|
|
10295
10459
|
var ProjectList = ({
|
|
10296
10460
|
projectGroups,
|
|
10297
10461
|
showAddProject
|
|
10298
10462
|
}) => {
|
|
10299
10463
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
10464
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10300
10465
|
if (isMobile) {
|
|
10301
10466
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10302
10467
|
ProjectMobileList,
|
|
@@ -10326,12 +10491,12 @@ var ProjectList = ({
|
|
|
10326
10491
|
{
|
|
10327
10492
|
className: "bg-card max-w-64 break-all py-2 font-medium",
|
|
10328
10493
|
style: cardCorners.left,
|
|
10329
|
-
children: getProjectGroupName(group) || "
|
|
10494
|
+
children: getProjectGroupName(group) || t("PROJECT_LIST.UNNAMED_PROJECT")
|
|
10330
10495
|
}
|
|
10331
10496
|
),
|
|
10332
10497
|
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card py-2", children: /* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects: group.projects }) }),
|
|
10333
10498
|
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card py-2", children: /* @__PURE__ */ jsxRuntime.jsx(SharedStatus, { isShared: group.isShared }) }),
|
|
10334
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card whitespace-nowrap py-2 text-muted-foreground", children: getLastUpdatedCellLabel(group) }),
|
|
10499
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card whitespace-nowrap py-2 text-muted-foreground", children: getLastUpdatedCellLabel(group, t, language) }),
|
|
10335
10500
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10336
10501
|
TableCell,
|
|
10337
10502
|
{
|
|
@@ -10362,7 +10527,8 @@ function MultiSelect2({
|
|
|
10362
10527
|
onChange,
|
|
10363
10528
|
value: selectedValues
|
|
10364
10529
|
}) {
|
|
10365
|
-
const
|
|
10530
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10531
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
10366
10532
|
const onSelectHandler = (value) => {
|
|
10367
10533
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
10368
10534
|
onChange(nextValues);
|
|
@@ -10393,15 +10559,14 @@ function MultiSelect2({
|
|
|
10393
10559
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
10394
10560
|
}
|
|
10395
10561
|
),
|
|
10396
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.
|
|
10562
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10397
10563
|
Badge,
|
|
10398
10564
|
{
|
|
10399
10565
|
variant: "outline",
|
|
10400
10566
|
className: "rounded-sm px-1 font-normal",
|
|
10401
|
-
children:
|
|
10402
|
-
selectedValues.length
|
|
10403
|
-
|
|
10404
|
-
]
|
|
10567
|
+
children: t("MULTI_SELECT.SELECTED_COUNT", {
|
|
10568
|
+
count: selectedValues.length
|
|
10569
|
+
})
|
|
10405
10570
|
}
|
|
10406
10571
|
) : options.filter((option) => selectedValues.includes(option.value)).map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10407
10572
|
Badge,
|
|
@@ -10425,7 +10590,7 @@ function MultiSelect2({
|
|
|
10425
10590
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
10426
10591
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: label }),
|
|
10427
10592
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
10428
|
-
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "
|
|
10593
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: t("MULTI_SELECT.NO_RESULTS") }),
|
|
10429
10594
|
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: options.map((option) => {
|
|
10430
10595
|
const isSelected = selectedValues.includes(option.value);
|
|
10431
10596
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10456,7 +10621,7 @@ function MultiSelect2({
|
|
|
10456
10621
|
{
|
|
10457
10622
|
onSelect: () => onResetHandler(),
|
|
10458
10623
|
className: "justify-center text-center",
|
|
10459
|
-
children: "
|
|
10624
|
+
children: t("common:CLEAR")
|
|
10460
10625
|
}
|
|
10461
10626
|
) })
|
|
10462
10627
|
] })
|
|
@@ -10467,6 +10632,7 @@ function MultiSelect2({
|
|
|
10467
10632
|
] });
|
|
10468
10633
|
}
|
|
10469
10634
|
var ResetButton = ({ onClick }) => {
|
|
10635
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10470
10636
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10471
10637
|
Button,
|
|
10472
10638
|
{
|
|
@@ -10475,7 +10641,7 @@ var ResetButton = ({ onClick }) => {
|
|
|
10475
10641
|
onClick,
|
|
10476
10642
|
className: "h-8 rounded-md px-2 lg:px-3",
|
|
10477
10643
|
children: [
|
|
10478
|
-
"
|
|
10644
|
+
t("common:RESET"),
|
|
10479
10645
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ml-2 h-4 w-4" })
|
|
10480
10646
|
]
|
|
10481
10647
|
}
|
|
@@ -10483,17 +10649,18 @@ var ResetButton = ({ onClick }) => {
|
|
|
10483
10649
|
};
|
|
10484
10650
|
var SearchInput = ({
|
|
10485
10651
|
onChange,
|
|
10486
|
-
placeholder
|
|
10652
|
+
placeholder,
|
|
10487
10653
|
value,
|
|
10488
10654
|
className = ""
|
|
10489
10655
|
}) => {
|
|
10656
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10490
10657
|
const [state, setState] = React8.useState(value);
|
|
10491
10658
|
const inputRef = React8.useRef(null);
|
|
10492
10659
|
React8.useEffect(() => {
|
|
10493
10660
|
setState(value);
|
|
10494
10661
|
}, [value]);
|
|
10495
10662
|
const debounced = React8.useRef(
|
|
10496
|
-
|
|
10663
|
+
chunkAIUUCMAI_cjs.debounce((val) => {
|
|
10497
10664
|
onChange(val);
|
|
10498
10665
|
}, 300)
|
|
10499
10666
|
).current;
|
|
@@ -10518,7 +10685,7 @@ var SearchInput = ({
|
|
|
10518
10685
|
Input,
|
|
10519
10686
|
{
|
|
10520
10687
|
ref: inputRef,
|
|
10521
|
-
placeholder,
|
|
10688
|
+
placeholder: placeholder ?? t("SEARCH_INPUT.PLACEHOLDER"),
|
|
10522
10689
|
value: state,
|
|
10523
10690
|
onChange: handleChange,
|
|
10524
10691
|
className: chunkYAF2X7W5_cjs.cn(
|
|
@@ -10552,12 +10719,13 @@ var ProjectToolbar = ({
|
|
|
10552
10719
|
searchText,
|
|
10553
10720
|
viewMode
|
|
10554
10721
|
}) => {
|
|
10722
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10555
10723
|
const hasActiveFilters = searchText.trim().length > 0 || environmentFilter.length > 0;
|
|
10556
10724
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10557
10725
|
"div",
|
|
10558
10726
|
{
|
|
10559
10727
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
10560
|
-
"aria-label": "
|
|
10728
|
+
"aria-label": t("PROJECT_TOOLBAR.FILTERS_ARIA"),
|
|
10561
10729
|
children: [
|
|
10562
10730
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
10563
10731
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10565,13 +10733,13 @@ var ProjectToolbar = ({
|
|
|
10565
10733
|
{
|
|
10566
10734
|
value: searchText,
|
|
10567
10735
|
onChange: onSearchTextChange,
|
|
10568
|
-
placeholder: "
|
|
10736
|
+
placeholder: t("PROJECT_TOOLBAR.SEARCH_PLACEHOLDER")
|
|
10569
10737
|
}
|
|
10570
10738
|
),
|
|
10571
10739
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10572
10740
|
MultiSelect2,
|
|
10573
10741
|
{
|
|
10574
|
-
label: "
|
|
10742
|
+
label: t("PROJECT_TOOLBAR.ENVIRONMENT"),
|
|
10575
10743
|
options: availableEnvironmentOptions,
|
|
10576
10744
|
value: environmentFilter,
|
|
10577
10745
|
onChange: onEnvironmentFilterChange
|
|
@@ -10589,14 +10757,14 @@ var ProjectToolbar = ({
|
|
|
10589
10757
|
onValueChange: (value) => {
|
|
10590
10758
|
if (value === "grid" || value === "list") onViewModeChange(value);
|
|
10591
10759
|
},
|
|
10592
|
-
"aria-label": "
|
|
10760
|
+
"aria-label": t("PROJECT_TOOLBAR.VIEW_ARIA"),
|
|
10593
10761
|
className: "h-8 rounded-md border bg-background p-0.5",
|
|
10594
10762
|
children: [
|
|
10595
10763
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10596
10764
|
ToggleGroupItem,
|
|
10597
10765
|
{
|
|
10598
10766
|
value: "grid",
|
|
10599
|
-
"aria-label": "
|
|
10767
|
+
"aria-label": t("PROJECT_TOOLBAR.GRID_VIEW"),
|
|
10600
10768
|
className: "h-7 w-7 min-w-0 border-0 px-0",
|
|
10601
10769
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "h-4 w-4" })
|
|
10602
10770
|
}
|
|
@@ -10605,7 +10773,7 @@ var ProjectToolbar = ({
|
|
|
10605
10773
|
ToggleGroupItem,
|
|
10606
10774
|
{
|
|
10607
10775
|
value: "list",
|
|
10608
|
-
"aria-label": "
|
|
10776
|
+
"aria-label": t("PROJECT_TOOLBAR.LIST_VIEW"),
|
|
10609
10777
|
className: "h-7 w-7 min-w-0 border-0 px-0",
|
|
10610
10778
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "h-4 w-4" })
|
|
10611
10779
|
}
|
|
@@ -10621,7 +10789,7 @@ var DEFAULT_SORT = {
|
|
|
10621
10789
|
property: "lastUpdatedDate",
|
|
10622
10790
|
isDescending: true
|
|
10623
10791
|
};
|
|
10624
|
-
var projectViewStorage =
|
|
10792
|
+
var projectViewStorage = chunkAIUUCMAI_cjs.createStorage("local", { prefix: "console" });
|
|
10625
10793
|
var VIEW_MODE_KEY = "projectsViewMode";
|
|
10626
10794
|
var readViewMode = () => {
|
|
10627
10795
|
const storedValue = projectViewStorage.get(VIEW_MODE_KEY);
|
|
@@ -10643,7 +10811,7 @@ var useProjectListState = (projectGroups) => {
|
|
|
10643
10811
|
})),
|
|
10644
10812
|
[projectGroups]
|
|
10645
10813
|
);
|
|
10646
|
-
const searchedGroups =
|
|
10814
|
+
const searchedGroups = chunkVLZJP6FH_cjs.useDebouncedFuseFilter(
|
|
10647
10815
|
searchableGroups,
|
|
10648
10816
|
searchText,
|
|
10649
10817
|
SEARCH_OPTIONS
|
|
@@ -10713,7 +10881,8 @@ var SelfProjectLoading = ({ viewMode }) => {
|
|
|
10713
10881
|
) });
|
|
10714
10882
|
};
|
|
10715
10883
|
var SelfProject = ({ canCreateProject = false }) => {
|
|
10716
|
-
const {
|
|
10884
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10885
|
+
const { data, isLoading } = chunkVLZJP6FH_cjs.useGetProjects({ enabled: true });
|
|
10717
10886
|
const isPending = isLoading;
|
|
10718
10887
|
const projectGroups = data || [];
|
|
10719
10888
|
const {
|
|
@@ -10779,10 +10948,10 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10779
10948
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
10780
10949
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-3", children: [
|
|
10781
10950
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
10782
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "shrink-0 text-base font-semibold text-[hsl(var(--high-emphasis))]", children: "
|
|
10951
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "shrink-0 text-base font-semibold text-[hsl(var(--high-emphasis))]", children: t("SELF_PROJECT.YOUR_PROJECTS") }),
|
|
10783
10952
|
isPending ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-8 rounded-full" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary/10 text-primary shrink-0 rounded-full px-2 py-0.5 text-xs font-semibold", children: projectGroups.length })
|
|
10784
10953
|
] }),
|
|
10785
|
-
!isPending && canCreateProject && hasReachedProjectLimit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[hsl(var(--medium-emphasis))]", children: "
|
|
10954
|
+
!isPending && canCreateProject && hasReachedProjectLimit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[hsl(var(--medium-emphasis))]", children: t("SELF_PROJECT.DELETE_TO_CREATE") })
|
|
10786
10955
|
] }),
|
|
10787
10956
|
(isPending || projectGroups.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10788
10957
|
ProjectToolbar,
|
|
@@ -10799,7 +10968,7 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10799
10968
|
),
|
|
10800
10969
|
projectsContent,
|
|
10801
10970
|
hasNoMatches && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed px-6 py-10 text-center", children: [
|
|
10802
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-muted-foreground", children: searchText.trim() ? "
|
|
10971
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-muted-foreground", children: searchText.trim() ? t("SELF_PROJECT.NO_SEARCH_MATCH") : t("SELF_PROJECT.NO_FILTER_MATCH") }),
|
|
10803
10972
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10804
10973
|
Button,
|
|
10805
10974
|
{
|
|
@@ -10810,14 +10979,15 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10810
10979
|
if (searchText.trim()) setSearchText("");
|
|
10811
10980
|
else setEnvironmentFilter([]);
|
|
10812
10981
|
},
|
|
10813
|
-
children: searchText.trim() ? "
|
|
10982
|
+
children: searchText.trim() ? t("SELF_PROJECT.CLEAR_SEARCH") : t("SELF_PROJECT.CLEAR_FILTERS")
|
|
10814
10983
|
}
|
|
10815
10984
|
)
|
|
10816
10985
|
] })
|
|
10817
10986
|
] });
|
|
10818
10987
|
};
|
|
10819
10988
|
var ConsolePage = ({ canCreateProject = false }) => {
|
|
10820
|
-
const {
|
|
10989
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10990
|
+
const { resetSelectedProject, resetTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10821
10991
|
React8.useEffect(() => {
|
|
10822
10992
|
resetSelectedProject();
|
|
10823
10993
|
resetTenantGroup();
|
|
@@ -10828,7 +10998,7 @@ var ConsolePage = ({ canCreateProject = false }) => {
|
|
|
10828
10998
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-1 flex-col gap-12 px-6 py-10 sm:px-10 xl:px-[154px]", children: [
|
|
10829
10999
|
/* @__PURE__ */ jsxRuntime.jsx(SelfProject, { canCreateProject }),
|
|
10830
11000
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
10831
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary/10 text-primary inline-flex items-center rounded-full px-2.5 py-1 text-xs font-semibold tracking-wide", children: "
|
|
11001
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary/10 text-primary inline-flex items-center rounded-full px-2.5 py-1 text-xs font-semibold tracking-wide", children: t("CONSOLE_PAGE.RESOURCES") }) }),
|
|
10832
11002
|
/* @__PURE__ */ jsxRuntime.jsx(DefaultDoc, {})
|
|
10833
11003
|
] })
|
|
10834
11004
|
] })
|
|
@@ -10840,7 +11010,7 @@ var announceNewSession = async () => {
|
|
|
10840
11010
|
let timer;
|
|
10841
11011
|
try {
|
|
10842
11012
|
const status = await Promise.race([
|
|
10843
|
-
|
|
11013
|
+
chunkVLZJP6FH_cjs.impersonationService.impersonationStatus({ skipSessionCheck: true }),
|
|
10844
11014
|
new Promise((_, reject) => {
|
|
10845
11015
|
timer = setTimeout(
|
|
10846
11016
|
() => reject(new Error("Impersonation status timed out")),
|
|
@@ -10849,7 +11019,7 @@ var announceNewSession = async () => {
|
|
|
10849
11019
|
})
|
|
10850
11020
|
]);
|
|
10851
11021
|
const tenantId = status.impersonated ? status.impersonatedTenantId : rootTenantId;
|
|
10852
|
-
if (tenantId)
|
|
11022
|
+
if (tenantId) chunkIPMRZNNS_cjs.claimTenant(tenantId);
|
|
10853
11023
|
} catch {
|
|
10854
11024
|
} finally {
|
|
10855
11025
|
clearTimeout(timer);
|
|
@@ -10868,7 +11038,7 @@ var toSafeAppPath = (value) => {
|
|
|
10868
11038
|
var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
10869
11039
|
const [searchParams] = reactRouter.useSearchParams();
|
|
10870
11040
|
const hasProcessed = React8.useRef(false);
|
|
10871
|
-
const { setAuthenticated } =
|
|
11041
|
+
const { setAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
10872
11042
|
const code = searchParams.get("code");
|
|
10873
11043
|
const state = searchParams.get("state");
|
|
10874
11044
|
const forwardTo = searchParams.get("forwardedTo");
|
|
@@ -10904,18 +11074,19 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
10904
11074
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { className: "h-12 w-12 animate-spin text-gray-500" }) });
|
|
10905
11075
|
};
|
|
10906
11076
|
function ProfilePage() {
|
|
10907
|
-
const {
|
|
10908
|
-
|
|
10909
|
-
|
|
11077
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.profile");
|
|
11078
|
+
const { isLoading, error } = chunkVLZJP6FH_cjs.useInitiateRedirect({
|
|
11079
|
+
clientId: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
|
|
11080
|
+
redirectUri: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
|
|
10910
11081
|
forwardedTo: "/app/profile"
|
|
10911
11082
|
});
|
|
10912
11083
|
if (error)
|
|
10913
11084
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
10914
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-medium text-destructive", children: "
|
|
10915
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "
|
|
11085
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-medium text-destructive", children: t("PROFILE_PAGE.REDIRECT_FAILED") }),
|
|
11086
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: t("PROFILE_PAGE.CHECK_CONSOLE") })
|
|
10916
11087
|
] }) });
|
|
10917
11088
|
if (isLoading)
|
|
10918
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "
|
|
11089
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: t("PROFILE_PAGE.REDIRECTING") }) });
|
|
10919
11090
|
return null;
|
|
10920
11091
|
}
|
|
10921
11092
|
|
|
@@ -10923,7 +11094,7 @@ function ProfilePage() {
|
|
|
10923
11094
|
var METHODS_WITH_BODY = ["POST", "PUT", "PATCH"];
|
|
10924
11095
|
var buildCurlCommand = (endpoint, xBlocksKey) => {
|
|
10925
11096
|
const method = endpoint.method ?? "GET";
|
|
10926
|
-
const headerValue = xBlocksKey ||
|
|
11097
|
+
const headerValue = xBlocksKey || chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_X_BLOCKS_KEY");
|
|
10927
11098
|
const lines = [
|
|
10928
11099
|
`curl -X ${method} '${endpoint.path}'`,
|
|
10929
11100
|
` -H 'X-Blocks-Key: ${headerValue}'`
|
|
@@ -10958,6 +11129,7 @@ var CoreApiEndpointRow = ({
|
|
|
10958
11129
|
endpoint,
|
|
10959
11130
|
xBlocksKey
|
|
10960
11131
|
}) => {
|
|
11132
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.dashboard");
|
|
10961
11133
|
const curlCommand = buildCurlCommand(endpoint, xBlocksKey);
|
|
10962
11134
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 rounded-md border border-border-default px-3 py-2 sm:flex-row sm:items-center sm:gap-3", children: [
|
|
10963
11135
|
endpoint.method && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10976,7 +11148,7 @@ var CoreApiEndpointRow = ({
|
|
|
10976
11148
|
] }),
|
|
10977
11149
|
/* @__PURE__ */ jsxRuntime.jsx(CopyToClipboardButton, { textToCopy: curlCommand, isHoverable: true, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex shrink-0 items-center gap-1 whitespace-nowrap text-xs text-muted-foreground", children: [
|
|
10978
11150
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Terminal, { className: "h-3.5 w-3.5" }),
|
|
10979
|
-
"
|
|
11151
|
+
t("CORE_API_ENDPOINT_ROW.COPY_CURL")
|
|
10980
11152
|
] }) })
|
|
10981
11153
|
] });
|
|
10982
11154
|
};
|
|
@@ -11043,30 +11215,27 @@ var CoreApiLoadingSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { clas
|
|
|
11043
11215
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5 border-t border-border px-2 py-2 sm:px-4 sm:py-3", children: ["sk-1", "sk-2", "sk-3", "sk-4"].map((itemKey) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-10 w-full" }, itemKey)) })
|
|
11044
11216
|
] });
|
|
11045
11217
|
var CoreApiCard = ({
|
|
11046
|
-
title
|
|
11047
|
-
description
|
|
11218
|
+
title,
|
|
11219
|
+
description,
|
|
11048
11220
|
endpoints,
|
|
11049
11221
|
xBlocksKey,
|
|
11050
11222
|
isLoading,
|
|
11051
11223
|
error
|
|
11052
11224
|
}) => {
|
|
11225
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.dashboard");
|
|
11053
11226
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(CoreApiLoadingSkeleton, {});
|
|
11054
11227
|
const groups = groupEndpointsByTag(endpoints);
|
|
11055
11228
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11056
11229
|
DashboardSectionCard,
|
|
11057
11230
|
{
|
|
11058
|
-
title,
|
|
11059
|
-
description,
|
|
11231
|
+
title: title ?? t("CORE_API_CARD.TITLE"),
|
|
11232
|
+
description: description ?? t("CORE_API_CARD.DESCRIPTION"),
|
|
11060
11233
|
contentClassName: "flex flex-col gap-2",
|
|
11061
11234
|
headerRight: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11062
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11063
|
-
endpoints.length,
|
|
11064
|
-
" Endpoint",
|
|
11065
|
-
endpoints.length !== 1 ? "s" : ""
|
|
11066
|
-
] }),
|
|
11235
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "hidden rounded-full bg-primary/10 font-mono text-xs text-primary pointer-events-none sm:flex", children: t("CORE_API_CARD.ENDPOINTS", { count: endpoints.length }) }),
|
|
11067
11236
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-mono font-medium text-primary pointer-events-none sm:hidden", children: endpoints.length })
|
|
11068
11237
|
] }),
|
|
11069
|
-
children: groups.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-3 text-center text-sm text-muted-foreground", children: error ? "
|
|
11238
|
+
children: groups.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-3 text-center text-sm text-muted-foreground", children: error ? t("CORE_API_CARD.LOAD_ERROR") : t("CORE_API_CARD.EMPTY") }) : groups.map((group) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11070
11239
|
CoreApiGroupSection,
|
|
11071
11240
|
{
|
|
11072
11241
|
tag: group.tag,
|
|
@@ -11088,7 +11257,7 @@ var trimTrailingSlashes = (value) => {
|
|
|
11088
11257
|
};
|
|
11089
11258
|
var resolveBaseUrl = (swagger, swaggerUrl, explicitBaseUrl) => {
|
|
11090
11259
|
if (explicitBaseUrl) {
|
|
11091
|
-
return trimTrailingSlashes(
|
|
11260
|
+
return trimTrailingSlashes(chunkTSRDXJUG_cjs.getRuntimeEnv(explicitBaseUrl));
|
|
11092
11261
|
}
|
|
11093
11262
|
if (swagger.servers?.[0]?.url) {
|
|
11094
11263
|
return trimTrailingSlashes(swagger.servers[0].url);
|
|
@@ -11143,8 +11312,8 @@ var useSwaggerEndpoints = (serviceName, {
|
|
|
11143
11312
|
enabled = true,
|
|
11144
11313
|
staleTime = 5 * 60 * 1e3
|
|
11145
11314
|
} = {}) => {
|
|
11146
|
-
const baseUrl = serviceName ?
|
|
11147
|
-
const swaggerUrl = serviceName ?
|
|
11315
|
+
const baseUrl = serviceName ? chunkAIUUCMAI_cjs.getServiceBaseUrl(serviceName) : void 0;
|
|
11316
|
+
const swaggerUrl = serviceName ? chunkAIUUCMAI_cjs.getServiceSwaggerUrl(serviceName) : void 0;
|
|
11148
11317
|
const { data, isLoading, isError, error } = reactQuery.useQuery({
|
|
11149
11318
|
queryKey: ["swagger-endpoints", swaggerUrl],
|
|
11150
11319
|
queryFn: () => {
|
|
@@ -11163,27 +11332,30 @@ var ConfirmationModal = ({
|
|
|
11163
11332
|
data,
|
|
11164
11333
|
onConfirm,
|
|
11165
11334
|
buttonState
|
|
11166
|
-
}) =>
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11174
|
-
Button,
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11335
|
+
}) => {
|
|
11336
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11337
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "mr-4 w-full max-w-[425px] rounded-md", children: [
|
|
11338
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11339
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left text-lg font-semibold leading-7", children: data.dialogTitle }),
|
|
11340
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "mb-6 mt-2 wrap-break-word text-left text-sm font-normal leading-5 text-medium-emphasis", children: data.dialogSubtitle })
|
|
11341
|
+
] }),
|
|
11342
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "mt-4 flex flex-row gap-2", children: [
|
|
11343
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", children: data.cancelButton || t("common:CANCEL") }) }),
|
|
11344
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11345
|
+
Button,
|
|
11346
|
+
{
|
|
11347
|
+
size: "sm",
|
|
11348
|
+
onClick: onConfirm,
|
|
11349
|
+
disabled: buttonState?.confirm.disable,
|
|
11350
|
+
children: data.confirmButton || t("common:YES")
|
|
11351
|
+
}
|
|
11352
|
+
)
|
|
11353
|
+
] })
|
|
11354
|
+
] });
|
|
11355
|
+
};
|
|
11184
11356
|
var DashboardOverview = () => {
|
|
11185
|
-
const { name } =
|
|
11186
|
-
const { data, isFetching } =
|
|
11357
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
11358
|
+
const { data, isFetching } = chunkVLZJP6FH_cjs.useGetProject();
|
|
11187
11359
|
const {
|
|
11188
11360
|
endpoints,
|
|
11189
11361
|
isLoading: isLoadingEndpoints,
|
|
@@ -11218,22 +11390,23 @@ var ProjectDetail = ({
|
|
|
11218
11390
|
project,
|
|
11219
11391
|
isLoading
|
|
11220
11392
|
}) => {
|
|
11393
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11221
11394
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
|
|
11222
11395
|
if (!project)
|
|
11223
11396
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11224
11397
|
ErrorDisplayWithCard,
|
|
11225
11398
|
{
|
|
11226
|
-
text: "
|
|
11399
|
+
text: t("PROJECT_DETAIL.ERROR"),
|
|
11227
11400
|
containerClassName: "min-h-[20dvh]"
|
|
11228
11401
|
}
|
|
11229
11402
|
);
|
|
11230
11403
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11231
11404
|
DashboardSectionCard,
|
|
11232
11405
|
{
|
|
11233
|
-
title: "
|
|
11234
|
-
description: "
|
|
11406
|
+
title: t("PROJECT_DETAIL.TITLE"),
|
|
11407
|
+
description: t("PROJECT_DETAIL.DESCRIPTION"),
|
|
11235
11408
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6", children: [
|
|
11236
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11409
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("common:NAME"), children: project?.name }),
|
|
11237
11410
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "X-Blocks-Key", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11238
11411
|
CopyToClipboardButton,
|
|
11239
11412
|
{
|
|
@@ -11250,7 +11423,7 @@ var ProjectDetail = ({
|
|
|
11250
11423
|
)
|
|
11251
11424
|
}
|
|
11252
11425
|
) }) }),
|
|
11253
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11426
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.ENVIRONMENT"), children: project?.environment === "prod" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "h-6 rounded-xl", size: "sm", variant: "default", children: t("ENVIRONMENT_OPTIONS.PROD_LABEL") }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11254
11427
|
Button,
|
|
11255
11428
|
{
|
|
11256
11429
|
className: "h-6 rounded-xl bg-blocks-btn-secondary hover:bg-blocks-btn-secondary/80",
|
|
@@ -11261,8 +11434,8 @@ var ProjectDetail = ({
|
|
|
11261
11434
|
)?.label
|
|
11262
11435
|
}
|
|
11263
11436
|
) }),
|
|
11264
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11265
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11437
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.LAST_UPDATED"), children: project?.lastUpdatedDate && chunkAIUUCMAI_cjs.formatFullDate(new Date(project.lastUpdatedDate)) }),
|
|
11438
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.CREATED"), children: project?.createdDate && chunkAIUUCMAI_cjs.formatFullDate(new Date(project.createdDate)) })
|
|
11266
11439
|
] })
|
|
11267
11440
|
}
|
|
11268
11441
|
);
|
|
@@ -11275,13 +11448,14 @@ function ProjectList2({
|
|
|
11275
11448
|
redirectPaths,
|
|
11276
11449
|
collapsed = false
|
|
11277
11450
|
}) {
|
|
11451
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11278
11452
|
const navigate = reactRouter.useNavigate();
|
|
11279
11453
|
const { pathname } = reactRouter.useLocation();
|
|
11280
|
-
const { data: projectGroups = [], isLoading } =
|
|
11454
|
+
const { data: projectGroups = [], isLoading } = chunkVLZJP6FH_cjs.useGetProjects({
|
|
11281
11455
|
enabled: true
|
|
11282
11456
|
});
|
|
11283
|
-
const { selectedProject, setSelectedProject } =
|
|
11284
|
-
const { data: projectData } =
|
|
11457
|
+
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11458
|
+
const { data: projectData } = chunkVLZJP6FH_cjs.useGetProject();
|
|
11285
11459
|
const pendingProjectRef = React8.useRef(null);
|
|
11286
11460
|
const redirectRegexMap = React8.useMemo(
|
|
11287
11461
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -11321,7 +11495,7 @@ function ProjectList2({
|
|
|
11321
11495
|
className: "group relative flex h-10 w-full items-center justify-center rounded-lg",
|
|
11322
11496
|
children: [
|
|
11323
11497
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "h-5 w-5 text-muted-foreground" }),
|
|
11324
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute left-full top-0 z-20 ml-2 min-w-max whitespace-nowrap rounded bg-gray-300 px-2 py-1 text-xs text-primary opacity-0 transition-opacity group-hover:opacity-100", children: name || "
|
|
11498
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute left-full top-0 z-20 ml-2 min-w-max whitespace-nowrap rounded bg-gray-300 px-2 py-1 text-xs text-primary opacity-0 transition-opacity group-hover:opacity-100", children: name || t("PROJECT_LIST.SELECT_PROJECT") })
|
|
11325
11499
|
]
|
|
11326
11500
|
}
|
|
11327
11501
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11332,8 +11506,8 @@ function ProjectList2({
|
|
|
11332
11506
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
11333
11507
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
11334
11508
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
11335
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: "
|
|
11336
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "break-all text-sm font-medium leading-tight", children: name || "
|
|
11509
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: t("PROJECT_LIST.PROJECT") }),
|
|
11510
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "break-all text-sm font-medium leading-tight", children: name || t("PROJECT_LIST.SELECT_PROJECT") })
|
|
11337
11511
|
] })
|
|
11338
11512
|
] })
|
|
11339
11513
|
}
|
|
@@ -11346,7 +11520,7 @@ function ProjectList2({
|
|
|
11346
11520
|
sideOffset: collapsed ? 8 : 4,
|
|
11347
11521
|
className: collapsed ? "min-w-48" : "w-[--radix-dropdown-menu-trigger-width]",
|
|
11348
11522
|
children: [
|
|
11349
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "
|
|
11523
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: t("PROJECT_LIST.YOUR_PROJECTS") }),
|
|
11350
11524
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center py-1", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { size: 16, className: "animate-spin text-gray-400" }) }) }) : projects?.filter((project) => project?.itemId !== selectedProject?.itemId).slice(0, 5).map((project) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11351
11525
|
DropdownMenuItem,
|
|
11352
11526
|
{
|
|
@@ -11356,14 +11530,16 @@ function ProjectList2({
|
|
|
11356
11530
|
project?.itemId
|
|
11357
11531
|
)),
|
|
11358
11532
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
11359
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: "
|
|
11533
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: t("PROJECT_LIST.OVERVIEW_UNAVAILABLE") })
|
|
11360
11534
|
]
|
|
11361
11535
|
}
|
|
11362
11536
|
)
|
|
11363
11537
|
] });
|
|
11364
11538
|
}
|
|
11365
11539
|
var formSchema = zod.z.object({
|
|
11366
|
-
domain: zod.z.string().min(1,
|
|
11540
|
+
domain: zod.z.string().min(1, {
|
|
11541
|
+
error: () => chunkOPMWK5SY_cjs.tStatic("genesis.shared", "SET_CUSTOM_DOMAIN_FORM.REQUIRED")
|
|
11542
|
+
})
|
|
11367
11543
|
});
|
|
11368
11544
|
var SetCustomDomainForm = ({
|
|
11369
11545
|
defaultDomain,
|
|
@@ -11372,6 +11548,7 @@ var SetCustomDomainForm = ({
|
|
|
11372
11548
|
onSubmit,
|
|
11373
11549
|
onCancel
|
|
11374
11550
|
}) => {
|
|
11551
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11375
11552
|
const form = reactHookForm.useForm({
|
|
11376
11553
|
resolver: zod$1.zodResolver(formSchema),
|
|
11377
11554
|
defaultValues: { domain: defaultDomain }
|
|
@@ -11396,7 +11573,7 @@ var SetCustomDomainForm = ({
|
|
|
11396
11573
|
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "[&>span]:truncate [&>span]:text-left", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11397
11574
|
SelectValue,
|
|
11398
11575
|
{
|
|
11399
|
-
placeholder: verifiedDomains.length === 0 ? "
|
|
11576
|
+
placeholder: verifiedDomains.length === 0 ? t("SET_CUSTOM_DOMAIN_FORM.NO_VERIFIED") : t("SET_CUSTOM_DOMAIN_FORM.SELECT")
|
|
11400
11577
|
}
|
|
11401
11578
|
) }) }),
|
|
11402
11579
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "max-w-[calc(100vw-2rem)]", children: verifiedDomains.map((domain) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11416,8 +11593,8 @@ var SetCustomDomainForm = ({
|
|
|
11416
11593
|
}
|
|
11417
11594
|
),
|
|
11418
11595
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
|
|
11419
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onCancel, children: "
|
|
11420
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", disabled: isPending, children: "
|
|
11596
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onCancel, children: t("common:CANCEL") }),
|
|
11597
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", disabled: isPending, children: t("SET_CUSTOM_DOMAIN_FORM.SET") })
|
|
11421
11598
|
] })
|
|
11422
11599
|
] }) });
|
|
11423
11600
|
};
|
|
@@ -11430,7 +11607,8 @@ var SetCustomDomainDialog = ({
|
|
|
11430
11607
|
projectKey,
|
|
11431
11608
|
projectEnv
|
|
11432
11609
|
}) => {
|
|
11433
|
-
const {
|
|
11610
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11611
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useUpdateRepositories();
|
|
11434
11612
|
const verifiedDomains = React8.useMemo(
|
|
11435
11613
|
() => Array.from(
|
|
11436
11614
|
new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
|
|
@@ -11457,25 +11635,25 @@ var SetCustomDomainDialog = ({
|
|
|
11457
11635
|
]
|
|
11458
11636
|
});
|
|
11459
11637
|
if (res.isSuccess) {
|
|
11460
|
-
|
|
11638
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
11639
|
+
description: t("SET_CUSTOM_DOMAIN_DIALOG.UPDATED")
|
|
11640
|
+
});
|
|
11461
11641
|
onOpenChange(false);
|
|
11462
11642
|
} else {
|
|
11463
|
-
|
|
11643
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
11464
11644
|
}
|
|
11465
11645
|
} catch (error) {
|
|
11466
11646
|
if (error && typeof error === "object" && "errors" in error) {
|
|
11467
|
-
|
|
11647
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
11468
11648
|
}
|
|
11469
11649
|
}
|
|
11470
11650
|
};
|
|
11471
11651
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
|
|
11472
11652
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11473
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "
|
|
11474
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: repo?.repoName })
|
|
11478
|
-
] })
|
|
11653
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("SET_CUSTOM_DOMAIN_DIALOG.TITLE") }),
|
|
11654
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: t("SET_CUSTOM_DOMAIN_DIALOG.DESCRIPTION", {
|
|
11655
|
+
name: repo?.repoName ?? ""
|
|
11656
|
+
}) })
|
|
11479
11657
|
] }),
|
|
11480
11658
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11481
11659
|
SetCustomDomainForm,
|
|
@@ -11491,34 +11669,34 @@ var SetCustomDomainDialog = ({
|
|
|
11491
11669
|
] }) });
|
|
11492
11670
|
};
|
|
11493
11671
|
var columnHelper = reactTable.createColumnHelper();
|
|
11494
|
-
var buildColumns = (onSet) => [
|
|
11672
|
+
var buildColumns = (t, onSet) => [
|
|
11495
11673
|
columnHelper.accessor("repoName", {
|
|
11496
|
-
header: "
|
|
11674
|
+
header: t("common:NAME"),
|
|
11497
11675
|
cell: (info) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-high-emphasis", children: info.getValue() })
|
|
11498
11676
|
}),
|
|
11499
11677
|
columnHelper.accessor("defaultDeploymentUrl", {
|
|
11500
|
-
header: "
|
|
11678
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_DEPLOYMENT_DOMAIN"),
|
|
11501
11679
|
cell: (info) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-medium-emphasis", children: info.getValue() })
|
|
11502
11680
|
}),
|
|
11503
11681
|
columnHelper.accessor("customDeploymentUrl", {
|
|
11504
|
-
header: "
|
|
11682
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_CUSTOM_DOMAIN"),
|
|
11505
11683
|
cell: ({ row }) => {
|
|
11506
11684
|
const repo = row.original;
|
|
11507
|
-
return repo.customDeploymentUrl ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-medium-emphasis", children: repo.customDeploymentUrl }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "xxs", onClick: () => onSet(repo), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-2", children: "
|
|
11685
|
+
return repo.customDeploymentUrl ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-medium-emphasis", children: repo.customDeploymentUrl }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "xxs", onClick: () => onSet(repo), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-2", children: t("PROJECT_REPO_TABLE.SET") }) });
|
|
11508
11686
|
}
|
|
11509
11687
|
}),
|
|
11510
11688
|
columnHelper.display({
|
|
11511
11689
|
id: "lastDeploymentDate",
|
|
11512
|
-
header: "
|
|
11690
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_LAST_DEPLOYMENT"),
|
|
11513
11691
|
cell: ({ row }) => {
|
|
11514
11692
|
const repo = row.original;
|
|
11515
11693
|
const isDefaultDate = repo.lastDeploymentDate === "0001-01-01T00:00:00";
|
|
11516
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-medium-emphasis", children: !repo.lastDeploymentDate || isDefaultDate ? "
|
|
11694
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-medium-emphasis", children: !repo.lastDeploymentDate || isDefaultDate ? t("PROJECT_REPO_TABLE.NOT_DEPLOYED") : chunkAIUUCMAI_cjs.formatFullDate(new Date(repo.lastDeploymentDate)) });
|
|
11517
11695
|
}
|
|
11518
11696
|
}),
|
|
11519
11697
|
columnHelper.display({
|
|
11520
11698
|
id: "actions",
|
|
11521
|
-
header: "
|
|
11699
|
+
header: t("common:ACTIONS"),
|
|
11522
11700
|
cell: ({ row }) => {
|
|
11523
11701
|
const repo = row.original;
|
|
11524
11702
|
const hasCustomDomain = !!repo.customDeploymentUrl;
|
|
@@ -11527,7 +11705,7 @@ var buildColumns = (onSet) => [
|
|
|
11527
11705
|
{
|
|
11528
11706
|
variant: "ghost",
|
|
11529
11707
|
size: "icon",
|
|
11530
|
-
title: "
|
|
11708
|
+
title: t("PROJECT_REPO_TABLE.EDIT_CUSTOM_DOMAIN"),
|
|
11531
11709
|
disabled: !hasCustomDomain,
|
|
11532
11710
|
onClick: () => onSet(repo),
|
|
11533
11711
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-4 w-4 text-muted-foreground" })
|
|
@@ -11542,13 +11720,14 @@ var ProjectRepoTable = ({
|
|
|
11542
11720
|
projectKey,
|
|
11543
11721
|
projectEnv
|
|
11544
11722
|
}) => {
|
|
11723
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11545
11724
|
const [setTarget, setSetTarget] = React8.useState(null);
|
|
11546
11725
|
const [setDialogOpen, setSetDialogOpen] = React8.useState(false);
|
|
11547
11726
|
const handleSet = (repo) => {
|
|
11548
11727
|
setSetTarget(repo);
|
|
11549
11728
|
setSetDialogOpen(true);
|
|
11550
11729
|
};
|
|
11551
|
-
const columns = buildColumns(handleSet);
|
|
11730
|
+
const columns = buildColumns(t, handleSet);
|
|
11552
11731
|
const table = reactTable.useReactTable({
|
|
11553
11732
|
data,
|
|
11554
11733
|
columns,
|
|
@@ -11589,7 +11768,7 @@ var ProjectRepoTable = ({
|
|
|
11589
11768
|
{
|
|
11590
11769
|
colSpan: columns.length,
|
|
11591
11770
|
className: "py-10 text-center text-sm text-muted-foreground",
|
|
11592
|
-
children: "
|
|
11771
|
+
children: t("PROJECT_REPO_TABLE.EMPTY")
|
|
11593
11772
|
}
|
|
11594
11773
|
) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11595
11774
|
"tr",
|
|
@@ -11609,12 +11788,13 @@ var ProjectRepoList = ({
|
|
|
11609
11788
|
project,
|
|
11610
11789
|
isLoading
|
|
11611
11790
|
}) => {
|
|
11791
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11612
11792
|
const { applications } = project;
|
|
11613
11793
|
const {
|
|
11614
11794
|
data: envRepositoriesResponse,
|
|
11615
11795
|
isLoading: isLoadingEnvRepos,
|
|
11616
11796
|
isFetching: isFetchingEnvRepos
|
|
11617
|
-
} =
|
|
11797
|
+
} = chunkVLZJP6FH_cjs.useGetEnvRepositories(project?.tenantId || "");
|
|
11618
11798
|
if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
|
|
11619
11799
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 rounded-lg border bg-card px-2 py-2 shadow-sm md:mt-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid-col-1 grid gap-3 px-2 py-4 md:grid-cols-2 md:gap-4 lg:gap-6", children: ["sk-1", "sk-2", "sk-3", "sk-4", "sk-5", "sk-6"].map((itemKey) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11620
11800
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
|
|
@@ -11624,8 +11804,8 @@ var ProjectRepoList = ({
|
|
|
11624
11804
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11625
11805
|
DashboardSectionCard,
|
|
11626
11806
|
{
|
|
11627
|
-
title: "
|
|
11628
|
-
description: "
|
|
11807
|
+
title: t("PROJECT_REPO_LIST.TITLE"),
|
|
11808
|
+
description: t("PROJECT_REPO_LIST.DESCRIPTION"),
|
|
11629
11809
|
contentClassName: "p-0",
|
|
11630
11810
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11631
11811
|
ProjectRepoTable,
|
|
@@ -11644,7 +11824,7 @@ var ProjectActions = ({
|
|
|
11644
11824
|
createdBy,
|
|
11645
11825
|
isFetching = false
|
|
11646
11826
|
}) => {
|
|
11647
|
-
const { user } =
|
|
11827
|
+
const { user } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
11648
11828
|
const isOwner = createdBy === user?.sub;
|
|
11649
11829
|
if (isFetching) {
|
|
11650
11830
|
return /* @__PURE__ */ jsxRuntime.jsx(ProjectActionsSkeleton, {});
|
|
@@ -11703,7 +11883,9 @@ var ProjectOverviewSkeleton = () => {
|
|
|
11703
11883
|
] });
|
|
11704
11884
|
};
|
|
11705
11885
|
var editProjectFormSchema = zod.z.object({
|
|
11706
|
-
name: zod.z.string().min(1,
|
|
11886
|
+
name: zod.z.string().min(1, {
|
|
11887
|
+
error: () => chunkOPMWK5SY_cjs.tStatic("genesis.shared", "EDIT_PROJECT_FORM_SCHEMA.NAME_REQUIRED")
|
|
11888
|
+
})
|
|
11707
11889
|
});
|
|
11708
11890
|
var editProjectFormDefaultValues = {
|
|
11709
11891
|
name: ""
|
|
@@ -11713,8 +11895,9 @@ var EditProjectForm = ({
|
|
|
11713
11895
|
currentName,
|
|
11714
11896
|
onAfterSubmit
|
|
11715
11897
|
}) => {
|
|
11898
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11716
11899
|
const queryClient = reactQuery.useQueryClient();
|
|
11717
|
-
const { mutateAsync, isPending } =
|
|
11900
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useUpdateTenantGroup();
|
|
11718
11901
|
const form = reactHookForm.useForm({
|
|
11719
11902
|
resolver: zod$1.zodResolver(editProjectFormSchema),
|
|
11720
11903
|
defaultValues: {
|
|
@@ -11730,20 +11913,20 @@ var EditProjectForm = ({
|
|
|
11730
11913
|
tenantGroupId
|
|
11731
11914
|
});
|
|
11732
11915
|
if (res.isSuccess) {
|
|
11733
|
-
|
|
11734
|
-
title: "
|
|
11735
|
-
description: "
|
|
11916
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
11917
|
+
title: t("EDIT_PROJECT_FORM.TOAST_TITLE"),
|
|
11918
|
+
description: t("EDIT_PROJECT_FORM.TOAST_DESCRIPTION")
|
|
11736
11919
|
});
|
|
11737
11920
|
queryClient.invalidateQueries({ queryKey: ["identifier", "project"] });
|
|
11738
11921
|
queryClient.invalidateQueries({ queryKey: ["identifier", "projects"] });
|
|
11739
11922
|
form.reset();
|
|
11740
11923
|
onAfterSubmit();
|
|
11741
11924
|
} else {
|
|
11742
|
-
|
|
11925
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
11743
11926
|
}
|
|
11744
11927
|
} catch (error) {
|
|
11745
|
-
if (
|
|
11746
|
-
|
|
11928
|
+
if (chunkAIUUCMAI_cjs.isErrorWithErrors(error)) {
|
|
11929
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
11747
11930
|
}
|
|
11748
11931
|
}
|
|
11749
11932
|
};
|
|
@@ -11759,14 +11942,20 @@ var EditProjectForm = ({
|
|
|
11759
11942
|
control: form.control,
|
|
11760
11943
|
name: "name",
|
|
11761
11944
|
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: "space-y-1.5", children: [
|
|
11762
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { className: "text-sm font-medium text-medium-emphasis", children: "
|
|
11763
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11945
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { className: "text-sm font-medium text-medium-emphasis", children: t("EDIT_PROJECT_FORM.NAME_LABEL") }),
|
|
11946
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11947
|
+
Input,
|
|
11948
|
+
{
|
|
11949
|
+
...field,
|
|
11950
|
+
placeholder: t("EDIT_PROJECT_FORM.NAME_PLACEHOLDER")
|
|
11951
|
+
}
|
|
11952
|
+
) }),
|
|
11764
11953
|
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
11765
11954
|
] })
|
|
11766
11955
|
}
|
|
11767
11956
|
),
|
|
11768
11957
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "mt-2 flex flex-row justify-end gap-2", children: [
|
|
11769
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", className: "w-20", children: "
|
|
11958
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", className: "w-20", children: t("common:CANCEL") }) }),
|
|
11770
11959
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11771
11960
|
Button,
|
|
11772
11961
|
{
|
|
@@ -11774,7 +11963,7 @@ var EditProjectForm = ({
|
|
|
11774
11963
|
className: "w-20",
|
|
11775
11964
|
type: "submit",
|
|
11776
11965
|
disabled: !form.formState.isValid || isPending || !form.formState.isDirty,
|
|
11777
|
-
children: "
|
|
11966
|
+
children: t("common:SAVE")
|
|
11778
11967
|
}
|
|
11779
11968
|
)
|
|
11780
11969
|
] })
|
|
@@ -11788,10 +11977,11 @@ var EditProjectDialog = ({
|
|
|
11788
11977
|
tenantGroupId,
|
|
11789
11978
|
currentName
|
|
11790
11979
|
}) => {
|
|
11980
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11791
11981
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-md", children: [
|
|
11792
11982
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11793
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "
|
|
11794
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "
|
|
11983
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("EDIT_PROJECT_DIALOG.TITLE") }),
|
|
11984
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: t("EDIT_PROJECT_DIALOG.DESCRIPTION") })
|
|
11795
11985
|
] }),
|
|
11796
11986
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11797
11987
|
EditProjectForm,
|
|
@@ -11804,13 +11994,14 @@ var EditProjectDialog = ({
|
|
|
11804
11994
|
] }) });
|
|
11805
11995
|
};
|
|
11806
11996
|
function EditProject() {
|
|
11997
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11807
11998
|
const [openEditDialog, setOpenEditDialog] = React8.useState(false);
|
|
11808
|
-
const { selectedProject } =
|
|
11999
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11809
12000
|
const { tenantGroupId, name } = selectedProject || {};
|
|
11810
12001
|
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { open: openEditDialog, onOpenChange: setOpenEditDialog, children: [
|
|
11811
12002
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", className: "flex items-center gap-2", children: [
|
|
11812
12003
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }),
|
|
11813
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: "
|
|
12004
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: t("common:EDIT") })
|
|
11814
12005
|
] }) }),
|
|
11815
12006
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11816
12007
|
EditProjectDialog,
|
|
@@ -11850,13 +12041,14 @@ function SidebarMobileView({
|
|
|
11850
12041
|
redirectPaths,
|
|
11851
12042
|
navigationMenus
|
|
11852
12043
|
}) {
|
|
12044
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11853
12045
|
const [open, setOpen] = React8.useState(false);
|
|
11854
|
-
const { appLightLogo, appDarkLogo } =
|
|
12046
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
11855
12047
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11856
12048
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
11857
12049
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
|
|
11858
12050
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5" }),
|
|
11859
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
12051
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("SIDEBAR_MOBILE_VIEW.TOGGLE_MENU") })
|
|
11860
12052
|
] }) }),
|
|
11861
12053
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11862
12054
|
SheetContent,
|
|
@@ -11875,18 +12067,18 @@ function SidebarMobileView({
|
|
|
11875
12067
|
className: "h-9 w-auto",
|
|
11876
12068
|
lightSrc: appLightLogo,
|
|
11877
12069
|
darkSrc: appDarkLogo,
|
|
11878
|
-
alt: "
|
|
12070
|
+
alt: t("SIDEBAR.LOGO_ALT")
|
|
11879
12071
|
}
|
|
11880
12072
|
) }),
|
|
11881
12073
|
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { className: "mt-0!", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
|
|
11882
12074
|
] }) }),
|
|
11883
12075
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
11884
12076
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex w-full flex-col items-start px-6", children: [
|
|
11885
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: "
|
|
12077
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: t("SIDEBAR_MOBILE_VIEW.PROJECT") }),
|
|
11886
12078
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectList2, { redirectPaths })
|
|
11887
12079
|
] }),
|
|
11888
12080
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-3 flex w-full flex-col items-start px-6", children: [
|
|
11889
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: "
|
|
12081
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: t("SIDEBAR_MOBILE_VIEW.ENVIRONMENT") }),
|
|
11890
12082
|
/* @__PURE__ */ jsxRuntime.jsx(EnvironmentList, { redirectPaths })
|
|
11891
12083
|
] }),
|
|
11892
12084
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
@@ -11900,9 +12092,10 @@ function SidebarMenuDesktop({
|
|
|
11900
12092
|
redirectPaths,
|
|
11901
12093
|
navigationMenus
|
|
11902
12094
|
}) {
|
|
11903
|
-
const {
|
|
11904
|
-
const {
|
|
11905
|
-
const
|
|
12095
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12096
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkCTIGX76P_cjs.SidebarContext);
|
|
12097
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
12098
|
+
const icon = chunkVLZJP6FH_cjs.useIcon();
|
|
11906
12099
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11907
12100
|
const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
|
|
11908
12101
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -11928,7 +12121,7 @@ function SidebarMenuDesktop({
|
|
|
11928
12121
|
{
|
|
11929
12122
|
lightSrc: appLightLogo,
|
|
11930
12123
|
darkSrc: appDarkLogo,
|
|
11931
|
-
alt: "
|
|
12124
|
+
alt: t("SIDEBAR.LOGO_ALT"),
|
|
11932
12125
|
className: "h-full w-full object-contain"
|
|
11933
12126
|
}
|
|
11934
12127
|
),
|
|
@@ -11949,7 +12142,7 @@ function SidebarMenuDesktop({
|
|
|
11949
12142
|
) })
|
|
11950
12143
|
] }),
|
|
11951
12144
|
isSidebarOpen ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b px-2 pb-2 pt-2", children: [
|
|
11952
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 px-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: "
|
|
12145
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 px-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: t("SIDEBAR_DESKTOP_VIEW.WORKSPACE") }),
|
|
11953
12146
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
11954
12147
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectList2, { redirectPaths }),
|
|
11955
12148
|
/* @__PURE__ */ jsxRuntime.jsx(RenderConditionally, { condition: !isProjectOverviewRoute, children: /* @__PURE__ */ jsxRuntime.jsx(EnvironmentList, { redirectPaths }) })
|
|
@@ -12020,7 +12213,7 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12020
12213
|
ErrorDisplay,
|
|
12021
12214
|
{
|
|
12022
12215
|
icon: lucideReact.AlertCircle,
|
|
12023
|
-
text: this.state.error?.message ?? "
|
|
12216
|
+
text: this.state.error?.message ?? chunkOPMWK5SY_cjs.tStatic("genesis.shared", "ERROR_BOUNDARY.DEFAULT"),
|
|
12024
12217
|
containerClassName: "h-full w-full min-h-100"
|
|
12025
12218
|
}
|
|
12026
12219
|
);
|
|
@@ -12029,24 +12222,25 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12029
12222
|
}
|
|
12030
12223
|
};
|
|
12031
12224
|
var ArchiveProject = () => {
|
|
12225
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12032
12226
|
const navigate = reactRouter.useNavigate();
|
|
12033
|
-
const projectKey =
|
|
12034
|
-
const { mutateAsync, isPending } =
|
|
12227
|
+
const projectKey = chunkU2LA7LBX_cjs.useProjectStore().selectedProject?.tenantId || "";
|
|
12228
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useDisableProject({ projectKey });
|
|
12035
12229
|
const onClickHandler = async () => {
|
|
12036
12230
|
try {
|
|
12037
12231
|
const res = await mutateAsync();
|
|
12038
12232
|
if (res.isSuccess) {
|
|
12039
|
-
|
|
12040
|
-
title: "
|
|
12041
|
-
description: "
|
|
12233
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
12234
|
+
title: t("ARCHIVE_PROJECT.TOAST_TITLE"),
|
|
12235
|
+
description: t("ARCHIVE_PROJECT.TOAST_DESCRIPTION")
|
|
12042
12236
|
});
|
|
12043
12237
|
navigate("/app/console");
|
|
12044
12238
|
} else {
|
|
12045
|
-
|
|
12239
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
12046
12240
|
}
|
|
12047
12241
|
} catch (error) {
|
|
12048
|
-
if (
|
|
12049
|
-
|
|
12242
|
+
if (chunkAIUUCMAI_cjs.isErrorWithErrors(error)) {
|
|
12243
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
12050
12244
|
}
|
|
12051
12245
|
}
|
|
12052
12246
|
};
|
|
@@ -12060,7 +12254,7 @@ var ArchiveProject = () => {
|
|
|
12060
12254
|
className: "flex items-center gap-2",
|
|
12061
12255
|
children: [
|
|
12062
12256
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Archive, { className: "h-4 w-4" }),
|
|
12063
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: "
|
|
12257
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: t("common:DELETE") })
|
|
12064
12258
|
]
|
|
12065
12259
|
}
|
|
12066
12260
|
) }),
|
|
@@ -12070,12 +12264,12 @@ var ArchiveProject = () => {
|
|
|
12070
12264
|
onCancel: () => setOpen(false),
|
|
12071
12265
|
onConfirm: onClickHandler,
|
|
12072
12266
|
data: {
|
|
12073
|
-
dialogTitle: "
|
|
12267
|
+
dialogTitle: t("ARCHIVE_PROJECT.DIALOG_TITLE"),
|
|
12074
12268
|
dialogSubtitle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12075
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "
|
|
12076
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "
|
|
12269
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("ARCHIVE_PROJECT.CONFIRM") }),
|
|
12270
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("ARCHIVE_PROJECT.WARNING") })
|
|
12077
12271
|
] }),
|
|
12078
|
-
confirmButton: "
|
|
12272
|
+
confirmButton: t("common:DELETE")
|
|
12079
12273
|
},
|
|
12080
12274
|
buttonState: { confirm: { disable: isPending } }
|
|
12081
12275
|
}
|
|
@@ -12762,6 +12956,7 @@ var CopyableSnippet = ({
|
|
|
12762
12956
|
language = "bash",
|
|
12763
12957
|
isCopyable = true
|
|
12764
12958
|
}) => {
|
|
12959
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12765
12960
|
const [copied, setCopied] = React8.useState(false);
|
|
12766
12961
|
const handleCopy = async () => {
|
|
12767
12962
|
try {
|
|
@@ -12791,7 +12986,7 @@ var CopyableSnippet = ({
|
|
|
12791
12986
|
{
|
|
12792
12987
|
onClick: handleCopy,
|
|
12793
12988
|
className: "absolute -top-[28px] right-2 z-10 text-muted-foreground transition hover:text-foreground",
|
|
12794
|
-
"aria-label": "
|
|
12989
|
+
"aria-label": t("COPYABLE_SNIPPET.COPY_CODE"),
|
|
12795
12990
|
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-4 w-4" })
|
|
12796
12991
|
}
|
|
12797
12992
|
),
|
|
@@ -12829,6 +13024,7 @@ function InfoTooltip({ content, side = "top" }) {
|
|
|
12829
13024
|
] });
|
|
12830
13025
|
}
|
|
12831
13026
|
function DateRange({ label, value, onChange }) {
|
|
13027
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12832
13028
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
12833
13029
|
const [open, setOpen] = React8.useState(false);
|
|
12834
13030
|
const [date, setDate] = React8.useState(value);
|
|
@@ -12872,10 +13068,10 @@ function DateRange({ label, value, onChange }) {
|
|
|
12872
13068
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
12873
13069
|
}
|
|
12874
13070
|
),
|
|
12875
|
-
|
|
13071
|
+
chunkAIUUCMAI_cjs.formatDate(date.from, true),
|
|
12876
13072
|
date.to && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12877
13073
|
" - ",
|
|
12878
|
-
|
|
13074
|
+
chunkAIUUCMAI_cjs.formatDate(date.to, true)
|
|
12879
13075
|
] })
|
|
12880
13076
|
] })
|
|
12881
13077
|
] }) }) }),
|
|
@@ -12899,10 +13095,10 @@ function DateRange({ label, value, onChange }) {
|
|
|
12899
13095
|
variant: "outline",
|
|
12900
13096
|
className: "w-full",
|
|
12901
13097
|
onClick: resetBtnHandler,
|
|
12902
|
-
children: "
|
|
13098
|
+
children: t("common:RESET")
|
|
12903
13099
|
}
|
|
12904
13100
|
),
|
|
12905
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", className: "w-full", onClick: applyBtnHandler, children: "
|
|
13101
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", className: "w-full", onClick: applyBtnHandler, children: t("common:APPLY") })
|
|
12906
13102
|
] })
|
|
12907
13103
|
] })
|
|
12908
13104
|
]
|
|
@@ -12911,18 +13107,19 @@ function DateRange({ label, value, onChange }) {
|
|
|
12911
13107
|
}
|
|
12912
13108
|
var DropdownSearchInput = ({
|
|
12913
13109
|
onChange,
|
|
12914
|
-
placeholder
|
|
13110
|
+
placeholder,
|
|
12915
13111
|
value,
|
|
12916
13112
|
className = {},
|
|
12917
13113
|
options = []
|
|
12918
13114
|
}) => {
|
|
13115
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12919
13116
|
const [state, setState] = React8.useState(value);
|
|
12920
13117
|
const inputRef = React8.useRef(null);
|
|
12921
13118
|
React8.useEffect(() => {
|
|
12922
13119
|
setState(value);
|
|
12923
13120
|
}, [value]);
|
|
12924
13121
|
const debounced = React8.useRef(
|
|
12925
|
-
|
|
13122
|
+
chunkAIUUCMAI_cjs.debounce((val) => {
|
|
12926
13123
|
onChange(val);
|
|
12927
13124
|
}, 300)
|
|
12928
13125
|
).current;
|
|
@@ -12964,7 +13161,7 @@ var DropdownSearchInput = ({
|
|
|
12964
13161
|
Input,
|
|
12965
13162
|
{
|
|
12966
13163
|
ref: inputRef,
|
|
12967
|
-
placeholder,
|
|
13164
|
+
placeholder: placeholder ?? t("DROPDOWN_SEARCH_INPUT.PLACEHOLDER"),
|
|
12968
13165
|
value: state.value,
|
|
12969
13166
|
onChange: handleChange,
|
|
12970
13167
|
className: chunkYAF2X7W5_cjs.cn(
|
|
@@ -12989,19 +13186,21 @@ var DropdownSearchInput = ({
|
|
|
12989
13186
|
] });
|
|
12990
13187
|
};
|
|
12991
13188
|
var ClearButton = ({ onClear }) => {
|
|
13189
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12992
13190
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12993
13191
|
Button,
|
|
12994
13192
|
{
|
|
12995
13193
|
variant: "ghost",
|
|
12996
13194
|
className: "h-auto w-full rounded-sm px-2 py-1.5 font-medium text-accent-foreground hover:bg-accent",
|
|
12997
13195
|
onClick: onClear,
|
|
12998
|
-
children: "
|
|
13196
|
+
children: t("common:CLEAR")
|
|
12999
13197
|
}
|
|
13000
13198
|
) });
|
|
13001
13199
|
};
|
|
13002
13200
|
function Radio({ label, options, onChange, value }) {
|
|
13201
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13003
13202
|
const [search, setSearch] = React8.useState("");
|
|
13004
|
-
const [buttonRef, popoverWidth] =
|
|
13203
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
13005
13204
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
13006
13205
|
const selected = React8.useMemo(
|
|
13007
13206
|
() => options.find((item) => item.value === value) || null,
|
|
@@ -13086,7 +13285,7 @@ function Radio({ label, options, onChange, value }) {
|
|
|
13086
13285
|
option.value
|
|
13087
13286
|
))
|
|
13088
13287
|
}
|
|
13089
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm !text-popover-foreground", children: "
|
|
13288
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm !text-popover-foreground", children: t("RADIO.NO_RESULTS") }) }),
|
|
13090
13289
|
value ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13091
13290
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
13092
13291
|
/* @__PURE__ */ jsxRuntime.jsx(ClearButton, { onClear: () => onChange(null) })
|
|
@@ -13176,6 +13375,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13176
13375
|
className,
|
|
13177
13376
|
...props
|
|
13178
13377
|
}, ref) => {
|
|
13378
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13179
13379
|
const canPrev = pageIndex > 0;
|
|
13180
13380
|
const canNext = pageIndex < pageCount - 1;
|
|
13181
13381
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13191,7 +13391,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13191
13391
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: summary }),
|
|
13192
13392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
|
|
13193
13393
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13194
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "
|
|
13394
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: t("TABLE_PAGINATION.ROWS_PER_PAGE") }),
|
|
13195
13395
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13196
13396
|
Select,
|
|
13197
13397
|
{
|
|
@@ -13204,12 +13404,10 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13204
13404
|
}
|
|
13205
13405
|
)
|
|
13206
13406
|
] }),
|
|
13207
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
Math.max(pageCount, 1)
|
|
13212
|
-
] }),
|
|
13407
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-[120px] items-center justify-center text-sm font-medium", children: t("TABLE_PAGINATION.PAGE_OF", {
|
|
13408
|
+
page: pageIndex + 1,
|
|
13409
|
+
total: Math.max(pageCount, 1)
|
|
13410
|
+
}) }),
|
|
13213
13411
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
13214
13412
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13215
13413
|
Button,
|
|
@@ -13219,7 +13417,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13219
13417
|
className: "hidden size-8 lg:flex",
|
|
13220
13418
|
onClick: () => onPageChange(0),
|
|
13221
13419
|
disabled: !canPrev,
|
|
13222
|
-
"aria-label": "
|
|
13420
|
+
"aria-label": t("TABLE_PAGINATION.FIRST_PAGE"),
|
|
13223
13421
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "size-4" })
|
|
13224
13422
|
}
|
|
13225
13423
|
),
|
|
@@ -13231,7 +13429,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13231
13429
|
className: "size-8",
|
|
13232
13430
|
onClick: () => onPageChange(pageIndex - 1),
|
|
13233
13431
|
disabled: !canPrev,
|
|
13234
|
-
"aria-label": "
|
|
13432
|
+
"aria-label": t("TABLE_PAGINATION.PREVIOUS_PAGE"),
|
|
13235
13433
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
|
|
13236
13434
|
}
|
|
13237
13435
|
),
|
|
@@ -13243,7 +13441,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13243
13441
|
className: "size-8",
|
|
13244
13442
|
onClick: () => onPageChange(pageIndex + 1),
|
|
13245
13443
|
disabled: !canNext,
|
|
13246
|
-
"aria-label": "
|
|
13444
|
+
"aria-label": t("TABLE_PAGINATION.NEXT_PAGE"),
|
|
13247
13445
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
|
|
13248
13446
|
}
|
|
13249
13447
|
),
|
|
@@ -13255,7 +13453,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13255
13453
|
className: "hidden size-8 lg:flex",
|
|
13256
13454
|
onClick: () => onPageChange(pageCount - 1),
|
|
13257
13455
|
disabled: !canNext,
|
|
13258
|
-
"aria-label": "
|
|
13456
|
+
"aria-label": t("TABLE_PAGINATION.LAST_PAGE"),
|
|
13259
13457
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "size-4" })
|
|
13260
13458
|
}
|
|
13261
13459
|
)
|
|
@@ -13333,6 +13531,7 @@ var FilterToolBarMobileView = ({
|
|
|
13333
13531
|
showReset,
|
|
13334
13532
|
onReset
|
|
13335
13533
|
}) => {
|
|
13534
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13336
13535
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 md:hidden", children: [
|
|
13337
13536
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 max-w-72 flex-1", children: Components[0] }),
|
|
13338
13537
|
Components.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
@@ -13352,11 +13551,11 @@ var FilterToolBarMobileView = ({
|
|
|
13352
13551
|
className: "w-full",
|
|
13353
13552
|
"aria-describedby": "filter-description",
|
|
13354
13553
|
children: [
|
|
13355
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "mb-4", children: "
|
|
13554
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "mb-4", children: t("FILTER_TOOLBAR.TITLE") }),
|
|
13356
13555
|
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, {}),
|
|
13357
13556
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-4", children: [
|
|
13358
13557
|
Components.slice(1).map((item) => item),
|
|
13359
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "mt-4", size: "sm", children: "
|
|
13558
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "mt-4", size: "sm", children: t("FILTER_TOOLBAR.SHOW_RESULTS") }) }),
|
|
13360
13559
|
showReset && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13361
13560
|
ResetButton,
|
|
13362
13561
|
{
|
|
@@ -13398,7 +13597,7 @@ var FilterToolbar = ({
|
|
|
13398
13597
|
}
|
|
13399
13598
|
);
|
|
13400
13599
|
});
|
|
13401
|
-
const showReset = !hideGlobalResetButton && !
|
|
13600
|
+
const showReset = !hideGlobalResetButton && !chunkAIUUCMAI_cjs.deepEqual(initialValuesRef.current, values);
|
|
13402
13601
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13403
13602
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13404
13603
|
FilterToolbarDesktopView,
|
|
@@ -13464,6 +13663,7 @@ function DataTable(props) {
|
|
|
13464
13663
|
tableOptions,
|
|
13465
13664
|
renderHeaderCell
|
|
13466
13665
|
} = props;
|
|
13666
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13467
13667
|
const sortNamespace = "sortNamespace" in props ? props.sortNamespace : void 0;
|
|
13468
13668
|
const defaultSortValue = "defaultSortValue" in props ? props.defaultSortValue : void 0;
|
|
13469
13669
|
const ns = sortNamespace ?? "dt";
|
|
@@ -13524,7 +13724,7 @@ function DataTable(props) {
|
|
|
13524
13724
|
{
|
|
13525
13725
|
colSpan: table.getAllColumns().length,
|
|
13526
13726
|
className: "h-24 text-center text-muted-foreground",
|
|
13527
|
-
children: renderEmptyState ?? "
|
|
13727
|
+
children: renderEmptyState ?? t("DATA_TABLE.NO_RESULTS")
|
|
13528
13728
|
}
|
|
13529
13729
|
) }) });
|
|
13530
13730
|
const tableNode = /* @__PURE__ */ jsxRuntime.jsxs(Table, { className: "text-sm", children: [
|
|
@@ -13561,6 +13761,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13561
13761
|
className,
|
|
13562
13762
|
...props
|
|
13563
13763
|
}, ref) => {
|
|
13764
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13564
13765
|
const canPrev = pageIndex > 0;
|
|
13565
13766
|
const canNext = pageIndex < pageCount - 1;
|
|
13566
13767
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13576,7 +13777,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13576
13777
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: summary }),
|
|
13577
13778
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
|
|
13578
13779
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13579
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "
|
|
13780
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: t("DATA_TABLE_PAGINATION.ROWS_PER_PAGE") }),
|
|
13580
13781
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13581
13782
|
Select,
|
|
13582
13783
|
{
|
|
@@ -13589,12 +13790,10 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13589
13790
|
}
|
|
13590
13791
|
)
|
|
13591
13792
|
] }),
|
|
13592
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
Math.max(pageCount, 1)
|
|
13597
|
-
] }),
|
|
13793
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-[120px] items-center justify-center text-sm font-medium", children: t("DATA_TABLE_PAGINATION.PAGE_OF", {
|
|
13794
|
+
page: pageIndex + 1,
|
|
13795
|
+
total: Math.max(pageCount, 1)
|
|
13796
|
+
}) }),
|
|
13598
13797
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
13599
13798
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13600
13799
|
Button,
|
|
@@ -13604,7 +13803,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13604
13803
|
className: "hidden size-8 lg:flex",
|
|
13605
13804
|
onClick: () => onPageChange(0),
|
|
13606
13805
|
disabled: !canPrev,
|
|
13607
|
-
"aria-label": "
|
|
13806
|
+
"aria-label": t("DATA_TABLE_PAGINATION.FIRST_PAGE"),
|
|
13608
13807
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "size-4" })
|
|
13609
13808
|
}
|
|
13610
13809
|
),
|
|
@@ -13616,7 +13815,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13616
13815
|
className: "size-8",
|
|
13617
13816
|
onClick: () => onPageChange(pageIndex - 1),
|
|
13618
13817
|
disabled: !canPrev,
|
|
13619
|
-
"aria-label": "
|
|
13818
|
+
"aria-label": t("DATA_TABLE_PAGINATION.PREVIOUS_PAGE"),
|
|
13620
13819
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
|
|
13621
13820
|
}
|
|
13622
13821
|
),
|
|
@@ -13628,7 +13827,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13628
13827
|
className: "size-8",
|
|
13629
13828
|
onClick: () => onPageChange(pageIndex + 1),
|
|
13630
13829
|
disabled: !canNext,
|
|
13631
|
-
"aria-label": "
|
|
13830
|
+
"aria-label": t("DATA_TABLE_PAGINATION.NEXT_PAGE"),
|
|
13632
13831
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
|
|
13633
13832
|
}
|
|
13634
13833
|
),
|
|
@@ -13640,7 +13839,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13640
13839
|
className: "hidden size-8 lg:flex",
|
|
13641
13840
|
onClick: () => onPageChange(pageCount - 1),
|
|
13642
13841
|
disabled: !canNext,
|
|
13643
|
-
"aria-label": "
|
|
13842
|
+
"aria-label": t("DATA_TABLE_PAGINATION.LAST_PAGE"),
|
|
13644
13843
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "size-4" })
|
|
13645
13844
|
}
|
|
13646
13845
|
)
|
|
@@ -14010,5 +14209,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
|
|
|
14010
14209
|
exports.useRightSidePanel = useRightSidePanel;
|
|
14011
14210
|
exports.useSortQueryParams = useSortQueryParams;
|
|
14012
14211
|
exports.useWizardStepper = useWizardStepper;
|
|
14013
|
-
//# sourceMappingURL=chunk-
|
|
14014
|
-
//# sourceMappingURL=chunk-
|
|
14212
|
+
//# sourceMappingURL=chunk-QBL4VIE4.cjs.map
|
|
14213
|
+
//# sourceMappingURL=chunk-QBL4VIE4.cjs.map
|