@optifye/dashboard-core 6.12.14 → 6.12.16
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/automation.d.ts +1 -0
- package/automation.js +1 -0
- package/dist/automation-Hl2PFMb3.d.mts +444 -0
- package/dist/automation-Hl2PFMb3.d.ts +444 -0
- package/dist/automation.d.mts +2 -0
- package/dist/automation.d.ts +2 -0
- package/dist/automation.js +2312 -0
- package/dist/automation.mjs +2305 -0
- package/dist/index.d.mts +5 -421
- package/dist/index.d.ts +5 -421
- package/dist/index.js +324 -19
- package/dist/index.mjs +324 -20
- package/package.json +11 -2
package/dist/index.mjs
CHANGED
|
@@ -5567,8 +5567,9 @@ var dashboardService = {
|
|
|
5567
5567
|
total_output: item.total_output || 0,
|
|
5568
5568
|
avg_cycle_time: item.avg_cycle_time || 0,
|
|
5569
5569
|
ideal_cycle_time: item.ideal_cycle_time ?? 0,
|
|
5570
|
-
ideal_output: item.ideal_output
|
|
5571
|
-
total_day_output: item.total_day_output ?? item.ideal_output ?? 0,
|
|
5570
|
+
ideal_output: item.target_output ?? item.ideal_output ?? 0,
|
|
5571
|
+
total_day_output: item.target_output ?? item.total_day_output ?? item.ideal_output ?? 0,
|
|
5572
|
+
target_output: item.target_output ?? item.total_day_output ?? item.ideal_output ?? 0,
|
|
5572
5573
|
avg_pph: item.avg_pph || 0,
|
|
5573
5574
|
pph_threshold: item.pph_threshold || 0,
|
|
5574
5575
|
workspace_rank: item.workspace_rank || 0,
|
|
@@ -13967,7 +13968,7 @@ var useLineWorkspaceMetrics = (lineId, options) => {
|
|
|
13967
13968
|
trend: item.trend_score === 1 ? 2 : 0,
|
|
13968
13969
|
predicted_output: item.ideal_output || 0,
|
|
13969
13970
|
efficiency: item.efficiency || 0,
|
|
13970
|
-
action_threshold: item.total_day_output
|
|
13971
|
+
action_threshold: item.target_output ?? item.total_day_output_recalculated ?? item.total_day_output ?? 0,
|
|
13971
13972
|
idle_time: item.idle_time ?? void 0,
|
|
13972
13973
|
idle_time_hourly: item.idle_time_hourly || null,
|
|
13973
13974
|
shift_start: item.shift_start || void 0,
|
|
@@ -14648,7 +14649,7 @@ var transformMonitorWorkspaceMetrics = ({
|
|
|
14648
14649
|
trend: item.trend_score === 1 ? 2 : 0,
|
|
14649
14650
|
predicted_output: item.ideal_output || 0,
|
|
14650
14651
|
efficiency: item.efficiency || 0,
|
|
14651
|
-
action_threshold: item.total_day_output
|
|
14652
|
+
action_threshold: item.target_output ?? item.total_day_output_recalculated ?? item.total_day_output ?? 0,
|
|
14652
14653
|
monitoring_mode: item.monitoring_mode ?? void 0,
|
|
14653
14654
|
idle_time: idleTimeSeconds,
|
|
14654
14655
|
idle_time_hourly: item.idle_time_hourly ?? null,
|
|
@@ -16818,6 +16819,7 @@ function useHlsStream(videoRef, { src, shouldPlay, onFatalError, hlsConfig }) {
|
|
|
16818
16819
|
return url.includes(proxyBaseUrl);
|
|
16819
16820
|
}
|
|
16820
16821
|
};
|
|
16822
|
+
const isSnapshotStreamUrl = (url) => url.includes("/api/automation/snapshot/stream/");
|
|
16821
16823
|
const getR2CameraUuid = (url) => {
|
|
16822
16824
|
try {
|
|
16823
16825
|
const parsed = new URL(url);
|
|
@@ -17406,11 +17408,16 @@ function useHlsStream(videoRef, { src, shouldPlay, onFatalError, hlsConfig }) {
|
|
|
17406
17408
|
return;
|
|
17407
17409
|
}
|
|
17408
17410
|
if (Hls.isSupported() && !isNativeHlsRef.current) {
|
|
17411
|
+
const usesSnapshotStream = isSnapshotStreamUrl(resolvedHlsSrc);
|
|
17409
17412
|
const mergedConfig = {
|
|
17410
17413
|
...HLS_CONFIG,
|
|
17411
17414
|
...hlsConfig,
|
|
17415
|
+
enableWorker: usesSnapshotStream ? false : hlsConfig?.enableWorker ?? HLS_CONFIG.enableWorker,
|
|
17412
17416
|
xhrSetup: (xhr, url) => {
|
|
17413
17417
|
const usesProxy = isProxyUrl(url);
|
|
17418
|
+
if (isSnapshotStreamUrl(url)) {
|
|
17419
|
+
xhr.withCredentials = true;
|
|
17420
|
+
}
|
|
17414
17421
|
if (isR2WorkerUrl(url, r2WorkerDomain) || usesProxy) {
|
|
17415
17422
|
if (isManifestUrl(url)) {
|
|
17416
17423
|
xhr.open("GET", buildCacheBustedUrl(url), true);
|
|
@@ -17424,7 +17431,11 @@ function useHlsStream(videoRef, { src, shouldPlay, onFatalError, hlsConfig }) {
|
|
|
17424
17431
|
const isR2Url = isR2WorkerUrl(context.url, r2WorkerDomain);
|
|
17425
17432
|
const isManifestRequest = isManifestUrl(context.url);
|
|
17426
17433
|
const usesProxy = isProxyUrl(context.url);
|
|
17434
|
+
const isSnapshotStream = isSnapshotStreamUrl(context.url);
|
|
17427
17435
|
let requestUrl = context.url;
|
|
17436
|
+
if (isSnapshotStream) {
|
|
17437
|
+
initParams.credentials = "include";
|
|
17438
|
+
}
|
|
17428
17439
|
if (isR2Url || usesProxy) {
|
|
17429
17440
|
if (authToken) {
|
|
17430
17441
|
initParams.headers = {
|
|
@@ -18829,6 +18840,7 @@ var useAllWorkspaceMetrics = (options) => {
|
|
|
18829
18840
|
trend_score,
|
|
18830
18841
|
line_id,
|
|
18831
18842
|
total_day_output,
|
|
18843
|
+
total_day_output_recalculated,
|
|
18832
18844
|
workspace_display_name
|
|
18833
18845
|
`).eq("date", fallbackQueryDate).eq("shift_id", fallbackQueryShiftId).in("workspace_id", allEnabledWorkspaceIds).order("efficiency", { ascending: false });
|
|
18834
18846
|
if (fetchError) throw fetchError;
|
|
@@ -18847,7 +18859,7 @@ var useAllWorkspaceMetrics = (options) => {
|
|
|
18847
18859
|
trend: item.trend_score === 1 ? 2 : 0,
|
|
18848
18860
|
predicted_output: 0,
|
|
18849
18861
|
efficiency: item.efficiency || 0,
|
|
18850
|
-
action_threshold: item.total_day_output
|
|
18862
|
+
action_threshold: item.target_output ?? item.total_day_output_recalculated ?? item.total_day_output ?? 0
|
|
18851
18863
|
}));
|
|
18852
18864
|
} else if (shiftGroups.length > 0) {
|
|
18853
18865
|
console.log(`[useAllWorkspaceMetrics] \u{1F3ED} Fetching per-shift: ${shiftGroups.length} group(s)`);
|
|
@@ -18874,6 +18886,7 @@ var useAllWorkspaceMetrics = (options) => {
|
|
|
18874
18886
|
trend_score,
|
|
18875
18887
|
line_id,
|
|
18876
18888
|
total_day_output,
|
|
18889
|
+
total_day_output_recalculated,
|
|
18877
18890
|
workspace_display_name
|
|
18878
18891
|
`).eq("date", group.date).eq("shift_id", group.shiftId).in("workspace_id", groupWorkspaceIds);
|
|
18879
18892
|
if (fetchError) throw fetchError;
|
|
@@ -18892,7 +18905,7 @@ var useAllWorkspaceMetrics = (options) => {
|
|
|
18892
18905
|
trend: item.trend_score === 1 ? 2 : 0,
|
|
18893
18906
|
predicted_output: 0,
|
|
18894
18907
|
efficiency: item.efficiency || 0,
|
|
18895
|
-
action_threshold: item.total_day_output
|
|
18908
|
+
action_threshold: item.target_output ?? item.total_day_output_recalculated ?? item.total_day_output ?? 0
|
|
18896
18909
|
}));
|
|
18897
18910
|
});
|
|
18898
18911
|
const results = await Promise.all(queryPromises);
|
|
@@ -51706,12 +51719,15 @@ var LinePdfGenerator = ({
|
|
|
51706
51719
|
doc.setTextColor(0, 0, 0);
|
|
51707
51720
|
const kpiStartY = 80;
|
|
51708
51721
|
const kpiSpacing = 10;
|
|
51722
|
+
const dayTargetOutput = Math.round(Number(
|
|
51723
|
+
lineInfo.metrics.output_target_recalculated ?? lineInfo.metrics.line_threshold ?? 0
|
|
51724
|
+
));
|
|
51709
51725
|
createKPIBox(kpiStartY);
|
|
51710
51726
|
doc.setFontSize(11);
|
|
51711
51727
|
doc.setFont("helvetica", "normal");
|
|
51712
51728
|
doc.text("Output:", 25, kpiStartY);
|
|
51713
51729
|
doc.setFont("helvetica", "bold");
|
|
51714
|
-
doc.text(`${lineInfo.metrics.current_output} / ${
|
|
51730
|
+
doc.text(`${lineInfo.metrics.current_output} / ${dayTargetOutput}`, 120, kpiStartY);
|
|
51715
51731
|
createKPIBox(kpiStartY + kpiSpacing);
|
|
51716
51732
|
doc.setFont("helvetica", "normal");
|
|
51717
51733
|
doc.text("Average Efficiency:", 25, kpiStartY + kpiSpacing);
|
|
@@ -51746,6 +51762,18 @@ var LinePdfGenerator = ({
|
|
|
51746
51762
|
fallbackHours: Math.max(hourlyTimeRanges.length, 1),
|
|
51747
51763
|
rounding: "floor"
|
|
51748
51764
|
});
|
|
51765
|
+
const backendHourlyTargetOutput = lineInfo.metrics.hourly_target_output;
|
|
51766
|
+
const shouldUseBackendHourlyTargets = backendHourlyTargetOutput !== void 0;
|
|
51767
|
+
const resolveTargetForRange = (index) => {
|
|
51768
|
+
if (shouldUseBackendHourlyTargets) {
|
|
51769
|
+
if (!Array.isArray(backendHourlyTargetOutput)) return null;
|
|
51770
|
+
const targetValue = backendHourlyTargetOutput[index];
|
|
51771
|
+
if (targetValue === null || targetValue === void 0) return null;
|
|
51772
|
+
const numericTarget = Number(targetValue);
|
|
51773
|
+
return Number.isFinite(numericTarget) ? numericTarget : null;
|
|
51774
|
+
}
|
|
51775
|
+
return targetPlan.targets[index] ?? 0;
|
|
51776
|
+
};
|
|
51749
51777
|
const skuRemarksByIndex = {};
|
|
51750
51778
|
if (lineInfo.metrics.sku_segments && lineInfo.metrics.sku_segments.length > 0) {
|
|
51751
51779
|
lineInfo.metrics.sku_segments.forEach((segment, segmentIndex) => {
|
|
@@ -51975,8 +52003,9 @@ var LinePdfGenerator = ({
|
|
|
51975
52003
|
doc.setDrawColor(200, 200, 200);
|
|
51976
52004
|
doc.line(20, rowBottomY, 190, rowBottomY);
|
|
51977
52005
|
}
|
|
51978
|
-
const targetForRange =
|
|
51979
|
-
const
|
|
52006
|
+
const targetForRange = resolveTargetForRange(index);
|
|
52007
|
+
const roundedTargetForRange = targetForRange === null ? null : Math.round(targetForRange);
|
|
52008
|
+
const targetStr = roundedTargetForRange === null ? "-" : roundedTargetForRange.toString();
|
|
51980
52009
|
let remarkText = targetPlan.breakRemarks[index] || "";
|
|
51981
52010
|
if (skuRemarksByIndex[index] && skuRemarksByIndex[index].length > 0) {
|
|
51982
52011
|
const skuRemarks = skuRemarksByIndex[index];
|
|
@@ -51998,7 +52027,10 @@ var LinePdfGenerator = ({
|
|
|
51998
52027
|
if (!dataCollected) {
|
|
51999
52028
|
doc.setTextColor(100, 100, 100);
|
|
52000
52029
|
doc.text("-", 135, yPos);
|
|
52001
|
-
} else if (
|
|
52030
|
+
} else if (roundedTargetForRange === null) {
|
|
52031
|
+
doc.setTextColor(100, 100, 100);
|
|
52032
|
+
doc.text("-", 135, yPos);
|
|
52033
|
+
} else if (actualOutput >= roundedTargetForRange) {
|
|
52002
52034
|
doc.setTextColor(0, 171, 69);
|
|
52003
52035
|
doc.setFont("ZapfDingbats", "normal");
|
|
52004
52036
|
doc.text("4", 135, yPos);
|
|
@@ -53760,6 +53792,19 @@ var WorkspacePdfGenerator = ({
|
|
|
53760
53792
|
fallbackHours: Math.max(hourlyData.length, 1),
|
|
53761
53793
|
rounding: "floor"
|
|
53762
53794
|
}) : null;
|
|
53795
|
+
const backendHourlyTargetOutput = workspace.hourly_target_output;
|
|
53796
|
+
const shouldUseBackendHourlyTargets = backendHourlyTargetOutput !== void 0;
|
|
53797
|
+
const resolveTargetForRange = (index) => {
|
|
53798
|
+
if (!outputTargetPlan) return null;
|
|
53799
|
+
if (shouldUseBackendHourlyTargets) {
|
|
53800
|
+
if (!Array.isArray(backendHourlyTargetOutput)) return null;
|
|
53801
|
+
const targetValue = backendHourlyTargetOutput[index];
|
|
53802
|
+
if (targetValue === null || targetValue === void 0) return null;
|
|
53803
|
+
const numericTarget = Number(targetValue);
|
|
53804
|
+
return Number.isFinite(numericTarget) ? numericTarget : null;
|
|
53805
|
+
}
|
|
53806
|
+
return outputTargetPlan.targets[index] ?? hourlyTarget;
|
|
53807
|
+
};
|
|
53763
53808
|
const skuRemarksByIndex = {};
|
|
53764
53809
|
if (workspace.sku_segments && workspace.sku_segments.length > 0) {
|
|
53765
53810
|
workspace.sku_segments.forEach((segment, segmentIndex) => {
|
|
@@ -53886,7 +53931,7 @@ var WorkspacePdfGenerator = ({
|
|
|
53886
53931
|
const idleValue = isUptimeMode ? entry.idleMinutes ?? 0 : 0;
|
|
53887
53932
|
const uptimePercent = isUptimeMode ? entry.uptimePercent ?? 0 : 0;
|
|
53888
53933
|
const outputStr = dataCollected ? outputValue.toString() : "TBD";
|
|
53889
|
-
const effectiveTarget =
|
|
53934
|
+
const effectiveTarget = resolveTargetForRange(index);
|
|
53890
53935
|
let remarkText = outputTargetPlan?.breakRemarks[index] || "";
|
|
53891
53936
|
if (skuRemarksByIndex[index] && skuRemarksByIndex[index].length > 0) {
|
|
53892
53937
|
const skuRemarks = skuRemarksByIndex[index];
|
|
@@ -53894,7 +53939,8 @@ var WorkspacePdfGenerator = ({
|
|
|
53894
53939
|
const compactSkuRemark = skuRemarks.length === 1 ? `${latestSku} started` : `${latestSku} started, +${skuRemarks.length - 1}`;
|
|
53895
53940
|
remarkText = remarkText ? `${remarkText}, ${compactSkuRemark}` : compactSkuRemark;
|
|
53896
53941
|
}
|
|
53897
|
-
const
|
|
53942
|
+
const roundedEffectiveTarget = effectiveTarget === null ? null : Math.round(effectiveTarget);
|
|
53943
|
+
const targetStr = isUptimeMode ? dataCollected ? idleValue.toString() : "TBD" : roundedEffectiveTarget === null ? "-" : roundedEffectiveTarget.toString();
|
|
53898
53944
|
if (index < totalRows - 1) {
|
|
53899
53945
|
const rowBottomY = headerBottomY + (index + 1) * rowHeight;
|
|
53900
53946
|
doc.setDrawColor(200, 200, 200);
|
|
@@ -53937,7 +53983,10 @@ var WorkspacePdfGenerator = ({
|
|
|
53937
53983
|
if (!dataCollected) {
|
|
53938
53984
|
doc.setTextColor(100, 100, 100);
|
|
53939
53985
|
doc.text("-", 135, yPos);
|
|
53940
|
-
} else if (
|
|
53986
|
+
} else if (roundedEffectiveTarget === null) {
|
|
53987
|
+
doc.setTextColor(100, 100, 100);
|
|
53988
|
+
doc.text("-", 135, yPos);
|
|
53989
|
+
} else if (outputValue >= roundedEffectiveTarget) {
|
|
53941
53990
|
doc.setTextColor(0, 171, 69);
|
|
53942
53991
|
doc.setFont("ZapfDingbats", "normal");
|
|
53943
53992
|
doc.text("4", 135, yPos);
|
|
@@ -65506,6 +65555,7 @@ var buildLineInfoSnapshot = (lineDetails, metrics2) => {
|
|
|
65506
65555
|
output_array: metrics2.output_array || [],
|
|
65507
65556
|
output_hourly: metrics2.output_hourly,
|
|
65508
65557
|
hourly_target_output: metrics2.hourly_target_output,
|
|
65558
|
+
hourly_target_output_by_sku: metrics2.hourly_target_output_by_sku,
|
|
65509
65559
|
line_threshold: metrics2.line_threshold ?? 0,
|
|
65510
65560
|
output_target_recalculated: metrics2.output_target_recalculated ?? null,
|
|
65511
65561
|
threshold_pph: metrics2.threshold_pph ?? 0,
|
|
@@ -65539,7 +65589,7 @@ var transformWorkspaceMetrics = (workspaceData, lineId, companyId, queryDate, qu
|
|
|
65539
65589
|
trend: item.trend_score === 1 ? 2 : 0,
|
|
65540
65590
|
predicted_output: item.ideal_output || 0,
|
|
65541
65591
|
efficiency: item.efficiency || 0,
|
|
65542
|
-
action_threshold: item.total_day_output
|
|
65592
|
+
action_threshold: item.target_output ?? item.total_day_output_recalculated ?? item.total_day_output ?? 0,
|
|
65543
65593
|
idle_time: item.idle_time ?? void 0,
|
|
65544
65594
|
idle_time_hourly: item.idle_time_hourly || null,
|
|
65545
65595
|
shift_start: item.shift_start || void 0,
|
|
@@ -67334,9 +67384,9 @@ var KPIDetailView = ({
|
|
|
67334
67384
|
output: metric.current_output || 0,
|
|
67335
67385
|
// LineMonthlyHistory expects `idealOutput` for the red dotted target ReferenceLine.
|
|
67336
67386
|
// `line_threshold` comes from `line_metrics` (numeric -> string via PostgREST), so coerce.
|
|
67337
|
-
idealOutput: Number(metric.line_threshold ?? metric.ideal_output ?? 0),
|
|
67387
|
+
idealOutput: Number(metric.target_output ?? metric.line_threshold ?? metric.ideal_output ?? 0),
|
|
67338
67388
|
// Keep legacy field in case any downstream code still reads it.
|
|
67339
|
-
targetOutput: Number(metric.line_threshold ?? metric.ideal_output ?? 0),
|
|
67389
|
+
targetOutput: Number(metric.target_output ?? metric.line_threshold ?? metric.ideal_output ?? 0),
|
|
67340
67390
|
compliance_percentage: 95 + Math.random() * 5,
|
|
67341
67391
|
// Mock data: random value between 95-100%
|
|
67342
67392
|
hasData: isUptimeMode ? hasUptimeMetricData : true,
|
|
@@ -67423,6 +67473,7 @@ var KPIDetailView = ({
|
|
|
67423
67473
|
output_array: metrics2.output_array || [],
|
|
67424
67474
|
output_hourly: metrics2.output_hourly,
|
|
67425
67475
|
hourly_target_output: metrics2.hourly_target_output,
|
|
67476
|
+
hourly_target_output_by_sku: metrics2.hourly_target_output_by_sku,
|
|
67426
67477
|
line_threshold: metrics2.line_threshold ?? 0,
|
|
67427
67478
|
output_target_recalculated: metrics2.output_target_recalculated ?? null,
|
|
67428
67479
|
threshold_pph: metrics2.threshold_pph ?? 0,
|
|
@@ -67550,6 +67601,19 @@ var KPIDetailView = ({
|
|
|
67550
67601
|
if (selectedSkuId === "all") return null;
|
|
67551
67602
|
return realSkuOptions.find((item) => item.sku_id === selectedSkuId) ?? null;
|
|
67552
67603
|
}, [realSkuOptions, selectedSkuId]);
|
|
67604
|
+
const selectedHourlyTargetOutput = useMemo(() => {
|
|
67605
|
+
const aggregateTarget = chartMetrics?.hourly_target_output;
|
|
67606
|
+
if (!normalizedSelectedSkuId) return aggregateTarget;
|
|
67607
|
+
const targetBySku = chartMetrics?.hourly_target_output_by_sku;
|
|
67608
|
+
if (targetBySku && Object.prototype.hasOwnProperty.call(targetBySku, normalizedSelectedSkuId)) {
|
|
67609
|
+
return targetBySku[normalizedSelectedSkuId];
|
|
67610
|
+
}
|
|
67611
|
+
return aggregateTarget;
|
|
67612
|
+
}, [
|
|
67613
|
+
chartMetrics?.hourly_target_output,
|
|
67614
|
+
chartMetrics?.hourly_target_output_by_sku,
|
|
67615
|
+
normalizedSelectedSkuId
|
|
67616
|
+
]);
|
|
67553
67617
|
const displayLineInfo = useMemo(() => {
|
|
67554
67618
|
if (!resolvedLineInfo) return null;
|
|
67555
67619
|
if (!selectedSkuRow) return resolvedLineInfo;
|
|
@@ -68391,7 +68455,7 @@ var KPIDetailView = ({
|
|
|
68391
68455
|
workspaceDisplayNames,
|
|
68392
68456
|
hourlyOutputData,
|
|
68393
68457
|
hourlyThreshold,
|
|
68394
|
-
hourlyTargetOutput:
|
|
68458
|
+
hourlyTargetOutput: selectedHourlyTargetOutput,
|
|
68395
68459
|
shiftBreaks: shiftConfig?.shifts?.find((shift) => shift.shiftId === resolvedLineInfo.shift_id)?.breaks || [],
|
|
68396
68460
|
idleTimeHourly: chartMetrics?.idle_time_hourly,
|
|
68397
68461
|
timezone: lineTimezone,
|
|
@@ -75793,8 +75857,8 @@ var WorkspaceDetailView = ({
|
|
|
75793
75857
|
idealCycleTime: Number(metric.ideal_cycle_time || 0),
|
|
75794
75858
|
pph: metric.avg_pph || 0,
|
|
75795
75859
|
pphThreshold: metric.pph_threshold || 0,
|
|
75796
|
-
idealOutput: Number(metric.ideal_output
|
|
75797
|
-
targetOutput: Number(metric.total_day_output
|
|
75860
|
+
idealOutput: Number(metric.target_output ?? metric.ideal_output ?? 0),
|
|
75861
|
+
targetOutput: Number(metric.target_output ?? metric.total_day_output ?? 0),
|
|
75798
75862
|
rank: metric.workspace_rank || 0,
|
|
75799
75863
|
idleTime: idleTimeSeconds || 0,
|
|
75800
75864
|
activeTimeSeconds,
|
|
@@ -85764,5 +85828,245 @@ var streamProxyConfig = {
|
|
|
85764
85828
|
responseLimit: false
|
|
85765
85829
|
}
|
|
85766
85830
|
};
|
|
85831
|
+
var MOBILE_SCROLL_THRESHOLD2 = 15;
|
|
85832
|
+
var MOBILE_BREAKPOINT_PX2 = 640;
|
|
85833
|
+
var sortWorkspaces = (left, right) => {
|
|
85834
|
+
if (left.line_id !== right.line_id) {
|
|
85835
|
+
return left.line_id.localeCompare(right.line_id);
|
|
85836
|
+
}
|
|
85837
|
+
const leftMatch = left.workspace_name.match(/WS(\d+)/);
|
|
85838
|
+
const rightMatch = right.workspace_name.match(/WS(\d+)/);
|
|
85839
|
+
if (leftMatch && rightMatch) {
|
|
85840
|
+
return parseInt(leftMatch[1], 10) - parseInt(rightMatch[1], 10);
|
|
85841
|
+
}
|
|
85842
|
+
return left.workspace_name.localeCompare(right.workspace_name, void 0, { numeric: true });
|
|
85843
|
+
};
|
|
85844
|
+
var RecentFlowSnapshotGrid = ({
|
|
85845
|
+
workspaces,
|
|
85846
|
+
videoStreamsByWorkspaceId,
|
|
85847
|
+
legend,
|
|
85848
|
+
className = ""
|
|
85849
|
+
}) => {
|
|
85850
|
+
const containerRef = useRef(null);
|
|
85851
|
+
const readinessRef = useRef(null);
|
|
85852
|
+
const [gridCols, setGridCols] = useState(4);
|
|
85853
|
+
const [gridRows, setGridRows] = useState(1);
|
|
85854
|
+
const [isMobileScrollableGrid, setIsMobileScrollableGrid] = useState(false);
|
|
85855
|
+
const sortedWorkspaces = useMemo(
|
|
85856
|
+
() => [...workspaces || []].sort(sortWorkspaces),
|
|
85857
|
+
[workspaces]
|
|
85858
|
+
);
|
|
85859
|
+
const effectiveLegend = legend || DEFAULT_EFFICIENCY_LEGEND;
|
|
85860
|
+
const displayMinuteBucket = Math.floor(Date.now() / 6e4);
|
|
85861
|
+
const expectedVideoCount = useMemo(
|
|
85862
|
+
() => sortedWorkspaces.filter((workspace) => {
|
|
85863
|
+
const workspaceId = workspace.workspace_uuid || workspace.workspace_name;
|
|
85864
|
+
return Boolean(workspaceId && videoStreamsByWorkspaceId[workspaceId]?.hls_url);
|
|
85865
|
+
}).length,
|
|
85866
|
+
[sortedWorkspaces, videoStreamsByWorkspaceId]
|
|
85867
|
+
);
|
|
85868
|
+
const publishSnapshotReadiness = useCallback((readyVideoCount) => {
|
|
85869
|
+
const status = {
|
|
85870
|
+
expectedVideoCount,
|
|
85871
|
+
readyVideoCount,
|
|
85872
|
+
status: expectedVideoCount === 0 ? "no_videos" : readyVideoCount >= expectedVideoCount ? "ready" : "loading",
|
|
85873
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
85874
|
+
};
|
|
85875
|
+
const isReady = expectedVideoCount > 0 && status.status === "ready";
|
|
85876
|
+
if (typeof window !== "undefined") {
|
|
85877
|
+
window.__OPTIFYE_SNAPSHOT_READY__ = isReady;
|
|
85878
|
+
window.__OPTIFYE_SNAPSHOT_VIDEO_STATUS__ = status;
|
|
85879
|
+
}
|
|
85880
|
+
const marker = readinessRef.current;
|
|
85881
|
+
if (marker) {
|
|
85882
|
+
marker.dataset.ready = isReady ? "true" : "false";
|
|
85883
|
+
marker.dataset.status = status.status;
|
|
85884
|
+
marker.dataset.expectedVideoCount = String(status.expectedVideoCount);
|
|
85885
|
+
marker.dataset.readyVideoCount = String(status.readyVideoCount);
|
|
85886
|
+
marker.dataset.updatedAt = status.updatedAt;
|
|
85887
|
+
}
|
|
85888
|
+
}, [expectedVideoCount]);
|
|
85889
|
+
const calculateOptimalGrid = useCallback(() => {
|
|
85890
|
+
if (!containerRef.current) return;
|
|
85891
|
+
const containerPadding = 16;
|
|
85892
|
+
const rawContainerWidth = containerRef.current.clientWidth;
|
|
85893
|
+
const containerWidth = rawContainerWidth - containerPadding;
|
|
85894
|
+
const containerHeight = containerRef.current.clientHeight - containerPadding;
|
|
85895
|
+
const count = sortedWorkspaces.length;
|
|
85896
|
+
if (count === 0) {
|
|
85897
|
+
setGridCols(1);
|
|
85898
|
+
setGridRows(1);
|
|
85899
|
+
setIsMobileScrollableGrid(false);
|
|
85900
|
+
return;
|
|
85901
|
+
}
|
|
85902
|
+
const shouldUseMobileScroll = rawContainerWidth < MOBILE_BREAKPOINT_PX2 && count >= MOBILE_SCROLL_THRESHOLD2;
|
|
85903
|
+
const optimalLayouts = {
|
|
85904
|
+
1: 1,
|
|
85905
|
+
2: 2,
|
|
85906
|
+
3: 3,
|
|
85907
|
+
4: 2,
|
|
85908
|
+
5: 3,
|
|
85909
|
+
6: 3,
|
|
85910
|
+
7: 4,
|
|
85911
|
+
8: 4,
|
|
85912
|
+
9: 3,
|
|
85913
|
+
10: 5,
|
|
85914
|
+
11: 4,
|
|
85915
|
+
12: 4,
|
|
85916
|
+
13: 5,
|
|
85917
|
+
14: 5,
|
|
85918
|
+
15: 5,
|
|
85919
|
+
16: 4,
|
|
85920
|
+
17: 6,
|
|
85921
|
+
18: 6,
|
|
85922
|
+
19: 5,
|
|
85923
|
+
20: 5,
|
|
85924
|
+
21: 7,
|
|
85925
|
+
22: 6,
|
|
85926
|
+
23: 6,
|
|
85927
|
+
24: 6
|
|
85928
|
+
};
|
|
85929
|
+
let bestCols = optimalLayouts[count] || Math.ceil(Math.sqrt(count));
|
|
85930
|
+
const containerAspectRatio = containerWidth / containerHeight;
|
|
85931
|
+
const targetAspectRatio = 16 / 9;
|
|
85932
|
+
const gap = 8;
|
|
85933
|
+
if (containerAspectRatio > targetAspectRatio * 1.5 && count > 6) {
|
|
85934
|
+
bestCols = Math.min(bestCols + 1, Math.ceil(count / 2));
|
|
85935
|
+
}
|
|
85936
|
+
const minCellWidth = 100;
|
|
85937
|
+
const availableWidth = containerWidth - gap * (bestCols - 1);
|
|
85938
|
+
const cellWidth = availableWidth / bestCols;
|
|
85939
|
+
if (cellWidth < minCellWidth && bestCols > 1) {
|
|
85940
|
+
bestCols = Math.max(1, Math.floor((containerWidth + gap) / (minCellWidth + gap)));
|
|
85941
|
+
}
|
|
85942
|
+
setGridCols(bestCols);
|
|
85943
|
+
setGridRows(Math.ceil(count / bestCols));
|
|
85944
|
+
setIsMobileScrollableGrid(shouldUseMobileScroll);
|
|
85945
|
+
}, [sortedWorkspaces.length]);
|
|
85946
|
+
useEffect(() => {
|
|
85947
|
+
calculateOptimalGrid();
|
|
85948
|
+
window.addEventListener("resize", calculateOptimalGrid);
|
|
85949
|
+
return () => window.removeEventListener("resize", calculateOptimalGrid);
|
|
85950
|
+
}, [calculateOptimalGrid]);
|
|
85951
|
+
useEffect(() => {
|
|
85952
|
+
const attachedVideos = /* @__PURE__ */ new Set();
|
|
85953
|
+
const videoEvents = ["loadeddata", "canplay", "playing", "timeupdate", "error", "stalled"];
|
|
85954
|
+
const hasDecodedFrame = (video) => video.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && video.videoWidth > 0 && video.videoHeight > 0;
|
|
85955
|
+
const updateReadiness = () => {
|
|
85956
|
+
const videos = Array.from(containerRef.current?.querySelectorAll("video") ?? []);
|
|
85957
|
+
const readyVideoCount = videos.filter(hasDecodedFrame).length;
|
|
85958
|
+
publishSnapshotReadiness(Math.min(readyVideoCount, expectedVideoCount));
|
|
85959
|
+
for (const video of videos) {
|
|
85960
|
+
if (attachedVideos.has(video)) continue;
|
|
85961
|
+
attachedVideos.add(video);
|
|
85962
|
+
for (const eventName of videoEvents) {
|
|
85963
|
+
video.addEventListener(eventName, updateReadiness);
|
|
85964
|
+
}
|
|
85965
|
+
}
|
|
85966
|
+
};
|
|
85967
|
+
publishSnapshotReadiness(0);
|
|
85968
|
+
updateReadiness();
|
|
85969
|
+
const intervalId = window.setInterval(updateReadiness, 250);
|
|
85970
|
+
return () => {
|
|
85971
|
+
window.clearInterval(intervalId);
|
|
85972
|
+
for (const video of attachedVideos) {
|
|
85973
|
+
for (const eventName of videoEvents) {
|
|
85974
|
+
video.removeEventListener(eventName, updateReadiness);
|
|
85975
|
+
}
|
|
85976
|
+
}
|
|
85977
|
+
if (typeof window !== "undefined") {
|
|
85978
|
+
window.__OPTIFYE_SNAPSHOT_READY__ = false;
|
|
85979
|
+
window.__OPTIFYE_SNAPSHOT_VIDEO_STATUS__ = void 0;
|
|
85980
|
+
}
|
|
85981
|
+
};
|
|
85982
|
+
}, [expectedVideoCount, publishSnapshotReadiness]);
|
|
85983
|
+
if (!sortedWorkspaces.length) {
|
|
85984
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85985
|
+
/* @__PURE__ */ jsx(
|
|
85986
|
+
"div",
|
|
85987
|
+
{
|
|
85988
|
+
ref: readinessRef,
|
|
85989
|
+
"data-testid": "snapshot-video-readiness",
|
|
85990
|
+
"data-ready": "false",
|
|
85991
|
+
"data-status": "no_videos",
|
|
85992
|
+
"data-expected-video-count": "0",
|
|
85993
|
+
"data-ready-video-count": "0",
|
|
85994
|
+
hidden: true
|
|
85995
|
+
}
|
|
85996
|
+
),
|
|
85997
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-h-[320px] items-center justify-center rounded-md border border-dashed border-slate-300 bg-slate-50 text-sm font-medium text-slate-500", children: "No workstation snapshot available" })
|
|
85998
|
+
] });
|
|
85999
|
+
}
|
|
86000
|
+
return /* @__PURE__ */ jsxs(
|
|
86001
|
+
"div",
|
|
86002
|
+
{
|
|
86003
|
+
"aria-label": "Recent-flow workstation snapshot",
|
|
86004
|
+
className: `relative h-full min-h-0 w-full overflow-hidden bg-slate-50/30 ${className}`,
|
|
86005
|
+
children: [
|
|
86006
|
+
/* @__PURE__ */ jsx(
|
|
86007
|
+
"div",
|
|
86008
|
+
{
|
|
86009
|
+
ref: readinessRef,
|
|
86010
|
+
"data-testid": "snapshot-video-readiness",
|
|
86011
|
+
"data-ready": "false",
|
|
86012
|
+
"data-status": expectedVideoCount === 0 ? "no_videos" : "loading",
|
|
86013
|
+
"data-expected-video-count": expectedVideoCount,
|
|
86014
|
+
"data-ready-video-count": "0",
|
|
86015
|
+
hidden: true
|
|
86016
|
+
}
|
|
86017
|
+
),
|
|
86018
|
+
/* @__PURE__ */ jsx(
|
|
86019
|
+
"div",
|
|
86020
|
+
{
|
|
86021
|
+
ref: containerRef,
|
|
86022
|
+
"data-testid": "video-grid-scroll-container",
|
|
86023
|
+
"data-mobile-scrollable": isMobileScrollableGrid ? "true" : "false",
|
|
86024
|
+
className: `absolute inset-0 w-full overflow-x-hidden px-1 py-1 sm:px-2 sm:py-2 ${isMobileScrollableGrid ? "overflow-y-auto" : "overflow-hidden"}`,
|
|
86025
|
+
children: /* @__PURE__ */ jsx(
|
|
86026
|
+
"div",
|
|
86027
|
+
{
|
|
86028
|
+
"data-testid": "video-grid-layout",
|
|
86029
|
+
className: `grid min-w-0 w-full gap-1.5 sm:gap-2 ${isMobileScrollableGrid ? "content-start" : "h-full"}`,
|
|
86030
|
+
style: {
|
|
86031
|
+
gridTemplateColumns: `repeat(${gridCols}, minmax(0, 1fr))`,
|
|
86032
|
+
gridTemplateRows: isMobileScrollableGrid ? void 0 : `repeat(${gridRows}, 1fr)`,
|
|
86033
|
+
gridAutoFlow: "row"
|
|
86034
|
+
},
|
|
86035
|
+
children: sortedWorkspaces.map((workspace) => {
|
|
86036
|
+
const workspaceId = workspace.workspace_uuid || workspace.workspace_name;
|
|
86037
|
+
const stream = workspaceId ? videoStreamsByWorkspaceId[workspaceId] : null;
|
|
86038
|
+
const hlsUrl = stream?.hls_url || "";
|
|
86039
|
+
return /* @__PURE__ */ jsx(
|
|
86040
|
+
"div",
|
|
86041
|
+
{
|
|
86042
|
+
"data-workspace-id": workspaceId,
|
|
86043
|
+
className: isMobileScrollableGrid ? "workspace-card relative min-w-0 w-full aspect-video min-h-[92px]" : "workspace-card relative min-w-0 w-full h-full",
|
|
86044
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx(
|
|
86045
|
+
VideoCard,
|
|
86046
|
+
{
|
|
86047
|
+
workspace,
|
|
86048
|
+
hlsUrl,
|
|
86049
|
+
shouldPlay: Boolean(hlsUrl),
|
|
86050
|
+
legend: effectiveLegend,
|
|
86051
|
+
cropping: stream?.crop || void 0,
|
|
86052
|
+
canvasFps: 10,
|
|
86053
|
+
useRAF: false,
|
|
86054
|
+
displayMinuteBucket,
|
|
86055
|
+
displayName: workspace.displayName || workspace.workspace_name,
|
|
86056
|
+
compact: true
|
|
86057
|
+
}
|
|
86058
|
+
) })
|
|
86059
|
+
},
|
|
86060
|
+
`${workspace.line_id}-${workspaceId}`
|
|
86061
|
+
);
|
|
86062
|
+
})
|
|
86063
|
+
}
|
|
86064
|
+
)
|
|
86065
|
+
}
|
|
86066
|
+
)
|
|
86067
|
+
]
|
|
86068
|
+
}
|
|
86069
|
+
);
|
|
86070
|
+
};
|
|
85767
86071
|
|
|
85768
|
-
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, ROOT_DASHBOARD_EVENT_NAMES, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SENTRY_HANDLED_EVENT_SESSION_LIMIT, SENTRY_HANDLED_EVENT_WINDOW_MS, SENTRY_QUOTA_STORAGE_KEY, 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, addSentryBreadcrumb, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildKpiLineHierarchy, buildLineSkuBreakdown, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureHandledFrontendException, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, combineLineMetricsRows, countRealSkus, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, fetchLineDummySkuId, fetchLineSkuCatalog, filterDataByDateKeyRange, filterRealSkuBreakdown, 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, getDateKeyFromValue, getDayDateKey, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getMonthlyTrendComparisonLabel, 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, isIgnorableFrontendError, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRealSku, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeDateKeyRangeUnbounded, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, pickPreferredLineMetricsRow, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSentryQuotaForTests, resetSubscriptionManager, resolveDefaultSkuId, resolveLiveSkuId, s3VideoPreloader, selectPreferredLineMetricsRow, 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, useCompanyFastSlowClipFiltersEnabled, useCompanyHasVlmEnabledLine, 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 };
|
|
86072
|
+
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, ROOT_DASHBOARD_EVENT_NAMES, RecentFlowSnapshotGrid, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SENTRY_HANDLED_EVENT_SESSION_LIMIT, SENTRY_HANDLED_EVENT_WINDOW_MS, SENTRY_QUOTA_STORAGE_KEY, 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, addSentryBreadcrumb, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildKpiLineHierarchy, buildLineSkuBreakdown, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureHandledFrontendException, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, combineLineMetricsRows, countRealSkus, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, fetchLineDummySkuId, fetchLineSkuCatalog, filterDataByDateKeyRange, filterRealSkuBreakdown, 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, getDateKeyFromValue, getDayDateKey, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getMonthlyTrendComparisonLabel, 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, isIgnorableFrontendError, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRealSku, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeDateKeyRangeUnbounded, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, pickPreferredLineMetricsRow, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSentryQuotaForTests, resetSubscriptionManager, resolveDefaultSkuId, resolveLiveSkuId, s3VideoPreloader, selectPreferredLineMetricsRow, 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, useCompanyFastSlowClipFiltersEnabled, useCompanyHasVlmEnabledLine, 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,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optifye/dashboard-core",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.16",
|
|
4
4
|
"description": "Reusable UI & logic for Optifye dashboard",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"global.css"
|
|
10
|
+
"global.css",
|
|
11
|
+
"automation.d.ts",
|
|
12
|
+
"automation.js"
|
|
11
13
|
],
|
|
12
14
|
"sideEffects": [
|
|
13
15
|
"global.css"
|
|
@@ -20,6 +22,13 @@
|
|
|
20
22
|
"require": "./dist/index.js",
|
|
21
23
|
"default": "./dist/index.js"
|
|
22
24
|
},
|
|
25
|
+
"./automation": {
|
|
26
|
+
"types": "./dist/automation.d.ts",
|
|
27
|
+
"node": "./dist/automation.js",
|
|
28
|
+
"import": "./dist/automation.js",
|
|
29
|
+
"require": "./dist/automation.js",
|
|
30
|
+
"default": "./dist/automation.js"
|
|
31
|
+
},
|
|
23
32
|
"./global.css": "./global.css"
|
|
24
33
|
},
|
|
25
34
|
"author": "",
|