@optifye/dashboard-core 6.12.40 → 6.12.41

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 CHANGED
@@ -79661,6 +79661,34 @@ var WorkspaceDetailView = ({
79661
79661
  const prewarmedClipsRef = React147.useRef(/* @__PURE__ */ new Set());
79662
79662
  const prewarmInFlightRef = React147.useRef(/* @__PURE__ */ new Set());
79663
79663
  const [aiSummaryHour, setAiSummaryHour] = React147.useState(null);
79664
+ const buildHourlyOutputActionTrackingProps = React147.useCallback((payload) => ({
79665
+ workspace_id: workspaceId,
79666
+ workspace_name: displayName,
79667
+ line_id: lineId || selectedLineId || null,
79668
+ company_id: dashboardConfig?.entityConfig?.companyId,
79669
+ date: date || null,
79670
+ shift_id: parsedShiftId ?? selectedShift,
79671
+ timezone,
79672
+ hour_index: payload.hourIndex,
79673
+ time_range: payload.timeRange,
79674
+ start_time: payload.startTime,
79675
+ end_time: payload.endTime,
79676
+ output: payload.output,
79677
+ target: payload.target,
79678
+ target_gap: payload.target === null ? null : payload.output - payload.target,
79679
+ status: payload.status,
79680
+ source: "workspace_detail_hourly_output_chart"
79681
+ }), [
79682
+ dashboardConfig?.entityConfig?.companyId,
79683
+ date,
79684
+ displayName,
79685
+ lineId,
79686
+ parsedShiftId,
79687
+ selectedLineId,
79688
+ selectedShift,
79689
+ timezone,
79690
+ workspaceId
79691
+ ]);
79664
79692
  const handleOutputHourSelect = React147.useCallback((payload) => {
79665
79693
  setSelectedHour({
79666
79694
  source: "output",
@@ -79674,8 +79702,9 @@ var WorkspaceDetailView = ({
79674
79702
  });
79675
79703
  }, []);
79676
79704
  const handleAiSummaryClick = React147.useCallback((payload) => {
79705
+ trackCoreEvent("Hourly Output Ask AI Clicked", buildHourlyOutputActionTrackingProps(payload));
79677
79706
  setAiSummaryHour(payload);
79678
- }, []);
79707
+ }, [buildHourlyOutputActionTrackingProps]);
79679
79708
  const handleCycleHourSelect = React147.useCallback((payload) => {
79680
79709
  setSelectedHour({
79681
79710
  source: "cycle",
@@ -79699,6 +79728,7 @@ var WorkspaceDetailView = ({
79699
79728
  setActiveTab("bottlenecks");
79700
79729
  }, []);
79701
79730
  const handleWatchClipsFromChart = React147.useCallback((payload) => {
79731
+ trackCoreEvent("Hourly Output Watch Clips Clicked", buildHourlyOutputActionTrackingProps(payload));
79702
79732
  handleOpenClipsForHour({
79703
79733
  source: "output",
79704
79734
  hourIndex: payload.hourIndex,
@@ -79709,7 +79739,7 @@ var WorkspaceDetailView = ({
79709
79739
  output: payload.output,
79710
79740
  target: payload.target
79711
79741
  });
79712
- }, [handleOpenClipsForHour]);
79742
+ }, [buildHourlyOutputActionTrackingProps, handleOpenClipsForHour]);
79713
79743
  const handleCloseHourSummary = React147.useCallback(() => {
79714
79744
  setSelectedHour(null);
79715
79745
  }, []);
package/dist/index.mjs CHANGED
@@ -79632,6 +79632,34 @@ var WorkspaceDetailView = ({
79632
79632
  const prewarmedClipsRef = useRef(/* @__PURE__ */ new Set());
79633
79633
  const prewarmInFlightRef = useRef(/* @__PURE__ */ new Set());
79634
79634
  const [aiSummaryHour, setAiSummaryHour] = useState(null);
79635
+ const buildHourlyOutputActionTrackingProps = useCallback((payload) => ({
79636
+ workspace_id: workspaceId,
79637
+ workspace_name: displayName,
79638
+ line_id: lineId || selectedLineId || null,
79639
+ company_id: dashboardConfig?.entityConfig?.companyId,
79640
+ date: date || null,
79641
+ shift_id: parsedShiftId ?? selectedShift,
79642
+ timezone,
79643
+ hour_index: payload.hourIndex,
79644
+ time_range: payload.timeRange,
79645
+ start_time: payload.startTime,
79646
+ end_time: payload.endTime,
79647
+ output: payload.output,
79648
+ target: payload.target,
79649
+ target_gap: payload.target === null ? null : payload.output - payload.target,
79650
+ status: payload.status,
79651
+ source: "workspace_detail_hourly_output_chart"
79652
+ }), [
79653
+ dashboardConfig?.entityConfig?.companyId,
79654
+ date,
79655
+ displayName,
79656
+ lineId,
79657
+ parsedShiftId,
79658
+ selectedLineId,
79659
+ selectedShift,
79660
+ timezone,
79661
+ workspaceId
79662
+ ]);
79635
79663
  const handleOutputHourSelect = useCallback((payload) => {
79636
79664
  setSelectedHour({
79637
79665
  source: "output",
@@ -79645,8 +79673,9 @@ var WorkspaceDetailView = ({
79645
79673
  });
79646
79674
  }, []);
79647
79675
  const handleAiSummaryClick = useCallback((payload) => {
79676
+ trackCoreEvent("Hourly Output Ask AI Clicked", buildHourlyOutputActionTrackingProps(payload));
79648
79677
  setAiSummaryHour(payload);
79649
- }, []);
79678
+ }, [buildHourlyOutputActionTrackingProps]);
79650
79679
  const handleCycleHourSelect = useCallback((payload) => {
79651
79680
  setSelectedHour({
79652
79681
  source: "cycle",
@@ -79670,6 +79699,7 @@ var WorkspaceDetailView = ({
79670
79699
  setActiveTab("bottlenecks");
79671
79700
  }, []);
79672
79701
  const handleWatchClipsFromChart = useCallback((payload) => {
79702
+ trackCoreEvent("Hourly Output Watch Clips Clicked", buildHourlyOutputActionTrackingProps(payload));
79673
79703
  handleOpenClipsForHour({
79674
79704
  source: "output",
79675
79705
  hourIndex: payload.hourIndex,
@@ -79680,7 +79710,7 @@ var WorkspaceDetailView = ({
79680
79710
  output: payload.output,
79681
79711
  target: payload.target
79682
79712
  });
79683
- }, [handleOpenClipsForHour]);
79713
+ }, [buildHourlyOutputActionTrackingProps, handleOpenClipsForHour]);
79684
79714
  const handleCloseHourSummary = useCallback(() => {
79685
79715
  setSelectedHour(null);
79686
79716
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "6.12.40",
3
+ "version": "6.12.41",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",