@optifye/dashboard-core 6.11.39 → 6.11.40
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.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +224 -189
- package/dist/index.mjs +223 -190
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { format, addDays, subMonths, endOfMonth, startOfMonth, endOfDay, eachDayOfInterval, getDay, isSameDay, isWithinInterval, startOfDay, parseISO, subDays, differenceInMinutes, addMinutes, addMonths, isValid, formatDistanceToNow, isToday, isFuture, isBefore } from 'date-fns';
|
|
2
|
+
import { formatInTimeZone, fromZonedTime, toZonedTime } from 'date-fns-tz';
|
|
1
3
|
import * as React143 from 'react';
|
|
2
4
|
import React143__default, { createContext, useRef, useCallback, useState, useMemo, useEffect, forwardRef, useImperativeHandle, useLayoutEffect, memo as memo$1, useContext, useSyncExternalStore, useId, Children, isValidElement, useInsertionEffect, startTransition, Fragment as Fragment$1, createElement, Component } from 'react';
|
|
3
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
6
|
import { useRouter } from 'next/router';
|
|
5
7
|
import { toast } from 'sonner';
|
|
6
|
-
import { formatInTimeZone, fromZonedTime, toZonedTime } from 'date-fns-tz';
|
|
7
|
-
import { format, addDays, subMonths, endOfMonth, startOfMonth, endOfDay, eachDayOfInterval, getDay, isSameDay, isWithinInterval, startOfDay, parseISO, subDays, differenceInMinutes, addMinutes, addMonths, isValid, formatDistanceToNow, isToday, isFuture, isBefore } from 'date-fns';
|
|
8
8
|
import mixpanel from 'mixpanel-browser';
|
|
9
9
|
import { EventEmitter } from 'events';
|
|
10
10
|
import { createClient, REALTIME_SUBSCRIBE_STATES } from '@supabase/supabase-js';
|
|
@@ -1632,6 +1632,149 @@ function isValidPrefetchParams(params) {
|
|
|
1632
1632
|
function isValidPrefetchStatus(status) {
|
|
1633
1633
|
return typeof status === "string" && Object.values(PrefetchStatus).includes(status);
|
|
1634
1634
|
}
|
|
1635
|
+
var getOperationalDate = (timezone, date = /* @__PURE__ */ new Date(), shiftStartTime = "06:00") => {
|
|
1636
|
+
const zonedDate = toZonedTime(date, timezone);
|
|
1637
|
+
const hours = zonedDate.getHours();
|
|
1638
|
+
const minutes = zonedDate.getMinutes();
|
|
1639
|
+
const [startHourRaw, startMinuteRaw] = shiftStartTime.split(":").map(Number);
|
|
1640
|
+
const startHour = Number.isFinite(startHourRaw) ? startHourRaw : 6;
|
|
1641
|
+
const startMinute = Number.isFinite(startMinuteRaw) ? startMinuteRaw : 0;
|
|
1642
|
+
const currentTotalMinutes = hours * 60 + minutes;
|
|
1643
|
+
const shiftStartTotalMinutes = startHour * 60 + startMinute;
|
|
1644
|
+
const operationalDate = currentTotalMinutes < shiftStartTotalMinutes ? subDays(zonedDate, 1) : zonedDate;
|
|
1645
|
+
return format(operationalDate, "yyyy-MM-dd");
|
|
1646
|
+
};
|
|
1647
|
+
function formatTimeInZone(time2, timezone, formatString = "HH:mm:ss") {
|
|
1648
|
+
const dateObj = typeof time2 === "string" ? parseISO(time2) : time2;
|
|
1649
|
+
if (!isValid(dateObj)) return "Invalid Date";
|
|
1650
|
+
return formatInTimeZone(dateObj, timezone, formatString);
|
|
1651
|
+
}
|
|
1652
|
+
function getCurrentTimeInZone(timezone, formatString) {
|
|
1653
|
+
const now4 = /* @__PURE__ */ new Date();
|
|
1654
|
+
if (formatString) {
|
|
1655
|
+
if (!isValid(now4)) return "Invalid Date";
|
|
1656
|
+
return formatInTimeZone(now4, timezone, formatString);
|
|
1657
|
+
}
|
|
1658
|
+
return now4;
|
|
1659
|
+
}
|
|
1660
|
+
var pad2 = (value) => String(value).padStart(2, "0");
|
|
1661
|
+
var DATE_KEY_PREFIX_PATTERN = /^(\d{4}-\d{2}-\d{2})/;
|
|
1662
|
+
var buildDateKey = (year, monthIndex, day) => {
|
|
1663
|
+
return `${year}-${pad2(monthIndex + 1)}-${pad2(day)}`;
|
|
1664
|
+
};
|
|
1665
|
+
var getDateKeyFromDate = (date) => {
|
|
1666
|
+
return buildDateKey(date.getFullYear(), date.getMonth(), date.getDate());
|
|
1667
|
+
};
|
|
1668
|
+
var parseDateKeyToDate = (dateKey) => {
|
|
1669
|
+
const [year, month, day] = dateKey.split("-").map(Number);
|
|
1670
|
+
return new Date(year, month - 1, day, 12, 0, 0, 0);
|
|
1671
|
+
};
|
|
1672
|
+
var getDateKeyFromValue = (value) => {
|
|
1673
|
+
if (typeof value === "string") {
|
|
1674
|
+
const keyMatch = value.match(DATE_KEY_PREFIX_PATTERN);
|
|
1675
|
+
if (keyMatch?.[1]) {
|
|
1676
|
+
return keyMatch[1];
|
|
1677
|
+
}
|
|
1678
|
+
const parsed = parseISO(value);
|
|
1679
|
+
if (isValid(parsed)) {
|
|
1680
|
+
return getDateKeyFromDate(parsed);
|
|
1681
|
+
}
|
|
1682
|
+
return value;
|
|
1683
|
+
}
|
|
1684
|
+
return getDateKeyFromDate(value);
|
|
1685
|
+
};
|
|
1686
|
+
var formatDateKeyForDisplay = (dateKey, formatStr = "MMM d, yyyy") => {
|
|
1687
|
+
return format(parseDateKeyToDate(dateKey), formatStr);
|
|
1688
|
+
};
|
|
1689
|
+
var getMonthKeyBounds = (year, monthIndex) => {
|
|
1690
|
+
const startKey = buildDateKey(year, monthIndex, 1);
|
|
1691
|
+
const lastDay = new Date(year, monthIndex + 1, 0).getDate();
|
|
1692
|
+
const endKey = buildDateKey(year, monthIndex, lastDay);
|
|
1693
|
+
return { startKey, endKey };
|
|
1694
|
+
};
|
|
1695
|
+
var getCurrentWeekToDateRange = (timezone, now4 = /* @__PURE__ */ new Date()) => {
|
|
1696
|
+
const todayKey = formatInTimeZone(now4, timezone || "UTC", "yyyy-MM-dd");
|
|
1697
|
+
const todayDate = parseISO(`${todayKey}T00:00:00`);
|
|
1698
|
+
const dayOfWeek = getDay(todayDate);
|
|
1699
|
+
const daysSinceMonday = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
|
|
1700
|
+
const weekStart = subDays(todayDate, daysSinceMonday);
|
|
1701
|
+
return {
|
|
1702
|
+
startKey: format(weekStart, "yyyy-MM-dd"),
|
|
1703
|
+
endKey: format(todayDate, "yyyy-MM-dd")
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
var getCurrentWeekFullRange = (timezone, now4 = /* @__PURE__ */ new Date()) => {
|
|
1707
|
+
const currentWeekToDateRange = getCurrentWeekToDateRange(timezone, now4);
|
|
1708
|
+
const weekStart = parseDateKeyToDate(currentWeekToDateRange.startKey);
|
|
1709
|
+
return {
|
|
1710
|
+
startKey: currentWeekToDateRange.startKey,
|
|
1711
|
+
endKey: format(addDays(weekStart, 6), "yyyy-MM-dd")
|
|
1712
|
+
};
|
|
1713
|
+
};
|
|
1714
|
+
var normalizeDateKeyRange = (startKey, endKey, minKey, maxKey) => {
|
|
1715
|
+
const clampedStart = startKey < minKey ? minKey : startKey > maxKey ? maxKey : startKey;
|
|
1716
|
+
const clampedEnd = endKey < minKey ? minKey : endKey > maxKey ? maxKey : endKey;
|
|
1717
|
+
if (clampedStart <= clampedEnd) {
|
|
1718
|
+
return { startKey: clampedStart, endKey: clampedEnd };
|
|
1719
|
+
}
|
|
1720
|
+
return { startKey: clampedEnd, endKey: clampedStart };
|
|
1721
|
+
};
|
|
1722
|
+
var isFullMonthRange = (range, year, monthIndex) => {
|
|
1723
|
+
const bounds = getMonthKeyBounds(year, monthIndex);
|
|
1724
|
+
return range.startKey === bounds.startKey && range.endKey === bounds.endKey;
|
|
1725
|
+
};
|
|
1726
|
+
var getMonthlyTrendComparisonLabel = (range, year, monthIndex) => {
|
|
1727
|
+
if (isFullMonthRange(range, year, monthIndex)) {
|
|
1728
|
+
return "last month";
|
|
1729
|
+
}
|
|
1730
|
+
return range.startKey === range.endKey ? "previous day" : "previous range";
|
|
1731
|
+
};
|
|
1732
|
+
var getMonthWeekRanges = (year, monthIndex, timezone, maxKey) => {
|
|
1733
|
+
const totalDays = new Date(year, monthIndex + 1, 0).getDate();
|
|
1734
|
+
const ranges = [];
|
|
1735
|
+
let currentStartDay = 1;
|
|
1736
|
+
for (let day = 1; day <= totalDays; day += 1) {
|
|
1737
|
+
const zonedDate = toZonedTime(new Date(year, monthIndex, day), timezone);
|
|
1738
|
+
const dayOfWeek = zonedDate.getDay();
|
|
1739
|
+
const isEndOfWeek = dayOfWeek === 0 || day === totalDays;
|
|
1740
|
+
if (isEndOfWeek) {
|
|
1741
|
+
const startKey = buildDateKey(year, monthIndex, currentStartDay);
|
|
1742
|
+
const endKey = buildDateKey(year, monthIndex, day);
|
|
1743
|
+
if (maxKey && startKey > maxKey) {
|
|
1744
|
+
break;
|
|
1745
|
+
}
|
|
1746
|
+
const clampedEndKey = maxKey && endKey > maxKey ? maxKey : endKey;
|
|
1747
|
+
if (clampedEndKey < startKey) {
|
|
1748
|
+
break;
|
|
1749
|
+
}
|
|
1750
|
+
const labelStart = formatDateKeyForDisplay(startKey, "MMM d");
|
|
1751
|
+
const labelEnd = formatDateKeyForDisplay(clampedEndKey, "MMM d");
|
|
1752
|
+
ranges.push({
|
|
1753
|
+
startKey,
|
|
1754
|
+
endKey: clampedEndKey,
|
|
1755
|
+
label: `Week of ${labelStart} - ${labelEnd}`
|
|
1756
|
+
});
|
|
1757
|
+
currentStartDay = day + 1;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
return ranges;
|
|
1761
|
+
};
|
|
1762
|
+
var formatRangeLabel = (range, fullMonthLabel) => {
|
|
1763
|
+
if (!range.startKey || !range.endKey) return fullMonthLabel;
|
|
1764
|
+
if (range.startKey === range.endKey) {
|
|
1765
|
+
return formatDateKeyForDisplay(range.startKey, "MMM d, yyyy");
|
|
1766
|
+
}
|
|
1767
|
+
const startLabel = formatDateKeyForDisplay(range.startKey, "MMM d");
|
|
1768
|
+
const endLabel = formatDateKeyForDisplay(range.endKey, "MMM d, yyyy");
|
|
1769
|
+
return `${startLabel} - ${endLabel}`;
|
|
1770
|
+
};
|
|
1771
|
+
var filterDataByDateKeyRange = (data, range) => {
|
|
1772
|
+
if (!range.startKey || !range.endKey) return data;
|
|
1773
|
+
return (data || []).filter((item) => {
|
|
1774
|
+
const dateKey = item.dateKey || getDateKeyFromValue(item.date);
|
|
1775
|
+
return dateKey >= range.startKey && dateKey <= range.endKey;
|
|
1776
|
+
});
|
|
1777
|
+
};
|
|
1635
1778
|
|
|
1636
1779
|
// src/lib/types/calendar.ts
|
|
1637
1780
|
var DEFAULT_SHIFT_DATA = {
|
|
@@ -1663,6 +1806,9 @@ var hasAnyShiftData = (day) => {
|
|
|
1663
1806
|
var getAvailableShiftIds = (day) => {
|
|
1664
1807
|
return Object.keys(day.shifts).map(Number).sort((a, b) => a - b);
|
|
1665
1808
|
};
|
|
1809
|
+
var getDayDateKey = (day) => {
|
|
1810
|
+
return day.dateKey || getDateKeyFromDate(day.date);
|
|
1811
|
+
};
|
|
1666
1812
|
|
|
1667
1813
|
// src/components/dashboard/grid/workspace_grid_constants.ts
|
|
1668
1814
|
var DEFAULT_WORKSPACE_POSITIONS = [
|
|
@@ -3318,136 +3464,6 @@ var memoizedOutputArrayAggregation = createMemoizedFunction(
|
|
|
3318
3464
|
},
|
|
3319
3465
|
(arrays) => arrays.map((arr) => arr.length).join("-")
|
|
3320
3466
|
);
|
|
3321
|
-
var getOperationalDate = (timezone, date = /* @__PURE__ */ new Date(), shiftStartTime = "06:00") => {
|
|
3322
|
-
const zonedDate = toZonedTime(date, timezone);
|
|
3323
|
-
const hours = zonedDate.getHours();
|
|
3324
|
-
const minutes = zonedDate.getMinutes();
|
|
3325
|
-
const [startHourRaw, startMinuteRaw] = shiftStartTime.split(":").map(Number);
|
|
3326
|
-
const startHour = Number.isFinite(startHourRaw) ? startHourRaw : 6;
|
|
3327
|
-
const startMinute = Number.isFinite(startMinuteRaw) ? startMinuteRaw : 0;
|
|
3328
|
-
const currentTotalMinutes = hours * 60 + minutes;
|
|
3329
|
-
const shiftStartTotalMinutes = startHour * 60 + startMinute;
|
|
3330
|
-
const operationalDate = currentTotalMinutes < shiftStartTotalMinutes ? subDays(zonedDate, 1) : zonedDate;
|
|
3331
|
-
return format(operationalDate, "yyyy-MM-dd");
|
|
3332
|
-
};
|
|
3333
|
-
function formatTimeInZone(time2, timezone, formatString = "HH:mm:ss") {
|
|
3334
|
-
const dateObj = typeof time2 === "string" ? parseISO(time2) : time2;
|
|
3335
|
-
if (!isValid(dateObj)) return "Invalid Date";
|
|
3336
|
-
return formatInTimeZone(dateObj, timezone, formatString);
|
|
3337
|
-
}
|
|
3338
|
-
function getCurrentTimeInZone(timezone, formatString) {
|
|
3339
|
-
const now4 = /* @__PURE__ */ new Date();
|
|
3340
|
-
if (formatString) {
|
|
3341
|
-
if (!isValid(now4)) return "Invalid Date";
|
|
3342
|
-
return formatInTimeZone(now4, timezone, formatString);
|
|
3343
|
-
}
|
|
3344
|
-
return now4;
|
|
3345
|
-
}
|
|
3346
|
-
var pad2 = (value) => String(value).padStart(2, "0");
|
|
3347
|
-
var buildDateKey = (year, monthIndex, day) => {
|
|
3348
|
-
return `${year}-${pad2(monthIndex + 1)}-${pad2(day)}`;
|
|
3349
|
-
};
|
|
3350
|
-
var getDateKeyFromDate = (date) => {
|
|
3351
|
-
return date.toISOString().split("T")[0];
|
|
3352
|
-
};
|
|
3353
|
-
var parseDateKeyToDate = (dateKey) => {
|
|
3354
|
-
const [year, month, day] = dateKey.split("-").map(Number);
|
|
3355
|
-
return new Date(year, month - 1, day);
|
|
3356
|
-
};
|
|
3357
|
-
var formatDateKeyForDisplay = (dateKey, formatStr = "MMM d, yyyy") => {
|
|
3358
|
-
return format(parseDateKeyToDate(dateKey), formatStr);
|
|
3359
|
-
};
|
|
3360
|
-
var getMonthKeyBounds = (year, monthIndex) => {
|
|
3361
|
-
const startKey = buildDateKey(year, monthIndex, 1);
|
|
3362
|
-
const lastDay = new Date(year, monthIndex + 1, 0).getDate();
|
|
3363
|
-
const endKey = buildDateKey(year, monthIndex, lastDay);
|
|
3364
|
-
return { startKey, endKey };
|
|
3365
|
-
};
|
|
3366
|
-
var getCurrentWeekToDateRange = (timezone, now4 = /* @__PURE__ */ new Date()) => {
|
|
3367
|
-
const todayKey = formatInTimeZone(now4, timezone || "UTC", "yyyy-MM-dd");
|
|
3368
|
-
const todayDate = parseISO(`${todayKey}T00:00:00`);
|
|
3369
|
-
const dayOfWeek = getDay(todayDate);
|
|
3370
|
-
const daysSinceMonday = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
|
|
3371
|
-
const weekStart = subDays(todayDate, daysSinceMonday);
|
|
3372
|
-
return {
|
|
3373
|
-
startKey: format(weekStart, "yyyy-MM-dd"),
|
|
3374
|
-
endKey: format(todayDate, "yyyy-MM-dd")
|
|
3375
|
-
};
|
|
3376
|
-
};
|
|
3377
|
-
var getCurrentWeekFullRange = (timezone, now4 = /* @__PURE__ */ new Date()) => {
|
|
3378
|
-
const currentWeekToDateRange = getCurrentWeekToDateRange(timezone, now4);
|
|
3379
|
-
const weekStart = parseDateKeyToDate(currentWeekToDateRange.startKey);
|
|
3380
|
-
return {
|
|
3381
|
-
startKey: currentWeekToDateRange.startKey,
|
|
3382
|
-
endKey: format(addDays(weekStart, 6), "yyyy-MM-dd")
|
|
3383
|
-
};
|
|
3384
|
-
};
|
|
3385
|
-
var normalizeDateKeyRange = (startKey, endKey, minKey, maxKey) => {
|
|
3386
|
-
const clampedStart = startKey < minKey ? minKey : startKey > maxKey ? maxKey : startKey;
|
|
3387
|
-
const clampedEnd = endKey < minKey ? minKey : endKey > maxKey ? maxKey : endKey;
|
|
3388
|
-
if (clampedStart <= clampedEnd) {
|
|
3389
|
-
return { startKey: clampedStart, endKey: clampedEnd };
|
|
3390
|
-
}
|
|
3391
|
-
return { startKey: clampedEnd, endKey: clampedStart };
|
|
3392
|
-
};
|
|
3393
|
-
var isFullMonthRange = (range, year, monthIndex) => {
|
|
3394
|
-
const bounds = getMonthKeyBounds(year, monthIndex);
|
|
3395
|
-
return range.startKey === bounds.startKey && range.endKey === bounds.endKey;
|
|
3396
|
-
};
|
|
3397
|
-
var getMonthlyTrendComparisonLabel = (range, year, monthIndex) => {
|
|
3398
|
-
if (isFullMonthRange(range, year, monthIndex)) {
|
|
3399
|
-
return "last month";
|
|
3400
|
-
}
|
|
3401
|
-
return range.startKey === range.endKey ? "previous day" : "previous range";
|
|
3402
|
-
};
|
|
3403
|
-
var getMonthWeekRanges = (year, monthIndex, timezone, maxKey) => {
|
|
3404
|
-
const totalDays = new Date(year, monthIndex + 1, 0).getDate();
|
|
3405
|
-
const ranges = [];
|
|
3406
|
-
let currentStartDay = 1;
|
|
3407
|
-
for (let day = 1; day <= totalDays; day += 1) {
|
|
3408
|
-
const zonedDate = toZonedTime(new Date(year, monthIndex, day), timezone);
|
|
3409
|
-
const dayOfWeek = zonedDate.getDay();
|
|
3410
|
-
const isEndOfWeek = dayOfWeek === 0 || day === totalDays;
|
|
3411
|
-
if (isEndOfWeek) {
|
|
3412
|
-
const startKey = buildDateKey(year, monthIndex, currentStartDay);
|
|
3413
|
-
const endKey = buildDateKey(year, monthIndex, day);
|
|
3414
|
-
if (maxKey && startKey > maxKey) {
|
|
3415
|
-
break;
|
|
3416
|
-
}
|
|
3417
|
-
const clampedEndKey = maxKey && endKey > maxKey ? maxKey : endKey;
|
|
3418
|
-
if (clampedEndKey < startKey) {
|
|
3419
|
-
break;
|
|
3420
|
-
}
|
|
3421
|
-
const labelStart = formatDateKeyForDisplay(startKey, "MMM d");
|
|
3422
|
-
const labelEnd = formatDateKeyForDisplay(clampedEndKey, "MMM d");
|
|
3423
|
-
ranges.push({
|
|
3424
|
-
startKey,
|
|
3425
|
-
endKey: clampedEndKey,
|
|
3426
|
-
label: `Week of ${labelStart} - ${labelEnd}`
|
|
3427
|
-
});
|
|
3428
|
-
currentStartDay = day + 1;
|
|
3429
|
-
}
|
|
3430
|
-
}
|
|
3431
|
-
return ranges;
|
|
3432
|
-
};
|
|
3433
|
-
var formatRangeLabel = (range, fullMonthLabel) => {
|
|
3434
|
-
if (!range.startKey || !range.endKey) return fullMonthLabel;
|
|
3435
|
-
if (range.startKey === range.endKey) {
|
|
3436
|
-
return formatDateKeyForDisplay(range.startKey, "MMM d, yyyy");
|
|
3437
|
-
}
|
|
3438
|
-
const startLabel = formatDateKeyForDisplay(range.startKey, "MMM d");
|
|
3439
|
-
const endLabel = formatDateKeyForDisplay(range.endKey, "MMM d, yyyy");
|
|
3440
|
-
return `${startLabel} - ${endLabel}`;
|
|
3441
|
-
};
|
|
3442
|
-
var filterDataByDateKeyRange = (data, range) => {
|
|
3443
|
-
if (!range.startKey || !range.endKey) return data;
|
|
3444
|
-
return (data || []).filter((item) => {
|
|
3445
|
-
const dateKey = typeof item.date === "string" ? item.date : getDateKeyFromDate(item.date);
|
|
3446
|
-
return dateKey >= range.startKey && dateKey <= range.endKey;
|
|
3447
|
-
});
|
|
3448
|
-
};
|
|
3449
|
-
|
|
3450
|
-
// src/lib/utils/shifts.ts
|
|
3451
3467
|
var DEFAULT_DAY_SHIFT_START = "06:00";
|
|
3452
3468
|
var DEFAULT_NIGHT_SHIFT_START = "18:00";
|
|
3453
3469
|
var DEFAULT_TRANSITION_MINUTES = 15;
|
|
@@ -49881,6 +49897,7 @@ var formatHours = (value) => {
|
|
|
49881
49897
|
if (Math.abs(rounded) < 0.05) return "0h";
|
|
49882
49898
|
return Number.isInteger(rounded) ? `${rounded}h` : `${rounded.toFixed(1)}h`;
|
|
49883
49899
|
};
|
|
49900
|
+
var roundToSingleDecimal = (value) => Math.round(value * 10) / 10;
|
|
49884
49901
|
var formatCycleSeconds = (value) => {
|
|
49885
49902
|
if (!Number.isFinite(value)) return "0.0s";
|
|
49886
49903
|
return `${value.toFixed(1)}s`;
|
|
@@ -50006,21 +50023,30 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50006
50023
|
if (!shiftConfig) return null;
|
|
50007
50024
|
return getShiftWorkDurationSeconds(shiftConfig, selectedShiftId);
|
|
50008
50025
|
}, [shiftConfig, selectedShiftId]);
|
|
50009
|
-
const
|
|
50026
|
+
const analysisMonthlyDataByKey = useMemo(
|
|
50027
|
+
() => new Map(analysisMonthlyData.map((day) => [getDayDateKey(day), day])),
|
|
50028
|
+
[analysisMonthlyData]
|
|
50029
|
+
);
|
|
50030
|
+
const monthlyDataByKey = useMemo(
|
|
50031
|
+
() => new Map(data.map((day) => [getDayDateKey(day), day])),
|
|
50032
|
+
[data]
|
|
50033
|
+
);
|
|
50034
|
+
const rangeDateKeys = useMemo(() => {
|
|
50010
50035
|
const rangeStartDate = parseDateKeyToDate(normalizedRange.startKey);
|
|
50011
50036
|
const rangeEndDate = parseDateKeyToDate(normalizedRange.endKey);
|
|
50012
|
-
const
|
|
50037
|
+
const keys = [];
|
|
50013
50038
|
for (let d = new Date(rangeStartDate); d <= rangeEndDate; d.setDate(d.getDate() + 1)) {
|
|
50014
|
-
|
|
50039
|
+
keys.push(buildDateKey(d.getFullYear(), d.getMonth(), d.getDate()));
|
|
50015
50040
|
}
|
|
50041
|
+
return keys;
|
|
50042
|
+
}, [normalizedRange.endKey, normalizedRange.startKey]);
|
|
50043
|
+
const chartData = useMemo(() => {
|
|
50016
50044
|
const dailyData = [];
|
|
50017
50045
|
if (isUptimeMode) {
|
|
50018
50046
|
let maxHours = 0;
|
|
50019
|
-
for (const
|
|
50020
|
-
const dayData =
|
|
50021
|
-
|
|
50022
|
-
return date.getDate() === day;
|
|
50023
|
-
});
|
|
50047
|
+
for (const dateKey of rangeDateKeys) {
|
|
50048
|
+
const dayData = analysisMonthlyDataByKey.get(dateKey);
|
|
50049
|
+
const dayNumber = Number(dateKey.slice(-2));
|
|
50024
50050
|
const shiftData = dayData ? getShiftData(dayData, selectedShiftId) : null;
|
|
50025
50051
|
const hasShiftData = Boolean(shiftData && hasRealData(shiftData));
|
|
50026
50052
|
const availableSeconds = hasShiftData ? shiftData.availableTimeSeconds ?? shiftWorkSeconds ?? 0 : 0;
|
|
@@ -50047,8 +50073,8 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50047
50073
|
}
|
|
50048
50074
|
maxHours = Math.max(maxHours, idleHours + productiveHours);
|
|
50049
50075
|
dailyData.push({
|
|
50050
|
-
hour: getOrdinal2(
|
|
50051
|
-
timeRange: `Day ${
|
|
50076
|
+
hour: getOrdinal2(dayNumber),
|
|
50077
|
+
timeRange: `Day ${dayNumber}`,
|
|
50052
50078
|
productiveHours,
|
|
50053
50079
|
idleHours,
|
|
50054
50080
|
utilization
|
|
@@ -50059,12 +50085,9 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50059
50085
|
}
|
|
50060
50086
|
let maxOutput = 0;
|
|
50061
50087
|
let lastSetTarget = 0;
|
|
50062
|
-
for (let i =
|
|
50063
|
-
const
|
|
50064
|
-
const dayData =
|
|
50065
|
-
const date = new Date(d.date);
|
|
50066
|
-
return date.getDate() === day;
|
|
50067
|
-
});
|
|
50088
|
+
for (let i = rangeDateKeys.length - 1; i >= 0; i--) {
|
|
50089
|
+
const dateKey = rangeDateKeys[i];
|
|
50090
|
+
const dayData = analysisMonthlyDataByKey.get(dateKey);
|
|
50068
50091
|
const shiftData = dayData ? getShiftData(dayData, selectedShiftId) : null;
|
|
50069
50092
|
const idealOutput = shiftData ? shiftData.idealOutput : 0;
|
|
50070
50093
|
if (idealOutput > 0) {
|
|
@@ -50072,20 +50095,18 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50072
50095
|
break;
|
|
50073
50096
|
}
|
|
50074
50097
|
}
|
|
50075
|
-
for (const
|
|
50076
|
-
const dayData =
|
|
50077
|
-
|
|
50078
|
-
return date.getDate() === day;
|
|
50079
|
-
});
|
|
50098
|
+
for (const dateKey of rangeDateKeys) {
|
|
50099
|
+
const dayData = analysisMonthlyDataByKey.get(dateKey);
|
|
50100
|
+
const dayNumber = Number(dateKey.slice(-2));
|
|
50080
50101
|
const shiftData = dayData ? getShiftData(dayData, selectedShiftId) : null;
|
|
50081
50102
|
const output = shiftData && hasRealData(shiftData) ? shiftData.output : 0;
|
|
50082
50103
|
const idealOutput = shiftData ? shiftData.idealOutput : 0;
|
|
50083
50104
|
if (output > maxOutput) maxOutput = output;
|
|
50084
50105
|
const color2 = output >= lastSetTarget ? "#00AB45" : "#E34329";
|
|
50085
50106
|
dailyData.push({
|
|
50086
|
-
hour: getOrdinal2(
|
|
50107
|
+
hour: getOrdinal2(dayNumber),
|
|
50087
50108
|
// Using ordinal format (1st, 2nd, 3rd, etc.)
|
|
50088
|
-
timeRange: `Day ${
|
|
50109
|
+
timeRange: `Day ${dayNumber}`,
|
|
50089
50110
|
output,
|
|
50090
50111
|
originalOutput: output,
|
|
50091
50112
|
// For label display
|
|
@@ -50099,7 +50120,7 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50099
50120
|
const calculatedMax = Math.max(maxOutput, lastSetTarget);
|
|
50100
50121
|
const yAxisMax = calculatedMax > 0 ? calculatedMax * 1.1 : 100;
|
|
50101
50122
|
return { data: dailyData, maxOutput, lastSetTarget, yAxisMax };
|
|
50102
|
-
}, [
|
|
50123
|
+
}, [analysisMonthlyDataByKey, rangeDateKeys, selectedShiftId, isUptimeMode, shiftWorkSeconds]);
|
|
50103
50124
|
const yAxisTicks = useMemo(() => {
|
|
50104
50125
|
if (isUptimeMode) return void 0;
|
|
50105
50126
|
const max = chartData.yAxisMax;
|
|
@@ -50184,7 +50205,7 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50184
50205
|
}
|
|
50185
50206
|
const avgEfficiency = Math.round(totalEfficiency / filteredShifts.length);
|
|
50186
50207
|
const avgDailyOutput = Math.round(totalOutput / filteredShifts.length);
|
|
50187
|
-
const avgCycleTime =
|
|
50208
|
+
const avgCycleTime = roundToSingleDecimal(totalCycleTime / filteredShifts.length);
|
|
50188
50209
|
const avgRank = ranks.length > 0 ? Math.round(ranks.reduce((a, b) => a + b, 0) / ranks.length) : null;
|
|
50189
50210
|
return {
|
|
50190
50211
|
avgEfficiency,
|
|
@@ -50204,7 +50225,7 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50204
50225
|
const assemblyRangeCycleTime = useMemo(() => {
|
|
50205
50226
|
const trendCycleTime = Number(trendSummary?.avg_cycle_time?.current);
|
|
50206
50227
|
if (Number.isFinite(trendCycleTime) && trendCycleTime > 0) {
|
|
50207
|
-
return
|
|
50228
|
+
return trendCycleTime;
|
|
50208
50229
|
}
|
|
50209
50230
|
return metrics2?.avgCycleTime ?? 0;
|
|
50210
50231
|
}, [trendSummary?.avg_cycle_time?.current, metrics2?.avgCycleTime]);
|
|
@@ -50233,20 +50254,15 @@ var WorkspaceMonthlyHistory = ({
|
|
|
50233
50254
|
if (startOffset === -1) startOffset = 6;
|
|
50234
50255
|
const calendar = Array(startOffset).fill(null);
|
|
50235
50256
|
for (let day = 1; day <= totalDays; day++) {
|
|
50236
|
-
const
|
|
50237
|
-
|
|
50238
|
-
return date.getDate() === day;
|
|
50239
|
-
});
|
|
50257
|
+
const dateKey = buildDateKey(year, month, day);
|
|
50258
|
+
const dayData = monthlyDataByKey.get(dateKey);
|
|
50240
50259
|
calendar.push(dayData || null);
|
|
50241
50260
|
}
|
|
50242
50261
|
return { calendar, startOffset };
|
|
50243
|
-
}, [
|
|
50262
|
+
}, [monthlyDataByKey, month, year]);
|
|
50244
50263
|
const handleDayClick = useCallback((day) => {
|
|
50245
50264
|
if (!day) return;
|
|
50246
|
-
const
|
|
50247
|
-
const month2 = String(day.date.getMonth() + 1).padStart(2, "0");
|
|
50248
|
-
const dayOfMonth = String(day.date.getDate()).padStart(2, "0");
|
|
50249
|
-
const formattedDate = `${year2}-${month2}-${dayOfMonth}`;
|
|
50265
|
+
const formattedDate = getDayDateKey(day);
|
|
50250
50266
|
trackCoreEvent("Workspace Monthly History Day Clicked", {
|
|
50251
50267
|
source: "monthly_history",
|
|
50252
50268
|
workspace_id: workspaceId,
|
|
@@ -51192,13 +51208,20 @@ var WorkspaceMonthlyPdfGenerator = ({
|
|
|
51192
51208
|
startKey: rangeStart || monthBounds.startKey,
|
|
51193
51209
|
endKey: rangeEnd || monthBounds.endKey
|
|
51194
51210
|
};
|
|
51211
|
+
const boundsSourceKey = rangeStart || rangeEnd || monthBounds.startKey;
|
|
51212
|
+
const boundsSourceDate = parseDateKeyToDate(boundsSourceKey);
|
|
51213
|
+
const effectiveBounds = getMonthKeyBounds(boundsSourceDate.getFullYear(), boundsSourceDate.getMonth());
|
|
51195
51214
|
const normalizedRange = normalizeDateKeyRange(
|
|
51196
51215
|
requestedRange.startKey,
|
|
51197
51216
|
requestedRange.endKey,
|
|
51198
|
-
|
|
51199
|
-
|
|
51217
|
+
effectiveBounds.startKey,
|
|
51218
|
+
effectiveBounds.endKey
|
|
51219
|
+
);
|
|
51220
|
+
const fullRange = isFullMonthRange(
|
|
51221
|
+
normalizedRange,
|
|
51222
|
+
boundsSourceDate.getFullYear(),
|
|
51223
|
+
boundsSourceDate.getMonth()
|
|
51200
51224
|
);
|
|
51201
|
-
const fullRange = isFullMonthRange(normalizedRange, selectedYear, selectedMonth);
|
|
51202
51225
|
const reportStartDate = parseDateKeyToDate(normalizedRange.startKey);
|
|
51203
51226
|
const reportEndDate = parseDateKeyToDate(normalizedRange.endKey);
|
|
51204
51227
|
const reportStartStr = reportStartDate.toLocaleDateString("en-IN", {
|
|
@@ -51220,12 +51243,17 @@ var WorkspaceMonthlyPdfGenerator = ({
|
|
|
51220
51243
|
const generatedText = `Generated on ${(/* @__PURE__ */ new Date()).toLocaleString("en-IN", { timeZone: "Asia/Kolkata" })}`;
|
|
51221
51244
|
const resolvedLineName = lineName?.trim() || "Line";
|
|
51222
51245
|
const dailySectionTitle = isUptimeMode ? "Daily Utilization Summary" : "Daily Performance Summary";
|
|
51246
|
+
const monthName = reportStartDate.toLocaleDateString("en-IN", {
|
|
51247
|
+
month: "long",
|
|
51248
|
+
year: "numeric",
|
|
51249
|
+
timeZone: "Asia/Kolkata"
|
|
51250
|
+
});
|
|
51223
51251
|
trackCoreEvent("Workspace Monthly PDF Export Clicked", {
|
|
51224
51252
|
workspace_id: workspaceId,
|
|
51225
51253
|
workspace_name: workspaceName,
|
|
51226
51254
|
line_name: resolvedLineName,
|
|
51227
|
-
month:
|
|
51228
|
-
year:
|
|
51255
|
+
month: reportStartDate.getMonth(),
|
|
51256
|
+
year: reportStartDate.getFullYear(),
|
|
51229
51257
|
shift_id: selectedShiftId,
|
|
51230
51258
|
range_start: normalizedRange.startKey,
|
|
51231
51259
|
range_end: normalizedRange.endKey,
|
|
@@ -51266,11 +51294,6 @@ var WorkspaceMonthlyPdfGenerator = ({
|
|
|
51266
51294
|
doc.setFontSize(13);
|
|
51267
51295
|
doc.setFont("helvetica", "normal");
|
|
51268
51296
|
doc.setTextColor(60, 60, 60);
|
|
51269
|
-
const monthName = new Date(selectedYear, selectedMonth).toLocaleDateString("en-IN", {
|
|
51270
|
-
month: "long",
|
|
51271
|
-
year: "numeric",
|
|
51272
|
-
timeZone: "Asia/Kolkata"
|
|
51273
|
-
});
|
|
51274
51297
|
const shiftType = getShiftDisplayName2(selectedShiftId, availableShifts);
|
|
51275
51298
|
doc.text(`${monthName}`, 20, 65);
|
|
51276
51299
|
doc.text(`${shiftType}`, 20, 73);
|
|
@@ -51282,15 +51305,12 @@ var WorkspaceMonthlyPdfGenerator = ({
|
|
|
51282
51305
|
doc.setLineWidth(0.8);
|
|
51283
51306
|
doc.line(20, 90, 190, 90);
|
|
51284
51307
|
const reportData = analysisData ? analysisData : filterDataByDateKeyRange(monthlyData, normalizedRange);
|
|
51285
|
-
const validDays = reportData
|
|
51286
|
-
const date = new Date(day.date);
|
|
51287
|
-
return date.getMonth() === selectedMonth && date.getFullYear() === selectedYear;
|
|
51288
|
-
});
|
|
51308
|
+
const validDays = reportData;
|
|
51289
51309
|
const validShifts = validDays.map((day) => getShiftData(day, selectedShiftId)).filter(hasShiftData);
|
|
51290
51310
|
const dailyEntries = validDays.map((dayData) => {
|
|
51291
51311
|
const shift = getShiftData(dayData, selectedShiftId);
|
|
51292
51312
|
return { dayData, shift };
|
|
51293
|
-
}).filter(({ shift }) => hasShiftData(shift)).sort((left, right) =>
|
|
51313
|
+
}).filter(({ shift }) => hasShiftData(shift)).sort((left, right) => getDayDateKey(right.dayData).localeCompare(getDayDateKey(left.dayData)));
|
|
51294
51314
|
const filteredShifts = isUptimeMode ? validShifts : validShifts.filter((shift) => (shift.efficiency ?? 0) >= 5);
|
|
51295
51315
|
const monthlyMetrics = filteredShifts.length > 0 ? isUptimeMode ? (() => {
|
|
51296
51316
|
const totalIdleTime = filteredShifts.reduce((sum, shift) => sum + shift.idleTime, 0);
|
|
@@ -71123,15 +71143,26 @@ var WorkspaceDetailView = ({
|
|
|
71123
71143
|
const range = useMemo(() => ({ startKey: rangeStart, endKey: rangeEnd }), [rangeStart, rangeEnd]);
|
|
71124
71144
|
const isFullRange = useMemo(() => isFullMonthRange(range, selectedYear, selectedMonth), [range, selectedYear, selectedMonth]);
|
|
71125
71145
|
useEffect(() => {
|
|
71146
|
+
const hasExternalRange = typeof urlRangeStart === "string" || typeof urlRangeEnd === "string";
|
|
71147
|
+
if (!hasExternalRange) {
|
|
71148
|
+
return;
|
|
71149
|
+
}
|
|
71150
|
+
const targetStartKey = typeof urlRangeStart === "string" ? urlRangeStart : typeof urlRangeEnd === "string" ? urlRangeEnd : monthBounds.startKey;
|
|
71151
|
+
const targetStartDate = parseDateKeyToDate(targetStartKey);
|
|
71152
|
+
const targetMonth = targetStartDate.getMonth();
|
|
71153
|
+
const targetYear = targetStartDate.getFullYear();
|
|
71154
|
+
const targetBounds = getMonthKeyBounds(targetYear, targetMonth);
|
|
71126
71155
|
const normalized = normalizeDateKeyRange(
|
|
71127
|
-
typeof urlRangeStart === "string" ? urlRangeStart :
|
|
71128
|
-
typeof urlRangeEnd === "string" ? urlRangeEnd :
|
|
71129
|
-
|
|
71130
|
-
|
|
71156
|
+
typeof urlRangeStart === "string" ? urlRangeStart : targetBounds.startKey,
|
|
71157
|
+
typeof urlRangeEnd === "string" ? urlRangeEnd : targetBounds.endKey,
|
|
71158
|
+
targetBounds.startKey,
|
|
71159
|
+
targetBounds.endKey
|
|
71131
71160
|
);
|
|
71161
|
+
setSelectedMonth(targetMonth);
|
|
71162
|
+
setSelectedYear(targetYear);
|
|
71132
71163
|
setRangeStart(normalized.startKey);
|
|
71133
71164
|
setRangeEnd(normalized.endKey);
|
|
71134
|
-
}, [urlRangeStart, urlRangeEnd, monthBounds.startKey
|
|
71165
|
+
}, [urlRangeStart, urlRangeEnd, monthBounds.startKey]);
|
|
71135
71166
|
const isHistoricView = Boolean(date && parsedShiftId !== void 0);
|
|
71136
71167
|
const initialTab = getInitialTab(sourceType, defaultTab, fromMonthly, date);
|
|
71137
71168
|
const [activeTab, setActiveTab] = useState(initialTab);
|
|
@@ -71653,12 +71684,13 @@ var WorkspaceDetailView = ({
|
|
|
71653
71684
|
console.warn("Skipping invalid metric:", metric);
|
|
71654
71685
|
return;
|
|
71655
71686
|
}
|
|
71656
|
-
const
|
|
71657
|
-
const
|
|
71687
|
+
const dateKey = getDateKeyFromValue(metric.date);
|
|
71688
|
+
const dateObj = parseDateKeyToDate(dateKey);
|
|
71658
71689
|
let dayEntry = dayDataMap.get(dateKey);
|
|
71659
71690
|
if (!dayEntry) {
|
|
71660
71691
|
dayEntry = {
|
|
71661
71692
|
date: dateObj,
|
|
71693
|
+
dateKey,
|
|
71662
71694
|
shifts: {}
|
|
71663
71695
|
// Multi-shift structure: Record<number, CalendarShiftData>
|
|
71664
71696
|
};
|
|
@@ -71703,6 +71735,7 @@ var WorkspaceDetailView = ({
|
|
|
71703
71735
|
});
|
|
71704
71736
|
const processedData = Array.from(dayDataMap.values()).filter((entry) => Object.keys(entry.shifts).length > 0).map((entry) => ({
|
|
71705
71737
|
date: entry.date,
|
|
71738
|
+
dateKey: entry.dateKey,
|
|
71706
71739
|
shifts: entry.shifts
|
|
71707
71740
|
}));
|
|
71708
71741
|
console.log(`[handleMonthlyDataLoaded] Transformed data for calendar:`, {
|
|
@@ -81595,4 +81628,4 @@ var streamProxyConfig = {
|
|
|
81595
81628
|
}
|
|
81596
81629
|
};
|
|
81597
81630
|
|
|
81598
|
-
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, 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, captureHandledFrontendException, 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, 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, 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, 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 };
|
|
81631
|
+
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, 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, captureHandledFrontendException, 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, 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, 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, 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 };
|