@optifye/dashboard-core 6.5.4 → 6.5.5

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.css CHANGED
@@ -1957,6 +1957,10 @@ body {
1957
1957
  --tw-bg-opacity: 1;
1958
1958
  background-color: rgb(245 158 11 / var(--tw-bg-opacity, 1));
1959
1959
  }
1960
+ .bg-amber-600 {
1961
+ --tw-bg-opacity: 1;
1962
+ background-color: rgb(217 119 6 / var(--tw-bg-opacity, 1));
1963
+ }
1960
1964
  .bg-black {
1961
1965
  --tw-bg-opacity: 1;
1962
1966
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
@@ -2199,6 +2203,10 @@ body {
2199
2203
  --tw-bg-opacity: 1;
2200
2204
  background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1));
2201
2205
  }
2206
+ .bg-teal-600 {
2207
+ --tw-bg-opacity: 1;
2208
+ background-color: rgb(13 148 136 / var(--tw-bg-opacity, 1));
2209
+ }
2202
2210
  .bg-transparent {
2203
2211
  background-color: transparent;
2204
2212
  }
@@ -3007,6 +3015,10 @@ body {
3007
3015
  --tw-text-opacity: 1;
3008
3016
  color: rgb(15 23 42 / var(--tw-text-opacity, 1));
3009
3017
  }
3018
+ .text-teal-600 {
3019
+ --tw-text-opacity: 1;
3020
+ color: rgb(13 148 136 / var(--tw-text-opacity, 1));
3021
+ }
3010
3022
  .text-transparent {
3011
3023
  color: transparent;
3012
3024
  }
package/dist/index.js CHANGED
@@ -3581,6 +3581,20 @@ function parseS3Uri(s3Uri, sopCategories) {
3581
3581
  severity = "low";
3582
3582
  description = "Cycle Completion";
3583
3583
  break;
3584
+ case "running_cycle":
3585
+ case "active_cycle":
3586
+ case "production_cycle":
3587
+ type = "running_cycle";
3588
+ severity = "low";
3589
+ description = "Active Production Cycle";
3590
+ break;
3591
+ case "setup_state":
3592
+ case "machine_setup":
3593
+ case "line_setup":
3594
+ type = "setup_state";
3595
+ severity = "medium";
3596
+ description = "Machine Setup Activity";
3597
+ break;
3584
3598
  case "medium_bottleneck":
3585
3599
  severity = "medium";
3586
3600
  description = "Medium Bottleneck Identified";
@@ -3611,6 +3625,14 @@ function parseS3Uri(s3Uri, sopCategories) {
3611
3625
  type = "cycle_completion";
3612
3626
  severity = "low";
3613
3627
  description = "Cycle Completion";
3628
+ } else if (normalizedViolationType.includes("running") && normalizedViolationType.includes("cycle")) {
3629
+ type = "running_cycle";
3630
+ severity = "low";
3631
+ description = "Active Production Cycle";
3632
+ } else if (normalizedViolationType.includes("setup") || normalizedViolationType.includes("machine") && normalizedViolationType.includes("setup")) {
3633
+ type = "setup_state";
3634
+ severity = "medium";
3635
+ description = "Machine Setup Activity";
3614
3636
  } else {
3615
3637
  description = `Clip type: ${violationType.replace(/_/g, " ")}`;
3616
3638
  console.log(`Detected unknown violation type: ${violationType} in URI: ${s3Uri}`);
@@ -27752,6 +27774,10 @@ var BottlenecksContent = ({
27752
27774
  return "Worst Cycle Time";
27753
27775
  case "cycle_completion":
27754
27776
  return "Cycle Completion";
27777
+ case "running_cycle":
27778
+ return "Running Cycle";
27779
+ case "setup_state":
27780
+ return "Setup State";
27755
27781
  case "bottleneck":
27756
27782
  default:
27757
27783
  return "";
@@ -27766,6 +27792,8 @@ var BottlenecksContent = ({
27766
27792
  blue: { text: "text-blue-600", bg: "bg-blue-600", dot: "bg-blue-600" },
27767
27793
  orange: { text: "text-orange-600", bg: "bg-orange-600", dot: "bg-orange-600" },
27768
27794
  yellow: { text: "text-yellow-600", bg: "bg-yellow-600", dot: "bg-yellow-600" },
27795
+ teal: { text: "text-teal-600", bg: "bg-teal-600", dot: "bg-teal-600" },
27796
+ amber: { text: "text-amber-600", bg: "bg-amber-600", dot: "bg-amber-600" },
27769
27797
  gray: { text: "text-gray-600", bg: "bg-gray-600", dot: "bg-gray-600" }
27770
27798
  };
27771
27799
  return colorMap[color2] || colorMap.gray;
@@ -28988,10 +29016,7 @@ var WorkspaceHealthCard = ({
28988
29016
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-3.5 w-3.5 text-gray-400" }),
28989
29017
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28990
29018
  "Uptime today: ",
28991
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx(
28992
- "font-medium",
28993
- workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
28994
- ), children: [
29019
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
28995
29020
  workspace.uptimePercentage.toFixed(1),
28996
29021
  "%"
28997
29022
  ] })
@@ -29073,10 +29098,7 @@ var CompactWorkspaceHealthCard = ({
29073
29098
  ] }),
29074
29099
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
29075
29100
  workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
29076
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: clsx(
29077
- "text-xs font-medium",
29078
- workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
29079
- ), children: [
29101
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-medium text-gray-600 dark:text-gray-400", children: [
29080
29102
  workspace.uptimePercentage.toFixed(1),
29081
29103
  "%"
29082
29104
  ] }),
@@ -38490,7 +38512,34 @@ var WorkspaceDetailView = ({
38490
38512
  children: [
38491
38513
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
38492
38514
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "sticky top-0 z-10 px-3 sm:px-4 md:px-5 lg:px-6 py-2 sm:py-2.5 lg:py-3 flex flex-col shadow-sm bg-white", children: [
38493
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
38515
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:hidden", children: [
38516
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
38517
+ /* @__PURE__ */ jsxRuntime.jsx(
38518
+ BackButtonMinimal,
38519
+ {
38520
+ onClick: handleBackNavigation,
38521
+ text: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back",
38522
+ size: "sm",
38523
+ "aria-label": "Navigate back to previous page"
38524
+ }
38525
+ ),
38526
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-gray-500", children: workspaceHealth.timeSinceLastUpdate })
38527
+ ] }),
38528
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
38529
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base font-semibold text-gray-900 truncate max-w-[250px]", children: formattedWorkspaceName }),
38530
+ workspaceHealth && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-2 w-2", children: [
38531
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
38532
+ "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
38533
+ workspaceHealth.status === "healthy" ? "bg-green-400" : "bg-red-400"
38534
+ ) }),
38535
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
38536
+ "relative inline-flex rounded-full h-2 w-2",
38537
+ workspaceHealth.status === "healthy" ? "bg-green-500" : "bg-red-500"
38538
+ ) })
38539
+ ] })
38540
+ ] }) })
38541
+ ] }),
38542
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
38494
38543
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
38495
38544
  BackButtonMinimal,
38496
38545
  {
@@ -38500,8 +38549,8 @@ var WorkspaceDetailView = ({
38500
38549
  "aria-label": "Navigate back to previous page"
38501
38550
  }
38502
38551
  ) }),
38503
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-160px)] sm:max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
38504
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base sm:text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: formattedWorkspaceName }),
38552
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
38553
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: formattedWorkspaceName }),
38505
38554
  workspaceHealth && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
38506
38555
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
38507
38556
  "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
@@ -38513,22 +38562,22 @@ var WorkspaceDetailView = ({
38513
38562
  ) })
38514
38563
  ] })
38515
38564
  ] }) }),
38516
- workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] sm:text-xs text-gray-500 hidden sm:block", children: [
38565
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-gray-500", children: [
38517
38566
  "Last update: ",
38518
38567
  workspaceHealth.timeSinceLastUpdate
38519
38568
  ] }) }),
38520
38569
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-8" })
38521
- ] }),
38570
+ ] }) }),
38522
38571
  activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
38523
38572
  !date && !shift && !usingFallbackData && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38524
38573
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(LiveTimer, {}) }),
38525
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
38574
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38526
38575
  ] }),
38527
38576
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
38528
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
38577
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
38529
38578
  date && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38530
38579
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference(workspace.date) }),
38531
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
38580
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38532
38581
  ] }),
38533
38582
  !date && !shift && usingFallbackData && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38534
38583
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-2 py-1 text-xs font-medium bg-amber-100 text-amber-700 rounded-md", children: [
@@ -38536,11 +38585,11 @@ var WorkspaceDetailView = ({
38536
38585
  getDaysDifference(workspace.date),
38537
38586
  ")"
38538
38587
  ] }),
38539
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
38588
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38540
38589
  ] }),
38541
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
38590
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
38542
38591
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-blue-600", children: getShiftIcon(workspace.shift_type) }),
38543
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base font-medium text-blue-600", children: [
38592
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
38544
38593
  workspace.shift_type,
38545
38594
  " Shift"
38546
38595
  ] })
@@ -39294,7 +39343,7 @@ var WorkspaceHealthView = ({
39294
39343
  className: "grid grid-cols-2 sm:grid-cols-2 md:grid-cols-5 gap-2 sm:gap-3 lg:gap-4",
39295
39344
  children: [
39296
39345
  /* @__PURE__ */ jsxRuntime.jsxs(Card2, { className: "col-span-2 sm:col-span-2 md:col-span-2 bg-white", children: [
39297
- /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Uptime Today" }) }),
39346
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "System Availability" }) }),
39298
39347
  /* @__PURE__ */ jsxRuntime.jsxs(CardContent2, { children: [
39299
39348
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
39300
39349
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: [
@@ -39303,13 +39352,7 @@ var WorkspaceHealthView = ({
39303
39352
  ] }),
39304
39353
  summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-5 w-5 text-red-500" })
39305
39354
  ] }),
39306
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Average uptime across all workspaces" }),
39307
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
39308
- summary.healthyWorkspaces,
39309
- " of ",
39310
- summary.totalWorkspaces,
39311
- " workspaces online"
39312
- ] })
39355
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Overall system uptime today" })
39313
39356
  ] })
39314
39357
  ] }),
39315
39358
  /* @__PURE__ */ jsxRuntime.jsxs(Card2, { className: "bg-white", children: [
package/dist/index.mjs CHANGED
@@ -3551,6 +3551,20 @@ function parseS3Uri(s3Uri, sopCategories) {
3551
3551
  severity = "low";
3552
3552
  description = "Cycle Completion";
3553
3553
  break;
3554
+ case "running_cycle":
3555
+ case "active_cycle":
3556
+ case "production_cycle":
3557
+ type = "running_cycle";
3558
+ severity = "low";
3559
+ description = "Active Production Cycle";
3560
+ break;
3561
+ case "setup_state":
3562
+ case "machine_setup":
3563
+ case "line_setup":
3564
+ type = "setup_state";
3565
+ severity = "medium";
3566
+ description = "Machine Setup Activity";
3567
+ break;
3554
3568
  case "medium_bottleneck":
3555
3569
  severity = "medium";
3556
3570
  description = "Medium Bottleneck Identified";
@@ -3581,6 +3595,14 @@ function parseS3Uri(s3Uri, sopCategories) {
3581
3595
  type = "cycle_completion";
3582
3596
  severity = "low";
3583
3597
  description = "Cycle Completion";
3598
+ } else if (normalizedViolationType.includes("running") && normalizedViolationType.includes("cycle")) {
3599
+ type = "running_cycle";
3600
+ severity = "low";
3601
+ description = "Active Production Cycle";
3602
+ } else if (normalizedViolationType.includes("setup") || normalizedViolationType.includes("machine") && normalizedViolationType.includes("setup")) {
3603
+ type = "setup_state";
3604
+ severity = "medium";
3605
+ description = "Machine Setup Activity";
3584
3606
  } else {
3585
3607
  description = `Clip type: ${violationType.replace(/_/g, " ")}`;
3586
3608
  console.log(`Detected unknown violation type: ${violationType} in URI: ${s3Uri}`);
@@ -27722,6 +27744,10 @@ var BottlenecksContent = ({
27722
27744
  return "Worst Cycle Time";
27723
27745
  case "cycle_completion":
27724
27746
  return "Cycle Completion";
27747
+ case "running_cycle":
27748
+ return "Running Cycle";
27749
+ case "setup_state":
27750
+ return "Setup State";
27725
27751
  case "bottleneck":
27726
27752
  default:
27727
27753
  return "";
@@ -27736,6 +27762,8 @@ var BottlenecksContent = ({
27736
27762
  blue: { text: "text-blue-600", bg: "bg-blue-600", dot: "bg-blue-600" },
27737
27763
  orange: { text: "text-orange-600", bg: "bg-orange-600", dot: "bg-orange-600" },
27738
27764
  yellow: { text: "text-yellow-600", bg: "bg-yellow-600", dot: "bg-yellow-600" },
27765
+ teal: { text: "text-teal-600", bg: "bg-teal-600", dot: "bg-teal-600" },
27766
+ amber: { text: "text-amber-600", bg: "bg-amber-600", dot: "bg-amber-600" },
27739
27767
  gray: { text: "text-gray-600", bg: "bg-gray-600", dot: "bg-gray-600" }
27740
27768
  };
27741
27769
  return colorMap[color2] || colorMap.gray;
@@ -28958,10 +28986,7 @@ var WorkspaceHealthCard = ({
28958
28986
  /* @__PURE__ */ jsx(Activity, { className: "h-3.5 w-3.5 text-gray-400" }),
28959
28987
  /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28960
28988
  "Uptime today: ",
28961
- /* @__PURE__ */ jsxs("span", { className: clsx(
28962
- "font-medium",
28963
- workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
28964
- ), children: [
28989
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
28965
28990
  workspace.uptimePercentage.toFixed(1),
28966
28991
  "%"
28967
28992
  ] })
@@ -29043,10 +29068,7 @@ var CompactWorkspaceHealthCard = ({
29043
29068
  ] }),
29044
29069
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
29045
29070
  workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
29046
- /* @__PURE__ */ jsxs("p", { className: clsx(
29047
- "text-xs font-medium",
29048
- workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
29049
- ), children: [
29071
+ /* @__PURE__ */ jsxs("p", { className: "text-xs font-medium text-gray-600 dark:text-gray-400", children: [
29050
29072
  workspace.uptimePercentage.toFixed(1),
29051
29073
  "%"
29052
29074
  ] }),
@@ -38460,7 +38482,34 @@ var WorkspaceDetailView = ({
38460
38482
  children: [
38461
38483
  /* @__PURE__ */ jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
38462
38484
  /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-3 sm:px-4 md:px-5 lg:px-6 py-2 sm:py-2.5 lg:py-3 flex flex-col shadow-sm bg-white", children: [
38463
- /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
38485
+ /* @__PURE__ */ jsxs("div", { className: "sm:hidden", children: [
38486
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
38487
+ /* @__PURE__ */ jsx(
38488
+ BackButtonMinimal,
38489
+ {
38490
+ onClick: handleBackNavigation,
38491
+ text: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back",
38492
+ size: "sm",
38493
+ "aria-label": "Navigate back to previous page"
38494
+ }
38495
+ ),
38496
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500", children: workspaceHealth.timeSinceLastUpdate })
38497
+ ] }),
38498
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
38499
+ /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-gray-900 truncate max-w-[250px]", children: formattedWorkspaceName }),
38500
+ workspaceHealth && /* @__PURE__ */ jsxs("div", { className: "relative flex h-2 w-2", children: [
38501
+ /* @__PURE__ */ jsx("span", { className: clsx(
38502
+ "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
38503
+ workspaceHealth.status === "healthy" ? "bg-green-400" : "bg-red-400"
38504
+ ) }),
38505
+ /* @__PURE__ */ jsx("span", { className: clsx(
38506
+ "relative inline-flex rounded-full h-2 w-2",
38507
+ workspaceHealth.status === "healthy" ? "bg-green-500" : "bg-red-500"
38508
+ ) })
38509
+ ] })
38510
+ ] }) })
38511
+ ] }),
38512
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
38464
38513
  /* @__PURE__ */ jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsx(
38465
38514
  BackButtonMinimal,
38466
38515
  {
@@ -38470,8 +38519,8 @@ var WorkspaceDetailView = ({
38470
38519
  "aria-label": "Navigate back to previous page"
38471
38520
  }
38472
38521
  ) }),
38473
- /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-160px)] sm:max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
38474
- /* @__PURE__ */ jsx("h1", { className: "text-base sm:text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: formattedWorkspaceName }),
38522
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
38523
+ /* @__PURE__ */ jsx("h1", { className: "text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: formattedWorkspaceName }),
38475
38524
  workspaceHealth && /* @__PURE__ */ jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
38476
38525
  /* @__PURE__ */ jsx("span", { className: clsx(
38477
38526
  "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
@@ -38483,22 +38532,22 @@ var WorkspaceDetailView = ({
38483
38532
  ) })
38484
38533
  ] })
38485
38534
  ] }) }),
38486
- workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxs("span", { className: "text-[10px] sm:text-xs text-gray-500 hidden sm:block", children: [
38535
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500", children: [
38487
38536
  "Last update: ",
38488
38537
  workspaceHealth.timeSinceLastUpdate
38489
38538
  ] }) }),
38490
38539
  /* @__PURE__ */ jsx("div", { className: "w-full h-8" })
38491
- ] }),
38540
+ ] }) }),
38492
38541
  activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
38493
38542
  !date && !shift && !usingFallbackData && /* @__PURE__ */ jsxs(Fragment, { children: [
38494
38543
  /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(LiveTimer, {}) }),
38495
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
38544
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38496
38545
  ] }),
38497
38546
  /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
38498
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
38547
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
38499
38548
  date && /* @__PURE__ */ jsxs(Fragment, { children: [
38500
38549
  /* @__PURE__ */ jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference(workspace.date) }),
38501
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
38550
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38502
38551
  ] }),
38503
38552
  !date && !shift && usingFallbackData && /* @__PURE__ */ jsxs(Fragment, { children: [
38504
38553
  /* @__PURE__ */ jsxs("span", { className: "px-2 py-1 text-xs font-medium bg-amber-100 text-amber-700 rounded-md", children: [
@@ -38506,11 +38555,11 @@ var WorkspaceDetailView = ({
38506
38555
  getDaysDifference(workspace.date),
38507
38556
  ")"
38508
38557
  ] }),
38509
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
38558
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
38510
38559
  ] }),
38511
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
38560
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
38512
38561
  /* @__PURE__ */ jsx("div", { className: "text-blue-600", children: getShiftIcon(workspace.shift_type) }),
38513
- /* @__PURE__ */ jsxs("span", { className: "text-base font-medium text-blue-600", children: [
38562
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
38514
38563
  workspace.shift_type,
38515
38564
  " Shift"
38516
38565
  ] })
@@ -39264,7 +39313,7 @@ var WorkspaceHealthView = ({
39264
39313
  className: "grid grid-cols-2 sm:grid-cols-2 md:grid-cols-5 gap-2 sm:gap-3 lg:gap-4",
39265
39314
  children: [
39266
39315
  /* @__PURE__ */ jsxs(Card2, { className: "col-span-2 sm:col-span-2 md:col-span-2 bg-white", children: [
39267
- /* @__PURE__ */ jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Uptime Today" }) }),
39316
+ /* @__PURE__ */ jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "System Availability" }) }),
39268
39317
  /* @__PURE__ */ jsxs(CardContent2, { children: [
39269
39318
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
39270
39319
  /* @__PURE__ */ jsxs("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: [
@@ -39273,13 +39322,7 @@ var WorkspaceHealthView = ({
39273
39322
  ] }),
39274
39323
  summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsx(TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsx(Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsx(TrendingDown, { className: "h-5 w-5 text-red-500" })
39275
39324
  ] }),
39276
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Average uptime across all workspaces" }),
39277
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
39278
- summary.healthyWorkspaces,
39279
- " of ",
39280
- summary.totalWorkspaces,
39281
- " workspaces online"
39282
- ] })
39325
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Overall system uptime today" })
39283
39326
  ] })
39284
39327
  ] }),
39285
39328
  /* @__PURE__ */ jsxs(Card2, { className: "bg-white", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "6.5.4",
3
+ "version": "6.5.5",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",