@seliseblocks/genesis-os 4.4.2 → 4.4.4
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/{chunk-MYTS3R4F.cjs → chunk-2BZ2C4TS.cjs} +206 -112
- package/dist/chunk-2BZ2C4TS.cjs.map +1 -0
- package/dist/{chunk-3EGBCU4W.cjs → chunk-AD2ZGEQ5.cjs} +227 -78
- package/dist/chunk-AD2ZGEQ5.cjs.map +1 -0
- package/dist/{chunk-M3VJ7FLT.js → chunk-EKAGSVC7.js} +200 -55
- package/dist/chunk-EKAGSVC7.js.map +1 -0
- package/dist/{chunk-VAWEXEJZ.cjs → chunk-I2KRZLP4.cjs} +184 -7
- package/dist/chunk-I2KRZLP4.cjs.map +1 -0
- package/dist/{chunk-SG6FH72W.js → chunk-R7WBG4YN.js} +183 -8
- package/dist/chunk-R7WBG4YN.js.map +1 -0
- package/dist/{chunk-QH7AVUL7.js → chunk-VSLB4SJE.js} +115 -21
- package/dist/chunk-VSLB4SJE.js.map +1 -0
- package/dist/components/index.cjs +342 -342
- package/dist/components/index.js +3 -3
- package/dist/guards/index.cjs +9 -9
- package/dist/guards/index.js +3 -3
- package/dist/hooks/index.cjs +68 -56
- package/dist/hooks/index.d.cts +30 -2
- package/dist/hooks/index.d.ts +30 -2
- package/dist/hooks/index.js +2 -2
- package/dist/index.cjs +455 -435
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/layouts/index.cjs +10 -10
- package/dist/layouts/index.js +3 -3
- package/dist/lib/index.cjs +30 -22
- package/dist/lib/index.d.cts +38 -3
- package/dist/lib/index.d.ts +38 -3
- package/dist/lib/index.js +1 -1
- package/dist/observability/index.d.cts +1 -1
- package/dist/observability/index.d.ts +1 -1
- package/dist/pages/index.cjs +8 -8
- package/dist/pages/index.js +3 -3
- package/dist/{types-CxmwyESB.d.cts → types-CQX9_ck-.d.cts} +21 -1
- package/dist/{types-R-boAdbM.d.ts → types-D9odiLzd.d.ts} +21 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3EGBCU4W.cjs.map +0 -1
- package/dist/chunk-M3VJ7FLT.js.map +0 -1
- package/dist/chunk-MYTS3R4F.cjs.map +0 -1
- package/dist/chunk-QH7AVUL7.js.map +0 -1
- package/dist/chunk-SG6FH72W.js.map +0 -1
- package/dist/chunk-VAWEXEJZ.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkAD2ZGEQ5_cjs = require('./chunk-AD2ZGEQ5.cjs');
|
|
5
5
|
var chunkQTSTAWK3_cjs = require('./chunk-QTSTAWK3.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkI2KRZLP4_cjs = require('./chunk-I2KRZLP4.cjs');
|
|
7
7
|
var chunkX4YCRWXO_cjs = require('./chunk-X4YCRWXO.cjs');
|
|
8
8
|
var chunkIJMKS4XG_cjs = require('./chunk-IJMKS4XG.cjs');
|
|
9
9
|
var chunkBPJM3L7O_cjs = require('./chunk-BPJM3L7O.cjs');
|
|
@@ -1523,7 +1523,7 @@ function RightSidePanelProvider({
|
|
|
1523
1523
|
const close = React8__namespace.useCallback(() => {
|
|
1524
1524
|
setOpen(false);
|
|
1525
1525
|
}, [setOpen]);
|
|
1526
|
-
|
|
1526
|
+
chunkAD2ZGEQ5_cjs.useKeyboardShortcut(shortcut, toggle);
|
|
1527
1527
|
React8__namespace.useEffect(() => {
|
|
1528
1528
|
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1529
1529
|
const handleHashChange = () => {
|
|
@@ -2388,7 +2388,7 @@ var WizardStepIndicator = ({
|
|
|
2388
2388
|
color: indicatorColor,
|
|
2389
2389
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "transparent"
|
|
2390
2390
|
},
|
|
2391
|
-
transition:
|
|
2391
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2392
2392
|
className: chunkYAF2X7W5_cjs.cn(
|
|
2393
2393
|
"flex size-8 items-center justify-center rounded-full border text-lg font-bold",
|
|
2394
2394
|
className
|
|
@@ -2399,7 +2399,7 @@ var WizardStepIndicator = ({
|
|
|
2399
2399
|
initial: { scale: 0, opacity: 0 },
|
|
2400
2400
|
animate: { scale: 1, opacity: 1 },
|
|
2401
2401
|
exit: { scale: 0, opacity: 0 },
|
|
2402
|
-
transition:
|
|
2402
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2403
2403
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-[18px]", "aria-hidden": true })
|
|
2404
2404
|
},
|
|
2405
2405
|
"check"
|
|
@@ -2409,7 +2409,7 @@ var WizardStepIndicator = ({
|
|
|
2409
2409
|
initial: { scale: 0.8, opacity: 0 },
|
|
2410
2410
|
animate: { scale: 1, opacity: 1 },
|
|
2411
2411
|
exit: { scale: 0.8, opacity: 0 },
|
|
2412
|
-
transition:
|
|
2412
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2413
2413
|
children: stepNumber
|
|
2414
2414
|
},
|
|
2415
2415
|
"number"
|
|
@@ -2420,7 +2420,7 @@ var WizardStepIndicator = ({
|
|
|
2420
2420
|
var WizardVerticalTrackBar = () => {
|
|
2421
2421
|
const { currentStep, totalSteps, goToStep, completedSteps, getSteps } = useWizardStepper();
|
|
2422
2422
|
const steps = getSteps();
|
|
2423
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition:
|
|
2423
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { layout: true, transition: chunkI2KRZLP4_cjs.fadeTransition, children: steps.map((step, index) => {
|
|
2424
2424
|
const stepNumber = index + 1;
|
|
2425
2425
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
2426
2426
|
const isCurrent = currentStep === stepNumber;
|
|
@@ -2434,7 +2434,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2434
2434
|
{
|
|
2435
2435
|
layout: true,
|
|
2436
2436
|
className: "flex items-center gap-2",
|
|
2437
|
-
transition:
|
|
2437
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2438
2438
|
children: [
|
|
2439
2439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2440
2440
|
Button,
|
|
@@ -2461,7 +2461,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2461
2461
|
animate: {
|
|
2462
2462
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2463
2463
|
},
|
|
2464
|
-
transition:
|
|
2464
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2465
2465
|
className: "ml-4 text-base font-medium",
|
|
2466
2466
|
children: step.title
|
|
2467
2467
|
}
|
|
@@ -2478,7 +2478,7 @@ var WizardVerticalTrackBar = () => {
|
|
|
2478
2478
|
scaleY: isCompleted ? 1 : 0.35,
|
|
2479
2479
|
backgroundColor: isCompleted ? "hsl(var(--foreground))" : "hsl(var(--border))"
|
|
2480
2480
|
},
|
|
2481
|
-
transition:
|
|
2481
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition
|
|
2482
2482
|
}
|
|
2483
2483
|
) : null
|
|
2484
2484
|
]
|
|
@@ -2495,7 +2495,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2495
2495
|
{
|
|
2496
2496
|
layout: true,
|
|
2497
2497
|
className: "flex w-full flex-row flex-wrap justify-between",
|
|
2498
|
-
transition:
|
|
2498
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2499
2499
|
children: steps.map((step, index) => {
|
|
2500
2500
|
const stepNumber = index + 1;
|
|
2501
2501
|
const isCompleted = completedSteps.includes(stepNumber);
|
|
@@ -2534,7 +2534,7 @@ var WizardHorizontalTrackBar = () => {
|
|
|
2534
2534
|
animate: {
|
|
2535
2535
|
color: isCurrent || isCompleted ? "hsl(var(--foreground))" : "hsl(var(--muted-foreground))"
|
|
2536
2536
|
},
|
|
2537
|
-
transition:
|
|
2537
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2538
2538
|
className: "hidden md:block",
|
|
2539
2539
|
children: step.title
|
|
2540
2540
|
}
|
|
@@ -2555,11 +2555,11 @@ var WizardStepViewport = ({
|
|
|
2555
2555
|
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
2556
|
framerMotion.motion.div,
|
|
2557
2557
|
{
|
|
2558
|
-
variants:
|
|
2558
|
+
variants: chunkI2KRZLP4_cjs.fadeInUp,
|
|
2559
2559
|
initial: "initial",
|
|
2560
2560
|
animate: "animate",
|
|
2561
2561
|
exit: "exit",
|
|
2562
|
-
transition:
|
|
2562
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
2563
2563
|
className,
|
|
2564
2564
|
children
|
|
2565
2565
|
},
|
|
@@ -3499,7 +3499,7 @@ function MultiSelect({
|
|
|
3499
3499
|
onChange,
|
|
3500
3500
|
value: selectedValues
|
|
3501
3501
|
}) {
|
|
3502
|
-
const [buttonRef, popoverWidth] =
|
|
3502
|
+
const [buttonRef, popoverWidth] = chunkAD2ZGEQ5_cjs.usePopoverWidth();
|
|
3503
3503
|
const onSelectHandler = (value) => {
|
|
3504
3504
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
3505
3505
|
onChange(nextValues);
|
|
@@ -3815,7 +3815,7 @@ var CopyToClipboardButton = ({
|
|
|
3815
3815
|
),
|
|
3816
3816
|
initial: false,
|
|
3817
3817
|
animate: { opacity: isHoverable ? void 0 : 1 },
|
|
3818
|
-
transition:
|
|
3818
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
3819
3819
|
children: [
|
|
3820
3820
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3821
3821
|
Button,
|
|
@@ -3832,7 +3832,7 @@ var CopyToClipboardButton = ({
|
|
|
3832
3832
|
initial: { scale: 0.6, opacity: 0 },
|
|
3833
3833
|
animate: { scale: 1, opacity: 1 },
|
|
3834
3834
|
exit: { scale: 0.6, opacity: 0 },
|
|
3835
|
-
transition:
|
|
3835
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
3836
3836
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3837
3837
|
lucideReact.Check,
|
|
3838
3838
|
{
|
|
@@ -3848,7 +3848,7 @@ var CopyToClipboardButton = ({
|
|
|
3848
3848
|
initial: { scale: 0.6, opacity: 0 },
|
|
3849
3849
|
animate: { scale: 1, opacity: 1 },
|
|
3850
3850
|
exit: { scale: 0.6, opacity: 0 },
|
|
3851
|
-
transition:
|
|
3851
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
3852
3852
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4 text-muted-foreground", "aria-hidden": true })
|
|
3853
3853
|
},
|
|
3854
3854
|
"copy"
|
|
@@ -3861,7 +3861,7 @@ var CopyToClipboardButton = ({
|
|
|
3861
3861
|
layout: true,
|
|
3862
3862
|
className: "pointer-events-none absolute left-8 top-1/2 z-10 hidden -translate-y-1/2 whitespace-nowrap rounded bg-popover px-2 py-1 text-xs text-popover-foreground shadow-md peer-hover:block",
|
|
3863
3863
|
animate: { opacity: isCopying ? 1 : 0.9 },
|
|
3864
|
-
transition:
|
|
3864
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
3865
3865
|
children: isCopying ? copiedLabel : copyLabel
|
|
3866
3866
|
}
|
|
3867
3867
|
)
|
|
@@ -5228,7 +5228,7 @@ var InfiniteScroller = ({
|
|
|
5228
5228
|
initial: { opacity: 0, height: 0 },
|
|
5229
5229
|
animate: { opacity: 1, height: "auto" },
|
|
5230
5230
|
exit: { opacity: 0, height: 0 },
|
|
5231
|
-
transition:
|
|
5231
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
5232
5232
|
children: loadingIndicator
|
|
5233
5233
|
},
|
|
5234
5234
|
"loading"
|
|
@@ -5239,10 +5239,10 @@ var InfiniteScroller = ({
|
|
|
5239
5239
|
framerMotion.motion.div,
|
|
5240
5240
|
{
|
|
5241
5241
|
layout: true,
|
|
5242
|
-
variants:
|
|
5242
|
+
variants: chunkI2KRZLP4_cjs.fadeInUp,
|
|
5243
5243
|
initial: "initial",
|
|
5244
5244
|
animate: "animate",
|
|
5245
|
-
transition:
|
|
5245
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
5246
5246
|
children: renderItem(item, index)
|
|
5247
5247
|
},
|
|
5248
5248
|
key
|
|
@@ -5254,7 +5254,7 @@ var InfiniteScroller = ({
|
|
|
5254
5254
|
className: "flex h-full items-center justify-center text-muted-foreground",
|
|
5255
5255
|
initial: { opacity: 0 },
|
|
5256
5256
|
animate: { opacity: 1 },
|
|
5257
|
-
transition:
|
|
5257
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
5258
5258
|
children: emptyContent ?? "No items"
|
|
5259
5259
|
}
|
|
5260
5260
|
) }),
|
|
@@ -5265,7 +5265,7 @@ var InfiniteScroller = ({
|
|
|
5265
5265
|
initial: { opacity: 0, y: 16 },
|
|
5266
5266
|
animate: { opacity: 1, y: 0 },
|
|
5267
5267
|
exit: { opacity: 0, y: 12 },
|
|
5268
|
-
transition:
|
|
5268
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
5269
5269
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5270
5270
|
framerMotion.motion.div,
|
|
5271
5271
|
{
|
|
@@ -5903,14 +5903,14 @@ var Timeline = ({
|
|
|
5903
5903
|
framerMotion.motion.div,
|
|
5904
5904
|
{
|
|
5905
5905
|
className: chunkYAF2X7W5_cjs.cn("mt-4 flex flex-col items-start md:mt-5", className),
|
|
5906
|
-
variants:
|
|
5906
|
+
variants: chunkI2KRZLP4_cjs.staggerContainer,
|
|
5907
5907
|
initial: "initial",
|
|
5908
5908
|
animate: "animate",
|
|
5909
5909
|
children: events.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5910
5910
|
framerMotion.motion.div,
|
|
5911
5911
|
{
|
|
5912
|
-
variants:
|
|
5913
|
-
transition:
|
|
5912
|
+
variants: chunkI2KRZLP4_cjs.staggerItem,
|
|
5913
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
5914
5914
|
className: "flex min-h-[66px] w-full",
|
|
5915
5915
|
children: [
|
|
5916
5916
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYAF2X7W5_cjs.cn("relative", isMobile ? "w-[30%]" : "w-[16%]"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5919,7 +5919,7 @@ var Timeline = ({
|
|
|
5919
5919
|
className: "absolute -top-1.5 w-full pr-[18px] text-right md:pr-5",
|
|
5920
5920
|
initial: { opacity: 0, x: -6 },
|
|
5921
5921
|
animate: { opacity: 1, x: 0 },
|
|
5922
|
-
transition: { ...
|
|
5922
|
+
transition: { ...chunkI2KRZLP4_cjs.fadeTransition, delay: index * 0.05 },
|
|
5923
5923
|
children: leftContent ? leftContent(event) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5924
5924
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.time }),
|
|
5925
5925
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs font-medium leading-5 md:text-sm", children: event.date })
|
|
@@ -5936,7 +5936,7 @@ var Timeline = ({
|
|
|
5936
5936
|
),
|
|
5937
5937
|
initial: { scaleY: 0 },
|
|
5938
5938
|
animate: { scaleY: 1 },
|
|
5939
|
-
transition: { ...
|
|
5939
|
+
transition: { ...chunkI2KRZLP4_cjs.fadeTransition, delay: index * 0.05 }
|
|
5940
5940
|
}
|
|
5941
5941
|
) : null,
|
|
5942
5942
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5945,7 +5945,7 @@ var Timeline = ({
|
|
|
5945
5945
|
className: "bg-primary relative z-10 size-4 rounded-full",
|
|
5946
5946
|
initial: { scale: 0 },
|
|
5947
5947
|
animate: { scale: 1 },
|
|
5948
|
-
transition: { ...
|
|
5948
|
+
transition: { ...chunkI2KRZLP4_cjs.fadeTransition, delay: index * 0.05 + 0.04 }
|
|
5949
5949
|
}
|
|
5950
5950
|
)
|
|
5951
5951
|
] }),
|
|
@@ -5998,11 +5998,11 @@ var ImportFileModalContent = ({
|
|
|
5998
5998
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: chunkYAF2X7W5_cjs.cn("rounded-md sm:max-w-[450px]", className), children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: !showConfirmation ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5999
5999
|
framerMotion.motion.div,
|
|
6000
6000
|
{
|
|
6001
|
-
variants:
|
|
6001
|
+
variants: chunkI2KRZLP4_cjs.fadeInScale,
|
|
6002
6002
|
initial: "initial",
|
|
6003
6003
|
animate: "animate",
|
|
6004
6004
|
exit: "exit",
|
|
6005
|
-
transition:
|
|
6005
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
6006
6006
|
children: [
|
|
6007
6007
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6008
6008
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: dialogTitle }),
|
|
@@ -6014,7 +6014,7 @@ var ImportFileModalContent = ({
|
|
|
6014
6014
|
className: "flex flex-col rounded-md bg-muted/50 px-3 py-2",
|
|
6015
6015
|
initial: { opacity: 0, y: 6 },
|
|
6016
6016
|
animate: { opacity: 1, y: 0 },
|
|
6017
|
-
transition: { ...
|
|
6017
|
+
transition: { ...chunkI2KRZLP4_cjs.fadeTransition, delay: 0.05 },
|
|
6018
6018
|
children: [
|
|
6019
6019
|
/* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.div, { className: "flex flex-row items-center", children: [
|
|
6020
6020
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6051,7 +6051,7 @@ var ImportFileModalContent = ({
|
|
|
6051
6051
|
initial: { opacity: 0, x: -8 },
|
|
6052
6052
|
animate: { opacity: 1, x: 0 },
|
|
6053
6053
|
exit: { opacity: 0, x: 8 },
|
|
6054
|
-
transition:
|
|
6054
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
6055
6055
|
children: /* @__PURE__ */ jsxRuntime.jsxs(FileUploaderItem, { index, children: [
|
|
6056
6056
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6057
6057
|
lucideReact.Paperclip,
|
|
@@ -6101,11 +6101,11 @@ var ImportFileModalContent = ({
|
|
|
6101
6101
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6102
6102
|
framerMotion.motion.div,
|
|
6103
6103
|
{
|
|
6104
|
-
variants:
|
|
6104
|
+
variants: chunkI2KRZLP4_cjs.fadeInScale,
|
|
6105
6105
|
initial: "initial",
|
|
6106
6106
|
animate: "animate",
|
|
6107
6107
|
exit: "exit",
|
|
6108
|
-
transition:
|
|
6108
|
+
transition: chunkI2KRZLP4_cjs.fadeTransition,
|
|
6109
6109
|
children: [
|
|
6110
6110
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
6111
6111
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-left", children: processingTitle }),
|
|
@@ -6701,7 +6701,7 @@ function useAppRedirectUrls({
|
|
|
6701
6701
|
queries: requests.map(
|
|
6702
6702
|
({ clientId, redirectUri, forwardedTo, queryKey }) => ({
|
|
6703
6703
|
queryKey,
|
|
6704
|
-
queryFn: ({ signal }) =>
|
|
6704
|
+
queryFn: ({ signal }) => chunkAD2ZGEQ5_cjs.initiateService.fetchRedirectUrl(
|
|
6705
6705
|
{ clientId, redirectUri, forwardedTo },
|
|
6706
6706
|
signal
|
|
6707
6707
|
),
|
|
@@ -6740,7 +6740,7 @@ function useAppRedirectUrls({
|
|
|
6740
6740
|
}
|
|
6741
6741
|
var AppSwitcher = ({ forwardedTo }) => {
|
|
6742
6742
|
const [open, setOpen] = React8.useState(false);
|
|
6743
|
-
const config =
|
|
6743
|
+
const config = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
6744
6744
|
const filteredApps = React8.useMemo(
|
|
6745
6745
|
() => filteredAppSwitcherData.filter((app) => app.id !== config.name),
|
|
6746
6746
|
[config.name]
|
|
@@ -6779,7 +6779,7 @@ function ThemeSwitcher({
|
|
|
6779
6779
|
className,
|
|
6780
6780
|
showChevron = true
|
|
6781
6781
|
} = {}) {
|
|
6782
|
-
const { theme, setTheme } =
|
|
6782
|
+
const { theme, setTheme } = chunkAD2ZGEQ5_cjs.useTheme();
|
|
6783
6783
|
const { Icon: ThemeIcon } = OPTIONS[theme];
|
|
6784
6784
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6785
6785
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6847,7 +6847,7 @@ function ThemeSwitcher({
|
|
|
6847
6847
|
// src/services/user.service.ts
|
|
6848
6848
|
var UserService = class {
|
|
6849
6849
|
async getUserInfo() {
|
|
6850
|
-
return
|
|
6850
|
+
return chunkI2KRZLP4_cjs.iamClient.get(`${chunkI2KRZLP4_cjs.PROFILE_ENDPOINTS.ME}`);
|
|
6851
6851
|
}
|
|
6852
6852
|
};
|
|
6853
6853
|
var userService = new UserService();
|
|
@@ -6889,14 +6889,14 @@ function UserAvatar({ size = "sm" }) {
|
|
|
6889
6889
|
);
|
|
6890
6890
|
}
|
|
6891
6891
|
function UserDropdownMenu() {
|
|
6892
|
-
const { name } =
|
|
6892
|
+
const { name } = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
6893
6893
|
const { data } = useGetUserInfo();
|
|
6894
6894
|
const userData = data?.data;
|
|
6895
|
-
const { isPending, mutateAsync } =
|
|
6895
|
+
const { isPending, mutateAsync } = chunkAD2ZGEQ5_cjs.useLogout();
|
|
6896
6896
|
const { resetProjectStore } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
6897
6897
|
const { setUnAuthenticated, clearTokens } = chunk6GCU5LM7_cjs.useAuthStore();
|
|
6898
6898
|
const { resetSelectedLanguages } = chunk4QN4CYSC_cjs.useLanguageViewStore();
|
|
6899
|
-
const { data: myOrgsData, isLoading: isOrgsLoading } =
|
|
6899
|
+
const { data: myOrgsData, isLoading: isOrgsLoading } = chunkAD2ZGEQ5_cjs.useGetMyOrganizations();
|
|
6900
6900
|
const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
|
|
6901
6901
|
const email = userData?.email || "";
|
|
6902
6902
|
const roles = Object.values(userData?.roles || {}).flat();
|
|
@@ -7026,7 +7026,7 @@ var languages = [
|
|
|
7026
7026
|
{ key: "fr", title: "French" }
|
|
7027
7027
|
];
|
|
7028
7028
|
function LanguageSelector() {
|
|
7029
|
-
const { changeLanguage, language } =
|
|
7029
|
+
const { changeLanguage, language } = chunkAD2ZGEQ5_cjs.useLanguageSwitcher();
|
|
7030
7030
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
7031
7031
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7032
7032
|
"button",
|
|
@@ -7113,7 +7113,9 @@ var NotificationListenerService = class {
|
|
|
7113
7113
|
this.connection = new signalr.HubConnectionBuilder().withUrl(
|
|
7114
7114
|
`${logicOrigin()}/api/NotificationHub?x-blocks-key=${chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_X_BLOCKS_KEY")}`,
|
|
7115
7115
|
{
|
|
7116
|
-
transport: signalr.HttpTransportType.WebSockets
|
|
7116
|
+
transport: signalr.HttpTransportType.WebSockets,
|
|
7117
|
+
// One request opens the socket, so it cannot split across Api pods without sticky sessions.
|
|
7118
|
+
skipNegotiation: true
|
|
7117
7119
|
}
|
|
7118
7120
|
).withAutomaticReconnect().build();
|
|
7119
7121
|
this.connection.onclose(() => {
|
|
@@ -7162,7 +7164,7 @@ var NotificationListenerService = class {
|
|
|
7162
7164
|
if (refreshLogin && navigator.onLine === false) return;
|
|
7163
7165
|
try {
|
|
7164
7166
|
if (refreshLogin)
|
|
7165
|
-
await refreshLoginCall(
|
|
7167
|
+
await refreshLoginCall(chunkAD2ZGEQ5_cjs.notificationService.getNotifications(1, 1));
|
|
7166
7168
|
if (!this.wanted) return;
|
|
7167
7169
|
await this.connection.start();
|
|
7168
7170
|
this.attempt = 0;
|
|
@@ -7187,7 +7189,7 @@ var notificationListenerService = new NotificationListenerService();
|
|
|
7187
7189
|
|
|
7188
7190
|
// src/components/common/notification/use-notification-socket.ts
|
|
7189
7191
|
function useNotificationSocket() {
|
|
7190
|
-
const { data: configData } =
|
|
7192
|
+
const { data: configData } = chunkAD2ZGEQ5_cjs.useGetBlocksNotificationConfig(0, 100);
|
|
7191
7193
|
const queryClient = reactQuery.useQueryClient();
|
|
7192
7194
|
notificationListenerService.connect();
|
|
7193
7195
|
React8.useEffect(() => {
|
|
@@ -7202,7 +7204,7 @@ function useNotificationSocket() {
|
|
|
7202
7204
|
notificationListenerService.connection.on(
|
|
7203
7205
|
config.notifyMethod,
|
|
7204
7206
|
(message) => {
|
|
7205
|
-
|
|
7207
|
+
chunkAD2ZGEQ5_cjs.notificationService.getNotificationConfig(config, message);
|
|
7206
7208
|
try {
|
|
7207
7209
|
const notice = typeof message === "string" ? JSON.parse(message) : message;
|
|
7208
7210
|
const denom = JSON.parse(
|
|
@@ -7226,12 +7228,12 @@ function useNotificationFeed(open) {
|
|
|
7226
7228
|
const [notifications, setNotifications] = React8.useState([]);
|
|
7227
7229
|
const [hasMore, setHasMore] = React8.useState(true);
|
|
7228
7230
|
const listRef = React8.useRef(null);
|
|
7229
|
-
const { data, isLoading, isFetching } =
|
|
7231
|
+
const { data, isLoading, isFetching } = chunkAD2ZGEQ5_cjs.useGetNotifications(
|
|
7230
7232
|
pageNumber,
|
|
7231
7233
|
PAGE_SIZE
|
|
7232
7234
|
);
|
|
7233
|
-
const markAsRead =
|
|
7234
|
-
const markAllAsRead =
|
|
7235
|
+
const markAsRead = chunkAD2ZGEQ5_cjs.useMarkAsRead();
|
|
7236
|
+
const markAllAsRead = chunkAD2ZGEQ5_cjs.useMarkAllAsRead();
|
|
7235
7237
|
React8.useEffect(() => {
|
|
7236
7238
|
if (!data?.notifications) return;
|
|
7237
7239
|
setNotifications((prev) => {
|
|
@@ -7465,7 +7467,7 @@ function ConsoleHeader() {
|
|
|
7465
7467
|
window.addEventListener("scroll", handleScroll);
|
|
7466
7468
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
7467
7469
|
}, []);
|
|
7468
|
-
const { appLightLogo, appDarkLogo } =
|
|
7470
|
+
const { appLightLogo, appDarkLogo } = chunkAD2ZGEQ5_cjs.useLogo();
|
|
7469
7471
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7470
7472
|
"div",
|
|
7471
7473
|
{
|
|
@@ -7644,7 +7646,7 @@ var EnvironmentCard = ({
|
|
|
7644
7646
|
className
|
|
7645
7647
|
}) => {
|
|
7646
7648
|
const { setSelectedProject, setTenantGroup } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
7647
|
-
const { mutateAsync } =
|
|
7649
|
+
const { mutateAsync } = chunkAD2ZGEQ5_cjs.useStartImpersonation();
|
|
7648
7650
|
const navigate = reactRouter.useNavigate();
|
|
7649
7651
|
const handleCardClick = async () => {
|
|
7650
7652
|
try {
|
|
@@ -7698,11 +7700,11 @@ function EnvironmentList({
|
|
|
7698
7700
|
}) {
|
|
7699
7701
|
const navigate = reactRouter.useNavigate();
|
|
7700
7702
|
const { pathname } = reactRouter.useLocation();
|
|
7701
|
-
const { data: projectGroups = [], isLoading } =
|
|
7703
|
+
const { data: projectGroups = [], isLoading } = chunkAD2ZGEQ5_cjs.useGetProjects({
|
|
7702
7704
|
enabled: true
|
|
7703
7705
|
});
|
|
7704
7706
|
const { selectedProject, setSelectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
7705
|
-
const { data: projectData } =
|
|
7707
|
+
const { data: projectData } = chunkAD2ZGEQ5_cjs.useGetProject();
|
|
7706
7708
|
const pendingProjectRef = React8.useRef(null);
|
|
7707
7709
|
const redirectRegexMap = React8.useMemo(
|
|
7708
7710
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -7835,8 +7837,19 @@ function ProtectedGuard({
|
|
|
7835
7837
|
React8.useEffect(() => {
|
|
7836
7838
|
if (!isAuthenticated) navigate(defaultPublicPath);
|
|
7837
7839
|
}, [isAuthenticated, defaultPublicPath, navigate]);
|
|
7840
|
+
React8.useEffect(
|
|
7841
|
+
() => chunkI2KRZLP4_cjs.subscribeToSignOut(
|
|
7842
|
+
() => window.location.replace(
|
|
7843
|
+
`${window.location.origin}${defaultPublicPath}`
|
|
7844
|
+
)
|
|
7845
|
+
),
|
|
7846
|
+
[defaultPublicPath]
|
|
7847
|
+
);
|
|
7838
7848
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
7839
7849
|
}
|
|
7850
|
+
|
|
7851
|
+
// src/guards/sign-in-callback.ts
|
|
7852
|
+
var isSignInCallbackPath = (pathname) => /^\/login\/callback\/?$/.test(pathname);
|
|
7840
7853
|
var useAppState = () => {
|
|
7841
7854
|
const [isMounted, setIsMounted] = React8.useState(false);
|
|
7842
7855
|
React8.useEffect(() => {
|
|
@@ -7851,10 +7864,18 @@ function PublicGuard({
|
|
|
7851
7864
|
const { isAuthenticated } = chunk6GCU5LM7_cjs.useAuthStore();
|
|
7852
7865
|
const { isMounted } = useAppState();
|
|
7853
7866
|
const navigate = reactRouter.useNavigate();
|
|
7867
|
+
const { pathname } = reactRouter.useLocation();
|
|
7868
|
+
const isCompletingSignIn = isSignInCallbackPath(pathname);
|
|
7854
7869
|
React8.useEffect(() => {
|
|
7855
|
-
if (!isMounted) return;
|
|
7870
|
+
if (!isMounted || isCompletingSignIn) return;
|
|
7856
7871
|
if (isAuthenticated) navigate(defaultProtectedPath, { replace: true });
|
|
7857
|
-
}, [
|
|
7872
|
+
}, [
|
|
7873
|
+
isAuthenticated,
|
|
7874
|
+
isMounted,
|
|
7875
|
+
isCompletingSignIn,
|
|
7876
|
+
navigate,
|
|
7877
|
+
defaultProtectedPath
|
|
7878
|
+
]);
|
|
7858
7879
|
if (!isMounted) return null;
|
|
7859
7880
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
7860
7881
|
}
|
|
@@ -7864,9 +7885,10 @@ function AuthResolver({ children }) {
|
|
|
7864
7885
|
React8.useEffect(() => {
|
|
7865
7886
|
if (hasResolved.current) return;
|
|
7866
7887
|
hasResolved.current = true;
|
|
7888
|
+
if (isSignInCallbackPath(window.location.pathname)) return;
|
|
7867
7889
|
async function resolve() {
|
|
7868
7890
|
try {
|
|
7869
|
-
const res = await
|
|
7891
|
+
const res = await chunkI2KRZLP4_cjs.iamClient.get(`${chunkI2KRZLP4_cjs.AUTH_ENDPOINTS.ME}`);
|
|
7870
7892
|
setUser(res);
|
|
7871
7893
|
setAuthenticated();
|
|
7872
7894
|
} catch {
|
|
@@ -7947,6 +7969,11 @@ var AppLoadingSpinner = ({ size = 64 }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
|
|
|
7947
7969
|
] });
|
|
7948
7970
|
var projectNameFor = (projects, tenantId) => tenantId && projects.find((p) => p.tenantId === tenantId)?.name || null;
|
|
7949
7971
|
var claimKeyOf = (claim) => claim ? `${claim.tabId}|${claim.tenantId}|${claim.ts}` : null;
|
|
7972
|
+
var SESSION_ENDED_CODES = /* @__PURE__ */ new Set([
|
|
7973
|
+
"invalid_refresh_token",
|
|
7974
|
+
"session_expired"
|
|
7975
|
+
]);
|
|
7976
|
+
var isSessionEnded = (error) => error instanceof chunkX4YCRWXO_cjs.HttpError && error.status === 401 && SESSION_ENDED_CODES.has(String(error.errors?.error ?? ""));
|
|
7950
7977
|
var useLiveOwnerProbe = ({
|
|
7951
7978
|
cookieTenantId,
|
|
7952
7979
|
ownTenantId,
|
|
@@ -7956,8 +7983,8 @@ var useLiveOwnerProbe = ({
|
|
|
7956
7983
|
if (!cookieTenantId || !ownTenantId || cookieTenantId === ownTenantId) {
|
|
7957
7984
|
return null;
|
|
7958
7985
|
}
|
|
7959
|
-
const owner =
|
|
7960
|
-
return owner && owner.tabId !==
|
|
7986
|
+
const owner = chunkI2KRZLP4_cjs.readCurrentOwner();
|
|
7987
|
+
return owner && owner.tabId !== chunkI2KRZLP4_cjs.TAB_ID && owner.tenantId === cookieTenantId ? owner : null;
|
|
7961
7988
|
}, [cookieTenantId, ownTenantId]);
|
|
7962
7989
|
const claimKey = claimKeyOf(foreignClaim);
|
|
7963
7990
|
const [probedKey, setProbedKey] = React8.useState(null);
|
|
@@ -7969,9 +7996,9 @@ var useLiveOwnerProbe = ({
|
|
|
7969
7996
|
const claim = foreignClaimRef.current;
|
|
7970
7997
|
if (!claim || !claimKey) return;
|
|
7971
7998
|
let cancelled = false;
|
|
7972
|
-
void
|
|
7999
|
+
void chunkI2KRZLP4_cjs.isTenantHeldElsewhere(claim.tenantId).then((held) => {
|
|
7973
8000
|
if (cancelled) return;
|
|
7974
|
-
if (held &&
|
|
8001
|
+
if (held && chunkI2KRZLP4_cjs.isSameClaim(chunkI2KRZLP4_cjs.readCurrentOwner(), claim)) {
|
|
7975
8002
|
onHeldElsewhereRef.current(claim.tenantId);
|
|
7976
8003
|
}
|
|
7977
8004
|
setProbedKey(claimKey);
|
|
@@ -7985,8 +8012,10 @@ var useLiveOwnerProbe = ({
|
|
|
7985
8012
|
var ImpersonationChecker = ({
|
|
7986
8013
|
children
|
|
7987
8014
|
}) => {
|
|
7988
|
-
const { data
|
|
8015
|
+
const { data } = chunkAD2ZGEQ5_cjs.useImpersonationStatusChecker();
|
|
7989
8016
|
const { setImpersonation, isInitialized, setInitialized } = chunk4QN4CYSC_cjs.useImpersonateStore();
|
|
8017
|
+
chunkAD2ZGEQ5_cjs.useSessionTenantGuard();
|
|
8018
|
+
chunkAD2ZGEQ5_cjs.useStatusFirstOnTabReturn();
|
|
7990
8019
|
React8.useEffect(() => {
|
|
7991
8020
|
if (!data) return;
|
|
7992
8021
|
setImpersonation(
|
|
@@ -7996,7 +8025,7 @@ var ImpersonationChecker = ({
|
|
|
7996
8025
|
);
|
|
7997
8026
|
setInitialized(true);
|
|
7998
8027
|
}, [data, setImpersonation, setInitialized]);
|
|
7999
|
-
if (
|
|
8028
|
+
if (!data || !isInitialized) return null;
|
|
8000
8029
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
8001
8030
|
};
|
|
8002
8031
|
function ImpersonationBlocked({
|
|
@@ -8004,6 +8033,8 @@ function ImpersonationBlocked({
|
|
|
8004
8033
|
description,
|
|
8005
8034
|
primaryLabel,
|
|
8006
8035
|
onPrimary,
|
|
8036
|
+
secondaryLabel,
|
|
8037
|
+
onSecondary,
|
|
8007
8038
|
consolePath
|
|
8008
8039
|
}) {
|
|
8009
8040
|
const navigate = reactRouter.useNavigate();
|
|
@@ -8014,6 +8045,7 @@ function ImpersonationBlocked({
|
|
|
8014
8045
|
] }),
|
|
8015
8046
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
8016
8047
|
primaryLabel && onPrimary && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onPrimary, children: primaryLabel }),
|
|
8048
|
+
secondaryLabel && onSecondary && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: onSecondary, children: secondaryLabel }),
|
|
8017
8049
|
consolePath && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8018
8050
|
Button,
|
|
8019
8051
|
{
|
|
@@ -8042,8 +8074,8 @@ function ImpersonationTerminator({
|
|
|
8042
8074
|
detachedTenantId,
|
|
8043
8075
|
setDetached
|
|
8044
8076
|
} = chunk4QN4CYSC_cjs.useImpersonateStore();
|
|
8045
|
-
const { mutateAsync } =
|
|
8046
|
-
const recordClaimedTenant =
|
|
8077
|
+
const { mutateAsync } = chunkAD2ZGEQ5_cjs.useStopImpersonation();
|
|
8078
|
+
const recordClaimedTenant = chunkAD2ZGEQ5_cjs.useRecordClaimedTenant();
|
|
8047
8079
|
const { projects } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
8048
8080
|
const isTriggering = React8.useRef(false);
|
|
8049
8081
|
const [isTerminating, setIsTerminating] = React8.useState(false);
|
|
@@ -8055,7 +8087,7 @@ function ImpersonationTerminator({
|
|
|
8055
8087
|
});
|
|
8056
8088
|
React8.useEffect(() => {
|
|
8057
8089
|
if (!rootTenantId) return;
|
|
8058
|
-
return
|
|
8090
|
+
return chunkI2KRZLP4_cjs.subscribeToTenantClaims((claim) => {
|
|
8059
8091
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8060
8092
|
if (claim.tenantId === rootTenantId) {
|
|
8061
8093
|
setDetached(null);
|
|
@@ -8068,25 +8100,36 @@ function ImpersonationTerminator({
|
|
|
8068
8100
|
React8.useEffect(() => {
|
|
8069
8101
|
if (detachedReason === "console") setDetached(null);
|
|
8070
8102
|
}, [detachedReason, setDetached]);
|
|
8103
|
+
const [returnFailure, setReturnFailure] = React8.useState(
|
|
8104
|
+
null
|
|
8105
|
+
);
|
|
8106
|
+
const signOut = chunkAD2ZGEQ5_cjs.useSignOut();
|
|
8107
|
+
React8.useEffect(() => {
|
|
8108
|
+
if (!isImpersonated) setReturnFailure(null);
|
|
8109
|
+
}, [isImpersonated]);
|
|
8071
8110
|
React8.useEffect(() => {
|
|
8072
8111
|
if (isTriggering.current || !isImpersonated) return;
|
|
8073
8112
|
if (isDetached) return;
|
|
8074
8113
|
if (isProbingOwner) return;
|
|
8114
|
+
if (returnFailure) return;
|
|
8075
8115
|
isTriggering.current = true;
|
|
8076
8116
|
setIsTerminating(true);
|
|
8077
8117
|
const stopImpersonation = async () => {
|
|
8078
|
-
let sessionIsRootScoped = false;
|
|
8079
8118
|
try {
|
|
8080
|
-
await mutateAsync(void 0);
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8119
|
+
const { status, stopError } = await mutateAsync(void 0);
|
|
8120
|
+
if (!status.impersonated) {
|
|
8121
|
+
terminate(rootTenantId);
|
|
8122
|
+
if (rootTenantId) chunkI2KRZLP4_cjs.claimTenant(rootTenantId);
|
|
8123
|
+
return;
|
|
8085
8124
|
}
|
|
8086
|
-
|
|
8125
|
+
console.error("Error stopping impersonation:", stopError);
|
|
8126
|
+
setReturnFailure(
|
|
8127
|
+
isSessionEnded(stopError) ? "session-ended" : "unconfirmed"
|
|
8128
|
+
);
|
|
8129
|
+
} catch (error) {
|
|
8130
|
+
console.error("Error stopping impersonation:", error);
|
|
8131
|
+
setReturnFailure("unconfirmed");
|
|
8087
8132
|
} finally {
|
|
8088
|
-
terminate(rootTenantId);
|
|
8089
|
-
if (sessionIsRootScoped && rootTenantId) chunkVAWEXEJZ_cjs.claimTenant(rootTenantId);
|
|
8090
8133
|
isTriggering.current = false;
|
|
8091
8134
|
setIsTerminating(false);
|
|
8092
8135
|
}
|
|
@@ -8098,7 +8141,8 @@ function ImpersonationTerminator({
|
|
|
8098
8141
|
isImpersonated,
|
|
8099
8142
|
isDetached,
|
|
8100
8143
|
isProbingOwner,
|
|
8101
|
-
rootTenantId
|
|
8144
|
+
rootTenantId,
|
|
8145
|
+
returnFailure
|
|
8102
8146
|
]);
|
|
8103
8147
|
if (isDetached) {
|
|
8104
8148
|
const name = projectNameFor(projects, detachedTenantId);
|
|
@@ -8108,7 +8152,35 @@ function ImpersonationTerminator({
|
|
|
8108
8152
|
title: name ? `Your session is in ${name}` : "Your session is in a project",
|
|
8109
8153
|
description: "The project is open in another window. A session can only be in one place at a time.",
|
|
8110
8154
|
primaryLabel: name ? `Leave ${name}` : "Leave the project",
|
|
8111
|
-
onPrimary: () =>
|
|
8155
|
+
onPrimary: () => {
|
|
8156
|
+
setReturnFailure(null);
|
|
8157
|
+
setDetached(null);
|
|
8158
|
+
}
|
|
8159
|
+
}
|
|
8160
|
+
);
|
|
8161
|
+
}
|
|
8162
|
+
if (isImpersonated && returnFailure === "session-ended") {
|
|
8163
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8164
|
+
ImpersonationBlocked,
|
|
8165
|
+
{
|
|
8166
|
+
title: "Your session has ended",
|
|
8167
|
+
description: "Sign in again to continue.",
|
|
8168
|
+
primaryLabel: "Sign in again",
|
|
8169
|
+
onPrimary: signOut
|
|
8170
|
+
}
|
|
8171
|
+
);
|
|
8172
|
+
}
|
|
8173
|
+
if (isImpersonated && returnFailure === "unconfirmed") {
|
|
8174
|
+
const name = projectNameFor(projects, impersonatedTenantId);
|
|
8175
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8176
|
+
ImpersonationBlocked,
|
|
8177
|
+
{
|
|
8178
|
+
title: "Couldn't return to the console",
|
|
8179
|
+
description: name ? `Your session is still in ${name}. Try again, or sign out.` : "Your session is still in a project. Try again, or sign out.",
|
|
8180
|
+
primaryLabel: "Try again",
|
|
8181
|
+
onPrimary: () => setReturnFailure(null),
|
|
8182
|
+
secondaryLabel: "Sign out",
|
|
8183
|
+
onSecondary: signOut
|
|
8112
8184
|
}
|
|
8113
8185
|
);
|
|
8114
8186
|
}
|
|
@@ -8131,9 +8203,9 @@ function ImpersonationSynchronizer({
|
|
|
8131
8203
|
setImpersonationError,
|
|
8132
8204
|
setDetached
|
|
8133
8205
|
} = chunk4QN4CYSC_cjs.useImpersonateStore();
|
|
8134
|
-
const { mutateAsync } =
|
|
8135
|
-
const recordClaimedTenant =
|
|
8136
|
-
const { data: _data } =
|
|
8206
|
+
const { mutateAsync } = chunkAD2ZGEQ5_cjs.useStartImpersonation();
|
|
8207
|
+
const recordClaimedTenant = chunkAD2ZGEQ5_cjs.useRecordClaimedTenant();
|
|
8208
|
+
const { data: _data } = chunkAD2ZGEQ5_cjs.useGetProjects({ enabled: true });
|
|
8137
8209
|
const { selectedProject, setSelectedProject, projects, setTenantGroup } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
8138
8210
|
const isTriggering = React8.useRef(false);
|
|
8139
8211
|
const [isImpersonating, setIsImpersonating] = React8.useState(false);
|
|
@@ -8168,7 +8240,7 @@ function ImpersonationSynchronizer({
|
|
|
8168
8240
|
]);
|
|
8169
8241
|
const getImpersonatedProject = async () => {
|
|
8170
8242
|
try {
|
|
8171
|
-
const res =
|
|
8243
|
+
const res = chunkAD2ZGEQ5_cjs.projectService.getProject();
|
|
8172
8244
|
return (await res).data;
|
|
8173
8245
|
} catch (error) {
|
|
8174
8246
|
console.error("Error fetching projects:", error);
|
|
@@ -8229,10 +8301,10 @@ function ImpersonationSynchronizer({
|
|
|
8229
8301
|
const isAttached = !!routeTenantId && routeTenantId === impersonatedTenantId && !detachedHere && !impersonationError && !isProbingOwner;
|
|
8230
8302
|
React8.useEffect(() => {
|
|
8231
8303
|
if (!isAttached || !routeTenantId) return;
|
|
8232
|
-
return
|
|
8304
|
+
return chunkI2KRZLP4_cjs.holdTenant(routeTenantId);
|
|
8233
8305
|
}, [isAttached, routeTenantId]);
|
|
8234
8306
|
React8.useEffect(() => {
|
|
8235
|
-
return
|
|
8307
|
+
return chunkI2KRZLP4_cjs.subscribeToTenantClaims((claim) => {
|
|
8236
8308
|
recordClaimedTenant(claim.tenantId, rootTenantId);
|
|
8237
8309
|
const mine = routeTenantIdRef.current;
|
|
8238
8310
|
if (!mine) return;
|
|
@@ -8449,7 +8521,7 @@ var LoginHeader = ({
|
|
|
8449
8521
|
}) => {
|
|
8450
8522
|
const {
|
|
8451
8523
|
config: { appLogoUrl }
|
|
8452
|
-
} =
|
|
8524
|
+
} = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state);
|
|
8453
8525
|
const resolveLogo = (variant) => {
|
|
8454
8526
|
if (!appLogoUrl) return void 0;
|
|
8455
8527
|
if (typeof appLogoUrl === "string") return appLogoUrl;
|
|
@@ -9714,10 +9786,10 @@ var BlocksLoginPage = ({
|
|
|
9714
9786
|
] });
|
|
9715
9787
|
};
|
|
9716
9788
|
var LoginPage = () => {
|
|
9717
|
-
const config =
|
|
9718
|
-
const { start, isLoading } =
|
|
9719
|
-
const { canSignUp } =
|
|
9720
|
-
const { start: startSignUp, isLoading: isSignUpLoading } =
|
|
9789
|
+
const config = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
9790
|
+
const { start, isLoading } = chunkAD2ZGEQ5_cjs.useLogin();
|
|
9791
|
+
const { canSignUp } = chunkAD2ZGEQ5_cjs.useSignUpAffordance();
|
|
9792
|
+
const { start: startSignUp, isLoading: isSignUpLoading } = chunkAD2ZGEQ5_cjs.useSignUpRedirect();
|
|
9721
9793
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9722
9794
|
BlocksLoginPage,
|
|
9723
9795
|
{
|
|
@@ -9832,10 +9904,10 @@ var BentoCard = ({
|
|
|
9832
9904
|
);
|
|
9833
9905
|
var DefaultDoc = () => /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: resources.map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
|
|
9834
9906
|
function useCreateProjectRedirect() {
|
|
9835
|
-
const { name } =
|
|
9907
|
+
const { name } = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
9836
9908
|
const navigate = reactRouter.useNavigate();
|
|
9837
9909
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
9838
|
-
const { isFetching, isReady, redirect } =
|
|
9910
|
+
const { isFetching, isReady, redirect } = chunkAD2ZGEQ5_cjs.usePrefetchRedirect({
|
|
9839
9911
|
clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
9840
9912
|
redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
9841
9913
|
forwardedTo: "/app/create-project",
|
|
@@ -9927,10 +9999,10 @@ function useProjectOverviewRedirect({
|
|
|
9927
9999
|
tenantGroupId
|
|
9928
10000
|
}) {
|
|
9929
10001
|
const navigate = reactRouter.useNavigate();
|
|
9930
|
-
const { name } =
|
|
10002
|
+
const { name } = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
9931
10003
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
9932
10004
|
const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
|
|
9933
|
-
const { isFetching, isReady, redirect } =
|
|
10005
|
+
const { isFetching, isReady, redirect } = chunkAD2ZGEQ5_cjs.usePrefetchRedirect({
|
|
9934
10006
|
clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
9935
10007
|
redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
9936
10008
|
forwardedTo: redirectedRoute,
|
|
@@ -10290,7 +10362,7 @@ function MultiSelect2({
|
|
|
10290
10362
|
onChange,
|
|
10291
10363
|
value: selectedValues
|
|
10292
10364
|
}) {
|
|
10293
|
-
const [buttonRef, popoverWidth] =
|
|
10365
|
+
const [buttonRef, popoverWidth] = chunkAD2ZGEQ5_cjs.usePopoverWidth();
|
|
10294
10366
|
const onSelectHandler = (value) => {
|
|
10295
10367
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
10296
10368
|
onChange(nextValues);
|
|
@@ -10571,7 +10643,7 @@ var useProjectListState = (projectGroups) => {
|
|
|
10571
10643
|
})),
|
|
10572
10644
|
[projectGroups]
|
|
10573
10645
|
);
|
|
10574
|
-
const searchedGroups =
|
|
10646
|
+
const searchedGroups = chunkAD2ZGEQ5_cjs.useDebouncedFuseFilter(
|
|
10575
10647
|
searchableGroups,
|
|
10576
10648
|
searchText,
|
|
10577
10649
|
SEARCH_OPTIONS
|
|
@@ -10641,7 +10713,7 @@ var SelfProjectLoading = ({ viewMode }) => {
|
|
|
10641
10713
|
) });
|
|
10642
10714
|
};
|
|
10643
10715
|
var SelfProject = ({ canCreateProject = false }) => {
|
|
10644
|
-
const { data, isLoading } =
|
|
10716
|
+
const { data, isLoading } = chunkAD2ZGEQ5_cjs.useGetProjects({ enabled: true });
|
|
10645
10717
|
const isPending = isLoading;
|
|
10646
10718
|
const projectGroups = data || [];
|
|
10647
10719
|
const {
|
|
@@ -10762,6 +10834,27 @@ var ConsolePage = ({ canCreateProject = false }) => {
|
|
|
10762
10834
|
] })
|
|
10763
10835
|
] });
|
|
10764
10836
|
};
|
|
10837
|
+
var ANNOUNCE_WAIT_MS = 3e3;
|
|
10838
|
+
var announceNewSession = async () => {
|
|
10839
|
+
const rootTenantId = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
|
|
10840
|
+
let timer;
|
|
10841
|
+
try {
|
|
10842
|
+
const status = await Promise.race([
|
|
10843
|
+
chunkAD2ZGEQ5_cjs.impersonationService.impersonationStatus({ skipSessionCheck: true }),
|
|
10844
|
+
new Promise((_, reject) => {
|
|
10845
|
+
timer = setTimeout(
|
|
10846
|
+
() => reject(new Error("Impersonation status timed out")),
|
|
10847
|
+
ANNOUNCE_WAIT_MS
|
|
10848
|
+
);
|
|
10849
|
+
})
|
|
10850
|
+
]);
|
|
10851
|
+
const tenantId = status.impersonated ? status.impersonatedTenantId : rootTenantId;
|
|
10852
|
+
if (tenantId) chunkI2KRZLP4_cjs.claimTenant(tenantId);
|
|
10853
|
+
} catch {
|
|
10854
|
+
} finally {
|
|
10855
|
+
clearTimeout(timer);
|
|
10856
|
+
}
|
|
10857
|
+
};
|
|
10765
10858
|
var toSafeAppPath = (value) => {
|
|
10766
10859
|
if (!value || !value.startsWith("/")) return null;
|
|
10767
10860
|
try {
|
|
@@ -10793,8 +10886,9 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
10793
10886
|
if (error) callbackUrl.searchParams.set("error", error);
|
|
10794
10887
|
const headers = {};
|
|
10795
10888
|
if (tenantId) headers["X-Blocks-Key"] = tenantId;
|
|
10796
|
-
fetch(callbackUrl.toString(), { headers, credentials: "include" }).then((res) => {
|
|
10889
|
+
fetch(callbackUrl.toString(), { headers, credentials: "include" }).then(async (res) => {
|
|
10797
10890
|
if (res.ok) {
|
|
10891
|
+
await announceNewSession();
|
|
10798
10892
|
setAuthenticated();
|
|
10799
10893
|
window.location.href = appRedirectUrl;
|
|
10800
10894
|
} else {
|
|
@@ -10810,7 +10904,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
10810
10904
|
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" }) });
|
|
10811
10905
|
};
|
|
10812
10906
|
function ProfilePage() {
|
|
10813
|
-
const { isLoading, error } =
|
|
10907
|
+
const { isLoading, error } = chunkAD2ZGEQ5_cjs.useInitiateRedirect({
|
|
10814
10908
|
clientId: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
|
|
10815
10909
|
redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
|
|
10816
10910
|
forwardedTo: "/app/profile"
|
|
@@ -11088,8 +11182,8 @@ var ConfirmationModal = ({
|
|
|
11088
11182
|
] })
|
|
11089
11183
|
] });
|
|
11090
11184
|
var DashboardOverview = () => {
|
|
11091
|
-
const { name } =
|
|
11092
|
-
const { data, isFetching } =
|
|
11185
|
+
const { name } = chunkAD2ZGEQ5_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
11186
|
+
const { data, isFetching } = chunkAD2ZGEQ5_cjs.useGetProject();
|
|
11093
11187
|
const {
|
|
11094
11188
|
endpoints,
|
|
11095
11189
|
isLoading: isLoadingEndpoints,
|
|
@@ -11183,11 +11277,11 @@ function ProjectList2({
|
|
|
11183
11277
|
}) {
|
|
11184
11278
|
const navigate = reactRouter.useNavigate();
|
|
11185
11279
|
const { pathname } = reactRouter.useLocation();
|
|
11186
|
-
const { data: projectGroups = [], isLoading } =
|
|
11280
|
+
const { data: projectGroups = [], isLoading } = chunkAD2ZGEQ5_cjs.useGetProjects({
|
|
11187
11281
|
enabled: true
|
|
11188
11282
|
});
|
|
11189
11283
|
const { selectedProject, setSelectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
|
|
11190
|
-
const { data: projectData } =
|
|
11284
|
+
const { data: projectData } = chunkAD2ZGEQ5_cjs.useGetProject();
|
|
11191
11285
|
const pendingProjectRef = React8.useRef(null);
|
|
11192
11286
|
const redirectRegexMap = React8.useMemo(
|
|
11193
11287
|
() => Object.entries(redirectPaths).reduce(
|
|
@@ -11336,7 +11430,7 @@ var SetCustomDomainDialog = ({
|
|
|
11336
11430
|
projectKey,
|
|
11337
11431
|
projectEnv
|
|
11338
11432
|
}) => {
|
|
11339
|
-
const { mutateAsync, isPending } =
|
|
11433
|
+
const { mutateAsync, isPending } = chunkAD2ZGEQ5_cjs.useUpdateRepositories();
|
|
11340
11434
|
const verifiedDomains = React8.useMemo(
|
|
11341
11435
|
() => Array.from(
|
|
11342
11436
|
new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
|
|
@@ -11520,7 +11614,7 @@ var ProjectRepoList = ({
|
|
|
11520
11614
|
data: envRepositoriesResponse,
|
|
11521
11615
|
isLoading: isLoadingEnvRepos,
|
|
11522
11616
|
isFetching: isFetchingEnvRepos
|
|
11523
|
-
} =
|
|
11617
|
+
} = chunkAD2ZGEQ5_cjs.useGetEnvRepositories(project?.tenantId || "");
|
|
11524
11618
|
if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
|
|
11525
11619
|
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: [
|
|
11526
11620
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
|
|
@@ -11620,7 +11714,7 @@ var EditProjectForm = ({
|
|
|
11620
11714
|
onAfterSubmit
|
|
11621
11715
|
}) => {
|
|
11622
11716
|
const queryClient = reactQuery.useQueryClient();
|
|
11623
|
-
const { mutateAsync, isPending } =
|
|
11717
|
+
const { mutateAsync, isPending } = chunkAD2ZGEQ5_cjs.useUpdateTenantGroup();
|
|
11624
11718
|
const form = reactHookForm.useForm({
|
|
11625
11719
|
resolver: zod$1.zodResolver(editProjectFormSchema),
|
|
11626
11720
|
defaultValues: {
|
|
@@ -11757,7 +11851,7 @@ function SidebarMobileView({
|
|
|
11757
11851
|
navigationMenus
|
|
11758
11852
|
}) {
|
|
11759
11853
|
const [open, setOpen] = React8.useState(false);
|
|
11760
|
-
const { appLightLogo, appDarkLogo } =
|
|
11854
|
+
const { appLightLogo, appDarkLogo } = chunkAD2ZGEQ5_cjs.useLogo();
|
|
11761
11855
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11762
11856
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
11763
11857
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
|
|
@@ -11807,8 +11901,8 @@ function SidebarMenuDesktop({
|
|
|
11807
11901
|
navigationMenus
|
|
11808
11902
|
}) {
|
|
11809
11903
|
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkIJMKS4XG_cjs.SidebarContext);
|
|
11810
|
-
const { appLightLogo, appDarkLogo } =
|
|
11811
|
-
const icon =
|
|
11904
|
+
const { appLightLogo, appDarkLogo } = chunkAD2ZGEQ5_cjs.useLogo();
|
|
11905
|
+
const icon = chunkAD2ZGEQ5_cjs.useIcon();
|
|
11812
11906
|
const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
|
|
11813
11907
|
const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
|
|
11814
11908
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -11937,7 +12031,7 @@ var ErrorBoundary = class extends React8.Component {
|
|
|
11937
12031
|
var ArchiveProject = () => {
|
|
11938
12032
|
const navigate = reactRouter.useNavigate();
|
|
11939
12033
|
const projectKey = chunk6GCU5LM7_cjs.useProjectStore().selectedProject?.tenantId || "";
|
|
11940
|
-
const { mutateAsync, isPending } =
|
|
12034
|
+
const { mutateAsync, isPending } = chunkAD2ZGEQ5_cjs.useDisableProject({ projectKey });
|
|
11941
12035
|
const onClickHandler = async () => {
|
|
11942
12036
|
try {
|
|
11943
12037
|
const res = await mutateAsync();
|
|
@@ -12907,7 +13001,7 @@ var ClearButton = ({ onClear }) => {
|
|
|
12907
13001
|
};
|
|
12908
13002
|
function Radio({ label, options, onChange, value }) {
|
|
12909
13003
|
const [search, setSearch] = React8.useState("");
|
|
12910
|
-
const [buttonRef, popoverWidth] =
|
|
13004
|
+
const [buttonRef, popoverWidth] = chunkAD2ZGEQ5_cjs.usePopoverWidth();
|
|
12911
13005
|
const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
|
|
12912
13006
|
const selected = React8.useMemo(
|
|
12913
13007
|
() => options.find((item) => item.value === value) || null,
|
|
@@ -13916,5 +14010,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
|
|
|
13916
14010
|
exports.useRightSidePanel = useRightSidePanel;
|
|
13917
14011
|
exports.useSortQueryParams = useSortQueryParams;
|
|
13918
14012
|
exports.useWizardStepper = useWizardStepper;
|
|
13919
|
-
//# sourceMappingURL=chunk-
|
|
13920
|
-
//# sourceMappingURL=chunk-
|
|
14013
|
+
//# sourceMappingURL=chunk-2BZ2C4TS.cjs.map
|
|
14014
|
+
//# sourceMappingURL=chunk-2BZ2C4TS.cjs.map
|