@optifye/dashboard-core 6.12.7 → 6.12.8
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 +18 -30
- package/dist/index.mjs +18 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70470,20 +70470,14 @@ var AnimatedEfficiency = React144.memo(({ value }) => {
|
|
|
70470
70470
|
});
|
|
70471
70471
|
AnimatedEfficiency.displayName = "AnimatedEfficiency";
|
|
70472
70472
|
var getWorkspaceLeaderboardMetricValue = (workspace) => {
|
|
70473
|
-
if (workspace.monitoring_mode === "output") {
|
|
70474
|
-
return toFiniteNumber(workspace.efficiency);
|
|
70475
|
-
}
|
|
70476
70473
|
if (workspace.leaderboard_metric_kind === "recent_flow_shift_average") {
|
|
70477
|
-
return toFiniteNumber(workspace.leaderboard_value);
|
|
70474
|
+
return toFiniteNumber(workspace.leaderboard_value) ?? toFiniteNumber(workspace.avg_recent_flow);
|
|
70478
70475
|
}
|
|
70479
70476
|
return toFiniteNumber(workspace.leaderboard_value) ?? toFiniteNumber(workspace.efficiency);
|
|
70480
70477
|
};
|
|
70481
70478
|
var getWorkspaceDisplayedMetricValue = (workspace) => getWorkspaceLeaderboardMetricValue(workspace);
|
|
70482
|
-
var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.
|
|
70483
|
-
var renderWorkspaceLeaderboardMetric = (workspace
|
|
70484
|
-
if (isAssemblyMode) {
|
|
70485
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CycleTimeComparison, { workspace });
|
|
70486
|
-
}
|
|
70479
|
+
var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.leaderboard_metric_kind === "recent_flow_shift_average" ? "Avg Flow" : defaultLabel;
|
|
70480
|
+
var renderWorkspaceLeaderboardMetric = (workspace) => {
|
|
70487
70481
|
const displayedMetricValue = getWorkspaceDisplayedMetricValue(workspace);
|
|
70488
70482
|
if (displayedMetricValue === null) {
|
|
70489
70483
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tabular-nums", children: "--" });
|
|
@@ -70540,8 +70534,7 @@ var MobileWorkspaceCard = React144.memo(({
|
|
|
70540
70534
|
isClickable,
|
|
70541
70535
|
onWorkspaceClick,
|
|
70542
70536
|
getMedalIcon,
|
|
70543
|
-
metricLabel
|
|
70544
|
-
isAssemblyMode
|
|
70537
|
+
metricLabel
|
|
70545
70538
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
70546
70539
|
motion.div,
|
|
70547
70540
|
{
|
|
@@ -70568,13 +70561,13 @@ var MobileWorkspaceCard = React144.memo(({
|
|
|
70568
70561
|
] })
|
|
70569
70562
|
] }),
|
|
70570
70563
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-right", children: [
|
|
70571
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-gray-900 text-lg flex justify-end", children: renderWorkspaceLeaderboardMetric(workspace
|
|
70564
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-gray-900 text-lg flex justify-end", children: renderWorkspaceLeaderboardMetric(workspace) }),
|
|
70572
70565
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: getWorkspaceLeaderboardMetricLabel(workspace, metricLabel) })
|
|
70573
70566
|
] })
|
|
70574
70567
|
] })
|
|
70575
70568
|
}
|
|
70576
70569
|
), (prevProps, nextProps) => {
|
|
70577
|
-
return prevProps.metricLabel === nextProps.metricLabel && prevProps.
|
|
70570
|
+
return prevProps.metricLabel === nextProps.metricLabel && prevProps.rank === nextProps.rank && prevProps.cardClass === nextProps.cardClass && prevProps.isClickable === nextProps.isClickable && prevProps.workspace.workspace_uuid === nextProps.workspace.workspace_uuid && prevProps.workspace.leaderboard_value === nextProps.workspace.leaderboard_value && prevProps.workspace.avg_recent_flow === nextProps.workspace.avg_recent_flow && prevProps.workspace.leaderboard_metric_kind === nextProps.workspace.leaderboard_metric_kind && prevProps.workspace.efficiency === nextProps.workspace.efficiency && prevProps.workspace.ideal_cycle_time === nextProps.workspace.ideal_cycle_time && prevProps.workspace.action_count === nextProps.workspace.action_count && prevProps.workspace.action_threshold === nextProps.workspace.action_threshold && prevProps.workspace.avg_cycle_time === nextProps.workspace.avg_cycle_time && prevProps.workspace.displayName === nextProps.workspace.displayName && prevProps.workspace.lineName === nextProps.workspace.lineName;
|
|
70578
70571
|
});
|
|
70579
70572
|
MobileWorkspaceCard.displayName = "MobileWorkspaceCard";
|
|
70580
70573
|
var DesktopWorkspaceRow = React144.memo(({
|
|
@@ -70583,8 +70576,7 @@ var DesktopWorkspaceRow = React144.memo(({
|
|
|
70583
70576
|
rowClass,
|
|
70584
70577
|
isClickable,
|
|
70585
70578
|
onWorkspaceClick,
|
|
70586
|
-
getMedalIcon
|
|
70587
|
-
isAssemblyMode
|
|
70579
|
+
getMedalIcon
|
|
70588
70580
|
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
70589
70581
|
motion.tr,
|
|
70590
70582
|
{
|
|
@@ -70601,11 +70593,11 @@ var DesktopWorkspaceRow = React144.memo(({
|
|
|
70601
70593
|
] }) }),
|
|
70602
70594
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: workspace.displayName }) }),
|
|
70603
70595
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: workspace.lineName }) }),
|
|
70604
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className:
|
|
70596
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base font-medium whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col", children: renderWorkspaceLeaderboardMetric(workspace) }) })
|
|
70605
70597
|
]
|
|
70606
70598
|
}
|
|
70607
70599
|
), (prevProps, nextProps) => {
|
|
70608
|
-
return prevProps.index === nextProps.index && prevProps.rowClass === nextProps.rowClass && prevProps.isClickable === nextProps.isClickable && prevProps.
|
|
70600
|
+
return prevProps.index === nextProps.index && prevProps.rowClass === nextProps.rowClass && prevProps.isClickable === nextProps.isClickable && prevProps.workspace.workspace_uuid === nextProps.workspace.workspace_uuid && prevProps.workspace.leaderboard_value === nextProps.workspace.leaderboard_value && prevProps.workspace.avg_recent_flow === nextProps.workspace.avg_recent_flow && prevProps.workspace.leaderboard_metric_kind === nextProps.workspace.leaderboard_metric_kind && prevProps.workspace.efficiency === nextProps.workspace.efficiency && prevProps.workspace.ideal_cycle_time === nextProps.workspace.ideal_cycle_time && prevProps.workspace.avg_cycle_time === nextProps.workspace.avg_cycle_time && prevProps.workspace.displayName === nextProps.workspace.displayName && prevProps.workspace.lineName === nextProps.workspace.lineName;
|
|
70609
70601
|
});
|
|
70610
70602
|
DesktopWorkspaceRow.displayName = "DesktopWorkspaceRow";
|
|
70611
70603
|
var LeaderboardDetailView = React144.memo(({
|
|
@@ -71381,14 +71373,6 @@ var LeaderboardDetailView = React144.memo(({
|
|
|
71381
71373
|
filtered = filtered.filter((ws) => ws.shift_id?.toString() === selectedShiftFilter);
|
|
71382
71374
|
}
|
|
71383
71375
|
return filtered.sort((a, b) => {
|
|
71384
|
-
if (isAssemblyMode) {
|
|
71385
|
-
const ratioA = getCycleRatio(a);
|
|
71386
|
-
const ratioB = getCycleRatio(b);
|
|
71387
|
-
if (ratioA === null && ratioB === null) return 0;
|
|
71388
|
-
if (ratioA === null) return 1;
|
|
71389
|
-
if (ratioB === null) return -1;
|
|
71390
|
-
return sortAscending ? ratioA - ratioB : ratioB - ratioA;
|
|
71391
|
-
}
|
|
71392
71376
|
const metricA = getWorkspaceLeaderboardMetricValue(a);
|
|
71393
71377
|
const metricB = getWorkspaceLeaderboardMetricValue(b);
|
|
71394
71378
|
if (metricA === null && metricB === null) return 0;
|
|
@@ -71458,7 +71442,13 @@ var LeaderboardDetailView = React144.memo(({
|
|
|
71458
71442
|
error.message
|
|
71459
71443
|
] }) });
|
|
71460
71444
|
}
|
|
71461
|
-
const
|
|
71445
|
+
const hasRecentFlowLeaderboardRows = sortedWorkspaces.some(
|
|
71446
|
+
(workspace) => workspace.leaderboard_metric_kind === "recent_flow_shift_average"
|
|
71447
|
+
);
|
|
71448
|
+
const hasEfficiencyLeaderboardRows = sortedWorkspaces.some(
|
|
71449
|
+
(workspace) => workspace.leaderboard_metric_kind !== "recent_flow_shift_average"
|
|
71450
|
+
);
|
|
71451
|
+
const metricLabel = viewType === "machine" ? "Utilization" : hasRecentFlowLeaderboardRows && !hasEfficiencyLeaderboardRows ? "Avg Flow" : hasRecentFlowLeaderboardRows && hasEfficiencyLeaderboardRows ? "Performance" : "Efficiency";
|
|
71462
71452
|
const descendingSortLabel = "Highest to Lowest";
|
|
71463
71453
|
const ascendingSortLabel = "Lowest to Highest";
|
|
71464
71454
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, style: { willChange: "contents" }, children: [
|
|
@@ -71722,8 +71712,7 @@ var LeaderboardDetailView = React144.memo(({
|
|
|
71722
71712
|
isClickable: canOpenWorkspace(ws.line_id),
|
|
71723
71713
|
onWorkspaceClick: stableHandleWorkspaceClick,
|
|
71724
71714
|
getMedalIcon: stableGetMedalIcon,
|
|
71725
|
-
metricLabel
|
|
71726
|
-
isAssemblyMode
|
|
71715
|
+
metricLabel
|
|
71727
71716
|
},
|
|
71728
71717
|
ws.workspace_uuid
|
|
71729
71718
|
);
|
|
@@ -71747,8 +71736,7 @@ var LeaderboardDetailView = React144.memo(({
|
|
|
71747
71736
|
rowClass,
|
|
71748
71737
|
isClickable: canOpenWorkspace(ws.line_id),
|
|
71749
71738
|
onWorkspaceClick: stableHandleWorkspaceClick,
|
|
71750
|
-
getMedalIcon: stableGetMedalIcon
|
|
71751
|
-
isAssemblyMode
|
|
71739
|
+
getMedalIcon: stableGetMedalIcon
|
|
71752
71740
|
},
|
|
71753
71741
|
ws.workspace_uuid
|
|
71754
71742
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -70441,20 +70441,14 @@ var AnimatedEfficiency = memo$1(({ value }) => {
|
|
|
70441
70441
|
});
|
|
70442
70442
|
AnimatedEfficiency.displayName = "AnimatedEfficiency";
|
|
70443
70443
|
var getWorkspaceLeaderboardMetricValue = (workspace) => {
|
|
70444
|
-
if (workspace.monitoring_mode === "output") {
|
|
70445
|
-
return toFiniteNumber(workspace.efficiency);
|
|
70446
|
-
}
|
|
70447
70444
|
if (workspace.leaderboard_metric_kind === "recent_flow_shift_average") {
|
|
70448
|
-
return toFiniteNumber(workspace.leaderboard_value);
|
|
70445
|
+
return toFiniteNumber(workspace.leaderboard_value) ?? toFiniteNumber(workspace.avg_recent_flow);
|
|
70449
70446
|
}
|
|
70450
70447
|
return toFiniteNumber(workspace.leaderboard_value) ?? toFiniteNumber(workspace.efficiency);
|
|
70451
70448
|
};
|
|
70452
70449
|
var getWorkspaceDisplayedMetricValue = (workspace) => getWorkspaceLeaderboardMetricValue(workspace);
|
|
70453
|
-
var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.
|
|
70454
|
-
var renderWorkspaceLeaderboardMetric = (workspace
|
|
70455
|
-
if (isAssemblyMode) {
|
|
70456
|
-
return /* @__PURE__ */ jsx(CycleTimeComparison, { workspace });
|
|
70457
|
-
}
|
|
70450
|
+
var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.leaderboard_metric_kind === "recent_flow_shift_average" ? "Avg Flow" : defaultLabel;
|
|
70451
|
+
var renderWorkspaceLeaderboardMetric = (workspace) => {
|
|
70458
70452
|
const displayedMetricValue = getWorkspaceDisplayedMetricValue(workspace);
|
|
70459
70453
|
if (displayedMetricValue === null) {
|
|
70460
70454
|
return /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: "--" });
|
|
@@ -70511,8 +70505,7 @@ var MobileWorkspaceCard = memo$1(({
|
|
|
70511
70505
|
isClickable,
|
|
70512
70506
|
onWorkspaceClick,
|
|
70513
70507
|
getMedalIcon,
|
|
70514
|
-
metricLabel
|
|
70515
|
-
isAssemblyMode
|
|
70508
|
+
metricLabel
|
|
70516
70509
|
}) => /* @__PURE__ */ jsx(
|
|
70517
70510
|
motion.div,
|
|
70518
70511
|
{
|
|
@@ -70539,13 +70532,13 @@ var MobileWorkspaceCard = memo$1(({
|
|
|
70539
70532
|
] })
|
|
70540
70533
|
] }),
|
|
70541
70534
|
/* @__PURE__ */ jsxs("div", { className: "text-right", children: [
|
|
70542
|
-
/* @__PURE__ */ jsx("div", { className: "font-bold text-gray-900 text-lg flex justify-end", children: renderWorkspaceLeaderboardMetric(workspace
|
|
70535
|
+
/* @__PURE__ */ jsx("div", { className: "font-bold text-gray-900 text-lg flex justify-end", children: renderWorkspaceLeaderboardMetric(workspace) }),
|
|
70543
70536
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-gray-500", children: getWorkspaceLeaderboardMetricLabel(workspace, metricLabel) })
|
|
70544
70537
|
] })
|
|
70545
70538
|
] })
|
|
70546
70539
|
}
|
|
70547
70540
|
), (prevProps, nextProps) => {
|
|
70548
|
-
return prevProps.metricLabel === nextProps.metricLabel && prevProps.
|
|
70541
|
+
return prevProps.metricLabel === nextProps.metricLabel && prevProps.rank === nextProps.rank && prevProps.cardClass === nextProps.cardClass && prevProps.isClickable === nextProps.isClickable && prevProps.workspace.workspace_uuid === nextProps.workspace.workspace_uuid && prevProps.workspace.leaderboard_value === nextProps.workspace.leaderboard_value && prevProps.workspace.avg_recent_flow === nextProps.workspace.avg_recent_flow && prevProps.workspace.leaderboard_metric_kind === nextProps.workspace.leaderboard_metric_kind && prevProps.workspace.efficiency === nextProps.workspace.efficiency && prevProps.workspace.ideal_cycle_time === nextProps.workspace.ideal_cycle_time && prevProps.workspace.action_count === nextProps.workspace.action_count && prevProps.workspace.action_threshold === nextProps.workspace.action_threshold && prevProps.workspace.avg_cycle_time === nextProps.workspace.avg_cycle_time && prevProps.workspace.displayName === nextProps.workspace.displayName && prevProps.workspace.lineName === nextProps.workspace.lineName;
|
|
70549
70542
|
});
|
|
70550
70543
|
MobileWorkspaceCard.displayName = "MobileWorkspaceCard";
|
|
70551
70544
|
var DesktopWorkspaceRow = memo$1(({
|
|
@@ -70554,8 +70547,7 @@ var DesktopWorkspaceRow = memo$1(({
|
|
|
70554
70547
|
rowClass,
|
|
70555
70548
|
isClickable,
|
|
70556
70549
|
onWorkspaceClick,
|
|
70557
|
-
getMedalIcon
|
|
70558
|
-
isAssemblyMode
|
|
70550
|
+
getMedalIcon
|
|
70559
70551
|
}) => /* @__PURE__ */ jsxs(
|
|
70560
70552
|
motion.tr,
|
|
70561
70553
|
{
|
|
@@ -70572,11 +70564,11 @@ var DesktopWorkspaceRow = memo$1(({
|
|
|
70572
70564
|
] }) }),
|
|
70573
70565
|
/* @__PURE__ */ jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base whitespace-nowrap", children: /* @__PURE__ */ jsx("div", { className: "font-medium", children: workspace.displayName }) }),
|
|
70574
70566
|
/* @__PURE__ */ jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base whitespace-nowrap", children: /* @__PURE__ */ jsx("div", { className: "font-medium", children: workspace.lineName }) }),
|
|
70575
|
-
/* @__PURE__ */ jsx("td", { className:
|
|
70567
|
+
/* @__PURE__ */ jsx("td", { className: "px-3 py-2.5 sm:p-4 text-sm sm:text-base font-medium whitespace-nowrap", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: renderWorkspaceLeaderboardMetric(workspace) }) })
|
|
70576
70568
|
]
|
|
70577
70569
|
}
|
|
70578
70570
|
), (prevProps, nextProps) => {
|
|
70579
|
-
return prevProps.index === nextProps.index && prevProps.rowClass === nextProps.rowClass && prevProps.isClickable === nextProps.isClickable && prevProps.
|
|
70571
|
+
return prevProps.index === nextProps.index && prevProps.rowClass === nextProps.rowClass && prevProps.isClickable === nextProps.isClickable && prevProps.workspace.workspace_uuid === nextProps.workspace.workspace_uuid && prevProps.workspace.leaderboard_value === nextProps.workspace.leaderboard_value && prevProps.workspace.avg_recent_flow === nextProps.workspace.avg_recent_flow && prevProps.workspace.leaderboard_metric_kind === nextProps.workspace.leaderboard_metric_kind && prevProps.workspace.efficiency === nextProps.workspace.efficiency && prevProps.workspace.ideal_cycle_time === nextProps.workspace.ideal_cycle_time && prevProps.workspace.avg_cycle_time === nextProps.workspace.avg_cycle_time && prevProps.workspace.displayName === nextProps.workspace.displayName && prevProps.workspace.lineName === nextProps.workspace.lineName;
|
|
70580
70572
|
});
|
|
70581
70573
|
DesktopWorkspaceRow.displayName = "DesktopWorkspaceRow";
|
|
70582
70574
|
var LeaderboardDetailView = memo$1(({
|
|
@@ -71352,14 +71344,6 @@ var LeaderboardDetailView = memo$1(({
|
|
|
71352
71344
|
filtered = filtered.filter((ws) => ws.shift_id?.toString() === selectedShiftFilter);
|
|
71353
71345
|
}
|
|
71354
71346
|
return filtered.sort((a, b) => {
|
|
71355
|
-
if (isAssemblyMode) {
|
|
71356
|
-
const ratioA = getCycleRatio(a);
|
|
71357
|
-
const ratioB = getCycleRatio(b);
|
|
71358
|
-
if (ratioA === null && ratioB === null) return 0;
|
|
71359
|
-
if (ratioA === null) return 1;
|
|
71360
|
-
if (ratioB === null) return -1;
|
|
71361
|
-
return sortAscending ? ratioA - ratioB : ratioB - ratioA;
|
|
71362
|
-
}
|
|
71363
71347
|
const metricA = getWorkspaceLeaderboardMetricValue(a);
|
|
71364
71348
|
const metricB = getWorkspaceLeaderboardMetricValue(b);
|
|
71365
71349
|
if (metricA === null && metricB === null) return 0;
|
|
@@ -71429,7 +71413,13 @@ var LeaderboardDetailView = memo$1(({
|
|
|
71429
71413
|
error.message
|
|
71430
71414
|
] }) });
|
|
71431
71415
|
}
|
|
71432
|
-
const
|
|
71416
|
+
const hasRecentFlowLeaderboardRows = sortedWorkspaces.some(
|
|
71417
|
+
(workspace) => workspace.leaderboard_metric_kind === "recent_flow_shift_average"
|
|
71418
|
+
);
|
|
71419
|
+
const hasEfficiencyLeaderboardRows = sortedWorkspaces.some(
|
|
71420
|
+
(workspace) => workspace.leaderboard_metric_kind !== "recent_flow_shift_average"
|
|
71421
|
+
);
|
|
71422
|
+
const metricLabel = viewType === "machine" ? "Utilization" : hasRecentFlowLeaderboardRows && !hasEfficiencyLeaderboardRows ? "Avg Flow" : hasRecentFlowLeaderboardRows && hasEfficiencyLeaderboardRows ? "Performance" : "Efficiency";
|
|
71433
71423
|
const descendingSortLabel = "Highest to Lowest";
|
|
71434
71424
|
const ascendingSortLabel = "Lowest to Highest";
|
|
71435
71425
|
return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, style: { willChange: "contents" }, children: [
|
|
@@ -71693,8 +71683,7 @@ var LeaderboardDetailView = memo$1(({
|
|
|
71693
71683
|
isClickable: canOpenWorkspace(ws.line_id),
|
|
71694
71684
|
onWorkspaceClick: stableHandleWorkspaceClick,
|
|
71695
71685
|
getMedalIcon: stableGetMedalIcon,
|
|
71696
|
-
metricLabel
|
|
71697
|
-
isAssemblyMode
|
|
71686
|
+
metricLabel
|
|
71698
71687
|
},
|
|
71699
71688
|
ws.workspace_uuid
|
|
71700
71689
|
);
|
|
@@ -71718,8 +71707,7 @@ var LeaderboardDetailView = memo$1(({
|
|
|
71718
71707
|
rowClass,
|
|
71719
71708
|
isClickable: canOpenWorkspace(ws.line_id),
|
|
71720
71709
|
onWorkspaceClick: stableHandleWorkspaceClick,
|
|
71721
|
-
getMedalIcon: stableGetMedalIcon
|
|
71722
|
-
isAssemblyMode
|
|
71710
|
+
getMedalIcon: stableGetMedalIcon
|
|
71723
71711
|
},
|
|
71724
71712
|
ws.workspace_uuid
|
|
71725
71713
|
);
|