@homebound/beam 3.0.1 → 3.0.3
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.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +73 -62
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4885,7 +4885,7 @@ function Chips(props) {
|
|
|
4885
4885
|
// src/components/Table/GridTable.tsx
|
|
4886
4886
|
import memoizeOne from "memoize-one";
|
|
4887
4887
|
import { runInAction } from "mobx";
|
|
4888
|
-
import React13, { useEffect as useEffect19, useMemo as useMemo24, useRef as useRef38, useState as
|
|
4888
|
+
import React13, { useEffect as useEffect19, useMemo as useMemo24, useRef as useRef38, useState as useState29 } from "react";
|
|
4889
4889
|
import { Virtuoso as Virtuoso2 } from "react-virtuoso";
|
|
4890
4890
|
|
|
4891
4891
|
// src/components/Layout/ScrollableContent.tsx
|
|
@@ -9431,7 +9431,14 @@ function OverlayTrigger(props) {
|
|
|
9431
9431
|
isOpen: state.isOpen,
|
|
9432
9432
|
onClose: state.close,
|
|
9433
9433
|
placement: placement ? `bottom ${placement}` : "bottom left",
|
|
9434
|
-
offset: showActiveBorder ? 4 : void 0
|
|
9434
|
+
offset: showActiveBorder ? 4 : void 0,
|
|
9435
|
+
// Prevents a react-aria ResizeObserver loop that prevents full scrollability in menus
|
|
9436
|
+
// that scroll when the trigger is inside a virtual GridTable with nested
|
|
9437
|
+
// scroll containers (e.g. stepper + layout + virtuoso), and the trigger is far
|
|
9438
|
+
// enough from the viewport edge that the calculated maxHeight differs significantly
|
|
9439
|
+
// This is a very specific set of circumstances that have appeared w/in blueprint
|
|
9440
|
+
// after we upgraded truss to v2
|
|
9441
|
+
maxHeight: window.visualViewport?.height ?? window.innerHeight
|
|
9435
9442
|
});
|
|
9436
9443
|
const tid = useTestIds(props, isTextButton(trigger) ? defaultTestId(labelOr(trigger, "overlayTrigger")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name);
|
|
9437
9444
|
return (
|
|
@@ -12476,7 +12483,7 @@ function MultiSelectField(props) {
|
|
|
12476
12483
|
|
|
12477
12484
|
// src/inputs/NumberField.tsx
|
|
12478
12485
|
import { NumberParser } from "@internationalized/number";
|
|
12479
|
-
import { useMemo as useMemo18, useRef as useRef27 } from "react";
|
|
12486
|
+
import { useMemo as useMemo18, useRef as useRef27, useState as useState23 } from "react";
|
|
12480
12487
|
import { mergeProps as mergeProps15, useLocale, useNumberField } from "react-aria";
|
|
12481
12488
|
import { useNumberFieldState } from "react-stately";
|
|
12482
12489
|
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
@@ -12567,6 +12574,7 @@ function NumberField(props) {
|
|
|
12567
12574
|
wip: false
|
|
12568
12575
|
});
|
|
12569
12576
|
const lastSentRef = useRef27(void 0);
|
|
12577
|
+
const [, forceRender] = useState23(0);
|
|
12570
12578
|
const propValue = value === void 0 ? Number.NaN : value / factor;
|
|
12571
12579
|
if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
|
|
12572
12580
|
const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
|
|
@@ -12580,7 +12588,9 @@ function NumberField(props) {
|
|
|
12580
12588
|
value: valueRef.current.wip ? valueRef.current.value : value === void 0 ? Number.NaN : value / factor,
|
|
12581
12589
|
// // This is called on blur with the final/committed value.
|
|
12582
12590
|
onChange: (value2) => {
|
|
12583
|
-
|
|
12591
|
+
const formatted = formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly);
|
|
12592
|
+
if (formatted !== lastSentRef.current) return;
|
|
12593
|
+
onChange(formatted);
|
|
12584
12594
|
},
|
|
12585
12595
|
onFocus: () => {
|
|
12586
12596
|
valueRef.current = {
|
|
@@ -12594,6 +12604,7 @@ function NumberField(props) {
|
|
|
12594
12604
|
wip: false
|
|
12595
12605
|
};
|
|
12596
12606
|
lastSentRef.current = void 0;
|
|
12607
|
+
forceRender((c) => c + 1);
|
|
12597
12608
|
},
|
|
12598
12609
|
onKeyDown: (e) => {
|
|
12599
12610
|
if (e.key === "Enter") {
|
|
@@ -12907,17 +12918,17 @@ var radioDisabled = {
|
|
|
12907
12918
|
|
|
12908
12919
|
// src/inputs/RichTextField.tsx
|
|
12909
12920
|
import DOMPurify from "dompurify";
|
|
12910
|
-
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as useRef29, useState as
|
|
12921
|
+
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as useRef29, useState as useState25 } from "react";
|
|
12911
12922
|
|
|
12912
12923
|
// src/inputs/RichTextField.mock.tsx
|
|
12913
12924
|
import { camelCase as camelCase3 } from "change-case";
|
|
12914
|
-
import { useState as
|
|
12925
|
+
import { useState as useState24 } from "react";
|
|
12915
12926
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
12916
12927
|
function RichTextFieldMock(props) {
|
|
12917
12928
|
const { onBlur = () => {
|
|
12918
12929
|
}, onFocus = () => {
|
|
12919
12930
|
}, readOnly } = props;
|
|
12920
|
-
const [value, setValue] =
|
|
12931
|
+
const [value, setValue] = useState24(props.value || "");
|
|
12921
12932
|
const tid = useTestIds(props, defaultTestId2(props.label || "richTextField"));
|
|
12922
12933
|
return /* @__PURE__ */ jsx70(
|
|
12923
12934
|
"input",
|
|
@@ -12962,7 +12973,7 @@ function RichTextFieldImpl(props) {
|
|
|
12962
12973
|
readOnly,
|
|
12963
12974
|
fullWidth = fieldProps?.fullWidth ?? false
|
|
12964
12975
|
} = props;
|
|
12965
|
-
const [editor, setEditor] =
|
|
12976
|
+
const [editor, setEditor] = useState25();
|
|
12966
12977
|
const editorElement = useRef29();
|
|
12967
12978
|
const currentHtml = useRef29(void 0);
|
|
12968
12979
|
const onChangeRef = useRef29(onChange);
|
|
@@ -13426,7 +13437,7 @@ function TextField(props) {
|
|
|
13426
13437
|
}
|
|
13427
13438
|
|
|
13428
13439
|
// src/inputs/ToggleButton.tsx
|
|
13429
|
-
import { useRef as useRef33, useState as
|
|
13440
|
+
import { useRef as useRef33, useState as useState26 } from "react";
|
|
13430
13441
|
import { useFocusRing as useFocusRing8, useHover as useHover14, usePress, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden6 } from "react-aria";
|
|
13431
13442
|
import { useToggleState as useToggleState3 } from "react-stately";
|
|
13432
13443
|
import { trussProps as trussProps47 } from "@homebound/truss/runtime";
|
|
@@ -13441,7 +13452,7 @@ function ToggleButton(props) {
|
|
|
13441
13452
|
__storyState,
|
|
13442
13453
|
...otherProps
|
|
13443
13454
|
} = props;
|
|
13444
|
-
const [asyncInProgress, setAsyncInProgress] =
|
|
13455
|
+
const [asyncInProgress, setAsyncInProgress] = useState26(false);
|
|
13445
13456
|
const isDisabled = !!disabled || asyncInProgress;
|
|
13446
13457
|
const ariaProps = {
|
|
13447
13458
|
"aria-label": label,
|
|
@@ -14801,13 +14812,13 @@ function useScrollStorage(tableId, enabled = true) {
|
|
|
14801
14812
|
|
|
14802
14813
|
// src/components/Table/hooks/useSetupColumnSizes.ts
|
|
14803
14814
|
import { useResizeObserver } from "@react-aria/utils";
|
|
14804
|
-
import { useCallback as useCallback14, useEffect as useEffect18, useRef as useRef36, useState as
|
|
14815
|
+
import { useCallback as useCallback14, useEffect as useEffect18, useRef as useRef36, useState as useState28 } from "react";
|
|
14805
14816
|
|
|
14806
14817
|
// src/components/Table/hooks/useColumnResizing.ts
|
|
14807
|
-
import { useCallback as useCallback13, useEffect as useEffect17, useState as
|
|
14818
|
+
import { useCallback as useCallback13, useEffect as useEffect17, useState as useState27 } from "react";
|
|
14808
14819
|
import { useDebouncedCallback as useDebouncedCallback3 } from "use-debounce";
|
|
14809
14820
|
function useColumnResizing(storageKey) {
|
|
14810
|
-
const [resizedWidths, setResizedWidths] =
|
|
14821
|
+
const [resizedWidths, setResizedWidths] = useState27(() => {
|
|
14811
14822
|
if (!storageKey) return {};
|
|
14812
14823
|
try {
|
|
14813
14824
|
const stored = sessionStorage.getItem(`columnWidths_${storageKey}`);
|
|
@@ -14861,9 +14872,9 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
14861
14872
|
disableColumnResizing ? void 0 : visibleColumnsStorageKey
|
|
14862
14873
|
);
|
|
14863
14874
|
const calculateImmediately = useRef36(true);
|
|
14864
|
-
const [tableWidth, setTableWidth] =
|
|
14875
|
+
const [tableWidth, setTableWidth] = useState28();
|
|
14865
14876
|
const prevTableWidthRef = useRef36(tableWidth);
|
|
14866
|
-
const [columnSizes, setColumnSizes] =
|
|
14877
|
+
const [columnSizes, setColumnSizes] = useState28(
|
|
14867
14878
|
calcColumnSizes(columns, tableWidth, style.minWidthPx, expandedColumnIds, resizedWidths)
|
|
14868
14879
|
);
|
|
14869
14880
|
const setTableAndColumnWidths = useCallback14(
|
|
@@ -15005,7 +15016,7 @@ function GridTable(props) {
|
|
|
15005
15016
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15006
15017
|
[props.api]
|
|
15007
15018
|
);
|
|
15008
|
-
const [draggedRow, _setDraggedRow] =
|
|
15019
|
+
const [draggedRow, _setDraggedRow] = useState29(void 0);
|
|
15009
15020
|
const draggedRowRef = useRef38(draggedRow);
|
|
15010
15021
|
const setDraggedRow = (row) => {
|
|
15011
15022
|
draggedRowRef.current = row;
|
|
@@ -15309,7 +15320,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
15309
15320
|
}
|
|
15310
15321
|
function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, _stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
|
|
15311
15322
|
const customScrollParent = useVirtualizedScrollParent();
|
|
15312
|
-
const [fetchMoreInProgress, setFetchMoreInProgress] =
|
|
15323
|
+
const [fetchMoreInProgress, setFetchMoreInProgress] = useState29(false);
|
|
15313
15324
|
const {
|
|
15314
15325
|
getScrollIndex,
|
|
15315
15326
|
setScrollIndex
|
|
@@ -15518,7 +15529,7 @@ function ToggleChips(props) {
|
|
|
15518
15529
|
|
|
15519
15530
|
// src/components/Accordion.tsx
|
|
15520
15531
|
import { useId, useResizeObserver as useResizeObserver2 } from "@react-aria/utils";
|
|
15521
|
-
import { useCallback as useCallback16, useEffect as useEffect20, useMemo as useMemo25, useState as
|
|
15532
|
+
import { useCallback as useCallback16, useEffect as useEffect20, useMemo as useMemo25, useState as useState30 } from "react";
|
|
15522
15533
|
import { useFocusRing as useFocusRing10 } from "react-aria";
|
|
15523
15534
|
import { trussProps as trussProps52 } from "@homebound/truss/runtime";
|
|
15524
15535
|
import { jsx as jsx83, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -15544,16 +15555,16 @@ function Accordion(props) {
|
|
|
15544
15555
|
} = props;
|
|
15545
15556
|
const tid = useTestIds(props, "accordion");
|
|
15546
15557
|
const id = useId();
|
|
15547
|
-
const [expanded, setExpanded] =
|
|
15558
|
+
const [expanded, setExpanded] = useState30(defaultExpanded && !disabled);
|
|
15548
15559
|
const {
|
|
15549
15560
|
isFocusVisible,
|
|
15550
15561
|
focusProps
|
|
15551
15562
|
} = useFocusRing10();
|
|
15552
|
-
const [contentEl, setContentEl] =
|
|
15563
|
+
const [contentEl, setContentEl] = useState30(null);
|
|
15553
15564
|
const contentRef = useMemo25(() => ({
|
|
15554
15565
|
current: contentEl
|
|
15555
15566
|
}), [contentEl]);
|
|
15556
|
-
const [contentHeight, setContentHeight] =
|
|
15567
|
+
const [contentHeight, setContentHeight] = useState30(expanded ? "auto" : "0");
|
|
15557
15568
|
useEffect20(() => {
|
|
15558
15569
|
setExpanded(defaultExpanded && !disabled);
|
|
15559
15570
|
}, [defaultExpanded, disabled]);
|
|
@@ -15703,11 +15714,11 @@ var accordionSizes = {
|
|
|
15703
15714
|
};
|
|
15704
15715
|
|
|
15705
15716
|
// src/components/AccordionList.tsx
|
|
15706
|
-
import { useState as
|
|
15717
|
+
import { useState as useState31 } from "react";
|
|
15707
15718
|
import { Fragment as Fragment20, jsx as jsx84 } from "react/jsx-runtime";
|
|
15708
15719
|
function AccordionList(props) {
|
|
15709
15720
|
const { accordions, size, allowMultipleExpanded = true, compact = false } = props;
|
|
15710
|
-
const [expandedIndex, setExpandedIndex] =
|
|
15721
|
+
const [expandedIndex, setExpandedIndex] = useState31(
|
|
15711
15722
|
accordions.findIndex((a) => a.defaultExpanded)
|
|
15712
15723
|
);
|
|
15713
15724
|
const tid = useTestIds(props, "accordionList");
|
|
@@ -15857,7 +15868,7 @@ import { OverlayProvider } from "react-aria";
|
|
|
15857
15868
|
|
|
15858
15869
|
// src/components/Modal/Modal.tsx
|
|
15859
15870
|
import { useResizeObserver as useResizeObserver3 } from "@react-aria/utils";
|
|
15860
|
-
import { useCallback as useCallback17, useEffect as useEffect23, useRef as useRef40, useState as
|
|
15871
|
+
import { useCallback as useCallback17, useEffect as useEffect23, useRef as useRef40, useState as useState32 } from "react";
|
|
15861
15872
|
import { FocusScope as FocusScope4, OverlayContainer as OverlayContainer2, useDialog, useModal as useModal2, useOverlay as useOverlay2, usePreventScroll } from "react-aria";
|
|
15862
15873
|
import { createPortal as createPortal3 } from "react-dom";
|
|
15863
15874
|
|
|
@@ -15964,7 +15975,7 @@ function Modal(props) {
|
|
|
15964
15975
|
} = useDialog({
|
|
15965
15976
|
role: "dialog"
|
|
15966
15977
|
}, ref);
|
|
15967
|
-
const [[width2, height], setSize] =
|
|
15978
|
+
const [[width2, height], setSize] = useState32(getSize(size));
|
|
15968
15979
|
const modalBodyRef = useRef40(null);
|
|
15969
15980
|
const modalFooterRef = useRef40(null);
|
|
15970
15981
|
const modalHeaderRef = useRef40(null);
|
|
@@ -15978,7 +15989,7 @@ function Modal(props) {
|
|
|
15978
15989
|
setSize: (size2 = "md") => setSize(getSize(size2))
|
|
15979
15990
|
};
|
|
15980
15991
|
}
|
|
15981
|
-
const [hasScroll, setHasScroll] =
|
|
15992
|
+
const [hasScroll, setHasScroll] = useState32(forceScrolling ?? false);
|
|
15982
15993
|
useResizeObserver3({
|
|
15983
15994
|
ref: modalBodyRef,
|
|
15984
15995
|
onResize: useCallback17(
|
|
@@ -16132,7 +16143,7 @@ function getSize(size) {
|
|
|
16132
16143
|
}
|
|
16133
16144
|
|
|
16134
16145
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
16135
|
-
import { createContext as createContext5, useContext as useContext14, useMemo as useMemo28, useState as
|
|
16146
|
+
import { createContext as createContext5, useContext as useContext14, useMemo as useMemo28, useState as useState33 } from "react";
|
|
16136
16147
|
|
|
16137
16148
|
// src/components/Snackbar/SnackbarNotice.tsx
|
|
16138
16149
|
import { trussProps as trussProps55 } from "@homebound/truss/runtime";
|
|
@@ -16249,8 +16260,8 @@ var SnackbarContext = createContext5({ setNotices: () => {
|
|
|
16249
16260
|
}, setOffset: () => {
|
|
16250
16261
|
} });
|
|
16251
16262
|
function SnackbarProvider(props) {
|
|
16252
|
-
const [notices, setNotices] =
|
|
16253
|
-
const [offset, setOffset] =
|
|
16263
|
+
const [notices, setNotices] = useState33([]);
|
|
16264
|
+
const [offset, setOffset] = useState33({});
|
|
16254
16265
|
const contextValue = useMemo28(() => ({ setNotices, setOffset }), []);
|
|
16255
16266
|
return /* @__PURE__ */ jsxs55(SnackbarContext.Provider, { value: contextValue, children: [
|
|
16256
16267
|
props.children,
|
|
@@ -16380,7 +16391,7 @@ function SuperDrawer() {
|
|
|
16380
16391
|
}
|
|
16381
16392
|
|
|
16382
16393
|
// src/components/Layout/FormPageLayout.tsx
|
|
16383
|
-
import React16, { createRef, useCallback as useCallback21, useEffect as useEffect25, useMemo as useMemo33, useRef as useRef42, useState as
|
|
16394
|
+
import React16, { createRef, useCallback as useCallback21, useEffect as useEffect25, useMemo as useMemo33, useRef as useRef42, useState as useState39 } from "react";
|
|
16384
16395
|
import { useButton as useButton9, useFocusRing as useFocusRing11 } from "react-aria";
|
|
16385
16396
|
|
|
16386
16397
|
// src/forms/BoundCheckboxField.tsx
|
|
@@ -16635,7 +16646,7 @@ function BoundIconCardField(props) {
|
|
|
16635
16646
|
import { Observer as Observer7 } from "mobx-react";
|
|
16636
16647
|
|
|
16637
16648
|
// src/inputs/IconCardGroup.tsx
|
|
16638
|
-
import { useCallback as useCallback18, useMemo as useMemo29, useState as
|
|
16649
|
+
import { useCallback as useCallback18, useMemo as useMemo29, useState as useState34 } from "react";
|
|
16639
16650
|
import { mergeProps as mergeProps19, useField } from "react-aria";
|
|
16640
16651
|
import { trussProps as trussProps58 } from "@homebound/truss/runtime";
|
|
16641
16652
|
import { jsx as jsx99, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -16653,7 +16664,7 @@ function IconCardGroup(props) {
|
|
|
16653
16664
|
disabled: isDisabled = false,
|
|
16654
16665
|
onChange
|
|
16655
16666
|
} = props;
|
|
16656
|
-
const [selected, setSelected] =
|
|
16667
|
+
const [selected, setSelected] = useState34(values);
|
|
16657
16668
|
const exclusiveOptions = useMemo29(() => options.filter((o) => o.exclusive), [options]);
|
|
16658
16669
|
const toggleValue = useCallback18((value) => {
|
|
16659
16670
|
if (isDisabled) return;
|
|
@@ -17490,7 +17501,7 @@ function boundTreeSelectField(props) {
|
|
|
17490
17501
|
}
|
|
17491
17502
|
|
|
17492
17503
|
// src/components/internal/CompoundField.tsx
|
|
17493
|
-
import { cloneElement as cloneElement2, useState as
|
|
17504
|
+
import { cloneElement as cloneElement2, useState as useState35 } from "react";
|
|
17494
17505
|
import { trussProps as trussProps61 } from "@homebound/truss/runtime";
|
|
17495
17506
|
import { jsx as jsx115, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17496
17507
|
function CompoundField({
|
|
@@ -17513,7 +17524,7 @@ function CompoundField({
|
|
|
17513
17524
|
const internalProps = {
|
|
17514
17525
|
compound: true
|
|
17515
17526
|
};
|
|
17516
|
-
const [hasFocusWithin, setHasFocusWithin] =
|
|
17527
|
+
const [hasFocusWithin, setHasFocusWithin] = useState35(false);
|
|
17517
17528
|
function onFocusCapture() {
|
|
17518
17529
|
setHasFocusWithin(true);
|
|
17519
17530
|
}
|
|
@@ -17689,7 +17700,7 @@ import { useDebouncedCallback as useDebouncedCallback5 } from "use-debounce";
|
|
|
17689
17700
|
|
|
17690
17701
|
// src/components/RightSidebar.tsx
|
|
17691
17702
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
17692
|
-
import { useState as
|
|
17703
|
+
import { useState as useState36 } from "react";
|
|
17693
17704
|
import { trussProps as trussProps64 } from "@homebound/truss/runtime";
|
|
17694
17705
|
import { Fragment as Fragment24, jsx as jsx120, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17695
17706
|
var RIGHT_SIDEBAR_MIN_WIDTH = "250px";
|
|
@@ -17697,7 +17708,7 @@ function RightSidebar({
|
|
|
17697
17708
|
content,
|
|
17698
17709
|
headerHeightPx: headerHeightPx2
|
|
17699
17710
|
}) {
|
|
17700
|
-
const [selectedIcon, setSelectedIcon] =
|
|
17711
|
+
const [selectedIcon, setSelectedIcon] = useState36(void 0);
|
|
17701
17712
|
const tid = useTestIds({}, "rightSidebar");
|
|
17702
17713
|
return /* @__PURE__ */ jsxs62(Fragment24, { children: [
|
|
17703
17714
|
/* @__PURE__ */ jsx120("div", { className: "df jcfe absolute right0 pr3", children: /* @__PURE__ */ jsx120(AnimatePresence2, { children: !selectedIcon && /* @__PURE__ */ jsx120(motion2.div, { className: "df fdc gap2 z1", initial: {
|
|
@@ -17784,7 +17795,7 @@ function IconButtonList({
|
|
|
17784
17795
|
}
|
|
17785
17796
|
|
|
17786
17797
|
// src/components/Toast/ToastContext.tsx
|
|
17787
|
-
import { createContext as createContext6, useCallback as useCallback20, useContext as useContext15, useMemo as useMemo31, useState as
|
|
17798
|
+
import { createContext as createContext6, useCallback as useCallback20, useContext as useContext15, useMemo as useMemo31, useState as useState37 } from "react";
|
|
17788
17799
|
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
17789
17800
|
var ToastContext = createContext6({
|
|
17790
17801
|
setNotice: () => {
|
|
@@ -17795,7 +17806,7 @@ var ToastContext = createContext6({
|
|
|
17795
17806
|
notice: void 0
|
|
17796
17807
|
});
|
|
17797
17808
|
function ToastProvider(props) {
|
|
17798
|
-
const [notice, setNotice] =
|
|
17809
|
+
const [notice, setNotice] = useState37();
|
|
17799
17810
|
const clear = useCallback20(() => setNotice(void 0), [setNotice]);
|
|
17800
17811
|
const contextValue = useMemo31(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
17801
17812
|
return /* @__PURE__ */ jsx121(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
@@ -17813,7 +17824,7 @@ function Toast() {
|
|
|
17813
17824
|
}
|
|
17814
17825
|
|
|
17815
17826
|
// src/components/Layout/PageHeaderBreadcrumbs.tsx
|
|
17816
|
-
import { Fragment as Fragment26, useMemo as useMemo32, useState as
|
|
17827
|
+
import { Fragment as Fragment26, useMemo as useMemo32, useState as useState38 } from "react";
|
|
17817
17828
|
import { Link as Link4 } from "react-router-dom";
|
|
17818
17829
|
import { mergeProps as mergeProps20 } from "@homebound/truss/runtime";
|
|
17819
17830
|
import { Fragment as Fragment27, jsx as jsx123, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
@@ -17822,7 +17833,7 @@ function PageHeaderBreadcrumbs({
|
|
|
17822
17833
|
}) {
|
|
17823
17834
|
const tids = useTestIds({}, "pageHeaderBreadcrumbs");
|
|
17824
17835
|
const breadcrumbs = useMemo32(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
|
|
17825
|
-
const [collapsed, setCollapsed] =
|
|
17836
|
+
const [collapsed, setCollapsed] = useState38(true);
|
|
17826
17837
|
function renderBreadcrumb(bc, index, hideDivisor) {
|
|
17827
17838
|
return (
|
|
17828
17839
|
// Adding index to key to prevent rendering issues when multiple items have the same label
|
|
@@ -18088,7 +18099,7 @@ function SectionNavLink(props) {
|
|
|
18088
18099
|
}), ...tids.sectionNavLink, children: section.title });
|
|
18089
18100
|
}
|
|
18090
18101
|
function useActiveSection(sectionsWithRefs) {
|
|
18091
|
-
const [activeSection, setActiveSection] =
|
|
18102
|
+
const [activeSection, setActiveSection] = useState39(null);
|
|
18092
18103
|
const debouncedIntersectionCallback = useDebouncedCallback5((entries) => {
|
|
18093
18104
|
const sectionsInView = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio > 0.2).sort((a, b) => {
|
|
18094
18105
|
const ratioDiff = b.intersectionRatio - a.intersectionRatio;
|
|
@@ -18195,7 +18206,7 @@ function invertSpacing(value) {
|
|
|
18195
18206
|
}
|
|
18196
18207
|
|
|
18197
18208
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
18198
|
-
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as
|
|
18209
|
+
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as useState42 } from "react";
|
|
18199
18210
|
|
|
18200
18211
|
// src/components/ButtonMenu.tsx
|
|
18201
18212
|
import { useRef as useRef43 } from "react";
|
|
@@ -18247,7 +18258,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
18247
18258
|
}
|
|
18248
18259
|
|
|
18249
18260
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
18250
|
-
import { memo as memo2, useMemo as useMemo35, useState as
|
|
18261
|
+
import { memo as memo2, useMemo as useMemo35, useState as useState41 } from "react";
|
|
18251
18262
|
|
|
18252
18263
|
// src/components/CountBadge.tsx
|
|
18253
18264
|
import { trussProps as trussProps66 } from "@homebound/truss/runtime";
|
|
@@ -18642,7 +18653,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
18642
18653
|
};
|
|
18643
18654
|
|
|
18644
18655
|
// src/components/Filters/FilterModal.tsx
|
|
18645
|
-
import { useState as
|
|
18656
|
+
import { useState as useState40 } from "react";
|
|
18646
18657
|
|
|
18647
18658
|
// src/components/Modal/OpenModal.tsx
|
|
18648
18659
|
import { useEffect as useEffect26 } from "react";
|
|
@@ -18675,7 +18686,7 @@ function FilterModal(props) {
|
|
|
18675
18686
|
const {
|
|
18676
18687
|
closeModal
|
|
18677
18688
|
} = useModal();
|
|
18678
|
-
const [modalFilter, setModalFilter] =
|
|
18689
|
+
const [modalFilter, setModalFilter] = useState40(filter);
|
|
18679
18690
|
return /* @__PURE__ */ jsxs68(Fragment31, { children: [
|
|
18680
18691
|
/* @__PURE__ */ jsx136(ModalHeader, { children: "More Filters" }),
|
|
18681
18692
|
/* @__PURE__ */ jsx136(ModalBody, { children: /* @__PURE__ */ jsx136("div", { className: "df fdc", children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx136(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(modalFilter[key], (value) => setModalFilter(updateFilter(modalFilter, key, value)), testId, true, false) }, key)) }) }),
|
|
@@ -18816,7 +18827,7 @@ function FilterDropdownMenu(props) {
|
|
|
18816
18827
|
groupBy
|
|
18817
18828
|
} = props;
|
|
18818
18829
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
18819
|
-
const [isOpen, setIsOpen] =
|
|
18830
|
+
const [isOpen, setIsOpen] = useState41(false);
|
|
18820
18831
|
const activeFilterCount = useMemo35(() => getActiveFilterCount(filter), [filter]);
|
|
18821
18832
|
const filterImpls = useMemo35(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
18822
18833
|
const renderFilters = () => {
|
|
@@ -19175,7 +19186,7 @@ function useGridTableLayoutState({
|
|
|
19175
19186
|
const groupBy = useGroupBy(maybeGroupBy ?? {
|
|
19176
19187
|
none: "none"
|
|
19177
19188
|
});
|
|
19178
|
-
const [searchString, setSearchString] =
|
|
19189
|
+
const [searchString, setSearchString] = useState42("");
|
|
19179
19190
|
const columnsFallback = "unset-columns";
|
|
19180
19191
|
const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
|
|
19181
19192
|
const paginationFallbackKey = "unset-pagination";
|
|
@@ -19185,7 +19196,7 @@ function useGridTableLayoutState({
|
|
|
19185
19196
|
100
|
|
19186
19197
|
// default page size
|
|
19187
19198
|
);
|
|
19188
|
-
const [page, setPage] =
|
|
19199
|
+
const [page, setPage] = useState42({
|
|
19189
19200
|
offset: 0,
|
|
19190
19201
|
limit: persistedPageSize
|
|
19191
19202
|
});
|
|
@@ -19262,7 +19273,7 @@ function SearchBox({
|
|
|
19262
19273
|
}, setQueryParams] = useQueryParams3({
|
|
19263
19274
|
search: StringParam2
|
|
19264
19275
|
});
|
|
19265
|
-
const [value, setValue] =
|
|
19276
|
+
const [value, setValue] = useState42(initialValue || "");
|
|
19266
19277
|
const [debouncedSearch] = useDebounce2(value, 300);
|
|
19267
19278
|
useEffect27(() => {
|
|
19268
19279
|
onSearch(debouncedSearch);
|
|
@@ -19287,7 +19298,7 @@ function PreventBrowserScroll({
|
|
|
19287
19298
|
}
|
|
19288
19299
|
|
|
19289
19300
|
// src/components/Layout/RightPaneLayout/RightPaneContext.tsx
|
|
19290
|
-
import React18, { useCallback as useCallback23, useContext as useContext16, useMemo as useMemo39, useState as
|
|
19301
|
+
import React18, { useCallback as useCallback23, useContext as useContext16, useMemo as useMemo39, useState as useState43 } from "react";
|
|
19291
19302
|
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
19292
19303
|
var RightPaneContext = React18.createContext({
|
|
19293
19304
|
openInPane: () => {
|
|
@@ -19300,8 +19311,8 @@ var RightPaneContext = React18.createContext({
|
|
|
19300
19311
|
rightPaneContent: null
|
|
19301
19312
|
});
|
|
19302
19313
|
function RightPaneProvider({ children }) {
|
|
19303
|
-
const [rightPaneContent, setRightPaneContent] =
|
|
19304
|
-
const [isRightPaneOpen, setIsRightPaneOpen] =
|
|
19314
|
+
const [rightPaneContent, setRightPaneContent] = useState43(void 0);
|
|
19315
|
+
const [isRightPaneOpen, setIsRightPaneOpen] = useState43(false);
|
|
19305
19316
|
const openInPane = useCallback23(
|
|
19306
19317
|
(opts) => {
|
|
19307
19318
|
setRightPaneContent(opts?.content);
|
|
@@ -19710,7 +19721,7 @@ import { useHover as useHover16 } from "react-aria";
|
|
|
19710
19721
|
|
|
19711
19722
|
// src/components/Tag.tsx
|
|
19712
19723
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
19713
|
-
import { useRef as useRef48, useState as
|
|
19724
|
+
import { useRef as useRef48, useState as useState44 } from "react";
|
|
19714
19725
|
import { trussProps as trussProps74 } from "@homebound/truss/runtime";
|
|
19715
19726
|
import { jsx as jsx152, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
19716
19727
|
function Tag(props) {
|
|
@@ -19723,7 +19734,7 @@ function Tag(props) {
|
|
|
19723
19734
|
} = props;
|
|
19724
19735
|
const typeStyles2 = getStyles(type);
|
|
19725
19736
|
const tid = useTestIds(otherProps);
|
|
19726
|
-
const [showTooltip, setShowTooltip] =
|
|
19737
|
+
const [showTooltip, setShowTooltip] = useState44(false);
|
|
19727
19738
|
const ref = useRef48(null);
|
|
19728
19739
|
useResizeObserver4({
|
|
19729
19740
|
ref,
|
|
@@ -20423,7 +20434,7 @@ function HbSpinnerProvider({
|
|
|
20423
20434
|
|
|
20424
20435
|
// src/components/MaxLines.tsx
|
|
20425
20436
|
import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
20426
|
-
import { useCallback as useCallback25, useEffect as useEffect30, useRef as useRef50, useState as
|
|
20437
|
+
import { useCallback as useCallback25, useEffect as useEffect30, useRef as useRef50, useState as useState45 } from "react";
|
|
20427
20438
|
import { trussProps as trussProps80 } from "@homebound/truss/runtime";
|
|
20428
20439
|
import { jsx as jsx160, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
20429
20440
|
function MaxLines({
|
|
@@ -20431,8 +20442,8 @@ function MaxLines({
|
|
|
20431
20442
|
children
|
|
20432
20443
|
}) {
|
|
20433
20444
|
const elRef = useRef50(null);
|
|
20434
|
-
const [hasMore, setHasMore] =
|
|
20435
|
-
const [expanded, setExpanded] =
|
|
20445
|
+
const [hasMore, setHasMore] = useState45(false);
|
|
20446
|
+
const [expanded, setExpanded] = useState45(false);
|
|
20436
20447
|
useLayoutEffect2(() => {
|
|
20437
20448
|
if (!elRef.current) return;
|
|
20438
20449
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
@@ -20466,7 +20477,7 @@ function MaxLines({
|
|
|
20466
20477
|
|
|
20467
20478
|
// src/components/ScrollShadows.tsx
|
|
20468
20479
|
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
20469
|
-
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as
|
|
20480
|
+
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as useState46 } from "react";
|
|
20470
20481
|
import { trussProps as trussProps81 } from "@homebound/truss/runtime";
|
|
20471
20482
|
import { jsx as jsx161, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
20472
20483
|
function ScrollShadows(props) {
|
|
@@ -20484,8 +20495,8 @@ function ScrollShadows(props) {
|
|
|
20484
20495
|
if (!bgColor.includes("rgba")) {
|
|
20485
20496
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
20486
20497
|
}
|
|
20487
|
-
const [showStartShadow, setShowStartShadow] =
|
|
20488
|
-
const [showEndShadow, setShowEndShadow] =
|
|
20498
|
+
const [showStartShadow, setShowStartShadow] = useState46(false);
|
|
20499
|
+
const [showEndShadow, setShowEndShadow] = useState46(false);
|
|
20489
20500
|
const scrollRef = useRef51(null);
|
|
20490
20501
|
const [startShadowStyles, endShadowStyles] = useMemo47(() => {
|
|
20491
20502
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
@@ -21131,7 +21142,7 @@ function visit(rows, fn) {
|
|
|
21131
21142
|
|
|
21132
21143
|
// src/components/Tabs.tsx
|
|
21133
21144
|
import { camelCase as camelCase5 } from "change-case";
|
|
21134
|
-
import { useEffect as useEffect32, useMemo as useMemo49, useRef as useRef53, useState as
|
|
21145
|
+
import { useEffect as useEffect32, useMemo as useMemo49, useRef as useRef53, useState as useState47 } from "react";
|
|
21135
21146
|
import { mergeProps as mergeProps26, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
21136
21147
|
import { matchPath, Route } from "react-router";
|
|
21137
21148
|
import { Link as Link5, useLocation } from "react-router-dom";
|
|
@@ -21189,7 +21200,7 @@ function Tabs(props) {
|
|
|
21189
21200
|
focusProps
|
|
21190
21201
|
} = useFocusRing15();
|
|
21191
21202
|
const tid = useTestIds(others, "tabs");
|
|
21192
|
-
const [active, setActive] =
|
|
21203
|
+
const [active, setActive] = useState47(selected);
|
|
21193
21204
|
const ref = useRef53(null);
|
|
21194
21205
|
useEffect32(() => setActive(selected), [selected]);
|
|
21195
21206
|
function onKeyUp(e) {
|