@seliseblocks/genesis-os 4.4.5 → 4.4.7
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-DOPVVJD5.js} +41 -41
- package/dist/all-DOPVVJD5.js.map +1 -0
- package/dist/{all-2UHIE3HU.cjs → all-U2EMOAAN.cjs} +41 -41
- package/dist/all-U2EMOAAN.cjs.map +1 -0
- 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-QTSTAWK3.cjs → chunk-4RZMYO3F.cjs} +8 -7
- package/dist/chunk-4RZMYO3F.cjs.map +1 -0
- 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-JQ4U53QV.cjs → chunk-5JLLXRMI.cjs} +41 -41
- package/dist/{chunk-JQ4U53QV.cjs.map → chunk-5JLLXRMI.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-WL6LTNZN.js → chunk-ASX5UGE4.js} +40 -40
- package/dist/{chunk-WL6LTNZN.js.map → chunk-ASX5UGE4.js.map} +1 -1
- package/dist/{chunk-CGVT7IFM.cjs → chunk-CSFOG5YH.cjs} +875 -682
- package/dist/chunk-CSFOG5YH.cjs.map +1 -0
- package/dist/{chunk-NPMO67H6.js → chunk-F2IEUFPT.js} +709 -516
- package/dist/chunk-F2IEUFPT.js.map +1 -0
- package/dist/chunk-GAQGM46C.cjs +4 -0
- package/dist/chunk-GAQGM46C.cjs.map +1 -0
- 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-KZ3NZCXZ.cjs +859 -0
- package/dist/chunk-KZ3NZCXZ.cjs.map +1 -0
- package/dist/{chunk-XRAO7JBH.js → chunk-KZOSD6FO.js} +11 -4
- package/dist/chunk-KZOSD6FO.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-O2MGCS3O.js +830 -0
- package/dist/chunk-O2MGCS3O.js.map +1 -0
- package/dist/{chunk-JSXAKNHQ.js → chunk-O7TJN754.js} +7 -6
- package/dist/chunk-O7TJN754.js.map +1 -0
- package/dist/{chunk-JUVLHPQI.js → chunk-POJIHGRY.js} +3 -14
- package/dist/chunk-POJIHGRY.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-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-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-IJMKS4XG.cjs → chunk-X3GPJW7R.cjs} +15 -8
- package/dist/chunk-X3GPJW7R.cjs.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 +399 -394
- package/dist/components/index.d.cts +6 -6
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index.js +52 -47
- package/dist/guards/index.cjs +58 -53
- package/dist/guards/index.js +52 -47
- 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 +708 -591
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +52 -47
- package/dist/layouts/index.cjs +59 -54
- package/dist/layouts/index.js +52 -47
- package/dist/lib/index.cjs +38 -36
- package/dist/lib/index.js +5 -3
- package/dist/observability/index.cjs +75 -4
- 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 +71 -2
- package/dist/observability/index.js.map +1 -1
- package/dist/pages/index.cjs +57 -52
- package/dist/pages/index.js +52 -47
- 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 +8 -3
- package/dist/all-2UHIE3HU.cjs.map +0 -1
- package/dist/all-OJ5YSNAN.js.map +0 -1
- 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/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 chunk4RZMYO3F_cjs = require('./chunk-4RZMYO3F.cjs');
|
|
6
|
+
var chunkIPMRZNNS_cjs = require('./chunk-IPMRZNNS.cjs');
|
|
7
|
+
var chunk2MP66EX3_cjs = require('./chunk-2MP66EX3.cjs');
|
|
8
|
+
var chunkX3GPJW7R_cjs = require('./chunk-X3GPJW7R.cjs');
|
|
9
9
|
var chunkBPJM3L7O_cjs = require('./chunk-BPJM3L7O.cjs');
|
|
10
|
+
var chunkKZ3NZCXZ_cjs = require('./chunk-KZ3NZCXZ.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 } = chunkKZ3NZCXZ_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]
|
|
@@ -754,6 +763,7 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
754
763
|
);
|
|
755
764
|
Sidebar.displayName = "Sidebar";
|
|
756
765
|
var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
766
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
757
767
|
const { toggleSidebar } = useSidebar();
|
|
758
768
|
const PanelLeftIcon = lucideReact.PanelLeft;
|
|
759
769
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -771,23 +781,24 @@ var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...prop
|
|
|
771
781
|
...props,
|
|
772
782
|
children: [
|
|
773
783
|
/* @__PURE__ */ jsxRuntime.jsx(PanelLeftIcon, {}),
|
|
774
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children:
|
|
784
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t(TOGGLE_KEY) })
|
|
775
785
|
]
|
|
776
786
|
}
|
|
777
787
|
);
|
|
778
788
|
});
|
|
779
789
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
780
790
|
var SidebarRail = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
791
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
781
792
|
const { toggleSidebar } = useSidebar();
|
|
782
793
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
783
794
|
"button",
|
|
784
795
|
{
|
|
785
796
|
ref,
|
|
786
797
|
"data-sidebar": "rail",
|
|
787
|
-
"aria-label":
|
|
798
|
+
"aria-label": t(TOGGLE_KEY),
|
|
788
799
|
tabIndex: -1,
|
|
789
800
|
onClick: toggleSidebar,
|
|
790
|
-
title:
|
|
801
|
+
title: t(TOGGLE_KEY),
|
|
791
802
|
className: chunkYAF2X7W5_cjs.cn(
|
|
792
803
|
"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
804
|
"in-data-[side=left]:cursor-w-resize",
|
|
@@ -1141,7 +1152,7 @@ var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size
|
|
|
1141
1152
|
});
|
|
1142
1153
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1143
1154
|
function useRightSidePanel() {
|
|
1144
|
-
return React8.useContext(
|
|
1155
|
+
return React8.useContext(chunkX3GPJW7R_cjs.RightSidePanelContext) ?? chunkX3GPJW7R_cjs.defaultRightSidePanelContextValue;
|
|
1145
1156
|
}
|
|
1146
1157
|
function RenderConditionally({
|
|
1147
1158
|
condition,
|
|
@@ -1155,6 +1166,7 @@ function RenderConditionally({
|
|
|
1155
1166
|
function RightSidePanelResizer({
|
|
1156
1167
|
onHandlePointerDown
|
|
1157
1168
|
}) {
|
|
1169
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
1158
1170
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pointer-events-none absolute inset-y-0 -left-0.5 w-1.5", children: [
|
|
1159
1171
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
1172
|
"div",
|
|
@@ -1169,7 +1181,7 @@ function RightSidePanelResizer({
|
|
|
1169
1181
|
"data-resize-handle": true,
|
|
1170
1182
|
role: "separator",
|
|
1171
1183
|
"aria-orientation": "vertical",
|
|
1172
|
-
"aria-label": "
|
|
1184
|
+
"aria-label": t("RIGHT_SIDE_PANEL.RESIZE_PANEL"),
|
|
1173
1185
|
onPointerDown: onHandlePointerDown,
|
|
1174
1186
|
className: chunkYAF2X7W5_cjs.cn(
|
|
1175
1187
|
"pointer-events-auto",
|
|
@@ -1227,7 +1239,7 @@ function DesktopPanel({
|
|
|
1227
1239
|
setLiveWidth,
|
|
1228
1240
|
topOffset
|
|
1229
1241
|
} = useRightSidePanel();
|
|
1230
|
-
const { setLayoutSetting } =
|
|
1242
|
+
const { setLayoutSetting } = chunkRO55MFZA_cjs.useLayoutSettingsStore();
|
|
1231
1243
|
const containerRef = React8__namespace.useRef(null);
|
|
1232
1244
|
React8__namespace.useLayoutEffect(() => {
|
|
1233
1245
|
const container = containerRef.current;
|
|
@@ -1403,13 +1415,14 @@ var RightSidePanelDescription = React8__namespace.forwardRef(({ className, ...pr
|
|
|
1403
1415
|
RightSidePanelDescription.displayName = "RightSidePanelDescription";
|
|
1404
1416
|
var RightSidePanelClose = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1405
1417
|
const { isMobile, close } = useRightSidePanel();
|
|
1418
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
1406
1419
|
const Comp = isMobile ? vaul.Drawer.Close : SheetPrimitive__namespace.Close;
|
|
1407
1420
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1408
1421
|
Comp,
|
|
1409
1422
|
{
|
|
1410
1423
|
ref,
|
|
1411
1424
|
"data-slot": "right-side-panel-close",
|
|
1412
|
-
"aria-label": "
|
|
1425
|
+
"aria-label": t("RIGHT_SIDE_PANEL.CLOSE_PANEL"),
|
|
1413
1426
|
className: chunkYAF2X7W5_cjs.cn(
|
|
1414
1427
|
"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
1428
|
className
|
|
@@ -1421,7 +1434,7 @@ var RightSidePanelClose = React8__namespace.forwardRef(({ className, ...props },
|
|
|
1421
1434
|
...props,
|
|
1422
1435
|
children: [
|
|
1423
1436
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1424
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
1437
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("common:CLOSE") })
|
|
1425
1438
|
]
|
|
1426
1439
|
}
|
|
1427
1440
|
);
|
|
@@ -1481,7 +1494,7 @@ function RightSidePanelProvider({
|
|
|
1481
1494
|
const generatedId = React8__namespace.useId();
|
|
1482
1495
|
const resolvedPanelId = panelId ?? `right-side-panel-${generatedId}`;
|
|
1483
1496
|
const resolvedTopOffset = parseWidth(topOffset, "0px");
|
|
1484
|
-
const { layout } =
|
|
1497
|
+
const { layout } = chunkRO55MFZA_cjs.useLayoutSettingsStore();
|
|
1485
1498
|
const sizing = React8__namespace.useMemo(
|
|
1486
1499
|
() => ({
|
|
1487
1500
|
width: parseWidth(width, DEFAULT_SIZING_VALUES.width),
|
|
@@ -1523,7 +1536,7 @@ function RightSidePanelProvider({
|
|
|
1523
1536
|
const close = React8__namespace.useCallback(() => {
|
|
1524
1537
|
setOpen(false);
|
|
1525
1538
|
}, [setOpen]);
|
|
1526
|
-
|
|
1539
|
+
chunkVLZJP6FH_cjs.useKeyboardShortcut(shortcut, toggle);
|
|
1527
1540
|
React8__namespace.useEffect(() => {
|
|
1528
1541
|
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1529
1542
|
const handleHashChange = () => {
|
|
@@ -1579,7 +1592,7 @@ function RightSidePanelProvider({
|
|
|
1579
1592
|
resolvedTopOffset
|
|
1580
1593
|
]
|
|
1581
1594
|
);
|
|
1582
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1595
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkX3GPJW7R_cjs.RightSidePanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
1596
|
"div",
|
|
1584
1597
|
{
|
|
1585
1598
|
"data-slot": "right-side-panel-provider",
|
|
@@ -1615,10 +1628,11 @@ var RightSidePanelTrigger = React8__namespace.forwardRef(
|
|
|
1615
1628
|
type,
|
|
1616
1629
|
...props
|
|
1617
1630
|
}, ref) => {
|
|
1631
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
1618
1632
|
const { open, toggle, panelId } = useRightSidePanel();
|
|
1619
1633
|
const Comp = asChild ? reactSlot.Slot : Button;
|
|
1620
1634
|
const isFloating = position !== "inline";
|
|
1621
|
-
const computedLabel = ariaLabel ?? label ?? "
|
|
1635
|
+
const computedLabel = ariaLabel ?? label ?? t("RIGHT_SIDE_PANEL.TOGGLE_PANEL");
|
|
1622
1636
|
const handleClick = (event) => {
|
|
1623
1637
|
onClick?.(event);
|
|
1624
1638
|
if (!event.defaultPrevented) toggle();
|
|
@@ -1735,15 +1749,19 @@ var DrawerDescription = React8__namespace.forwardRef(({ className, ...props }, r
|
|
|
1735
1749
|
}
|
|
1736
1750
|
));
|
|
1737
1751
|
DrawerDescription.displayName = vaul.Drawer.Description.displayName;
|
|
1738
|
-
var
|
|
1739
|
-
|
|
1740
|
-
{
|
|
1741
|
-
|
|
1742
|
-
"
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
)
|
|
1752
|
+
var I18N_MODULE = "genesis.shared";
|
|
1753
|
+
var Pagination = ({ className, ...props }) => {
|
|
1754
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(I18N_MODULE);
|
|
1755
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
|
+
"nav",
|
|
1757
|
+
{
|
|
1758
|
+
role: "navigation",
|
|
1759
|
+
"aria-label": t("PAGINATION.NAV_ARIA"),
|
|
1760
|
+
className: chunkYAF2X7W5_cjs.cn("mx-auto flex w-full justify-center", className),
|
|
1761
|
+
...props
|
|
1762
|
+
}
|
|
1763
|
+
);
|
|
1764
|
+
};
|
|
1747
1765
|
Pagination.displayName = "Pagination";
|
|
1748
1766
|
var PaginationContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1749
1767
|
"ul",
|
|
@@ -1780,16 +1798,17 @@ var PaginationPrevious = ({
|
|
|
1780
1798
|
className,
|
|
1781
1799
|
...props
|
|
1782
1800
|
}) => {
|
|
1801
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(I18N_MODULE);
|
|
1783
1802
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1784
1803
|
PaginationLink,
|
|
1785
1804
|
{
|
|
1786
|
-
"aria-label": "
|
|
1805
|
+
"aria-label": t("PAGINATION.PREVIOUS_PAGE"),
|
|
1787
1806
|
size: "default",
|
|
1788
1807
|
className: chunkYAF2X7W5_cjs.cn("gap-1 pl-2.5", className),
|
|
1789
1808
|
...props,
|
|
1790
1809
|
children: [
|
|
1791
1810
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }),
|
|
1792
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
1811
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("common:PREVIOUS") })
|
|
1793
1812
|
]
|
|
1794
1813
|
}
|
|
1795
1814
|
);
|
|
@@ -1799,15 +1818,16 @@ var PaginationNext = ({
|
|
|
1799
1818
|
className,
|
|
1800
1819
|
...props
|
|
1801
1820
|
}) => {
|
|
1821
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(I18N_MODULE);
|
|
1802
1822
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1803
1823
|
PaginationLink,
|
|
1804
1824
|
{
|
|
1805
|
-
"aria-label": "
|
|
1825
|
+
"aria-label": t("PAGINATION.NEXT_PAGE"),
|
|
1806
1826
|
size: "default",
|
|
1807
1827
|
className: chunkYAF2X7W5_cjs.cn("gap-1 pr-2.5", className),
|
|
1808
1828
|
...props,
|
|
1809
1829
|
children: [
|
|
1810
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
1830
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("common:NEXT") }),
|
|
1811
1831
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
1812
1832
|
]
|
|
1813
1833
|
}
|
|
@@ -1818,6 +1838,7 @@ var PaginationEllipsis = ({
|
|
|
1818
1838
|
className,
|
|
1819
1839
|
...props
|
|
1820
1840
|
}) => {
|
|
1841
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(I18N_MODULE);
|
|
1821
1842
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1822
1843
|
"span",
|
|
1823
1844
|
{
|
|
@@ -1826,7 +1847,7 @@ var PaginationEllipsis = ({
|
|
|
1826
1847
|
...props,
|
|
1827
1848
|
children: [
|
|
1828
1849
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
1829
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
1850
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("PAGINATION.MORE_PAGES") })
|
|
1830
1851
|
]
|
|
1831
1852
|
}
|
|
1832
1853
|
);
|
|
@@ -2388,7 +2409,7 @@ var WizardStepIndicator = ({
|
|
|
2388
2409
|
color: indicatorColor,
|
|
2389
2410
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "transparent"
|
|
2390
2411
|
},
|
|
2391
|
-
transition:
|
|
2412
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2392
2413
|
className: chunkYAF2X7W5_cjs.cn(
|
|
2393
2414
|
"flex size-8 items-center justify-center rounded-full border text-lg font-bold",
|
|
2394
2415
|
className
|
|
@@ -2399,7 +2420,7 @@ var WizardStepIndicator = ({
|
|
|
2399
2420
|
initial: { scale: 0, opacity: 0 },
|
|
2400
2421
|
animate: { scale: 1, opacity: 1 },
|
|
2401
2422
|
exit: { scale: 0, opacity: 0 },
|
|
2402
|
-
transition:
|
|
2423
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2403
2424
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-[18px]", "aria-hidden": true })
|
|
2404
2425
|
},
|
|
2405
2426
|
"check"
|
|
@@ -2409,7 +2430,7 @@ var WizardStepIndicator = ({
|
|
|
2409
2430
|
initial: { scale: 0.8, opacity: 0 },
|
|
2410
2431
|
animate: { scale: 1, opacity: 1 },
|
|
2411
2432
|
exit: { scale: 0.8, opacity: 0 },
|
|
2412
|
-
transition:
|
|
2433
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2413
2434
|
children: stepNumber
|
|
2414
2435
|
},
|
|
2415
2436
|
"number"
|
|
@@ -2420,7 +2441,7 @@ var WizardStepIndicator = ({
|
|
|
2420
2441
|
var WizardVerticalTrackBar = () => {
|
|
2421
2442
|
const { currentStep, totalSteps, goToStep, completedSteps, getSteps } = useWizardStepper();
|
|
2422
2443
|
const steps = getSteps();
|
|
2423
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition:
|
|
2444
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition: chunkIPMRZNNS_cjs.fadeTransition, children: steps.map((step, index) => {
|
|
2424
2445
|
const stepNumber = index + 1;
|
|
2425
2446
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
2426
2447
|
const isCurrent = currentStep === stepNumber;
|
|
@@ -2434,7 +2455,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2434
2455
|
{
|
|
2435
2456
|
layout: true,
|
|
2436
2457
|
className: "flex items-center gap-2",
|
|
2437
|
-
transition:
|
|
2458
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2438
2459
|
children: [
|
|
2439
2460
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2440
2461
|
Button,
|
|
@@ -2461,7 +2482,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2461
2482
|
animate: {
|
|
2462
2483
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2463
2484
|
},
|
|
2464
|
-
transition:
|
|
2485
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2465
2486
|
className: "ml-4 text-base font-medium",
|
|
2466
2487
|
children: step.title
|
|
2467
2488
|
}
|
|
@@ -2478,7 +2499,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2478
2499
|
scaleY: isCompleted ? 1 : 0.35,
|
|
2479
2500
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "hsl(var(--border))"
|
|
2480
2501
|
},
|
|
2481
|
-
transition:
|
|
2502
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition
|
|
2482
2503
|
}
|
|
2483
2504
|
) : null
|
|
2484
2505
|
]
|
|
@@ -2495,7 +2516,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2495
2516
|
{
|
|
2496
2517
|
layout: true,
|
|
2497
2518
|
className: "flex w-full flex-row flex-wrap justify-between",
|
|
2498
|
-
transition:
|
|
2519
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2499
2520
|
children: steps.map((step, index) => {
|
|
2500
2521
|
const stepNumber = index + 1;
|
|
2501
2522
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
@@ -2534,7 +2555,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2534
2555
|
animate: {
|
|
2535
2556
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2536
2557
|
},
|
|
2537
|
-
transition:
|
|
2558
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2538
2559
|
className: "hidden md:block",
|
|
2539
2560
|
children: step.title
|
|
2540
2561
|
}
|
|
@@ -2555,11 +2576,11 @@ var WizardStepViewport = ({
|
|
|
2555
2576
|
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
2577
|
framerMotion.motion.div,
|
|
2557
2578
|
{
|
|
2558
|
-
variants:
|
|
2579
|
+
variants: chunkIPMRZNNS_cjs.fadeInUp,
|
|
2559
2580
|
initial: "initial",
|
|
2560
2581
|
animate: "animate",
|
|
2561
2582
|
exit: "exit",
|
|
2562
|
-
transition:
|
|
2583
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
2563
2584
|
className,
|
|
2564
2585
|
children
|
|
2565
2586
|
},
|
|
@@ -3326,7 +3347,7 @@ var DialogContent = React8__namespace.forwardRef(({ className, children, hideClo
|
|
|
3326
3347
|
children,
|
|
3327
3348
|
!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
3349
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
3329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3350
|
+
/* @__PURE__ */ jsxRuntime.jsx(SrClose, {})
|
|
3330
3351
|
] })
|
|
3331
3352
|
]
|
|
3332
3353
|
}
|
|
@@ -3499,7 +3520,7 @@ function MultiSelect({
|
|
|
3499
3520
|
onChange,
|
|
3500
3521
|
value: selectedValues
|
|
3501
3522
|
}) {
|
|
3502
|
-
const [buttonRef, popoverWidth] =
|
|
3523
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
3503
3524
|
const onSelectHandler = (value) => {
|
|
3504
3525
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
3505
3526
|
onChange(nextValues);
|
|
@@ -3815,7 +3836,7 @@ var CopyToClipboardButton = ({
|
|
|
3815
3836
|
),
|
|
3816
3837
|
initial: false,
|
|
3817
3838
|
animate: { opacity: isHoverable ? void 0 : 1 },
|
|
3818
|
-
transition:
|
|
3839
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3819
3840
|
children: [
|
|
3820
3841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3821
3842
|
Button,
|
|
@@ -3832,7 +3853,7 @@ var CopyToClipboardButton = ({
|
|
|
3832
3853
|
initial: { scale: 0.6, opacity: 0 },
|
|
3833
3854
|
animate: { scale: 1, opacity: 1 },
|
|
3834
3855
|
exit: { scale: 0.6, opacity: 0 },
|
|
3835
|
-
transition:
|
|
3856
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3836
3857
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3837
3858
|
lucideReact.Check,
|
|
3838
3859
|
{
|
|
@@ -3848,7 +3869,7 @@ var CopyToClipboardButton = ({
|
|
|
3848
3869
|
initial: { scale: 0.6, opacity: 0 },
|
|
3849
3870
|
animate: { scale: 1, opacity: 1 },
|
|
3850
3871
|
exit: { scale: 0.6, opacity: 0 },
|
|
3851
|
-
transition:
|
|
3872
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3852
3873
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4 text-muted-foreground", "aria-hidden": true })
|
|
3853
3874
|
},
|
|
3854
3875
|
"copy"
|
|
@@ -3861,7 +3882,7 @@ var CopyToClipboardButton = ({
|
|
|
3861
3882
|
layout: true,
|
|
3862
3883
|
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
3884
|
animate: { opacity: isCopying ? 1 : 0.9 },
|
|
3864
|
-
transition:
|
|
3885
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
3865
3886
|
children: isCopying ? copiedLabel : copyLabel
|
|
3866
3887
|
}
|
|
3867
3888
|
)
|
|
@@ -3948,11 +3969,12 @@ function StepperItem({
|
|
|
3948
3969
|
}
|
|
3949
3970
|
var Stepper = React8__namespace.forwardRef(
|
|
3950
3971
|
({ steps, currentStep, orientation = "horizontal", className, ...props }, ref) => {
|
|
3972
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
3951
3973
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3952
3974
|
"ol",
|
|
3953
3975
|
{
|
|
3954
3976
|
ref,
|
|
3955
|
-
"aria-label": "
|
|
3977
|
+
"aria-label": t("STEPPER.PROGRESS"),
|
|
3956
3978
|
className: chunkYAF2X7W5_cjs.cn(
|
|
3957
3979
|
"flex w-full",
|
|
3958
3980
|
orientation === "vertical" ? "flex-col gap-4" : "flex-row items-start gap-2",
|
|
@@ -4142,6 +4164,7 @@ var CarouselItem = React8__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
4142
4164
|
});
|
|
4143
4165
|
CarouselItem.displayName = "CarouselItem";
|
|
4144
4166
|
var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4167
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
4145
4168
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
4146
4169
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4147
4170
|
Button,
|
|
@@ -4159,13 +4182,14 @@ var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "out
|
|
|
4159
4182
|
...props,
|
|
4160
4183
|
children: [
|
|
4161
4184
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "h-4 w-4" }),
|
|
4162
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4185
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("CAROUSEL.PREVIOUS_SLIDE") })
|
|
4163
4186
|
]
|
|
4164
4187
|
}
|
|
4165
4188
|
);
|
|
4166
4189
|
});
|
|
4167
4190
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
4168
4191
|
var CarouselNext = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4192
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
4169
4193
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
4170
4194
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4171
4195
|
Button,
|
|
@@ -4183,7 +4207,7 @@ var CarouselNext = React8__namespace.forwardRef(({ className, variant = "outline
|
|
|
4183
4207
|
...props,
|
|
4184
4208
|
children: [
|
|
4185
4209
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4" }),
|
|
4186
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4210
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("CAROUSEL.NEXT_SLIDE") })
|
|
4187
4211
|
]
|
|
4188
4212
|
}
|
|
4189
4213
|
);
|
|
@@ -4389,7 +4413,8 @@ var ContextMenuShortcut = ({
|
|
|
4389
4413
|
};
|
|
4390
4414
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
4391
4415
|
var PasswordInput = React8__namespace.forwardRef(
|
|
4392
|
-
({ className, toggleAriaLabel
|
|
4416
|
+
({ className, toggleAriaLabel, ...props }, ref) => {
|
|
4417
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
4393
4418
|
const [visible, setVisible] = React8__namespace.useState(false);
|
|
4394
4419
|
const Icon2 = visible ? lucideReact.EyeOff : lucideReact.Eye;
|
|
4395
4420
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYAF2X7W5_cjs.cn("relative", className), children: [
|
|
@@ -4406,7 +4431,7 @@ var PasswordInput = React8__namespace.forwardRef(
|
|
|
4406
4431
|
"button",
|
|
4407
4432
|
{
|
|
4408
4433
|
type: "button",
|
|
4409
|
-
"aria-label": toggleAriaLabel,
|
|
4434
|
+
"aria-label": toggleAriaLabel ?? t("PASSWORD_INPUT.TOGGLE_VISIBILITY"),
|
|
4410
4435
|
onClick: () => setVisible((v) => !v),
|
|
4411
4436
|
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
4437
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4" })
|
|
@@ -5228,7 +5253,7 @@ var InfiniteScroller = ({
|
|
|
5228
5253
|
initial: { opacity: 0, height: 0 },
|
|
5229
5254
|
animate: { opacity: 1, height: "auto" },
|
|
5230
5255
|
exit: { opacity: 0, height: 0 },
|
|
5231
|
-
transition:
|
|
5256
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5232
5257
|
children: loadingIndicator
|
|
5233
5258
|
},
|
|
5234
5259
|
"loading"
|
|
@@ -5239,10 +5264,10 @@ var InfiniteScroller = ({
|
|
|
5239
5264
|
framerMotion.motion.div,
|
|
5240
5265
|
{
|
|
5241
5266
|
layout: true,
|
|
5242
|
-
variants:
|
|
5267
|
+
variants: chunkIPMRZNNS_cjs.fadeInUp,
|
|
5243
5268
|
initial: "initial",
|
|
5244
5269
|
animate: "animate",
|
|
5245
|
-
transition:
|
|
5270
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5246
5271
|
children: renderItem(item, index)
|
|
5247
5272
|
},
|
|
5248
5273
|
key
|
|
@@ -5254,7 +5279,7 @@ var InfiniteScroller = ({
|
|
|
5254
5279
|
className: "flex h-full items-center justify-center text-muted-foreground",
|
|
5255
5280
|
initial: { opacity: 0 },
|
|
5256
5281
|
animate: { opacity: 1 },
|
|
5257
|
-
transition:
|
|
5282
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5258
5283
|
children: emptyContent ?? "No items"
|
|
5259
5284
|
}
|
|
5260
5285
|
) }),
|
|
@@ -5265,7 +5290,7 @@ var InfiniteScroller = ({
|
|
|
5265
5290
|
initial: { opacity: 0, y: 16 },
|
|
5266
5291
|
animate: { opacity: 1, y: 0 },
|
|
5267
5292
|
exit: { opacity: 0, y: 12 },
|
|
5268
|
-
transition:
|
|
5293
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5269
5294
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5270
5295
|
framerMotion.motion.div,
|
|
5271
5296
|
{
|
|
@@ -5310,6 +5335,7 @@ var useFileUpload = () => {
|
|
|
5310
5335
|
}
|
|
5311
5336
|
return context;
|
|
5312
5337
|
};
|
|
5338
|
+
var I18N_MODULE2 = "genesis.shared";
|
|
5313
5339
|
var FileUploader = React8.forwardRef(
|
|
5314
5340
|
({
|
|
5315
5341
|
className,
|
|
@@ -5345,14 +5371,18 @@ var FileUploader = React8.forwardRef(
|
|
|
5345
5371
|
);
|
|
5346
5372
|
React8.useEffect(() => {
|
|
5347
5373
|
if (isFileTooBig) {
|
|
5348
|
-
|
|
5374
|
+
chunk4RZMYO3F_cjs.showErrorToast({
|
|
5375
|
+
errors: chunkKZ3NZCXZ_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_BIG")
|
|
5376
|
+
});
|
|
5349
5377
|
}
|
|
5350
5378
|
}, [isFileTooBig]);
|
|
5351
5379
|
const onDrop = React8.useCallback(
|
|
5352
5380
|
(acceptedFiles, rejectedFiles) => {
|
|
5353
5381
|
const files = acceptedFiles;
|
|
5354
5382
|
if (!files) {
|
|
5355
|
-
|
|
5383
|
+
chunk4RZMYO3F_cjs.showErrorToast({
|
|
5384
|
+
errors: chunkKZ3NZCXZ_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.FILE_ERROR")
|
|
5385
|
+
});
|
|
5356
5386
|
return;
|
|
5357
5387
|
}
|
|
5358
5388
|
const newValues = value ? [...value] : [];
|
|
@@ -5370,17 +5400,21 @@ var FileUploader = React8.forwardRef(
|
|
|
5370
5400
|
const firstError = rejection?.errors[0];
|
|
5371
5401
|
if (!firstError) continue;
|
|
5372
5402
|
if (firstError.code === "file-too-large") {
|
|
5373
|
-
|
|
5374
|
-
errors:
|
|
5403
|
+
chunk4RZMYO3F_cjs.showErrorToast({
|
|
5404
|
+
errors: chunkKZ3NZCXZ_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_LARGE", {
|
|
5405
|
+
size: maxSize / 1024 / 1024
|
|
5406
|
+
})
|
|
5375
5407
|
});
|
|
5376
5408
|
break;
|
|
5377
5409
|
}
|
|
5378
5410
|
if (firstError.code === "file-invalid-type") {
|
|
5379
|
-
|
|
5411
|
+
chunk4RZMYO3F_cjs.showErrorToast({
|
|
5412
|
+
errors: chunkKZ3NZCXZ_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.INVALID_TYPE")
|
|
5413
|
+
});
|
|
5380
5414
|
break;
|
|
5381
5415
|
}
|
|
5382
5416
|
if (firstError.message) {
|
|
5383
|
-
|
|
5417
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: firstError.message });
|
|
5384
5418
|
break;
|
|
5385
5419
|
}
|
|
5386
5420
|
}
|
|
@@ -5526,6 +5560,7 @@ var FileUploaderContent = React8.forwardRef(({ children, className, ...props },
|
|
|
5526
5560
|
});
|
|
5527
5561
|
FileUploaderContent.displayName = "FileUploaderContent";
|
|
5528
5562
|
var FileUploaderItem = React8.forwardRef(({ className, index, children, ...props }, ref) => {
|
|
5563
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(I18N_MODULE2);
|
|
5529
5564
|
const { removeFileFromSet, activeIndex, direction } = useFileUpload();
|
|
5530
5565
|
const isSelected = index === activeIndex;
|
|
5531
5566
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5551,10 +5586,7 @@ var FileUploaderItem = React8.forwardRef(({ className, index, children, ...props
|
|
|
5551
5586
|
),
|
|
5552
5587
|
onClick: () => removeFileFromSet(index),
|
|
5553
5588
|
children: [
|
|
5554
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5555
|
-
"remove item ",
|
|
5556
|
-
index
|
|
5557
|
-
] }),
|
|
5589
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("FILE_UPLOADER.REMOVE_ITEM", { index }) }),
|
|
5558
5590
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4 duration-200 ease-in-out hover:stroke-destructive" })
|
|
5559
5591
|
]
|
|
5560
5592
|
}
|
|
@@ -5767,7 +5799,10 @@ var SelectSeparator = React8__namespace.forwardRef(({ className, ...props }, ref
|
|
|
5767
5799
|
}
|
|
5768
5800
|
));
|
|
5769
5801
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5770
|
-
var Breadcrumb = React8__namespace.forwardRef(({ ...props }, ref) =>
|
|
5802
|
+
var Breadcrumb = React8__namespace.forwardRef(({ ...props }, ref) => {
|
|
5803
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
5804
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": t("BREADCRUMB.NAV_ARIA"), ...props });
|
|
5805
|
+
});
|
|
5771
5806
|
Breadcrumb.displayName = "Breadcrumb";
|
|
5772
5807
|
var BreadcrumbList = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5773
5808
|
"ol",
|
|
@@ -5832,19 +5867,21 @@ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
|
5832
5867
|
var BreadcrumbEllipsis = ({
|
|
5833
5868
|
className,
|
|
5834
5869
|
...props
|
|
5835
|
-
}) =>
|
|
5836
|
-
"
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5870
|
+
}) => {
|
|
5871
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
5872
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5873
|
+
"span",
|
|
5874
|
+
{
|
|
5875
|
+
"aria-hidden": "true",
|
|
5876
|
+
className: chunkYAF2X7W5_cjs.cn("flex h-9 w-9 items-center justify-center", className),
|
|
5877
|
+
...props,
|
|
5878
|
+
children: [
|
|
5879
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
5880
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("BREADCRUMB.MORE") })
|
|
5881
|
+
]
|
|
5882
|
+
}
|
|
5883
|
+
);
|
|
5884
|
+
};
|
|
5848
5885
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
5849
5886
|
var Timeline = ({
|
|
5850
5887
|
events,
|
|
@@ -5903,14 +5940,14 @@ var Timeline = ({
|
|
|
5903
5940
|
framerMotion.motion.div,
|
|
5904
5941
|
{
|
|
5905
5942
|
className: chunkYAF2X7W5_cjs.cn("mt-4 flex flex-col items-start md:mt-5", className),
|
|
5906
|
-
variants:
|
|
5943
|
+
variants: chunkIPMRZNNS_cjs.staggerContainer,
|
|
5907
5944
|
initial: "initial",
|
|
5908
5945
|
animate: "animate",
|
|
5909
5946
|
children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5910
5947
|
framerMotion.motion.div,
|
|
5911
5948
|
{
|
|
5912
|
-
variants:
|
|
5913
|
-
transition:
|
|
5949
|
+
variants: chunkIPMRZNNS_cjs.staggerItem,
|
|
5950
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
5914
5951
|
className: "flex min-h-[66px] w-full",
|
|
5915
5952
|
children: [
|
|
5916
5953
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYAF2X7W5_cjs.cn("relative", isMobile ? "w-[30%]" : "w-[16%]"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5919,7 +5956,7 @@ var Timeline = ({
|
|
|
5919
5956
|
className: "absolute -top-1.5 w-full pr-[18px] text-right md:pr-5",
|
|
5920
5957
|
initial: { opacity: 0, x: -6 },
|
|
5921
5958
|
animate: { opacity: 1, x: 0 },
|
|
5922
|
-
transition: { ...
|
|
5959
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 },
|
|
5923
5960
|
children: leftContent ? leftContent(event) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5924
5961
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.time }),
|
|
5925
5962
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.date })
|
|
@@ -5936,7 +5973,7 @@ var Timeline = ({
|
|
|
5936
5973
|
),
|
|
5937
5974
|
initial: { scaleY: 0 },
|
|
5938
5975
|
animate: { scaleY: 1 },
|
|
5939
|
-
transition: { ...
|
|
5976
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 }
|
|
5940
5977
|
}
|
|
5941
5978
|
) : null,
|
|
5942
5979
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5945,7 +5982,7 @@ var Timeline = ({
|
|
|
5945
5982
|
className: "bg-primary relative z-10 size-4 rounded-full",
|
|
5946
5983
|
initial: { scale: 0 },
|
|
5947
5984
|
animate: { scale: 1 },
|
|
5948
|
-
transition: { ...
|
|
5985
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: index * 0.05 + 0.04 }
|
|
5949
5986
|
}
|
|
5950
5987
|
)
|
|
5951
5988
|
] }),
|
|
@@ -5998,11 +6035,11 @@ var ImportFileModalContent = ({
|
|
|
5998
6035
|
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
6036
|
framerMotion.motion.div,
|
|
6000
6037
|
{
|
|
6001
|
-
variants:
|
|
6038
|
+
variants: chunkIPMRZNNS_cjs.fadeInScale,
|
|
6002
6039
|
initial: "initial",
|
|
6003
6040
|
animate: "animate",
|
|
6004
6041
|
exit: "exit",
|
|
6005
|
-
transition:
|
|
6042
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6006
6043
|
children: [
|
|
6007
6044
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6008
6045
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: dialogTitle }),
|
|
@@ -6014,7 +6051,7 @@ var ImportFileModalContent = ({
|
|
|
6014
6051
|
className: "flex flex-col rounded-md bg-muted/50 px-3 py-2",
|
|
6015
6052
|
initial: { opacity: 0, y: 6 },
|
|
6016
6053
|
animate: { opacity: 1, y: 0 },
|
|
6017
|
-
transition: { ...
|
|
6054
|
+
transition: { ...chunkIPMRZNNS_cjs.fadeTransition, delay: 0.05 },
|
|
6018
6055
|
children: [
|
|
6019
6056
|
/* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.div, { className: "flex flex-row items-center", children: [
|
|
6020
6057
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6051,7 +6088,7 @@ var ImportFileModalContent = ({
|
|
|
6051
6088
|
initial: { opacity: 0, x: -8 },
|
|
6052
6089
|
animate: { opacity: 1, x: 0 },
|
|
6053
6090
|
exit: { opacity: 0, x: 8 },
|
|
6054
|
-
transition:
|
|
6091
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6055
6092
|
children: /* @__PURE__ */ jsxRuntime.jsxs(FileUploaderItem, { index, children: [
|
|
6056
6093
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6057
6094
|
lucideReact.Paperclip,
|
|
@@ -6101,11 +6138,11 @@ var ImportFileModalContent = ({
|
|
|
6101
6138
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6102
6139
|
framerMotion.motion.div,
|
|
6103
6140
|
{
|
|
6104
|
-
variants:
|
|
6141
|
+
variants: chunkIPMRZNNS_cjs.fadeInScale,
|
|
6105
6142
|
initial: "initial",
|
|
6106
6143
|
animate: "animate",
|
|
6107
6144
|
exit: "exit",
|
|
6108
|
-
transition:
|
|
6145
|
+
transition: chunkIPMRZNNS_cjs.fadeTransition,
|
|
6109
6146
|
children: [
|
|
6110
6147
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6111
6148
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: processingTitle }),
|
|
@@ -6476,6 +6513,7 @@ var AppTile = ({
|
|
|
6476
6513
|
app,
|
|
6477
6514
|
isLoading
|
|
6478
6515
|
}) => {
|
|
6516
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
6479
6517
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6480
6518
|
"a",
|
|
6481
6519
|
{
|
|
@@ -6493,24 +6531,26 @@ var AppTile = ({
|
|
|
6493
6531
|
),
|
|
6494
6532
|
children: [
|
|
6495
6533
|
/* @__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 ? "
|
|
6534
|
+
/* @__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
6535
|
]
|
|
6498
6536
|
}
|
|
6499
6537
|
);
|
|
6500
6538
|
};
|
|
6501
6539
|
function AppSwitcherContent({ apps }) {
|
|
6540
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
6502
6541
|
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: "
|
|
6542
|
+
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
6543
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 border-t px-3 pb-4 pt-3", children: [
|
|
6505
6544
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-2 px-1 text-[13px] font-semibold", children: "SELISE Blocks" }),
|
|
6506
6545
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3", children: apps.map((app) => /* @__PURE__ */ jsxRuntime.jsx(AppTile, { app, isLoading: app.isLoading }, app.id)) })
|
|
6507
6546
|
] });
|
|
6508
6547
|
}
|
|
6509
6548
|
function AppSwitcherTrigger({ open }) {
|
|
6549
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
6510
6550
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6511
6551
|
"button",
|
|
6512
6552
|
{
|
|
6513
|
-
"aria-label": "
|
|
6553
|
+
"aria-label": t("APP_SWITCHER_TRIGGER.ARIA"),
|
|
6514
6554
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6515
6555
|
"text-muted-foreground flex h-9 w-9 items-center justify-center rounded-full transition-colors",
|
|
6516
6556
|
"hover:bg-accent hover:text-foreground focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2",
|
|
@@ -6667,7 +6707,7 @@ var parseAllowedServices = (raw) => {
|
|
|
6667
6707
|
);
|
|
6668
6708
|
};
|
|
6669
6709
|
var allowedServiceIds = parseAllowedServices(
|
|
6670
|
-
|
|
6710
|
+
chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_ALLOWED_SERVICES")
|
|
6671
6711
|
);
|
|
6672
6712
|
var isAppAllowed = (app) => {
|
|
6673
6713
|
if (!allowedServiceIds) return true;
|
|
@@ -6686,8 +6726,8 @@ function useAppRedirectUrls({
|
|
|
6686
6726
|
}) {
|
|
6687
6727
|
const queryClient = reactQuery.useQueryClient();
|
|
6688
6728
|
const requests = apps.map((app) => {
|
|
6689
|
-
const clientId =
|
|
6690
|
-
const redirectUri =
|
|
6729
|
+
const clientId = chunkTSRDXJUG_cjs.getRuntimeEnv(app.clientId);
|
|
6730
|
+
const redirectUri = chunkTSRDXJUG_cjs.getRuntimeEnv(app.redirectUri);
|
|
6691
6731
|
const forwardedTo = resolveForwardedTo(app);
|
|
6692
6732
|
return {
|
|
6693
6733
|
app,
|
|
@@ -6701,7 +6741,7 @@ function useAppRedirectUrls({
|
|
|
6701
6741
|
queries: requests.map(
|
|
6702
6742
|
({ clientId, redirectUri, forwardedTo, queryKey }) => ({
|
|
6703
6743
|
queryKey,
|
|
6704
|
-
queryFn: ({ signal }) =>
|
|
6744
|
+
queryFn: ({ signal }) => chunkVLZJP6FH_cjs.initiateService.fetchRedirectUrl(
|
|
6705
6745
|
{ clientId, redirectUri, forwardedTo },
|
|
6706
6746
|
signal
|
|
6707
6747
|
),
|
|
@@ -6740,13 +6780,13 @@ function useAppRedirectUrls({
|
|
|
6740
6780
|
}
|
|
6741
6781
|
var AppSwitcher = ({ forwardedTo }) => {
|
|
6742
6782
|
const [open, setOpen] = React8.useState(false);
|
|
6743
|
-
const config =
|
|
6783
|
+
const config = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
6744
6784
|
const filteredApps = React8.useMemo(
|
|
6745
6785
|
() => filteredAppSwitcherData.filter((app) => app.id !== config.name),
|
|
6746
6786
|
[config.name]
|
|
6747
6787
|
);
|
|
6748
6788
|
const resolveForwardedTo = React8.useCallback(
|
|
6749
|
-
(app) => app.forwardedTo ?? forwardedTo ??
|
|
6789
|
+
(app) => app.forwardedTo ?? forwardedTo ?? chunk4RZMYO3F_cjs.getForwardedToPath(),
|
|
6750
6790
|
[forwardedTo]
|
|
6751
6791
|
);
|
|
6752
6792
|
const blocksApps = useAppRedirectUrls({
|
|
@@ -6768,9 +6808,19 @@ var AppSwitcher = ({ forwardedTo }) => {
|
|
|
6768
6808
|
] });
|
|
6769
6809
|
};
|
|
6770
6810
|
var OPTIONS = {
|
|
6771
|
-
system: { Icon: lucideReact.Monitor
|
|
6772
|
-
light: { Icon: lucideReact.Sun
|
|
6773
|
-
dark: { Icon: lucideReact.Moon
|
|
6811
|
+
system: { Icon: lucideReact.Monitor },
|
|
6812
|
+
light: { Icon: lucideReact.Sun },
|
|
6813
|
+
dark: { Icon: lucideReact.Moon }
|
|
6814
|
+
};
|
|
6815
|
+
var getLabel = (t, option) => {
|
|
6816
|
+
switch (option) {
|
|
6817
|
+
case "system":
|
|
6818
|
+
return t("THEME_SWITCHER.AUTO");
|
|
6819
|
+
case "light":
|
|
6820
|
+
return t("THEME_SWITCHER.LIGHT");
|
|
6821
|
+
default:
|
|
6822
|
+
return t("THEME_SWITCHER.DARK");
|
|
6823
|
+
}
|
|
6774
6824
|
};
|
|
6775
6825
|
var OPTION_ORDER = ["system", "light", "dark"];
|
|
6776
6826
|
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 +6829,15 @@ function ThemeSwitcher({
|
|
|
6779
6829
|
className,
|
|
6780
6830
|
showChevron = true
|
|
6781
6831
|
} = {}) {
|
|
6782
|
-
const {
|
|
6832
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
6833
|
+
const { theme, setTheme } = chunkVLZJP6FH_cjs.useTheme();
|
|
6783
6834
|
const { Icon: ThemeIcon } = OPTIONS[theme];
|
|
6784
6835
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6785
6836
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6786
6837
|
"button",
|
|
6787
6838
|
{
|
|
6788
6839
|
type: "button",
|
|
6789
|
-
"aria-label": "
|
|
6840
|
+
"aria-label": t("THEME_SWITCHER.CHANGE_THEME"),
|
|
6790
6841
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6791
6842
|
TRIGGER_BASE_CLASSES,
|
|
6792
6843
|
className ?? TRIGGER_DEFAULT_TYPOGRAPHY_CLASSES
|
|
@@ -6804,14 +6855,15 @@ function ThemeSwitcher({
|
|
|
6804
6855
|
}
|
|
6805
6856
|
) }),
|
|
6806
6857
|
/* @__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: "
|
|
6858
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: t("THEME_SWITCHER.APPEARANCE") }),
|
|
6808
6859
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6809
6860
|
DropdownMenuRadioGroup,
|
|
6810
6861
|
{
|
|
6811
6862
|
value: theme,
|
|
6812
6863
|
onValueChange: (value) => setTheme(value),
|
|
6813
6864
|
children: OPTION_ORDER.map((value) => {
|
|
6814
|
-
const { Icon: Icon2
|
|
6865
|
+
const { Icon: Icon2 } = OPTIONS[value];
|
|
6866
|
+
const label = getLabel(t, value);
|
|
6815
6867
|
const isActive = value === theme;
|
|
6816
6868
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6817
6869
|
DropdownMenuRadioItem,
|
|
@@ -6847,12 +6899,12 @@ function ThemeSwitcher({
|
|
|
6847
6899
|
// src/services/user.service.ts
|
|
6848
6900
|
var UserService = class {
|
|
6849
6901
|
async getUserInfo() {
|
|
6850
|
-
return
|
|
6902
|
+
return chunkIPMRZNNS_cjs.iamClient.get(`${chunkIPMRZNNS_cjs.PROFILE_ENDPOINTS.ME}`);
|
|
6851
6903
|
}
|
|
6852
6904
|
};
|
|
6853
6905
|
var userService = new UserService();
|
|
6854
6906
|
var useGetUserInfo = (options) => {
|
|
6855
|
-
const userStore =
|
|
6907
|
+
const userStore = chunkRO55MFZA_cjs.useUserStore();
|
|
6856
6908
|
return reactQuery.useQuery({
|
|
6857
6909
|
queryKey: ["user-info"],
|
|
6858
6910
|
queryFn: async () => {
|
|
@@ -6864,7 +6916,7 @@ var useGetUserInfo = (options) => {
|
|
|
6864
6916
|
});
|
|
6865
6917
|
};
|
|
6866
6918
|
function UserAvatar({ size = "sm" }) {
|
|
6867
|
-
const { userDetails: userData } =
|
|
6919
|
+
const { userDetails: userData } = chunkRO55MFZA_cjs.useUserStore();
|
|
6868
6920
|
const initials = `${userData?.firstName?.[0] || ""}${userData?.lastName?.[0] || ""}`.toUpperCase();
|
|
6869
6921
|
const sizeClass = size === "lg" ? "h-14 w-14 text-xl" : "h-10 w-10 text-base";
|
|
6870
6922
|
if (userData?.profileImageUrl) {
|
|
@@ -6889,14 +6941,15 @@ function UserAvatar({ size = "sm" }) {
|
|
|
6889
6941
|
);
|
|
6890
6942
|
}
|
|
6891
6943
|
function UserDropdownMenu() {
|
|
6892
|
-
const {
|
|
6944
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
6945
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
6893
6946
|
const { data } = useGetUserInfo();
|
|
6894
6947
|
const userData = data?.data;
|
|
6895
|
-
const { isPending, mutateAsync } =
|
|
6896
|
-
const { resetProjectStore } =
|
|
6897
|
-
const { setUnAuthenticated, clearTokens } =
|
|
6898
|
-
const { resetSelectedLanguages } =
|
|
6899
|
-
const { data: myOrgsData, isLoading: isOrgsLoading } =
|
|
6948
|
+
const { isPending, mutateAsync } = chunkVLZJP6FH_cjs.useLogout();
|
|
6949
|
+
const { resetProjectStore } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
6950
|
+
const { setUnAuthenticated, clearTokens } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
6951
|
+
const { resetSelectedLanguages } = chunkRO55MFZA_cjs.useLanguageViewStore();
|
|
6952
|
+
const { data: myOrgsData, isLoading: isOrgsLoading } = chunkVLZJP6FH_cjs.useGetMyOrganizations();
|
|
6900
6953
|
const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
|
|
6901
6954
|
const email = userData?.email || "";
|
|
6902
6955
|
const roles = Object.values(userData?.roles || {}).flat();
|
|
@@ -6921,7 +6974,7 @@ function UserDropdownMenu() {
|
|
|
6921
6974
|
variant: "link",
|
|
6922
6975
|
size: "icon",
|
|
6923
6976
|
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": "
|
|
6977
|
+
"aria-label": t("USER_DROPDOWN_MENU.OPEN_MENU"),
|
|
6925
6978
|
children: /* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { size: "sm" })
|
|
6926
6979
|
}
|
|
6927
6980
|
) }),
|
|
@@ -6935,7 +6988,10 @@ function UserDropdownMenu() {
|
|
|
6935
6988
|
/* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { size: "lg" }),
|
|
6936
6989
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6937
6990
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-sm font-semibold text-foreground", children: [
|
|
6938
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6991
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
|
|
6992
|
+
t("USER_DROPDOWN_MENU.USER_NAME"),
|
|
6993
|
+
" "
|
|
6994
|
+
] }),
|
|
6939
6995
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: fullName })
|
|
6940
6996
|
] }),
|
|
6941
6997
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: email }),
|
|
@@ -6943,7 +6999,8 @@ function UserDropdownMenu() {
|
|
|
6943
6999
|
roles.join(", "),
|
|
6944
7000
|
userData?.lastUsedOrganizationId && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground/60", children: [
|
|
6945
7001
|
" ",
|
|
6946
|
-
"\u2022
|
|
7002
|
+
"\u2022 ",
|
|
7003
|
+
t("USER_DROPDOWN_MENU.DEFAULT")
|
|
6947
7004
|
] })
|
|
6948
7005
|
] })
|
|
6949
7006
|
] })
|
|
@@ -6957,7 +7014,7 @@ function UserDropdownMenu() {
|
|
|
6957
7014
|
className: "cursor-pointer rounded-md px-4 py-3.5",
|
|
6958
7015
|
children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouter.Link, { to: "/app/profile", className: "flex items-center gap-4", children: [
|
|
6959
7016
|
/* @__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: "
|
|
7017
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: t("USER_DROPDOWN_MENU.MY_PROFILE") })
|
|
6961
7018
|
] })
|
|
6962
7019
|
}
|
|
6963
7020
|
) })
|
|
@@ -6967,7 +7024,7 @@ function UserDropdownMenu() {
|
|
|
6967
7024
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuGroup, { className: "p-1.5", children: [
|
|
6968
7025
|
/* @__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
7026
|
/* @__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: "
|
|
7027
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: t("USER_DROPDOWN_MENU.ORGANIZATIONS") })
|
|
6971
7028
|
] }),
|
|
6972
7029
|
/* @__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
7030
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-9 w-full rounded-md" }),
|
|
@@ -7011,7 +7068,7 @@ function UserDropdownMenu() {
|
|
|
7011
7068
|
},
|
|
7012
7069
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
7013
7070
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "h-5 w-5 shrink-0" }),
|
|
7014
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "
|
|
7071
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: t("USER_DROPDOWN_MENU.LOG_OUT") })
|
|
7015
7072
|
] })
|
|
7016
7073
|
}
|
|
7017
7074
|
) })
|
|
@@ -7020,13 +7077,11 @@ function UserDropdownMenu() {
|
|
|
7020
7077
|
)
|
|
7021
7078
|
] });
|
|
7022
7079
|
}
|
|
7023
|
-
var languages = [
|
|
7024
|
-
{ key: "en", title: "English" },
|
|
7025
|
-
{ key: "de", title: "German" },
|
|
7026
|
-
{ key: "fr", title: "French" }
|
|
7027
|
-
];
|
|
7028
7080
|
function LanguageSelector() {
|
|
7029
|
-
const { changeLanguage
|
|
7081
|
+
const { changeLanguage } = chunkVLZJP6FH_cjs.useLanguageSwitcher();
|
|
7082
|
+
const language = chunkKZ3NZCXZ_cjs.useDocumentLanguage();
|
|
7083
|
+
const languages = chunkKZ3NZCXZ_cjs.useLanguagesStore((state) => state.languages);
|
|
7084
|
+
if (languages.length < 2) return null;
|
|
7030
7085
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
7031
7086
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7032
7087
|
"button",
|
|
@@ -7039,18 +7094,18 @@ function LanguageSelector() {
|
|
|
7039
7094
|
]
|
|
7040
7095
|
}
|
|
7041
7096
|
) }),
|
|
7042
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: languages.map((lang, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7097
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", children: languages.map((lang, index) => /* @__PURE__ */ jsxRuntime.jsxs(React8.Fragment, { children: [
|
|
7043
7098
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7044
7099
|
DropdownMenuItem,
|
|
7045
7100
|
{
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7101
|
+
lang: lang.code,
|
|
7102
|
+
className: lang.code === language ? "font-semibold" : "",
|
|
7103
|
+
onClick: () => changeLanguage(lang.code),
|
|
7049
7104
|
children: lang.title
|
|
7050
7105
|
}
|
|
7051
7106
|
),
|
|
7052
7107
|
index !== languages.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
|
|
7053
|
-
] }, lang.
|
|
7108
|
+
] }, lang.code)) })
|
|
7054
7109
|
] });
|
|
7055
7110
|
}
|
|
7056
7111
|
|
|
@@ -7090,7 +7145,7 @@ function Logo({
|
|
|
7090
7145
|
)
|
|
7091
7146
|
] });
|
|
7092
7147
|
}
|
|
7093
|
-
var logicOrigin = () =>
|
|
7148
|
+
var logicOrigin = () => chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_LOGIC_BASE_URL").trim().replace(/\/$/, "");
|
|
7094
7149
|
var RETRY_DELAYS_MS = [2e3, 5e3, 15e3, 3e4];
|
|
7095
7150
|
var STEADY_RETRY_MS = 6e4;
|
|
7096
7151
|
var isLoggedOut = (error) => error?.status === 401;
|
|
@@ -7111,7 +7166,7 @@ var NotificationListenerService = class {
|
|
|
7111
7166
|
inFlight;
|
|
7112
7167
|
constructor() {
|
|
7113
7168
|
this.connection = new signalr.HubConnectionBuilder().withUrl(
|
|
7114
|
-
`${logicOrigin()}/api/NotificationHub?x-blocks-key=${
|
|
7169
|
+
`${logicOrigin()}/api/NotificationHub?x-blocks-key=${chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_X_BLOCKS_KEY")}`,
|
|
7115
7170
|
{
|
|
7116
7171
|
transport: signalr.HttpTransportType.WebSockets,
|
|
7117
7172
|
// One request opens the socket, so it cannot split across Api pods without sticky sessions.
|
|
@@ -7164,7 +7219,7 @@ var NotificationListenerService = class {
|
|
|
7164
7219
|
if (refreshLogin && navigator.onLine === false) return;
|
|
7165
7220
|
try {
|
|
7166
7221
|
if (refreshLogin)
|
|
7167
|
-
await refreshLoginCall(
|
|
7222
|
+
await refreshLoginCall(chunkVLZJP6FH_cjs.notificationService.getNotifications(1, 1));
|
|
7168
7223
|
if (!this.wanted) return;
|
|
7169
7224
|
await this.connection.start();
|
|
7170
7225
|
this.attempt = 0;
|
|
@@ -7189,7 +7244,7 @@ var notificationListenerService = new NotificationListenerService();
|
|
|
7189
7244
|
|
|
7190
7245
|
// src/components/common/notification/use-notification-socket.ts
|
|
7191
7246
|
function useNotificationSocket() {
|
|
7192
|
-
const { data: configData } =
|
|
7247
|
+
const { data: configData } = chunkVLZJP6FH_cjs.useGetBlocksNotificationConfig(0, 100);
|
|
7193
7248
|
const queryClient = reactQuery.useQueryClient();
|
|
7194
7249
|
notificationListenerService.connect();
|
|
7195
7250
|
React8.useEffect(() => {
|
|
@@ -7204,7 +7259,7 @@ function useNotificationSocket() {
|
|
|
7204
7259
|
notificationListenerService.connection.on(
|
|
7205
7260
|
config.notifyMethod,
|
|
7206
7261
|
(message) => {
|
|
7207
|
-
|
|
7262
|
+
chunkVLZJP6FH_cjs.notificationService.getNotificationConfig(config, message);
|
|
7208
7263
|
try {
|
|
7209
7264
|
const notice = typeof message === "string" ? JSON.parse(message) : message;
|
|
7210
7265
|
const denom = JSON.parse(
|
|
@@ -7228,12 +7283,12 @@ function useNotificationFeed(open) {
|
|
|
7228
7283
|
const [notifications, setNotifications] = React8.useState([]);
|
|
7229
7284
|
const [hasMore, setHasMore] = React8.useState(true);
|
|
7230
7285
|
const listRef = React8.useRef(null);
|
|
7231
|
-
const { data, isLoading, isFetching } =
|
|
7286
|
+
const { data, isLoading, isFetching } = chunkVLZJP6FH_cjs.useGetNotifications(
|
|
7232
7287
|
pageNumber,
|
|
7233
7288
|
PAGE_SIZE
|
|
7234
7289
|
);
|
|
7235
|
-
const markAsRead =
|
|
7236
|
-
const markAllAsRead =
|
|
7290
|
+
const markAsRead = chunkVLZJP6FH_cjs.useMarkAsRead();
|
|
7291
|
+
const markAllAsRead = chunkVLZJP6FH_cjs.useMarkAllAsRead();
|
|
7237
7292
|
React8.useEffect(() => {
|
|
7238
7293
|
if (!data?.notifications) return;
|
|
7239
7294
|
setNotifications((prev) => {
|
|
@@ -7312,24 +7367,27 @@ function NotificationBell({ unreadCount }) {
|
|
|
7312
7367
|
function NotificationHeader({
|
|
7313
7368
|
onMarkAllAsRead
|
|
7314
7369
|
}) {
|
|
7370
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7315
7371
|
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: "
|
|
7372
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-primary", children: t("NOTIFICATION_HEADER.TITLE") }),
|
|
7317
7373
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7318
7374
|
"button",
|
|
7319
7375
|
{
|
|
7320
7376
|
onClick: onMarkAllAsRead,
|
|
7321
7377
|
className: "text-xs text-muted-foreground hover:text-primary hover:underline",
|
|
7322
|
-
children: "
|
|
7378
|
+
children: t("NOTIFICATION_HEADER.MARK_ALL_READ")
|
|
7323
7379
|
}
|
|
7324
7380
|
)
|
|
7325
7381
|
] });
|
|
7326
7382
|
}
|
|
7327
7383
|
|
|
7328
7384
|
// src/components/common/notification/utils.ts
|
|
7329
|
-
|
|
7330
|
-
|
|
7385
|
+
var MODULE = "genesis.shared";
|
|
7386
|
+
var defaultT = (key, values) => chunkKZ3NZCXZ_cjs.tStatic(MODULE, key, values);
|
|
7387
|
+
function formatKBTitle(str, t = defaultT) {
|
|
7388
|
+
if (!str) return t("NOTIFICATION_UTILS.NO_TITLE");
|
|
7331
7389
|
if (str === "agent_kb_processing_status")
|
|
7332
|
-
return "
|
|
7390
|
+
return t("NOTIFICATION_UTILS.KB_STATUS_TITLE");
|
|
7333
7391
|
return str.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
7334
7392
|
}
|
|
7335
7393
|
function getKBMetaInfo(meta) {
|
|
@@ -7341,20 +7399,23 @@ function getKBMetaInfo(meta) {
|
|
|
7341
7399
|
}
|
|
7342
7400
|
return {};
|
|
7343
7401
|
}
|
|
7344
|
-
function formatKBMetaDescription(meta, fallbackDescription) {
|
|
7402
|
+
function formatKBMetaDescription(meta, fallbackDescription, t = defaultT) {
|
|
7345
7403
|
const { status, kb_id } = getKBMetaInfo(meta);
|
|
7346
|
-
const formattedStatus = status ?
|
|
7347
|
-
|
|
7404
|
+
const formattedStatus = status ? t("NOTIFICATION_UTILS.STATUS", {
|
|
7405
|
+
status: status.charAt(0).toUpperCase() + status.slice(1)
|
|
7406
|
+
}) : null;
|
|
7407
|
+
const formattedKbId = kb_id ? t("NOTIFICATION_UTILS.KB_ID", { id: kb_id.split("-")[0] ?? kb_id }) : null;
|
|
7348
7408
|
if (formattedStatus && formattedKbId)
|
|
7349
7409
|
return `${formattedStatus} | ${formattedKbId}`;
|
|
7350
7410
|
if (formattedStatus) return formattedStatus;
|
|
7351
7411
|
if (formattedKbId) return formattedKbId;
|
|
7352
|
-
return fallbackDescription || "
|
|
7412
|
+
return fallbackDescription || t("NOTIFICATION_UTILS.NO_DESCRIPTION");
|
|
7353
7413
|
}
|
|
7354
7414
|
function NotificationItem({
|
|
7355
7415
|
notification,
|
|
7356
7416
|
onMarkAsRead
|
|
7357
7417
|
}) {
|
|
7418
|
+
const { t, language } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7358
7419
|
let denorm = {
|
|
7359
7420
|
title: "",
|
|
7360
7421
|
description: "",
|
|
@@ -7380,9 +7441,9 @@ function NotificationItem({
|
|
|
7380
7441
|
if (!notification.isRead) onMarkAsRead(notification.id);
|
|
7381
7442
|
},
|
|
7382
7443
|
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() })
|
|
7444
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: formatKBTitle(denorm.title, t) }),
|
|
7445
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: formatKBMetaDescription(denorm.meta, denorm.description, t) }),
|
|
7446
|
+
notification.createdTime && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[11px] text-muted-foreground", children: new Date(notification.createdTime).toLocaleString(language) })
|
|
7386
7447
|
] })
|
|
7387
7448
|
}
|
|
7388
7449
|
);
|
|
@@ -7395,13 +7456,14 @@ function NotificationList({
|
|
|
7395
7456
|
onScroll,
|
|
7396
7457
|
onMarkAsRead
|
|
7397
7458
|
}) {
|
|
7459
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7398
7460
|
const isEmpty = notifications.length === 0;
|
|
7399
7461
|
const renderNotifications = () => {
|
|
7400
7462
|
if (isLoading && isEmpty) {
|
|
7401
7463
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground" });
|
|
7402
7464
|
}
|
|
7403
7465
|
if (isEmpty) {
|
|
7404
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "
|
|
7466
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: t("NOTIFICATION_LIST.EMPTY") });
|
|
7405
7467
|
}
|
|
7406
7468
|
return notifications.map((notification, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7407
7469
|
NotificationItem,
|
|
@@ -7420,7 +7482,7 @@ function NotificationList({
|
|
|
7420
7482
|
onScroll,
|
|
7421
7483
|
children: [
|
|
7422
7484
|
renderNotifications(),
|
|
7423
|
-
isFetching && !isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 text-center text-xs text-muted-foreground", children: "
|
|
7485
|
+
isFetching && !isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 text-center text-xs text-muted-foreground", children: t("common:LOADING") })
|
|
7424
7486
|
]
|
|
7425
7487
|
}
|
|
7426
7488
|
);
|
|
@@ -7467,7 +7529,7 @@ function ConsoleHeader() {
|
|
|
7467
7529
|
window.addEventListener("scroll", handleScroll);
|
|
7468
7530
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
7469
7531
|
}, []);
|
|
7470
|
-
const { appLightLogo, appDarkLogo } =
|
|
7532
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
7471
7533
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7472
7534
|
"div",
|
|
7473
7535
|
{
|
|
@@ -7531,9 +7593,9 @@ function ConsoleHeader() {
|
|
|
7531
7593
|
var HeaderHeight = 60;
|
|
7532
7594
|
function DashboardHeader(props) {
|
|
7533
7595
|
const { forwardedTo, redirectPaths, navigationMenus } = props;
|
|
7534
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
7596
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkX3GPJW7R_cjs.SidebarContext);
|
|
7535
7597
|
const { pathname } = reactRouter.useLocation();
|
|
7536
|
-
const { selectedProject } =
|
|
7598
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7537
7599
|
const projectName = selectedProject?.name;
|
|
7538
7600
|
const environment = selectedProject?.environment;
|
|
7539
7601
|
const isProjectOverviewRoute = pathname.includes("/project");
|
|
@@ -7590,54 +7652,87 @@ function DashboardHeader(props) {
|
|
|
7590
7652
|
}
|
|
7591
7653
|
|
|
7592
7654
|
// src/constants/environment-options.ts
|
|
7655
|
+
var MODULE2 = "genesis.shared";
|
|
7593
7656
|
var environmentOptions = [
|
|
7594
7657
|
{
|
|
7595
7658
|
index: 0,
|
|
7596
|
-
label
|
|
7659
|
+
get label() {
|
|
7660
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_LABEL");
|
|
7661
|
+
},
|
|
7597
7662
|
value: "dev",
|
|
7598
|
-
subtext
|
|
7663
|
+
get subtext() {
|
|
7664
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_SUBTEXT");
|
|
7665
|
+
}
|
|
7599
7666
|
},
|
|
7600
7667
|
{
|
|
7601
7668
|
index: 1,
|
|
7602
|
-
label
|
|
7669
|
+
get label() {
|
|
7670
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_LABEL");
|
|
7671
|
+
},
|
|
7603
7672
|
value: "test",
|
|
7604
|
-
subtext
|
|
7673
|
+
get subtext() {
|
|
7674
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_SUBTEXT");
|
|
7675
|
+
}
|
|
7605
7676
|
},
|
|
7606
7677
|
{
|
|
7607
7678
|
index: 2,
|
|
7608
|
-
label
|
|
7679
|
+
get label() {
|
|
7680
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_LABEL");
|
|
7681
|
+
},
|
|
7609
7682
|
value: "stg",
|
|
7610
|
-
subtext
|
|
7683
|
+
get subtext() {
|
|
7684
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_SUBTEXT");
|
|
7685
|
+
}
|
|
7611
7686
|
},
|
|
7612
7687
|
{
|
|
7613
7688
|
index: 3,
|
|
7614
|
-
label
|
|
7689
|
+
get label() {
|
|
7690
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_LABEL");
|
|
7691
|
+
},
|
|
7615
7692
|
value: "iat",
|
|
7616
|
-
subtext
|
|
7693
|
+
get subtext() {
|
|
7694
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_SUBTEXT");
|
|
7695
|
+
}
|
|
7617
7696
|
},
|
|
7618
7697
|
{
|
|
7619
7698
|
index: 4,
|
|
7620
|
-
label
|
|
7699
|
+
get label() {
|
|
7700
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_LABEL");
|
|
7701
|
+
},
|
|
7621
7702
|
value: "uat",
|
|
7622
|
-
subtext
|
|
7703
|
+
get subtext() {
|
|
7704
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_SUBTEXT");
|
|
7705
|
+
}
|
|
7623
7706
|
},
|
|
7624
7707
|
{
|
|
7625
7708
|
index: 5,
|
|
7626
|
-
label
|
|
7709
|
+
get label() {
|
|
7710
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_LABEL");
|
|
7711
|
+
},
|
|
7627
7712
|
value: "prod-shadow",
|
|
7628
|
-
subtext
|
|
7713
|
+
get subtext() {
|
|
7714
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_SUBTEXT");
|
|
7715
|
+
}
|
|
7629
7716
|
},
|
|
7630
7717
|
{
|
|
7631
7718
|
index: 6,
|
|
7632
|
-
label
|
|
7719
|
+
get label() {
|
|
7720
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_LABEL");
|
|
7721
|
+
},
|
|
7633
7722
|
value: "pre-prod",
|
|
7634
|
-
subtext
|
|
7723
|
+
get subtext() {
|
|
7724
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_SUBTEXT");
|
|
7725
|
+
}
|
|
7635
7726
|
},
|
|
7636
7727
|
{
|
|
7637
7728
|
index: 7,
|
|
7638
|
-
label
|
|
7729
|
+
get label() {
|
|
7730
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_LABEL");
|
|
7731
|
+
},
|
|
7639
7732
|
value: "prod",
|
|
7640
|
-
subtext
|
|
7733
|
+
get subtext() {
|
|
7734
|
+
return chunkKZ3NZCXZ_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SUBTEXT");
|
|
7735
|
+
}
|
|
7641
7736
|
}
|
|
7642
7737
|
];
|
|
7643
7738
|
var EnvironmentCard = ({
|
|
@@ -7645,8 +7740,9 @@ var EnvironmentCard = ({
|
|
|
7645
7740
|
isMigrationOngoing,
|
|
7646
7741
|
className
|
|
7647
7742
|
}) => {
|
|
7648
|
-
const {
|
|
7649
|
-
const {
|
|
7743
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7744
|
+
const { setSelectedProject, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7745
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStartImpersonation();
|
|
7650
7746
|
const navigate = reactRouter.useNavigate();
|
|
7651
7747
|
const handleCardClick = async () => {
|
|
7652
7748
|
try {
|
|
@@ -7671,7 +7767,7 @@ var EnvironmentCard = ({
|
|
|
7671
7767
|
)?.label }),
|
|
7672
7768
|
isMigrationOngoing && /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
7673
7769
|
/* @__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: "
|
|
7770
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "border-none bg-neutral-500 text-white shadow-none", children: t("ENVIRONMENT_CARD.MIGRATION") })
|
|
7675
7771
|
] }) })
|
|
7676
7772
|
] }) }),
|
|
7677
7773
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-4 w-4 opacity-0 transition-opacity duration-200 group-hover:opacity-100" })
|
|
@@ -7685,7 +7781,7 @@ var EnvironmentCard = ({
|
|
|
7685
7781
|
);
|
|
7686
7782
|
};
|
|
7687
7783
|
function SelectedEnvironment() {
|
|
7688
|
-
const { selectedProject } =
|
|
7784
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7689
7785
|
const environment = selectedProject?.environment;
|
|
7690
7786
|
if (!environment) return null;
|
|
7691
7787
|
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 +7794,14 @@ function EnvironmentList({
|
|
|
7698
7794
|
redirectPaths,
|
|
7699
7795
|
collapsed = false
|
|
7700
7796
|
}) {
|
|
7797
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7701
7798
|
const navigate = reactRouter.useNavigate();
|
|
7702
7799
|
const { pathname } = reactRouter.useLocation();
|
|
7703
|
-
const { data: projectGroups = [], isLoading } =
|
|
7800
|
+
const { data: projectGroups = [], isLoading } = chunkVLZJP6FH_cjs.useGetProjects({
|
|
7704
7801
|
enabled: true
|
|
7705
7802
|
});
|
|
7706
|
-
const { selectedProject, setSelectedProject } =
|
|
7707
|
-
const { data: projectData } =
|
|
7803
|
+
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7804
|
+
const { data: projectData } = chunkVLZJP6FH_cjs.useGetProject();
|
|
7708
7805
|
const pendingProjectRef = React8.useRef(null);
|
|
7709
7806
|
const redirectRegexMap = React8.useMemo(
|
|
7710
7807
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -7741,7 +7838,7 @@ function EnvironmentList({
|
|
|
7741
7838
|
const environment = projectData?.data?.environment || selectedProject?.environment;
|
|
7742
7839
|
const applicationDomain = projectData?.data?.customDomain || selectedProject?.customDomain;
|
|
7743
7840
|
const environmentDomainSuffix = applicationDomain ? ` \xB7 ${applicationDomain}` : "";
|
|
7744
|
-
const environmentLabel = environment ? `${environment}${environmentDomainSuffix}` : "
|
|
7841
|
+
const environmentLabel = environment ? `${environment}${environmentDomainSuffix}` : t("ENVIRONMENT_LIST.SELECT_ENVIRONMENT");
|
|
7745
7842
|
const projects = React8.useMemo(() => {
|
|
7746
7843
|
if (!selectedProject) return [];
|
|
7747
7844
|
const groupWithSelected = projectGroups.find(
|
|
@@ -7770,8 +7867,8 @@ function EnvironmentList({
|
|
|
7770
7867
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
7771
7868
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
7772
7869
|
/* @__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: "
|
|
7870
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: t("ENVIRONMENT_LIST.ENVIRONMENT") }),
|
|
7871
|
+
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
7872
|
] })
|
|
7776
7873
|
] })
|
|
7777
7874
|
}
|
|
@@ -7784,11 +7881,11 @@ function EnvironmentList({
|
|
|
7784
7881
|
sideOffset: collapsed ? 8 : 4,
|
|
7785
7882
|
className: collapsed ? "min-w-48" : "w-[--radix-dropdown-menu-trigger-width]",
|
|
7786
7883
|
children: [
|
|
7787
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "
|
|
7884
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: t("ENVIRONMENT_LIST.YOUR_ENVIRONMENTS") }),
|
|
7788
7885
|
(() => {
|
|
7789
7886
|
const others = projects.filter((project) => project.itemId !== selectedProject?.itemId).slice(0, 5);
|
|
7790
7887
|
if (others.length === 0) {
|
|
7791
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "
|
|
7888
|
+
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
7889
|
}
|
|
7793
7890
|
return others.map((project) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7794
7891
|
DropdownMenuItem,
|
|
@@ -7800,27 +7897,28 @@ function EnvironmentList({
|
|
|
7800
7897
|
));
|
|
7801
7898
|
})(),
|
|
7802
7899
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
7803
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: "
|
|
7900
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: t("ENVIRONMENT_LIST.OVERVIEW_UNAVAILABLE") })
|
|
7804
7901
|
]
|
|
7805
7902
|
}
|
|
7806
7903
|
)
|
|
7807
7904
|
] });
|
|
7808
7905
|
}
|
|
7809
7906
|
function BackToConsoleNavigator() {
|
|
7907
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
7810
7908
|
return /* @__PURE__ */ jsxRuntime.jsx(reactRouter.Link, { to: "console", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7811
7909
|
Button,
|
|
7812
7910
|
{
|
|
7813
7911
|
variant: "outline",
|
|
7814
7912
|
className: "bg-transparent hover:bg-slate-200 dark:hover:bg-gray-800",
|
|
7815
7913
|
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: "
|
|
7914
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-row items-center md:flex", children: t("BACK_TO_CONSOLE_NAVIGATOR.BACK") }),
|
|
7915
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center text-xs md:hidden", children: t("BACK_TO_CONSOLE_NAVIGATOR.CONSOLE") })
|
|
7818
7916
|
]
|
|
7819
7917
|
}
|
|
7820
7918
|
) });
|
|
7821
7919
|
}
|
|
7822
7920
|
function SelectedProject() {
|
|
7823
|
-
const { selectedProject } =
|
|
7921
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7824
7922
|
const projectName = selectedProject?.name;
|
|
7825
7923
|
if (!projectName) return null;
|
|
7826
7924
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
@@ -7832,13 +7930,13 @@ function ProtectedGuard({
|
|
|
7832
7930
|
children,
|
|
7833
7931
|
defaultPublicPath = "/login"
|
|
7834
7932
|
}) {
|
|
7835
|
-
const { isAuthenticated } =
|
|
7933
|
+
const { isAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7836
7934
|
const navigate = reactRouter.useNavigate();
|
|
7837
7935
|
React8.useEffect(() => {
|
|
7838
7936
|
if (!isAuthenticated) navigate(defaultPublicPath);
|
|
7839
7937
|
}, [isAuthenticated, defaultPublicPath, navigate]);
|
|
7840
7938
|
React8.useEffect(
|
|
7841
|
-
() =>
|
|
7939
|
+
() => chunkIPMRZNNS_cjs.subscribeToSignOut(
|
|
7842
7940
|
() => window.location.replace(
|
|
7843
7941
|
`${window.location.origin}${defaultPublicPath}`
|
|
7844
7942
|
)
|
|
@@ -7861,7 +7959,7 @@ function PublicGuard({
|
|
|
7861
7959
|
children,
|
|
7862
7960
|
defaultProtectedPath = "/app/console"
|
|
7863
7961
|
}) {
|
|
7864
|
-
const { isAuthenticated } =
|
|
7962
|
+
const { isAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7865
7963
|
const { isMounted } = useAppState();
|
|
7866
7964
|
const navigate = reactRouter.useNavigate();
|
|
7867
7965
|
const { pathname } = reactRouter.useLocation();
|
|
@@ -7880,7 +7978,7 @@ function PublicGuard({
|
|
|
7880
7978
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
7881
7979
|
}
|
|
7882
7980
|
function AuthResolver({ children }) {
|
|
7883
|
-
const { setUser, setAuthenticated, setUnAuthenticated } =
|
|
7981
|
+
const { setUser, setAuthenticated, setUnAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
7884
7982
|
const hasResolved = React8.useRef(false);
|
|
7885
7983
|
React8.useEffect(() => {
|
|
7886
7984
|
if (hasResolved.current) return;
|
|
@@ -7888,7 +7986,7 @@ function AuthResolver({ children }) {
|
|
|
7888
7986
|
if (isSignInCallbackPath(window.location.pathname)) return;
|
|
7889
7987
|
async function resolve() {
|
|
7890
7988
|
try {
|
|
7891
|
-
const res = await
|
|
7989
|
+
const res = await chunkIPMRZNNS_cjs.iamClient.get(`${chunkIPMRZNNS_cjs.AUTH_ENDPOINTS.ME}`);
|
|
7892
7990
|
setUser(res);
|
|
7893
7991
|
setAuthenticated();
|
|
7894
7992
|
} catch {
|
|
@@ -7967,13 +8065,14 @@ var AppLoadingSpinner = ({ size = 64 }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
|
|
|
7967
8065
|
` }),
|
|
7968
8066
|
/* @__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
8067
|
] });
|
|
8068
|
+
var GENESIS_SHARED_MODULE = "genesis.shared";
|
|
7970
8069
|
var projectNameFor = (projects, tenantId) => tenantId && projects.find((p) => p.tenantId === tenantId)?.name || null;
|
|
7971
8070
|
var claimKeyOf = (claim) => claim ? `${claim.tabId}|${claim.tenantId}|${claim.ts}` : null;
|
|
7972
8071
|
var SESSION_ENDED_CODES = /* @__PURE__ */ new Set([
|
|
7973
8072
|
"invalid_refresh_token",
|
|
7974
8073
|
"session_expired"
|
|
7975
8074
|
]);
|
|
7976
|
-
var isSessionEnded = (error) => error instanceof
|
|
8075
|
+
var isSessionEnded = (error) => error instanceof chunk2MP66EX3_cjs.HttpError && error.status === 401 && SESSION_ENDED_CODES.has(String(error.errors?.error ?? ""));
|
|
7977
8076
|
var useLiveOwnerProbe = ({
|
|
7978
8077
|
cookieTenantId,
|
|
7979
8078
|
ownTenantId,
|
|
@@ -7983,8 +8082,8 @@ var useLiveOwnerProbe = ({
|
|
|
7983
8082
|
if (!cookieTenantId || !ownTenantId || cookieTenantId === ownTenantId) {
|
|
7984
8083
|
return null;
|
|
7985
8084
|
}
|
|
7986
|
-
const owner =
|
|
7987
|
-
return owner && owner.tabId !==
|
|
8085
|
+
const owner = chunkIPMRZNNS_cjs.readCurrentOwner();
|
|
8086
|
+
return owner && owner.tabId !== chunkIPMRZNNS_cjs.TAB_ID && owner.tenantId === cookieTenantId ? owner : null;
|
|
7988
8087
|
}, [cookieTenantId, ownTenantId]);
|
|
7989
8088
|
const claimKey = claimKeyOf(foreignClaim);
|
|
7990
8089
|
const [probedKey, setProbedKey] = React8.useState(null);
|
|
@@ -7996,9 +8095,9 @@ var useLiveOwnerProbe = ({
|
|
|
7996
8095
|
const claim = foreignClaimRef.current;
|
|
7997
8096
|
if (!claim || !claimKey) return;
|
|
7998
8097
|
let cancelled = false;
|
|
7999
|
-
void
|
|
8098
|
+
void chunkIPMRZNNS_cjs.isTenantHeldElsewhere(claim.tenantId).then((held) => {
|
|
8000
8099
|
if (cancelled) return;
|
|
8001
|
-
if (held &&
|
|
8100
|
+
if (held && chunkIPMRZNNS_cjs.isSameClaim(chunkIPMRZNNS_cjs.readCurrentOwner(), claim)) {
|
|
8002
8101
|
onHeldElsewhereRef.current(claim.tenantId);
|
|
8003
8102
|
}
|
|
8004
8103
|
setProbedKey(claimKey);
|
|
@@ -8012,10 +8111,10 @@ var useLiveOwnerProbe = ({
|
|
|
8012
8111
|
var ImpersonationChecker = ({
|
|
8013
8112
|
children
|
|
8014
8113
|
}) => {
|
|
8015
|
-
const { data } =
|
|
8016
|
-
const { setImpersonation, isInitialized, setInitialized } =
|
|
8017
|
-
|
|
8018
|
-
|
|
8114
|
+
const { data } = chunkVLZJP6FH_cjs.useImpersonationStatusChecker();
|
|
8115
|
+
const { setImpersonation, isInitialized, setInitialized } = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8116
|
+
chunkVLZJP6FH_cjs.useSessionTenantGuard();
|
|
8117
|
+
chunkVLZJP6FH_cjs.useStatusFirstOnTabReturn();
|
|
8019
8118
|
React8.useEffect(() => {
|
|
8020
8119
|
if (!data) return;
|
|
8021
8120
|
setImpersonation(
|
|
@@ -8037,6 +8136,7 @@ function ImpersonationBlocked({
|
|
|
8037
8136
|
onSecondary,
|
|
8038
8137
|
consolePath
|
|
8039
8138
|
}) {
|
|
8139
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8040
8140
|
const navigate = reactRouter.useNavigate();
|
|
8041
8141
|
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
8142
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -8051,7 +8151,7 @@ function ImpersonationBlocked({
|
|
|
8051
8151
|
{
|
|
8052
8152
|
variant: primaryLabel && onPrimary ? "outline" : "default",
|
|
8053
8153
|
onClick: () => navigate(consolePath),
|
|
8054
|
-
children: "
|
|
8154
|
+
children: t("IMPERSONATION_GUARD.GO_TO_CONSOLE")
|
|
8055
8155
|
}
|
|
8056
8156
|
)
|
|
8057
8157
|
] })
|
|
@@ -8073,10 +8173,10 @@ function ImpersonationTerminator({
|
|
|
8073
8173
|
detachedReason,
|
|
8074
8174
|
detachedTenantId,
|
|
8075
8175
|
setDetached
|
|
8076
|
-
} =
|
|
8077
|
-
const { mutateAsync } =
|
|
8078
|
-
const recordClaimedTenant =
|
|
8079
|
-
const { projects } =
|
|
8176
|
+
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8177
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStopImpersonation();
|
|
8178
|
+
const recordClaimedTenant = chunkVLZJP6FH_cjs.useRecordClaimedTenant();
|
|
8179
|
+
const { projects } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8080
8180
|
const isTriggering = React8.useRef(false);
|
|
8081
8181
|
const [isTerminating, setIsTerminating] = React8.useState(false);
|
|
8082
8182
|
const rootTenantId = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
|
|
@@ -8087,7 +8187,7 @@ function ImpersonationTerminator({
|
|
|
8087
8187
|
});
|
|
8088
8188
|
React8.useEffect(() => {
|
|
8089
8189
|
if (!rootTenantId) return;
|
|
8090
|
-
return
|
|
8190
|
+
return chunkIPMRZNNS_cjs.subscribeToTenantClaims((claim) => {
|
|
8091
8191
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8092
8192
|
if (claim.tenantId === rootTenantId) {
|
|
8093
8193
|
setDetached(null);
|
|
@@ -8103,7 +8203,8 @@ function ImpersonationTerminator({
|
|
|
8103
8203
|
const [returnFailure, setReturnFailure] = React8.useState(
|
|
8104
8204
|
null
|
|
8105
8205
|
);
|
|
8106
|
-
const
|
|
8206
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8207
|
+
const signOut = chunkVLZJP6FH_cjs.useSignOut();
|
|
8107
8208
|
React8.useEffect(() => {
|
|
8108
8209
|
if (!isImpersonated) setReturnFailure(null);
|
|
8109
8210
|
}, [isImpersonated]);
|
|
@@ -8119,7 +8220,7 @@ function ImpersonationTerminator({
|
|
|
8119
8220
|
const { status, stopError } = await mutateAsync(void 0);
|
|
8120
8221
|
if (!status.impersonated) {
|
|
8121
8222
|
terminate(rootTenantId);
|
|
8122
|
-
if (rootTenantId)
|
|
8223
|
+
if (rootTenantId) chunkIPMRZNNS_cjs.claimTenant(rootTenantId);
|
|
8123
8224
|
return;
|
|
8124
8225
|
}
|
|
8125
8226
|
console.error("Error stopping impersonation:", stopError);
|
|
@@ -8149,9 +8250,9 @@ function ImpersonationTerminator({
|
|
|
8149
8250
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8150
8251
|
ImpersonationBlocked,
|
|
8151
8252
|
{
|
|
8152
|
-
title: name ?
|
|
8153
|
-
description: "
|
|
8154
|
-
primaryLabel: name ?
|
|
8253
|
+
title: name ? t("IMPERSONATION_GUARD.DETACHED_TITLE_NAMED", { name }) : t("IMPERSONATION_GUARD.DETACHED_TITLE"),
|
|
8254
|
+
description: t("IMPERSONATION_GUARD.DETACHED_DESCRIPTION"),
|
|
8255
|
+
primaryLabel: name ? t("IMPERSONATION_GUARD.LEAVE_NAMED", { name }) : t("IMPERSONATION_GUARD.LEAVE"),
|
|
8155
8256
|
onPrimary: () => {
|
|
8156
8257
|
setReturnFailure(null);
|
|
8157
8258
|
setDetached(null);
|
|
@@ -8163,9 +8264,9 @@ function ImpersonationTerminator({
|
|
|
8163
8264
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8164
8265
|
ImpersonationBlocked,
|
|
8165
8266
|
{
|
|
8166
|
-
title: "
|
|
8167
|
-
description: "
|
|
8168
|
-
primaryLabel: "
|
|
8267
|
+
title: t("IMPERSONATION_GUARD.SESSION_ENDED_TITLE"),
|
|
8268
|
+
description: t("IMPERSONATION_GUARD.SESSION_ENDED_DESCRIPTION"),
|
|
8269
|
+
primaryLabel: t("IMPERSONATION_GUARD.SIGN_IN_AGAIN"),
|
|
8169
8270
|
onPrimary: signOut
|
|
8170
8271
|
}
|
|
8171
8272
|
);
|
|
@@ -8175,17 +8276,17 @@ function ImpersonationTerminator({
|
|
|
8175
8276
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8176
8277
|
ImpersonationBlocked,
|
|
8177
8278
|
{
|
|
8178
|
-
title:
|
|
8179
|
-
description: name ?
|
|
8180
|
-
primaryLabel: "
|
|
8279
|
+
title: t("IMPERSONATION_GUARD.RETURN_FAILED_TITLE"),
|
|
8280
|
+
description: name ? t("IMPERSONATION_GUARD.RETURN_FAILED_NAMED", { name }) : t("IMPERSONATION_GUARD.RETURN_FAILED"),
|
|
8281
|
+
primaryLabel: t("IMPERSONATION_GUARD.TRY_AGAIN"),
|
|
8181
8282
|
onPrimary: () => setReturnFailure(null),
|
|
8182
|
-
secondaryLabel: "
|
|
8283
|
+
secondaryLabel: t("IMPERSONATION_GUARD.SIGN_OUT"),
|
|
8183
8284
|
onSecondary: signOut
|
|
8184
8285
|
}
|
|
8185
8286
|
);
|
|
8186
8287
|
}
|
|
8187
8288
|
if (isImpersonated || isTerminating) {
|
|
8188
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "
|
|
8289
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: t("IMPERSONATION_GUARD.RETURNING") });
|
|
8189
8290
|
}
|
|
8190
8291
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
8191
8292
|
}
|
|
@@ -8202,11 +8303,12 @@ function ImpersonationSynchronizer({
|
|
|
8202
8303
|
detachedTenantId,
|
|
8203
8304
|
setImpersonationError,
|
|
8204
8305
|
setDetached
|
|
8205
|
-
} =
|
|
8206
|
-
const {
|
|
8207
|
-
const
|
|
8208
|
-
const
|
|
8209
|
-
const {
|
|
8306
|
+
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8307
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8308
|
+
const { mutateAsync } = chunkVLZJP6FH_cjs.useStartImpersonation();
|
|
8309
|
+
const recordClaimedTenant = chunkVLZJP6FH_cjs.useRecordClaimedTenant();
|
|
8310
|
+
const { data: _data } = chunkVLZJP6FH_cjs.useGetProjects({ enabled: true });
|
|
8311
|
+
const { selectedProject, setSelectedProject, projects, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8210
8312
|
const isTriggering = React8.useRef(false);
|
|
8211
8313
|
const [isImpersonating, setIsImpersonating] = React8.useState(false);
|
|
8212
8314
|
const { itemId } = reactRouter.useParams();
|
|
@@ -8240,7 +8342,7 @@ function ImpersonationSynchronizer({
|
|
|
8240
8342
|
]);
|
|
8241
8343
|
const getImpersonatedProject = async () => {
|
|
8242
8344
|
try {
|
|
8243
|
-
const res =
|
|
8345
|
+
const res = chunkVLZJP6FH_cjs.projectService.getProject();
|
|
8244
8346
|
return (await res).data;
|
|
8245
8347
|
} catch (error) {
|
|
8246
8348
|
console.error("Error fetching projects:", error);
|
|
@@ -8301,10 +8403,10 @@ function ImpersonationSynchronizer({
|
|
|
8301
8403
|
const isAttached = !!routeTenantId && routeTenantId === impersonatedTenantId && !detachedHere && !impersonationError && !isProbingOwner;
|
|
8302
8404
|
React8.useEffect(() => {
|
|
8303
8405
|
if (!isAttached || !routeTenantId) return;
|
|
8304
|
-
return
|
|
8406
|
+
return chunkIPMRZNNS_cjs.holdTenant(routeTenantId);
|
|
8305
8407
|
}, [isAttached, routeTenantId]);
|
|
8306
8408
|
React8.useEffect(() => {
|
|
8307
|
-
return
|
|
8409
|
+
return chunkIPMRZNNS_cjs.subscribeToTenantClaims((claim) => {
|
|
8308
8410
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8309
8411
|
const mine = routeTenantIdRef.current;
|
|
8310
8412
|
if (!mine) return;
|
|
@@ -8342,7 +8444,7 @@ function ImpersonationSynchronizer({
|
|
|
8342
8444
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8343
8445
|
ImpersonationWaiting,
|
|
8344
8446
|
{
|
|
8345
|
-
label: thisProjectName ?
|
|
8447
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.OPENING_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.OPENING")
|
|
8346
8448
|
}
|
|
8347
8449
|
);
|
|
8348
8450
|
}
|
|
@@ -8354,25 +8456,29 @@ function ImpersonationSynchronizer({
|
|
|
8354
8456
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8355
8457
|
ImpersonationWaiting,
|
|
8356
8458
|
{
|
|
8357
|
-
label: thisProjectName ?
|
|
8459
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.OPENING_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.OPENING")
|
|
8358
8460
|
}
|
|
8359
8461
|
);
|
|
8360
8462
|
}
|
|
8361
8463
|
if (impersonationError) {
|
|
8362
|
-
const accessDenied = impersonationError instanceof
|
|
8464
|
+
const accessDenied = impersonationError instanceof chunk2MP66EX3_cjs.HttpError && impersonationError.status === 403;
|
|
8363
8465
|
return accessDenied ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8364
8466
|
ImpersonationBlocked,
|
|
8365
8467
|
{
|
|
8366
|
-
title: thisProjectName ?
|
|
8367
|
-
|
|
8468
|
+
title: thisProjectName ? t("IMPERSONATION_GUARD.NO_ACCESS_NAMED", {
|
|
8469
|
+
name: thisProjectName
|
|
8470
|
+
}) : t("IMPERSONATION_GUARD.NO_ACCESS"),
|
|
8471
|
+
description: t("IMPERSONATION_GUARD.NO_ACCESS_DESCRIPTION"),
|
|
8368
8472
|
consolePath
|
|
8369
8473
|
}
|
|
8370
8474
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8371
8475
|
ImpersonationBlocked,
|
|
8372
8476
|
{
|
|
8373
|
-
title: thisProjectName ?
|
|
8374
|
-
|
|
8375
|
-
|
|
8477
|
+
title: thisProjectName ? t("IMPERSONATION_GUARD.OPEN_FAILED_NAMED", {
|
|
8478
|
+
name: thisProjectName
|
|
8479
|
+
}) : t("IMPERSONATION_GUARD.OPEN_FAILED"),
|
|
8480
|
+
description: t("IMPERSONATION_GUARD.OPEN_FAILED_DESCRIPTION"),
|
|
8481
|
+
primaryLabel: t("IMPERSONATION_GUARD.TRY_AGAIN"),
|
|
8376
8482
|
onPrimary: takeSession,
|
|
8377
8483
|
consolePath
|
|
8378
8484
|
}
|
|
@@ -8382,9 +8488,11 @@ function ImpersonationSynchronizer({
|
|
|
8382
8488
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8383
8489
|
ImpersonationBlocked,
|
|
8384
8490
|
{
|
|
8385
|
-
title: "
|
|
8386
|
-
description: thisProjectName ?
|
|
8387
|
-
|
|
8491
|
+
title: t("IMPERSONATION_GUARD.CONSOLE_RETURNED_TITLE"),
|
|
8492
|
+
description: thisProjectName ? t("IMPERSONATION_GUARD.CONSOLE_RETURNED_NAMED", {
|
|
8493
|
+
name: thisProjectName
|
|
8494
|
+
}) : t("IMPERSONATION_GUARD.CONSOLE_RETURNED"),
|
|
8495
|
+
primaryLabel: thisProjectName ? t("IMPERSONATION_GUARD.REOPEN_NAMED", { name: thisProjectName }) : t("IMPERSONATION_GUARD.REOPEN"),
|
|
8388
8496
|
onPrimary: takeSession,
|
|
8389
8497
|
consolePath
|
|
8390
8498
|
}
|
|
@@ -8395,21 +8503,27 @@ function ImpersonationSynchronizer({
|
|
|
8395
8503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8396
8504
|
ImpersonationBlocked,
|
|
8397
8505
|
{
|
|
8398
|
-
title: "
|
|
8399
|
-
description: otherName ?
|
|
8400
|
-
|
|
8506
|
+
title: t("IMPERSONATION_GUARD.ANOTHER_PROJECT_TITLE"),
|
|
8507
|
+
description: otherName ? t("IMPERSONATION_GUARD.ANOTHER_PROJECT_NAMED", {
|
|
8508
|
+
name: otherName
|
|
8509
|
+
}) : t("IMPERSONATION_GUARD.ANOTHER_PROJECT"),
|
|
8510
|
+
primaryLabel: thisProjectName ? t("IMPERSONATION_GUARD.CONTINUE_NAMED", {
|
|
8511
|
+
name: thisProjectName
|
|
8512
|
+
}) : t("IMPERSONATION_GUARD.CONTINUE"),
|
|
8401
8513
|
onPrimary: takeSession,
|
|
8402
8514
|
consolePath
|
|
8403
8515
|
}
|
|
8404
8516
|
);
|
|
8405
8517
|
}
|
|
8406
8518
|
if (!routeTenantId)
|
|
8407
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "
|
|
8519
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: t("IMPERSONATION_GUARD.LOADING_PROJECTS") });
|
|
8408
8520
|
if (routeTenantId !== impersonatedTenantId) {
|
|
8409
8521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8410
8522
|
ImpersonationWaiting,
|
|
8411
8523
|
{
|
|
8412
|
-
label: thisProjectName ?
|
|
8524
|
+
label: thisProjectName ? t("IMPERSONATION_GUARD.SWITCHING_NAMED", {
|
|
8525
|
+
name: thisProjectName
|
|
8526
|
+
}) : t("IMPERSONATION_GUARD.SWITCHING")
|
|
8413
8527
|
}
|
|
8414
8528
|
);
|
|
8415
8529
|
}
|
|
@@ -8441,7 +8555,7 @@ function DashboardLayout({
|
|
|
8441
8555
|
navigationMenus,
|
|
8442
8556
|
forwardedTo
|
|
8443
8557
|
}) {
|
|
8444
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8558
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(chunkX3GPJW7R_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
8559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8446
8560
|
SidebarMenuDesktop,
|
|
8447
8561
|
{
|
|
@@ -8519,9 +8633,10 @@ var LoginHeader = ({
|
|
|
8519
8633
|
blocksUrl = "https://seliseblocks.com",
|
|
8520
8634
|
githubUrl = "https://github.com/SELISEdigitalplatforms"
|
|
8521
8635
|
}) => {
|
|
8636
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
8522
8637
|
const {
|
|
8523
8638
|
config: { appLogoUrl }
|
|
8524
|
-
} =
|
|
8639
|
+
} = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state);
|
|
8525
8640
|
const resolveLogo = (variant) => {
|
|
8526
8641
|
if (!appLogoUrl) return void 0;
|
|
8527
8642
|
if (typeof appLogoUrl === "string") return appLogoUrl;
|
|
@@ -8541,7 +8656,7 @@ var LoginHeader = ({
|
|
|
8541
8656
|
}
|
|
8542
8657
|
),
|
|
8543
8658
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nav-right", children: [
|
|
8544
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: docsUrl, target: "_blank", rel: "noreferrer", className: "nav-link", children: "
|
|
8659
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: docsUrl, target: "_blank", rel: "noreferrer", className: "nav-link", children: t("LOGIN_HEADER.DOCS") }),
|
|
8545
8660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8546
8661
|
"a",
|
|
8547
8662
|
{
|
|
@@ -9182,32 +9297,35 @@ function useAtmosphericCanvas(canvasRef) {
|
|
|
9182
9297
|
}
|
|
9183
9298
|
|
|
9184
9299
|
// src/pages/login/login.constant.ts
|
|
9185
|
-
var
|
|
9300
|
+
var VISIT_KEY = "LOGIN_CONSTANT.VISIT";
|
|
9301
|
+
var getBlocksProducts = (t) => [
|
|
9186
9302
|
{
|
|
9187
9303
|
name: "blocks-os",
|
|
9188
9304
|
appName: "blocks OS",
|
|
9189
|
-
badge: "
|
|
9190
|
-
tagline: "
|
|
9191
|
-
descriptionTitle: "
|
|
9305
|
+
badge: t("LOGIN_CONSTANT.OS_BADGE"),
|
|
9306
|
+
tagline: t("LOGIN_CONSTANT.OS_TAGLINE"),
|
|
9307
|
+
descriptionTitle: t("LOGIN_CONSTANT.OS_TITLE"),
|
|
9308
|
+
// Not shown in the UI.
|
|
9192
9309
|
keywords: ["secure", "isolated", "auditable"],
|
|
9193
|
-
shortDescription: "
|
|
9194
|
-
description: "
|
|
9310
|
+
shortDescription: t("LOGIN_CONSTANT.OS_SHORT"),
|
|
9311
|
+
description: t("LOGIN_CONSTANT.OS_DESCRIPTION"),
|
|
9195
9312
|
featureChips: [
|
|
9196
|
-
"
|
|
9197
|
-
"
|
|
9198
|
-
"
|
|
9199
|
-
"
|
|
9200
|
-
"
|
|
9313
|
+
t("LOGIN_CONSTANT.OS_CHIP_1"),
|
|
9314
|
+
t("LOGIN_CONSTANT.OS_CHIP_2"),
|
|
9315
|
+
t("LOGIN_CONSTANT.OS_CHIP_3"),
|
|
9316
|
+
t("LOGIN_CONSTANT.OS_CHIP_4"),
|
|
9317
|
+
t("LOGIN_CONSTANT.OS_CHIP_5")
|
|
9201
9318
|
],
|
|
9202
9319
|
url: "",
|
|
9203
|
-
cta: "
|
|
9320
|
+
cta: t(VISIT_KEY, { name: "blocks OS" })
|
|
9204
9321
|
},
|
|
9205
9322
|
{
|
|
9206
9323
|
name: "blocks-localization",
|
|
9207
9324
|
appName: "blocks Localization",
|
|
9208
|
-
badge: "
|
|
9209
|
-
tagline: "
|
|
9210
|
-
descriptionTitle: "
|
|
9325
|
+
badge: t("LOGIN_CONSTANT.LOCALIZATION_BADGE"),
|
|
9326
|
+
tagline: t("LOGIN_CONSTANT.LOCALIZATION_TAGLINE"),
|
|
9327
|
+
descriptionTitle: t("LOGIN_CONSTANT.LOCALIZATION_TITLE"),
|
|
9328
|
+
// Not shown in the UI.
|
|
9211
9329
|
keywords: [
|
|
9212
9330
|
"multilingual",
|
|
9213
9331
|
"contextual",
|
|
@@ -9215,42 +9333,44 @@ var BLOCKS_PRODUCTS = [
|
|
|
9215
9333
|
"instant",
|
|
9216
9334
|
"scalable"
|
|
9217
9335
|
],
|
|
9218
|
-
shortDescription: "
|
|
9219
|
-
description: "
|
|
9336
|
+
shortDescription: t("LOGIN_CONSTANT.LOCALIZATION_SHORT"),
|
|
9337
|
+
description: t("LOGIN_CONSTANT.LOCALIZATION_DESCRIPTION"),
|
|
9220
9338
|
featureChips: [
|
|
9221
|
-
"
|
|
9222
|
-
"
|
|
9223
|
-
"
|
|
9224
|
-
"
|
|
9339
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_1"),
|
|
9340
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_2"),
|
|
9341
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_3"),
|
|
9342
|
+
t("LOGIN_CONSTANT.LOCALIZATION_CHIP_4")
|
|
9225
9343
|
],
|
|
9226
9344
|
url: "",
|
|
9227
|
-
cta: "
|
|
9345
|
+
cta: t(VISIT_KEY, { name: "blocks Localization" })
|
|
9228
9346
|
},
|
|
9229
9347
|
{
|
|
9230
9348
|
name: "blocks-iam",
|
|
9231
9349
|
appName: "blocks IAM",
|
|
9232
|
-
badge: "
|
|
9233
|
-
tagline: "
|
|
9234
|
-
descriptionTitle: "
|
|
9350
|
+
badge: t("LOGIN_CONSTANT.IAM_BADGE"),
|
|
9351
|
+
tagline: t("LOGIN_CONSTANT.IAM_TAGLINE"),
|
|
9352
|
+
descriptionTitle: t("LOGIN_CONSTANT.IAM_TITLE"),
|
|
9353
|
+
// Not shown in the UI.
|
|
9235
9354
|
keywords: ["secure", "unified", "seamless"],
|
|
9236
|
-
shortDescription: "
|
|
9237
|
-
description: "
|
|
9355
|
+
shortDescription: t("LOGIN_CONSTANT.IAM_SHORT"),
|
|
9356
|
+
description: t("LOGIN_CONSTANT.IAM_DESCRIPTION"),
|
|
9238
9357
|
featureChips: [
|
|
9239
|
-
"
|
|
9240
|
-
"
|
|
9241
|
-
"
|
|
9242
|
-
"
|
|
9243
|
-
"
|
|
9358
|
+
t("LOGIN_CONSTANT.IAM_CHIP_1"),
|
|
9359
|
+
t("LOGIN_CONSTANT.IAM_CHIP_2"),
|
|
9360
|
+
t("LOGIN_CONSTANT.IAM_CHIP_3"),
|
|
9361
|
+
t("LOGIN_CONSTANT.IAM_CHIP_4"),
|
|
9362
|
+
t("LOGIN_CONSTANT.IAM_CHIP_5")
|
|
9244
9363
|
],
|
|
9245
9364
|
url: "",
|
|
9246
|
-
cta: "
|
|
9365
|
+
cta: t(VISIT_KEY, { name: "blocks IAM" })
|
|
9247
9366
|
},
|
|
9248
9367
|
{
|
|
9249
9368
|
name: "blocks-data",
|
|
9250
9369
|
appName: "blocks Data",
|
|
9251
|
-
badge: "
|
|
9252
|
-
tagline: "
|
|
9253
|
-
descriptionTitle: "
|
|
9370
|
+
badge: t("LOGIN_CONSTANT.DATA_BADGE"),
|
|
9371
|
+
tagline: t("LOGIN_CONSTANT.DATA_TAGLINE"),
|
|
9372
|
+
descriptionTitle: t("LOGIN_CONSTANT.DATA_TITLE"),
|
|
9373
|
+
// Not shown in the UI.
|
|
9254
9374
|
keywords: [
|
|
9255
9375
|
"queryable",
|
|
9256
9376
|
"structured",
|
|
@@ -9258,43 +9378,45 @@ var BLOCKS_PRODUCTS = [
|
|
|
9258
9378
|
"versioned",
|
|
9259
9379
|
"accessible"
|
|
9260
9380
|
],
|
|
9261
|
-
shortDescription: "
|
|
9262
|
-
description: "
|
|
9381
|
+
shortDescription: t("LOGIN_CONSTANT.DATA_SHORT"),
|
|
9382
|
+
description: t("LOGIN_CONSTANT.DATA_DESCRIPTION"),
|
|
9263
9383
|
featureChips: [
|
|
9264
|
-
"
|
|
9265
|
-
"
|
|
9266
|
-
"
|
|
9267
|
-
"
|
|
9268
|
-
"
|
|
9384
|
+
t("LOGIN_CONSTANT.DATA_CHIP_1"),
|
|
9385
|
+
t("LOGIN_CONSTANT.DATA_CHIP_2"),
|
|
9386
|
+
t("LOGIN_CONSTANT.DATA_CHIP_3"),
|
|
9387
|
+
t("LOGIN_CONSTANT.DATA_CHIP_4"),
|
|
9388
|
+
t("LOGIN_CONSTANT.DATA_CHIP_5")
|
|
9269
9389
|
],
|
|
9270
9390
|
url: "",
|
|
9271
|
-
cta: "
|
|
9391
|
+
cta: t(VISIT_KEY, { name: "blocks Data" })
|
|
9272
9392
|
},
|
|
9273
9393
|
{
|
|
9274
9394
|
name: "blocks-logic",
|
|
9275
9395
|
appName: "blocks Logic",
|
|
9276
|
-
badge: "
|
|
9277
|
-
tagline: "
|
|
9278
|
-
descriptionTitle: "
|
|
9396
|
+
badge: t("LOGIN_CONSTANT.LOGIC_BADGE"),
|
|
9397
|
+
tagline: t("LOGIN_CONSTANT.LOGIC_TAGLINE"),
|
|
9398
|
+
descriptionTitle: t("LOGIN_CONSTANT.LOGIC_TITLE"),
|
|
9399
|
+
// Not shown in the UI.
|
|
9279
9400
|
keywords: ["visual", "automated", "event-driven", "codeless"],
|
|
9280
|
-
shortDescription: "
|
|
9281
|
-
description: "
|
|
9401
|
+
shortDescription: t("LOGIN_CONSTANT.LOGIC_SHORT"),
|
|
9402
|
+
description: t("LOGIN_CONSTANT.LOGIC_DESCRIPTION"),
|
|
9282
9403
|
featureChips: [
|
|
9283
|
-
"
|
|
9284
|
-
"
|
|
9285
|
-
"
|
|
9286
|
-
"
|
|
9287
|
-
"
|
|
9404
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_1"),
|
|
9405
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_2"),
|
|
9406
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_3"),
|
|
9407
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_4"),
|
|
9408
|
+
t("LOGIN_CONSTANT.LOGIC_CHIP_5")
|
|
9288
9409
|
],
|
|
9289
9410
|
url: "",
|
|
9290
|
-
cta: "
|
|
9411
|
+
cta: t(VISIT_KEY, { name: "blocks Logic" })
|
|
9291
9412
|
},
|
|
9292
9413
|
{
|
|
9293
9414
|
name: "blocks-studio",
|
|
9294
9415
|
appName: "blocks Studio",
|
|
9295
|
-
badge: "
|
|
9296
|
-
tagline: "
|
|
9297
|
-
descriptionTitle: "
|
|
9416
|
+
badge: t("LOGIN_CONSTANT.STUDIO_BADGE"),
|
|
9417
|
+
tagline: t("LOGIN_CONSTANT.STUDIO_TAGLINE"),
|
|
9418
|
+
descriptionTitle: t("LOGIN_CONSTANT.STUDIO_TITLE"),
|
|
9419
|
+
// Not shown in the UI.
|
|
9298
9420
|
keywords: [
|
|
9299
9421
|
"intelligent",
|
|
9300
9422
|
"generative",
|
|
@@ -9302,24 +9424,25 @@ var BLOCKS_PRODUCTS = [
|
|
|
9302
9424
|
"instant",
|
|
9303
9425
|
"adaptive"
|
|
9304
9426
|
],
|
|
9305
|
-
shortDescription: "
|
|
9306
|
-
description: "
|
|
9427
|
+
shortDescription: t("LOGIN_CONSTANT.STUDIO_SHORT"),
|
|
9428
|
+
description: t("LOGIN_CONSTANT.STUDIO_DESCRIPTION"),
|
|
9307
9429
|
featureChips: [
|
|
9308
|
-
"
|
|
9309
|
-
"
|
|
9310
|
-
"
|
|
9311
|
-
"
|
|
9312
|
-
"
|
|
9430
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_1"),
|
|
9431
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_2"),
|
|
9432
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_3"),
|
|
9433
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_4"),
|
|
9434
|
+
t("LOGIN_CONSTANT.STUDIO_CHIP_5")
|
|
9313
9435
|
],
|
|
9314
9436
|
url: "",
|
|
9315
|
-
cta: "
|
|
9437
|
+
cta: t(VISIT_KEY, { name: "blocks Studio" })
|
|
9316
9438
|
},
|
|
9317
9439
|
{
|
|
9318
9440
|
name: "blocks-agents",
|
|
9319
9441
|
appName: "Blocks Agents",
|
|
9320
|
-
badge: "
|
|
9321
|
-
tagline: "
|
|
9322
|
-
descriptionTitle: "
|
|
9442
|
+
badge: t("LOGIN_CONSTANT.AGENTS_BADGE"),
|
|
9443
|
+
tagline: t("LOGIN_CONSTANT.AGENTS_TAGLINE"),
|
|
9444
|
+
descriptionTitle: t("LOGIN_CONSTANT.AGENTS_TITLE"),
|
|
9445
|
+
// Not shown in the UI.
|
|
9323
9446
|
keywords: [
|
|
9324
9447
|
"reasoning",
|
|
9325
9448
|
"autonomous",
|
|
@@ -9327,95 +9450,99 @@ var BLOCKS_PRODUCTS = [
|
|
|
9327
9450
|
"intelligent",
|
|
9328
9451
|
"adaptive"
|
|
9329
9452
|
],
|
|
9330
|
-
shortDescription: "
|
|
9331
|
-
description: "
|
|
9453
|
+
shortDescription: t("LOGIN_CONSTANT.AGENTS_SHORT"),
|
|
9454
|
+
description: t("LOGIN_CONSTANT.AGENTS_DESCRIPTION"),
|
|
9332
9455
|
featureChips: [
|
|
9333
|
-
"
|
|
9334
|
-
"
|
|
9335
|
-
"
|
|
9336
|
-
"
|
|
9456
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_1"),
|
|
9457
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_2"),
|
|
9458
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_3"),
|
|
9459
|
+
t("LOGIN_CONSTANT.AGENTS_CHIP_4")
|
|
9337
9460
|
],
|
|
9338
9461
|
url: "",
|
|
9339
|
-
cta: "
|
|
9462
|
+
cta: t(VISIT_KEY, { name: "Blocks Agents" })
|
|
9340
9463
|
},
|
|
9341
9464
|
{
|
|
9342
9465
|
name: "blocks-release",
|
|
9343
9466
|
appName: "blocks Release",
|
|
9344
|
-
badge: "
|
|
9345
|
-
tagline: "
|
|
9346
|
-
descriptionTitle: "
|
|
9467
|
+
badge: t("LOGIN_CONSTANT.RELEASE_BADGE"),
|
|
9468
|
+
tagline: t("LOGIN_CONSTANT.RELEASE_TAGLINE"),
|
|
9469
|
+
descriptionTitle: t("LOGIN_CONSTANT.RELEASE_TITLE"),
|
|
9470
|
+
// Not shown in the UI.
|
|
9347
9471
|
keywords: ["secure", "compliant", "automated", "fast"],
|
|
9348
|
-
shortDescription: "
|
|
9349
|
-
description: "
|
|
9472
|
+
shortDescription: t("LOGIN_CONSTANT.RELEASE_SHORT"),
|
|
9473
|
+
description: t("LOGIN_CONSTANT.RELEASE_DESCRIPTION"),
|
|
9350
9474
|
featureChips: [
|
|
9351
|
-
"
|
|
9352
|
-
"
|
|
9353
|
-
"
|
|
9354
|
-
"
|
|
9355
|
-
"
|
|
9475
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_1"),
|
|
9476
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_2"),
|
|
9477
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_3"),
|
|
9478
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_4"),
|
|
9479
|
+
t("LOGIN_CONSTANT.RELEASE_CHIP_5")
|
|
9356
9480
|
],
|
|
9357
9481
|
url: "",
|
|
9358
|
-
cta: "
|
|
9482
|
+
cta: t(VISIT_KEY, { name: "blocks Release" })
|
|
9359
9483
|
},
|
|
9360
9484
|
{
|
|
9361
9485
|
name: "blocks-monitor",
|
|
9362
9486
|
appName: "blocks Monitor",
|
|
9363
|
-
badge: "
|
|
9364
|
-
tagline: "
|
|
9365
|
-
descriptionTitle: "
|
|
9487
|
+
badge: t("LOGIN_CONSTANT.MONITOR_BADGE"),
|
|
9488
|
+
tagline: t("LOGIN_CONSTANT.MONITOR_TAGLINE"),
|
|
9489
|
+
descriptionTitle: t("LOGIN_CONSTANT.MONITOR_TITLE"),
|
|
9490
|
+
// Not shown in the UI.
|
|
9366
9491
|
keywords: ["observable", "traceable", "real-time", "intelligent"],
|
|
9367
|
-
shortDescription: "
|
|
9368
|
-
description: "
|
|
9492
|
+
shortDescription: t("LOGIN_CONSTANT.MONITOR_SHORT"),
|
|
9493
|
+
description: t("LOGIN_CONSTANT.MONITOR_DESCRIPTION"),
|
|
9369
9494
|
featureChips: [
|
|
9370
|
-
"
|
|
9371
|
-
"
|
|
9372
|
-
"
|
|
9373
|
-
"
|
|
9374
|
-
"
|
|
9495
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_1"),
|
|
9496
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_2"),
|
|
9497
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_3"),
|
|
9498
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_4"),
|
|
9499
|
+
t("LOGIN_CONSTANT.MONITOR_CHIP_5")
|
|
9375
9500
|
],
|
|
9376
9501
|
url: "",
|
|
9377
|
-
cta: "
|
|
9502
|
+
cta: t(VISIT_KEY, { name: "blocks Monitor" })
|
|
9378
9503
|
},
|
|
9379
9504
|
{
|
|
9380
9505
|
name: "blocks-utilities",
|
|
9381
9506
|
appName: "blocks Utilities",
|
|
9382
|
-
badge: "
|
|
9383
|
-
tagline: "
|
|
9384
|
-
descriptionTitle: "
|
|
9507
|
+
badge: t("LOGIN_CONSTANT.UTILITIES_BADGE"),
|
|
9508
|
+
tagline: t("LOGIN_CONSTANT.UTILITIES_TAGLINE"),
|
|
9509
|
+
descriptionTitle: t("LOGIN_CONSTANT.UTILITIES_TITLE"),
|
|
9510
|
+
// Not shown in the UI.
|
|
9385
9511
|
keywords: ["reliable", "real-time", "automated", "scalable"],
|
|
9386
|
-
shortDescription: "
|
|
9387
|
-
description: "
|
|
9512
|
+
shortDescription: t("LOGIN_CONSTANT.UTILITIES_SHORT"),
|
|
9513
|
+
description: t("LOGIN_CONSTANT.UTILITIES_DESCRIPTION"),
|
|
9388
9514
|
featureChips: [
|
|
9389
|
-
"
|
|
9390
|
-
"
|
|
9391
|
-
"
|
|
9392
|
-
"
|
|
9393
|
-
"
|
|
9515
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_1"),
|
|
9516
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_2"),
|
|
9517
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_3"),
|
|
9518
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_4"),
|
|
9519
|
+
t("LOGIN_CONSTANT.UTILITIES_CHIP_5")
|
|
9394
9520
|
],
|
|
9395
9521
|
url: "",
|
|
9396
|
-
cta: "
|
|
9522
|
+
cta: t(VISIT_KEY, { name: "blocks Utilities" })
|
|
9397
9523
|
}
|
|
9398
9524
|
];
|
|
9399
|
-
var
|
|
9525
|
+
var getDefaultBlocksProducts = (t) => [
|
|
9400
9526
|
{
|
|
9401
9527
|
name: "blocks-os",
|
|
9402
9528
|
appName: "blocks OS Platform",
|
|
9403
|
-
badge: "
|
|
9404
|
-
tagline: "
|
|
9405
|
-
descriptionTitle: "
|
|
9529
|
+
badge: t("LOGIN_CONSTANT.DEFAULT_OS_BADGE"),
|
|
9530
|
+
tagline: t("LOGIN_CONSTANT.DEFAULT_OS_TAGLINE"),
|
|
9531
|
+
descriptionTitle: t("LOGIN_CONSTANT.DEFAULT_OS_TITLE"),
|
|
9532
|
+
// Not shown in the UI.
|
|
9406
9533
|
keywords: ["observable", "intelligent", "scalable", "resilient", "secure"],
|
|
9407
|
-
shortDescription: "
|
|
9408
|
-
description: "
|
|
9534
|
+
shortDescription: t("LOGIN_CONSTANT.DEFAULT_OS_SHORT"),
|
|
9535
|
+
description: t("LOGIN_CONSTANT.DEFAULT_OS_DESCRIPTION"),
|
|
9409
9536
|
featureChips: [
|
|
9410
|
-
"
|
|
9411
|
-
"
|
|
9412
|
-
"
|
|
9413
|
-
"
|
|
9414
|
-
"
|
|
9415
|
-
"
|
|
9537
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_1"),
|
|
9538
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_2"),
|
|
9539
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_3"),
|
|
9540
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_4"),
|
|
9541
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_5"),
|
|
9542
|
+
t("LOGIN_CONSTANT.DEFAULT_OS_CHIP_6")
|
|
9416
9543
|
],
|
|
9417
9544
|
url: "",
|
|
9418
|
-
cta: "
|
|
9545
|
+
cta: t(VISIT_KEY, { name: "blocks OS" })
|
|
9419
9546
|
}
|
|
9420
9547
|
];
|
|
9421
9548
|
|
|
@@ -9432,13 +9559,15 @@ function useLoginCarousel({
|
|
|
9432
9559
|
name,
|
|
9433
9560
|
carouselItems
|
|
9434
9561
|
}) {
|
|
9562
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.login");
|
|
9563
|
+
const defaultProducts = React8.useMemo(() => getDefaultBlocksProducts(t), [t]);
|
|
9435
9564
|
const active = React8.useMemo(() => {
|
|
9436
|
-
const products = carouselItems?.filter(isBlocksProduct) ??
|
|
9565
|
+
const products = carouselItems?.filter(isBlocksProduct) ?? defaultProducts;
|
|
9437
9566
|
return products.find((p) => p.name === name) ?? products[0];
|
|
9438
|
-
}, [name, carouselItems]);
|
|
9567
|
+
}, [name, carouselItems, defaultProducts]);
|
|
9439
9568
|
const otherProducts = React8.useMemo(
|
|
9440
|
-
() =>
|
|
9441
|
-
[active?.name]
|
|
9569
|
+
() => defaultProducts.filter((p) => p.name !== active?.name),
|
|
9570
|
+
[defaultProducts, active?.name]
|
|
9442
9571
|
);
|
|
9443
9572
|
const carouselSource = carouselItems ?? otherProducts;
|
|
9444
9573
|
const [titleHead, titleTail] = splitAppName(active?.appName ?? "");
|
|
@@ -9463,15 +9592,20 @@ var BlocksLoginPage = ({
|
|
|
9463
9592
|
name,
|
|
9464
9593
|
onLogin,
|
|
9465
9594
|
isLoading = false,
|
|
9466
|
-
eyebrow
|
|
9467
|
-
loginLabel
|
|
9595
|
+
eyebrow,
|
|
9596
|
+
loginLabel,
|
|
9468
9597
|
docsUrl = "https://docs.seliseblocks.com/",
|
|
9469
|
-
footerLink
|
|
9598
|
+
footerLink,
|
|
9470
9599
|
showSignUp = false,
|
|
9471
9600
|
onSignUp,
|
|
9472
9601
|
isSignUpLoading = false,
|
|
9473
9602
|
carouselItems
|
|
9474
9603
|
}) => {
|
|
9604
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.login");
|
|
9605
|
+
const footer = footerLink ?? {
|
|
9606
|
+
label: t("BLOCKS_LOGIN_PAGE.FOOTER_LINK"),
|
|
9607
|
+
url: "https://seliseblocks.com"
|
|
9608
|
+
};
|
|
9475
9609
|
const canvasRef = React8.useRef(null);
|
|
9476
9610
|
useAtmosphericCanvas(canvasRef);
|
|
9477
9611
|
const {
|
|
@@ -9593,7 +9727,7 @@ var BlocksLoginPage = ({
|
|
|
9593
9727
|
/* @__PURE__ */ jsxRuntime.jsx(LoginHeader, {}),
|
|
9594
9728
|
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "main", children: [
|
|
9595
9729
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-left", children: [
|
|
9596
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "eyebrow", children: eyebrow }),
|
|
9730
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "eyebrow", children: eyebrow ?? t("BLOCKS_LOGIN_PAGE.EYEBROW") }),
|
|
9597
9731
|
/* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "title-main", children: [
|
|
9598
9732
|
titleHead,
|
|
9599
9733
|
titleTail && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -9614,7 +9748,7 @@ var BlocksLoginPage = ({
|
|
|
9614
9748
|
className: "launch-btn blocks-gradient",
|
|
9615
9749
|
disabled: isLoading,
|
|
9616
9750
|
onClick: onLogin,
|
|
9617
|
-
children: isLoading ? "
|
|
9751
|
+
children: isLoading ? t("BLOCKS_LOGIN_PAGE.REDIRECTING") : loginLabel ?? t("BLOCKS_LOGIN_PAGE.LOGIN_LABEL")
|
|
9618
9752
|
}
|
|
9619
9753
|
)
|
|
9620
9754
|
] }),
|
|
@@ -9626,7 +9760,7 @@ var BlocksLoginPage = ({
|
|
|
9626
9760
|
rel: "noreferrer",
|
|
9627
9761
|
className: "cta-docs",
|
|
9628
9762
|
children: [
|
|
9629
|
-
"
|
|
9763
|
+
t("BLOCKS_LOGIN_PAGE.VIEW_DOCUMENTATION"),
|
|
9630
9764
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9631
9765
|
"svg",
|
|
9632
9766
|
{
|
|
@@ -9644,7 +9778,7 @@ var BlocksLoginPage = ({
|
|
|
9644
9778
|
)
|
|
9645
9779
|
] }),
|
|
9646
9780
|
showSignUp && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "cta-signup", children: [
|
|
9647
|
-
"
|
|
9781
|
+
t("BLOCKS_LOGIN_PAGE.NOT_A_MEMBER"),
|
|
9648
9782
|
" ",
|
|
9649
9783
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9650
9784
|
"button",
|
|
@@ -9654,7 +9788,7 @@ var BlocksLoginPage = ({
|
|
|
9654
9788
|
disabled: isSignUpLoading,
|
|
9655
9789
|
className: "cta-signup-link",
|
|
9656
9790
|
children: [
|
|
9657
|
-
isSignUpLoading ? "
|
|
9791
|
+
isSignUpLoading ? t("BLOCKS_LOGIN_PAGE.REDIRECTING") : t("BLOCKS_LOGIN_PAGE.SIGN_UP"),
|
|
9658
9792
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9659
9793
|
"svg",
|
|
9660
9794
|
{
|
|
@@ -9674,11 +9808,10 @@ var BlocksLoginPage = ({
|
|
|
9674
9808
|
] }),
|
|
9675
9809
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-right", children: [
|
|
9676
9810
|
/* @__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
|
-
] })
|
|
9811
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "sdk-header-label", children: t("BLOCKS_LOGIN_PAGE.SERVICES_HEADER") }),
|
|
9812
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "sdk-count-badge", children: t("BLOCKS_LOGIN_PAGE.SERVICES_COUNT", {
|
|
9813
|
+
count: carouselSource.length
|
|
9814
|
+
}) })
|
|
9682
9815
|
] }),
|
|
9683
9816
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "carousel-track", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "carousel-inner", children: carouselCards.map((item, i) => {
|
|
9684
9817
|
const isBlocksProductItem = isBlocksProduct(item);
|
|
@@ -9758,12 +9891,12 @@ var BlocksLoginPage = ({
|
|
|
9758
9891
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9759
9892
|
"a",
|
|
9760
9893
|
{
|
|
9761
|
-
href:
|
|
9894
|
+
href: footer.url,
|
|
9762
9895
|
target: "_blank",
|
|
9763
9896
|
rel: "noreferrer",
|
|
9764
9897
|
className: "visit-construct",
|
|
9765
9898
|
children: [
|
|
9766
|
-
|
|
9899
|
+
footer.label,
|
|
9767
9900
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9768
9901
|
"svg",
|
|
9769
9902
|
{
|
|
@@ -9779,17 +9912,19 @@ var BlocksLoginPage = ({
|
|
|
9779
9912
|
]
|
|
9780
9913
|
}
|
|
9781
9914
|
),
|
|
9782
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sdk-open-source", children: "
|
|
9915
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sdk-open-source", children: t("BLOCKS_LOGIN_PAGE.OPEN_SOURCE") })
|
|
9783
9916
|
] })
|
|
9784
9917
|
] })
|
|
9785
9918
|
] })
|
|
9786
9919
|
] });
|
|
9787
9920
|
};
|
|
9788
9921
|
var LoginPage = () => {
|
|
9789
|
-
const
|
|
9790
|
-
const
|
|
9791
|
-
const
|
|
9792
|
-
const { start
|
|
9922
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.login");
|
|
9923
|
+
const products = React8.useMemo(() => getBlocksProducts(t), [t]);
|
|
9924
|
+
const config = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
9925
|
+
const { start, isLoading } = chunkVLZJP6FH_cjs.useLogin();
|
|
9926
|
+
const { canSignUp } = chunkVLZJP6FH_cjs.useSignUpAffordance();
|
|
9927
|
+
const { start: startSignUp, isLoading: isSignUpLoading } = chunkVLZJP6FH_cjs.useSignUpRedirect();
|
|
9793
9928
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9794
9929
|
BlocksLoginPage,
|
|
9795
9930
|
{
|
|
@@ -9799,7 +9934,7 @@ var LoginPage = () => {
|
|
|
9799
9934
|
showSignUp: canSignUp,
|
|
9800
9935
|
onSignUp: startSignUp,
|
|
9801
9936
|
isSignUpLoading,
|
|
9802
|
-
carouselItems:
|
|
9937
|
+
carouselItems: products
|
|
9803
9938
|
}
|
|
9804
9939
|
);
|
|
9805
9940
|
};
|
|
@@ -9812,33 +9947,33 @@ var resource_cli_default = 'data:image/svg+xml,<svg width="160" height="120" vie
|
|
|
9812
9947
|
|
|
9813
9948
|
// src/assets/images/console/resource-skills.svg
|
|
9814
9949
|
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
|
|
9950
|
+
var getResources = (t) => [
|
|
9816
9951
|
{
|
|
9817
|
-
eyebrow: "
|
|
9818
|
-
label: "
|
|
9819
|
-
description: "
|
|
9952
|
+
eyebrow: t("DEFAULT_DOC.LEARN_EYEBROW"),
|
|
9953
|
+
label: t("DEFAULT_DOC.LEARN_LABEL"),
|
|
9954
|
+
description: t("DEFAULT_DOC.LEARN_DESCRIPTION"),
|
|
9820
9955
|
image: resource_docs_default,
|
|
9821
9956
|
url: "https://docs.seliseblocks.com",
|
|
9822
9957
|
icon: lucideReact.BookOpenText,
|
|
9823
|
-
actionLabel: "
|
|
9958
|
+
actionLabel: t("DEFAULT_DOC.LEARN_ACTION")
|
|
9824
9959
|
},
|
|
9825
9960
|
{
|
|
9826
|
-
eyebrow: "
|
|
9827
|
-
label: "
|
|
9828
|
-
description: "
|
|
9961
|
+
eyebrow: t("DEFAULT_DOC.BUILD_EYEBROW"),
|
|
9962
|
+
label: t("DEFAULT_DOC.BUILD_LABEL"),
|
|
9963
|
+
description: t("DEFAULT_DOC.BUILD_DESCRIPTION"),
|
|
9829
9964
|
image: resource_cli_default,
|
|
9830
9965
|
url: "https://github.com/SELISEdigitalplatforms/blocks-cli",
|
|
9831
9966
|
icon: lucideReact.SquareTerminal,
|
|
9832
|
-
actionLabel: "
|
|
9967
|
+
actionLabel: t("DEFAULT_DOC.BUILD_ACTION")
|
|
9833
9968
|
},
|
|
9834
9969
|
{
|
|
9835
|
-
eyebrow: "
|
|
9836
|
-
label: "
|
|
9837
|
-
description: "
|
|
9970
|
+
eyebrow: t("DEFAULT_DOC.AUTOMATE_EYEBROW"),
|
|
9971
|
+
label: t("DEFAULT_DOC.AUTOMATE_LABEL"),
|
|
9972
|
+
description: t("DEFAULT_DOC.AUTOMATE_DESCRIPTION"),
|
|
9838
9973
|
image: resource_skills_default,
|
|
9839
9974
|
url: "https://github.com/SELISEdigitalplatforms/blocks-skills",
|
|
9840
9975
|
icon: lucideReact.Sparkles,
|
|
9841
|
-
actionLabel: "
|
|
9976
|
+
actionLabel: t("DEFAULT_DOC.AUTOMATE_ACTION")
|
|
9842
9977
|
}
|
|
9843
9978
|
];
|
|
9844
9979
|
var BentoGrid = ({
|
|
@@ -9902,14 +10037,17 @@ var BentoCard = ({
|
|
|
9902
10037
|
]
|
|
9903
10038
|
}
|
|
9904
10039
|
);
|
|
9905
|
-
var DefaultDoc = () =>
|
|
10040
|
+
var DefaultDoc = () => {
|
|
10041
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10042
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: getResources(t).map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
|
|
10043
|
+
};
|
|
9906
10044
|
function useCreateProjectRedirect() {
|
|
9907
|
-
const { name } =
|
|
10045
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
9908
10046
|
const navigate = reactRouter.useNavigate();
|
|
9909
10047
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
9910
|
-
const { isFetching, isReady, redirect } =
|
|
9911
|
-
clientId: osApp ?
|
|
9912
|
-
redirectUri: osApp ?
|
|
10048
|
+
const { isFetching, isReady, redirect } = chunkVLZJP6FH_cjs.usePrefetchRedirect({
|
|
10049
|
+
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10050
|
+
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
9913
10051
|
forwardedTo: "/app/create-project",
|
|
9914
10052
|
enabled: name !== "blocks-os" && !!osApp
|
|
9915
10053
|
});
|
|
@@ -9928,6 +10066,7 @@ function useCreateProjectRedirect() {
|
|
|
9928
10066
|
};
|
|
9929
10067
|
}
|
|
9930
10068
|
var AddProjectCard = () => {
|
|
10069
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
9931
10070
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
9932
10071
|
if (isFetching) {
|
|
9933
10072
|
return /* @__PURE__ */ jsxRuntime.jsx(ProjectCardLoadingSkeleton, {});
|
|
@@ -9943,12 +10082,13 @@ var AddProjectCard = () => {
|
|
|
9943
10082
|
style: { pointerEvents: isDisabled ? "none" : "auto" },
|
|
9944
10083
|
children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-0 text-center", children: [
|
|
9945
10084
|
/* @__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: "
|
|
10085
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-primary mt-2 font-bold", children: t("ADD_PROJECT_CARD.ADD_PROJECT") })
|
|
9947
10086
|
] })
|
|
9948
10087
|
}
|
|
9949
10088
|
);
|
|
9950
10089
|
};
|
|
9951
10090
|
function ConsoleCreateProject() {
|
|
10091
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
9952
10092
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
9953
10093
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9954
10094
|
framerMotion.motion.div,
|
|
@@ -9963,10 +10103,10 @@ function ConsoleCreateProject() {
|
|
|
9963
10103
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute -left-10 bottom-0 h-32 w-32 rounded-full bg-white/[0.03]" }),
|
|
9964
10104
|
/* @__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
10105
|
/* @__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: "
|
|
10106
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.15em] text-primary-foreground/60", children: t("CONSOLE_CREATE.EYEBROW") }),
|
|
9967
10107
|
/* @__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: "
|
|
10108
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl", children: t("CONSOLE_CREATE.TITLE") }),
|
|
10109
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm leading-relaxed text-primary-foreground/70", children: t("CONSOLE_CREATE.DESCRIPTION") }),
|
|
9970
10110
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap justify-center gap-3 pt-1", children: [
|
|
9971
10111
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9972
10112
|
Button,
|
|
@@ -9974,7 +10114,7 @@ function ConsoleCreateProject() {
|
|
|
9974
10114
|
onClick: handleClick,
|
|
9975
10115
|
disabled: isDisabled,
|
|
9976
10116
|
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 ? "
|
|
10117
|
+
children: isFetching ? t("CONSOLE_CREATE.REDIRECTING") : t("CONSOLE_CREATE.CREATE_PROJECT")
|
|
9978
10118
|
}
|
|
9979
10119
|
),
|
|
9980
10120
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9985,7 +10125,7 @@ function ConsoleCreateProject() {
|
|
|
9985
10125
|
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
10126
|
children: [
|
|
9987
10127
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BookOpenText, { className: "h-4 w-4" }),
|
|
9988
|
-
"
|
|
10128
|
+
t("CONSOLE_CREATE.VIEW_DOCUMENTATION")
|
|
9989
10129
|
]
|
|
9990
10130
|
}
|
|
9991
10131
|
)
|
|
@@ -9999,12 +10139,12 @@ function useProjectOverviewRedirect({
|
|
|
9999
10139
|
tenantGroupId
|
|
10000
10140
|
}) {
|
|
10001
10141
|
const navigate = reactRouter.useNavigate();
|
|
10002
|
-
const { name } =
|
|
10142
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
10003
10143
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
10004
10144
|
const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
|
|
10005
|
-
const { isFetching, isReady, redirect } =
|
|
10006
|
-
clientId: osApp ?
|
|
10007
|
-
redirectUri: osApp ?
|
|
10145
|
+
const { isFetching, isReady, redirect } = chunkVLZJP6FH_cjs.usePrefetchRedirect({
|
|
10146
|
+
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10147
|
+
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
10008
10148
|
forwardedTo: redirectedRoute,
|
|
10009
10149
|
enabled: name !== "blocks-os" && !!osApp
|
|
10010
10150
|
});
|
|
@@ -10022,16 +10162,19 @@ function useProjectOverviewRedirect({
|
|
|
10022
10162
|
isFetching
|
|
10023
10163
|
};
|
|
10024
10164
|
}
|
|
10025
|
-
var getActionLabels = (canOpen, isShared) => {
|
|
10165
|
+
var getActionLabels = (t, canOpen, isShared) => {
|
|
10026
10166
|
if (canOpen) {
|
|
10027
|
-
return isShared ? {
|
|
10028
|
-
accessibleLabel: "
|
|
10029
|
-
tooltipLabel: "
|
|
10167
|
+
return isShared ? {
|
|
10168
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.OPEN_SHARED_ARIA"),
|
|
10169
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.OPEN_SHARED_TOOLTIP")
|
|
10170
|
+
} : {
|
|
10171
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.CONFIGURE_ARIA"),
|
|
10172
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.CONFIGURE_TOOLTIP")
|
|
10030
10173
|
};
|
|
10031
10174
|
}
|
|
10032
10175
|
return {
|
|
10033
|
-
accessibleLabel: "
|
|
10034
|
-
tooltipLabel: "
|
|
10176
|
+
accessibleLabel: t("PROJECT_ACTION_BUTTON.ACCESS_UNAVAILABLE"),
|
|
10177
|
+
tooltipLabel: t("PROJECT_ACTION_BUTTON.ACCESS_UNAVAILABLE")
|
|
10035
10178
|
};
|
|
10036
10179
|
};
|
|
10037
10180
|
var ProjectActionButton = ({
|
|
@@ -10039,12 +10182,17 @@ var ProjectActionButton = ({
|
|
|
10039
10182
|
isShared,
|
|
10040
10183
|
canOpen = true
|
|
10041
10184
|
}) => {
|
|
10042
|
-
const {
|
|
10185
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10186
|
+
const { setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10043
10187
|
const { handleClick, isDisabled, isFetching } = useProjectOverviewRedirect({
|
|
10044
10188
|
tenantGroupId: project.tenantGroupId
|
|
10045
10189
|
});
|
|
10046
10190
|
const isActionDisabled = !canOpen || isDisabled || isFetching;
|
|
10047
|
-
const { accessibleLabel, tooltipLabel } = getActionLabels(
|
|
10191
|
+
const { accessibleLabel, tooltipLabel } = getActionLabels(
|
|
10192
|
+
t,
|
|
10193
|
+
canOpen,
|
|
10194
|
+
isShared
|
|
10195
|
+
);
|
|
10048
10196
|
const onClick = () => {
|
|
10049
10197
|
setTenantGroup(project.tenantGroupId);
|
|
10050
10198
|
handleClick();
|
|
@@ -10079,8 +10227,9 @@ var getLatestProjectUpdate = (group) => group.projects.reduce((latest, project)
|
|
|
10079
10227
|
var getEnvironmentLabel = (environment) => environmentOptions.find((option) => option.value === environment)?.label ?? environment;
|
|
10080
10228
|
var INLINE_LIMIT = 3;
|
|
10081
10229
|
var ProjectEnvironments = ({ projects }) => {
|
|
10230
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10082
10231
|
const navigate = reactRouter.useNavigate();
|
|
10083
|
-
const { setTenantGroup, setSelectedProject } =
|
|
10232
|
+
const { setTenantGroup, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10084
10233
|
const onEnvironmentClick = async (event, project) => {
|
|
10085
10234
|
event.stopPropagation();
|
|
10086
10235
|
try {
|
|
@@ -10105,7 +10254,7 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10105
10254
|
project.environment
|
|
10106
10255
|
);
|
|
10107
10256
|
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: "
|
|
10257
|
+
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
10258
|
}
|
|
10110
10259
|
const hasOverflow = projects.length > INLINE_LIMIT;
|
|
10111
10260
|
const visibleProjects = hasOverflow ? projects.slice(0, INLINE_LIMIT) : projects;
|
|
@@ -10113,17 +10262,13 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10113
10262
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
10114
10263
|
visibleProjects.map(renderEnvironmentChip),
|
|
10115
10264
|
hasOverflow && /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
10116
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.
|
|
10265
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10117
10266
|
"button",
|
|
10118
10267
|
{
|
|
10119
10268
|
type: "button",
|
|
10120
10269
|
onClick: (event) => event.stopPropagation(),
|
|
10121
10270
|
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
|
-
]
|
|
10271
|
+
children: t("PROJECT_ENVIRONMENTS.MORE", { count: overflowCount })
|
|
10127
10272
|
}
|
|
10128
10273
|
) }),
|
|
10129
10274
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10133,7 +10278,7 @@ var ProjectEnvironments = ({ projects }) => {
|
|
|
10133
10278
|
align: "start",
|
|
10134
10279
|
onClick: (event) => event.stopPropagation(),
|
|
10135
10280
|
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: "
|
|
10281
|
+
/* @__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
10282
|
projects.map((project) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10138
10283
|
"button",
|
|
10139
10284
|
{
|
|
@@ -10159,6 +10304,7 @@ var ProjectCard = ({
|
|
|
10159
10304
|
isShared,
|
|
10160
10305
|
canOpen = true
|
|
10161
10306
|
}) => {
|
|
10307
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10162
10308
|
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
10309
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-start justify-between gap-2", children: [
|
|
10164
10310
|
/* @__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 +10320,7 @@ var ProjectCard = ({
|
|
|
10174
10320
|
className: "flex items-center gap-1 shrink-0",
|
|
10175
10321
|
children: [
|
|
10176
10322
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
|
|
10177
|
-
"
|
|
10323
|
+
t("PROJECT_CARD.SHARED")
|
|
10178
10324
|
]
|
|
10179
10325
|
}
|
|
10180
10326
|
),
|
|
@@ -10194,13 +10340,18 @@ var ProjectCard = ({
|
|
|
10194
10340
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects }) })
|
|
10195
10341
|
] });
|
|
10196
10342
|
};
|
|
10197
|
-
var
|
|
10343
|
+
var MODULE3 = "genesis.console";
|
|
10344
|
+
var timeAgo = (timestamp, language) => dateFns.formatDistanceToNow(timestamp, {
|
|
10345
|
+
addSuffix: true,
|
|
10346
|
+
locale: language === "de" ? de.de : void 0
|
|
10347
|
+
});
|
|
10348
|
+
var getLastUpdatedLabel = (group, t, language) => {
|
|
10198
10349
|
const timestamp = getLatestProjectUpdate(group);
|
|
10199
|
-
return timestamp === 0 ? "
|
|
10350
|
+
return timestamp === 0 ? t("PROJECT_LIST.UNKNOWN") : timeAgo(timestamp, language);
|
|
10200
10351
|
};
|
|
10201
|
-
var getLastUpdatedCellLabel = (group) => {
|
|
10352
|
+
var getLastUpdatedCellLabel = (group, t, language) => {
|
|
10202
10353
|
const timestamp = getLatestProjectUpdate(group);
|
|
10203
|
-
return timestamp === 0 ? "
|
|
10354
|
+
return timestamp === 0 ? t("PROJECT_LIST.NOT_UPDATED_YET") : t("PROJECT_LIST.UPDATED", { time: timeAgo(timestamp, language) });
|
|
10204
10355
|
};
|
|
10205
10356
|
var CARD_RADIUS = "0.75rem";
|
|
10206
10357
|
var ROW_SPACING = "0 0.5rem";
|
|
@@ -10214,11 +10365,15 @@ var cardCorners = {
|
|
|
10214
10365
|
borderBottomRightRadius: CARD_RADIUS
|
|
10215
10366
|
}
|
|
10216
10367
|
};
|
|
10217
|
-
var SharedStatus = ({ isShared }) =>
|
|
10218
|
-
|
|
10219
|
-
"
|
|
10220
|
-
|
|
10368
|
+
var SharedStatus = ({ isShared }) => {
|
|
10369
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(MODULE3);
|
|
10370
|
+
return isShared ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", className: "flex w-fit items-center gap-1", children: [
|
|
10371
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
|
|
10372
|
+
t("PROJECT_LIST.SHARED")
|
|
10373
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10374
|
+
};
|
|
10221
10375
|
var AddProjectListAction = ({ mobile = false }) => {
|
|
10376
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT(MODULE3);
|
|
10222
10377
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
10223
10378
|
const action = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10224
10379
|
Button,
|
|
@@ -10230,7 +10385,7 @@ var AddProjectListAction = ({ mobile = false }) => {
|
|
|
10230
10385
|
onClick: handleClick,
|
|
10231
10386
|
children: [
|
|
10232
10387
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" }),
|
|
10233
|
-
"
|
|
10388
|
+
t("PROJECT_LIST.ADD_PROJECT")
|
|
10234
10389
|
]
|
|
10235
10390
|
}
|
|
10236
10391
|
);
|
|
@@ -10257,46 +10412,49 @@ var AddProjectListAction = ({ mobile = false }) => {
|
|
|
10257
10412
|
var ProjectMobileList = ({
|
|
10258
10413
|
projectGroups,
|
|
10259
10414
|
showAddProject
|
|
10260
|
-
}) =>
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
/* @__PURE__ */ jsxRuntime.
|
|
10415
|
+
}) => {
|
|
10416
|
+
const { t, language } = chunkKZ3NZCXZ_cjs.useT(MODULE3);
|
|
10417
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", "data-testid": "project-list-mobile", children: [
|
|
10418
|
+
showAddProject && /* @__PURE__ */ jsxRuntime.jsx(AddProjectListAction, { mobile: true }),
|
|
10419
|
+
projectGroups.map((group) => {
|
|
10420
|
+
const project = group.projects[0];
|
|
10421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10422
|
+
Card,
|
|
10423
|
+
{
|
|
10424
|
+
"data-testid": "project-list-row",
|
|
10425
|
+
className: "border-border/60 space-y-3 rounded-xl border p-4 shadow-sm",
|
|
10426
|
+
children: [
|
|
10427
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10428
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-2", children: [
|
|
10429
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "break-all text-base", children: getProjectGroupName(group) || t("PROJECT_LIST.UNNAMED_PROJECT") }),
|
|
10430
|
+
/* @__PURE__ */ jsxRuntime.jsx(SharedStatus, { isShared: group.isShared })
|
|
10431
|
+
] }),
|
|
10432
|
+
project && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10433
|
+
ProjectActionButton,
|
|
10434
|
+
{
|
|
10435
|
+
project,
|
|
10436
|
+
isShared: group.isShared,
|
|
10437
|
+
canOpen: canOpenProject(group)
|
|
10438
|
+
}
|
|
10439
|
+
)
|
|
10274
10440
|
] }),
|
|
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
|
-
] });
|
|
10441
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects: group.projects }),
|
|
10442
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs", children: t("PROJECT_LIST.LAST_UPDATED", {
|
|
10443
|
+
time: getLastUpdatedLabel(group, t, language)
|
|
10444
|
+
}) })
|
|
10445
|
+
]
|
|
10446
|
+
},
|
|
10447
|
+
group.tenantGroupId
|
|
10448
|
+
);
|
|
10449
|
+
})
|
|
10450
|
+
] });
|
|
10451
|
+
};
|
|
10295
10452
|
var ProjectList = ({
|
|
10296
10453
|
projectGroups,
|
|
10297
10454
|
showAddProject
|
|
10298
10455
|
}) => {
|
|
10299
10456
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
10457
|
+
const { t, language } = chunkKZ3NZCXZ_cjs.useT(MODULE3);
|
|
10300
10458
|
if (isMobile) {
|
|
10301
10459
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10302
10460
|
ProjectMobileList,
|
|
@@ -10326,12 +10484,12 @@ var ProjectList = ({
|
|
|
10326
10484
|
{
|
|
10327
10485
|
className: "bg-card max-w-64 break-all py-2 font-medium",
|
|
10328
10486
|
style: cardCorners.left,
|
|
10329
|
-
children: getProjectGroupName(group) || "
|
|
10487
|
+
children: getProjectGroupName(group) || t("PROJECT_LIST.UNNAMED_PROJECT")
|
|
10330
10488
|
}
|
|
10331
10489
|
),
|
|
10332
10490
|
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card py-2", children: /* @__PURE__ */ jsxRuntime.jsx(ProjectEnvironments, { projects: group.projects }) }),
|
|
10333
10491
|
/* @__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) }),
|
|
10492
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "bg-card whitespace-nowrap py-2 text-muted-foreground", children: getLastUpdatedCellLabel(group, t, language) }),
|
|
10335
10493
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10336
10494
|
TableCell,
|
|
10337
10495
|
{
|
|
@@ -10362,7 +10520,8 @@ function MultiSelect2({
|
|
|
10362
10520
|
onChange,
|
|
10363
10521
|
value: selectedValues
|
|
10364
10522
|
}) {
|
|
10365
|
-
const
|
|
10523
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
10524
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
10366
10525
|
const onSelectHandler = (value) => {
|
|
10367
10526
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
10368
10527
|
onChange(nextValues);
|
|
@@ -10425,7 +10584,7 @@ function MultiSelect2({
|
|
|
10425
10584
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
10426
10585
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: label }),
|
|
10427
10586
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
10428
|
-
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "
|
|
10587
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: t("MULTI_SELECT.NO_RESULTS") }),
|
|
10429
10588
|
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: options.map((option) => {
|
|
10430
10589
|
const isSelected = selectedValues.includes(option.value);
|
|
10431
10590
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10456,7 +10615,7 @@ function MultiSelect2({
|
|
|
10456
10615
|
{
|
|
10457
10616
|
onSelect: () => onResetHandler(),
|
|
10458
10617
|
className: "justify-center text-center",
|
|
10459
|
-
children: "
|
|
10618
|
+
children: t("common:CLEAR")
|
|
10460
10619
|
}
|
|
10461
10620
|
) })
|
|
10462
10621
|
] })
|
|
@@ -10467,6 +10626,7 @@ function MultiSelect2({
|
|
|
10467
10626
|
] });
|
|
10468
10627
|
}
|
|
10469
10628
|
var ResetButton = ({ onClick }) => {
|
|
10629
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
10470
10630
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10471
10631
|
Button,
|
|
10472
10632
|
{
|
|
@@ -10475,7 +10635,7 @@ var ResetButton = ({ onClick }) => {
|
|
|
10475
10635
|
onClick,
|
|
10476
10636
|
className: "h-8 rounded-md px-2 lg:px-3",
|
|
10477
10637
|
children: [
|
|
10478
|
-
"
|
|
10638
|
+
t("common:RESET"),
|
|
10479
10639
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ml-2 h-4 w-4" })
|
|
10480
10640
|
]
|
|
10481
10641
|
}
|
|
@@ -10483,17 +10643,18 @@ var ResetButton = ({ onClick }) => {
|
|
|
10483
10643
|
};
|
|
10484
10644
|
var SearchInput = ({
|
|
10485
10645
|
onChange,
|
|
10486
|
-
placeholder
|
|
10646
|
+
placeholder,
|
|
10487
10647
|
value,
|
|
10488
10648
|
className = ""
|
|
10489
10649
|
}) => {
|
|
10650
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
10490
10651
|
const [state, setState] = React8.useState(value);
|
|
10491
10652
|
const inputRef = React8.useRef(null);
|
|
10492
10653
|
React8.useEffect(() => {
|
|
10493
10654
|
setState(value);
|
|
10494
10655
|
}, [value]);
|
|
10495
10656
|
const debounced = React8.useRef(
|
|
10496
|
-
|
|
10657
|
+
chunk4RZMYO3F_cjs.debounce((val) => {
|
|
10497
10658
|
onChange(val);
|
|
10498
10659
|
}, 300)
|
|
10499
10660
|
).current;
|
|
@@ -10518,7 +10679,7 @@ var SearchInput = ({
|
|
|
10518
10679
|
Input,
|
|
10519
10680
|
{
|
|
10520
10681
|
ref: inputRef,
|
|
10521
|
-
placeholder,
|
|
10682
|
+
placeholder: placeholder ?? t("SEARCH_INPUT.PLACEHOLDER"),
|
|
10522
10683
|
value: state,
|
|
10523
10684
|
onChange: handleChange,
|
|
10524
10685
|
className: chunkYAF2X7W5_cjs.cn(
|
|
@@ -10552,12 +10713,13 @@ var ProjectToolbar = ({
|
|
|
10552
10713
|
searchText,
|
|
10553
10714
|
viewMode
|
|
10554
10715
|
}) => {
|
|
10716
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10555
10717
|
const hasActiveFilters = searchText.trim().length > 0 || environmentFilter.length > 0;
|
|
10556
10718
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10557
10719
|
"div",
|
|
10558
10720
|
{
|
|
10559
10721
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
10560
|
-
"aria-label": "
|
|
10722
|
+
"aria-label": t("PROJECT_TOOLBAR.FILTERS_ARIA"),
|
|
10561
10723
|
children: [
|
|
10562
10724
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
10563
10725
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10565,13 +10727,13 @@ var ProjectToolbar = ({
|
|
|
10565
10727
|
{
|
|
10566
10728
|
value: searchText,
|
|
10567
10729
|
onChange: onSearchTextChange,
|
|
10568
|
-
placeholder: "
|
|
10730
|
+
placeholder: t("PROJECT_TOOLBAR.SEARCH_PLACEHOLDER")
|
|
10569
10731
|
}
|
|
10570
10732
|
),
|
|
10571
10733
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10572
10734
|
MultiSelect2,
|
|
10573
10735
|
{
|
|
10574
|
-
label: "
|
|
10736
|
+
label: t("PROJECT_TOOLBAR.ENVIRONMENT"),
|
|
10575
10737
|
options: availableEnvironmentOptions,
|
|
10576
10738
|
value: environmentFilter,
|
|
10577
10739
|
onChange: onEnvironmentFilterChange
|
|
@@ -10589,14 +10751,14 @@ var ProjectToolbar = ({
|
|
|
10589
10751
|
onValueChange: (value) => {
|
|
10590
10752
|
if (value === "grid" || value === "list") onViewModeChange(value);
|
|
10591
10753
|
},
|
|
10592
|
-
"aria-label": "
|
|
10754
|
+
"aria-label": t("PROJECT_TOOLBAR.VIEW_ARIA"),
|
|
10593
10755
|
className: "h-8 rounded-md border bg-background p-0.5",
|
|
10594
10756
|
children: [
|
|
10595
10757
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10596
10758
|
ToggleGroupItem,
|
|
10597
10759
|
{
|
|
10598
10760
|
value: "grid",
|
|
10599
|
-
"aria-label": "
|
|
10761
|
+
"aria-label": t("PROJECT_TOOLBAR.GRID_VIEW"),
|
|
10600
10762
|
className: "h-7 w-7 min-w-0 border-0 px-0",
|
|
10601
10763
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "h-4 w-4" })
|
|
10602
10764
|
}
|
|
@@ -10605,7 +10767,7 @@ var ProjectToolbar = ({
|
|
|
10605
10767
|
ToggleGroupItem,
|
|
10606
10768
|
{
|
|
10607
10769
|
value: "list",
|
|
10608
|
-
"aria-label": "
|
|
10770
|
+
"aria-label": t("PROJECT_TOOLBAR.LIST_VIEW"),
|
|
10609
10771
|
className: "h-7 w-7 min-w-0 border-0 px-0",
|
|
10610
10772
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "h-4 w-4" })
|
|
10611
10773
|
}
|
|
@@ -10621,7 +10783,7 @@ var DEFAULT_SORT = {
|
|
|
10621
10783
|
property: "lastUpdatedDate",
|
|
10622
10784
|
isDescending: true
|
|
10623
10785
|
};
|
|
10624
|
-
var projectViewStorage =
|
|
10786
|
+
var projectViewStorage = chunk4RZMYO3F_cjs.createStorage("local", { prefix: "console" });
|
|
10625
10787
|
var VIEW_MODE_KEY = "projectsViewMode";
|
|
10626
10788
|
var readViewMode = () => {
|
|
10627
10789
|
const storedValue = projectViewStorage.get(VIEW_MODE_KEY);
|
|
@@ -10643,7 +10805,7 @@ var useProjectListState = (projectGroups) => {
|
|
|
10643
10805
|
})),
|
|
10644
10806
|
[projectGroups]
|
|
10645
10807
|
);
|
|
10646
|
-
const searchedGroups =
|
|
10808
|
+
const searchedGroups = chunkVLZJP6FH_cjs.useDebouncedFuseFilter(
|
|
10647
10809
|
searchableGroups,
|
|
10648
10810
|
searchText,
|
|
10649
10811
|
SEARCH_OPTIONS
|
|
@@ -10713,7 +10875,8 @@ var SelfProjectLoading = ({ viewMode }) => {
|
|
|
10713
10875
|
) });
|
|
10714
10876
|
};
|
|
10715
10877
|
var SelfProject = ({ canCreateProject = false }) => {
|
|
10716
|
-
const {
|
|
10878
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10879
|
+
const { data, isLoading } = chunkVLZJP6FH_cjs.useGetProjects({ enabled: true });
|
|
10717
10880
|
const isPending = isLoading;
|
|
10718
10881
|
const projectGroups = data || [];
|
|
10719
10882
|
const {
|
|
@@ -10779,10 +10942,10 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10779
10942
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
10780
10943
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-3", children: [
|
|
10781
10944
|
/* @__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: "
|
|
10945
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "shrink-0 text-base font-semibold text-[hsl(var(--high-emphasis))]", children: t("SELF_PROJECT.YOUR_PROJECTS") }),
|
|
10783
10946
|
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
10947
|
] }),
|
|
10785
|
-
!isPending && canCreateProject && hasReachedProjectLimit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[hsl(var(--medium-emphasis))]", children: "
|
|
10948
|
+
!isPending && canCreateProject && hasReachedProjectLimit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[hsl(var(--medium-emphasis))]", children: t("SELF_PROJECT.DELETE_TO_CREATE") })
|
|
10786
10949
|
] }),
|
|
10787
10950
|
(isPending || projectGroups.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10788
10951
|
ProjectToolbar,
|
|
@@ -10799,7 +10962,7 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10799
10962
|
),
|
|
10800
10963
|
projectsContent,
|
|
10801
10964
|
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() ? "
|
|
10965
|
+
/* @__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
10966
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10804
10967
|
Button,
|
|
10805
10968
|
{
|
|
@@ -10810,14 +10973,15 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10810
10973
|
if (searchText.trim()) setSearchText("");
|
|
10811
10974
|
else setEnvironmentFilter([]);
|
|
10812
10975
|
},
|
|
10813
|
-
children: searchText.trim() ? "
|
|
10976
|
+
children: searchText.trim() ? t("SELF_PROJECT.CLEAR_SEARCH") : t("SELF_PROJECT.CLEAR_FILTERS")
|
|
10814
10977
|
}
|
|
10815
10978
|
)
|
|
10816
10979
|
] })
|
|
10817
10980
|
] });
|
|
10818
10981
|
};
|
|
10819
10982
|
var ConsolePage = ({ canCreateProject = false }) => {
|
|
10820
|
-
const {
|
|
10983
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.console");
|
|
10984
|
+
const { resetSelectedProject, resetTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10821
10985
|
React8.useEffect(() => {
|
|
10822
10986
|
resetSelectedProject();
|
|
10823
10987
|
resetTenantGroup();
|
|
@@ -10828,7 +10992,7 @@ var ConsolePage = ({ canCreateProject = false }) => {
|
|
|
10828
10992
|
/* @__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
10993
|
/* @__PURE__ */ jsxRuntime.jsx(SelfProject, { canCreateProject }),
|
|
10830
10994
|
/* @__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: "
|
|
10995
|
+
/* @__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
10996
|
/* @__PURE__ */ jsxRuntime.jsx(DefaultDoc, {})
|
|
10833
10997
|
] })
|
|
10834
10998
|
] })
|
|
@@ -10840,7 +11004,7 @@ var announceNewSession = async () => {
|
|
|
10840
11004
|
let timer;
|
|
10841
11005
|
try {
|
|
10842
11006
|
const status = await Promise.race([
|
|
10843
|
-
|
|
11007
|
+
chunkVLZJP6FH_cjs.impersonationService.impersonationStatus({ skipSessionCheck: true }),
|
|
10844
11008
|
new Promise((_, reject) => {
|
|
10845
11009
|
timer = setTimeout(
|
|
10846
11010
|
() => reject(new Error("Impersonation status timed out")),
|
|
@@ -10849,7 +11013,7 @@ var announceNewSession = async () => {
|
|
|
10849
11013
|
})
|
|
10850
11014
|
]);
|
|
10851
11015
|
const tenantId = status.impersonated ? status.impersonatedTenantId : rootTenantId;
|
|
10852
|
-
if (tenantId)
|
|
11016
|
+
if (tenantId) chunkIPMRZNNS_cjs.claimTenant(tenantId);
|
|
10853
11017
|
} catch {
|
|
10854
11018
|
} finally {
|
|
10855
11019
|
clearTimeout(timer);
|
|
@@ -10868,7 +11032,7 @@ var toSafeAppPath = (value) => {
|
|
|
10868
11032
|
var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
10869
11033
|
const [searchParams] = reactRouter.useSearchParams();
|
|
10870
11034
|
const hasProcessed = React8.useRef(false);
|
|
10871
|
-
const { setAuthenticated } =
|
|
11035
|
+
const { setAuthenticated } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
10872
11036
|
const code = searchParams.get("code");
|
|
10873
11037
|
const state = searchParams.get("state");
|
|
10874
11038
|
const forwardTo = searchParams.get("forwardedTo");
|
|
@@ -10904,18 +11068,19 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
10904
11068
|
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
11069
|
};
|
|
10906
11070
|
function ProfilePage() {
|
|
10907
|
-
const {
|
|
10908
|
-
|
|
10909
|
-
|
|
11071
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.profile");
|
|
11072
|
+
const { isLoading, error } = chunkVLZJP6FH_cjs.useInitiateRedirect({
|
|
11073
|
+
clientId: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
|
|
11074
|
+
redirectUri: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
|
|
10910
11075
|
forwardedTo: "/app/profile"
|
|
10911
11076
|
});
|
|
10912
11077
|
if (error)
|
|
10913
11078
|
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: "
|
|
11079
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-medium text-destructive", children: t("PROFILE_PAGE.REDIRECT_FAILED") }),
|
|
11080
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: t("PROFILE_PAGE.CHECK_CONSOLE") })
|
|
10916
11081
|
] }) });
|
|
10917
11082
|
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: "
|
|
11083
|
+
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
11084
|
return null;
|
|
10920
11085
|
}
|
|
10921
11086
|
|
|
@@ -10923,7 +11088,7 @@ function ProfilePage() {
|
|
|
10923
11088
|
var METHODS_WITH_BODY = ["POST", "PUT", "PATCH"];
|
|
10924
11089
|
var buildCurlCommand = (endpoint, xBlocksKey) => {
|
|
10925
11090
|
const method = endpoint.method ?? "GET";
|
|
10926
|
-
const headerValue = xBlocksKey ||
|
|
11091
|
+
const headerValue = xBlocksKey || chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_X_BLOCKS_KEY");
|
|
10927
11092
|
const lines = [
|
|
10928
11093
|
`curl -X ${method} '${endpoint.path}'`,
|
|
10929
11094
|
` -H 'X-Blocks-Key: ${headerValue}'`
|
|
@@ -10958,6 +11123,7 @@ var CoreApiEndpointRow = ({
|
|
|
10958
11123
|
endpoint,
|
|
10959
11124
|
xBlocksKey
|
|
10960
11125
|
}) => {
|
|
11126
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.dashboard");
|
|
10961
11127
|
const curlCommand = buildCurlCommand(endpoint, xBlocksKey);
|
|
10962
11128
|
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
11129
|
endpoint.method && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10976,7 +11142,7 @@ var CoreApiEndpointRow = ({
|
|
|
10976
11142
|
] }),
|
|
10977
11143
|
/* @__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
11144
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Terminal, { className: "h-3.5 w-3.5" }),
|
|
10979
|
-
"
|
|
11145
|
+
t("CORE_API_ENDPOINT_ROW.COPY_CURL")
|
|
10980
11146
|
] }) })
|
|
10981
11147
|
] });
|
|
10982
11148
|
};
|
|
@@ -11043,30 +11209,27 @@ var CoreApiLoadingSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { clas
|
|
|
11043
11209
|
/* @__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
11210
|
] });
|
|
11045
11211
|
var CoreApiCard = ({
|
|
11046
|
-
title
|
|
11047
|
-
description
|
|
11212
|
+
title,
|
|
11213
|
+
description,
|
|
11048
11214
|
endpoints,
|
|
11049
11215
|
xBlocksKey,
|
|
11050
11216
|
isLoading,
|
|
11051
11217
|
error
|
|
11052
11218
|
}) => {
|
|
11219
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.dashboard");
|
|
11053
11220
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(CoreApiLoadingSkeleton, {});
|
|
11054
11221
|
const groups = groupEndpointsByTag(endpoints);
|
|
11055
11222
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11056
11223
|
DashboardSectionCard,
|
|
11057
11224
|
{
|
|
11058
|
-
title,
|
|
11059
|
-
description,
|
|
11225
|
+
title: title ?? t("CORE_API_CARD.TITLE"),
|
|
11226
|
+
description: description ?? t("CORE_API_CARD.DESCRIPTION"),
|
|
11060
11227
|
contentClassName: "flex flex-col gap-2",
|
|
11061
11228
|
headerRight: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11062
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11063
|
-
endpoints.length,
|
|
11064
|
-
" Endpoint",
|
|
11065
|
-
endpoints.length !== 1 ? "s" : ""
|
|
11066
|
-
] }),
|
|
11229
|
+
/* @__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
11230
|
/* @__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
11231
|
] }),
|
|
11069
|
-
children: groups.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-3 text-center text-sm text-muted-foreground", children: error ? "
|
|
11232
|
+
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
11233
|
CoreApiGroupSection,
|
|
11071
11234
|
{
|
|
11072
11235
|
tag: group.tag,
|
|
@@ -11088,7 +11251,7 @@ var trimTrailingSlashes = (value) => {
|
|
|
11088
11251
|
};
|
|
11089
11252
|
var resolveBaseUrl = (swagger, swaggerUrl, explicitBaseUrl) => {
|
|
11090
11253
|
if (explicitBaseUrl) {
|
|
11091
|
-
return trimTrailingSlashes(
|
|
11254
|
+
return trimTrailingSlashes(chunkTSRDXJUG_cjs.getRuntimeEnv(explicitBaseUrl));
|
|
11092
11255
|
}
|
|
11093
11256
|
if (swagger.servers?.[0]?.url) {
|
|
11094
11257
|
return trimTrailingSlashes(swagger.servers[0].url);
|
|
@@ -11143,8 +11306,8 @@ var useSwaggerEndpoints = (serviceName, {
|
|
|
11143
11306
|
enabled = true,
|
|
11144
11307
|
staleTime = 5 * 60 * 1e3
|
|
11145
11308
|
} = {}) => {
|
|
11146
|
-
const baseUrl = serviceName ?
|
|
11147
|
-
const swaggerUrl = serviceName ?
|
|
11309
|
+
const baseUrl = serviceName ? chunk4RZMYO3F_cjs.getServiceBaseUrl(serviceName) : void 0;
|
|
11310
|
+
const swaggerUrl = serviceName ? chunk4RZMYO3F_cjs.getServiceSwaggerUrl(serviceName) : void 0;
|
|
11148
11311
|
const { data, isLoading, isError, error } = reactQuery.useQuery({
|
|
11149
11312
|
queryKey: ["swagger-endpoints", swaggerUrl],
|
|
11150
11313
|
queryFn: () => {
|
|
@@ -11163,27 +11326,30 @@ var ConfirmationModal = ({
|
|
|
11163
11326
|
data,
|
|
11164
11327
|
onConfirm,
|
|
11165
11328
|
buttonState
|
|
11166
|
-
}) =>
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11174
|
-
Button,
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11329
|
+
}) => {
|
|
11330
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11331
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "mr-4 w-full max-w-[425px] rounded-md", children: [
|
|
11332
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11333
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left text-lg font-semibold leading-7", children: data.dialogTitle }),
|
|
11334
|
+
/* @__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 })
|
|
11335
|
+
] }),
|
|
11336
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "mt-4 flex flex-row gap-2", children: [
|
|
11337
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", children: data.cancelButton || t("common:CANCEL") }) }),
|
|
11338
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11339
|
+
Button,
|
|
11340
|
+
{
|
|
11341
|
+
size: "sm",
|
|
11342
|
+
onClick: onConfirm,
|
|
11343
|
+
disabled: buttonState?.confirm.disable,
|
|
11344
|
+
children: data.confirmButton || t("common:YES")
|
|
11345
|
+
}
|
|
11346
|
+
)
|
|
11347
|
+
] })
|
|
11348
|
+
] });
|
|
11349
|
+
};
|
|
11184
11350
|
var DashboardOverview = () => {
|
|
11185
|
-
const { name } =
|
|
11186
|
-
const { data, isFetching } =
|
|
11351
|
+
const { name } = chunkVLZJP6FH_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
11352
|
+
const { data, isFetching } = chunkVLZJP6FH_cjs.useGetProject();
|
|
11187
11353
|
const {
|
|
11188
11354
|
endpoints,
|
|
11189
11355
|
isLoading: isLoadingEndpoints,
|
|
@@ -11218,22 +11384,23 @@ var ProjectDetail = ({
|
|
|
11218
11384
|
project,
|
|
11219
11385
|
isLoading
|
|
11220
11386
|
}) => {
|
|
11387
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11221
11388
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
|
|
11222
11389
|
if (!project)
|
|
11223
11390
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11224
11391
|
ErrorDisplayWithCard,
|
|
11225
11392
|
{
|
|
11226
|
-
text: "
|
|
11393
|
+
text: t("PROJECT_DETAIL.ERROR"),
|
|
11227
11394
|
containerClassName: "min-h-[20dvh]"
|
|
11228
11395
|
}
|
|
11229
11396
|
);
|
|
11230
11397
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11231
11398
|
DashboardSectionCard,
|
|
11232
11399
|
{
|
|
11233
|
-
title: "
|
|
11234
|
-
description: "
|
|
11400
|
+
title: t("PROJECT_DETAIL.TITLE"),
|
|
11401
|
+
description: t("PROJECT_DETAIL.DESCRIPTION"),
|
|
11235
11402
|
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: "
|
|
11403
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("common:NAME"), children: project?.name }),
|
|
11237
11404
|
/* @__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
11405
|
CopyToClipboardButton,
|
|
11239
11406
|
{
|
|
@@ -11250,7 +11417,7 @@ var ProjectDetail = ({
|
|
|
11250
11417
|
)
|
|
11251
11418
|
}
|
|
11252
11419
|
) }) }),
|
|
11253
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11420
|
+
/* @__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
11421
|
Button,
|
|
11255
11422
|
{
|
|
11256
11423
|
className: "h-6 rounded-xl bg-blocks-btn-secondary hover:bg-blocks-btn-secondary/80",
|
|
@@ -11261,8 +11428,8 @@ var ProjectDetail = ({
|
|
|
11261
11428
|
)?.label
|
|
11262
11429
|
}
|
|
11263
11430
|
) }),
|
|
11264
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11265
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: "
|
|
11431
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.LAST_UPDATED"), children: project?.lastUpdatedDate && chunk4RZMYO3F_cjs.formatFullDate(new Date(project.lastUpdatedDate)) }),
|
|
11432
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.CREATED"), children: project?.createdDate && chunk4RZMYO3F_cjs.formatFullDate(new Date(project.createdDate)) })
|
|
11266
11433
|
] })
|
|
11267
11434
|
}
|
|
11268
11435
|
);
|
|
@@ -11275,13 +11442,14 @@ function ProjectList2({
|
|
|
11275
11442
|
redirectPaths,
|
|
11276
11443
|
collapsed = false
|
|
11277
11444
|
}) {
|
|
11445
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11278
11446
|
const navigate = reactRouter.useNavigate();
|
|
11279
11447
|
const { pathname } = reactRouter.useLocation();
|
|
11280
|
-
const { data: projectGroups = [], isLoading } =
|
|
11448
|
+
const { data: projectGroups = [], isLoading } = chunkVLZJP6FH_cjs.useGetProjects({
|
|
11281
11449
|
enabled: true
|
|
11282
11450
|
});
|
|
11283
|
-
const { selectedProject, setSelectedProject } =
|
|
11284
|
-
const { data: projectData } =
|
|
11451
|
+
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11452
|
+
const { data: projectData } = chunkVLZJP6FH_cjs.useGetProject();
|
|
11285
11453
|
const pendingProjectRef = React8.useRef(null);
|
|
11286
11454
|
const redirectRegexMap = React8.useMemo(
|
|
11287
11455
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -11321,7 +11489,7 @@ function ProjectList2({
|
|
|
11321
11489
|
className: "group relative flex h-10 w-full items-center justify-center rounded-lg",
|
|
11322
11490
|
children: [
|
|
11323
11491
|
/* @__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 || "
|
|
11492
|
+
/* @__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
11493
|
]
|
|
11326
11494
|
}
|
|
11327
11495
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11332,8 +11500,8 @@ function ProjectList2({
|
|
|
11332
11500
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
11333
11501
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
11334
11502
|
/* @__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 || "
|
|
11503
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: t("PROJECT_LIST.PROJECT") }),
|
|
11504
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "break-all text-sm font-medium leading-tight", children: name || t("PROJECT_LIST.SELECT_PROJECT") })
|
|
11337
11505
|
] })
|
|
11338
11506
|
] })
|
|
11339
11507
|
}
|
|
@@ -11346,7 +11514,7 @@ function ProjectList2({
|
|
|
11346
11514
|
sideOffset: collapsed ? 8 : 4,
|
|
11347
11515
|
className: collapsed ? "min-w-48" : "w-[--radix-dropdown-menu-trigger-width]",
|
|
11348
11516
|
children: [
|
|
11349
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "
|
|
11517
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: t("PROJECT_LIST.YOUR_PROJECTS") }),
|
|
11350
11518
|
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
11519
|
DropdownMenuItem,
|
|
11352
11520
|
{
|
|
@@ -11356,14 +11524,16 @@ function ProjectList2({
|
|
|
11356
11524
|
project?.itemId
|
|
11357
11525
|
)),
|
|
11358
11526
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
11359
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: "
|
|
11527
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { disabled: true, children: t("PROJECT_LIST.OVERVIEW_UNAVAILABLE") })
|
|
11360
11528
|
]
|
|
11361
11529
|
}
|
|
11362
11530
|
)
|
|
11363
11531
|
] });
|
|
11364
11532
|
}
|
|
11365
11533
|
var formSchema = zod.z.object({
|
|
11366
|
-
domain: zod.z.string().min(1,
|
|
11534
|
+
domain: zod.z.string().min(1, {
|
|
11535
|
+
error: () => chunkKZ3NZCXZ_cjs.tStatic("genesis.shared", "SET_CUSTOM_DOMAIN_FORM.REQUIRED")
|
|
11536
|
+
})
|
|
11367
11537
|
});
|
|
11368
11538
|
var SetCustomDomainForm = ({
|
|
11369
11539
|
defaultDomain,
|
|
@@ -11372,6 +11542,7 @@ var SetCustomDomainForm = ({
|
|
|
11372
11542
|
onSubmit,
|
|
11373
11543
|
onCancel
|
|
11374
11544
|
}) => {
|
|
11545
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11375
11546
|
const form = reactHookForm.useForm({
|
|
11376
11547
|
resolver: zod$1.zodResolver(formSchema),
|
|
11377
11548
|
defaultValues: { domain: defaultDomain }
|
|
@@ -11396,7 +11567,7 @@ var SetCustomDomainForm = ({
|
|
|
11396
11567
|
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "[&>span]:truncate [&>span]:text-left", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11397
11568
|
SelectValue,
|
|
11398
11569
|
{
|
|
11399
|
-
placeholder: verifiedDomains.length === 0 ? "
|
|
11570
|
+
placeholder: verifiedDomains.length === 0 ? t("SET_CUSTOM_DOMAIN_FORM.NO_VERIFIED") : t("SET_CUSTOM_DOMAIN_FORM.SELECT")
|
|
11400
11571
|
}
|
|
11401
11572
|
) }) }),
|
|
11402
11573
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "max-w-[calc(100vw-2rem)]", children: verifiedDomains.map((domain) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11416,8 +11587,8 @@ var SetCustomDomainForm = ({
|
|
|
11416
11587
|
}
|
|
11417
11588
|
),
|
|
11418
11589
|
/* @__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: "
|
|
11590
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onCancel, children: t("common:CANCEL") }),
|
|
11591
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", disabled: isPending, children: t("SET_CUSTOM_DOMAIN_FORM.SET") })
|
|
11421
11592
|
] })
|
|
11422
11593
|
] }) });
|
|
11423
11594
|
};
|
|
@@ -11430,7 +11601,8 @@ var SetCustomDomainDialog = ({
|
|
|
11430
11601
|
projectKey,
|
|
11431
11602
|
projectEnv
|
|
11432
11603
|
}) => {
|
|
11433
|
-
const {
|
|
11604
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11605
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useUpdateRepositories();
|
|
11434
11606
|
const verifiedDomains = React8.useMemo(
|
|
11435
11607
|
() => Array.from(
|
|
11436
11608
|
new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
|
|
@@ -11457,25 +11629,25 @@ var SetCustomDomainDialog = ({
|
|
|
11457
11629
|
]
|
|
11458
11630
|
});
|
|
11459
11631
|
if (res.isSuccess) {
|
|
11460
|
-
|
|
11632
|
+
chunk4RZMYO3F_cjs.showSuccessToast({
|
|
11633
|
+
description: t("SET_CUSTOM_DOMAIN_DIALOG.UPDATED")
|
|
11634
|
+
});
|
|
11461
11635
|
onOpenChange(false);
|
|
11462
11636
|
} else {
|
|
11463
|
-
|
|
11637
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: res.errors });
|
|
11464
11638
|
}
|
|
11465
11639
|
} catch (error) {
|
|
11466
11640
|
if (error && typeof error === "object" && "errors" in error) {
|
|
11467
|
-
|
|
11641
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: error.errors });
|
|
11468
11642
|
}
|
|
11469
11643
|
}
|
|
11470
11644
|
};
|
|
11471
11645
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
|
|
11472
11646
|
/* @__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
|
-
] })
|
|
11647
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("SET_CUSTOM_DOMAIN_DIALOG.TITLE") }),
|
|
11648
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: t("SET_CUSTOM_DOMAIN_DIALOG.DESCRIPTION", {
|
|
11649
|
+
name: repo?.repoName ?? ""
|
|
11650
|
+
}) })
|
|
11479
11651
|
] }),
|
|
11480
11652
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11481
11653
|
SetCustomDomainForm,
|
|
@@ -11491,34 +11663,34 @@ var SetCustomDomainDialog = ({
|
|
|
11491
11663
|
] }) });
|
|
11492
11664
|
};
|
|
11493
11665
|
var columnHelper = reactTable.createColumnHelper();
|
|
11494
|
-
var buildColumns = (onSet) => [
|
|
11666
|
+
var buildColumns = (t, onSet) => [
|
|
11495
11667
|
columnHelper.accessor("repoName", {
|
|
11496
|
-
header: "
|
|
11668
|
+
header: t("common:NAME"),
|
|
11497
11669
|
cell: (info) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-high-emphasis", children: info.getValue() })
|
|
11498
11670
|
}),
|
|
11499
11671
|
columnHelper.accessor("defaultDeploymentUrl", {
|
|
11500
|
-
header: "
|
|
11672
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_DEPLOYMENT_DOMAIN"),
|
|
11501
11673
|
cell: (info) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-medium-emphasis", children: info.getValue() })
|
|
11502
11674
|
}),
|
|
11503
11675
|
columnHelper.accessor("customDeploymentUrl", {
|
|
11504
|
-
header: "
|
|
11676
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_CUSTOM_DOMAIN"),
|
|
11505
11677
|
cell: ({ row }) => {
|
|
11506
11678
|
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: "
|
|
11679
|
+
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
11680
|
}
|
|
11509
11681
|
}),
|
|
11510
11682
|
columnHelper.display({
|
|
11511
11683
|
id: "lastDeploymentDate",
|
|
11512
|
-
header: "
|
|
11684
|
+
header: t("PROJECT_REPO_TABLE.COLUMN_LAST_DEPLOYMENT"),
|
|
11513
11685
|
cell: ({ row }) => {
|
|
11514
11686
|
const repo = row.original;
|
|
11515
11687
|
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 ? "
|
|
11688
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-medium-emphasis", children: !repo.lastDeploymentDate || isDefaultDate ? t("PROJECT_REPO_TABLE.NOT_DEPLOYED") : chunk4RZMYO3F_cjs.formatFullDate(new Date(repo.lastDeploymentDate)) });
|
|
11517
11689
|
}
|
|
11518
11690
|
}),
|
|
11519
11691
|
columnHelper.display({
|
|
11520
11692
|
id: "actions",
|
|
11521
|
-
header: "
|
|
11693
|
+
header: t("common:ACTIONS"),
|
|
11522
11694
|
cell: ({ row }) => {
|
|
11523
11695
|
const repo = row.original;
|
|
11524
11696
|
const hasCustomDomain = !!repo.customDeploymentUrl;
|
|
@@ -11527,7 +11699,7 @@ var buildColumns = (onSet) => [
|
|
|
11527
11699
|
{
|
|
11528
11700
|
variant: "ghost",
|
|
11529
11701
|
size: "icon",
|
|
11530
|
-
title: "
|
|
11702
|
+
title: t("PROJECT_REPO_TABLE.EDIT_CUSTOM_DOMAIN"),
|
|
11531
11703
|
disabled: !hasCustomDomain,
|
|
11532
11704
|
onClick: () => onSet(repo),
|
|
11533
11705
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-4 w-4 text-muted-foreground" })
|
|
@@ -11542,13 +11714,14 @@ var ProjectRepoTable = ({
|
|
|
11542
11714
|
projectKey,
|
|
11543
11715
|
projectEnv
|
|
11544
11716
|
}) => {
|
|
11717
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11545
11718
|
const [setTarget, setSetTarget] = React8.useState(null);
|
|
11546
11719
|
const [setDialogOpen, setSetDialogOpen] = React8.useState(false);
|
|
11547
11720
|
const handleSet = (repo) => {
|
|
11548
11721
|
setSetTarget(repo);
|
|
11549
11722
|
setSetDialogOpen(true);
|
|
11550
11723
|
};
|
|
11551
|
-
const columns = buildColumns(handleSet);
|
|
11724
|
+
const columns = buildColumns(t, handleSet);
|
|
11552
11725
|
const table = reactTable.useReactTable({
|
|
11553
11726
|
data,
|
|
11554
11727
|
columns,
|
|
@@ -11589,7 +11762,7 @@ var ProjectRepoTable = ({
|
|
|
11589
11762
|
{
|
|
11590
11763
|
colSpan: columns.length,
|
|
11591
11764
|
className: "py-10 text-center text-sm text-muted-foreground",
|
|
11592
|
-
children: "
|
|
11765
|
+
children: t("PROJECT_REPO_TABLE.EMPTY")
|
|
11593
11766
|
}
|
|
11594
11767
|
) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11595
11768
|
"tr",
|
|
@@ -11609,12 +11782,13 @@ var ProjectRepoList = ({
|
|
|
11609
11782
|
project,
|
|
11610
11783
|
isLoading
|
|
11611
11784
|
}) => {
|
|
11785
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11612
11786
|
const { applications } = project;
|
|
11613
11787
|
const {
|
|
11614
11788
|
data: envRepositoriesResponse,
|
|
11615
11789
|
isLoading: isLoadingEnvRepos,
|
|
11616
11790
|
isFetching: isFetchingEnvRepos
|
|
11617
|
-
} =
|
|
11791
|
+
} = chunkVLZJP6FH_cjs.useGetEnvRepositories(project?.tenantId || "");
|
|
11618
11792
|
if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
|
|
11619
11793
|
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
11794
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
|
|
@@ -11624,8 +11798,8 @@ var ProjectRepoList = ({
|
|
|
11624
11798
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11625
11799
|
DashboardSectionCard,
|
|
11626
11800
|
{
|
|
11627
|
-
title: "
|
|
11628
|
-
description: "
|
|
11801
|
+
title: t("PROJECT_REPO_LIST.TITLE"),
|
|
11802
|
+
description: t("PROJECT_REPO_LIST.DESCRIPTION"),
|
|
11629
11803
|
contentClassName: "p-0",
|
|
11630
11804
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11631
11805
|
ProjectRepoTable,
|
|
@@ -11644,7 +11818,7 @@ var ProjectActions = ({
|
|
|
11644
11818
|
createdBy,
|
|
11645
11819
|
isFetching = false
|
|
11646
11820
|
}) => {
|
|
11647
|
-
const { user } =
|
|
11821
|
+
const { user } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
11648
11822
|
const isOwner = createdBy === user?.sub;
|
|
11649
11823
|
if (isFetching) {
|
|
11650
11824
|
return /* @__PURE__ */ jsxRuntime.jsx(ProjectActionsSkeleton, {});
|
|
@@ -11703,7 +11877,9 @@ var ProjectOverviewSkeleton = () => {
|
|
|
11703
11877
|
] });
|
|
11704
11878
|
};
|
|
11705
11879
|
var editProjectFormSchema = zod.z.object({
|
|
11706
|
-
name: zod.z.string().min(1,
|
|
11880
|
+
name: zod.z.string().min(1, {
|
|
11881
|
+
error: () => chunkKZ3NZCXZ_cjs.tStatic("genesis.shared", "EDIT_PROJECT_FORM_SCHEMA.NAME_REQUIRED")
|
|
11882
|
+
})
|
|
11707
11883
|
});
|
|
11708
11884
|
var editProjectFormDefaultValues = {
|
|
11709
11885
|
name: ""
|
|
@@ -11713,8 +11889,9 @@ var EditProjectForm = ({
|
|
|
11713
11889
|
currentName,
|
|
11714
11890
|
onAfterSubmit
|
|
11715
11891
|
}) => {
|
|
11892
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11716
11893
|
const queryClient = reactQuery.useQueryClient();
|
|
11717
|
-
const { mutateAsync, isPending } =
|
|
11894
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useUpdateTenantGroup();
|
|
11718
11895
|
const form = reactHookForm.useForm({
|
|
11719
11896
|
resolver: zod$1.zodResolver(editProjectFormSchema),
|
|
11720
11897
|
defaultValues: {
|
|
@@ -11730,20 +11907,20 @@ var EditProjectForm = ({
|
|
|
11730
11907
|
tenantGroupId
|
|
11731
11908
|
});
|
|
11732
11909
|
if (res.isSuccess) {
|
|
11733
|
-
|
|
11734
|
-
title: "
|
|
11735
|
-
description: "
|
|
11910
|
+
chunk4RZMYO3F_cjs.showSuccessToast({
|
|
11911
|
+
title: t("EDIT_PROJECT_FORM.TOAST_TITLE"),
|
|
11912
|
+
description: t("EDIT_PROJECT_FORM.TOAST_DESCRIPTION")
|
|
11736
11913
|
});
|
|
11737
11914
|
queryClient.invalidateQueries({ queryKey: ["identifier", "project"] });
|
|
11738
11915
|
queryClient.invalidateQueries({ queryKey: ["identifier", "projects"] });
|
|
11739
11916
|
form.reset();
|
|
11740
11917
|
onAfterSubmit();
|
|
11741
11918
|
} else {
|
|
11742
|
-
|
|
11919
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: res.errors });
|
|
11743
11920
|
}
|
|
11744
11921
|
} catch (error) {
|
|
11745
|
-
if (
|
|
11746
|
-
|
|
11922
|
+
if (chunk4RZMYO3F_cjs.isErrorWithErrors(error)) {
|
|
11923
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: error.errors });
|
|
11747
11924
|
}
|
|
11748
11925
|
}
|
|
11749
11926
|
};
|
|
@@ -11759,14 +11936,20 @@ var EditProjectForm = ({
|
|
|
11759
11936
|
control: form.control,
|
|
11760
11937
|
name: "name",
|
|
11761
11938
|
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(
|
|
11939
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { className: "text-sm font-medium text-medium-emphasis", children: t("EDIT_PROJECT_FORM.NAME_LABEL") }),
|
|
11940
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11941
|
+
Input,
|
|
11942
|
+
{
|
|
11943
|
+
...field,
|
|
11944
|
+
placeholder: t("EDIT_PROJECT_FORM.NAME_PLACEHOLDER")
|
|
11945
|
+
}
|
|
11946
|
+
) }),
|
|
11764
11947
|
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
11765
11948
|
] })
|
|
11766
11949
|
}
|
|
11767
11950
|
),
|
|
11768
11951
|
/* @__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: "
|
|
11952
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", className: "w-20", children: t("common:CANCEL") }) }),
|
|
11770
11953
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11771
11954
|
Button,
|
|
11772
11955
|
{
|
|
@@ -11774,7 +11957,7 @@ var EditProjectForm = ({
|
|
|
11774
11957
|
className: "w-20",
|
|
11775
11958
|
type: "submit",
|
|
11776
11959
|
disabled: !form.formState.isValid || isPending || !form.formState.isDirty,
|
|
11777
|
-
children: "
|
|
11960
|
+
children: t("common:SAVE")
|
|
11778
11961
|
}
|
|
11779
11962
|
)
|
|
11780
11963
|
] })
|
|
@@ -11788,10 +11971,11 @@ var EditProjectDialog = ({
|
|
|
11788
11971
|
tenantGroupId,
|
|
11789
11972
|
currentName
|
|
11790
11973
|
}) => {
|
|
11974
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11791
11975
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-md", children: [
|
|
11792
11976
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11793
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "
|
|
11794
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "
|
|
11977
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("EDIT_PROJECT_DIALOG.TITLE") }),
|
|
11978
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: t("EDIT_PROJECT_DIALOG.DESCRIPTION") })
|
|
11795
11979
|
] }),
|
|
11796
11980
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11797
11981
|
EditProjectForm,
|
|
@@ -11804,13 +11988,14 @@ var EditProjectDialog = ({
|
|
|
11804
11988
|
] }) });
|
|
11805
11989
|
};
|
|
11806
11990
|
function EditProject() {
|
|
11991
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11807
11992
|
const [openEditDialog, setOpenEditDialog] = React8.useState(false);
|
|
11808
|
-
const { selectedProject } =
|
|
11993
|
+
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11809
11994
|
const { tenantGroupId, name } = selectedProject || {};
|
|
11810
11995
|
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { open: openEditDialog, onOpenChange: setOpenEditDialog, children: [
|
|
11811
11996
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", className: "flex items-center gap-2", children: [
|
|
11812
11997
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }),
|
|
11813
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: "
|
|
11998
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: t("common:EDIT") })
|
|
11814
11999
|
] }) }),
|
|
11815
12000
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11816
12001
|
EditProjectDialog,
|
|
@@ -11850,13 +12035,14 @@ function SidebarMobileView({
|
|
|
11850
12035
|
redirectPaths,
|
|
11851
12036
|
navigationMenus
|
|
11852
12037
|
}) {
|
|
12038
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
11853
12039
|
const [open, setOpen] = React8.useState(false);
|
|
11854
|
-
const { appLightLogo, appDarkLogo } =
|
|
12040
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
11855
12041
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11856
12042
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
11857
12043
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
|
|
11858
12044
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5" }),
|
|
11859
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
12045
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("SIDEBAR_MOBILE_VIEW.TOGGLE_MENU") })
|
|
11860
12046
|
] }) }),
|
|
11861
12047
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11862
12048
|
SheetContent,
|
|
@@ -11882,11 +12068,11 @@ function SidebarMobileView({
|
|
|
11882
12068
|
] }) }),
|
|
11883
12069
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
11884
12070
|
/* @__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: "
|
|
12071
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: t("SIDEBAR_MOBILE_VIEW.PROJECT") }),
|
|
11886
12072
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectList2, { redirectPaths })
|
|
11887
12073
|
] }),
|
|
11888
12074
|
/* @__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: "
|
|
12075
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 text-sm text-low-emphasis", children: t("SIDEBAR_MOBILE_VIEW.ENVIRONMENT") }),
|
|
11890
12076
|
/* @__PURE__ */ jsxRuntime.jsx(EnvironmentList, { redirectPaths })
|
|
11891
12077
|
] }),
|
|
11892
12078
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
@@ -11900,9 +12086,10 @@ function SidebarMenuDesktop({
|
|
|
11900
12086
|
redirectPaths,
|
|
11901
12087
|
navigationMenus
|
|
11902
12088
|
}) {
|
|
11903
|
-
const {
|
|
11904
|
-
const {
|
|
11905
|
-
const
|
|
12089
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12090
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkX3GPJW7R_cjs.SidebarContext);
|
|
12091
|
+
const { appLightLogo, appDarkLogo } = chunkVLZJP6FH_cjs.useLogo();
|
|
12092
|
+
const icon = chunkVLZJP6FH_cjs.useIcon();
|
|
11906
12093
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11907
12094
|
const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
|
|
11908
12095
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -11949,7 +12136,7 @@ function SidebarMenuDesktop({
|
|
|
11949
12136
|
) })
|
|
11950
12137
|
] }),
|
|
11951
12138
|
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: "
|
|
12139
|
+
/* @__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
12140
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
11954
12141
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectList2, { redirectPaths }),
|
|
11955
12142
|
/* @__PURE__ */ jsxRuntime.jsx(RenderConditionally, { condition: !isProjectOverviewRoute, children: /* @__PURE__ */ jsxRuntime.jsx(EnvironmentList, { redirectPaths }) })
|
|
@@ -12020,7 +12207,7 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12020
12207
|
ErrorDisplay,
|
|
12021
12208
|
{
|
|
12022
12209
|
icon: lucideReact.AlertCircle,
|
|
12023
|
-
text: this.state.error?.message ?? "
|
|
12210
|
+
text: this.state.error?.message ?? chunkKZ3NZCXZ_cjs.tStatic("genesis.shared", "ERROR_BOUNDARY.DEFAULT"),
|
|
12024
12211
|
containerClassName: "h-full w-full min-h-100"
|
|
12025
12212
|
}
|
|
12026
12213
|
);
|
|
@@ -12029,24 +12216,25 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12029
12216
|
}
|
|
12030
12217
|
};
|
|
12031
12218
|
var ArchiveProject = () => {
|
|
12219
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12032
12220
|
const navigate = reactRouter.useNavigate();
|
|
12033
|
-
const projectKey =
|
|
12034
|
-
const { mutateAsync, isPending } =
|
|
12221
|
+
const projectKey = chunkU2LA7LBX_cjs.useProjectStore().selectedProject?.tenantId || "";
|
|
12222
|
+
const { mutateAsync, isPending } = chunkVLZJP6FH_cjs.useDisableProject({ projectKey });
|
|
12035
12223
|
const onClickHandler = async () => {
|
|
12036
12224
|
try {
|
|
12037
12225
|
const res = await mutateAsync();
|
|
12038
12226
|
if (res.isSuccess) {
|
|
12039
|
-
|
|
12040
|
-
title: "
|
|
12041
|
-
description: "
|
|
12227
|
+
chunk4RZMYO3F_cjs.showSuccessToast({
|
|
12228
|
+
title: t("ARCHIVE_PROJECT.TOAST_TITLE"),
|
|
12229
|
+
description: t("ARCHIVE_PROJECT.TOAST_DESCRIPTION")
|
|
12042
12230
|
});
|
|
12043
12231
|
navigate("/app/console");
|
|
12044
12232
|
} else {
|
|
12045
|
-
|
|
12233
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: res.errors });
|
|
12046
12234
|
}
|
|
12047
12235
|
} catch (error) {
|
|
12048
|
-
if (
|
|
12049
|
-
|
|
12236
|
+
if (chunk4RZMYO3F_cjs.isErrorWithErrors(error)) {
|
|
12237
|
+
chunk4RZMYO3F_cjs.showErrorToast({ errors: error.errors });
|
|
12050
12238
|
}
|
|
12051
12239
|
}
|
|
12052
12240
|
};
|
|
@@ -12060,7 +12248,7 @@ var ArchiveProject = () => {
|
|
|
12060
12248
|
className: "flex items-center gap-2",
|
|
12061
12249
|
children: [
|
|
12062
12250
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Archive, { className: "h-4 w-4" }),
|
|
12063
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: "
|
|
12251
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only sm:not-sr-only", children: t("common:DELETE") })
|
|
12064
12252
|
]
|
|
12065
12253
|
}
|
|
12066
12254
|
) }),
|
|
@@ -12070,12 +12258,12 @@ var ArchiveProject = () => {
|
|
|
12070
12258
|
onCancel: () => setOpen(false),
|
|
12071
12259
|
onConfirm: onClickHandler,
|
|
12072
12260
|
data: {
|
|
12073
|
-
dialogTitle: "
|
|
12261
|
+
dialogTitle: t("ARCHIVE_PROJECT.DIALOG_TITLE"),
|
|
12074
12262
|
dialogSubtitle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12075
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "
|
|
12076
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "
|
|
12263
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("ARCHIVE_PROJECT.CONFIRM") }),
|
|
12264
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("ARCHIVE_PROJECT.WARNING") })
|
|
12077
12265
|
] }),
|
|
12078
|
-
confirmButton: "
|
|
12266
|
+
confirmButton: t("common:DELETE")
|
|
12079
12267
|
},
|
|
12080
12268
|
buttonState: { confirm: { disable: isPending } }
|
|
12081
12269
|
}
|
|
@@ -12762,6 +12950,7 @@ var CopyableSnippet = ({
|
|
|
12762
12950
|
language = "bash",
|
|
12763
12951
|
isCopyable = true
|
|
12764
12952
|
}) => {
|
|
12953
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12765
12954
|
const [copied, setCopied] = React8.useState(false);
|
|
12766
12955
|
const handleCopy = async () => {
|
|
12767
12956
|
try {
|
|
@@ -12791,7 +12980,7 @@ var CopyableSnippet = ({
|
|
|
12791
12980
|
{
|
|
12792
12981
|
onClick: handleCopy,
|
|
12793
12982
|
className: "absolute -top-[28px] right-2 z-10 text-muted-foreground transition hover:text-foreground",
|
|
12794
|
-
"aria-label": "
|
|
12983
|
+
"aria-label": t("COPYABLE_SNIPPET.COPY_CODE"),
|
|
12795
12984
|
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
12985
|
}
|
|
12797
12986
|
),
|
|
@@ -12829,6 +13018,7 @@ function InfoTooltip({ content, side = "top" }) {
|
|
|
12829
13018
|
] });
|
|
12830
13019
|
}
|
|
12831
13020
|
function DateRange({ label, value, onChange }) {
|
|
13021
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12832
13022
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
12833
13023
|
const [open, setOpen] = React8.useState(false);
|
|
12834
13024
|
const [date, setDate] = React8.useState(value);
|
|
@@ -12872,10 +13062,10 @@ function DateRange({ label, value, onChange }) {
|
|
|
12872
13062
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
12873
13063
|
}
|
|
12874
13064
|
),
|
|
12875
|
-
|
|
13065
|
+
chunk4RZMYO3F_cjs.formatDate(date.from, true),
|
|
12876
13066
|
date.to && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12877
13067
|
" - ",
|
|
12878
|
-
|
|
13068
|
+
chunk4RZMYO3F_cjs.formatDate(date.to, true)
|
|
12879
13069
|
] })
|
|
12880
13070
|
] })
|
|
12881
13071
|
] }) }) }),
|
|
@@ -12899,10 +13089,10 @@ function DateRange({ label, value, onChange }) {
|
|
|
12899
13089
|
variant: "outline",
|
|
12900
13090
|
className: "w-full",
|
|
12901
13091
|
onClick: resetBtnHandler,
|
|
12902
|
-
children: "
|
|
13092
|
+
children: t("common:RESET")
|
|
12903
13093
|
}
|
|
12904
13094
|
),
|
|
12905
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", className: "w-full", onClick: applyBtnHandler, children: "
|
|
13095
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", className: "w-full", onClick: applyBtnHandler, children: t("common:APPLY") })
|
|
12906
13096
|
] })
|
|
12907
13097
|
] })
|
|
12908
13098
|
]
|
|
@@ -12911,18 +13101,19 @@ function DateRange({ label, value, onChange }) {
|
|
|
12911
13101
|
}
|
|
12912
13102
|
var DropdownSearchInput = ({
|
|
12913
13103
|
onChange,
|
|
12914
|
-
placeholder
|
|
13104
|
+
placeholder,
|
|
12915
13105
|
value,
|
|
12916
13106
|
className = {},
|
|
12917
13107
|
options = []
|
|
12918
13108
|
}) => {
|
|
13109
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12919
13110
|
const [state, setState] = React8.useState(value);
|
|
12920
13111
|
const inputRef = React8.useRef(null);
|
|
12921
13112
|
React8.useEffect(() => {
|
|
12922
13113
|
setState(value);
|
|
12923
13114
|
}, [value]);
|
|
12924
13115
|
const debounced = React8.useRef(
|
|
12925
|
-
|
|
13116
|
+
chunk4RZMYO3F_cjs.debounce((val) => {
|
|
12926
13117
|
onChange(val);
|
|
12927
13118
|
}, 300)
|
|
12928
13119
|
).current;
|
|
@@ -12964,7 +13155,7 @@ var DropdownSearchInput = ({
|
|
|
12964
13155
|
Input,
|
|
12965
13156
|
{
|
|
12966
13157
|
ref: inputRef,
|
|
12967
|
-
placeholder,
|
|
13158
|
+
placeholder: placeholder ?? t("DROPDOWN_SEARCH_INPUT.PLACEHOLDER"),
|
|
12968
13159
|
value: state.value,
|
|
12969
13160
|
onChange: handleChange,
|
|
12970
13161
|
className: chunkYAF2X7W5_cjs.cn(
|
|
@@ -12989,19 +13180,21 @@ var DropdownSearchInput = ({
|
|
|
12989
13180
|
] });
|
|
12990
13181
|
};
|
|
12991
13182
|
var ClearButton = ({ onClear }) => {
|
|
13183
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
12992
13184
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12993
13185
|
Button,
|
|
12994
13186
|
{
|
|
12995
13187
|
variant: "ghost",
|
|
12996
13188
|
className: "h-auto w-full rounded-sm px-2 py-1.5 font-medium text-accent-foreground hover:bg-accent",
|
|
12997
13189
|
onClick: onClear,
|
|
12998
|
-
children: "
|
|
13190
|
+
children: t("common:CLEAR")
|
|
12999
13191
|
}
|
|
13000
13192
|
) });
|
|
13001
13193
|
};
|
|
13002
13194
|
function Radio({ label, options, onChange, value }) {
|
|
13195
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
13003
13196
|
const [search, setSearch] = React8.useState("");
|
|
13004
|
-
const [buttonRef, popoverWidth] =
|
|
13197
|
+
const [buttonRef, popoverWidth] = chunkVLZJP6FH_cjs.usePopoverWidth();
|
|
13005
13198
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
13006
13199
|
const selected = React8.useMemo(
|
|
13007
13200
|
() => options.find((item) => item.value === value) || null,
|
|
@@ -13086,7 +13279,7 @@ function Radio({ label, options, onChange, value }) {
|
|
|
13086
13279
|
option.value
|
|
13087
13280
|
))
|
|
13088
13281
|
}
|
|
13089
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm !text-popover-foreground", children: "
|
|
13282
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm !text-popover-foreground", children: t("RADIO.NO_RESULTS") }) }),
|
|
13090
13283
|
value ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13091
13284
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
13092
13285
|
/* @__PURE__ */ jsxRuntime.jsx(ClearButton, { onClear: () => onChange(null) })
|
|
@@ -13176,6 +13369,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13176
13369
|
className,
|
|
13177
13370
|
...props
|
|
13178
13371
|
}, ref) => {
|
|
13372
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
13179
13373
|
const canPrev = pageIndex > 0;
|
|
13180
13374
|
const canNext = pageIndex < pageCount - 1;
|
|
13181
13375
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13191,7 +13385,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13191
13385
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: summary }),
|
|
13192
13386
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
|
|
13193
13387
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13194
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "
|
|
13388
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: t("TABLE_PAGINATION.ROWS_PER_PAGE") }),
|
|
13195
13389
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13196
13390
|
Select,
|
|
13197
13391
|
{
|
|
@@ -13204,12 +13398,10 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13204
13398
|
}
|
|
13205
13399
|
)
|
|
13206
13400
|
] }),
|
|
13207
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
Math.max(pageCount, 1)
|
|
13212
|
-
] }),
|
|
13401
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-[120px] items-center justify-center text-sm font-medium", children: t("TABLE_PAGINATION.PAGE_OF", {
|
|
13402
|
+
page: pageIndex + 1,
|
|
13403
|
+
total: Math.max(pageCount, 1)
|
|
13404
|
+
}) }),
|
|
13213
13405
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
13214
13406
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13215
13407
|
Button,
|
|
@@ -13219,7 +13411,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13219
13411
|
className: "hidden size-8 lg:flex",
|
|
13220
13412
|
onClick: () => onPageChange(0),
|
|
13221
13413
|
disabled: !canPrev,
|
|
13222
|
-
"aria-label": "
|
|
13414
|
+
"aria-label": t("TABLE_PAGINATION.FIRST_PAGE"),
|
|
13223
13415
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "size-4" })
|
|
13224
13416
|
}
|
|
13225
13417
|
),
|
|
@@ -13231,7 +13423,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13231
13423
|
className: "size-8",
|
|
13232
13424
|
onClick: () => onPageChange(pageIndex - 1),
|
|
13233
13425
|
disabled: !canPrev,
|
|
13234
|
-
"aria-label": "
|
|
13426
|
+
"aria-label": t("TABLE_PAGINATION.PREVIOUS_PAGE"),
|
|
13235
13427
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
|
|
13236
13428
|
}
|
|
13237
13429
|
),
|
|
@@ -13243,7 +13435,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13243
13435
|
className: "size-8",
|
|
13244
13436
|
onClick: () => onPageChange(pageIndex + 1),
|
|
13245
13437
|
disabled: !canNext,
|
|
13246
|
-
"aria-label": "
|
|
13438
|
+
"aria-label": t("TABLE_PAGINATION.NEXT_PAGE"),
|
|
13247
13439
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
|
|
13248
13440
|
}
|
|
13249
13441
|
),
|
|
@@ -13255,7 +13447,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13255
13447
|
className: "hidden size-8 lg:flex",
|
|
13256
13448
|
onClick: () => onPageChange(pageCount - 1),
|
|
13257
13449
|
disabled: !canNext,
|
|
13258
|
-
"aria-label": "
|
|
13450
|
+
"aria-label": t("TABLE_PAGINATION.LAST_PAGE"),
|
|
13259
13451
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "size-4" })
|
|
13260
13452
|
}
|
|
13261
13453
|
)
|
|
@@ -13333,6 +13525,7 @@ var FilterToolBarMobileView = ({
|
|
|
13333
13525
|
showReset,
|
|
13334
13526
|
onReset
|
|
13335
13527
|
}) => {
|
|
13528
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
13336
13529
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 md:hidden", children: [
|
|
13337
13530
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 max-w-72 flex-1", children: Components[0] }),
|
|
13338
13531
|
Components.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
@@ -13352,11 +13545,11 @@ var FilterToolBarMobileView = ({
|
|
|
13352
13545
|
className: "w-full",
|
|
13353
13546
|
"aria-describedby": "filter-description",
|
|
13354
13547
|
children: [
|
|
13355
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "mb-4", children: "
|
|
13548
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "mb-4", children: t("FILTER_TOOLBAR.TITLE") }),
|
|
13356
13549
|
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, {}),
|
|
13357
13550
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-4", children: [
|
|
13358
13551
|
Components.slice(1).map((item) => item),
|
|
13359
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "mt-4", size: "sm", children: "
|
|
13552
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "mt-4", size: "sm", children: t("FILTER_TOOLBAR.SHOW_RESULTS") }) }),
|
|
13360
13553
|
showReset && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13361
13554
|
ResetButton,
|
|
13362
13555
|
{
|
|
@@ -13398,7 +13591,7 @@ var FilterToolbar = ({
|
|
|
13398
13591
|
}
|
|
13399
13592
|
);
|
|
13400
13593
|
});
|
|
13401
|
-
const showReset = !hideGlobalResetButton && !
|
|
13594
|
+
const showReset = !hideGlobalResetButton && !chunk4RZMYO3F_cjs.deepEqual(initialValuesRef.current, values);
|
|
13402
13595
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13403
13596
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13404
13597
|
FilterToolbarDesktopView,
|
|
@@ -13464,6 +13657,7 @@ function DataTable(props) {
|
|
|
13464
13657
|
tableOptions,
|
|
13465
13658
|
renderHeaderCell
|
|
13466
13659
|
} = props;
|
|
13660
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
13467
13661
|
const sortNamespace = "sortNamespace" in props ? props.sortNamespace : void 0;
|
|
13468
13662
|
const defaultSortValue = "defaultSortValue" in props ? props.defaultSortValue : void 0;
|
|
13469
13663
|
const ns = sortNamespace ?? "dt";
|
|
@@ -13524,7 +13718,7 @@ function DataTable(props) {
|
|
|
13524
13718
|
{
|
|
13525
13719
|
colSpan: table.getAllColumns().length,
|
|
13526
13720
|
className: "h-24 text-center text-muted-foreground",
|
|
13527
|
-
children: renderEmptyState ?? "
|
|
13721
|
+
children: renderEmptyState ?? t("DATA_TABLE.NO_RESULTS")
|
|
13528
13722
|
}
|
|
13529
13723
|
) }) });
|
|
13530
13724
|
const tableNode = /* @__PURE__ */ jsxRuntime.jsxs(Table, { className: "text-sm", children: [
|
|
@@ -13561,6 +13755,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13561
13755
|
className,
|
|
13562
13756
|
...props
|
|
13563
13757
|
}, ref) => {
|
|
13758
|
+
const { t } = chunkKZ3NZCXZ_cjs.useT("genesis.shared");
|
|
13564
13759
|
const canPrev = pageIndex > 0;
|
|
13565
13760
|
const canNext = pageIndex < pageCount - 1;
|
|
13566
13761
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13576,7 +13771,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13576
13771
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: summary }),
|
|
13577
13772
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
|
|
13578
13773
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13579
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "
|
|
13774
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: t("DATA_TABLE_PAGINATION.ROWS_PER_PAGE") }),
|
|
13580
13775
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13581
13776
|
Select,
|
|
13582
13777
|
{
|
|
@@ -13589,12 +13784,10 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13589
13784
|
}
|
|
13590
13785
|
)
|
|
13591
13786
|
] }),
|
|
13592
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
Math.max(pageCount, 1)
|
|
13597
|
-
] }),
|
|
13787
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-[120px] items-center justify-center text-sm font-medium", children: t("DATA_TABLE_PAGINATION.PAGE_OF", {
|
|
13788
|
+
page: pageIndex + 1,
|
|
13789
|
+
total: Math.max(pageCount, 1)
|
|
13790
|
+
}) }),
|
|
13598
13791
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
13599
13792
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13600
13793
|
Button,
|
|
@@ -13604,7 +13797,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13604
13797
|
className: "hidden size-8 lg:flex",
|
|
13605
13798
|
onClick: () => onPageChange(0),
|
|
13606
13799
|
disabled: !canPrev,
|
|
13607
|
-
"aria-label": "
|
|
13800
|
+
"aria-label": t("DATA_TABLE_PAGINATION.FIRST_PAGE"),
|
|
13608
13801
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "size-4" })
|
|
13609
13802
|
}
|
|
13610
13803
|
),
|
|
@@ -13616,7 +13809,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13616
13809
|
className: "size-8",
|
|
13617
13810
|
onClick: () => onPageChange(pageIndex - 1),
|
|
13618
13811
|
disabled: !canPrev,
|
|
13619
|
-
"aria-label": "
|
|
13812
|
+
"aria-label": t("DATA_TABLE_PAGINATION.PREVIOUS_PAGE"),
|
|
13620
13813
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
|
|
13621
13814
|
}
|
|
13622
13815
|
),
|
|
@@ -13628,7 +13821,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13628
13821
|
className: "size-8",
|
|
13629
13822
|
onClick: () => onPageChange(pageIndex + 1),
|
|
13630
13823
|
disabled: !canNext,
|
|
13631
|
-
"aria-label": "
|
|
13824
|
+
"aria-label": t("DATA_TABLE_PAGINATION.NEXT_PAGE"),
|
|
13632
13825
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
|
|
13633
13826
|
}
|
|
13634
13827
|
),
|
|
@@ -13640,7 +13833,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13640
13833
|
className: "hidden size-8 lg:flex",
|
|
13641
13834
|
onClick: () => onPageChange(pageCount - 1),
|
|
13642
13835
|
disabled: !canNext,
|
|
13643
|
-
"aria-label": "
|
|
13836
|
+
"aria-label": t("DATA_TABLE_PAGINATION.LAST_PAGE"),
|
|
13644
13837
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "size-4" })
|
|
13645
13838
|
}
|
|
13646
13839
|
)
|
|
@@ -14010,5 +14203,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
|
|
|
14010
14203
|
exports.useRightSidePanel = useRightSidePanel;
|
|
14011
14204
|
exports.useSortQueryParams = useSortQueryParams;
|
|
14012
14205
|
exports.useWizardStepper = useWizardStepper;
|
|
14013
|
-
//# sourceMappingURL=chunk-
|
|
14014
|
-
//# sourceMappingURL=chunk-
|
|
14206
|
+
//# sourceMappingURL=chunk-CSFOG5YH.cjs.map
|
|
14207
|
+
//# sourceMappingURL=chunk-CSFOG5YH.cjs.map
|