@optifye/dashboard-core 6.11.45 → 6.11.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -7
- package/dist/index.mjs +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37655,6 +37655,7 @@ var buildPrefetchedExplorerMetadata = (activeFilter, metadataCategoryId, categor
|
|
|
37655
37655
|
[activeFilter]: categoryMetadata
|
|
37656
37656
|
};
|
|
37657
37657
|
};
|
|
37658
|
+
var shouldDeferClipPlayerRender = (cropLoading, workspaceCrop) => cropLoading && workspaceCrop === null;
|
|
37658
37659
|
var getSecondsBetweenTimestamps = (startTime, endTime) => {
|
|
37659
37660
|
const startDate = parseTimestamp(startTime);
|
|
37660
37661
|
const endDate = parseTimestamp(endTime);
|
|
@@ -42786,7 +42787,7 @@ var BottlenecksContent = ({
|
|
|
42786
42787
|
const isEffectiveShiftReady = Boolean(effectiveShift && effectiveDate);
|
|
42787
42788
|
const effectiveDateString = effectiveDate || "";
|
|
42788
42789
|
const effectiveShiftId = effectiveShift ?? "";
|
|
42789
|
-
const { crop: workspaceCrop} = useWorkspaceCrop(workspaceId);
|
|
42790
|
+
const { crop: workspaceCrop, isLoading: cropLoading } = useWorkspaceCrop(workspaceId);
|
|
42790
42791
|
const { metrics: fetchedWorkspaceMetrics } = useWorkspaceDetailedMetrics(
|
|
42791
42792
|
workspaceId,
|
|
42792
42793
|
date,
|
|
@@ -42835,6 +42836,8 @@ var BottlenecksContent = ({
|
|
|
42835
42836
|
const [pendingVideo, setPendingVideo] = React143.useState(null);
|
|
42836
42837
|
const [isVideoBuffering, setIsVideoBuffering] = React143.useState(false);
|
|
42837
42838
|
const [isInitialLoading, setIsInitialLoading] = React143.useState(false);
|
|
42839
|
+
const shouldDeferPlayerRenderForCrop = shouldDeferClipPlayerRender(cropLoading, workspaceCrop);
|
|
42840
|
+
const showBlockingVideoLoader = shouldDeferPlayerRenderForCrop || isTransitioning || isVideoBuffering && isInitialLoading;
|
|
42838
42841
|
const [isShareLoading, setIsShareLoading] = React143.useState(false);
|
|
42839
42842
|
const [isShareCopied, setIsShareCopied] = React143.useState(false);
|
|
42840
42843
|
const shareCopiedTimeoutRef = React143.useRef(null);
|
|
@@ -44574,7 +44577,7 @@ var BottlenecksContent = ({
|
|
|
44574
44577
|
opacity: isTransitioning ? 0 : 1,
|
|
44575
44578
|
transition: "opacity 0.1s ease-in-out"
|
|
44576
44579
|
},
|
|
44577
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
44580
|
+
children: !shouldDeferPlayerRenderForCrop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
44578
44581
|
CroppedVideoPlayer,
|
|
44579
44582
|
{
|
|
44580
44583
|
ref: videoRef,
|
|
@@ -44605,8 +44608,8 @@ var BottlenecksContent = ({
|
|
|
44605
44608
|
)
|
|
44606
44609
|
}
|
|
44607
44610
|
),
|
|
44608
|
-
|
|
44609
|
-
!isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44611
|
+
showBlockingVideoLoader && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44612
|
+
!shouldDeferPlayerRenderForCrop && !isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44610
44613
|
error && error.type === "retrying" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-40 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
44611
44614
|
/* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md" }),
|
|
44612
44615
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-white text-sm mt-4 font-medium", children: error.message })
|
|
@@ -44999,7 +45002,7 @@ var BottlenecksContent = ({
|
|
|
44999
45002
|
opacity: isTransitioning ? 0 : 1,
|
|
45000
45003
|
transition: "opacity 0.1s ease-in-out"
|
|
45001
45004
|
},
|
|
45002
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
45005
|
+
children: !shouldDeferPlayerRenderForCrop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
45003
45006
|
CroppedVideoPlayer,
|
|
45004
45007
|
{
|
|
45005
45008
|
ref: videoRef,
|
|
@@ -45030,8 +45033,8 @@ var BottlenecksContent = ({
|
|
|
45030
45033
|
)
|
|
45031
45034
|
}
|
|
45032
45035
|
),
|
|
45033
|
-
|
|
45034
|
-
!isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45036
|
+
showBlockingVideoLoader && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45037
|
+
!shouldDeferPlayerRenderForCrop && !isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45035
45038
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/70 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-white", children: [
|
|
45036
45039
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45037
45040
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Speed:" }),
|
package/dist/index.mjs
CHANGED
|
@@ -37626,6 +37626,7 @@ var buildPrefetchedExplorerMetadata = (activeFilter, metadataCategoryId, categor
|
|
|
37626
37626
|
[activeFilter]: categoryMetadata
|
|
37627
37627
|
};
|
|
37628
37628
|
};
|
|
37629
|
+
var shouldDeferClipPlayerRender = (cropLoading, workspaceCrop) => cropLoading && workspaceCrop === null;
|
|
37629
37630
|
var getSecondsBetweenTimestamps = (startTime, endTime) => {
|
|
37630
37631
|
const startDate = parseTimestamp(startTime);
|
|
37631
37632
|
const endDate = parseTimestamp(endTime);
|
|
@@ -42757,7 +42758,7 @@ var BottlenecksContent = ({
|
|
|
42757
42758
|
const isEffectiveShiftReady = Boolean(effectiveShift && effectiveDate);
|
|
42758
42759
|
const effectiveDateString = effectiveDate || "";
|
|
42759
42760
|
const effectiveShiftId = effectiveShift ?? "";
|
|
42760
|
-
const { crop: workspaceCrop} = useWorkspaceCrop(workspaceId);
|
|
42761
|
+
const { crop: workspaceCrop, isLoading: cropLoading } = useWorkspaceCrop(workspaceId);
|
|
42761
42762
|
const { metrics: fetchedWorkspaceMetrics } = useWorkspaceDetailedMetrics(
|
|
42762
42763
|
workspaceId,
|
|
42763
42764
|
date,
|
|
@@ -42806,6 +42807,8 @@ var BottlenecksContent = ({
|
|
|
42806
42807
|
const [pendingVideo, setPendingVideo] = useState(null);
|
|
42807
42808
|
const [isVideoBuffering, setIsVideoBuffering] = useState(false);
|
|
42808
42809
|
const [isInitialLoading, setIsInitialLoading] = useState(false);
|
|
42810
|
+
const shouldDeferPlayerRenderForCrop = shouldDeferClipPlayerRender(cropLoading, workspaceCrop);
|
|
42811
|
+
const showBlockingVideoLoader = shouldDeferPlayerRenderForCrop || isTransitioning || isVideoBuffering && isInitialLoading;
|
|
42809
42812
|
const [isShareLoading, setIsShareLoading] = useState(false);
|
|
42810
42813
|
const [isShareCopied, setIsShareCopied] = useState(false);
|
|
42811
42814
|
const shareCopiedTimeoutRef = useRef(null);
|
|
@@ -44545,7 +44548,7 @@ var BottlenecksContent = ({
|
|
|
44545
44548
|
opacity: isTransitioning ? 0 : 1,
|
|
44546
44549
|
transition: "opacity 0.1s ease-in-out"
|
|
44547
44550
|
},
|
|
44548
|
-
children: /* @__PURE__ */ jsx(
|
|
44551
|
+
children: !shouldDeferPlayerRenderForCrop && /* @__PURE__ */ jsx(
|
|
44549
44552
|
CroppedVideoPlayer,
|
|
44550
44553
|
{
|
|
44551
44554
|
ref: videoRef,
|
|
@@ -44576,8 +44579,8 @@ var BottlenecksContent = ({
|
|
|
44576
44579
|
)
|
|
44577
44580
|
}
|
|
44578
44581
|
),
|
|
44579
|
-
|
|
44580
|
-
!isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44582
|
+
showBlockingVideoLoader && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44583
|
+
!shouldDeferPlayerRenderForCrop && !isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
44581
44584
|
error && error.type === "retrying" && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-40 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
44582
44585
|
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md" }),
|
|
44583
44586
|
/* @__PURE__ */ jsx("p", { className: "text-white text-sm mt-4 font-medium", children: error.message })
|
|
@@ -44970,7 +44973,7 @@ var BottlenecksContent = ({
|
|
|
44970
44973
|
opacity: isTransitioning ? 0 : 1,
|
|
44971
44974
|
transition: "opacity 0.1s ease-in-out"
|
|
44972
44975
|
},
|
|
44973
|
-
children: /* @__PURE__ */ jsx(
|
|
44976
|
+
children: !shouldDeferPlayerRenderForCrop && /* @__PURE__ */ jsx(
|
|
44974
44977
|
CroppedVideoPlayer,
|
|
44975
44978
|
{
|
|
44976
44979
|
ref: videoRef,
|
|
@@ -45001,8 +45004,8 @@ var BottlenecksContent = ({
|
|
|
45001
45004
|
)
|
|
45002
45005
|
}
|
|
45003
45006
|
),
|
|
45004
|
-
|
|
45005
|
-
!isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45007
|
+
showBlockingVideoLoader && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45008
|
+
!shouldDeferPlayerRenderForCrop && !isTransitioning && isVideoBuffering && !isInitialLoading && !error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-30 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading video..." }) }),
|
|
45006
45009
|
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/70 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-white", children: [
|
|
45007
45010
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45008
45011
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Speed:" }),
|