@flamingo-stack/openframe-frontend-core 0.0.263 → 0.0.264-snapshot.20260612115719
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/{chunk-YC357BPF.js → chunk-266DUZ6D.js} +3 -3
- package/dist/{chunk-36HLBLDK.cjs → chunk-2P6V2EWZ.cjs} +498 -455
- package/dist/chunk-2P6V2EWZ.cjs.map +1 -0
- package/dist/{chunk-ALEKX56R.js → chunk-6A2YQ5CY.js} +2 -2
- package/dist/{chunk-C3FAOQAH.cjs → chunk-D4TWJNO5.cjs} +28 -28
- package/dist/{chunk-C3FAOQAH.cjs.map → chunk-D4TWJNO5.cjs.map} +1 -1
- package/dist/{chunk-6AIXHYBZ.js → chunk-EXU5N5RM.js} +100 -57
- package/dist/chunk-EXU5N5RM.js.map +1 -0
- package/dist/{chunk-2XUWR7AH.cjs → chunk-HMHMK6U6.cjs} +11 -11
- package/dist/{chunk-2XUWR7AH.cjs.map → chunk-HMHMK6U6.cjs.map} +1 -1
- package/dist/{chunk-XKA7UFED.cjs → chunk-J5BBBDNA.cjs} +30 -30
- package/dist/{chunk-XKA7UFED.cjs.map → chunk-J5BBBDNA.cjs.map} +1 -1
- package/dist/{chunk-3DC6MHW6.cjs → chunk-QLWBBCI5.cjs} +491 -391
- package/dist/chunk-QLWBBCI5.cjs.map +1 -0
- package/dist/{chunk-U7UDESAU.js → chunk-Z5YEQWLC.js} +2 -2
- package/dist/{chunk-6GBA6YJN.js → chunk-ZMFT5XOB.js} +576 -476
- package/dist/chunk-ZMFT5XOB.js.map +1 -0
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/board/types.d.ts +1 -0
- package/dist/components/features/board/types.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/notifications/notifications-context.d.ts +9 -1
- package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
- package/dist/components/index.cjs +50 -50
- package/dist/components/index.js +4 -4
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/navigation/sliding-sidebar.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +4 -4
- package/dist/components/related-content/index.js +3 -3
- package/dist/components/tickets/index.cjs +58 -58
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/drawer.d.ts +5 -0
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/ui/index.d.ts +6 -4
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-header-height.d.ts +8 -0
- package/dist/hooks/ui/use-header-height.d.ts.map +1 -0
- package/dist/hooks/ui/use-horizontal-scrollbar.d.ts.map +1 -1
- package/dist/hooks/ui/use-notification-permission.d.ts +14 -0
- package/dist/hooks/ui/use-notification-permission.d.ts.map +1 -0
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/utils/date-utils.d.ts +9 -0
- package/dist/utils/date-utils.d.ts.map +1 -1
- package/dist/utils/index.cjs +29 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +28 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/features/board/ticket-card.tsx +15 -0
- package/src/components/features/board/types.ts +1 -0
- package/src/components/features/notifications/notification-drawer.tsx +51 -2
- package/src/components/features/notifications/notifications-context.tsx +26 -0
- package/src/components/navigation/sliding-sidebar.tsx +3 -82
- package/src/components/ui/drawer.tsx +17 -6
- package/src/hooks/ui/index.ts +6 -4
- package/src/hooks/ui/use-header-height.ts +55 -0
- package/src/hooks/ui/use-horizontal-scrollbar.ts +19 -2
- package/src/hooks/ui/use-notification-permission.ts +64 -0
- package/src/utils/date-utils.ts +36 -0
- package/src/utils/index.ts +2 -0
- package/dist/chunk-36HLBLDK.cjs.map +0 -1
- package/dist/chunk-3DC6MHW6.cjs.map +0 -1
- package/dist/chunk-6AIXHYBZ.js.map +0 -1
- package/dist/chunk-6GBA6YJN.js.map +0 -1
- /package/dist/{chunk-YC357BPF.js.map → chunk-266DUZ6D.js.map} +0 -0
- /package/dist/{chunk-ALEKX56R.js.map → chunk-6A2YQ5CY.js.map} +0 -0
- /package/dist/{chunk-U7UDESAU.js.map → chunk-Z5YEQWLC.js.map} +0 -0
|
@@ -6,15 +6,17 @@ import {
|
|
|
6
6
|
progressColorByVariant,
|
|
7
7
|
toolLabels,
|
|
8
8
|
useCopyToClipboard,
|
|
9
|
+
useHeaderHeight,
|
|
9
10
|
useHorizontalScrollbar,
|
|
10
11
|
useHumanitySignals,
|
|
11
12
|
useImageEdgeColor,
|
|
12
13
|
useLgUp,
|
|
13
14
|
useLocalStorage,
|
|
14
15
|
useMdUp,
|
|
16
|
+
useNotificationPermission,
|
|
15
17
|
useOnboardingState,
|
|
16
18
|
useToast
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZMFT5XOB.js";
|
|
18
20
|
import {
|
|
19
21
|
cn as cn2
|
|
20
22
|
} from "./chunk-NR535XIY.js";
|
|
@@ -10406,12 +10408,14 @@ var DrawerContent = React40.forwardRef(
|
|
|
10406
10408
|
style,
|
|
10407
10409
|
panelStyle,
|
|
10408
10410
|
panelClassName,
|
|
10411
|
+
offsetHeader = false,
|
|
10409
10412
|
children,
|
|
10410
10413
|
...props
|
|
10411
10414
|
}, ref) => {
|
|
10412
10415
|
const resolvedSide = side ?? "right";
|
|
10413
10416
|
const isHorizontal = HORIZONTAL_SIDES.has(resolvedSide);
|
|
10414
10417
|
const initialSize = defaultSize ?? (isHorizontal ? 560 : 480);
|
|
10418
|
+
const headerHeight = useHeaderHeight();
|
|
10415
10419
|
const [isMobile, setIsMobile] = React40.useState(false);
|
|
10416
10420
|
React40.useEffect(() => {
|
|
10417
10421
|
if (typeof window === "undefined") return;
|
|
@@ -10438,7 +10442,7 @@ var DrawerContent = React40.forwardRef(
|
|
|
10438
10442
|
{
|
|
10439
10443
|
ref,
|
|
10440
10444
|
className: cn(drawerVariants({ side, flush })),
|
|
10441
|
-
style,
|
|
10445
|
+
style: { ...offsetHeader ? { top: headerHeight } : {}, ...style },
|
|
10442
10446
|
...props,
|
|
10443
10447
|
children: [
|
|
10444
10448
|
applyInlineSize ? /* @__PURE__ */ jsx85(
|
|
@@ -10484,7 +10488,7 @@ var DrawerHeader = ({
|
|
|
10484
10488
|
}
|
|
10485
10489
|
);
|
|
10486
10490
|
DrawerHeader.displayName = "DrawerHeader";
|
|
10487
|
-
var DrawerTitle = React40.forwardRef(({ className, children, actions, ...props }, ref) => /* @__PURE__ */ jsxs66("div", { className: "flex items-start gap-4", children: [
|
|
10491
|
+
var DrawerTitle = React40.forwardRef(({ className, children, actions, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs66("div", { className: "flex items-start gap-4", children: [
|
|
10488
10492
|
/* @__PURE__ */ jsx85(
|
|
10489
10493
|
DialogPrimitive2.Title,
|
|
10490
10494
|
{
|
|
@@ -10498,7 +10502,7 @@ var DrawerTitle = React40.forwardRef(({ className, children, actions, ...props }
|
|
|
10498
10502
|
}
|
|
10499
10503
|
),
|
|
10500
10504
|
actions,
|
|
10501
|
-
/* @__PURE__ */ jsxs66(DialogPrimitive2.Close, { className: "shrink-0 rounded-sm text-ods-text-secondary transition-colors hover:text-ods-text-primary outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0", children: [
|
|
10505
|
+
!hideClose && /* @__PURE__ */ jsxs66(DialogPrimitive2.Close, { className: "shrink-0 rounded-sm text-ods-text-secondary transition-colors hover:text-ods-text-primary outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0", children: [
|
|
10502
10506
|
/* @__PURE__ */ jsx85(X5, { className: "size-6" }),
|
|
10503
10507
|
/* @__PURE__ */ jsx85("span", { className: "sr-only", children: "Close" })
|
|
10504
10508
|
] })
|
|
@@ -12738,6 +12742,33 @@ async function extractImageEdgeColorAsync(imageUrl) {
|
|
|
12738
12742
|
}
|
|
12739
12743
|
|
|
12740
12744
|
// src/utils/date-utils.ts
|
|
12745
|
+
function formatTicketRelativeTime(iso) {
|
|
12746
|
+
const now = /* @__PURE__ */ new Date();
|
|
12747
|
+
const date = new Date(iso);
|
|
12748
|
+
if (Number.isNaN(date.getTime())) return "";
|
|
12749
|
+
const diffMs = now.getTime() - date.getTime();
|
|
12750
|
+
const diffMin = Math.floor(diffMs / 6e4);
|
|
12751
|
+
if (diffMin < 1) return "Just now";
|
|
12752
|
+
if (diffMin < 60) return `${diffMin} min ago`;
|
|
12753
|
+
const diffHours = Math.floor(diffMin / 60);
|
|
12754
|
+
if (diffHours < 24) return diffHours === 1 ? "1 hour ago" : `${diffHours} hours ago`;
|
|
12755
|
+
const mm = String(date.getMonth() + 1).padStart(2, "0");
|
|
12756
|
+
const dd = String(date.getDate()).padStart(2, "0");
|
|
12757
|
+
const yyyy = date.getFullYear();
|
|
12758
|
+
return `${mm}/${dd}/${yyyy}`;
|
|
12759
|
+
}
|
|
12760
|
+
function formatTicketFullTimestamp(iso) {
|
|
12761
|
+
const date = new Date(iso);
|
|
12762
|
+
if (Number.isNaN(date.getTime())) return "";
|
|
12763
|
+
const mm = String(date.getMonth() + 1).padStart(2, "0");
|
|
12764
|
+
const dd = String(date.getDate()).padStart(2, "0");
|
|
12765
|
+
const yyyy = date.getFullYear();
|
|
12766
|
+
let hours = date.getHours();
|
|
12767
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
12768
|
+
const ampm = hours >= 12 ? "PM" : "AM";
|
|
12769
|
+
hours = hours % 12 || 12;
|
|
12770
|
+
return `${mm}/${dd}/${yyyy}, ${hours}:${minutes} ${ampm}`;
|
|
12771
|
+
}
|
|
12741
12772
|
function formatRelativeTime(timestamp) {
|
|
12742
12773
|
const now = /* @__PURE__ */ new Date();
|
|
12743
12774
|
const targetTime = typeof timestamp === "string" ? new Date(timestamp) : timestamp;
|
|
@@ -20640,6 +20671,8 @@ function NotificationsProvider({
|
|
|
20640
20671
|
maxNotifications = 50,
|
|
20641
20672
|
defaultShowPopups = true,
|
|
20642
20673
|
onShowPopupsChange,
|
|
20674
|
+
defaultShowDesktopPopups = false,
|
|
20675
|
+
onShowDesktopPopupsChange,
|
|
20643
20676
|
onHistoryClick,
|
|
20644
20677
|
actions,
|
|
20645
20678
|
hasMore = false,
|
|
@@ -20650,6 +20683,8 @@ function NotificationsProvider({
|
|
|
20650
20683
|
const [notifications, dispatch] = React69.useReducer(reducer, initialNotifications);
|
|
20651
20684
|
const [isOpen, setIsOpen] = React69.useState(false);
|
|
20652
20685
|
const [showPopups, setShowPopupsState] = React69.useState(defaultShowPopups);
|
|
20686
|
+
const [showDesktopPopups, setShowDesktopPopupsState] = React69.useState(defaultShowDesktopPopups);
|
|
20687
|
+
const desktopPopupsConfigured = onShowDesktopPopupsChange !== void 0;
|
|
20653
20688
|
const actionsRef = React69.useRef(actions);
|
|
20654
20689
|
React69.useEffect(() => {
|
|
20655
20690
|
actionsRef.current = actions;
|
|
@@ -20711,6 +20746,13 @@ function NotificationsProvider({
|
|
|
20711
20746
|
},
|
|
20712
20747
|
[onShowPopupsChange]
|
|
20713
20748
|
);
|
|
20749
|
+
const setShowDesktopPopups = React69.useCallback(
|
|
20750
|
+
(value2) => {
|
|
20751
|
+
setShowDesktopPopupsState(value2);
|
|
20752
|
+
onShowDesktopPopupsChange?.(value2);
|
|
20753
|
+
},
|
|
20754
|
+
[onShowDesktopPopupsChange]
|
|
20755
|
+
);
|
|
20714
20756
|
const unreadCount = React69.useMemo(
|
|
20715
20757
|
() => notifications.reduce((acc, n) => n.read ? acc : acc + 1, 0),
|
|
20716
20758
|
[notifications]
|
|
@@ -20733,6 +20775,9 @@ function NotificationsProvider({
|
|
|
20733
20775
|
close,
|
|
20734
20776
|
toggle,
|
|
20735
20777
|
setShowPopups,
|
|
20778
|
+
showDesktopPopups,
|
|
20779
|
+
setShowDesktopPopups,
|
|
20780
|
+
desktopPopupsConfigured,
|
|
20736
20781
|
onHistoryClick,
|
|
20737
20782
|
hasMore,
|
|
20738
20783
|
isLoadingMore,
|
|
@@ -20744,6 +20789,9 @@ function NotificationsProvider({
|
|
|
20744
20789
|
unreadCount,
|
|
20745
20790
|
isOpen,
|
|
20746
20791
|
showPopups,
|
|
20792
|
+
showDesktopPopups,
|
|
20793
|
+
setShowDesktopPopups,
|
|
20794
|
+
desktopPopupsConfigured,
|
|
20747
20795
|
addNotification,
|
|
20748
20796
|
upsertNotification,
|
|
20749
20797
|
setNotifications,
|
|
@@ -20901,6 +20949,9 @@ function NotificationDrawer({
|
|
|
20901
20949
|
markAllRead,
|
|
20902
20950
|
markSettled,
|
|
20903
20951
|
setShowPopups,
|
|
20952
|
+
showDesktopPopups,
|
|
20953
|
+
setShowDesktopPopups,
|
|
20954
|
+
desktopPopupsConfigured,
|
|
20904
20955
|
onHistoryClick,
|
|
20905
20956
|
hasMore,
|
|
20906
20957
|
isLoadingMore,
|
|
@@ -20914,6 +20965,7 @@ function NotificationDrawer({
|
|
|
20914
20965
|
{
|
|
20915
20966
|
side: "right",
|
|
20916
20967
|
"aria-describedby": void 0,
|
|
20968
|
+
offsetHeader: true,
|
|
20917
20969
|
className: cn(
|
|
20918
20970
|
"w-[calc(100vw-2rem)] sm:w-[26rem] sm:max-w-[calc(100vw-2rem)] gap-[var(--spacing-system-m)] p-[var(--spacing-system-zero)]",
|
|
20919
20971
|
className
|
|
@@ -20922,6 +20974,7 @@ function NotificationDrawer({
|
|
|
20922
20974
|
/* @__PURE__ */ jsx180("div", { className: "px-[var(--spacing-system-m)] pt-[var(--spacing-system-m)]", children: /* @__PURE__ */ jsx180(
|
|
20923
20975
|
DrawerTitle,
|
|
20924
20976
|
{
|
|
20977
|
+
hideClose: true,
|
|
20925
20978
|
className: "truncate",
|
|
20926
20979
|
actions: /* @__PURE__ */ jsx180(
|
|
20927
20980
|
"button",
|
|
@@ -20951,7 +21004,10 @@ function NotificationDrawer({
|
|
|
20951
21004
|
}
|
|
20952
21005
|
),
|
|
20953
21006
|
/* @__PURE__ */ jsxs140("div", { className: "flex flex-col gap-[var(--spacing-system-xs)] px-[var(--spacing-system-m)] pb-[var(--spacing-system-m)]", children: [
|
|
20954
|
-
/* @__PURE__ */
|
|
21007
|
+
/* @__PURE__ */ jsxs140("div", { className: "overflow-hidden rounded-md border border-ods-border bg-ods-card", children: [
|
|
21008
|
+
/* @__PURE__ */ jsx180(ShowNotificationsToggleRow, { checked: showPopups, onChange: setShowPopups }),
|
|
21009
|
+
desktopPopupsConfigured && /* @__PURE__ */ jsx180(DesktopNotificationsToggleRow, { checked: showDesktopPopups, onChange: setShowDesktopPopups })
|
|
21010
|
+
] }),
|
|
20955
21011
|
/* @__PURE__ */ jsx180(
|
|
20956
21012
|
NotificationsHistoryButton,
|
|
20957
21013
|
{
|
|
@@ -21047,7 +21103,7 @@ function EmptyState() {
|
|
|
21047
21103
|
] });
|
|
21048
21104
|
}
|
|
21049
21105
|
function ShowNotificationsToggleRow({ checked, onChange }) {
|
|
21050
|
-
return /* @__PURE__ */ jsxs140("div", { className: "flex items-center gap-[var(--spacing-system-s)]
|
|
21106
|
+
return /* @__PURE__ */ jsxs140("div", { className: "flex items-center gap-[var(--spacing-system-s)] border-b border-ods-border p-[var(--spacing-system-sf)]", children: [
|
|
21051
21107
|
/* @__PURE__ */ jsx180(
|
|
21052
21108
|
Switch,
|
|
21053
21109
|
{
|
|
@@ -21062,6 +21118,33 @@ function ShowNotificationsToggleRow({ checked, onChange }) {
|
|
|
21062
21118
|
] })
|
|
21063
21119
|
] });
|
|
21064
21120
|
}
|
|
21121
|
+
function DesktopNotificationsToggleRow({ checked, onChange }) {
|
|
21122
|
+
const { supported, permission, request } = useNotificationPermission();
|
|
21123
|
+
if (!supported) return null;
|
|
21124
|
+
const blocked = permission === "denied";
|
|
21125
|
+
const handleChange = async (value) => {
|
|
21126
|
+
if (!value || permission === "granted") {
|
|
21127
|
+
onChange(value);
|
|
21128
|
+
return;
|
|
21129
|
+
}
|
|
21130
|
+
if (await request() === "granted") onChange(true);
|
|
21131
|
+
};
|
|
21132
|
+
return /* @__PURE__ */ jsxs140("div", { className: "flex items-center gap-[var(--spacing-system-s)] border-b border-ods-border p-[var(--spacing-system-sf)]", children: [
|
|
21133
|
+
/* @__PURE__ */ jsx180(
|
|
21134
|
+
Switch,
|
|
21135
|
+
{
|
|
21136
|
+
checked: checked && permission === "granted",
|
|
21137
|
+
disabled: blocked,
|
|
21138
|
+
onCheckedChange: handleChange,
|
|
21139
|
+
"aria-label": "Show desktop notifications"
|
|
21140
|
+
}
|
|
21141
|
+
),
|
|
21142
|
+
/* @__PURE__ */ jsxs140("div", { className: "min-w-0 flex-1", children: [
|
|
21143
|
+
/* @__PURE__ */ jsx180("p", { className: cn("text-h4", blocked ? "text-ods-text-secondary" : "text-ods-text-primary"), children: "Desktop Notifications" }),
|
|
21144
|
+
/* @__PURE__ */ jsx180("p", { className: "text-h6 text-ods-text-secondary", children: blocked ? "Enable notifications in your browser settings" : "Notify when this tab is in the background" })
|
|
21145
|
+
] })
|
|
21146
|
+
] });
|
|
21147
|
+
}
|
|
21065
21148
|
function NotificationsHistoryButton({ onClick }) {
|
|
21066
21149
|
return /* @__PURE__ */ jsx180(
|
|
21067
21150
|
Button,
|
|
@@ -21479,6 +21562,8 @@ function TicketCard({
|
|
|
21479
21562
|
] })
|
|
21480
21563
|
] }) : null
|
|
21481
21564
|
] }) : null;
|
|
21565
|
+
const timestampLabel = ticket.createdAt ? formatTicketRelativeTime(ticket.createdAt) : null;
|
|
21566
|
+
const tooltipLabel = ticket.createdAt ? formatTicketFullTimestamp(ticket.createdAt) : null;
|
|
21482
21567
|
const body = /* @__PURE__ */ jsxs143(Fragment25, { children: [
|
|
21483
21568
|
/* @__PURE__ */ jsxs143("div", { className: "flex items-start gap-[var(--spacing-system-sf)]", children: [
|
|
21484
21569
|
/* @__PURE__ */ jsxs143("div", { className: "flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-zero)]", title: ticket.title, children: [
|
|
@@ -21490,7 +21575,11 @@ function TicketCard({
|
|
|
21490
21575
|
] }),
|
|
21491
21576
|
rightSection
|
|
21492
21577
|
] }),
|
|
21493
|
-
ticket.tags?.length ? /* @__PURE__ */ jsx184(TicketTagRow, { tags: ticket.tags }) : null
|
|
21578
|
+
ticket.tags?.length ? /* @__PURE__ */ jsx184(TicketTagRow, { tags: ticket.tags }) : null,
|
|
21579
|
+
timestampLabel && tooltipLabel && /* @__PURE__ */ jsx184(TooltipProvider, { children: /* @__PURE__ */ jsxs143(Tooltip, { children: [
|
|
21580
|
+
/* @__PURE__ */ jsx184(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx184("p", { className: "pointer-events-auto text-h6 truncate text-ods-text-secondary", children: timestampLabel }) }),
|
|
21581
|
+
/* @__PURE__ */ jsx184(TooltipContent, { children: tooltipLabel })
|
|
21582
|
+
] }) })
|
|
21494
21583
|
] });
|
|
21495
21584
|
const cardClasses = cn(
|
|
21496
21585
|
"relative flex flex-col gap-[var(--spacing-system-sf)] rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-sf)] select-none text-left",
|
|
@@ -22567,57 +22656,9 @@ import { Fragment as Fragment30, jsx as jsx193, jsxs as jsxs150 } from "react/js
|
|
|
22567
22656
|
function SlidingSidebar({ config }) {
|
|
22568
22657
|
const [expandedItems, setExpandedItems] = useState58(/* @__PURE__ */ new Set());
|
|
22569
22658
|
const [mounted, setMounted] = useState58(false);
|
|
22570
|
-
const
|
|
22659
|
+
const headerHeight = useHeaderHeight();
|
|
22571
22660
|
useEffect42(() => {
|
|
22572
22661
|
setMounted(true);
|
|
22573
|
-
const calculateHeaderHeight = () => {
|
|
22574
|
-
let totalHeight = 0;
|
|
22575
|
-
const header2 = document.querySelector("header");
|
|
22576
|
-
if (header2) {
|
|
22577
|
-
totalHeight += header2.offsetHeight;
|
|
22578
|
-
}
|
|
22579
|
-
const announcementBar2 = document.querySelector("[data-announcement-bar]");
|
|
22580
|
-
if (announcementBar2 && announcementBar2 instanceof HTMLElement) {
|
|
22581
|
-
totalHeight += announcementBar2.offsetHeight;
|
|
22582
|
-
}
|
|
22583
|
-
if (totalHeight > 0) {
|
|
22584
|
-
setHeaderHeight(totalHeight);
|
|
22585
|
-
} else {
|
|
22586
|
-
setHeaderHeight(64);
|
|
22587
|
-
}
|
|
22588
|
-
};
|
|
22589
|
-
setTimeout(calculateHeaderHeight, 100);
|
|
22590
|
-
calculateHeaderHeight();
|
|
22591
|
-
window.addEventListener("resize", calculateHeaderHeight);
|
|
22592
|
-
const resizeObserver = new ResizeObserver(calculateHeaderHeight);
|
|
22593
|
-
const header = document.querySelector("header");
|
|
22594
|
-
if (header) {
|
|
22595
|
-
resizeObserver.observe(header);
|
|
22596
|
-
}
|
|
22597
|
-
const announcementBar = document.querySelector("[data-announcement-bar]");
|
|
22598
|
-
if (announcementBar) {
|
|
22599
|
-
resizeObserver.observe(announcementBar);
|
|
22600
|
-
}
|
|
22601
|
-
const mutationObserver = new MutationObserver((mutations) => {
|
|
22602
|
-
for (const mutation of mutations) {
|
|
22603
|
-
if (mutation.type === "childList") {
|
|
22604
|
-
calculateHeaderHeight();
|
|
22605
|
-
const newAnnouncementBar = document.querySelector("[data-announcement-bar]");
|
|
22606
|
-
if (newAnnouncementBar) {
|
|
22607
|
-
resizeObserver.observe(newAnnouncementBar);
|
|
22608
|
-
}
|
|
22609
|
-
}
|
|
22610
|
-
}
|
|
22611
|
-
});
|
|
22612
|
-
mutationObserver.observe(document.body, {
|
|
22613
|
-
childList: true,
|
|
22614
|
-
subtree: true
|
|
22615
|
-
});
|
|
22616
|
-
return () => {
|
|
22617
|
-
window.removeEventListener("resize", calculateHeaderHeight);
|
|
22618
|
-
resizeObserver.disconnect();
|
|
22619
|
-
mutationObserver.disconnect();
|
|
22620
|
-
};
|
|
22621
22662
|
}, []);
|
|
22622
22663
|
const toggleExpanded = (itemId) => {
|
|
22623
22664
|
const newExpanded = new Set(expandedItems);
|
|
@@ -39419,6 +39460,8 @@ export {
|
|
|
39419
39460
|
getBestContrastColor,
|
|
39420
39461
|
analyzeImageColor,
|
|
39421
39462
|
extractImageEdgeColorAsync,
|
|
39463
|
+
formatTicketRelativeTime,
|
|
39464
|
+
formatTicketFullTimestamp,
|
|
39422
39465
|
formatRelativeTime,
|
|
39423
39466
|
formatAbsoluteDate,
|
|
39424
39467
|
formatDateTime,
|
|
@@ -39674,4 +39717,4 @@ export {
|
|
|
39674
39717
|
LogsList,
|
|
39675
39718
|
assets
|
|
39676
39719
|
};
|
|
39677
|
-
//# sourceMappingURL=chunk-
|
|
39720
|
+
//# sourceMappingURL=chunk-EXU5N5RM.js.map
|