@seliseblocks/genesis-os 4.4.7 → 4.4.9
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-DOPVVJD5.js → all-O45OXFJ7.js} +43 -43
- package/dist/all-O45OXFJ7.js.map +1 -0
- package/dist/{all-U2EMOAAN.cjs → all-UJTAKIGL.cjs} +43 -43
- package/dist/{all-U2EMOAAN.cjs.map → all-UJTAKIGL.cjs.map} +1 -1
- package/dist/aspnet-4V2TYHQE.cjs +13 -0
- package/dist/{aspnet-7QL7EKM4.cjs.map → aspnet-4V2TYHQE.cjs.map} +1 -1
- package/dist/aspnet-R3X2H2AO.js +7 -0
- package/dist/{aspnet-I623QV26.js.map → aspnet-R3X2H2AO.js.map} +1 -1
- package/dist/{chunk-5L6BSYZR.cjs → chunk-45XWYZ67.cjs} +3 -3
- package/dist/{chunk-5L6BSYZR.cjs.map → chunk-45XWYZ67.cjs.map} +1 -1
- package/dist/{chunk-5JLLXRMI.cjs → chunk-A373J4BR.cjs} +44 -44
- package/dist/{chunk-5JLLXRMI.cjs.map → chunk-A373J4BR.cjs.map} +1 -1
- package/dist/{chunk-IPMRZNNS.cjs → chunk-A4MVNKXL.cjs} +20 -7
- package/dist/chunk-A4MVNKXL.cjs.map +1 -0
- package/dist/{chunk-4RZMYO3F.cjs → chunk-AIUUCMAI.cjs} +6 -6
- package/dist/{chunk-4RZMYO3F.cjs.map → chunk-AIUUCMAI.cjs.map} +1 -1
- package/dist/{chunk-X3GPJW7R.cjs → chunk-CTIGX76P.cjs} +4 -4
- package/dist/{chunk-X3GPJW7R.cjs.map → chunk-CTIGX76P.cjs.map} +1 -1
- package/dist/{chunk-KZOSD6FO.js → chunk-ECDNFX6H.js} +3 -3
- package/dist/{chunk-KZOSD6FO.js.map → chunk-ECDNFX6H.js.map} +1 -1
- package/dist/{chunk-ASX5UGE4.js → chunk-G24RPSJG.js} +42 -42
- package/dist/{chunk-ASX5UGE4.js.map → chunk-G24RPSJG.js.map} +1 -1
- package/dist/{chunk-VJAVGV6Z.js → chunk-GFUHF4DC.js} +3 -3
- package/dist/{chunk-VJAVGV6Z.js.map → chunk-GFUHF4DC.js.map} +1 -1
- package/dist/{chunk-F2IEUFPT.js → chunk-L4V72AAV.js} +217 -63
- package/dist/chunk-L4V72AAV.js.map +1 -0
- package/dist/{chunk-3OO2YVXW.js → chunk-LAWQOHY6.js} +3 -3
- package/dist/{chunk-3OO2YVXW.js.map → chunk-LAWQOHY6.js.map} +1 -1
- package/dist/{chunk-UDFH7SJI.js → chunk-OE5T43AS.js} +20 -7
- package/dist/chunk-OE5T43AS.js.map +1 -0
- package/dist/{chunk-KZ3NZCXZ.cjs → chunk-OPMWK5SY.cjs} +14 -2
- package/dist/chunk-OPMWK5SY.cjs.map +1 -0
- package/dist/{chunk-VLZJP6FH.cjs → chunk-P4SL4PTY.cjs} +40 -40
- package/dist/{chunk-VLZJP6FH.cjs.map → chunk-P4SL4PTY.cjs.map} +1 -1
- package/dist/{chunk-O7TJN754.js → chunk-QHNZOBXR.js} +3 -3
- package/dist/{chunk-O7TJN754.js.map → chunk-QHNZOBXR.js.map} +1 -1
- package/dist/{chunk-VGOVEFEP.cjs → chunk-SAK3QQCD.cjs} +3 -3
- package/dist/{chunk-VGOVEFEP.cjs.map → chunk-SAK3QQCD.cjs.map} +1 -1
- package/dist/{chunk-XL7EULGP.js → chunk-U6GTLTLO.js} +3 -3
- package/dist/{chunk-XL7EULGP.js.map → chunk-U6GTLTLO.js.map} +1 -1
- package/dist/{chunk-O2MGCS3O.js → chunk-XYPSBVXL.js} +14 -2
- package/dist/chunk-XYPSBVXL.js.map +1 -0
- package/dist/{chunk-CSFOG5YH.cjs → chunk-ZVYSSUHO.cjs} +451 -297
- package/dist/chunk-ZVYSSUHO.cjs.map +1 -0
- package/dist/components/index.cjs +394 -394
- package/dist/components/index.js +47 -47
- package/dist/cshtml-IPCDTLX7.cjs +13 -0
- package/dist/{cshtml-ETL7US3D.cjs.map → cshtml-IPCDTLX7.cjs.map} +1 -1
- package/dist/cshtml-XPUEHA6K.js +7 -0
- package/dist/{cshtml-TVLCSBKU.js.map → cshtml-XPUEHA6K.js.map} +1 -1
- package/dist/eslint/index.cjs +33 -0
- package/dist/eslint/index.cjs.map +1 -0
- package/dist/eslint/index.d.cts +12 -0
- package/dist/eslint/index.d.ts +12 -0
- package/dist/eslint/index.js +28 -0
- package/dist/eslint/index.js.map +1 -0
- package/dist/guards/index.cjs +53 -53
- package/dist/guards/index.js +47 -47
- package/dist/hooks/index.cjs +59 -59
- package/dist/hooks/index.js +2 -2
- package/dist/i18n/index.cjs +29 -29
- package/dist/i18n/index.d.cts +4 -4
- package/dist/i18n/index.d.ts +4 -4
- package/dist/i18n/index.js +1 -1
- package/dist/index.cjs +592 -592
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +47 -47
- package/dist/layouts/index.cjs +54 -54
- package/dist/layouts/index.js +47 -47
- package/dist/lib/index.cjs +24 -24
- package/dist/lib/index.d.cts +9 -2
- package/dist/lib/index.d.ts +9 -2
- package/dist/lib/index.js +1 -1
- package/dist/observability/index.cjs +27 -21
- package/dist/observability/index.cjs.map +1 -1
- package/dist/observability/index.d.cts +5 -1
- package/dist/observability/index.d.ts +5 -1
- package/dist/observability/index.js +27 -21
- package/dist/observability/index.js.map +1 -1
- package/dist/pages/index.cjs +52 -52
- package/dist/pages/index.js +47 -47
- package/dist/providers/index.cjs +6 -6
- package/dist/providers/index.js +2 -2
- package/dist/{types-D9odiLzd.d.ts → types-Dz0dH1XK.d.ts} +5 -1
- package/dist/{types-CQX9_ck-.d.cts → types-VNffHJ1_.d.cts} +5 -1
- package/dist/utils/index.cjs +71 -71
- package/dist/utils/index.js +3 -3
- package/package.json +6 -1
- package/dist/all-DOPVVJD5.js.map +0 -1
- package/dist/aspnet-7QL7EKM4.cjs +0 -13
- package/dist/aspnet-I623QV26.js +0 -7
- package/dist/chunk-CSFOG5YH.cjs.map +0 -1
- package/dist/chunk-F2IEUFPT.js.map +0 -1
- package/dist/chunk-IPMRZNNS.cjs.map +0 -1
- package/dist/chunk-KZ3NZCXZ.cjs.map +0 -1
- package/dist/chunk-O2MGCS3O.js.map +0 -1
- package/dist/chunk-UDFH7SJI.js.map +0 -1
- package/dist/cshtml-ETL7US3D.cjs +0 -13
- package/dist/cshtml-TVLCSBKU.js +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunkP4SL4PTY_cjs = require('./chunk-P4SL4PTY.cjs');
|
|
5
|
+
var chunkAIUUCMAI_cjs = require('./chunk-AIUUCMAI.cjs');
|
|
6
|
+
var chunkA4MVNKXL_cjs = require('./chunk-A4MVNKXL.cjs');
|
|
7
7
|
var chunk2MP66EX3_cjs = require('./chunk-2MP66EX3.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkCTIGX76P_cjs = require('./chunk-CTIGX76P.cjs');
|
|
9
9
|
var chunkBPJM3L7O_cjs = require('./chunk-BPJM3L7O.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkOPMWK5SY_cjs = require('./chunk-OPMWK5SY.cjs');
|
|
11
11
|
var chunkYAF2X7W5_cjs = require('./chunk-YAF2X7W5.cjs');
|
|
12
12
|
var chunkF2LXD7RI_cjs = require('./chunk-F2LXD7RI.cjs');
|
|
13
13
|
var chunkTSRDXJUG_cjs = require('./chunk-TSRDXJUG.cjs');
|
|
@@ -429,7 +429,7 @@ var Separator = React8__namespace.forwardRef(
|
|
|
429
429
|
);
|
|
430
430
|
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
431
431
|
var SrClose = () => {
|
|
432
|
-
const { t } =
|
|
432
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
433
433
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("common:CLOSE") });
|
|
434
434
|
};
|
|
435
435
|
var Sheet = SheetPrimitive__namespace.Root;
|
|
@@ -669,6 +669,7 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
669
669
|
...props
|
|
670
670
|
}, ref) => {
|
|
671
671
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
672
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
672
673
|
if (collapsible === "none") {
|
|
673
674
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
674
675
|
"div",
|
|
@@ -696,8 +697,8 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
696
697
|
side,
|
|
697
698
|
children: [
|
|
698
699
|
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: "sr-only", children: [
|
|
699
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "
|
|
700
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: "
|
|
700
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: t("SIDEBAR.TITLE") }),
|
|
701
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: t("SIDEBAR.DESCRIPTION") })
|
|
701
702
|
] }),
|
|
702
703
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
703
704
|
]
|
|
@@ -763,7 +764,7 @@ var Sidebar = React8__namespace.forwardRef(
|
|
|
763
764
|
);
|
|
764
765
|
Sidebar.displayName = "Sidebar";
|
|
765
766
|
var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
766
|
-
const { t } =
|
|
767
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
767
768
|
const { toggleSidebar } = useSidebar();
|
|
768
769
|
const PanelLeftIcon = lucideReact.PanelLeft;
|
|
769
770
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -788,7 +789,7 @@ var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, ...prop
|
|
|
788
789
|
});
|
|
789
790
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
790
791
|
var SidebarRail = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
791
|
-
const { t } =
|
|
792
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
792
793
|
const { toggleSidebar } = useSidebar();
|
|
793
794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
794
795
|
"button",
|
|
@@ -1152,7 +1153,7 @@ var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size
|
|
|
1152
1153
|
});
|
|
1153
1154
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1154
1155
|
function useRightSidePanel() {
|
|
1155
|
-
return React8.useContext(
|
|
1156
|
+
return React8.useContext(chunkCTIGX76P_cjs.RightSidePanelContext) ?? chunkCTIGX76P_cjs.defaultRightSidePanelContextValue;
|
|
1156
1157
|
}
|
|
1157
1158
|
function RenderConditionally({
|
|
1158
1159
|
condition,
|
|
@@ -1166,7 +1167,7 @@ function RenderConditionally({
|
|
|
1166
1167
|
function RightSidePanelResizer({
|
|
1167
1168
|
onHandlePointerDown
|
|
1168
1169
|
}) {
|
|
1169
|
-
const { t } =
|
|
1170
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1170
1171
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pointer-events-none absolute inset-y-0 -left-0.5 w-1.5", children: [
|
|
1171
1172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1172
1173
|
"div",
|
|
@@ -1415,7 +1416,7 @@ var RightSidePanelDescription = React8__namespace.forwardRef(({ className, ...pr
|
|
|
1415
1416
|
RightSidePanelDescription.displayName = "RightSidePanelDescription";
|
|
1416
1417
|
var RightSidePanelClose = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1417
1418
|
const { isMobile, close } = useRightSidePanel();
|
|
1418
|
-
const { t } =
|
|
1419
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1419
1420
|
const Comp = isMobile ? vaul.Drawer.Close : SheetPrimitive__namespace.Close;
|
|
1420
1421
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1421
1422
|
Comp,
|
|
@@ -1536,7 +1537,7 @@ function RightSidePanelProvider({
|
|
|
1536
1537
|
const close = React8__namespace.useCallback(() => {
|
|
1537
1538
|
setOpen(false);
|
|
1538
1539
|
}, [setOpen]);
|
|
1539
|
-
|
|
1540
|
+
chunkP4SL4PTY_cjs.useKeyboardShortcut(shortcut, toggle);
|
|
1540
1541
|
React8__namespace.useEffect(() => {
|
|
1541
1542
|
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1542
1543
|
const handleHashChange = () => {
|
|
@@ -1592,7 +1593,7 @@ function RightSidePanelProvider({
|
|
|
1592
1593
|
resolvedTopOffset
|
|
1593
1594
|
]
|
|
1594
1595
|
);
|
|
1595
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCTIGX76P_cjs.RightSidePanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
1597
|
"div",
|
|
1597
1598
|
{
|
|
1598
1599
|
"data-slot": "right-side-panel-provider",
|
|
@@ -1628,7 +1629,7 @@ var RightSidePanelTrigger = React8__namespace.forwardRef(
|
|
|
1628
1629
|
type,
|
|
1629
1630
|
...props
|
|
1630
1631
|
}, ref) => {
|
|
1631
|
-
const { t } =
|
|
1632
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
1632
1633
|
const { open, toggle, panelId } = useRightSidePanel();
|
|
1633
1634
|
const Comp = asChild ? reactSlot.Slot : Button;
|
|
1634
1635
|
const isFloating = position !== "inline";
|
|
@@ -1751,7 +1752,7 @@ var DrawerDescription = React8__namespace.forwardRef(({ className, ...props }, r
|
|
|
1751
1752
|
DrawerDescription.displayName = vaul.Drawer.Description.displayName;
|
|
1752
1753
|
var I18N_MODULE = "genesis.shared";
|
|
1753
1754
|
var Pagination = ({ className, ...props }) => {
|
|
1754
|
-
const { t } =
|
|
1755
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1755
1756
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
1757
|
"nav",
|
|
1757
1758
|
{
|
|
@@ -1798,7 +1799,7 @@ var PaginationPrevious = ({
|
|
|
1798
1799
|
className,
|
|
1799
1800
|
...props
|
|
1800
1801
|
}) => {
|
|
1801
|
-
const { t } =
|
|
1802
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1802
1803
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1803
1804
|
PaginationLink,
|
|
1804
1805
|
{
|
|
@@ -1818,7 +1819,7 @@ var PaginationNext = ({
|
|
|
1818
1819
|
className,
|
|
1819
1820
|
...props
|
|
1820
1821
|
}) => {
|
|
1821
|
-
const { t } =
|
|
1822
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1822
1823
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1823
1824
|
PaginationLink,
|
|
1824
1825
|
{
|
|
@@ -1838,7 +1839,7 @@ var PaginationEllipsis = ({
|
|
|
1838
1839
|
className,
|
|
1839
1840
|
...props
|
|
1840
1841
|
}) => {
|
|
1841
|
-
const { t } =
|
|
1842
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE);
|
|
1842
1843
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1843
1844
|
"span",
|
|
1844
1845
|
{
|
|
@@ -2145,6 +2146,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2145
2146
|
align = "start"
|
|
2146
2147
|
}, ref) => {
|
|
2147
2148
|
const [open, setOpen] = React8__namespace.useState(false);
|
|
2149
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
2148
2150
|
const [draft, setDraft] = React8__namespace.useState(value);
|
|
2149
2151
|
React8__namespace.useEffect(() => {
|
|
2150
2152
|
if (open) setDraft(value);
|
|
@@ -2188,7 +2190,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2188
2190
|
onChange?.(void 0);
|
|
2189
2191
|
setOpen(false);
|
|
2190
2192
|
},
|
|
2191
|
-
children: "
|
|
2193
|
+
children: t("common:RESET")
|
|
2192
2194
|
}
|
|
2193
2195
|
),
|
|
2194
2196
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2200,7 +2202,7 @@ var DateRangePicker = React8__namespace.forwardRef(
|
|
|
2200
2202
|
onChange?.(draft);
|
|
2201
2203
|
setOpen(false);
|
|
2202
2204
|
},
|
|
2203
|
-
children: "
|
|
2205
|
+
children: t("common:APPLY")
|
|
2204
2206
|
}
|
|
2205
2207
|
)
|
|
2206
2208
|
] })
|
|
@@ -2409,7 +2411,7 @@ var WizardStepIndicator = ({
|
|
|
2409
2411
|
color: indicatorColor,
|
|
2410
2412
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "transparent"
|
|
2411
2413
|
},
|
|
2412
|
-
transition:
|
|
2414
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2413
2415
|
className: chunkYAF2X7W5_cjs.cn(
|
|
2414
2416
|
"flex size-8 items-center justify-center rounded-full border text-lg font-bold",
|
|
2415
2417
|
className
|
|
@@ -2420,7 +2422,7 @@ var WizardStepIndicator = ({
|
|
|
2420
2422
|
initial: { scale: 0, opacity: 0 },
|
|
2421
2423
|
animate: { scale: 1, opacity: 1 },
|
|
2422
2424
|
exit: { scale: 0, opacity: 0 },
|
|
2423
|
-
transition:
|
|
2425
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2424
2426
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-[18px]", "aria-hidden": true })
|
|
2425
2427
|
},
|
|
2426
2428
|
"check"
|
|
@@ -2430,7 +2432,7 @@ var WizardStepIndicator = ({
|
|
|
2430
2432
|
initial: { scale: 0.8, opacity: 0 },
|
|
2431
2433
|
animate: { scale: 1, opacity: 1 },
|
|
2432
2434
|
exit: { scale: 0.8, opacity: 0 },
|
|
2433
|
-
transition:
|
|
2435
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2434
2436
|
children: stepNumber
|
|
2435
2437
|
},
|
|
2436
2438
|
"number"
|
|
@@ -2441,7 +2443,7 @@ var WizardStepIndicator = ({
|
|
|
2441
2443
|
var WizardVerticalTrackBar = () => {
|
|
2442
2444
|
const { currentStep, totalSteps, goToStep, completedSteps, getSteps } = useWizardStepper();
|
|
2443
2445
|
const steps = getSteps();
|
|
2444
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition:
|
|
2446
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition: chunkA4MVNKXL_cjs.fadeTransition, children: steps.map((step, index) => {
|
|
2445
2447
|
const stepNumber = index + 1;
|
|
2446
2448
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
2447
2449
|
const isCurrent = currentStep === stepNumber;
|
|
@@ -2455,7 +2457,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2455
2457
|
{
|
|
2456
2458
|
layout: true,
|
|
2457
2459
|
className: "flex items-center gap-2",
|
|
2458
|
-
transition:
|
|
2460
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2459
2461
|
children: [
|
|
2460
2462
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2461
2463
|
Button,
|
|
@@ -2482,7 +2484,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2482
2484
|
animate: {
|
|
2483
2485
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2484
2486
|
},
|
|
2485
|
-
transition:
|
|
2487
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2486
2488
|
className: "ml-4 text-base font-medium",
|
|
2487
2489
|
children: step.title
|
|
2488
2490
|
}
|
|
@@ -2499,7 +2501,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2499
2501
|
scaleY: isCompleted ? 1 : 0.35,
|
|
2500
2502
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "hsl(var(--border))"
|
|
2501
2503
|
},
|
|
2502
|
-
transition:
|
|
2504
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition
|
|
2503
2505
|
}
|
|
2504
2506
|
) : null
|
|
2505
2507
|
]
|
|
@@ -2516,7 +2518,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2516
2518
|
{
|
|
2517
2519
|
layout: true,
|
|
2518
2520
|
className: "flex w-full flex-row flex-wrap justify-between",
|
|
2519
|
-
transition:
|
|
2521
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2520
2522
|
children: steps.map((step, index) => {
|
|
2521
2523
|
const stepNumber = index + 1;
|
|
2522
2524
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
@@ -2555,7 +2557,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2555
2557
|
animate: {
|
|
2556
2558
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2557
2559
|
},
|
|
2558
|
-
transition:
|
|
2560
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2559
2561
|
className: "hidden md:block",
|
|
2560
2562
|
children: step.title
|
|
2561
2563
|
}
|
|
@@ -2576,11 +2578,11 @@ var WizardStepViewport = ({
|
|
|
2576
2578
|
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2577
2579
|
framerMotion.motion.div,
|
|
2578
2580
|
{
|
|
2579
|
-
variants:
|
|
2581
|
+
variants: chunkA4MVNKXL_cjs.fadeInUp,
|
|
2580
2582
|
initial: "initial",
|
|
2581
2583
|
animate: "animate",
|
|
2582
2584
|
exit: "exit",
|
|
2583
|
-
transition:
|
|
2585
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
2584
2586
|
className,
|
|
2585
2587
|
children
|
|
2586
2588
|
},
|
|
@@ -3520,7 +3522,8 @@ function MultiSelect({
|
|
|
3520
3522
|
onChange,
|
|
3521
3523
|
value: selectedValues
|
|
3522
3524
|
}) {
|
|
3523
|
-
const [buttonRef, popoverWidth] =
|
|
3525
|
+
const [buttonRef, popoverWidth] = chunkP4SL4PTY_cjs.usePopoverWidth();
|
|
3526
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
3524
3527
|
const onSelectHandler = (value) => {
|
|
3525
3528
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
3526
3529
|
onChange(nextValues);
|
|
@@ -3551,15 +3554,14 @@ function MultiSelect({
|
|
|
3551
3554
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
3552
3555
|
}
|
|
3553
3556
|
),
|
|
3554
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.
|
|
3557
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3555
3558
|
Badge,
|
|
3556
3559
|
{
|
|
3557
3560
|
variant: "secondary",
|
|
3558
3561
|
className: "rounded-sm px-1 font-normal",
|
|
3559
|
-
children:
|
|
3560
|
-
selectedValues.length
|
|
3561
|
-
|
|
3562
|
-
]
|
|
3562
|
+
children: t("MULTI_SELECT.SELECTED_COUNT", {
|
|
3563
|
+
count: selectedValues.length
|
|
3564
|
+
})
|
|
3563
3565
|
}
|
|
3564
3566
|
) : options.filter((option) => selectedValues.includes(option.value)).map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3565
3567
|
Badge,
|
|
@@ -3583,7 +3585,7 @@ function MultiSelect({
|
|
|
3583
3585
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
3584
3586
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: label }),
|
|
3585
3587
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
3586
|
-
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "
|
|
3588
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: t("MULTI_SELECT.NO_RESULTS") }),
|
|
3587
3589
|
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: options.map((option) => {
|
|
3588
3590
|
const isSelected = selectedValues.includes(option.value);
|
|
3589
3591
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3614,7 +3616,7 @@ function MultiSelect({
|
|
|
3614
3616
|
{
|
|
3615
3617
|
onSelect: () => onResetHandler(),
|
|
3616
3618
|
className: "justify-center text-center",
|
|
3617
|
-
children: "
|
|
3619
|
+
children: t("common:CLEAR")
|
|
3618
3620
|
}
|
|
3619
3621
|
) })
|
|
3620
3622
|
] })
|
|
@@ -3836,7 +3838,7 @@ var CopyToClipboardButton = ({
|
|
|
3836
3838
|
),
|
|
3837
3839
|
initial: false,
|
|
3838
3840
|
animate: { opacity: isHoverable ? void 0 : 1 },
|
|
3839
|
-
transition:
|
|
3841
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
3840
3842
|
children: [
|
|
3841
3843
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3842
3844
|
Button,
|
|
@@ -3853,7 +3855,7 @@ var CopyToClipboardButton = ({
|
|
|
3853
3855
|
initial: { scale: 0.6, opacity: 0 },
|
|
3854
3856
|
animate: { scale: 1, opacity: 1 },
|
|
3855
3857
|
exit: { scale: 0.6, opacity: 0 },
|
|
3856
|
-
transition:
|
|
3858
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
3857
3859
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3858
3860
|
lucideReact.Check,
|
|
3859
3861
|
{
|
|
@@ -3869,7 +3871,7 @@ var CopyToClipboardButton = ({
|
|
|
3869
3871
|
initial: { scale: 0.6, opacity: 0 },
|
|
3870
3872
|
animate: { scale: 1, opacity: 1 },
|
|
3871
3873
|
exit: { scale: 0.6, opacity: 0 },
|
|
3872
|
-
transition:
|
|
3874
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
3873
3875
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4 text-muted-foreground", "aria-hidden": true })
|
|
3874
3876
|
},
|
|
3875
3877
|
"copy"
|
|
@@ -3882,7 +3884,7 @@ var CopyToClipboardButton = ({
|
|
|
3882
3884
|
layout: true,
|
|
3883
3885
|
className: "pointer-events-none absolute left-8 top-1/2 z-10 hidden -translate-y-1/2 whitespace-nowrap rounded bg-popover px-2 py-1 text-xs text-popover-foreground shadow-md peer-hover:block",
|
|
3884
3886
|
animate: { opacity: isCopying ? 1 : 0.9 },
|
|
3885
|
-
transition:
|
|
3887
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
3886
3888
|
children: isCopying ? copiedLabel : copyLabel
|
|
3887
3889
|
}
|
|
3888
3890
|
)
|
|
@@ -3969,7 +3971,7 @@ function StepperItem({
|
|
|
3969
3971
|
}
|
|
3970
3972
|
var Stepper = React8__namespace.forwardRef(
|
|
3971
3973
|
({ steps, currentStep, orientation = "horizontal", className, ...props }, ref) => {
|
|
3972
|
-
const { t } =
|
|
3974
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
3973
3975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3974
3976
|
"ol",
|
|
3975
3977
|
{
|
|
@@ -4164,7 +4166,7 @@ var CarouselItem = React8__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
4164
4166
|
});
|
|
4165
4167
|
CarouselItem.displayName = "CarouselItem";
|
|
4166
4168
|
var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4167
|
-
const { t } =
|
|
4169
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4168
4170
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
4169
4171
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4170
4172
|
Button,
|
|
@@ -4189,7 +4191,7 @@ var CarouselPrevious = React8__namespace.forwardRef(({ className, variant = "out
|
|
|
4189
4191
|
});
|
|
4190
4192
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
4191
4193
|
var CarouselNext = React8__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4192
|
-
const { t } =
|
|
4194
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4193
4195
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
4194
4196
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4195
4197
|
Button,
|
|
@@ -4414,7 +4416,7 @@ var ContextMenuShortcut = ({
|
|
|
4414
4416
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
4415
4417
|
var PasswordInput = React8__namespace.forwardRef(
|
|
4416
4418
|
({ className, toggleAriaLabel, ...props }, ref) => {
|
|
4417
|
-
const { t } =
|
|
4419
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4418
4420
|
const [visible, setVisible] = React8__namespace.useState(false);
|
|
4419
4421
|
const Icon2 = visible ? lucideReact.EyeOff : lucideReact.Eye;
|
|
4420
4422
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYAF2X7W5_cjs.cn("relative", className), children: [
|
|
@@ -4612,6 +4614,7 @@ var CollapsibleContent2 = React8__namespace.forwardRef(({ className, children, .
|
|
|
4612
4614
|
});
|
|
4613
4615
|
CollapsibleContent2.displayName = CollapsiblePrimitive__namespace.CollapsibleContent.displayName;
|
|
4614
4616
|
var KanbanTaskCard = ({ task, isOverlay }) => {
|
|
4617
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
4615
4618
|
const {
|
|
4616
4619
|
setNodeRef,
|
|
4617
4620
|
attributes,
|
|
@@ -4667,12 +4670,12 @@ var KanbanTaskCard = ({ task, isOverlay }) => {
|
|
|
4667
4670
|
...listeners,
|
|
4668
4671
|
className: "-ml-2 h-auto cursor-grab p-1 text-muted-foreground hover:text-foreground",
|
|
4669
4672
|
children: [
|
|
4670
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
4673
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("KANBAN_TASK_CARD.MOVE_TASK") }),
|
|
4671
4674
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, {})
|
|
4672
4675
|
]
|
|
4673
4676
|
}
|
|
4674
4677
|
),
|
|
4675
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "ml-auto font-semibold", children: "
|
|
4678
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "ml-auto font-semibold", children: t("KANBAN_TASK_CARD.TASK") })
|
|
4676
4679
|
] }),
|
|
4677
4680
|
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "whitespace-pre-wrap px-3 pb-6 pt-3 text-left", children: task.content })
|
|
4678
4681
|
]
|
|
@@ -5253,7 +5256,7 @@ var InfiniteScroller = ({
|
|
|
5253
5256
|
initial: { opacity: 0, height: 0 },
|
|
5254
5257
|
animate: { opacity: 1, height: "auto" },
|
|
5255
5258
|
exit: { opacity: 0, height: 0 },
|
|
5256
|
-
transition:
|
|
5259
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
5257
5260
|
children: loadingIndicator
|
|
5258
5261
|
},
|
|
5259
5262
|
"loading"
|
|
@@ -5264,10 +5267,10 @@ var InfiniteScroller = ({
|
|
|
5264
5267
|
framerMotion.motion.div,
|
|
5265
5268
|
{
|
|
5266
5269
|
layout: true,
|
|
5267
|
-
variants:
|
|
5270
|
+
variants: chunkA4MVNKXL_cjs.fadeInUp,
|
|
5268
5271
|
initial: "initial",
|
|
5269
5272
|
animate: "animate",
|
|
5270
|
-
transition:
|
|
5273
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
5271
5274
|
children: renderItem(item, index)
|
|
5272
5275
|
},
|
|
5273
5276
|
key
|
|
@@ -5279,7 +5282,7 @@ var InfiniteScroller = ({
|
|
|
5279
5282
|
className: "flex h-full items-center justify-center text-muted-foreground",
|
|
5280
5283
|
initial: { opacity: 0 },
|
|
5281
5284
|
animate: { opacity: 1 },
|
|
5282
|
-
transition:
|
|
5285
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
5283
5286
|
children: emptyContent ?? "No items"
|
|
5284
5287
|
}
|
|
5285
5288
|
) }),
|
|
@@ -5290,7 +5293,7 @@ var InfiniteScroller = ({
|
|
|
5290
5293
|
initial: { opacity: 0, y: 16 },
|
|
5291
5294
|
animate: { opacity: 1, y: 0 },
|
|
5292
5295
|
exit: { opacity: 0, y: 12 },
|
|
5293
|
-
transition:
|
|
5296
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
5294
5297
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5295
5298
|
framerMotion.motion.div,
|
|
5296
5299
|
{
|
|
@@ -5371,8 +5374,8 @@ var FileUploader = React8.forwardRef(
|
|
|
5371
5374
|
);
|
|
5372
5375
|
React8.useEffect(() => {
|
|
5373
5376
|
if (isFileTooBig) {
|
|
5374
|
-
|
|
5375
|
-
errors:
|
|
5377
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5378
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_BIG")
|
|
5376
5379
|
});
|
|
5377
5380
|
}
|
|
5378
5381
|
}, [isFileTooBig]);
|
|
@@ -5380,8 +5383,8 @@ var FileUploader = React8.forwardRef(
|
|
|
5380
5383
|
(acceptedFiles, rejectedFiles) => {
|
|
5381
5384
|
const files = acceptedFiles;
|
|
5382
5385
|
if (!files) {
|
|
5383
|
-
|
|
5384
|
-
errors:
|
|
5386
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5387
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.FILE_ERROR")
|
|
5385
5388
|
});
|
|
5386
5389
|
return;
|
|
5387
5390
|
}
|
|
@@ -5400,21 +5403,21 @@ var FileUploader = React8.forwardRef(
|
|
|
5400
5403
|
const firstError = rejection?.errors[0];
|
|
5401
5404
|
if (!firstError) continue;
|
|
5402
5405
|
if (firstError.code === "file-too-large") {
|
|
5403
|
-
|
|
5404
|
-
errors:
|
|
5406
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5407
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.TOO_LARGE", {
|
|
5405
5408
|
size: maxSize / 1024 / 1024
|
|
5406
5409
|
})
|
|
5407
5410
|
});
|
|
5408
5411
|
break;
|
|
5409
5412
|
}
|
|
5410
5413
|
if (firstError.code === "file-invalid-type") {
|
|
5411
|
-
|
|
5412
|
-
errors:
|
|
5414
|
+
chunkAIUUCMAI_cjs.showErrorToast({
|
|
5415
|
+
errors: chunkOPMWK5SY_cjs.tStatic(I18N_MODULE2, "FILE_UPLOADER.INVALID_TYPE")
|
|
5413
5416
|
});
|
|
5414
5417
|
break;
|
|
5415
5418
|
}
|
|
5416
5419
|
if (firstError.message) {
|
|
5417
|
-
|
|
5420
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: firstError.message });
|
|
5418
5421
|
break;
|
|
5419
5422
|
}
|
|
5420
5423
|
}
|
|
@@ -5560,7 +5563,7 @@ var FileUploaderContent = React8.forwardRef(({ children, className, ...props },
|
|
|
5560
5563
|
});
|
|
5561
5564
|
FileUploaderContent.displayName = "FileUploaderContent";
|
|
5562
5565
|
var FileUploaderItem = React8.forwardRef(({ className, index, children, ...props }, ref) => {
|
|
5563
|
-
const { t } =
|
|
5566
|
+
const { t } = chunkOPMWK5SY_cjs.useT(I18N_MODULE2);
|
|
5564
5567
|
const { removeFileFromSet, activeIndex, direction } = useFileUpload();
|
|
5565
5568
|
const isSelected = index === activeIndex;
|
|
5566
5569
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5800,7 +5803,7 @@ var SelectSeparator = React8__namespace.forwardRef(({ className, ...props }, ref
|
|
|
5800
5803
|
));
|
|
5801
5804
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5802
5805
|
var Breadcrumb = React8__namespace.forwardRef(({ ...props }, ref) => {
|
|
5803
|
-
const { t } =
|
|
5806
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
5804
5807
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": t("BREADCRUMB.NAV_ARIA"), ...props });
|
|
5805
5808
|
});
|
|
5806
5809
|
Breadcrumb.displayName = "Breadcrumb";
|
|
@@ -5868,7 +5871,7 @@ var BreadcrumbEllipsis = ({
|
|
|
5868
5871
|
className,
|
|
5869
5872
|
...props
|
|
5870
5873
|
}) => {
|
|
5871
|
-
const { t } =
|
|
5874
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
5872
5875
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5873
5876
|
"span",
|
|
5874
5877
|
{
|
|
@@ -5940,14 +5943,14 @@ var Timeline = ({
|
|
|
5940
5943
|
framerMotion.motion.div,
|
|
5941
5944
|
{
|
|
5942
5945
|
className: chunkYAF2X7W5_cjs.cn("mt-4 flex flex-col items-start md:mt-5", className),
|
|
5943
|
-
variants:
|
|
5946
|
+
variants: chunkA4MVNKXL_cjs.staggerContainer,
|
|
5944
5947
|
initial: "initial",
|
|
5945
5948
|
animate: "animate",
|
|
5946
5949
|
children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5947
5950
|
framerMotion.motion.div,
|
|
5948
5951
|
{
|
|
5949
|
-
variants:
|
|
5950
|
-
transition:
|
|
5952
|
+
variants: chunkA4MVNKXL_cjs.staggerItem,
|
|
5953
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
5951
5954
|
className: "flex min-h-[66px] w-full",
|
|
5952
5955
|
children: [
|
|
5953
5956
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYAF2X7W5_cjs.cn("relative", isMobile ? "w-[30%]" : "w-[16%]"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5956,7 +5959,7 @@ var Timeline = ({
|
|
|
5956
5959
|
className: "absolute -top-1.5 w-full pr-[18px] text-right md:pr-5",
|
|
5957
5960
|
initial: { opacity: 0, x: -6 },
|
|
5958
5961
|
animate: { opacity: 1, x: 0 },
|
|
5959
|
-
transition: { ...
|
|
5962
|
+
transition: { ...chunkA4MVNKXL_cjs.fadeTransition, delay: index * 0.05 },
|
|
5960
5963
|
children: leftContent ? leftContent(event) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5961
5964
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.time }),
|
|
5962
5965
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.date })
|
|
@@ -5973,7 +5976,7 @@ var Timeline = ({
|
|
|
5973
5976
|
),
|
|
5974
5977
|
initial: { scaleY: 0 },
|
|
5975
5978
|
animate: { scaleY: 1 },
|
|
5976
|
-
transition: { ...
|
|
5979
|
+
transition: { ...chunkA4MVNKXL_cjs.fadeTransition, delay: index * 0.05 }
|
|
5977
5980
|
}
|
|
5978
5981
|
) : null,
|
|
5979
5982
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5982,7 +5985,7 @@ var Timeline = ({
|
|
|
5982
5985
|
className: "bg-primary relative z-10 size-4 rounded-full",
|
|
5983
5986
|
initial: { scale: 0 },
|
|
5984
5987
|
animate: { scale: 1 },
|
|
5985
|
-
transition: { ...
|
|
5988
|
+
transition: { ...chunkA4MVNKXL_cjs.fadeTransition, delay: index * 0.05 + 0.04 }
|
|
5986
5989
|
}
|
|
5987
5990
|
)
|
|
5988
5991
|
] }),
|
|
@@ -5996,14 +5999,18 @@ var Timeline = ({
|
|
|
5996
5999
|
};
|
|
5997
6000
|
var DefaultDropzoneContent = ({
|
|
5998
6001
|
acceptedFormatsLabel = "SVG, PNG, JPG or GIF"
|
|
5999
|
-
}) =>
|
|
6000
|
-
|
|
6001
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6002
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6003
|
-
"
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6002
|
+
}) => {
|
|
6003
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6004
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6005
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CloudUpload, { className: "mb-3 size-8 text-muted-foreground", "aria-hidden": true }),
|
|
6006
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-1 text-sm text-foreground", children: [
|
|
6007
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-primary", children: t("IMPORT_FILE_MODAL.CLICK_TO_UPLOAD") }),
|
|
6008
|
+
" ",
|
|
6009
|
+
t("IMPORT_FILE_MODAL.OR_DRAG_AND_DROP")
|
|
6010
|
+
] }),
|
|
6011
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: acceptedFormatsLabel })
|
|
6012
|
+
] });
|
|
6013
|
+
};
|
|
6007
6014
|
var ImportFileModalContent = ({
|
|
6008
6015
|
dialogTitle,
|
|
6009
6016
|
dialogDescription = "Upload a file using the template format.",
|
|
@@ -6035,11 +6042,11 @@ var ImportFileModalContent = ({
|
|
|
6035
6042
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: chunkYAF2X7W5_cjs.cn("rounded-md sm:max-w-[450px]", className), children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: !showConfirmation ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6036
6043
|
framerMotion.motion.div,
|
|
6037
6044
|
{
|
|
6038
|
-
variants:
|
|
6045
|
+
variants: chunkA4MVNKXL_cjs.fadeInScale,
|
|
6039
6046
|
initial: "initial",
|
|
6040
6047
|
animate: "animate",
|
|
6041
6048
|
exit: "exit",
|
|
6042
|
-
transition:
|
|
6049
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
6043
6050
|
children: [
|
|
6044
6051
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6045
6052
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: dialogTitle }),
|
|
@@ -6051,7 +6058,7 @@ var ImportFileModalContent = ({
|
|
|
6051
6058
|
className: "flex flex-col rounded-md bg-muted/50 px-3 py-2",
|
|
6052
6059
|
initial: { opacity: 0, y: 6 },
|
|
6053
6060
|
animate: { opacity: 1, y: 0 },
|
|
6054
|
-
transition: { ...
|
|
6061
|
+
transition: { ...chunkA4MVNKXL_cjs.fadeTransition, delay: 0.05 },
|
|
6055
6062
|
children: [
|
|
6056
6063
|
/* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.div, { className: "flex flex-row items-center", children: [
|
|
6057
6064
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6088,7 +6095,7 @@ var ImportFileModalContent = ({
|
|
|
6088
6095
|
initial: { opacity: 0, x: -8 },
|
|
6089
6096
|
animate: { opacity: 1, x: 0 },
|
|
6090
6097
|
exit: { opacity: 0, x: 8 },
|
|
6091
|
-
transition:
|
|
6098
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
6092
6099
|
children: /* @__PURE__ */ jsxRuntime.jsxs(FileUploaderItem, { index, children: [
|
|
6093
6100
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6094
6101
|
lucideReact.Paperclip,
|
|
@@ -6138,11 +6145,11 @@ var ImportFileModalContent = ({
|
|
|
6138
6145
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6139
6146
|
framerMotion.motion.div,
|
|
6140
6147
|
{
|
|
6141
|
-
variants:
|
|
6148
|
+
variants: chunkA4MVNKXL_cjs.fadeInScale,
|
|
6142
6149
|
initial: "initial",
|
|
6143
6150
|
animate: "animate",
|
|
6144
6151
|
exit: "exit",
|
|
6145
|
-
transition:
|
|
6152
|
+
transition: chunkA4MVNKXL_cjs.fadeTransition,
|
|
6146
6153
|
children: [
|
|
6147
6154
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6148
6155
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: processingTitle }),
|
|
@@ -6164,12 +6171,12 @@ var ImportFileModalContent = ({
|
|
|
6164
6171
|
) }) });
|
|
6165
6172
|
};
|
|
6166
6173
|
var parentClasses = (isSidebarOpen, isActive) => chunkYAF2X7W5_cjs.cn(
|
|
6167
|
-
"group relative flex h-
|
|
6174
|
+
"group relative flex min-h-[2.5rem] w-full cursor-pointer items-center p-1.5 text-left text-base text-[hsl(var(--low-emphasis))] transition-[padding,gap] duration-200 hover:text-[hsl(var(--high-emphasis))]",
|
|
6168
6175
|
isSidebarOpen ? "gap-3 px-4" : "gap-0 justify-center px-0",
|
|
6169
6176
|
isActive && "!text-primary"
|
|
6170
6177
|
);
|
|
6171
6178
|
var childClasses = (isSidebarOpen, isActive) => chunkYAF2X7W5_cjs.cn(
|
|
6172
|
-
"group relative flex h-
|
|
6179
|
+
"group relative flex min-h-[2.5rem] w-full items-center text-left text-base transition-[padding,gap,color] duration-200",
|
|
6173
6180
|
isSidebarOpen ? "gap-2 px-4 pl-8" : "gap-0 justify-center px-4",
|
|
6174
6181
|
isActive ? "!text-primary" : "text-[hsl(var(--low-emphasis))] hover:text-[hsl(var(--high-emphasis))]"
|
|
6175
6182
|
);
|
|
@@ -6190,8 +6197,8 @@ var ChildMenuItem = ({ menu, isSidebarOpen }) => {
|
|
|
6190
6197
|
"span",
|
|
6191
6198
|
{
|
|
6192
6199
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6193
|
-
"inline-block overflow-hidden
|
|
6194
|
-
isSidebarOpen ? "w-
|
|
6200
|
+
"inline-block overflow-hidden transition-all duration-200",
|
|
6201
|
+
isSidebarOpen ? "min-w-0 flex-1 whitespace-normal break-words opacity-100" : "w-0 whitespace-nowrap opacity-0"
|
|
6195
6202
|
),
|
|
6196
6203
|
children: menu.name
|
|
6197
6204
|
}
|
|
@@ -6212,7 +6219,7 @@ function DesktopLeafMenuItem({
|
|
|
6212
6219
|
{
|
|
6213
6220
|
to: menu.path,
|
|
6214
6221
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6215
|
-
"flex w-full items-center transition-[gap] duration-200",
|
|
6222
|
+
"flex w-full min-w-0 items-center transition-[gap] duration-200",
|
|
6216
6223
|
isSidebarOpen ? "gap-3" : "justify-center gap-0",
|
|
6217
6224
|
menu.disabled && "pointer-events-none opacity-50"
|
|
6218
6225
|
),
|
|
@@ -6222,8 +6229,8 @@ function DesktopLeafMenuItem({
|
|
|
6222
6229
|
"span",
|
|
6223
6230
|
{
|
|
6224
6231
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6225
|
-
"inline-block overflow-hidden
|
|
6226
|
-
isSidebarOpen ? "w-
|
|
6232
|
+
"inline-block overflow-hidden transition-all duration-200",
|
|
6233
|
+
isSidebarOpen ? "min-w-0 flex-1 whitespace-normal break-words opacity-100" : "w-0 whitespace-nowrap opacity-0"
|
|
6227
6234
|
),
|
|
6228
6235
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-block", children: [
|
|
6229
6236
|
menu.name,
|
|
@@ -6309,7 +6316,7 @@ function DesktopMenuItem({
|
|
|
6309
6316
|
{
|
|
6310
6317
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6311
6318
|
"flex items-center transition-[gap] duration-200",
|
|
6312
|
-
isSidebarOpen ? "gap-3" : "w-full justify-center gap-0"
|
|
6319
|
+
isSidebarOpen ? "min-w-0 flex-1 gap-3" : "w-full justify-center gap-0"
|
|
6313
6320
|
),
|
|
6314
6321
|
children: [
|
|
6315
6322
|
menu.icon ? /* @__PURE__ */ jsxRuntime.jsx(menu.icon, { className: "h-5 w-5 shrink-0" }) : null,
|
|
@@ -6317,8 +6324,8 @@ function DesktopMenuItem({
|
|
|
6317
6324
|
"span",
|
|
6318
6325
|
{
|
|
6319
6326
|
className: chunkYAF2X7W5_cjs.cn(
|
|
6320
|
-
"inline-block overflow-hidden
|
|
6321
|
-
isSidebarOpen ? "w-
|
|
6327
|
+
"inline-block overflow-hidden transition-all duration-200",
|
|
6328
|
+
isSidebarOpen ? "min-w-0 flex-1 whitespace-normal break-words opacity-100" : "w-0 whitespace-nowrap opacity-0"
|
|
6322
6329
|
),
|
|
6323
6330
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-block", children: [
|
|
6324
6331
|
menu.name,
|
|
@@ -6513,7 +6520,7 @@ var AppTile = ({
|
|
|
6513
6520
|
app,
|
|
6514
6521
|
isLoading
|
|
6515
6522
|
}) => {
|
|
6516
|
-
const { t } =
|
|
6523
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6517
6524
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6518
6525
|
"a",
|
|
6519
6526
|
{
|
|
@@ -6537,7 +6544,7 @@ var AppTile = ({
|
|
|
6537
6544
|
);
|
|
6538
6545
|
};
|
|
6539
6546
|
function AppSwitcherContent({ apps }) {
|
|
6540
|
-
const { t } =
|
|
6547
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6541
6548
|
if (!apps.length)
|
|
6542
6549
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/50 border-t p-3 flex h-12 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: t("APP_SWITCHER_CONTENT.NO_APPS") }) });
|
|
6543
6550
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 border-t px-3 pb-4 pt-3", children: [
|
|
@@ -6546,7 +6553,7 @@ function AppSwitcherContent({ apps }) {
|
|
|
6546
6553
|
] });
|
|
6547
6554
|
}
|
|
6548
6555
|
function AppSwitcherTrigger({ open }) {
|
|
6549
|
-
const { t } =
|
|
6556
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6550
6557
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6551
6558
|
"button",
|
|
6552
6559
|
{
|
|
@@ -6741,7 +6748,7 @@ function useAppRedirectUrls({
|
|
|
6741
6748
|
queries: requests.map(
|
|
6742
6749
|
({ clientId, redirectUri, forwardedTo, queryKey }) => ({
|
|
6743
6750
|
queryKey,
|
|
6744
|
-
queryFn: ({ signal }) =>
|
|
6751
|
+
queryFn: ({ signal }) => chunkP4SL4PTY_cjs.initiateService.fetchRedirectUrl(
|
|
6745
6752
|
{ clientId, redirectUri, forwardedTo },
|
|
6746
6753
|
signal
|
|
6747
6754
|
),
|
|
@@ -6780,13 +6787,13 @@ function useAppRedirectUrls({
|
|
|
6780
6787
|
}
|
|
6781
6788
|
var AppSwitcher = ({ forwardedTo }) => {
|
|
6782
6789
|
const [open, setOpen] = React8.useState(false);
|
|
6783
|
-
const config =
|
|
6790
|
+
const config = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
6784
6791
|
const filteredApps = React8.useMemo(
|
|
6785
6792
|
() => filteredAppSwitcherData.filter((app) => app.id !== config.name),
|
|
6786
6793
|
[config.name]
|
|
6787
6794
|
);
|
|
6788
6795
|
const resolveForwardedTo = React8.useCallback(
|
|
6789
|
-
(app) => app.forwardedTo ?? forwardedTo ??
|
|
6796
|
+
(app) => app.forwardedTo ?? forwardedTo ?? chunkAIUUCMAI_cjs.getForwardedToPath(),
|
|
6790
6797
|
[forwardedTo]
|
|
6791
6798
|
);
|
|
6792
6799
|
const blocksApps = useAppRedirectUrls({
|
|
@@ -6829,8 +6836,8 @@ function ThemeSwitcher({
|
|
|
6829
6836
|
className,
|
|
6830
6837
|
showChevron = true
|
|
6831
6838
|
} = {}) {
|
|
6832
|
-
const { t } =
|
|
6833
|
-
const { theme, setTheme } =
|
|
6839
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6840
|
+
const { theme, setTheme } = chunkP4SL4PTY_cjs.useTheme();
|
|
6834
6841
|
const { Icon: ThemeIcon } = OPTIONS[theme];
|
|
6835
6842
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6836
6843
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6899,7 +6906,7 @@ function ThemeSwitcher({
|
|
|
6899
6906
|
// src/services/user.service.ts
|
|
6900
6907
|
var UserService = class {
|
|
6901
6908
|
async getUserInfo() {
|
|
6902
|
-
return
|
|
6909
|
+
return chunkA4MVNKXL_cjs.iamClient.get(`${chunkA4MVNKXL_cjs.PROFILE_ENDPOINTS.ME}`);
|
|
6903
6910
|
}
|
|
6904
6911
|
};
|
|
6905
6912
|
var userService = new UserService();
|
|
@@ -6941,15 +6948,15 @@ function UserAvatar({ size = "sm" }) {
|
|
|
6941
6948
|
);
|
|
6942
6949
|
}
|
|
6943
6950
|
function UserDropdownMenu() {
|
|
6944
|
-
const { t } =
|
|
6945
|
-
const { name } =
|
|
6951
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
6952
|
+
const { name } = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
6946
6953
|
const { data } = useGetUserInfo();
|
|
6947
6954
|
const userData = data?.data;
|
|
6948
|
-
const { isPending, mutateAsync } =
|
|
6955
|
+
const { isPending, mutateAsync } = chunkP4SL4PTY_cjs.useLogout();
|
|
6949
6956
|
const { resetProjectStore } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
6950
6957
|
const { setUnAuthenticated, clearTokens } = chunkU2LA7LBX_cjs.useAuthStore();
|
|
6951
6958
|
const { resetSelectedLanguages } = chunkRO55MFZA_cjs.useLanguageViewStore();
|
|
6952
|
-
const { data: myOrgsData, isLoading: isOrgsLoading } =
|
|
6959
|
+
const { data: myOrgsData, isLoading: isOrgsLoading } = chunkP4SL4PTY_cjs.useGetMyOrganizations();
|
|
6953
6960
|
const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
|
|
6954
6961
|
const email = userData?.email || "";
|
|
6955
6962
|
const roles = Object.values(userData?.roles || {}).flat();
|
|
@@ -7078,9 +7085,9 @@ function UserDropdownMenu() {
|
|
|
7078
7085
|
] });
|
|
7079
7086
|
}
|
|
7080
7087
|
function LanguageSelector() {
|
|
7081
|
-
const { changeLanguage } =
|
|
7082
|
-
const language =
|
|
7083
|
-
const languages =
|
|
7088
|
+
const { changeLanguage } = chunkP4SL4PTY_cjs.useLanguageSwitcher();
|
|
7089
|
+
const language = chunkOPMWK5SY_cjs.useDocumentLanguage();
|
|
7090
|
+
const languages = chunkOPMWK5SY_cjs.useLanguagesStore((state) => state.languages);
|
|
7084
7091
|
if (languages.length < 2) return null;
|
|
7085
7092
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
7086
7093
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7219,7 +7226,7 @@ var NotificationListenerService = class {
|
|
|
7219
7226
|
if (refreshLogin && navigator.onLine === false) return;
|
|
7220
7227
|
try {
|
|
7221
7228
|
if (refreshLogin)
|
|
7222
|
-
await refreshLoginCall(
|
|
7229
|
+
await refreshLoginCall(chunkP4SL4PTY_cjs.notificationService.getNotifications(1, 1));
|
|
7223
7230
|
if (!this.wanted) return;
|
|
7224
7231
|
await this.connection.start();
|
|
7225
7232
|
this.attempt = 0;
|
|
@@ -7244,7 +7251,7 @@ var notificationListenerService = new NotificationListenerService();
|
|
|
7244
7251
|
|
|
7245
7252
|
// src/components/common/notification/use-notification-socket.ts
|
|
7246
7253
|
function useNotificationSocket() {
|
|
7247
|
-
const { data: configData } =
|
|
7254
|
+
const { data: configData } = chunkP4SL4PTY_cjs.useGetBlocksNotificationConfig(0, 100);
|
|
7248
7255
|
const queryClient = reactQuery.useQueryClient();
|
|
7249
7256
|
notificationListenerService.connect();
|
|
7250
7257
|
React8.useEffect(() => {
|
|
@@ -7259,7 +7266,7 @@ function useNotificationSocket() {
|
|
|
7259
7266
|
notificationListenerService.connection.on(
|
|
7260
7267
|
config.notifyMethod,
|
|
7261
7268
|
(message) => {
|
|
7262
|
-
|
|
7269
|
+
chunkP4SL4PTY_cjs.notificationService.getNotificationConfig(config, message);
|
|
7263
7270
|
try {
|
|
7264
7271
|
const notice = typeof message === "string" ? JSON.parse(message) : message;
|
|
7265
7272
|
const denom = JSON.parse(
|
|
@@ -7283,12 +7290,12 @@ function useNotificationFeed(open) {
|
|
|
7283
7290
|
const [notifications, setNotifications] = React8.useState([]);
|
|
7284
7291
|
const [hasMore, setHasMore] = React8.useState(true);
|
|
7285
7292
|
const listRef = React8.useRef(null);
|
|
7286
|
-
const { data, isLoading, isFetching } =
|
|
7293
|
+
const { data, isLoading, isFetching } = chunkP4SL4PTY_cjs.useGetNotifications(
|
|
7287
7294
|
pageNumber,
|
|
7288
7295
|
PAGE_SIZE
|
|
7289
7296
|
);
|
|
7290
|
-
const markAsRead =
|
|
7291
|
-
const markAllAsRead =
|
|
7297
|
+
const markAsRead = chunkP4SL4PTY_cjs.useMarkAsRead();
|
|
7298
|
+
const markAllAsRead = chunkP4SL4PTY_cjs.useMarkAllAsRead();
|
|
7292
7299
|
React8.useEffect(() => {
|
|
7293
7300
|
if (!data?.notifications) return;
|
|
7294
7301
|
setNotifications((prev) => {
|
|
@@ -7367,7 +7374,7 @@ function NotificationBell({ unreadCount }) {
|
|
|
7367
7374
|
function NotificationHeader({
|
|
7368
7375
|
onMarkAllAsRead
|
|
7369
7376
|
}) {
|
|
7370
|
-
const { t } =
|
|
7377
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7371
7378
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
|
|
7372
7379
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-primary", children: t("NOTIFICATION_HEADER.TITLE") }),
|
|
7373
7380
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7383,7 +7390,7 @@ function NotificationHeader({
|
|
|
7383
7390
|
|
|
7384
7391
|
// src/components/common/notification/utils.ts
|
|
7385
7392
|
var MODULE = "genesis.shared";
|
|
7386
|
-
var defaultT = (key, values) =>
|
|
7393
|
+
var defaultT = (key, values) => chunkOPMWK5SY_cjs.tStatic(MODULE, key, values);
|
|
7387
7394
|
function formatKBTitle(str, t = defaultT) {
|
|
7388
7395
|
if (!str) return t("NOTIFICATION_UTILS.NO_TITLE");
|
|
7389
7396
|
if (str === "agent_kb_processing_status")
|
|
@@ -7413,9 +7420,11 @@ function formatKBMetaDescription(meta, fallbackDescription, t = defaultT) {
|
|
|
7413
7420
|
}
|
|
7414
7421
|
function NotificationItem({
|
|
7415
7422
|
notification,
|
|
7416
|
-
onMarkAsRead
|
|
7423
|
+
onMarkAsRead,
|
|
7424
|
+
href,
|
|
7425
|
+
onOpen
|
|
7417
7426
|
}) {
|
|
7418
|
-
const { t, language } =
|
|
7427
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7419
7428
|
let denorm = {
|
|
7420
7429
|
title: "",
|
|
7421
7430
|
description: "",
|
|
@@ -7433,20 +7442,28 @@ function NotificationItem({
|
|
|
7433
7442
|
notification.denormalizedPayload
|
|
7434
7443
|
);
|
|
7435
7444
|
}
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7445
|
+
const rowClassName = `flex w-full items-start gap-3 border-b px-4 py-3 text-left last:border-b-0 ${notification.isRead ? "" : "bg-muted/60"}`;
|
|
7446
|
+
const markAsRead = () => {
|
|
7447
|
+
if (!notification.isRead) onMarkAsRead(notification.id);
|
|
7448
|
+
};
|
|
7449
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7450
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: formatKBTitle(denorm.title, t) }),
|
|
7451
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: formatKBMetaDescription(denorm.meta, denorm.description, t) }),
|
|
7452
|
+
notification.createdTime && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[11px] text-muted-foreground", children: new Date(notification.createdTime).toLocaleString(language) })
|
|
7453
|
+
] });
|
|
7454
|
+
if (href && onOpen) {
|
|
7455
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7456
|
+
"button",
|
|
7457
|
+
{
|
|
7458
|
+
type: "button",
|
|
7459
|
+
className: `${rowClassName} cursor-pointer hover:bg-muted`,
|
|
7460
|
+
onMouseEnter: markAsRead,
|
|
7461
|
+
onClick: () => onOpen(notification, href),
|
|
7462
|
+
children: content
|
|
7463
|
+
}
|
|
7464
|
+
);
|
|
7465
|
+
}
|
|
7466
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rowClassName, onMouseEnter: markAsRead, children: content });
|
|
7450
7467
|
}
|
|
7451
7468
|
function NotificationList({
|
|
7452
7469
|
notifications,
|
|
@@ -7454,9 +7471,11 @@ function NotificationList({
|
|
|
7454
7471
|
isFetching,
|
|
7455
7472
|
listRef,
|
|
7456
7473
|
onScroll,
|
|
7457
|
-
onMarkAsRead
|
|
7474
|
+
onMarkAsRead,
|
|
7475
|
+
getHref,
|
|
7476
|
+
onOpen
|
|
7458
7477
|
}) {
|
|
7459
|
-
const { t } =
|
|
7478
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7460
7479
|
const isEmpty = notifications.length === 0;
|
|
7461
7480
|
const renderNotifications = () => {
|
|
7462
7481
|
if (isLoading && isEmpty) {
|
|
@@ -7469,7 +7488,9 @@ function NotificationList({
|
|
|
7469
7488
|
NotificationItem,
|
|
7470
7489
|
{
|
|
7471
7490
|
notification,
|
|
7472
|
-
onMarkAsRead
|
|
7491
|
+
onMarkAsRead,
|
|
7492
|
+
href: getHref?.(notification),
|
|
7493
|
+
onOpen
|
|
7473
7494
|
},
|
|
7474
7495
|
notification.id || idx
|
|
7475
7496
|
));
|
|
@@ -7487,6 +7508,132 @@ function NotificationList({
|
|
|
7487
7508
|
}
|
|
7488
7509
|
);
|
|
7489
7510
|
}
|
|
7511
|
+
|
|
7512
|
+
// src/components/common/notification/notification-link.ts
|
|
7513
|
+
var idOf = (payload, key) => {
|
|
7514
|
+
const value = payload[key];
|
|
7515
|
+
return typeof value === "string" && value.trim() !== "" ? encodeURIComponent(value) : null;
|
|
7516
|
+
};
|
|
7517
|
+
var scopedIn = (app) => (path) => ({ app, path, scoped: true });
|
|
7518
|
+
var logic = scopedIn("blocks-logic");
|
|
7519
|
+
var release = scopedIn("blocks-release");
|
|
7520
|
+
var osScoped = scopedIn("blocks-os");
|
|
7521
|
+
var osProject = (groupId, page) => ({
|
|
7522
|
+
app: "blocks-os",
|
|
7523
|
+
path: `/app/project/${groupId}/${page}`,
|
|
7524
|
+
scoped: false
|
|
7525
|
+
});
|
|
7526
|
+
var workflowRunFailed = (p) => {
|
|
7527
|
+
const workflowId = idOf(p, "workflowId");
|
|
7528
|
+
if (!workflowId) return null;
|
|
7529
|
+
const executionId = idOf(p, "executionId");
|
|
7530
|
+
const query = executionId ? `?tab=executions&executionId=${executionId}` : "?tab=executions";
|
|
7531
|
+
return logic(`workflow/${workflowId}${query}`);
|
|
7532
|
+
};
|
|
7533
|
+
var workflowPage = (p) => {
|
|
7534
|
+
const workflowId = idOf(p, "workflowId");
|
|
7535
|
+
return workflowId ? logic(`workflow/${workflowId}`) : null;
|
|
7536
|
+
};
|
|
7537
|
+
var functionRunFailed = (p) => {
|
|
7538
|
+
const functionId = idOf(p, "functionId");
|
|
7539
|
+
if (!functionId) return null;
|
|
7540
|
+
const runId = idOf(p, "runId");
|
|
7541
|
+
const query = runId ? `?tab=runs&runId=${runId}` : "?tab=runs";
|
|
7542
|
+
return logic(`functions/${functionId}${query}`);
|
|
7543
|
+
};
|
|
7544
|
+
var functionPage = (p) => {
|
|
7545
|
+
const functionId = idOf(p, "functionId");
|
|
7546
|
+
return functionId ? logic(`functions/${functionId}`) : null;
|
|
7547
|
+
};
|
|
7548
|
+
var functionChangedByOther = (p) => p.action === "deleted" ? logic("functions") : functionPage(p);
|
|
7549
|
+
var scheduleRegistrationFailed = (p) => {
|
|
7550
|
+
const scheduleId = idOf(p, "scheduleId");
|
|
7551
|
+
return scheduleId ? logic(`schedule/${scheduleId}`) : null;
|
|
7552
|
+
};
|
|
7553
|
+
var buildLogs = (p, tab) => {
|
|
7554
|
+
const repoId = idOf(p, "repoId");
|
|
7555
|
+
const buildId = idOf(p, "buildId");
|
|
7556
|
+
if (!repoId || !buildId) return null;
|
|
7557
|
+
return release(
|
|
7558
|
+
`deployment/repo/${repoId}/deployment-logs/${buildId}?tab=${tab}`
|
|
7559
|
+
);
|
|
7560
|
+
};
|
|
7561
|
+
var repoPage = (p) => {
|
|
7562
|
+
const repoId = idOf(p, "repoId");
|
|
7563
|
+
return repoId ? release(`deployment/repo/${repoId}`) : null;
|
|
7564
|
+
};
|
|
7565
|
+
var autoDeployStatus = (p) => {
|
|
7566
|
+
const repoId = idOf(p, "repoId");
|
|
7567
|
+
const buildId = idOf(p, "buildId");
|
|
7568
|
+
if (repoId && buildId) {
|
|
7569
|
+
return release(`deployment/repo/${repoId}/deployment-live/${buildId}`);
|
|
7570
|
+
}
|
|
7571
|
+
return repoPage(p);
|
|
7572
|
+
};
|
|
7573
|
+
var codeAnalysisFinished = (p) => buildLogs(p, p.analysisType === "SCA" ? "sca" : "sast");
|
|
7574
|
+
var projectPage = (key, page) => (p) => {
|
|
7575
|
+
const groupId = idOf(p, key);
|
|
7576
|
+
return groupId ? osProject(groupId, page) : null;
|
|
7577
|
+
};
|
|
7578
|
+
var organizationDetail = (p) => {
|
|
7579
|
+
const organizationId = idOf(p, "organizationId");
|
|
7580
|
+
return organizationId ? osScoped(`iam/organization-detail/${organizationId}`) : null;
|
|
7581
|
+
};
|
|
7582
|
+
var invitedUserDetail = (p) => {
|
|
7583
|
+
const userId = idOf(p, "invitedUserId");
|
|
7584
|
+
return userId ? osScoped(`iam/user-detail/${userId}`) : null;
|
|
7585
|
+
};
|
|
7586
|
+
var LINK_BUILDERS = {
|
|
7587
|
+
WorkflowRunFailed: workflowRunFailed,
|
|
7588
|
+
ScheduledTriggerDropped: workflowPage,
|
|
7589
|
+
FunctionRunFailed: functionRunFailed,
|
|
7590
|
+
FunctionBuildFinished: functionPage,
|
|
7591
|
+
FunctionChangedByOther: functionChangedByOther,
|
|
7592
|
+
ScheduleRegistrationFailed: scheduleRegistrationFailed,
|
|
7593
|
+
"release-build-finished": (p) => buildLogs(p, "deployment-logs"),
|
|
7594
|
+
"release-auto-deploy-status": autoDeployStatus,
|
|
7595
|
+
"release-deployment-deleted": repoPage,
|
|
7596
|
+
"release-code-analysis-finished": codeAnalysisFinished,
|
|
7597
|
+
"project-setup-failed": projectPage("tenantGroupId", "environments"),
|
|
7598
|
+
"project-ownership-transferred": projectPage("tenantGroupId", "people"),
|
|
7599
|
+
"project-access-changed": projectPage("projectGroupId", "environments"),
|
|
7600
|
+
"iam-organization-setup-finished": organizationDetail,
|
|
7601
|
+
"iam-invitation-mail-failed": invitedUserDetail
|
|
7602
|
+
};
|
|
7603
|
+
var parsePayload = (raw) => {
|
|
7604
|
+
try {
|
|
7605
|
+
const parsed = JSON.parse(raw);
|
|
7606
|
+
return parsed !== null && typeof parsed === "object" ? parsed : null;
|
|
7607
|
+
} catch {
|
|
7608
|
+
return null;
|
|
7609
|
+
}
|
|
7610
|
+
};
|
|
7611
|
+
function getNotificationLink(denormalizedPayload) {
|
|
7612
|
+
const payload = parsePayload(denormalizedPayload);
|
|
7613
|
+
const event = payload?.event;
|
|
7614
|
+
if (!payload || typeof event !== "string") return null;
|
|
7615
|
+
const build = Object.hasOwn(LINK_BUILDERS, event) ? LINK_BUILDERS[event] : void 0;
|
|
7616
|
+
return build ? build(payload) : null;
|
|
7617
|
+
}
|
|
7618
|
+
function getNotificationHref(denormalizedPayload, currentApp, projectItemId) {
|
|
7619
|
+
const link = getNotificationLink(denormalizedPayload);
|
|
7620
|
+
if (link?.app !== currentApp) return null;
|
|
7621
|
+
if (!link.scoped) return link.path;
|
|
7622
|
+
return projectItemId ? `/app/${encodeURIComponent(projectItemId)}/${link.path}` : null;
|
|
7623
|
+
}
|
|
7624
|
+
|
|
7625
|
+
// src/components/common/notification/use-notification-open.ts
|
|
7626
|
+
function useNotificationOpen() {
|
|
7627
|
+
const navigate = reactRouter.useNavigate();
|
|
7628
|
+
const { itemId } = reactRouter.useParams();
|
|
7629
|
+
const app = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.config.name);
|
|
7630
|
+
const getHref = React8.useCallback(
|
|
7631
|
+
(notification) => getNotificationHref(notification.denormalizedPayload, app, itemId),
|
|
7632
|
+
[app, itemId]
|
|
7633
|
+
);
|
|
7634
|
+
const open = React8.useCallback((href) => navigate(href), [navigate]);
|
|
7635
|
+
return { getHref, open };
|
|
7636
|
+
}
|
|
7490
7637
|
function Notification() {
|
|
7491
7638
|
const [open, setOpen] = React8.useState(false);
|
|
7492
7639
|
useNotificationSocket();
|
|
@@ -7500,6 +7647,12 @@ function Notification() {
|
|
|
7500
7647
|
handleMarkAsRead,
|
|
7501
7648
|
handleMarkAllAsRead
|
|
7502
7649
|
} = useNotificationFeed(open);
|
|
7650
|
+
const { getHref, open: openPage } = useNotificationOpen();
|
|
7651
|
+
const handleOpen = (notification, href) => {
|
|
7652
|
+
if (!notification.isRead) handleMarkAsRead(notification.id);
|
|
7653
|
+
setOpen(false);
|
|
7654
|
+
openPage(href);
|
|
7655
|
+
};
|
|
7503
7656
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
7504
7657
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(NotificationBell, { unreadCount }) }) }),
|
|
7505
7658
|
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "w-[370px] p-0", children: [
|
|
@@ -7512,7 +7665,9 @@ function Notification() {
|
|
|
7512
7665
|
isFetching,
|
|
7513
7666
|
listRef,
|
|
7514
7667
|
onScroll: handleScroll,
|
|
7515
|
-
onMarkAsRead: handleMarkAsRead
|
|
7668
|
+
onMarkAsRead: handleMarkAsRead,
|
|
7669
|
+
getHref,
|
|
7670
|
+
onOpen: handleOpen
|
|
7516
7671
|
}
|
|
7517
7672
|
)
|
|
7518
7673
|
] })
|
|
@@ -7529,7 +7684,7 @@ function ConsoleHeader() {
|
|
|
7529
7684
|
window.addEventListener("scroll", handleScroll);
|
|
7530
7685
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
7531
7686
|
}, []);
|
|
7532
|
-
const { appLightLogo, appDarkLogo } =
|
|
7687
|
+
const { appLightLogo, appDarkLogo } = chunkP4SL4PTY_cjs.useLogo();
|
|
7533
7688
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7534
7689
|
"div",
|
|
7535
7690
|
{
|
|
@@ -7593,7 +7748,7 @@ function ConsoleHeader() {
|
|
|
7593
7748
|
var HeaderHeight = 60;
|
|
7594
7749
|
function DashboardHeader(props) {
|
|
7595
7750
|
const { forwardedTo, redirectPaths, navigationMenus } = props;
|
|
7596
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
7751
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkCTIGX76P_cjs.SidebarContext);
|
|
7597
7752
|
const { pathname } = reactRouter.useLocation();
|
|
7598
7753
|
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7599
7754
|
const projectName = selectedProject?.name;
|
|
@@ -7657,81 +7812,81 @@ var environmentOptions = [
|
|
|
7657
7812
|
{
|
|
7658
7813
|
index: 0,
|
|
7659
7814
|
get label() {
|
|
7660
|
-
return
|
|
7815
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_LABEL");
|
|
7661
7816
|
},
|
|
7662
7817
|
value: "dev",
|
|
7663
7818
|
get subtext() {
|
|
7664
|
-
return
|
|
7819
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.DEV_SUBTEXT");
|
|
7665
7820
|
}
|
|
7666
7821
|
},
|
|
7667
7822
|
{
|
|
7668
7823
|
index: 1,
|
|
7669
7824
|
get label() {
|
|
7670
|
-
return
|
|
7825
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_LABEL");
|
|
7671
7826
|
},
|
|
7672
7827
|
value: "test",
|
|
7673
7828
|
get subtext() {
|
|
7674
|
-
return
|
|
7829
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.TEST_SUBTEXT");
|
|
7675
7830
|
}
|
|
7676
7831
|
},
|
|
7677
7832
|
{
|
|
7678
7833
|
index: 2,
|
|
7679
7834
|
get label() {
|
|
7680
|
-
return
|
|
7835
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_LABEL");
|
|
7681
7836
|
},
|
|
7682
7837
|
value: "stg",
|
|
7683
7838
|
get subtext() {
|
|
7684
|
-
return
|
|
7839
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.STG_SUBTEXT");
|
|
7685
7840
|
}
|
|
7686
7841
|
},
|
|
7687
7842
|
{
|
|
7688
7843
|
index: 3,
|
|
7689
7844
|
get label() {
|
|
7690
|
-
return
|
|
7845
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_LABEL");
|
|
7691
7846
|
},
|
|
7692
7847
|
value: "iat",
|
|
7693
7848
|
get subtext() {
|
|
7694
|
-
return
|
|
7849
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.IAT_SUBTEXT");
|
|
7695
7850
|
}
|
|
7696
7851
|
},
|
|
7697
7852
|
{
|
|
7698
7853
|
index: 4,
|
|
7699
7854
|
get label() {
|
|
7700
|
-
return
|
|
7855
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_LABEL");
|
|
7701
7856
|
},
|
|
7702
7857
|
value: "uat",
|
|
7703
7858
|
get subtext() {
|
|
7704
|
-
return
|
|
7859
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.UAT_SUBTEXT");
|
|
7705
7860
|
}
|
|
7706
7861
|
},
|
|
7707
7862
|
{
|
|
7708
7863
|
index: 5,
|
|
7709
7864
|
get label() {
|
|
7710
|
-
return
|
|
7865
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_LABEL");
|
|
7711
7866
|
},
|
|
7712
7867
|
value: "prod-shadow",
|
|
7713
7868
|
get subtext() {
|
|
7714
|
-
return
|
|
7869
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SHADOW_SUBTEXT");
|
|
7715
7870
|
}
|
|
7716
7871
|
},
|
|
7717
7872
|
{
|
|
7718
7873
|
index: 6,
|
|
7719
7874
|
get label() {
|
|
7720
|
-
return
|
|
7875
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_LABEL");
|
|
7721
7876
|
},
|
|
7722
7877
|
value: "pre-prod",
|
|
7723
7878
|
get subtext() {
|
|
7724
|
-
return
|
|
7879
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PRE_PROD_SUBTEXT");
|
|
7725
7880
|
}
|
|
7726
7881
|
},
|
|
7727
7882
|
{
|
|
7728
7883
|
index: 7,
|
|
7729
7884
|
get label() {
|
|
7730
|
-
return
|
|
7885
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_LABEL");
|
|
7731
7886
|
},
|
|
7732
7887
|
value: "prod",
|
|
7733
7888
|
get subtext() {
|
|
7734
|
-
return
|
|
7889
|
+
return chunkOPMWK5SY_cjs.tStatic(MODULE2, "ENVIRONMENT_OPTIONS.PROD_SUBTEXT");
|
|
7735
7890
|
}
|
|
7736
7891
|
}
|
|
7737
7892
|
];
|
|
@@ -7740,9 +7895,9 @@ var EnvironmentCard = ({
|
|
|
7740
7895
|
isMigrationOngoing,
|
|
7741
7896
|
className
|
|
7742
7897
|
}) => {
|
|
7743
|
-
const { t } =
|
|
7898
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7744
7899
|
const { setSelectedProject, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7745
|
-
const { mutateAsync } =
|
|
7900
|
+
const { mutateAsync } = chunkP4SL4PTY_cjs.useStartImpersonation();
|
|
7746
7901
|
const navigate = reactRouter.useNavigate();
|
|
7747
7902
|
const handleCardClick = async () => {
|
|
7748
7903
|
try {
|
|
@@ -7794,14 +7949,14 @@ function EnvironmentList({
|
|
|
7794
7949
|
redirectPaths,
|
|
7795
7950
|
collapsed = false
|
|
7796
7951
|
}) {
|
|
7797
|
-
const { t } =
|
|
7952
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7798
7953
|
const navigate = reactRouter.useNavigate();
|
|
7799
7954
|
const { pathname } = reactRouter.useLocation();
|
|
7800
|
-
const { data: projectGroups = [], isLoading } =
|
|
7955
|
+
const { data: projectGroups = [], isLoading } = chunkP4SL4PTY_cjs.useGetProjects({
|
|
7801
7956
|
enabled: true
|
|
7802
7957
|
});
|
|
7803
7958
|
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
7804
|
-
const { data: projectData } =
|
|
7959
|
+
const { data: projectData } = chunkP4SL4PTY_cjs.useGetProject();
|
|
7805
7960
|
const pendingProjectRef = React8.useRef(null);
|
|
7806
7961
|
const redirectRegexMap = React8.useMemo(
|
|
7807
7962
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -7904,7 +8059,7 @@ function EnvironmentList({
|
|
|
7904
8059
|
] });
|
|
7905
8060
|
}
|
|
7906
8061
|
function BackToConsoleNavigator() {
|
|
7907
|
-
const { t } =
|
|
8062
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
7908
8063
|
return /* @__PURE__ */ jsxRuntime.jsx(reactRouter.Link, { to: "console", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7909
8064
|
Button,
|
|
7910
8065
|
{
|
|
@@ -7936,7 +8091,7 @@ function ProtectedGuard({
|
|
|
7936
8091
|
if (!isAuthenticated) navigate(defaultPublicPath);
|
|
7937
8092
|
}, [isAuthenticated, defaultPublicPath, navigate]);
|
|
7938
8093
|
React8.useEffect(
|
|
7939
|
-
() =>
|
|
8094
|
+
() => chunkA4MVNKXL_cjs.subscribeToSignOut(
|
|
7940
8095
|
() => window.location.replace(
|
|
7941
8096
|
`${window.location.origin}${defaultPublicPath}`
|
|
7942
8097
|
)
|
|
@@ -7986,7 +8141,7 @@ function AuthResolver({ children }) {
|
|
|
7986
8141
|
if (isSignInCallbackPath(window.location.pathname)) return;
|
|
7987
8142
|
async function resolve() {
|
|
7988
8143
|
try {
|
|
7989
|
-
const res = await
|
|
8144
|
+
const res = await chunkA4MVNKXL_cjs.iamClient.get(`${chunkA4MVNKXL_cjs.AUTH_ENDPOINTS.ME}`);
|
|
7990
8145
|
setUser(res);
|
|
7991
8146
|
setAuthenticated();
|
|
7992
8147
|
} catch {
|
|
@@ -8082,8 +8237,8 @@ var useLiveOwnerProbe = ({
|
|
|
8082
8237
|
if (!cookieTenantId || !ownTenantId || cookieTenantId === ownTenantId) {
|
|
8083
8238
|
return null;
|
|
8084
8239
|
}
|
|
8085
|
-
const owner =
|
|
8086
|
-
return owner && owner.tabId !==
|
|
8240
|
+
const owner = chunkA4MVNKXL_cjs.readCurrentOwner();
|
|
8241
|
+
return owner && owner.tabId !== chunkA4MVNKXL_cjs.TAB_ID && owner.tenantId === cookieTenantId ? owner : null;
|
|
8087
8242
|
}, [cookieTenantId, ownTenantId]);
|
|
8088
8243
|
const claimKey = claimKeyOf(foreignClaim);
|
|
8089
8244
|
const [probedKey, setProbedKey] = React8.useState(null);
|
|
@@ -8095,9 +8250,9 @@ var useLiveOwnerProbe = ({
|
|
|
8095
8250
|
const claim = foreignClaimRef.current;
|
|
8096
8251
|
if (!claim || !claimKey) return;
|
|
8097
8252
|
let cancelled = false;
|
|
8098
|
-
void
|
|
8253
|
+
void chunkA4MVNKXL_cjs.isTenantHeldElsewhere(claim.tenantId).then((held) => {
|
|
8099
8254
|
if (cancelled) return;
|
|
8100
|
-
if (held &&
|
|
8255
|
+
if (held && chunkA4MVNKXL_cjs.isSameClaim(chunkA4MVNKXL_cjs.readCurrentOwner(), claim)) {
|
|
8101
8256
|
onHeldElsewhereRef.current(claim.tenantId);
|
|
8102
8257
|
}
|
|
8103
8258
|
setProbedKey(claimKey);
|
|
@@ -8111,10 +8266,10 @@ var useLiveOwnerProbe = ({
|
|
|
8111
8266
|
var ImpersonationChecker = ({
|
|
8112
8267
|
children
|
|
8113
8268
|
}) => {
|
|
8114
|
-
const { data } =
|
|
8269
|
+
const { data } = chunkP4SL4PTY_cjs.useImpersonationStatusChecker();
|
|
8115
8270
|
const { setImpersonation, isInitialized, setInitialized } = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8116
|
-
|
|
8117
|
-
|
|
8271
|
+
chunkP4SL4PTY_cjs.useSessionTenantGuard();
|
|
8272
|
+
chunkP4SL4PTY_cjs.useStatusFirstOnTabReturn();
|
|
8118
8273
|
React8.useEffect(() => {
|
|
8119
8274
|
if (!data) return;
|
|
8120
8275
|
setImpersonation(
|
|
@@ -8136,7 +8291,7 @@ function ImpersonationBlocked({
|
|
|
8136
8291
|
onSecondary,
|
|
8137
8292
|
consolePath
|
|
8138
8293
|
}) {
|
|
8139
|
-
const { t } =
|
|
8294
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8140
8295
|
const navigate = reactRouter.useNavigate();
|
|
8141
8296
|
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: [
|
|
8142
8297
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -8174,8 +8329,8 @@ function ImpersonationTerminator({
|
|
|
8174
8329
|
detachedTenantId,
|
|
8175
8330
|
setDetached
|
|
8176
8331
|
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8177
|
-
const { mutateAsync } =
|
|
8178
|
-
const recordClaimedTenant =
|
|
8332
|
+
const { mutateAsync } = chunkP4SL4PTY_cjs.useStopImpersonation();
|
|
8333
|
+
const recordClaimedTenant = chunkP4SL4PTY_cjs.useRecordClaimedTenant();
|
|
8179
8334
|
const { projects } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8180
8335
|
const isTriggering = React8.useRef(false);
|
|
8181
8336
|
const [isTerminating, setIsTerminating] = React8.useState(false);
|
|
@@ -8187,7 +8342,7 @@ function ImpersonationTerminator({
|
|
|
8187
8342
|
});
|
|
8188
8343
|
React8.useEffect(() => {
|
|
8189
8344
|
if (!rootTenantId) return;
|
|
8190
|
-
return
|
|
8345
|
+
return chunkA4MVNKXL_cjs.subscribeToTenantClaims((claim) => {
|
|
8191
8346
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8192
8347
|
if (claim.tenantId === rootTenantId) {
|
|
8193
8348
|
setDetached(null);
|
|
@@ -8203,8 +8358,8 @@ function ImpersonationTerminator({
|
|
|
8203
8358
|
const [returnFailure, setReturnFailure] = React8.useState(
|
|
8204
8359
|
null
|
|
8205
8360
|
);
|
|
8206
|
-
const { t } =
|
|
8207
|
-
const signOut =
|
|
8361
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8362
|
+
const signOut = chunkP4SL4PTY_cjs.useSignOut();
|
|
8208
8363
|
React8.useEffect(() => {
|
|
8209
8364
|
if (!isImpersonated) setReturnFailure(null);
|
|
8210
8365
|
}, [isImpersonated]);
|
|
@@ -8220,7 +8375,7 @@ function ImpersonationTerminator({
|
|
|
8220
8375
|
const { status, stopError } = await mutateAsync(void 0);
|
|
8221
8376
|
if (!status.impersonated) {
|
|
8222
8377
|
terminate(rootTenantId);
|
|
8223
|
-
if (rootTenantId)
|
|
8378
|
+
if (rootTenantId) chunkA4MVNKXL_cjs.claimTenant(rootTenantId);
|
|
8224
8379
|
return;
|
|
8225
8380
|
}
|
|
8226
8381
|
console.error("Error stopping impersonation:", stopError);
|
|
@@ -8304,10 +8459,10 @@ function ImpersonationSynchronizer({
|
|
|
8304
8459
|
setImpersonationError,
|
|
8305
8460
|
setDetached
|
|
8306
8461
|
} = chunkRO55MFZA_cjs.useImpersonateStore();
|
|
8307
|
-
const { t } =
|
|
8308
|
-
const { mutateAsync } =
|
|
8309
|
-
const recordClaimedTenant =
|
|
8310
|
-
const { data: _data } =
|
|
8462
|
+
const { t } = chunkOPMWK5SY_cjs.useT(GENESIS_SHARED_MODULE);
|
|
8463
|
+
const { mutateAsync } = chunkP4SL4PTY_cjs.useStartImpersonation();
|
|
8464
|
+
const recordClaimedTenant = chunkP4SL4PTY_cjs.useRecordClaimedTenant();
|
|
8465
|
+
const { data: _data } = chunkP4SL4PTY_cjs.useGetProjects({ enabled: true });
|
|
8311
8466
|
const { selectedProject, setSelectedProject, projects, setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
8312
8467
|
const isTriggering = React8.useRef(false);
|
|
8313
8468
|
const [isImpersonating, setIsImpersonating] = React8.useState(false);
|
|
@@ -8342,7 +8497,7 @@ function ImpersonationSynchronizer({
|
|
|
8342
8497
|
]);
|
|
8343
8498
|
const getImpersonatedProject = async () => {
|
|
8344
8499
|
try {
|
|
8345
|
-
const res =
|
|
8500
|
+
const res = chunkP4SL4PTY_cjs.projectService.getProject();
|
|
8346
8501
|
return (await res).data;
|
|
8347
8502
|
} catch (error) {
|
|
8348
8503
|
console.error("Error fetching projects:", error);
|
|
@@ -8403,10 +8558,10 @@ function ImpersonationSynchronizer({
|
|
|
8403
8558
|
const isAttached = !!routeTenantId && routeTenantId === impersonatedTenantId && !detachedHere && !impersonationError && !isProbingOwner;
|
|
8404
8559
|
React8.useEffect(() => {
|
|
8405
8560
|
if (!isAttached || !routeTenantId) return;
|
|
8406
|
-
return
|
|
8561
|
+
return chunkA4MVNKXL_cjs.holdTenant(routeTenantId);
|
|
8407
8562
|
}, [isAttached, routeTenantId]);
|
|
8408
8563
|
React8.useEffect(() => {
|
|
8409
|
-
return
|
|
8564
|
+
return chunkA4MVNKXL_cjs.subscribeToTenantClaims((claim) => {
|
|
8410
8565
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8411
8566
|
const mine = routeTenantIdRef.current;
|
|
8412
8567
|
if (!mine) return;
|
|
@@ -8555,7 +8710,7 @@ function DashboardLayout({
|
|
|
8555
8710
|
navigationMenus,
|
|
8556
8711
|
forwardedTo
|
|
8557
8712
|
}) {
|
|
8558
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8713
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(chunkCTIGX76P_cjs.DashboardLayoutProvider, { isOpen: true, children: /* @__PURE__ */ jsxRuntime.jsx(RightSidePanelProvider, { resizable: true, topOffset: HeaderHeight, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full overflow-hidden", children: [
|
|
8559
8714
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8560
8715
|
SidebarMenuDesktop,
|
|
8561
8716
|
{
|
|
@@ -8633,10 +8788,10 @@ var LoginHeader = ({
|
|
|
8633
8788
|
blocksUrl = "https://seliseblocks.com",
|
|
8634
8789
|
githubUrl = "https://github.com/SELISEdigitalplatforms"
|
|
8635
8790
|
}) => {
|
|
8636
|
-
const { t } =
|
|
8791
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
8637
8792
|
const {
|
|
8638
8793
|
config: { appLogoUrl }
|
|
8639
|
-
} =
|
|
8794
|
+
} = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state);
|
|
8640
8795
|
const resolveLogo = (variant) => {
|
|
8641
8796
|
if (!appLogoUrl) return void 0;
|
|
8642
8797
|
if (typeof appLogoUrl === "string") return appLogoUrl;
|
|
@@ -9559,7 +9714,7 @@ function useLoginCarousel({
|
|
|
9559
9714
|
name,
|
|
9560
9715
|
carouselItems
|
|
9561
9716
|
}) {
|
|
9562
|
-
const { t } =
|
|
9717
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9563
9718
|
const defaultProducts = React8.useMemo(() => getDefaultBlocksProducts(t), [t]);
|
|
9564
9719
|
const active = React8.useMemo(() => {
|
|
9565
9720
|
const products = carouselItems?.filter(isBlocksProduct) ?? defaultProducts;
|
|
@@ -9601,7 +9756,7 @@ var BlocksLoginPage = ({
|
|
|
9601
9756
|
isSignUpLoading = false,
|
|
9602
9757
|
carouselItems
|
|
9603
9758
|
}) => {
|
|
9604
|
-
const { t } =
|
|
9759
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9605
9760
|
const footer = footerLink ?? {
|
|
9606
9761
|
label: t("BLOCKS_LOGIN_PAGE.FOOTER_LINK"),
|
|
9607
9762
|
url: "https://seliseblocks.com"
|
|
@@ -9919,12 +10074,12 @@ var BlocksLoginPage = ({
|
|
|
9919
10074
|
] });
|
|
9920
10075
|
};
|
|
9921
10076
|
var LoginPage = () => {
|
|
9922
|
-
const { t } =
|
|
10077
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.login");
|
|
9923
10078
|
const products = React8.useMemo(() => getBlocksProducts(t), [t]);
|
|
9924
|
-
const config =
|
|
9925
|
-
const { start, isLoading } =
|
|
9926
|
-
const { canSignUp } =
|
|
9927
|
-
const { start: startSignUp, isLoading: isSignUpLoading } =
|
|
10079
|
+
const config = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
10080
|
+
const { start, isLoading } = chunkP4SL4PTY_cjs.useLogin();
|
|
10081
|
+
const { canSignUp } = chunkP4SL4PTY_cjs.useSignUpAffordance();
|
|
10082
|
+
const { start: startSignUp, isLoading: isSignUpLoading } = chunkP4SL4PTY_cjs.useSignUpRedirect();
|
|
9928
10083
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9929
10084
|
BlocksLoginPage,
|
|
9930
10085
|
{
|
|
@@ -10038,14 +10193,14 @@ var BentoCard = ({
|
|
|
10038
10193
|
}
|
|
10039
10194
|
);
|
|
10040
10195
|
var DefaultDoc = () => {
|
|
10041
|
-
const { t } =
|
|
10196
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10042
10197
|
return /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: getResources(t).map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
|
|
10043
10198
|
};
|
|
10044
10199
|
function useCreateProjectRedirect() {
|
|
10045
|
-
const { name } =
|
|
10200
|
+
const { name } = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
10046
10201
|
const navigate = reactRouter.useNavigate();
|
|
10047
10202
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
10048
|
-
const { isFetching, isReady, redirect } =
|
|
10203
|
+
const { isFetching, isReady, redirect } = chunkP4SL4PTY_cjs.usePrefetchRedirect({
|
|
10049
10204
|
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10050
10205
|
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
10051
10206
|
forwardedTo: "/app/create-project",
|
|
@@ -10066,7 +10221,7 @@ function useCreateProjectRedirect() {
|
|
|
10066
10221
|
};
|
|
10067
10222
|
}
|
|
10068
10223
|
var AddProjectCard = () => {
|
|
10069
|
-
const { t } =
|
|
10224
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10070
10225
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
10071
10226
|
if (isFetching) {
|
|
10072
10227
|
return /* @__PURE__ */ jsxRuntime.jsx(ProjectCardLoadingSkeleton, {});
|
|
@@ -10088,7 +10243,7 @@ var AddProjectCard = () => {
|
|
|
10088
10243
|
);
|
|
10089
10244
|
};
|
|
10090
10245
|
function ConsoleCreateProject() {
|
|
10091
|
-
const { t } =
|
|
10246
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10092
10247
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
10093
10248
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10094
10249
|
framerMotion.motion.div,
|
|
@@ -10139,10 +10294,10 @@ function useProjectOverviewRedirect({
|
|
|
10139
10294
|
tenantGroupId
|
|
10140
10295
|
}) {
|
|
10141
10296
|
const navigate = reactRouter.useNavigate();
|
|
10142
|
-
const { name } =
|
|
10297
|
+
const { name } = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
10143
10298
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
10144
10299
|
const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
|
|
10145
|
-
const { isFetching, isReady, redirect } =
|
|
10300
|
+
const { isFetching, isReady, redirect } = chunkP4SL4PTY_cjs.usePrefetchRedirect({
|
|
10146
10301
|
clientId: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
10147
10302
|
redirectUri: osApp ? chunkTSRDXJUG_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
10148
10303
|
forwardedTo: redirectedRoute,
|
|
@@ -10182,7 +10337,7 @@ var ProjectActionButton = ({
|
|
|
10182
10337
|
isShared,
|
|
10183
10338
|
canOpen = true
|
|
10184
10339
|
}) => {
|
|
10185
|
-
const { t } =
|
|
10340
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10186
10341
|
const { setTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10187
10342
|
const { handleClick, isDisabled, isFetching } = useProjectOverviewRedirect({
|
|
10188
10343
|
tenantGroupId: project.tenantGroupId
|
|
@@ -10227,7 +10382,7 @@ var getLatestProjectUpdate = (group) => group.projects.reduce((latest, project)
|
|
|
10227
10382
|
var getEnvironmentLabel = (environment) => environmentOptions.find((option) => option.value === environment)?.label ?? environment;
|
|
10228
10383
|
var INLINE_LIMIT = 3;
|
|
10229
10384
|
var ProjectEnvironments = ({ projects }) => {
|
|
10230
|
-
const { t } =
|
|
10385
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10231
10386
|
const navigate = reactRouter.useNavigate();
|
|
10232
10387
|
const { setTenantGroup, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10233
10388
|
const onEnvironmentClick = async (event, project) => {
|
|
@@ -10304,7 +10459,7 @@ var ProjectCard = ({
|
|
|
10304
10459
|
isShared,
|
|
10305
10460
|
canOpen = true
|
|
10306
10461
|
}) => {
|
|
10307
|
-
const { t } =
|
|
10462
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10308
10463
|
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: [
|
|
10309
10464
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-start justify-between gap-2", children: [
|
|
10310
10465
|
/* @__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 }) }),
|
|
@@ -10366,14 +10521,14 @@ var cardCorners = {
|
|
|
10366
10521
|
}
|
|
10367
10522
|
};
|
|
10368
10523
|
var SharedStatus = ({ isShared }) => {
|
|
10369
|
-
const { t } =
|
|
10524
|
+
const { t } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10370
10525
|
return isShared ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", className: "flex w-fit items-center gap-1", children: [
|
|
10371
10526
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
|
|
10372
10527
|
t("PROJECT_LIST.SHARED")
|
|
10373
10528
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10374
10529
|
};
|
|
10375
10530
|
var AddProjectListAction = ({ mobile = false }) => {
|
|
10376
|
-
const { t } =
|
|
10531
|
+
const { t } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10377
10532
|
const { handleClick, isDisabled, isFetching } = useCreateProjectRedirect();
|
|
10378
10533
|
const action = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10379
10534
|
Button,
|
|
@@ -10413,7 +10568,7 @@ var ProjectMobileList = ({
|
|
|
10413
10568
|
projectGroups,
|
|
10414
10569
|
showAddProject
|
|
10415
10570
|
}) => {
|
|
10416
|
-
const { t, language } =
|
|
10571
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10417
10572
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", "data-testid": "project-list-mobile", children: [
|
|
10418
10573
|
showAddProject && /* @__PURE__ */ jsxRuntime.jsx(AddProjectListAction, { mobile: true }),
|
|
10419
10574
|
projectGroups.map((group) => {
|
|
@@ -10454,7 +10609,7 @@ var ProjectList = ({
|
|
|
10454
10609
|
showAddProject
|
|
10455
10610
|
}) => {
|
|
10456
10611
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
10457
|
-
const { t, language } =
|
|
10612
|
+
const { t, language } = chunkOPMWK5SY_cjs.useT(MODULE3);
|
|
10458
10613
|
if (isMobile) {
|
|
10459
10614
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10460
10615
|
ProjectMobileList,
|
|
@@ -10520,8 +10675,8 @@ function MultiSelect2({
|
|
|
10520
10675
|
onChange,
|
|
10521
10676
|
value: selectedValues
|
|
10522
10677
|
}) {
|
|
10523
|
-
const { t } =
|
|
10524
|
-
const [buttonRef, popoverWidth] =
|
|
10678
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10679
|
+
const [buttonRef, popoverWidth] = chunkP4SL4PTY_cjs.usePopoverWidth();
|
|
10525
10680
|
const onSelectHandler = (value) => {
|
|
10526
10681
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
10527
10682
|
onChange(nextValues);
|
|
@@ -10552,15 +10707,14 @@ function MultiSelect2({
|
|
|
10552
10707
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
10553
10708
|
}
|
|
10554
10709
|
),
|
|
10555
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.
|
|
10710
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: selectedValues.length > 2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10556
10711
|
Badge,
|
|
10557
10712
|
{
|
|
10558
10713
|
variant: "outline",
|
|
10559
10714
|
className: "rounded-sm px-1 font-normal",
|
|
10560
|
-
children:
|
|
10561
|
-
selectedValues.length
|
|
10562
|
-
|
|
10563
|
-
]
|
|
10715
|
+
children: t("MULTI_SELECT.SELECTED_COUNT", {
|
|
10716
|
+
count: selectedValues.length
|
|
10717
|
+
})
|
|
10564
10718
|
}
|
|
10565
10719
|
) : options.filter((option) => selectedValues.includes(option.value)).map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10566
10720
|
Badge,
|
|
@@ -10626,7 +10780,7 @@ function MultiSelect2({
|
|
|
10626
10780
|
] });
|
|
10627
10781
|
}
|
|
10628
10782
|
var ResetButton = ({ onClick }) => {
|
|
10629
|
-
const { t } =
|
|
10783
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10630
10784
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10631
10785
|
Button,
|
|
10632
10786
|
{
|
|
@@ -10647,14 +10801,14 @@ var SearchInput = ({
|
|
|
10647
10801
|
value,
|
|
10648
10802
|
className = ""
|
|
10649
10803
|
}) => {
|
|
10650
|
-
const { t } =
|
|
10804
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
10651
10805
|
const [state, setState] = React8.useState(value);
|
|
10652
10806
|
const inputRef = React8.useRef(null);
|
|
10653
10807
|
React8.useEffect(() => {
|
|
10654
10808
|
setState(value);
|
|
10655
10809
|
}, [value]);
|
|
10656
10810
|
const debounced = React8.useRef(
|
|
10657
|
-
|
|
10811
|
+
chunkAIUUCMAI_cjs.debounce((val) => {
|
|
10658
10812
|
onChange(val);
|
|
10659
10813
|
}, 300)
|
|
10660
10814
|
).current;
|
|
@@ -10713,7 +10867,7 @@ var ProjectToolbar = ({
|
|
|
10713
10867
|
searchText,
|
|
10714
10868
|
viewMode
|
|
10715
10869
|
}) => {
|
|
10716
|
-
const { t } =
|
|
10870
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10717
10871
|
const hasActiveFilters = searchText.trim().length > 0 || environmentFilter.length > 0;
|
|
10718
10872
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10719
10873
|
"div",
|
|
@@ -10783,7 +10937,7 @@ var DEFAULT_SORT = {
|
|
|
10783
10937
|
property: "lastUpdatedDate",
|
|
10784
10938
|
isDescending: true
|
|
10785
10939
|
};
|
|
10786
|
-
var projectViewStorage =
|
|
10940
|
+
var projectViewStorage = chunkAIUUCMAI_cjs.createStorage("local", { prefix: "console" });
|
|
10787
10941
|
var VIEW_MODE_KEY = "projectsViewMode";
|
|
10788
10942
|
var readViewMode = () => {
|
|
10789
10943
|
const storedValue = projectViewStorage.get(VIEW_MODE_KEY);
|
|
@@ -10805,7 +10959,7 @@ var useProjectListState = (projectGroups) => {
|
|
|
10805
10959
|
})),
|
|
10806
10960
|
[projectGroups]
|
|
10807
10961
|
);
|
|
10808
|
-
const searchedGroups =
|
|
10962
|
+
const searchedGroups = chunkP4SL4PTY_cjs.useDebouncedFuseFilter(
|
|
10809
10963
|
searchableGroups,
|
|
10810
10964
|
searchText,
|
|
10811
10965
|
SEARCH_OPTIONS
|
|
@@ -10875,8 +11029,8 @@ var SelfProjectLoading = ({ viewMode }) => {
|
|
|
10875
11029
|
) });
|
|
10876
11030
|
};
|
|
10877
11031
|
var SelfProject = ({ canCreateProject = false }) => {
|
|
10878
|
-
const { t } =
|
|
10879
|
-
const { data, isLoading } =
|
|
11032
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
11033
|
+
const { data, isLoading } = chunkP4SL4PTY_cjs.useGetProjects({ enabled: true });
|
|
10880
11034
|
const isPending = isLoading;
|
|
10881
11035
|
const projectGroups = data || [];
|
|
10882
11036
|
const {
|
|
@@ -10980,7 +11134,7 @@ var SelfProject = ({ canCreateProject = false }) => {
|
|
|
10980
11134
|
] });
|
|
10981
11135
|
};
|
|
10982
11136
|
var ConsolePage = ({ canCreateProject = false }) => {
|
|
10983
|
-
const { t } =
|
|
11137
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.console");
|
|
10984
11138
|
const { resetSelectedProject, resetTenantGroup } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
10985
11139
|
React8.useEffect(() => {
|
|
10986
11140
|
resetSelectedProject();
|
|
@@ -11004,7 +11158,7 @@ var announceNewSession = async () => {
|
|
|
11004
11158
|
let timer;
|
|
11005
11159
|
try {
|
|
11006
11160
|
const status = await Promise.race([
|
|
11007
|
-
|
|
11161
|
+
chunkP4SL4PTY_cjs.impersonationService.impersonationStatus({ skipSessionCheck: true }),
|
|
11008
11162
|
new Promise((_, reject) => {
|
|
11009
11163
|
timer = setTimeout(
|
|
11010
11164
|
() => reject(new Error("Impersonation status timed out")),
|
|
@@ -11013,7 +11167,7 @@ var announceNewSession = async () => {
|
|
|
11013
11167
|
})
|
|
11014
11168
|
]);
|
|
11015
11169
|
const tenantId = status.impersonated ? status.impersonatedTenantId : rootTenantId;
|
|
11016
|
-
if (tenantId)
|
|
11170
|
+
if (tenantId) chunkA4MVNKXL_cjs.claimTenant(tenantId);
|
|
11017
11171
|
} catch {
|
|
11018
11172
|
} finally {
|
|
11019
11173
|
clearTimeout(timer);
|
|
@@ -11068,8 +11222,8 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
11068
11222
|
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" }) });
|
|
11069
11223
|
};
|
|
11070
11224
|
function ProfilePage() {
|
|
11071
|
-
const { t } =
|
|
11072
|
-
const { isLoading, error } =
|
|
11225
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.profile");
|
|
11226
|
+
const { isLoading, error } = chunkP4SL4PTY_cjs.useInitiateRedirect({
|
|
11073
11227
|
clientId: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
|
|
11074
11228
|
redirectUri: chunkTSRDXJUG_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
|
|
11075
11229
|
forwardedTo: "/app/profile"
|
|
@@ -11123,7 +11277,7 @@ var CoreApiEndpointRow = ({
|
|
|
11123
11277
|
endpoint,
|
|
11124
11278
|
xBlocksKey
|
|
11125
11279
|
}) => {
|
|
11126
|
-
const { t } =
|
|
11280
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.dashboard");
|
|
11127
11281
|
const curlCommand = buildCurlCommand(endpoint, xBlocksKey);
|
|
11128
11282
|
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: [
|
|
11129
11283
|
endpoint.method && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11216,7 +11370,7 @@ var CoreApiCard = ({
|
|
|
11216
11370
|
isLoading,
|
|
11217
11371
|
error
|
|
11218
11372
|
}) => {
|
|
11219
|
-
const { t } =
|
|
11373
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.dashboard");
|
|
11220
11374
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(CoreApiLoadingSkeleton, {});
|
|
11221
11375
|
const groups = groupEndpointsByTag(endpoints);
|
|
11222
11376
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11306,8 +11460,8 @@ var useSwaggerEndpoints = (serviceName, {
|
|
|
11306
11460
|
enabled = true,
|
|
11307
11461
|
staleTime = 5 * 60 * 1e3
|
|
11308
11462
|
} = {}) => {
|
|
11309
|
-
const baseUrl = serviceName ?
|
|
11310
|
-
const swaggerUrl = serviceName ?
|
|
11463
|
+
const baseUrl = serviceName ? chunkAIUUCMAI_cjs.getServiceBaseUrl(serviceName) : void 0;
|
|
11464
|
+
const swaggerUrl = serviceName ? chunkAIUUCMAI_cjs.getServiceSwaggerUrl(serviceName) : void 0;
|
|
11311
11465
|
const { data, isLoading, isError, error } = reactQuery.useQuery({
|
|
11312
11466
|
queryKey: ["swagger-endpoints", swaggerUrl],
|
|
11313
11467
|
queryFn: () => {
|
|
@@ -11327,7 +11481,7 @@ var ConfirmationModal = ({
|
|
|
11327
11481
|
onConfirm,
|
|
11328
11482
|
buttonState
|
|
11329
11483
|
}) => {
|
|
11330
|
-
const { t } =
|
|
11484
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11331
11485
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "mr-4 w-full max-w-[425px] rounded-md", children: [
|
|
11332
11486
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11333
11487
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left text-lg font-semibold leading-7", children: data.dialogTitle }),
|
|
@@ -11348,8 +11502,8 @@ var ConfirmationModal = ({
|
|
|
11348
11502
|
] });
|
|
11349
11503
|
};
|
|
11350
11504
|
var DashboardOverview = () => {
|
|
11351
|
-
const { name } =
|
|
11352
|
-
const { data, isFetching } =
|
|
11505
|
+
const { name } = chunkP4SL4PTY_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
11506
|
+
const { data, isFetching } = chunkP4SL4PTY_cjs.useGetProject();
|
|
11353
11507
|
const {
|
|
11354
11508
|
endpoints,
|
|
11355
11509
|
isLoading: isLoadingEndpoints,
|
|
@@ -11384,7 +11538,7 @@ var ProjectDetail = ({
|
|
|
11384
11538
|
project,
|
|
11385
11539
|
isLoading
|
|
11386
11540
|
}) => {
|
|
11387
|
-
const { t } =
|
|
11541
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11388
11542
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
|
|
11389
11543
|
if (!project)
|
|
11390
11544
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11428,8 +11582,8 @@ var ProjectDetail = ({
|
|
|
11428
11582
|
)?.label
|
|
11429
11583
|
}
|
|
11430
11584
|
) }),
|
|
11431
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.LAST_UPDATED"), children: project?.lastUpdatedDate &&
|
|
11432
|
-
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.CREATED"), children: project?.createdDate &&
|
|
11585
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.LAST_UPDATED"), children: project?.lastUpdatedDate && chunkAIUUCMAI_cjs.formatFullDate(new Date(project.lastUpdatedDate)) }),
|
|
11586
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProjectDetailItem, { label: t("PROJECT_DETAIL.CREATED"), children: project?.createdDate && chunkAIUUCMAI_cjs.formatFullDate(new Date(project.createdDate)) })
|
|
11433
11587
|
] })
|
|
11434
11588
|
}
|
|
11435
11589
|
);
|
|
@@ -11442,14 +11596,14 @@ function ProjectList2({
|
|
|
11442
11596
|
redirectPaths,
|
|
11443
11597
|
collapsed = false
|
|
11444
11598
|
}) {
|
|
11445
|
-
const { t } =
|
|
11599
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11446
11600
|
const navigate = reactRouter.useNavigate();
|
|
11447
11601
|
const { pathname } = reactRouter.useLocation();
|
|
11448
|
-
const { data: projectGroups = [], isLoading } =
|
|
11602
|
+
const { data: projectGroups = [], isLoading } = chunkP4SL4PTY_cjs.useGetProjects({
|
|
11449
11603
|
enabled: true
|
|
11450
11604
|
});
|
|
11451
11605
|
const { selectedProject, setSelectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11452
|
-
const { data: projectData } =
|
|
11606
|
+
const { data: projectData } = chunkP4SL4PTY_cjs.useGetProject();
|
|
11453
11607
|
const pendingProjectRef = React8.useRef(null);
|
|
11454
11608
|
const redirectRegexMap = React8.useMemo(
|
|
11455
11609
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -11532,7 +11686,7 @@ function ProjectList2({
|
|
|
11532
11686
|
}
|
|
11533
11687
|
var formSchema = zod.z.object({
|
|
11534
11688
|
domain: zod.z.string().min(1, {
|
|
11535
|
-
error: () =>
|
|
11689
|
+
error: () => chunkOPMWK5SY_cjs.tStatic("genesis.shared", "SET_CUSTOM_DOMAIN_FORM.REQUIRED")
|
|
11536
11690
|
})
|
|
11537
11691
|
});
|
|
11538
11692
|
var SetCustomDomainForm = ({
|
|
@@ -11542,7 +11696,7 @@ var SetCustomDomainForm = ({
|
|
|
11542
11696
|
onSubmit,
|
|
11543
11697
|
onCancel
|
|
11544
11698
|
}) => {
|
|
11545
|
-
const { t } =
|
|
11699
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11546
11700
|
const form = reactHookForm.useForm({
|
|
11547
11701
|
resolver: zod$1.zodResolver(formSchema),
|
|
11548
11702
|
defaultValues: { domain: defaultDomain }
|
|
@@ -11601,8 +11755,8 @@ var SetCustomDomainDialog = ({
|
|
|
11601
11755
|
projectKey,
|
|
11602
11756
|
projectEnv
|
|
11603
11757
|
}) => {
|
|
11604
|
-
const { t } =
|
|
11605
|
-
const { mutateAsync, isPending } =
|
|
11758
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11759
|
+
const { mutateAsync, isPending } = chunkP4SL4PTY_cjs.useUpdateRepositories();
|
|
11606
11760
|
const verifiedDomains = React8.useMemo(
|
|
11607
11761
|
() => Array.from(
|
|
11608
11762
|
new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
|
|
@@ -11629,16 +11783,16 @@ var SetCustomDomainDialog = ({
|
|
|
11629
11783
|
]
|
|
11630
11784
|
});
|
|
11631
11785
|
if (res.isSuccess) {
|
|
11632
|
-
|
|
11786
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
11633
11787
|
description: t("SET_CUSTOM_DOMAIN_DIALOG.UPDATED")
|
|
11634
11788
|
});
|
|
11635
11789
|
onOpenChange(false);
|
|
11636
11790
|
} else {
|
|
11637
|
-
|
|
11791
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
11638
11792
|
}
|
|
11639
11793
|
} catch (error) {
|
|
11640
11794
|
if (error && typeof error === "object" && "errors" in error) {
|
|
11641
|
-
|
|
11795
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
11642
11796
|
}
|
|
11643
11797
|
}
|
|
11644
11798
|
};
|
|
@@ -11685,7 +11839,7 @@ var buildColumns = (t, onSet) => [
|
|
|
11685
11839
|
cell: ({ row }) => {
|
|
11686
11840
|
const repo = row.original;
|
|
11687
11841
|
const isDefaultDate = repo.lastDeploymentDate === "0001-01-01T00:00:00";
|
|
11688
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-medium-emphasis", children: !repo.lastDeploymentDate || isDefaultDate ? t("PROJECT_REPO_TABLE.NOT_DEPLOYED") :
|
|
11842
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-medium-emphasis", children: !repo.lastDeploymentDate || isDefaultDate ? t("PROJECT_REPO_TABLE.NOT_DEPLOYED") : chunkAIUUCMAI_cjs.formatFullDate(new Date(repo.lastDeploymentDate)) });
|
|
11689
11843
|
}
|
|
11690
11844
|
}),
|
|
11691
11845
|
columnHelper.display({
|
|
@@ -11714,7 +11868,7 @@ var ProjectRepoTable = ({
|
|
|
11714
11868
|
projectKey,
|
|
11715
11869
|
projectEnv
|
|
11716
11870
|
}) => {
|
|
11717
|
-
const { t } =
|
|
11871
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11718
11872
|
const [setTarget, setSetTarget] = React8.useState(null);
|
|
11719
11873
|
const [setDialogOpen, setSetDialogOpen] = React8.useState(false);
|
|
11720
11874
|
const handleSet = (repo) => {
|
|
@@ -11782,13 +11936,13 @@ var ProjectRepoList = ({
|
|
|
11782
11936
|
project,
|
|
11783
11937
|
isLoading
|
|
11784
11938
|
}) => {
|
|
11785
|
-
const { t } =
|
|
11939
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11786
11940
|
const { applications } = project;
|
|
11787
11941
|
const {
|
|
11788
11942
|
data: envRepositoriesResponse,
|
|
11789
11943
|
isLoading: isLoadingEnvRepos,
|
|
11790
11944
|
isFetching: isFetchingEnvRepos
|
|
11791
|
-
} =
|
|
11945
|
+
} = chunkP4SL4PTY_cjs.useGetEnvRepositories(project?.tenantId || "");
|
|
11792
11946
|
if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
|
|
11793
11947
|
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: [
|
|
11794
11948
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
|
|
@@ -11878,7 +12032,7 @@ var ProjectOverviewSkeleton = () => {
|
|
|
11878
12032
|
};
|
|
11879
12033
|
var editProjectFormSchema = zod.z.object({
|
|
11880
12034
|
name: zod.z.string().min(1, {
|
|
11881
|
-
error: () =>
|
|
12035
|
+
error: () => chunkOPMWK5SY_cjs.tStatic("genesis.shared", "EDIT_PROJECT_FORM_SCHEMA.NAME_REQUIRED")
|
|
11882
12036
|
})
|
|
11883
12037
|
});
|
|
11884
12038
|
var editProjectFormDefaultValues = {
|
|
@@ -11889,9 +12043,9 @@ var EditProjectForm = ({
|
|
|
11889
12043
|
currentName,
|
|
11890
12044
|
onAfterSubmit
|
|
11891
12045
|
}) => {
|
|
11892
|
-
const { t } =
|
|
12046
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11893
12047
|
const queryClient = reactQuery.useQueryClient();
|
|
11894
|
-
const { mutateAsync, isPending } =
|
|
12048
|
+
const { mutateAsync, isPending } = chunkP4SL4PTY_cjs.useUpdateTenantGroup();
|
|
11895
12049
|
const form = reactHookForm.useForm({
|
|
11896
12050
|
resolver: zod$1.zodResolver(editProjectFormSchema),
|
|
11897
12051
|
defaultValues: {
|
|
@@ -11907,7 +12061,7 @@ var EditProjectForm = ({
|
|
|
11907
12061
|
tenantGroupId
|
|
11908
12062
|
});
|
|
11909
12063
|
if (res.isSuccess) {
|
|
11910
|
-
|
|
12064
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
11911
12065
|
title: t("EDIT_PROJECT_FORM.TOAST_TITLE"),
|
|
11912
12066
|
description: t("EDIT_PROJECT_FORM.TOAST_DESCRIPTION")
|
|
11913
12067
|
});
|
|
@@ -11916,11 +12070,11 @@ var EditProjectForm = ({
|
|
|
11916
12070
|
form.reset();
|
|
11917
12071
|
onAfterSubmit();
|
|
11918
12072
|
} else {
|
|
11919
|
-
|
|
12073
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
11920
12074
|
}
|
|
11921
12075
|
} catch (error) {
|
|
11922
|
-
if (
|
|
11923
|
-
|
|
12076
|
+
if (chunkAIUUCMAI_cjs.isErrorWithErrors(error)) {
|
|
12077
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
11924
12078
|
}
|
|
11925
12079
|
}
|
|
11926
12080
|
};
|
|
@@ -11971,7 +12125,7 @@ var EditProjectDialog = ({
|
|
|
11971
12125
|
tenantGroupId,
|
|
11972
12126
|
currentName
|
|
11973
12127
|
}) => {
|
|
11974
|
-
const { t } =
|
|
12128
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11975
12129
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-md", children: [
|
|
11976
12130
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
11977
12131
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("EDIT_PROJECT_DIALOG.TITLE") }),
|
|
@@ -11988,7 +12142,7 @@ var EditProjectDialog = ({
|
|
|
11988
12142
|
] }) });
|
|
11989
12143
|
};
|
|
11990
12144
|
function EditProject() {
|
|
11991
|
-
const { t } =
|
|
12145
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
11992
12146
|
const [openEditDialog, setOpenEditDialog] = React8.useState(false);
|
|
11993
12147
|
const { selectedProject } = chunkU2LA7LBX_cjs.useProjectStore();
|
|
11994
12148
|
const { tenantGroupId, name } = selectedProject || {};
|
|
@@ -12035,9 +12189,9 @@ function SidebarMobileView({
|
|
|
12035
12189
|
redirectPaths,
|
|
12036
12190
|
navigationMenus
|
|
12037
12191
|
}) {
|
|
12038
|
-
const { t } =
|
|
12192
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12039
12193
|
const [open, setOpen] = React8.useState(false);
|
|
12040
|
-
const { appLightLogo, appDarkLogo } =
|
|
12194
|
+
const { appLightLogo, appDarkLogo } = chunkP4SL4PTY_cjs.useLogo();
|
|
12041
12195
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
12042
12196
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
12043
12197
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
|
|
@@ -12061,7 +12215,7 @@ function SidebarMobileView({
|
|
|
12061
12215
|
className: "h-9 w-auto",
|
|
12062
12216
|
lightSrc: appLightLogo,
|
|
12063
12217
|
darkSrc: appDarkLogo,
|
|
12064
|
-
alt: "
|
|
12218
|
+
alt: t("SIDEBAR.LOGO_ALT")
|
|
12065
12219
|
}
|
|
12066
12220
|
) }),
|
|
12067
12221
|
/* @__PURE__ */ jsxRuntime.jsx(SheetClose, { className: "mt-0!", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
|
|
@@ -12086,10 +12240,10 @@ function SidebarMenuDesktop({
|
|
|
12086
12240
|
redirectPaths,
|
|
12087
12241
|
navigationMenus
|
|
12088
12242
|
}) {
|
|
12089
|
-
const { t } =
|
|
12090
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
12091
|
-
const { appLightLogo, appDarkLogo } =
|
|
12092
|
-
const icon =
|
|
12243
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12244
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkCTIGX76P_cjs.SidebarContext);
|
|
12245
|
+
const { appLightLogo, appDarkLogo } = chunkP4SL4PTY_cjs.useLogo();
|
|
12246
|
+
const icon = chunkP4SL4PTY_cjs.useIcon();
|
|
12093
12247
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
12094
12248
|
const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
|
|
12095
12249
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12115,7 +12269,7 @@ function SidebarMenuDesktop({
|
|
|
12115
12269
|
{
|
|
12116
12270
|
lightSrc: appLightLogo,
|
|
12117
12271
|
darkSrc: appDarkLogo,
|
|
12118
|
-
alt: "
|
|
12272
|
+
alt: t("SIDEBAR.LOGO_ALT"),
|
|
12119
12273
|
className: "h-full w-full object-contain"
|
|
12120
12274
|
}
|
|
12121
12275
|
),
|
|
@@ -12207,7 +12361,7 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12207
12361
|
ErrorDisplay,
|
|
12208
12362
|
{
|
|
12209
12363
|
icon: lucideReact.AlertCircle,
|
|
12210
|
-
text: this.state.error?.message ??
|
|
12364
|
+
text: this.state.error?.message ?? chunkOPMWK5SY_cjs.tStatic("genesis.shared", "ERROR_BOUNDARY.DEFAULT"),
|
|
12211
12365
|
containerClassName: "h-full w-full min-h-100"
|
|
12212
12366
|
}
|
|
12213
12367
|
);
|
|
@@ -12216,25 +12370,25 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
12216
12370
|
}
|
|
12217
12371
|
};
|
|
12218
12372
|
var ArchiveProject = () => {
|
|
12219
|
-
const { t } =
|
|
12373
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12220
12374
|
const navigate = reactRouter.useNavigate();
|
|
12221
12375
|
const projectKey = chunkU2LA7LBX_cjs.useProjectStore().selectedProject?.tenantId || "";
|
|
12222
|
-
const { mutateAsync, isPending } =
|
|
12376
|
+
const { mutateAsync, isPending } = chunkP4SL4PTY_cjs.useDisableProject({ projectKey });
|
|
12223
12377
|
const onClickHandler = async () => {
|
|
12224
12378
|
try {
|
|
12225
12379
|
const res = await mutateAsync();
|
|
12226
12380
|
if (res.isSuccess) {
|
|
12227
|
-
|
|
12381
|
+
chunkAIUUCMAI_cjs.showSuccessToast({
|
|
12228
12382
|
title: t("ARCHIVE_PROJECT.TOAST_TITLE"),
|
|
12229
12383
|
description: t("ARCHIVE_PROJECT.TOAST_DESCRIPTION")
|
|
12230
12384
|
});
|
|
12231
12385
|
navigate("/app/console");
|
|
12232
12386
|
} else {
|
|
12233
|
-
|
|
12387
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: res.errors });
|
|
12234
12388
|
}
|
|
12235
12389
|
} catch (error) {
|
|
12236
|
-
if (
|
|
12237
|
-
|
|
12390
|
+
if (chunkAIUUCMAI_cjs.isErrorWithErrors(error)) {
|
|
12391
|
+
chunkAIUUCMAI_cjs.showErrorToast({ errors: error.errors });
|
|
12238
12392
|
}
|
|
12239
12393
|
}
|
|
12240
12394
|
};
|
|
@@ -12950,7 +13104,7 @@ var CopyableSnippet = ({
|
|
|
12950
13104
|
language = "bash",
|
|
12951
13105
|
isCopyable = true
|
|
12952
13106
|
}) => {
|
|
12953
|
-
const { t } =
|
|
13107
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
12954
13108
|
const [copied, setCopied] = React8.useState(false);
|
|
12955
13109
|
const handleCopy = async () => {
|
|
12956
13110
|
try {
|
|
@@ -13018,7 +13172,7 @@ function InfoTooltip({ content, side = "top" }) {
|
|
|
13018
13172
|
] });
|
|
13019
13173
|
}
|
|
13020
13174
|
function DateRange({ label, value, onChange }) {
|
|
13021
|
-
const { t } =
|
|
13175
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13022
13176
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
13023
13177
|
const [open, setOpen] = React8.useState(false);
|
|
13024
13178
|
const [date, setDate] = React8.useState(value);
|
|
@@ -13062,10 +13216,10 @@ function DateRange({ label, value, onChange }) {
|
|
|
13062
13216
|
className: "hidden h-4 sm:mx-2 sm:block"
|
|
13063
13217
|
}
|
|
13064
13218
|
),
|
|
13065
|
-
|
|
13219
|
+
chunkAIUUCMAI_cjs.formatDate(date.from, true),
|
|
13066
13220
|
date.to && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13067
13221
|
" - ",
|
|
13068
|
-
|
|
13222
|
+
chunkAIUUCMAI_cjs.formatDate(date.to, true)
|
|
13069
13223
|
] })
|
|
13070
13224
|
] })
|
|
13071
13225
|
] }) }) }),
|
|
@@ -13106,14 +13260,14 @@ var DropdownSearchInput = ({
|
|
|
13106
13260
|
className = {},
|
|
13107
13261
|
options = []
|
|
13108
13262
|
}) => {
|
|
13109
|
-
const { t } =
|
|
13263
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13110
13264
|
const [state, setState] = React8.useState(value);
|
|
13111
13265
|
const inputRef = React8.useRef(null);
|
|
13112
13266
|
React8.useEffect(() => {
|
|
13113
13267
|
setState(value);
|
|
13114
13268
|
}, [value]);
|
|
13115
13269
|
const debounced = React8.useRef(
|
|
13116
|
-
|
|
13270
|
+
chunkAIUUCMAI_cjs.debounce((val) => {
|
|
13117
13271
|
onChange(val);
|
|
13118
13272
|
}, 300)
|
|
13119
13273
|
).current;
|
|
@@ -13180,7 +13334,7 @@ var DropdownSearchInput = ({
|
|
|
13180
13334
|
] });
|
|
13181
13335
|
};
|
|
13182
13336
|
var ClearButton = ({ onClear }) => {
|
|
13183
|
-
const { t } =
|
|
13337
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13184
13338
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13185
13339
|
Button,
|
|
13186
13340
|
{
|
|
@@ -13192,9 +13346,9 @@ var ClearButton = ({ onClear }) => {
|
|
|
13192
13346
|
) });
|
|
13193
13347
|
};
|
|
13194
13348
|
function Radio({ label, options, onChange, value }) {
|
|
13195
|
-
const { t } =
|
|
13349
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13196
13350
|
const [search, setSearch] = React8.useState("");
|
|
13197
|
-
const [buttonRef, popoverWidth] =
|
|
13351
|
+
const [buttonRef, popoverWidth] = chunkP4SL4PTY_cjs.usePopoverWidth();
|
|
13198
13352
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
13199
13353
|
const selected = React8.useMemo(
|
|
13200
13354
|
() => options.find((item) => item.value === value) || null,
|
|
@@ -13369,7 +13523,7 @@ var TablePagination = React8__namespace.forwardRef(
|
|
|
13369
13523
|
className,
|
|
13370
13524
|
...props
|
|
13371
13525
|
}, ref) => {
|
|
13372
|
-
const { t } =
|
|
13526
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13373
13527
|
const canPrev = pageIndex > 0;
|
|
13374
13528
|
const canNext = pageIndex < pageCount - 1;
|
|
13375
13529
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13525,7 +13679,7 @@ var FilterToolBarMobileView = ({
|
|
|
13525
13679
|
showReset,
|
|
13526
13680
|
onReset
|
|
13527
13681
|
}) => {
|
|
13528
|
-
const { t } =
|
|
13682
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13529
13683
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 md:hidden", children: [
|
|
13530
13684
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 max-w-72 flex-1", children: Components[0] }),
|
|
13531
13685
|
Components.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
@@ -13591,7 +13745,7 @@ var FilterToolbar = ({
|
|
|
13591
13745
|
}
|
|
13592
13746
|
);
|
|
13593
13747
|
});
|
|
13594
|
-
const showReset = !hideGlobalResetButton && !
|
|
13748
|
+
const showReset = !hideGlobalResetButton && !chunkAIUUCMAI_cjs.deepEqual(initialValuesRef.current, values);
|
|
13595
13749
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13596
13750
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13597
13751
|
FilterToolbarDesktopView,
|
|
@@ -13657,7 +13811,7 @@ function DataTable(props) {
|
|
|
13657
13811
|
tableOptions,
|
|
13658
13812
|
renderHeaderCell
|
|
13659
13813
|
} = props;
|
|
13660
|
-
const { t } =
|
|
13814
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13661
13815
|
const sortNamespace = "sortNamespace" in props ? props.sortNamespace : void 0;
|
|
13662
13816
|
const defaultSortValue = "defaultSortValue" in props ? props.defaultSortValue : void 0;
|
|
13663
13817
|
const ns = sortNamespace ?? "dt";
|
|
@@ -13755,7 +13909,7 @@ var TablePagination2 = React8__namespace.forwardRef(
|
|
|
13755
13909
|
className,
|
|
13756
13910
|
...props
|
|
13757
13911
|
}, ref) => {
|
|
13758
|
-
const { t } =
|
|
13912
|
+
const { t } = chunkOPMWK5SY_cjs.useT("genesis.shared");
|
|
13759
13913
|
const canPrev = pageIndex > 0;
|
|
13760
13914
|
const canNext = pageIndex < pageCount - 1;
|
|
13761
13915
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14203,5 +14357,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
|
|
|
14203
14357
|
exports.useRightSidePanel = useRightSidePanel;
|
|
14204
14358
|
exports.useSortQueryParams = useSortQueryParams;
|
|
14205
14359
|
exports.useWizardStepper = useWizardStepper;
|
|
14206
|
-
//# sourceMappingURL=chunk-
|
|
14207
|
-
//# sourceMappingURL=chunk-
|
|
14360
|
+
//# sourceMappingURL=chunk-ZVYSSUHO.cjs.map
|
|
14361
|
+
//# sourceMappingURL=chunk-ZVYSSUHO.cjs.map
|