@optifye/dashboard-core 6.11.16 → 6.11.17

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.mjs CHANGED
@@ -3266,11 +3266,9 @@ var normalizeShiftDefinitions = (timezone, shiftConfig) => {
3266
3266
  }
3267
3267
  return { shifts: legacyShifts, timezone: fallbackTimezone };
3268
3268
  };
3269
- var determineShiftFromDefinitions = (timezone, shifts, now4 = /* @__PURE__ */ new Date()) => {
3269
+ var determineActiveShiftFromDefinitions = (timezone, shifts, now4 = /* @__PURE__ */ new Date()) => {
3270
3270
  const zonedNow = toZonedTime(now4, timezone);
3271
3271
  const currentMinutes = zonedNow.getHours() * 60 + zonedNow.getMinutes();
3272
- let chosen;
3273
- let operationalDate = getOperationalDate(timezone, now4, shifts[0].startTime);
3274
3272
  for (const shift of shifts) {
3275
3273
  const start = parseTimeToMinutes(shift.startTime);
3276
3274
  const endRaw = parseTimeToMinutes(shift.endTime);
@@ -3278,32 +3276,47 @@ var determineShiftFromDefinitions = (timezone, shifts, now4 = /* @__PURE__ */ ne
3278
3276
  const wraps = end <= start;
3279
3277
  if (wraps) end += 1440;
3280
3278
  if (start <= currentMinutes && currentMinutes < end) {
3281
- chosen = shift;
3282
- operationalDate = getOperationalDate(timezone, now4, shift.startTime);
3283
- break;
3279
+ return {
3280
+ shiftId: shift.shiftId,
3281
+ shiftName: shift.shiftName,
3282
+ startTime: shift.startTime,
3283
+ endTime: shift.endTime,
3284
+ timezone,
3285
+ date: getOperationalDate(timezone, now4, shift.startTime)
3286
+ };
3284
3287
  }
3285
3288
  if (start <= currentMinutes + 1440 && currentMinutes + 1440 < end) {
3286
- chosen = shift;
3287
- operationalDate = getOperationalDate(timezone, now4, shift.startTime);
3288
- break;
3289
+ return {
3290
+ shiftId: shift.shiftId,
3291
+ shiftName: shift.shiftName,
3292
+ startTime: shift.startTime,
3293
+ endTime: shift.endTime,
3294
+ timezone,
3295
+ date: getOperationalDate(timezone, now4, shift.startTime)
3296
+ };
3289
3297
  }
3290
3298
  }
3291
- if (!chosen) {
3292
- chosen = shifts[0];
3293
- operationalDate = getOperationalDate(timezone, now4, chosen.startTime);
3299
+ return null;
3300
+ };
3301
+ var getCurrentShift = (timezone, shiftConfig, now4 = /* @__PURE__ */ new Date()) => {
3302
+ const { shifts, timezone: effectiveTz } = normalizeShiftDefinitions(timezone, shiftConfig);
3303
+ const activeShift = determineActiveShiftFromDefinitions(effectiveTz, shifts, now4);
3304
+ if (activeShift) {
3305
+ return activeShift;
3294
3306
  }
3307
+ const fallbackShift = shifts[0];
3295
3308
  return {
3296
- shiftId: chosen.shiftId,
3297
- shiftName: chosen.shiftName,
3298
- startTime: chosen.startTime,
3299
- endTime: chosen.endTime,
3300
- timezone,
3301
- date: operationalDate
3309
+ shiftId: fallbackShift.shiftId,
3310
+ shiftName: fallbackShift.shiftName,
3311
+ startTime: fallbackShift.startTime,
3312
+ endTime: fallbackShift.endTime,
3313
+ timezone: effectiveTz,
3314
+ date: getOperationalDate(effectiveTz, now4, fallbackShift.startTime)
3302
3315
  };
3303
3316
  };
3304
- var getCurrentShift = (timezone, shiftConfig, now4 = /* @__PURE__ */ new Date()) => {
3317
+ var getActiveShift = (timezone, shiftConfig, now4 = /* @__PURE__ */ new Date()) => {
3305
3318
  const { shifts, timezone: effectiveTz } = normalizeShiftDefinitions(timezone, shiftConfig);
3306
- return determineShiftFromDefinitions(effectiveTz, shifts, now4);
3319
+ return determineActiveShiftFromDefinitions(effectiveTz, shifts, now4);
3307
3320
  };
3308
3321
  var isTransitionPeriod = (timezone, shiftConfig, now4 = /* @__PURE__ */ new Date()) => {
3309
3322
  const transitionMinutes = shiftConfig?.transitionPeriodMinutes ?? DEFAULT_TRANSITION_MINUTES;
@@ -32174,6 +32187,7 @@ var LineChartComponent = ({
32174
32187
  xAxisLabel,
32175
32188
  xAxisTickFormatter,
32176
32189
  // Pass through for X-axis tick formatting
32190
+ xAxisInterval,
32177
32191
  yAxisLabel,
32178
32192
  yAxisUnit,
32179
32193
  yAxisDomain,
@@ -32256,6 +32270,7 @@ var LineChartComponent = ({
32256
32270
  dataKey: xAxisDataKey,
32257
32271
  label: xAxisLabel ? { value: xAxisLabel, position: "insideBottom", offset: -10 } : void 0,
32258
32272
  tickFormatter: xAxisTickFormatter,
32273
+ interval: xAxisInterval,
32259
32274
  tick: { fontSize: 12, fill: axisTickFillColor },
32260
32275
  stroke: axisStrokeColor
32261
32276
  }
@@ -33999,8 +34014,9 @@ var VideoCard = React141__default.memo(({
33999
34014
  const isRecentFlowCard = isVideoGridRecentFlowEnabled(workspace);
34000
34015
  const hasDisplayMetric = typeof videoGridDisplayValue === "number" && Number.isFinite(videoGridDisplayValue);
34001
34016
  const hasBarMetric = typeof videoGridMetricValue === "number" && Number.isFinite(videoGridMetricValue);
34017
+ const shouldRenderMetricBadge = hasDisplayMetric;
34002
34018
  const badgeTitle = hasVideoGridRecentFlow(workspace) ? `Flow ${Math.round(videoGridDisplayValue ?? 0)}%` : isRecentFlowCard ? "Flow unavailable" : `Efficiency ${Math.round(videoGridDisplayValue ?? 0)}%`;
34003
- const badgeLabel = hasDisplayMetric ? `${Math.round(videoGridDisplayValue)}%` : "X";
34019
+ const badgeLabel = `${Math.round(videoGridDisplayValue ?? 0)}%`;
34004
34020
  const efficiencyOverlayClass = videoGridColorState === "green" ? "bg-[#00D654]/25" : videoGridColorState === "yellow" ? "bg-[#FFD700]/30" : videoGridColorState === "red" ? "bg-[#FF2D0A]/30" : "bg-transparent";
34005
34021
  const efficiencyBarClass = videoGridColorState === "green" ? "bg-[#00AB45]" : videoGridColorState === "yellow" ? "bg-[#FFB020]" : videoGridColorState === "red" ? "bg-[#E34329]" : "bg-gray-500/70";
34006
34022
  const efficiencyStatus = videoGridColorState === "green" ? "High" : videoGridColorState === "yellow" ? "Medium" : videoGridColorState === "red" ? "Low" : "Neutral";
@@ -34076,7 +34092,7 @@ var VideoCard = React141__default.memo(({
34076
34092
  lastSeenText
34077
34093
  ] })
34078
34094
  ] }) }),
34079
- /* @__PURE__ */ jsx("div", { className: `absolute ${compact ? "top-1 right-1" : "top-2 right-2"} z-30`, children: /* @__PURE__ */ jsx(
34095
+ shouldRenderMetricBadge && /* @__PURE__ */ jsx("div", { className: `absolute ${compact ? "top-1 right-1" : "top-2 right-2"} z-30`, children: /* @__PURE__ */ jsx(
34080
34096
  "div",
34081
34097
  {
34082
34098
  "data-testid": "video-card-metric-badge",
@@ -49803,8 +49819,7 @@ var WorkspaceCycleTimeMetricCards = ({
49803
49819
  {
49804
49820
  data: idleTimeData.chartData,
49805
49821
  isLoading: idleTimeData.isLoading,
49806
- error: idleTimeData.error,
49807
- variant: "bar"
49822
+ error: idleTimeData.error
49808
49823
  }
49809
49824
  ) })
49810
49825
  ] })
@@ -76424,7 +76439,7 @@ var formatComparisonWindow = ({
76424
76439
  shiftMode
76425
76440
  }) => {
76426
76441
  if (comparisonStrategy === "previous_full_week") return "last week";
76427
- if (comparisonStrategy === "matched_range" && shiftMode !== "all" && currentDayCount === 1 && previousDayCount === 1) {
76442
+ if (comparisonStrategy === "matched_range" && currentDayCount === 1 && previousDayCount === 1) {
76428
76443
  return "previous day";
76429
76444
  }
76430
76445
  if (!previousDayCount || !Number.isFinite(previousDayCount)) return "previous range";
@@ -76447,8 +76462,14 @@ var buildDeltaBadge = (delta, options) => {
76447
76462
  };
76448
76463
  };
76449
76464
  var normalizeShiftLabel = (shiftName, shiftMode) => {
76465
+ if (shiftMode === "all") {
76466
+ return "All Shifts";
76467
+ }
76450
76468
  const trimmedName = shiftName?.trim();
76451
76469
  if (trimmedName) {
76470
+ const normalizedName = trimmedName.toLowerCase();
76471
+ if (normalizedName === "day") return "Day Shift";
76472
+ if (normalizedName === "night") return "Night Shift";
76452
76473
  return /shift/i.test(trimmedName) ? trimmedName : `${trimmedName} Shift`;
76453
76474
  }
76454
76475
  if (shiftMode === "night") return "Night Shift";
@@ -76457,6 +76478,9 @@ var normalizeShiftLabel = (shiftName, shiftMode) => {
76457
76478
  var getShiftIcon = (shiftName, shiftMode) => {
76458
76479
  const normalizedName = (shiftName || "").toLowerCase();
76459
76480
  const normalizedMode = shiftMode || "day";
76481
+ if (normalizedMode === "all") {
76482
+ return /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" }) });
76483
+ }
76460
76484
  if (normalizedName.includes("day") || normalizedName.includes("morning") || normalizedMode === "day") {
76461
76485
  return /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" }) });
76462
76486
  }
@@ -76535,6 +76559,7 @@ var OperationsOverviewHeader = React141__default.memo(({
76535
76559
  }) => {
76536
76560
  bumpRenderCounter();
76537
76561
  const subtitleRange = displayDateRange || dateRange;
76562
+ const showLiveShiftMeta = isLiveScope && trendMode !== "all";
76538
76563
  const liveShiftLabel = React141__default.useMemo(
76539
76564
  () => normalizeShiftLabel(liveShiftName, trendMode),
76540
76565
  [liveShiftName, trendMode]
@@ -76672,8 +76697,8 @@ var OperationsOverviewHeader = React141__default.memo(({
76672
76697
  ] }),
76673
76698
  /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-wrap items-center justify-center gap-x-2 gap-y-1 text-[11px] font-medium text-slate-500 min-w-0", children: [
76674
76699
  /* @__PURE__ */ jsx("span", { className: "truncate text-center", children: mobileSubtitle }),
76675
- isLiveScope ? /* @__PURE__ */ jsx("span", { className: "text-slate-300", children: "|" }) : null,
76676
- isLiveScope ? /* @__PURE__ */ jsx("span", { "data-testid": "operations-overview-live-meta", className: "inline-flex items-center gap-1.5 text-gray-600 min-w-0", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 justify-center truncate", children: [
76700
+ showLiveShiftMeta ? /* @__PURE__ */ jsx("span", { className: "text-slate-300", children: "|" }) : null,
76701
+ showLiveShiftMeta ? /* @__PURE__ */ jsx("span", { "data-testid": "operations-overview-live-meta", className: "inline-flex items-center gap-1.5 text-gray-600 min-w-0", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 justify-center truncate", children: [
76677
76702
  /* @__PURE__ */ jsx("span", { className: "opacity-75 shrink-0", children: liveShiftIcon }),
76678
76703
  /* @__PURE__ */ jsx("span", { className: "truncate", children: liveShiftLabel })
76679
76704
  ] }) }) : null
@@ -76720,7 +76745,7 @@ var OperationsOverviewHeader = React141__default.memo(({
76720
76745
  ] }),
76721
76746
  /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-xs sm:text-sm font-medium text-slate-500 text-center", children: [
76722
76747
  /* @__PURE__ */ jsx("span", { children: desktopSubtitle }),
76723
- isLiveScope ? /* @__PURE__ */ jsxs(Fragment, { children: [
76748
+ showLiveShiftMeta ? /* @__PURE__ */ jsxs(Fragment, { children: [
76724
76749
  /* @__PURE__ */ jsx("span", { className: "text-slate-300", children: "|" }),
76725
76750
  /* @__PURE__ */ jsx("span", { "data-testid": "operations-overview-live-meta", className: "inline-flex items-center gap-1.5 text-gray-600", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 justify-center", children: [
76726
76751
  /* @__PURE__ */ jsx("span", { className: "opacity-75", children: liveShiftIcon }),
@@ -77294,18 +77319,18 @@ var EfficiencyTrendCard = React141__default.memo(({
77294
77319
  return (trend.data.points || []).map((point, index) => ({
77295
77320
  name: (() => {
77296
77321
  const rawLabel = point.label?.trim() || "";
77297
- if (!hourlyLabelStartTime) {
77298
- return rawLabel || `Hour ${index + 1}`;
77299
- }
77300
- if (rawLabel && !/^Hour\s+\d+$/i.test(rawLabel)) {
77322
+ if (rawLabel) {
77301
77323
  return rawLabel;
77302
77324
  }
77325
+ if (!hourlyLabelStartTime) {
77326
+ return "";
77327
+ }
77303
77328
  const hourIndex = typeof point.hour_index === "number" ? point.hour_index : index;
77304
77329
  const [hoursPart, minutesPart] = hourlyLabelStartTime.split(":");
77305
77330
  const startHours = Number(hoursPart);
77306
77331
  const startMinutes = Number(minutesPart);
77307
77332
  if (!Number.isFinite(startHours) || !Number.isFinite(startMinutes)) {
77308
- return rawLabel || `Hour ${index + 1}`;
77333
+ return "";
77309
77334
  }
77310
77335
  const totalMinutes = startHours * 60 + startMinutes + hourIndex * 60;
77311
77336
  const hour24 = Math.floor(totalMinutes / 60) % 24;
@@ -77367,6 +77392,12 @@ var EfficiencyTrendCard = React141__default.memo(({
77367
77392
  if (!dayOfWeek || typeof label !== "string") return label;
77368
77393
  return `${label} (${dayOfWeek})`;
77369
77394
  }, [isHourlyTrend]);
77395
+ const trendXAxisTickFormatter = React141__default.useCallback((value, index) => {
77396
+ if (!isHourlyTrend) {
77397
+ return typeof value === "string" ? value : String(value ?? "");
77398
+ }
77399
+ return index % 2 === 0 ? typeof value === "string" ? value : String(value ?? "") : "";
77400
+ }, [isHourlyTrend]);
77370
77401
  return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-[0_2px_10px_-3px_rgba(6,81,237,0.1)] border border-slate-100 flex flex-col overflow-hidden text-left", children: [
77371
77402
  /* @__PURE__ */ jsx("div", { className: "px-6 py-5 flex-none flex justify-between items-center border-b border-slate-50/50", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Efficiency Trend" }) }),
77372
77403
  /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-[250px] w-full p-4 pt-4 relative", children: showInitialSkeleton ? /* @__PURE__ */ jsx(OverviewChartSkeleton, {}) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pb-2 pr-4 pl-1", children: /* @__PURE__ */ jsx(
@@ -77375,6 +77406,8 @@ var EfficiencyTrendCard = React141__default.memo(({
77375
77406
  data: trendData,
77376
77407
  lines: efficiencyLineConfig,
77377
77408
  xAxisDataKey: "name",
77409
+ xAxisInterval: isHourlyTrend ? 0 : void 0,
77410
+ xAxisTickFormatter: trendXAxisTickFormatter,
77378
77411
  yAxisUnit: "%",
77379
77412
  yAxisDomain: [0, 100],
77380
77413
  showLegend: false,
@@ -77880,6 +77913,62 @@ var classifyShiftBucket = ({
77880
77913
  if (normalizedShiftId === 1) return "night";
77881
77914
  return null;
77882
77915
  };
77916
+ var getShiftWindowsForConfig = (shiftConfig, timezone) => {
77917
+ if (shiftConfig?.shifts && shiftConfig.shifts.length > 0) {
77918
+ return shiftConfig.shifts.map((shift) => ({
77919
+ shiftId: shift.shiftId,
77920
+ shiftName: shift.shiftName,
77921
+ startTime: shift.startTime,
77922
+ endTime: shift.endTime
77923
+ }));
77924
+ }
77925
+ const windows = [];
77926
+ if (shiftConfig?.dayShift) {
77927
+ windows.push({
77928
+ shiftId: shiftConfig.dayShift.id ?? 0,
77929
+ shiftName: shiftConfig.dayShift.name || "Day Shift",
77930
+ startTime: shiftConfig.dayShift.startTime || "06:00",
77931
+ endTime: shiftConfig.dayShift.endTime || "18:00"
77932
+ });
77933
+ }
77934
+ if (shiftConfig?.nightShift) {
77935
+ windows.push({
77936
+ shiftId: shiftConfig.nightShift.id ?? 1,
77937
+ shiftName: shiftConfig.nightShift.name || "Night Shift",
77938
+ startTime: shiftConfig.nightShift.startTime || "18:00",
77939
+ endTime: shiftConfig.nightShift.endTime || "06:00"
77940
+ });
77941
+ }
77942
+ if (windows.length > 0) {
77943
+ return windows;
77944
+ }
77945
+ return [
77946
+ {
77947
+ shiftId: 0,
77948
+ shiftName: "Day Shift",
77949
+ startTime: "06:00",
77950
+ endTime: "18:00"
77951
+ },
77952
+ {
77953
+ shiftId: 1,
77954
+ shiftName: "Night Shift",
77955
+ startTime: "18:00",
77956
+ endTime: "06:00"
77957
+ }
77958
+ ];
77959
+ };
77960
+ var normalizeShiftWindowMinutes = (startTime, endTime) => {
77961
+ const startMinutes = parseTimeToMinutes3(startTime);
77962
+ const endMinutesRaw = parseTimeToMinutes3(endTime);
77963
+ if (startMinutes === null || endMinutesRaw === null) {
77964
+ return null;
77965
+ }
77966
+ let endMinutes = endMinutesRaw;
77967
+ if (endMinutes <= startMinutes) {
77968
+ endMinutes += 24 * 60;
77969
+ }
77970
+ return { startMinutes, endMinutes };
77971
+ };
77883
77972
  var PlantHeadView = () => {
77884
77973
  const supabase = useSupabase();
77885
77974
  const entityConfig = useEntityConfig();
@@ -77905,6 +77994,7 @@ var PlantHeadView = () => {
77905
77994
  const [selectedSupervisorId, setSelectedSupervisorId] = React141__default.useState("all");
77906
77995
  const [selectedLineIds, setSelectedLineIds] = React141__default.useState([]);
77907
77996
  const [isInitialScopeReady, setIsInitialScopeReady] = React141__default.useState(false);
77997
+ const [shiftResolutionTick, setShiftResolutionTick] = React141__default.useState(0);
77908
77998
  const hasAutoInitializedScopeRef = React141__default.useRef(false);
77909
77999
  const hasUserAdjustedScopeRef = React141__default.useRef(false);
77910
78000
  React141__default.useEffect(() => {
@@ -78009,34 +78099,151 @@ var PlantHeadView = () => {
78009
78099
  shiftConfigMap,
78010
78100
  isLoading: isShiftConfigLoading
78011
78101
  } = useMultiLineShiftConfigs(scopedLineIds, staticShiftConfig);
78012
- const { shiftGroups, hasComputed: hasComputedShiftGroups } = useShiftGroups({
78013
- enabled: scopedLineIds.length > 0 && !isShiftConfigLoading,
78014
- shiftConfigMap,
78015
- timezone: appTimezone
78016
- });
78017
- const currentShiftScope = React141__default.useMemo(() => {
78018
- if (shiftGroups.length !== 1) return null;
78019
- const group = shiftGroups[0];
78020
- const referenceLineId = group.lineIds[0];
78021
- const referenceShiftConfig = referenceLineId ? shiftConfigMap.get(referenceLineId) : null;
78022
- const normalizedGroupShiftId = normalizeShiftId(group.shiftId);
78023
- const shiftDefinition = referenceShiftConfig?.shifts?.find((shift) => normalizeShiftId(shift.shiftId) === normalizedGroupShiftId);
78024
- const resolvedMode = classifyShiftBucket({
78025
- shiftName: group.shiftName,
78026
- shiftId: normalizedGroupShiftId,
78027
- startTime: shiftDefinition?.startTime,
78028
- endTime: shiftDefinition?.endTime
78029
- });
78030
- if (!resolvedMode || resolvedMode === "all") return null;
78031
- return {
78032
- date: group.date,
78033
- trendMode: resolvedMode,
78034
- shiftName: shiftDefinition?.shiftName || group.shiftName || null
78102
+ React141__default.useEffect(() => {
78103
+ if (scopedLineIds.length === 0 || isShiftConfigLoading) {
78104
+ return;
78105
+ }
78106
+ const intervalId = window.setInterval(() => {
78107
+ setShiftResolutionTick((previous) => previous + 1);
78108
+ }, 6e4);
78109
+ return () => {
78110
+ clearInterval(intervalId);
78035
78111
  };
78036
- }, [shiftConfigMap, shiftGroups]);
78112
+ }, [isShiftConfigLoading, scopedLineIds.length]);
78113
+ const shiftResolutionNow = React141__default.useMemo(
78114
+ () => /* @__PURE__ */ new Date(),
78115
+ [shiftResolutionTick]
78116
+ );
78117
+ const earliestDayShiftStartTime = React141__default.useMemo(() => {
78118
+ const candidateStarts = [];
78119
+ scopedLineIds.forEach((lineId) => {
78120
+ const shiftConfig = shiftConfigMap.get(lineId) || staticShiftConfig;
78121
+ getShiftWindowsForConfig(shiftConfig).forEach((shift) => {
78122
+ const bucket = classifyShiftBucket({
78123
+ shiftName: shift.shiftName,
78124
+ shiftId: shift.shiftId,
78125
+ startTime: shift.startTime,
78126
+ endTime: shift.endTime
78127
+ });
78128
+ const startMinutes = parseTimeToMinutes3(shift.startTime);
78129
+ if (bucket === "day" && startMinutes !== null) {
78130
+ candidateStarts.push(startMinutes);
78131
+ }
78132
+ });
78133
+ });
78134
+ if (candidateStarts.length === 0) {
78135
+ scopedLineIds.forEach((lineId) => {
78136
+ const shiftConfig = shiftConfigMap.get(lineId) || staticShiftConfig;
78137
+ getShiftWindowsForConfig(shiftConfig).forEach((shift) => {
78138
+ const startMinutes = parseTimeToMinutes3(shift.startTime);
78139
+ if (startMinutes !== null) {
78140
+ candidateStarts.push(startMinutes);
78141
+ }
78142
+ });
78143
+ });
78144
+ }
78145
+ if (candidateStarts.length === 0) {
78146
+ return "06:00";
78147
+ }
78148
+ const earliestMinutes = Math.min(...candidateStarts);
78149
+ const hours = Math.floor(earliestMinutes / 60);
78150
+ const minutes = earliestMinutes % 60;
78151
+ return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
78152
+ }, [appTimezone, scopedLineIds, shiftConfigMap, staticShiftConfig]);
78153
+ const resolvedOperationalToday = React141__default.useMemo(
78154
+ () => getOperationalDate(appTimezone, shiftResolutionNow, earliestDayShiftStartTime),
78155
+ [appTimezone, earliestDayShiftStartTime, shiftResolutionNow]
78156
+ );
78157
+ const activeLineShiftStates = React141__default.useMemo(() => {
78158
+ return scopedLineIds.flatMap((lineId) => {
78159
+ const shiftConfig = shiftConfigMap.get(lineId) || staticShiftConfig;
78160
+ const activeShift = getActiveShift(appTimezone, shiftConfig, shiftResolutionNow);
78161
+ if (!activeShift) {
78162
+ return [];
78163
+ }
78164
+ const trendBucket = classifyShiftBucket({
78165
+ shiftName: activeShift.shiftName,
78166
+ shiftId: activeShift.shiftId,
78167
+ startTime: activeShift.startTime,
78168
+ endTime: activeShift.endTime
78169
+ });
78170
+ if (!trendBucket || trendBucket === "all") {
78171
+ return [];
78172
+ }
78173
+ return [{
78174
+ lineId,
78175
+ trendMode: trendBucket,
78176
+ shiftId: activeShift.shiftId,
78177
+ shiftName: activeShift.shiftName || null,
78178
+ startTime: activeShift.startTime || null,
78179
+ endTime: activeShift.endTime || null,
78180
+ date: activeShift.date
78181
+ }];
78182
+ });
78183
+ }, [appTimezone, scopedLineIds, shiftConfigMap, shiftResolutionNow, staticShiftConfig]);
78184
+ const hasActiveDayShiftLine = React141__default.useMemo(
78185
+ () => activeLineShiftStates.some((shift) => shift.trendMode === "day" && shift.date === resolvedOperationalToday),
78186
+ [activeLineShiftStates, resolvedOperationalToday]
78187
+ );
78188
+ const hasActiveNightShiftLine = React141__default.useMemo(
78189
+ () => activeLineShiftStates.some((shift) => shift.trendMode === "night" && shift.date === resolvedOperationalToday),
78190
+ [activeLineShiftStates, resolvedOperationalToday]
78191
+ );
78192
+ const resolvedTrendMode = isInitialScopeReady ? trendMode : "all";
78193
+ const hourlyWindowStartTime = React141__default.useMemo(() => {
78194
+ if (scopedLineIds.length === 0) {
78195
+ return null;
78196
+ }
78197
+ const startCandidates = [];
78198
+ const endCandidates = [];
78199
+ scopedLineIds.forEach((lineId) => {
78200
+ const shiftConfig = shiftConfigMap.get(lineId) || staticShiftConfig;
78201
+ getShiftWindowsForConfig(shiftConfig).forEach((shift) => {
78202
+ const bucket = classifyShiftBucket({
78203
+ shiftName: shift.shiftName,
78204
+ shiftId: shift.shiftId,
78205
+ startTime: shift.startTime,
78206
+ endTime: shift.endTime
78207
+ });
78208
+ if (resolvedTrendMode !== "all" && bucket !== resolvedTrendMode) {
78209
+ return;
78210
+ }
78211
+ const normalizedWindow = normalizeShiftWindowMinutes(shift.startTime, shift.endTime);
78212
+ if (!normalizedWindow) {
78213
+ return;
78214
+ }
78215
+ startCandidates.push(normalizedWindow.startMinutes);
78216
+ endCandidates.push(normalizedWindow.endMinutes);
78217
+ });
78218
+ });
78219
+ if (resolvedTrendMode === "all") {
78220
+ const dayStartCandidates = startCandidates.length > 0 ? scopedLineIds.flatMap((lineId) => {
78221
+ const shiftConfig = shiftConfigMap.get(lineId) || staticShiftConfig;
78222
+ return getShiftWindowsForConfig(shiftConfig).map((shift) => {
78223
+ const bucket = classifyShiftBucket({
78224
+ shiftName: shift.shiftName,
78225
+ shiftId: shift.shiftId,
78226
+ startTime: shift.startTime,
78227
+ endTime: shift.endTime
78228
+ });
78229
+ return bucket === "day" ? parseTimeToMinutes3(shift.startTime) : null;
78230
+ }).filter((value) => value !== null);
78231
+ }) : [];
78232
+ if (dayStartCandidates.length > 0) {
78233
+ startCandidates.splice(0, startCandidates.length, ...dayStartCandidates);
78234
+ }
78235
+ }
78236
+ if (startCandidates.length === 0 || endCandidates.length === 0) {
78237
+ return null;
78238
+ }
78239
+ const earliestMinutes = Math.min(...startCandidates);
78240
+ const hours = Math.floor(earliestMinutes / 60);
78241
+ const minutes = earliestMinutes % 60;
78242
+ return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
78243
+ }, [appTimezone, resolvedTrendMode, scopedLineIds, shiftConfigMap, staticShiftConfig]);
78037
78244
  const isShiftScopeResolved = React141__default.useMemo(
78038
- () => !isShiftConfigLoading && hasComputedShiftGroups,
78039
- [hasComputedShiftGroups, isShiftConfigLoading]
78245
+ () => !isShiftConfigLoading,
78246
+ [isShiftConfigLoading]
78040
78247
  );
78041
78248
  const initializedTimezoneRef = React141__default.useRef(appTimezone);
78042
78249
  React141__default.useEffect(() => {
@@ -78063,7 +78270,7 @@ var PlantHeadView = () => {
78063
78270
  return;
78064
78271
  }
78065
78272
  setDateRange((previous) => {
78066
- const nextStartKey = currentShiftScope?.date || fallbackOperationalDate;
78273
+ const nextStartKey = resolvedOperationalToday || fallbackOperationalDate;
78067
78274
  if (previous.startKey === nextStartKey && previous.endKey === nextStartKey) {
78068
78275
  return previous;
78069
78276
  }
@@ -78072,11 +78279,11 @@ var PlantHeadView = () => {
78072
78279
  endKey: nextStartKey
78073
78280
  };
78074
78281
  });
78075
- setTrendMode(currentShiftScope?.trendMode || "all");
78282
+ setTrendMode("all");
78076
78283
  setUsesThisWeekComparison(false);
78077
78284
  hasAutoInitializedScopeRef.current = true;
78078
78285
  setIsInitialScopeReady(true);
78079
- }, [currentShiftScope, fallbackOperationalDate, isShiftScopeResolved, scopedLineIds.length]);
78286
+ }, [fallbackOperationalDate, isShiftScopeResolved, resolvedOperationalToday, scopedLineIds.length]);
78080
78287
  const handleDateRangeChange = React141__default.useCallback((range, meta) => {
78081
78288
  hasUserAdjustedScopeRef.current = true;
78082
78289
  setIsInitialScopeReady(true);
@@ -78153,45 +78360,36 @@ var PlantHeadView = () => {
78153
78360
  if (isInitialScopeReady) {
78154
78361
  return dateRange;
78155
78362
  }
78156
- const nextStartKey = currentShiftScope?.date || fallbackOperationalDate;
78363
+ const nextStartKey = resolvedOperationalToday || fallbackOperationalDate;
78157
78364
  return {
78158
78365
  startKey: nextStartKey,
78159
78366
  endKey: nextStartKey
78160
78367
  };
78161
- }, [currentShiftScope, dateRange, fallbackOperationalDate, isInitialScopeReady]);
78368
+ }, [dateRange, fallbackOperationalDate, isInitialScopeReady, resolvedOperationalToday]);
78162
78369
  const effectiveTrendMode = React141__default.useMemo(
78163
- () => isInitialScopeReady ? trendMode : currentShiftScope?.trendMode || "all",
78164
- [currentShiftScope, isInitialScopeReady, trendMode]
78370
+ () => resolvedTrendMode,
78371
+ [resolvedTrendMode]
78165
78372
  );
78166
78373
  const hourlyLabelStartTime = React141__default.useMemo(() => {
78167
- if (effectiveTrendMode === "all" || scopedLineIds.length === 0) {
78168
- return null;
78169
- }
78170
- const shiftStartTimes = /* @__PURE__ */ new Set();
78171
- scopedLineIds.forEach((lineId) => {
78172
- const shiftConfig = shiftConfigMap.get(lineId);
78173
- const matchingShift = shiftConfig?.shifts?.find((shift) => classifyShiftBucket({
78174
- shiftName: shift.shiftName,
78175
- shiftId: shift.shiftId,
78176
- startTime: shift.startTime,
78177
- endTime: shift.endTime
78178
- }) === effectiveTrendMode);
78179
- if (matchingShift?.startTime) {
78180
- shiftStartTimes.add(matchingShift.startTime);
78181
- }
78182
- });
78183
- if (shiftStartTimes.size !== 1) {
78374
+ if (scopedLineIds.length === 0) {
78184
78375
  return null;
78185
78376
  }
78186
- return Array.from(shiftStartTimes)[0] || null;
78187
- }, [effectiveTrendMode, scopedLineIds, shiftConfigMap]);
78188
- const isSingleDayShiftScope = React141__default.useMemo(
78189
- () => effectiveDateRange.startKey === effectiveDateRange.endKey && effectiveTrendMode !== "all",
78190
- [effectiveDateRange.endKey, effectiveDateRange.startKey, effectiveTrendMode]
78377
+ return hourlyWindowStartTime;
78378
+ }, [hourlyWindowStartTime, scopedLineIds.length]);
78379
+ const isSingleDayScope = React141__default.useMemo(
78380
+ () => effectiveDateRange.startKey === effectiveDateRange.endKey,
78381
+ [effectiveDateRange.endKey, effectiveDateRange.startKey]
78191
78382
  );
78192
78383
  const isLiveScope = React141__default.useMemo(
78193
- () => isSingleDayShiftScope && currentShiftScope !== null && effectiveDateRange.startKey === currentShiftScope.date && effectiveTrendMode === currentShiftScope.trendMode,
78194
- [currentShiftScope, effectiveDateRange.startKey, effectiveTrendMode, isSingleDayShiftScope]
78384
+ () => isSingleDayScope && effectiveDateRange.startKey === resolvedOperationalToday && (effectiveTrendMode === "all" || effectiveTrendMode === "day" && hasActiveDayShiftLine || effectiveTrendMode === "night" && hasActiveNightShiftLine),
78385
+ [
78386
+ effectiveDateRange.startKey,
78387
+ effectiveTrendMode,
78388
+ hasActiveDayShiftLine,
78389
+ hasActiveNightShiftLine,
78390
+ isSingleDayScope,
78391
+ resolvedOperationalToday
78392
+ ]
78195
78393
  );
78196
78394
  const handleOpenLineDetails = React141__default.useCallback((lineId, lineName) => {
78197
78395
  trackCoreEvent("Operations Overview Line Clicked", {
@@ -78226,7 +78424,7 @@ var PlantHeadView = () => {
78226
78424
  displayDateRange: headerDateRange,
78227
78425
  trendMode,
78228
78426
  isLiveScope,
78229
- liveShiftName: currentShiftScope?.shiftName || null,
78427
+ liveShiftName: isLiveScope && trendMode !== "all" ? trendMode : null,
78230
78428
  lineOptions,
78231
78429
  supervisorOptions,
78232
78430
  selectedSupervisorId,
@@ -78761,4 +78959,4 @@ var streamProxyConfig = {
78761
78959
  }
78762
78960
  };
78763
78961
 
78764
- export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };
78962
+ export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getActiveShift, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "6.11.16",
3
+ "version": "6.11.17",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",