@helpwave/hightide 0.12.4 → 0.12.6
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 +32 -13
- package/dist/index.d.ts +32 -13
- package/dist/index.js +172 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +250 -171
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +20 -3
- package/dist/style/uncompiled/theme/components/app-page.css +2 -2
- package/dist/style/uncompiled/theme/components/vertical-navigation.css +5 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14113,11 +14113,11 @@ var VerticalDivider = ({
|
|
|
14113
14113
|
|
|
14114
14114
|
// src/components/layout/app/AppPage.tsx
|
|
14115
14115
|
import clsx15 from "clsx";
|
|
14116
|
-
import { useCallback as useCallback28, useMemo as useMemo22, useRef as useRef25, useState as
|
|
14116
|
+
import { useCallback as useCallback28, useMemo as useMemo22, useRef as useRef25, useState as useState23 } from "react";
|
|
14117
14117
|
import { MenuIcon, X } from "lucide-react";
|
|
14118
14118
|
|
|
14119
14119
|
// src/components/layout/navigation/navigation-menus/NavigationContext.tsx
|
|
14120
|
-
import { createContext as createContext11, useCallback as useCallback26, useContext as useContext12, useEffect as useEffect28, useMemo as useMemo21, useRef as useRef23 } from "react";
|
|
14120
|
+
import { createContext as createContext11, useCallback as useCallback26, useContext as useContext12, useEffect as useEffect28, useMemo as useMemo21, useRef as useRef23, useState as useState22 } from "react";
|
|
14121
14121
|
|
|
14122
14122
|
// src/hooks/useTreeNavigation.ts
|
|
14123
14123
|
import { useCallback as useCallback25, useEffect as useEffect27, useMemo as useMemo20, useState as useState21 } from "react";
|
|
@@ -14139,6 +14139,22 @@ function buildTreeIndex(nodes) {
|
|
|
14139
14139
|
roots: [...nodes]
|
|
14140
14140
|
};
|
|
14141
14141
|
}
|
|
14142
|
+
function resolveTreeNodePath(nodes, id) {
|
|
14143
|
+
if (id == null) return null;
|
|
14144
|
+
const entry = buildTreeIndex(nodes).byId.get(id);
|
|
14145
|
+
return entry?.path ?? null;
|
|
14146
|
+
}
|
|
14147
|
+
function flattenAllItems(nodes, expandedIds, path = []) {
|
|
14148
|
+
const result = [];
|
|
14149
|
+
for (const node of nodes) {
|
|
14150
|
+
const currentPath = [...path, node.id];
|
|
14151
|
+
const hasChildren = node.items.length > 0;
|
|
14152
|
+
const expanded = hasChildren && expandedIds.has(node.id);
|
|
14153
|
+
result.push({ id: node.id, path: currentPath, expanded });
|
|
14154
|
+
result.push(...flattenAllItems(node.items, expandedIds, currentPath));
|
|
14155
|
+
}
|
|
14156
|
+
return result;
|
|
14157
|
+
}
|
|
14142
14158
|
function flattenVisibleItems(nodes, expandedIds, path = []) {
|
|
14143
14159
|
const result = [];
|
|
14144
14160
|
for (const node of nodes) {
|
|
@@ -14175,11 +14191,11 @@ function isAncestorOf(ancestorId, descendantPath) {
|
|
|
14175
14191
|
const index = descendantPath.indexOf(ancestorId);
|
|
14176
14192
|
return index >= 0 && index < descendantPath.length - 1;
|
|
14177
14193
|
}
|
|
14178
|
-
function pruneExpandedIds(expandedIds,
|
|
14179
|
-
if (!onlyOneExpandedTree ||
|
|
14194
|
+
function pruneExpandedIds(expandedIds, focusedPath, onlyOneExpandedTree, index) {
|
|
14195
|
+
if (!onlyOneExpandedTree || focusedPath == null) {
|
|
14180
14196
|
return new Set(expandedIds);
|
|
14181
14197
|
}
|
|
14182
|
-
const pathSet = new Set(
|
|
14198
|
+
const pathSet = new Set(focusedPath);
|
|
14183
14199
|
const pruned = /* @__PURE__ */ new Set();
|
|
14184
14200
|
for (const id of expandedIds) {
|
|
14185
14201
|
if (!pathSet.has(id)) continue;
|
|
@@ -14190,77 +14206,80 @@ function pruneExpandedIds(expandedIds, activePath, onlyOneExpandedTree, index) {
|
|
|
14190
14206
|
}
|
|
14191
14207
|
return pruned;
|
|
14192
14208
|
}
|
|
14193
|
-
function
|
|
14209
|
+
function syncExpansionForFocused(expandedIds, focusedPath, onlyOneExpandedTree, index) {
|
|
14194
14210
|
const next = new Set(expandedIds);
|
|
14195
|
-
for (const id of getExpandableAncestorIds(
|
|
14211
|
+
for (const id of getExpandableAncestorIds(focusedPath, index)) {
|
|
14196
14212
|
next.add(id);
|
|
14197
14213
|
}
|
|
14198
|
-
return pruneExpandedIds(next,
|
|
14214
|
+
return pruneExpandedIds(next, focusedPath, onlyOneExpandedTree, index);
|
|
14199
14215
|
}
|
|
14200
14216
|
function useTreeNavigation({
|
|
14201
14217
|
nodes,
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
|
|
14218
|
+
focusedId: controlledFocusedId,
|
|
14219
|
+
onFocusedIdChange,
|
|
14220
|
+
initialFocusedId,
|
|
14205
14221
|
onlyOneExpandedTree = false
|
|
14206
14222
|
}) {
|
|
14207
14223
|
const index = useMemo20(() => buildTreeIndex(nodes), [nodes]);
|
|
14208
|
-
const [
|
|
14209
|
-
value:
|
|
14210
|
-
onValueChange:
|
|
14211
|
-
defaultValue:
|
|
14224
|
+
const [focusedId, setFocusedId] = useControlledState({
|
|
14225
|
+
value: controlledFocusedId,
|
|
14226
|
+
onValueChange: onFocusedIdChange,
|
|
14227
|
+
defaultValue: initialFocusedId ?? null
|
|
14212
14228
|
});
|
|
14213
|
-
const
|
|
14214
|
-
if (
|
|
14215
|
-
if (index.byId.has(
|
|
14229
|
+
const resolvedFocusedId = useMemo20(() => {
|
|
14230
|
+
if (focusedId == null) return null;
|
|
14231
|
+
if (index.byId.has(focusedId)) return focusedId;
|
|
14216
14232
|
return null;
|
|
14217
|
-
}, [
|
|
14233
|
+
}, [focusedId, index]);
|
|
14218
14234
|
const [expandedIds, setExpandedIds] = useState21(() => /* @__PURE__ */ new Set());
|
|
14219
14235
|
useEffect27(() => {
|
|
14220
|
-
if (
|
|
14221
|
-
const entry = index.byId.get(
|
|
14236
|
+
if (resolvedFocusedId == null) return;
|
|
14237
|
+
const entry = index.byId.get(resolvedFocusedId);
|
|
14222
14238
|
if (entry == null) return;
|
|
14223
|
-
setExpandedIds((prev) =>
|
|
14224
|
-
}, [
|
|
14225
|
-
const
|
|
14239
|
+
setExpandedIds((prev) => syncExpansionForFocused(prev, entry.path, onlyOneExpandedTree, index));
|
|
14240
|
+
}, [resolvedFocusedId, onlyOneExpandedTree, index]);
|
|
14241
|
+
const visibleItems = useMemo20(() => {
|
|
14226
14242
|
return flattenVisibleItems(nodes, expandedIds);
|
|
14227
14243
|
}, [nodes, expandedIds]);
|
|
14228
|
-
const
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14244
|
+
const allItems = useMemo20(() => {
|
|
14245
|
+
return flattenAllItems(nodes, expandedIds);
|
|
14246
|
+
}, [nodes, expandedIds]);
|
|
14247
|
+
const focusedItem = useMemo20(() => {
|
|
14248
|
+
if (resolvedFocusedId == null) return null;
|
|
14249
|
+
return allItems.find((item) => item.id === resolvedFocusedId) ?? null;
|
|
14250
|
+
}, [allItems, resolvedFocusedId]);
|
|
14232
14251
|
const navigateTo = useCallback25((id) => {
|
|
14233
14252
|
const entry = index.byId.get(id);
|
|
14234
14253
|
if (entry == null) {
|
|
14235
14254
|
console.warn(`Attempted to navigate to node ${id} that does not exist`);
|
|
14236
14255
|
return;
|
|
14237
14256
|
}
|
|
14238
|
-
|
|
14257
|
+
setFocusedId(id);
|
|
14239
14258
|
setExpandedIds((prev) => {
|
|
14240
|
-
const next2 =
|
|
14259
|
+
const next2 = syncExpansionForFocused(prev, entry.path, onlyOneExpandedTree, index);
|
|
14241
14260
|
return next2;
|
|
14242
14261
|
});
|
|
14243
|
-
}, [index, onlyOneExpandedTree,
|
|
14262
|
+
}, [index, onlyOneExpandedTree, setFocusedId]);
|
|
14244
14263
|
const expand = useCallback25((id, options) => {
|
|
14245
14264
|
const entry = index.byId.get(id);
|
|
14246
14265
|
if (entry == null || entry.node.items.length === 0) return;
|
|
14247
14266
|
if (options?.isFocusing) {
|
|
14248
|
-
|
|
14267
|
+
setFocusedId(id);
|
|
14249
14268
|
}
|
|
14250
14269
|
setExpandedIds((prev) => {
|
|
14251
14270
|
const next2 = new Set(prev);
|
|
14252
14271
|
next2.add(id);
|
|
14253
|
-
const
|
|
14254
|
-
return pruneExpandedIds(next2,
|
|
14272
|
+
const focusedPath = options?.isFocusing ? entry.path : resolvedFocusedId != null ? index.byId.get(resolvedFocusedId)?.path ?? null : null;
|
|
14273
|
+
return pruneExpandedIds(next2, focusedPath, onlyOneExpandedTree, index);
|
|
14255
14274
|
});
|
|
14256
|
-
}, [index, onlyOneExpandedTree,
|
|
14275
|
+
}, [index, onlyOneExpandedTree, resolvedFocusedId, setFocusedId]);
|
|
14257
14276
|
const collapse = useCallback25((id, options) => {
|
|
14258
|
-
if (!options?.isFocusing &&
|
|
14259
|
-
const
|
|
14260
|
-
if (
|
|
14277
|
+
if (!options?.isFocusing && resolvedFocusedId != null) {
|
|
14278
|
+
const focusedEntry = index.byId.get(resolvedFocusedId);
|
|
14279
|
+
if (focusedEntry != null && isAncestorOf(id, focusedEntry.path)) return;
|
|
14261
14280
|
}
|
|
14262
14281
|
if (options?.isFocusing) {
|
|
14263
|
-
|
|
14282
|
+
setFocusedId(id);
|
|
14264
14283
|
}
|
|
14265
14284
|
const descendantIds = getDescendantIds(index, id);
|
|
14266
14285
|
setExpandedIds((prev) => {
|
|
@@ -14271,12 +14290,12 @@ function useTreeNavigation({
|
|
|
14271
14290
|
}
|
|
14272
14291
|
return next2;
|
|
14273
14292
|
});
|
|
14274
|
-
}, [index,
|
|
14293
|
+
}, [index, resolvedFocusedId, setFocusedId]);
|
|
14275
14294
|
const toggleExpansion = useCallback25((id, options) => {
|
|
14276
14295
|
const entry = index.byId.get(id);
|
|
14277
14296
|
if (entry == null || entry.node.items.length === 0) return;
|
|
14278
14297
|
if (options?.isFocusing) {
|
|
14279
|
-
|
|
14298
|
+
setFocusedId(id);
|
|
14280
14299
|
setExpandedIds((prev) => {
|
|
14281
14300
|
if (prev.has(id)) {
|
|
14282
14301
|
const next3 = new Set(prev);
|
|
@@ -14301,44 +14320,45 @@ function useTreeNavigation({
|
|
|
14301
14320
|
} else {
|
|
14302
14321
|
expand(id);
|
|
14303
14322
|
}
|
|
14304
|
-
}, [index, expandedIds, expand, collapse, onlyOneExpandedTree,
|
|
14323
|
+
}, [index, expandedIds, expand, collapse, onlyOneExpandedTree, setFocusedId]);
|
|
14305
14324
|
const next = useCallback25(() => {
|
|
14306
|
-
if (
|
|
14307
|
-
if (
|
|
14308
|
-
navigateTo(
|
|
14325
|
+
if (visibleItems.length === 0) return;
|
|
14326
|
+
if (resolvedFocusedId == null) {
|
|
14327
|
+
navigateTo(visibleItems[0].id);
|
|
14309
14328
|
return;
|
|
14310
14329
|
}
|
|
14311
|
-
const currentIndex =
|
|
14330
|
+
const currentIndex = visibleItems.findIndex((item) => item.id === resolvedFocusedId);
|
|
14312
14331
|
const startIndex = currentIndex < 0 ? 0 : currentIndex;
|
|
14313
|
-
if (startIndex <
|
|
14314
|
-
navigateTo(
|
|
14332
|
+
if (startIndex < visibleItems.length - 1) {
|
|
14333
|
+
navigateTo(visibleItems[startIndex + 1].id);
|
|
14315
14334
|
return;
|
|
14316
14335
|
}
|
|
14317
|
-
}, [
|
|
14336
|
+
}, [visibleItems, resolvedFocusedId, navigateTo]);
|
|
14318
14337
|
const previous = useCallback25(() => {
|
|
14319
|
-
if (
|
|
14320
|
-
if (
|
|
14321
|
-
navigateTo(
|
|
14338
|
+
if (visibleItems.length === 0) return;
|
|
14339
|
+
if (resolvedFocusedId == null) {
|
|
14340
|
+
navigateTo(visibleItems[visibleItems.length - 1].id);
|
|
14322
14341
|
return;
|
|
14323
14342
|
}
|
|
14324
|
-
const currentIndex =
|
|
14325
|
-
const startIndex = currentIndex < 0 ?
|
|
14343
|
+
const currentIndex = visibleItems.findIndex((item) => item.id === resolvedFocusedId);
|
|
14344
|
+
const startIndex = currentIndex < 0 ? visibleItems.length - 1 : currentIndex;
|
|
14326
14345
|
if (startIndex > 0) {
|
|
14327
|
-
navigateTo(
|
|
14346
|
+
navigateTo(visibleItems[startIndex - 1].id);
|
|
14328
14347
|
return;
|
|
14329
14348
|
}
|
|
14330
|
-
}, [
|
|
14349
|
+
}, [visibleItems, resolvedFocusedId, navigateTo]);
|
|
14331
14350
|
const first = useCallback25(() => {
|
|
14332
|
-
if (
|
|
14333
|
-
navigateTo(
|
|
14334
|
-
}, [
|
|
14351
|
+
if (visibleItems.length === 0) return;
|
|
14352
|
+
navigateTo(visibleItems[0].id);
|
|
14353
|
+
}, [visibleItems, navigateTo]);
|
|
14335
14354
|
const last = useCallback25(() => {
|
|
14336
|
-
if (
|
|
14337
|
-
navigateTo(
|
|
14338
|
-
}, [
|
|
14355
|
+
if (visibleItems.length === 0) return;
|
|
14356
|
+
navigateTo(visibleItems[visibleItems.length - 1].id);
|
|
14357
|
+
}, [visibleItems, navigateTo]);
|
|
14339
14358
|
return useMemo20(() => ({
|
|
14340
|
-
|
|
14341
|
-
|
|
14359
|
+
visibleItems,
|
|
14360
|
+
allItems,
|
|
14361
|
+
focusedItem,
|
|
14342
14362
|
navigateTo,
|
|
14343
14363
|
expand,
|
|
14344
14364
|
collapse,
|
|
@@ -14347,7 +14367,7 @@ function useTreeNavigation({
|
|
|
14347
14367
|
previous,
|
|
14348
14368
|
first,
|
|
14349
14369
|
last
|
|
14350
|
-
}), [
|
|
14370
|
+
}), [visibleItems, allItems, focusedItem, navigateTo, expand, collapse, toggleExpansion, next, previous, first, last]);
|
|
14351
14371
|
}
|
|
14352
14372
|
|
|
14353
14373
|
// src/components/layout/navigation/navigation-menus/NavigationContext.tsx
|
|
@@ -14355,22 +14375,41 @@ import { jsx as jsx40 } from "react/jsx-runtime";
|
|
|
14355
14375
|
var NavigationContext = createContext11(null);
|
|
14356
14376
|
function NavigationProvider({
|
|
14357
14377
|
children,
|
|
14358
|
-
|
|
14378
|
+
activeId = null,
|
|
14379
|
+
...treeOptions
|
|
14359
14380
|
}) {
|
|
14360
|
-
const navigation = useTreeNavigation(
|
|
14381
|
+
const navigation = useTreeNavigation({
|
|
14382
|
+
...treeOptions,
|
|
14383
|
+
initialFocusedId: treeOptions.initialFocusedId ?? activeId ?? treeOptions.nodes[0]?.id ?? null
|
|
14384
|
+
});
|
|
14361
14385
|
const itemRefs = useRef23(/* @__PURE__ */ new Map());
|
|
14362
|
-
const
|
|
14386
|
+
const [hasNavigatedToActiveId, setHasNavigatedToActiveId] = useState22(false);
|
|
14387
|
+
useEffect28(() => {
|
|
14388
|
+
if (activeId == null || hasNavigatedToActiveId) return;
|
|
14389
|
+
const navigationItem = navigation.allItems.find((item) => item.id === activeId);
|
|
14390
|
+
if (navigationItem == null) return;
|
|
14391
|
+
navigation.navigateTo(activeId);
|
|
14392
|
+
setHasNavigatedToActiveId(true);
|
|
14393
|
+
}, [activeId, navigation, navigation.navigateTo, navigation.allItems, hasNavigatedToActiveId]);
|
|
14394
|
+
const focusedId = useMemo21(() => {
|
|
14395
|
+
return navigation.focusedItem?.id ?? navigation.visibleItems[0]?.id ?? null;
|
|
14396
|
+
}, [navigation.focusedItem, navigation.visibleItems]);
|
|
14397
|
+
const activePath = useMemo21(() => {
|
|
14398
|
+
return resolveTreeNodePath(treeOptions.nodes, activeId);
|
|
14399
|
+
}, [treeOptions.nodes, activeId]);
|
|
14363
14400
|
const itemStateById = useMemo21(() => {
|
|
14364
14401
|
const map = /* @__PURE__ */ new Map();
|
|
14365
|
-
for (const item of navigation.
|
|
14402
|
+
for (const item of navigation.allItems) {
|
|
14366
14403
|
map.set(item.id, {
|
|
14367
14404
|
expanded: item.expanded,
|
|
14368
14405
|
isFocused: focusedId === item.id,
|
|
14406
|
+
isActive: activeId === item.id,
|
|
14407
|
+
isOnActivePath: activePath?.includes(item.id) ?? false,
|
|
14369
14408
|
path: item.path
|
|
14370
14409
|
});
|
|
14371
14410
|
}
|
|
14372
14411
|
return map;
|
|
14373
|
-
}, [navigation.
|
|
14412
|
+
}, [navigation.allItems, focusedId, activeId, activePath]);
|
|
14374
14413
|
const getItemState = useCallback26((id) => {
|
|
14375
14414
|
return itemStateById.get(id) ?? null;
|
|
14376
14415
|
}, [itemStateById]);
|
|
@@ -14386,9 +14425,12 @@ function NavigationProvider({
|
|
|
14386
14425
|
itemRefs.current.get(focusedId)?.focus();
|
|
14387
14426
|
}, [focusedId]);
|
|
14388
14427
|
const value = useMemo21(() => ({
|
|
14389
|
-
|
|
14428
|
+
focusedItem: navigation.focusedItem,
|
|
14390
14429
|
focusedId,
|
|
14391
|
-
|
|
14430
|
+
activeId,
|
|
14431
|
+
activePath,
|
|
14432
|
+
visibleItems: navigation.visibleItems,
|
|
14433
|
+
allItems: navigation.allItems,
|
|
14392
14434
|
getItemState,
|
|
14393
14435
|
navigateTo: navigation.navigateTo,
|
|
14394
14436
|
expand: navigation.expand,
|
|
@@ -14400,8 +14442,9 @@ function NavigationProvider({
|
|
|
14400
14442
|
toggleExpansion: navigation.toggleExpansion,
|
|
14401
14443
|
registerItemRef
|
|
14402
14444
|
}), [
|
|
14403
|
-
navigation.
|
|
14404
|
-
navigation.
|
|
14445
|
+
navigation.focusedItem,
|
|
14446
|
+
navigation.visibleItems,
|
|
14447
|
+
navigation.allItems,
|
|
14405
14448
|
navigation.navigateTo,
|
|
14406
14449
|
navigation.expand,
|
|
14407
14450
|
navigation.collapse,
|
|
@@ -14411,6 +14454,8 @@ function NavigationProvider({
|
|
|
14411
14454
|
navigation.last,
|
|
14412
14455
|
navigation.toggleExpansion,
|
|
14413
14456
|
focusedId,
|
|
14457
|
+
activeId,
|
|
14458
|
+
activePath,
|
|
14414
14459
|
getItemState,
|
|
14415
14460
|
registerItemRef
|
|
14416
14461
|
]);
|
|
@@ -14557,7 +14602,7 @@ function VerticalNavigationItem({
|
|
|
14557
14602
|
tabIndex: -1,
|
|
14558
14603
|
children: [
|
|
14559
14604
|
label,
|
|
14560
|
-
/* @__PURE__ */ jsx41(ExternalLink2, { className: "
|
|
14605
|
+
/* @__PURE__ */ jsx41(ExternalLink2, { className: "vertical-navigation-item-link-external-icon" })
|
|
14561
14606
|
]
|
|
14562
14607
|
}
|
|
14563
14608
|
) : /* @__PURE__ */ jsx41(
|
|
@@ -14577,11 +14622,12 @@ function VerticalNavigationItem({
|
|
|
14577
14622
|
role: "treeitem",
|
|
14578
14623
|
"data-name": "vertical-navigation-item",
|
|
14579
14624
|
"data-depth": depth,
|
|
14580
|
-
"data-
|
|
14625
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14581
14626
|
"aria-selected": isFocused ? true : void 0,
|
|
14582
14627
|
tabIndex: isFocused ? 0 : -1,
|
|
14583
14628
|
onKeyDown: handleKeyDown,
|
|
14584
14629
|
onClick: handleLeafActivate,
|
|
14630
|
+
className: "group/tree-leaf",
|
|
14585
14631
|
children: labelContent
|
|
14586
14632
|
}
|
|
14587
14633
|
);
|
|
@@ -14593,7 +14639,7 @@ function VerticalNavigationItem({
|
|
|
14593
14639
|
role: "treeitem",
|
|
14594
14640
|
"data-name": "vertical-navigation-node",
|
|
14595
14641
|
"data-depth": depth,
|
|
14596
|
-
"data-
|
|
14642
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14597
14643
|
"data-expanded": expanded ? "" : void 0,
|
|
14598
14644
|
"aria-expanded": expanded,
|
|
14599
14645
|
tabIndex: isFocused ? 0 : -1,
|
|
@@ -14605,7 +14651,7 @@ function VerticalNavigationItem({
|
|
|
14605
14651
|
{
|
|
14606
14652
|
ref: headerRef,
|
|
14607
14653
|
"data-name": "vertical-navigation-node-header",
|
|
14608
|
-
"data-
|
|
14654
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14609
14655
|
onClick: handleHeaderActivate,
|
|
14610
14656
|
children: [
|
|
14611
14657
|
label,
|
|
@@ -14705,30 +14751,61 @@ var AppPageSidebarWithNavigation = ({
|
|
|
14705
14751
|
footer,
|
|
14706
14752
|
navigationItems,
|
|
14707
14753
|
contentOverwrite,
|
|
14754
|
+
initialFocusedId,
|
|
14755
|
+
focusedId,
|
|
14756
|
+
onFocusedIdChange,
|
|
14757
|
+
activeId,
|
|
14708
14758
|
...props
|
|
14709
14759
|
}) => {
|
|
14710
14760
|
return /* @__PURE__ */ jsx43(AppSidebar, { ...props, children: /* @__PURE__ */ jsxs24("div", { className: "app-page-sidebar-with-navigation", children: [
|
|
14711
14761
|
header && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-header", children: header }),
|
|
14712
|
-
navigationItems && !contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: /* @__PURE__ */ jsx43(
|
|
14762
|
+
navigationItems && !contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: /* @__PURE__ */ jsx43(
|
|
14763
|
+
VerticalNavigationTree,
|
|
14764
|
+
{
|
|
14765
|
+
items: navigationItems,
|
|
14766
|
+
initialFocusedId,
|
|
14767
|
+
focusedId,
|
|
14768
|
+
onFocusedIdChange,
|
|
14769
|
+
activeId
|
|
14770
|
+
}
|
|
14771
|
+
) }),
|
|
14713
14772
|
contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: contentOverwrite }),
|
|
14714
14773
|
footer && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-footer", children: footer })
|
|
14715
14774
|
] }) });
|
|
14716
14775
|
};
|
|
14776
|
+
function findActiveIdByUrl(items, activeUrl) {
|
|
14777
|
+
for (const item of items) {
|
|
14778
|
+
if (item.url === activeUrl) return item.id;
|
|
14779
|
+
if (item.items != null) {
|
|
14780
|
+
const found = findActiveIdByUrl(item.items, activeUrl);
|
|
14781
|
+
if (found != null) return found;
|
|
14782
|
+
}
|
|
14783
|
+
}
|
|
14784
|
+
return null;
|
|
14785
|
+
}
|
|
14717
14786
|
var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
14718
14787
|
const translation = useHightideTranslation();
|
|
14719
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
14788
|
+
const [isSidebarOpen, setIsSidebarOpen] = useState23(false);
|
|
14789
|
+
const resolvedActiveId = useMemo22(() => {
|
|
14790
|
+
if (sidebarProps.activeId !== void 0) return sidebarProps.activeId;
|
|
14791
|
+
if (sidebarProps.activeUrl == null || sidebarProps.items == null) return null;
|
|
14792
|
+
return findActiveIdByUrl(sidebarProps.items, sidebarProps.activeUrl);
|
|
14793
|
+
}, [sidebarProps.activeId, sidebarProps.activeUrl, sidebarProps.items]);
|
|
14720
14794
|
const toNavigationItems = useCallback28((items) => {
|
|
14721
|
-
return items?.map((item) =>
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
item
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14795
|
+
return items?.map((item) => {
|
|
14796
|
+
const isActive = item.id === resolvedActiveId;
|
|
14797
|
+
return {
|
|
14798
|
+
id: item.id,
|
|
14799
|
+
label: /* @__PURE__ */ jsxs24("span", { className: "app-page-navigation-item-label", "data-active-page": isActive ? "" : void 0, children: [
|
|
14800
|
+
item.icon && /* @__PURE__ */ jsx43("span", { className: "size-5", children: item.icon }),
|
|
14801
|
+
item.label
|
|
14802
|
+
] }),
|
|
14803
|
+
url: item.url,
|
|
14804
|
+
external: item.external,
|
|
14805
|
+
items: toNavigationItems(item.items)
|
|
14806
|
+
};
|
|
14807
|
+
}) ?? void 0;
|
|
14808
|
+
}, [resolvedActiveId]);
|
|
14732
14809
|
const navigationItems = useMemo22(() => toNavigationItems(
|
|
14733
14810
|
sidebarProps.items
|
|
14734
14811
|
), [sidebarProps.items, toNavigationItems]);
|
|
@@ -14747,7 +14824,11 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14747
14824
|
header: sidebarProps.header,
|
|
14748
14825
|
footer: sidebarProps.footer,
|
|
14749
14826
|
navigationItems,
|
|
14750
|
-
contentOverwrite: sidebarProps.contentOverwrite
|
|
14827
|
+
contentOverwrite: sidebarProps.contentOverwrite,
|
|
14828
|
+
initialFocusedId: sidebarProps.initialFocusedId,
|
|
14829
|
+
focusedId: sidebarProps.focusedId,
|
|
14830
|
+
onFocusedIdChange: sidebarProps.onFocusedIdChange,
|
|
14831
|
+
activeId: resolvedActiveId
|
|
14751
14832
|
}
|
|
14752
14833
|
),
|
|
14753
14834
|
/* @__PURE__ */ jsxs24("div", { "data-name": "app-page-content", children: [
|
|
@@ -15086,7 +15167,7 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
|
|
|
15086
15167
|
import clsx18 from "clsx";
|
|
15087
15168
|
|
|
15088
15169
|
// src/global-contexts/ThemeContext.tsx
|
|
15089
|
-
import { createContext as createContext13, useCallback as useCallback30, useContext as useContext15, useEffect as useEffect29, useMemo as useMemo25, useState as
|
|
15170
|
+
import { createContext as createContext13, useCallback as useCallback30, useContext as useContext15, useEffect as useEffect29, useMemo as useMemo25, useState as useState24 } from "react";
|
|
15090
15171
|
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
15091
15172
|
var themes = ["light", "dark", "system"];
|
|
15092
15173
|
var ThemeUtil = {
|
|
@@ -15100,7 +15181,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
15100
15181
|
deleteValue: deleteStoredTheme
|
|
15101
15182
|
} = useStorage({ key: "theme", defaultValue: "system" });
|
|
15102
15183
|
const { config } = useHightideConfig();
|
|
15103
|
-
const [themePreference, setThemePreference] =
|
|
15184
|
+
const [themePreference, setThemePreference] = useState24("system");
|
|
15104
15185
|
const resolvedTheme = useMemo25(() => {
|
|
15105
15186
|
if (theme && theme !== "system") {
|
|
15106
15187
|
return theme;
|
|
@@ -15192,7 +15273,6 @@ var ThemeSelect = ({ ...props }) => {
|
|
|
15192
15273
|
{
|
|
15193
15274
|
value: theme,
|
|
15194
15275
|
onEditComplete: (value) => {
|
|
15195
|
-
console.log("onEditComplete", value);
|
|
15196
15276
|
props.onEditComplete?.(value);
|
|
15197
15277
|
setTheme(value);
|
|
15198
15278
|
},
|
|
@@ -15438,7 +15518,7 @@ var ErrorComponent = ({
|
|
|
15438
15518
|
};
|
|
15439
15519
|
|
|
15440
15520
|
// src/components/layout/loading/LoadingAndErrorComponent.tsx
|
|
15441
|
-
import { useState as
|
|
15521
|
+
import { useState as useState25 } from "react";
|
|
15442
15522
|
|
|
15443
15523
|
// src/components/layout/loading/LoadingContainer.tsx
|
|
15444
15524
|
import { clsx as clsx20 } from "clsx";
|
|
@@ -15459,8 +15539,8 @@ var LoadingAndErrorComponent = ({
|
|
|
15459
15539
|
minimumLoadingDuration = 200,
|
|
15460
15540
|
className
|
|
15461
15541
|
}) => {
|
|
15462
|
-
const [isInMinimumLoading, setIsInMinimumLoading] =
|
|
15463
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] =
|
|
15542
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = useState25(false);
|
|
15543
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState25(false);
|
|
15464
15544
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
15465
15545
|
setIsInMinimumLoading(true);
|
|
15466
15546
|
setTimeout(() => {
|
|
@@ -15525,7 +15605,7 @@ var BreadCrumbs = ({ crumbs }) => {
|
|
|
15525
15605
|
var import_link2 = __toESM(require_link2());
|
|
15526
15606
|
import { Menu as MenuIcon2, XIcon } from "lucide-react";
|
|
15527
15607
|
import { useEffect as useEffect30 } from "react";
|
|
15528
|
-
import { useCallback as useCallback31, useId as useId14, useRef as useRef28, useState as
|
|
15608
|
+
import { useCallback as useCallback31, useId as useId14, useRef as useRef28, useState as useState26 } from "react";
|
|
15529
15609
|
import clsx23 from "clsx";
|
|
15530
15610
|
import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
15531
15611
|
function isSubItem(item) {
|
|
@@ -15537,7 +15617,7 @@ var NavigationItemWithSubItem = ({
|
|
|
15537
15617
|
horizontalAlignment = "center",
|
|
15538
15618
|
...options
|
|
15539
15619
|
}) => {
|
|
15540
|
-
const [isOpen, setOpen] =
|
|
15620
|
+
const [isOpen, setOpen] = useState26(false);
|
|
15541
15621
|
const containerRef = useRef28(null);
|
|
15542
15622
|
const triggerRef = useRef28(null);
|
|
15543
15623
|
const id = useId14();
|
|
@@ -15614,7 +15694,7 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
15614
15694
|
};
|
|
15615
15695
|
var Navigation = ({ ...props }) => {
|
|
15616
15696
|
const translation = useHightideTranslation();
|
|
15617
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
15697
|
+
const [isMobileOpen, setIsMobileOpen] = useState26(false);
|
|
15618
15698
|
const id = useId14();
|
|
15619
15699
|
const menuRef = useRef28(null);
|
|
15620
15700
|
useEffect30(() => {
|
|
@@ -15685,7 +15765,7 @@ var Navigation = ({ ...props }) => {
|
|
|
15685
15765
|
// src/components/layout/navigation/Pagination.tsx
|
|
15686
15766
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
15687
15767
|
import clsx24 from "clsx";
|
|
15688
|
-
import { useEffect as useEffect31, useState as
|
|
15768
|
+
import { useEffect as useEffect31, useState as useState27 } from "react";
|
|
15689
15769
|
import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15690
15770
|
var Pagination = ({
|
|
15691
15771
|
pageIndex,
|
|
@@ -15694,7 +15774,7 @@ var Pagination = ({
|
|
|
15694
15774
|
...props
|
|
15695
15775
|
}) => {
|
|
15696
15776
|
const translation = useHightideTranslation();
|
|
15697
|
-
const [value, setValue] =
|
|
15777
|
+
const [value, setValue] = useState27((pageIndex + 1).toString());
|
|
15698
15778
|
const noPages = pageCount === 0;
|
|
15699
15779
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
15700
15780
|
const onLastPage = pageIndex === pageCount - 1;
|
|
@@ -15921,7 +16001,7 @@ function PopUpOpener({ children }) {
|
|
|
15921
16001
|
}
|
|
15922
16002
|
|
|
15923
16003
|
// src/components/layout/popup/PopUpRoot.tsx
|
|
15924
|
-
import { useId as useId15, useMemo as useMemo28, useState as
|
|
16004
|
+
import { useId as useId15, useMemo as useMemo28, useState as useState28 } from "react";
|
|
15925
16005
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
15926
16006
|
function PopUpRoot({
|
|
15927
16007
|
children,
|
|
@@ -15938,7 +16018,7 @@ function PopUpRoot({
|
|
|
15938
16018
|
onValueChange: onIsOpenChange,
|
|
15939
16019
|
defaultValue: initialIsOpen
|
|
15940
16020
|
});
|
|
15941
|
-
const [triggerRef, setTriggerRef] =
|
|
16021
|
+
const [triggerRef, setTriggerRef] = useState28(null);
|
|
15942
16022
|
const popUpId = useMemo28(() => popUpIdOverwrite ?? `pop-up-${generatedPopUpId}`, [popUpIdOverwrite, generatedPopUpId]);
|
|
15943
16023
|
const triggerId = useMemo28(() => triggerIdOverwrite ?? `pop-up-trigger-${generatedTriggerId}`, [triggerIdOverwrite, generatedTriggerId]);
|
|
15944
16024
|
const contextValue = useMemo28(() => ({
|
|
@@ -16128,7 +16208,7 @@ var FillerCell = ({ ...props }) => {
|
|
|
16128
16208
|
};
|
|
16129
16209
|
|
|
16130
16210
|
// src/components/layout/table/TableProvider.tsx
|
|
16131
|
-
import { useCallback as useCallback33, useEffect as useEffect33, useLayoutEffect as useLayoutEffect6, useMemo as useMemo29, useRef as useRef30, useState as
|
|
16211
|
+
import { useCallback as useCallback33, useEffect as useEffect33, useLayoutEffect as useLayoutEffect6, useMemo as useMemo29, useRef as useRef30, useState as useState29 } from "react";
|
|
16132
16212
|
|
|
16133
16213
|
// src/components/layout/table/TableContext.tsx
|
|
16134
16214
|
import { createContext as createContext15, useContext as useContext17 } from "react";
|
|
@@ -17215,9 +17295,9 @@ var TableProvider = ({
|
|
|
17215
17295
|
}) => {
|
|
17216
17296
|
const onRowClickStable = useEventCallbackStabilizer(onRowClick);
|
|
17217
17297
|
const onFillerRowClickStable = useEventCallbackStabilizer(onFillerRowClick);
|
|
17218
|
-
const [registeredColumns, setRegisteredColumns] =
|
|
17298
|
+
const [registeredColumns, setRegisteredColumns] = useState29([]);
|
|
17219
17299
|
const containerRef = useRef30(null);
|
|
17220
|
-
const [, setTableState] =
|
|
17300
|
+
const [, setTableState] = useState29({
|
|
17221
17301
|
columnSizing: {},
|
|
17222
17302
|
columnOrder: [],
|
|
17223
17303
|
columnFilters: [],
|
|
@@ -17242,7 +17322,7 @@ var TableProvider = ({
|
|
|
17242
17322
|
pageSize: 10
|
|
17243
17323
|
}
|
|
17244
17324
|
});
|
|
17245
|
-
const [targetWidth, setTargetWidth] =
|
|
17325
|
+
const [targetWidth, setTargetWidth] = useState29(void 0);
|
|
17246
17326
|
useLayoutEffect6(() => {
|
|
17247
17327
|
const width = containerRef.current?.getBoundingClientRect().width;
|
|
17248
17328
|
setTargetWidth(width !== void 0 ? Math.floor(width) : void 0);
|
|
@@ -17504,15 +17584,15 @@ var TableSortButton = ({
|
|
|
17504
17584
|
|
|
17505
17585
|
// src/components/layout/table/TableFilterButton.tsx
|
|
17506
17586
|
import { FilterIcon } from "lucide-react";
|
|
17507
|
-
import { useEffect as useEffect46, useId as useId20, useMemo as useMemo39, useRef as useRef39, useState as
|
|
17587
|
+
import { useEffect as useEffect46, useId as useId20, useMemo as useMemo39, useRef as useRef39, useState as useState38 } from "react";
|
|
17508
17588
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
17509
17589
|
|
|
17510
17590
|
// src/components/user-interaction/data/FilterPopUp.tsx
|
|
17511
17591
|
import { Check as Check3, TrashIcon } from "lucide-react";
|
|
17512
|
-
import { forwardRef as forwardRef25, useEffect as useEffect45, useId as useId19, useMemo as useMemo38, useState as
|
|
17592
|
+
import { forwardRef as forwardRef25, useEffect as useEffect45, useId as useId19, useMemo as useMemo38, useState as useState37 } from "react";
|
|
17513
17593
|
|
|
17514
17594
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
17515
|
-
import { forwardRef as forwardRef20, useCallback as useCallback36, useEffect as useEffect39, useId as useId16, useImperativeHandle as useImperativeHandle11, useMemo as useMemo34, useRef as useRef35, useState as
|
|
17595
|
+
import { forwardRef as forwardRef20, useCallback as useCallback36, useEffect as useEffect39, useId as useId16, useImperativeHandle as useImperativeHandle11, useMemo as useMemo34, useRef as useRef35, useState as useState34 } from "react";
|
|
17516
17596
|
import { CalendarIcon, X as X4 } from "lucide-react";
|
|
17517
17597
|
import clsx31 from "clsx";
|
|
17518
17598
|
|
|
@@ -17700,7 +17780,7 @@ var TimePicker = ({
|
|
|
17700
17780
|
};
|
|
17701
17781
|
|
|
17702
17782
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
17703
|
-
import { useState as
|
|
17783
|
+
import { useState as useState31 } from "react";
|
|
17704
17784
|
import { ArrowDown, ArrowUp, Calendar, ChevronDown as ChevronDown4 } from "lucide-react";
|
|
17705
17785
|
import clsx29 from "clsx";
|
|
17706
17786
|
|
|
@@ -17826,7 +17906,7 @@ var DayPicker = ({
|
|
|
17826
17906
|
};
|
|
17827
17907
|
|
|
17828
17908
|
// src/components/user-interaction/date/YearMonthPicker.tsx
|
|
17829
|
-
import { memo, useCallback as useCallback35, useEffect as useEffect36, useMemo as useMemo32, useRef as useRef33, useState as
|
|
17909
|
+
import { memo, useCallback as useCallback35, useEffect as useEffect36, useMemo as useMemo32, useRef as useRef33, useState as useState30 } from "react";
|
|
17830
17910
|
import clsx28 from "clsx";
|
|
17831
17911
|
import { jsx as jsx73, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
17832
17912
|
var YearRow = memo(function YearRow2({
|
|
@@ -17839,7 +17919,7 @@ var YearRow = memo(function YearRow2({
|
|
|
17839
17919
|
}) {
|
|
17840
17920
|
const ref = useRef33(null);
|
|
17841
17921
|
const isSelectedYear = selectedMonthIndex !== void 0;
|
|
17842
|
-
const [isExpanded, setIsExpanded] =
|
|
17922
|
+
const [isExpanded, setIsExpanded] = useState30(false);
|
|
17843
17923
|
useEffect36(() => {
|
|
17844
17924
|
if (isSelectedYear) {
|
|
17845
17925
|
ref.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
@@ -17969,8 +18049,8 @@ var DatePicker = ({
|
|
|
17969
18049
|
onValueChange,
|
|
17970
18050
|
defaultValue: initialValue
|
|
17971
18051
|
});
|
|
17972
|
-
const [displayedMonth, setDisplayedMonth] =
|
|
17973
|
-
const [displayMode, setDisplayMode] =
|
|
18052
|
+
const [displayedMonth, setDisplayedMonth] = useState31(new Date(value.getFullYear(), value.getMonth(), 1));
|
|
18053
|
+
const [displayMode, setDisplayMode] = useState31(initialDisplay);
|
|
17974
18054
|
return /* @__PURE__ */ jsxs43("div", { className: clsx29("flex-col-3", className), children: [
|
|
17975
18055
|
/* @__PURE__ */ jsxs43("div", { className: "flex-row-2 items-center justify-between", children: [
|
|
17976
18056
|
/* @__PURE__ */ jsxs43(
|
|
@@ -18132,7 +18212,7 @@ var DateTimePicker = ({
|
|
|
18132
18212
|
};
|
|
18133
18213
|
|
|
18134
18214
|
// src/components/user-interaction/date/DateTimePickerDialog.tsx
|
|
18135
|
-
import { useEffect as useEffect37, useState as
|
|
18215
|
+
import { useEffect as useEffect37, useState as useState32 } from "react";
|
|
18136
18216
|
import { Fragment as Fragment8, jsx as jsx76, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
18137
18217
|
var DateTimePickerDialog = ({
|
|
18138
18218
|
initialValue = null,
|
|
@@ -18160,7 +18240,7 @@ var DateTimePickerDialog = ({
|
|
|
18160
18240
|
onValueChange,
|
|
18161
18241
|
defaultValue: initialValue
|
|
18162
18242
|
});
|
|
18163
|
-
const [pickerState, setPickerState] =
|
|
18243
|
+
const [pickerState, setPickerState] = useState32(state ?? /* @__PURE__ */ new Date());
|
|
18164
18244
|
useEffect37(() => {
|
|
18165
18245
|
setPickerState(state ?? /* @__PURE__ */ new Date());
|
|
18166
18246
|
}, [state]);
|
|
@@ -18235,7 +18315,7 @@ var DateTimePickerDialog = ({
|
|
|
18235
18315
|
};
|
|
18236
18316
|
|
|
18237
18317
|
// src/components/user-interaction/input/DateTimeField.tsx
|
|
18238
|
-
import { forwardRef as forwardRef19, useEffect as useEffect38, useLayoutEffect as useLayoutEffect7, useMemo as useMemo33, useRef as useRef34, useState as
|
|
18318
|
+
import { forwardRef as forwardRef19, useEffect as useEffect38, useLayoutEffect as useLayoutEffect7, useMemo as useMemo33, useRef as useRef34, useState as useState33 } from "react";
|
|
18239
18319
|
import clsx30 from "clsx";
|
|
18240
18320
|
|
|
18241
18321
|
// src/components/user-interaction/input/dateTimeSegments.ts
|
|
@@ -18542,11 +18622,11 @@ var DateTimeField = forwardRef19(function DateTimeField2({
|
|
|
18542
18622
|
[locale, mode, precision, is24Hour]
|
|
18543
18623
|
);
|
|
18544
18624
|
const editableTypes = useMemo33(() => editableTypesOf(layout), [layout]);
|
|
18545
|
-
const [editState, setEditState] =
|
|
18625
|
+
const [editState, setEditState] = useState33(() => ({
|
|
18546
18626
|
values: value ? decomposeDate(value, layout, is24Hour) : {},
|
|
18547
18627
|
buffer: null
|
|
18548
18628
|
}));
|
|
18549
|
-
const [focusedType, setFocusedType] =
|
|
18629
|
+
const [focusedType, setFocusedType] = useState33(null);
|
|
18550
18630
|
const editStateRef = useRef34(editState);
|
|
18551
18631
|
editStateRef.current = editState;
|
|
18552
18632
|
const segmentRefs = useRef34(/* @__PURE__ */ new Map());
|
|
@@ -18792,13 +18872,13 @@ var DateTimeInput = forwardRef20(function DateTimeInput2({
|
|
|
18792
18872
|
const translation = useHightideTranslation();
|
|
18793
18873
|
const { timeZone: contextTimeZone } = useLocale();
|
|
18794
18874
|
const timeZone = timeZoneOverride ?? contextTimeZone;
|
|
18795
|
-
const [isOpen, setIsOpen] =
|
|
18875
|
+
const [isOpen, setIsOpen] = useState34(false);
|
|
18796
18876
|
const [state, setState] = useControlledState({
|
|
18797
18877
|
value,
|
|
18798
18878
|
onValueChange,
|
|
18799
18879
|
defaultValue: initialValue
|
|
18800
18880
|
});
|
|
18801
|
-
const [dialogValue, setDialogValue] =
|
|
18881
|
+
const [dialogValue, setDialogValue] = useState34(state);
|
|
18802
18882
|
const changeOpenWrapper = useCallback36((isOpen2) => {
|
|
18803
18883
|
onDialogOpeningChange?.(isOpen2);
|
|
18804
18884
|
setIsOpen(isOpen2);
|
|
@@ -18956,7 +19036,7 @@ var DateTimeInput = forwardRef20(function DateTimeInput2({
|
|
|
18956
19036
|
import { forwardRef as forwardRef24 } from "react";
|
|
18957
19037
|
|
|
18958
19038
|
// src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx
|
|
18959
|
-
import { useCallback as useCallback39, useEffect as useEffect41, useId as useId17, useMemo as useMemo37, useState as
|
|
19039
|
+
import { useCallback as useCallback39, useEffect as useEffect41, useId as useId17, useMemo as useMemo37, useState as useState36 } from "react";
|
|
18960
19040
|
|
|
18961
19041
|
// src/components/user-interaction/MultiSelect/MultiSelectContext.tsx
|
|
18962
19042
|
import { createContext as createContext16, useContext as useContext18 } from "react";
|
|
@@ -18972,7 +19052,7 @@ import {
|
|
|
18972
19052
|
useCallback as useCallback38,
|
|
18973
19053
|
useEffect as useEffect40,
|
|
18974
19054
|
useMemo as useMemo36,
|
|
18975
|
-
useState as
|
|
19055
|
+
useState as useState35
|
|
18976
19056
|
} from "react";
|
|
18977
19057
|
|
|
18978
19058
|
// src/hooks/useMultiSelection.ts
|
|
@@ -19025,8 +19105,8 @@ function useMultiSelect({
|
|
|
19025
19105
|
initialIsOpen = false,
|
|
19026
19106
|
typeAheadResetMs = 500
|
|
19027
19107
|
}) {
|
|
19028
|
-
const [isOpen, setIsOpen] =
|
|
19029
|
-
const [searchQuery, setSearchQuery] =
|
|
19108
|
+
const [isOpen, setIsOpen] = useState35(initialIsOpen);
|
|
19109
|
+
const [searchQuery, setSearchQuery] = useState35("");
|
|
19030
19110
|
const selectionOptions = useMemo36(
|
|
19031
19111
|
() => options.map((o) => ({ id: o.id, disabled: o.disabled })),
|
|
19032
19112
|
[options]
|
|
@@ -19200,10 +19280,10 @@ function MultiSelectRoot({
|
|
|
19200
19280
|
readOnly = false,
|
|
19201
19281
|
required = false
|
|
19202
19282
|
}) {
|
|
19203
|
-
const [triggerRef, setTriggerRef] =
|
|
19204
|
-
const [options, setOptions] =
|
|
19283
|
+
const [triggerRef, setTriggerRef] = useState36(null);
|
|
19284
|
+
const [options, setOptions] = useState36([]);
|
|
19205
19285
|
const generatedId = useId17();
|
|
19206
|
-
const [ids, setIds] =
|
|
19286
|
+
const [ids, setIds] = useState36({
|
|
19207
19287
|
trigger: "multi-select-" + generatedId,
|
|
19208
19288
|
content: "multi-select-content-" + generatedId,
|
|
19209
19289
|
listbox: "multi-select-listbox-" + generatedId,
|
|
@@ -19940,8 +20020,8 @@ var DateFilterPopUp = forwardRef25(function DateFilterPopUp2({
|
|
|
19940
20020
|
return suggestion;
|
|
19941
20021
|
}, [value]);
|
|
19942
20022
|
const parameter = value?.parameter ?? {};
|
|
19943
|
-
const [temporaryMinDateValue, setTemporaryMinDateValue] =
|
|
19944
|
-
const [temporaryMaxDateValue, setTemporaryMaxDateValue] =
|
|
20023
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = useState37(null);
|
|
20024
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState37(null);
|
|
19945
20025
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
19946
20026
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
19947
20027
|
return /* @__PURE__ */ jsxs52(
|
|
@@ -20082,8 +20162,8 @@ var DatetimeFilterPopUp = forwardRef25(function DatetimeFilterPopUp2({
|
|
|
20082
20162
|
return suggestion;
|
|
20083
20163
|
}, [value]);
|
|
20084
20164
|
const parameter = value?.parameter ?? {};
|
|
20085
|
-
const [temporaryMinDateValue, setTemporaryMinDateValue] =
|
|
20086
|
-
const [temporaryMaxDateValue, setTemporaryMaxDateValue] =
|
|
20165
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = useState37(null);
|
|
20166
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState37(null);
|
|
20087
20167
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
20088
20168
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
20089
20169
|
return /* @__PURE__ */ jsxs52(
|
|
@@ -20413,11 +20493,11 @@ var TableFilterButton = ({
|
|
|
20413
20493
|
const translation = useHightideTranslation();
|
|
20414
20494
|
const column = header.column;
|
|
20415
20495
|
const columnFilterValue = column.getFilterValue();
|
|
20416
|
-
const [filterValue, setFilterValue] =
|
|
20496
|
+
const [filterValue, setFilterValue] = useState38(columnFilterValue);
|
|
20417
20497
|
const hasFilter = !!filterValue;
|
|
20418
20498
|
const anchorRef = useRef39(null);
|
|
20419
20499
|
const containerRef = useRef39(null);
|
|
20420
|
-
const [isOpen, setIsOpen] =
|
|
20500
|
+
const [isOpen, setIsOpen] = useState38(false);
|
|
20421
20501
|
const id = useId20();
|
|
20422
20502
|
const ids = useMemo39(() => ({
|
|
20423
20503
|
button: `table-filter-button-${id}`,
|
|
@@ -20682,7 +20762,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
20682
20762
|
};
|
|
20683
20763
|
|
|
20684
20764
|
// src/components/layout/table/VirtualizedTableBody.tsx
|
|
20685
|
-
import { useEffect as useEffect48, useRef as useRef40, useState as
|
|
20765
|
+
import { useEffect as useEffect48, useRef as useRef40, useState as useState39 } from "react";
|
|
20686
20766
|
import { flexRender as flexRender4 } from "@tanstack/react-table";
|
|
20687
20767
|
import { useVirtualizer, useWindowVirtualizer } from "@tanstack/react-virtual";
|
|
20688
20768
|
import clsx36 from "clsx";
|
|
@@ -20696,8 +20776,8 @@ var VirtualizedTableBody = ({
|
|
|
20696
20776
|
const { containerRef } = useTableContainerContext();
|
|
20697
20777
|
const rows = table.getRowModel().rows;
|
|
20698
20778
|
const bodyRef = useRef40(null);
|
|
20699
|
-
const [isMounted, setIsMounted] =
|
|
20700
|
-
const [scrollMargin, setScrollMargin] =
|
|
20779
|
+
const [isMounted, setIsMounted] = useState39(false);
|
|
20780
|
+
const [scrollMargin, setScrollMargin] = useState39(0);
|
|
20701
20781
|
useEffect48(() => setIsMounted(true), []);
|
|
20702
20782
|
useEffect48(() => {
|
|
20703
20783
|
if (scroll !== "window") return;
|
|
@@ -21011,7 +21091,7 @@ var TableWithSelection = ({
|
|
|
21011
21091
|
};
|
|
21012
21092
|
|
|
21013
21093
|
// src/components/layout/table/TableColumn.tsx
|
|
21014
|
-
import { memo as memo2, useEffect as useEffect49, useMemo as useMemo41, useState as
|
|
21094
|
+
import { memo as memo2, useEffect as useEffect49, useMemo as useMemo41, useState as useState40 } from "react";
|
|
21015
21095
|
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
21016
21096
|
var TableColumnComponent = ({
|
|
21017
21097
|
filterType,
|
|
@@ -21023,7 +21103,7 @@ var TableColumnComponent = ({
|
|
|
21023
21103
|
"TableColumn: For filterType === multiTags or singleTag, filterData.tags must be set.",
|
|
21024
21104
|
(filterType === "multiTags" || filterType === "singleTag") && props.meta?.filterData?.tags === void 0
|
|
21025
21105
|
);
|
|
21026
|
-
const [column] =
|
|
21106
|
+
const [column] = useState40({
|
|
21027
21107
|
...props,
|
|
21028
21108
|
filterFn
|
|
21029
21109
|
});
|
|
@@ -21325,7 +21405,7 @@ var TableColumnSwitcher = ({ buttonProps, ...props }) => {
|
|
|
21325
21405
|
import { forwardRef as forwardRef28 } from "react";
|
|
21326
21406
|
|
|
21327
21407
|
// src/components/user-interaction/Combobox/ComboboxRoot.tsx
|
|
21328
|
-
import { useCallback as useCallback45, useId as useId22, useMemo as useMemo44, useState as
|
|
21408
|
+
import { useCallback as useCallback45, useId as useId22, useMemo as useMemo44, useState as useState41 } from "react";
|
|
21329
21409
|
|
|
21330
21410
|
// src/components/user-interaction/Combobox/ComboboxContext.tsx
|
|
21331
21411
|
import { createContext as createContext18, useContext as useContext20 } from "react";
|
|
@@ -21411,10 +21491,10 @@ function ComboboxRoot({
|
|
|
21411
21491
|
onItemClick,
|
|
21412
21492
|
...hookProps
|
|
21413
21493
|
}) {
|
|
21414
|
-
const [options, setOptions] =
|
|
21415
|
-
const [listRef, setListRef] =
|
|
21494
|
+
const [options, setOptions] = useState41([]);
|
|
21495
|
+
const [listRef, setListRef] = useState41(null);
|
|
21416
21496
|
const generatedId = useId22();
|
|
21417
|
-
const [ids, setIds] =
|
|
21497
|
+
const [ids, setIds] = useState41({
|
|
21418
21498
|
trigger: `combobox-${generatedId}`,
|
|
21419
21499
|
listbox: `combobox-${generatedId}-listbox`
|
|
21420
21500
|
});
|
|
@@ -21722,7 +21802,7 @@ var ComboboxOption = forwardRef29(function ComboboxOption2({
|
|
|
21722
21802
|
ComboboxOption.displayName = "ComboboxOption";
|
|
21723
21803
|
|
|
21724
21804
|
// src/components/user-interaction/CopyToClipboardWrapper.tsx
|
|
21725
|
-
import { useState as
|
|
21805
|
+
import { useState as useState42 } from "react";
|
|
21726
21806
|
import { clsx as clsx41 } from "clsx";
|
|
21727
21807
|
|
|
21728
21808
|
// src/utils/writeToClipboard.ts
|
|
@@ -21745,7 +21825,7 @@ var CopyToClipboardWrapper = ({
|
|
|
21745
21825
|
...props
|
|
21746
21826
|
}) => {
|
|
21747
21827
|
const translation = useHightideTranslation();
|
|
21748
|
-
const [isShowingConfirmation, setIsShowingConfirmation] =
|
|
21828
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = useState42(false);
|
|
21749
21829
|
return /* @__PURE__ */ jsxs63(
|
|
21750
21830
|
TooltipRoot,
|
|
21751
21831
|
{
|
|
@@ -21794,7 +21874,7 @@ var CopyToClipboardWrapper = ({
|
|
|
21794
21874
|
};
|
|
21795
21875
|
|
|
21796
21876
|
// src/components/user-interaction/Menu.tsx
|
|
21797
|
-
import { useCallback as useCallback47, useRef as useRef44, useState as
|
|
21877
|
+
import { useCallback as useCallback47, useRef as useRef44, useState as useState43 } from "react";
|
|
21798
21878
|
import clsx42 from "clsx";
|
|
21799
21879
|
import { Fragment as Fragment12, jsx as jsx102, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
21800
21880
|
var MenuItem = ({
|
|
@@ -21821,7 +21901,7 @@ var Menu = ({
|
|
|
21821
21901
|
...props
|
|
21822
21902
|
}) => {
|
|
21823
21903
|
const triggerRef = useRef44(null);
|
|
21824
|
-
const [isOpen, setIsOpen] =
|
|
21904
|
+
const [isOpen, setIsOpen] = useState43(false);
|
|
21825
21905
|
const bag = {
|
|
21826
21906
|
isOpen,
|
|
21827
21907
|
close: () => setIsOpen(false),
|
|
@@ -21964,7 +22044,7 @@ var MultiSelectChipDisplay = forwardRef30(
|
|
|
21964
22044
|
);
|
|
21965
22045
|
|
|
21966
22046
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
21967
|
-
import { useCallback as useCallback48, useEffect as useEffect53, useState as
|
|
22047
|
+
import { useCallback as useCallback48, useEffect as useEffect53, useState as useState44 } from "react";
|
|
21968
22048
|
import clsx43 from "clsx";
|
|
21969
22049
|
import { jsx as jsx104, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
21970
22050
|
var up = 1;
|
|
@@ -21985,7 +22065,7 @@ var ScrollPicker = ({
|
|
|
21985
22065
|
transition,
|
|
21986
22066
|
items,
|
|
21987
22067
|
lastTimeStamp
|
|
21988
|
-
}, setAnimation] =
|
|
22068
|
+
}, setAnimation] = useState44({
|
|
21989
22069
|
targetIndex: selectedIndex,
|
|
21990
22070
|
currentIndex: disabled ? selectedIndex : 0,
|
|
21991
22071
|
velocity: 0,
|
|
@@ -22306,7 +22386,7 @@ var TextareaWithHeadline = ({
|
|
|
22306
22386
|
};
|
|
22307
22387
|
|
|
22308
22388
|
// src/components/user-interaction/data/FilterList.tsx
|
|
22309
|
-
import { useMemo as useMemo45, useState as
|
|
22389
|
+
import { useMemo as useMemo45, useState as useState45 } from "react";
|
|
22310
22390
|
import { PlusIcon } from "lucide-react";
|
|
22311
22391
|
import { Fragment as Fragment13, jsx as jsx107, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
22312
22392
|
var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
@@ -22318,7 +22398,7 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
22318
22398
|
acc[item.id] = item;
|
|
22319
22399
|
return acc;
|
|
22320
22400
|
}, {}), [availableItems]);
|
|
22321
|
-
const [editState, setEditState] =
|
|
22401
|
+
const [editState, setEditState] = useState45(void 0);
|
|
22322
22402
|
const valueWithEditState = useMemo45(() => {
|
|
22323
22403
|
let foundEditValue = false;
|
|
22324
22404
|
for (const item of value) {
|
|
@@ -22616,7 +22696,7 @@ var TimeDisplay = ({
|
|
|
22616
22696
|
};
|
|
22617
22697
|
|
|
22618
22698
|
// src/components/user-interaction/input/FlexibleDateTimeInput.tsx
|
|
22619
|
-
import { forwardRef as forwardRef32, useState as
|
|
22699
|
+
import { forwardRef as forwardRef32, useState as useState46 } from "react";
|
|
22620
22700
|
import { ClockFading, ClockPlus } from "lucide-react";
|
|
22621
22701
|
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
22622
22702
|
var FlexibleDateTimeInput = forwardRef32(function FlexibleDateTimeInput2({
|
|
@@ -22641,7 +22721,7 @@ var FlexibleDateTimeInput = forwardRef32(function FlexibleDateTimeInput2({
|
|
|
22641
22721
|
const zoned = (date) => DateUtils.toZonedDate(date, timeZone);
|
|
22642
22722
|
const unzoned = (date) => DateUtils.fromZonedDate(date, timeZone);
|
|
22643
22723
|
const hasFixedTime = (date) => DateUtils.sameTime(zoned(date), fixedTime, true, true);
|
|
22644
|
-
const [mode, setMode] =
|
|
22724
|
+
const [mode, setMode] = useState46(() => {
|
|
22645
22725
|
if (value && !hasFixedTime(value)) {
|
|
22646
22726
|
return "dateTime";
|
|
22647
22727
|
}
|
|
@@ -22687,7 +22767,7 @@ var FlexibleDateTimeInput = forwardRef32(function FlexibleDateTimeInput2({
|
|
|
22687
22767
|
|
|
22688
22768
|
// src/components/user-interaction/input/InsideLabelInput.tsx
|
|
22689
22769
|
import { useId as useId25 } from "react";
|
|
22690
|
-
import { forwardRef as forwardRef33, useState as
|
|
22770
|
+
import { forwardRef as forwardRef33, useState as useState47 } from "react";
|
|
22691
22771
|
import clsx46 from "clsx";
|
|
22692
22772
|
import { jsx as jsx111, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
22693
22773
|
var InsideLabelInput = forwardRef33(function InsideLabelInput2({
|
|
@@ -22703,7 +22783,7 @@ var InsideLabelInput = forwardRef33(function InsideLabelInput2({
|
|
|
22703
22783
|
onValueChange,
|
|
22704
22784
|
defaultValue: initialValue
|
|
22705
22785
|
});
|
|
22706
|
-
const [isFocused, setIsFocused] =
|
|
22786
|
+
const [isFocused, setIsFocused] = useState47(false);
|
|
22707
22787
|
const generatedId = useId25();
|
|
22708
22788
|
const id = customId ?? generatedId;
|
|
22709
22789
|
return /* @__PURE__ */ jsxs70("div", { className: clsx46("relative"), children: [
|
|
@@ -22793,7 +22873,7 @@ var SearchBar = ({
|
|
|
22793
22873
|
};
|
|
22794
22874
|
|
|
22795
22875
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
22796
|
-
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as useImperativeHandle15, useRef as useRef46, useState as
|
|
22876
|
+
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as useImperativeHandle15, useRef as useRef46, useState as useState48 } from "react";
|
|
22797
22877
|
import { Pencil } from "lucide-react";
|
|
22798
22878
|
import clsx48 from "clsx";
|
|
22799
22879
|
import { jsx as jsx113, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -22810,7 +22890,7 @@ var ToggleableInput = forwardRef34(function ToggleableInput2({
|
|
|
22810
22890
|
onValueChange,
|
|
22811
22891
|
defaultValue: initialValue
|
|
22812
22892
|
});
|
|
22813
|
-
const [isEditing, setIsEditing] =
|
|
22893
|
+
const [isEditing, setIsEditing] = useState48(initialState !== "display");
|
|
22814
22894
|
const innerRef = useRef46(null);
|
|
22815
22895
|
useImperativeHandle15(forwardedRef, () => innerRef.current);
|
|
22816
22896
|
useEffect54(() => {
|
|
@@ -23261,14 +23341,14 @@ var PolymorphicSlot = forwardRef35(function PolymorphicSlot2({
|
|
|
23261
23341
|
});
|
|
23262
23342
|
|
|
23263
23343
|
// src/components/utils/Transition.tsx
|
|
23264
|
-
import { useEffect as useEffect55, useState as
|
|
23344
|
+
import { useEffect as useEffect55, useState as useState49 } from "react";
|
|
23265
23345
|
function Transition({
|
|
23266
23346
|
children,
|
|
23267
23347
|
show,
|
|
23268
23348
|
includeAnimation = true
|
|
23269
23349
|
}) {
|
|
23270
|
-
const [isOpen, setIsOpen] =
|
|
23271
|
-
const [isTransitioning, setIsTransitioning] =
|
|
23350
|
+
const [isOpen, setIsOpen] = useState49(show);
|
|
23351
|
+
const [isTransitioning, setIsTransitioning] = useState49(!isOpen);
|
|
23272
23352
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
23273
23353
|
useEffect55(() => {
|
|
23274
23354
|
setIsOpen(show);
|
|
@@ -23376,11 +23456,11 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
23376
23456
|
};
|
|
23377
23457
|
|
|
23378
23458
|
// src/hooks/focus/useIsMounted.ts
|
|
23379
|
-
import { useEffect as useEffect58, useLayoutEffect as useLayoutEffect8, useState as
|
|
23459
|
+
import { useEffect as useEffect58, useLayoutEffect as useLayoutEffect8, useState as useState50 } from "react";
|
|
23380
23460
|
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
23381
23461
|
var useIsomorphicEffect = isClient ? useLayoutEffect8 : useEffect58;
|
|
23382
23462
|
var useIsMounted = () => {
|
|
23383
|
-
const [isMounted, setIsMounted] =
|
|
23463
|
+
const [isMounted, setIsMounted] = useState50(false);
|
|
23384
23464
|
useIsomorphicEffect(() => {
|
|
23385
23465
|
setIsMounted(true);
|
|
23386
23466
|
return () => {
|
|
@@ -23432,9 +23512,9 @@ function useLogUnstableDependencies(name, value) {
|
|
|
23432
23512
|
}
|
|
23433
23513
|
|
|
23434
23514
|
// src/hooks/useOverwritableState.ts
|
|
23435
|
-
import { useEffect as useEffect60, useState as
|
|
23515
|
+
import { useEffect as useEffect60, useState as useState51 } from "react";
|
|
23436
23516
|
var useOverwritableState = (overwriteValue, onChange) => {
|
|
23437
|
-
const [state, setState] =
|
|
23517
|
+
const [state, setState] = useState51(overwriteValue);
|
|
23438
23518
|
useEffect60(() => {
|
|
23439
23519
|
setState(overwriteValue);
|
|
23440
23520
|
}, [overwriteValue]);
|
|
@@ -23518,7 +23598,6 @@ var useSwipeGesture = ({
|
|
|
23518
23598
|
const listenTouch = inputMode === "touch" || inputMode === "both";
|
|
23519
23599
|
const listenMouse = inputMode === "mouse" || inputMode === "both";
|
|
23520
23600
|
const onGestureStart = (x, y, eventTarget) => {
|
|
23521
|
-
console.log("onGestureStart", x, y);
|
|
23522
23601
|
if (!isWithinStartRegion(x, y)) return;
|
|
23523
23602
|
const scrollableParent = findScrollableParent(eventTarget);
|
|
23524
23603
|
gestureEndRef.current = null;
|
|
@@ -23531,7 +23610,6 @@ var useSwipeGesture = ({
|
|
|
23531
23610
|
isScrollingRef.current = !!scrollableParent;
|
|
23532
23611
|
};
|
|
23533
23612
|
const onGestureMove = (x, y, eventTarget) => {
|
|
23534
|
-
console.log("onGestureMove", x, y);
|
|
23535
23613
|
const scrollableParent = findScrollableParent(eventTarget);
|
|
23536
23614
|
const currentScrollY = scrollableParent?.scrollTop ?? window.scrollY;
|
|
23537
23615
|
gestureEndRef.current = {
|
|
@@ -23648,13 +23726,13 @@ var useSwipeGesture = ({
|
|
|
23648
23726
|
};
|
|
23649
23727
|
|
|
23650
23728
|
// src/hooks/useUpdatingDateString.ts
|
|
23651
|
-
import { useEffect as useEffect62, useState as
|
|
23729
|
+
import { useEffect as useEffect62, useState as useState52 } from "react";
|
|
23652
23730
|
var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, is24HourFormat: is24HourFormatOverride, timeZone: timeZoneOverride, date }) => {
|
|
23653
23731
|
const { locale: contextLocale, is24HourFormat: contextIs24HourFormat, timeZone: contextTimeZone } = useLocale();
|
|
23654
23732
|
const locale = localeOverride ?? contextLocale;
|
|
23655
23733
|
const is24HourFormat = is24HourFormatOverride ?? contextIs24HourFormat ?? true;
|
|
23656
23734
|
const timeZone = timeZoneOverride ?? contextTimeZone;
|
|
23657
|
-
const [dateAndTimeStrings, setDateAndTimeStrings] =
|
|
23735
|
+
const [dateAndTimeStrings, setDateAndTimeStrings] = useState52({
|
|
23658
23736
|
compareDate: date,
|
|
23659
23737
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat, { is24HourFormat, timeZone }),
|
|
23660
23738
|
relative: DateUtils.formatRelative(date, locale)
|
|
@@ -24251,6 +24329,7 @@ export {
|
|
|
24251
24329
|
processModelLibrary,
|
|
24252
24330
|
range,
|
|
24253
24331
|
resolveSetState,
|
|
24332
|
+
resolveTreeNodePath,
|
|
24254
24333
|
segmentBounds,
|
|
24255
24334
|
segmentPlaceholder,
|
|
24256
24335
|
setDayPeriod,
|