@homebound/beam 3.0.1 → 3.0.2
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 +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +65 -61
- 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
|
|
@@ -12476,7 +12476,7 @@ function MultiSelectField(props) {
|
|
|
12476
12476
|
|
|
12477
12477
|
// src/inputs/NumberField.tsx
|
|
12478
12478
|
import { NumberParser } from "@internationalized/number";
|
|
12479
|
-
import { useMemo as useMemo18, useRef as useRef27 } from "react";
|
|
12479
|
+
import { useMemo as useMemo18, useRef as useRef27, useState as useState23 } from "react";
|
|
12480
12480
|
import { mergeProps as mergeProps15, useLocale, useNumberField } from "react-aria";
|
|
12481
12481
|
import { useNumberFieldState } from "react-stately";
|
|
12482
12482
|
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
@@ -12567,6 +12567,7 @@ function NumberField(props) {
|
|
|
12567
12567
|
wip: false
|
|
12568
12568
|
});
|
|
12569
12569
|
const lastSentRef = useRef27(void 0);
|
|
12570
|
+
const [, forceRender] = useState23(0);
|
|
12570
12571
|
const propValue = value === void 0 ? Number.NaN : value / factor;
|
|
12571
12572
|
if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
|
|
12572
12573
|
const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
|
|
@@ -12580,7 +12581,9 @@ function NumberField(props) {
|
|
|
12580
12581
|
value: valueRef.current.wip ? valueRef.current.value : value === void 0 ? Number.NaN : value / factor,
|
|
12581
12582
|
// // This is called on blur with the final/committed value.
|
|
12582
12583
|
onChange: (value2) => {
|
|
12583
|
-
|
|
12584
|
+
const formatted = formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly);
|
|
12585
|
+
if (formatted !== lastSentRef.current) return;
|
|
12586
|
+
onChange(formatted);
|
|
12584
12587
|
},
|
|
12585
12588
|
onFocus: () => {
|
|
12586
12589
|
valueRef.current = {
|
|
@@ -12594,6 +12597,7 @@ function NumberField(props) {
|
|
|
12594
12597
|
wip: false
|
|
12595
12598
|
};
|
|
12596
12599
|
lastSentRef.current = void 0;
|
|
12600
|
+
forceRender((c) => c + 1);
|
|
12597
12601
|
},
|
|
12598
12602
|
onKeyDown: (e) => {
|
|
12599
12603
|
if (e.key === "Enter") {
|
|
@@ -12907,17 +12911,17 @@ var radioDisabled = {
|
|
|
12907
12911
|
|
|
12908
12912
|
// src/inputs/RichTextField.tsx
|
|
12909
12913
|
import DOMPurify from "dompurify";
|
|
12910
|
-
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as useRef29, useState as
|
|
12914
|
+
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as useRef29, useState as useState25 } from "react";
|
|
12911
12915
|
|
|
12912
12916
|
// src/inputs/RichTextField.mock.tsx
|
|
12913
12917
|
import { camelCase as camelCase3 } from "change-case";
|
|
12914
|
-
import { useState as
|
|
12918
|
+
import { useState as useState24 } from "react";
|
|
12915
12919
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
12916
12920
|
function RichTextFieldMock(props) {
|
|
12917
12921
|
const { onBlur = () => {
|
|
12918
12922
|
}, onFocus = () => {
|
|
12919
12923
|
}, readOnly } = props;
|
|
12920
|
-
const [value, setValue] =
|
|
12924
|
+
const [value, setValue] = useState24(props.value || "");
|
|
12921
12925
|
const tid = useTestIds(props, defaultTestId2(props.label || "richTextField"));
|
|
12922
12926
|
return /* @__PURE__ */ jsx70(
|
|
12923
12927
|
"input",
|
|
@@ -12962,7 +12966,7 @@ function RichTextFieldImpl(props) {
|
|
|
12962
12966
|
readOnly,
|
|
12963
12967
|
fullWidth = fieldProps?.fullWidth ?? false
|
|
12964
12968
|
} = props;
|
|
12965
|
-
const [editor, setEditor] =
|
|
12969
|
+
const [editor, setEditor] = useState25();
|
|
12966
12970
|
const editorElement = useRef29();
|
|
12967
12971
|
const currentHtml = useRef29(void 0);
|
|
12968
12972
|
const onChangeRef = useRef29(onChange);
|
|
@@ -13426,7 +13430,7 @@ function TextField(props) {
|
|
|
13426
13430
|
}
|
|
13427
13431
|
|
|
13428
13432
|
// src/inputs/ToggleButton.tsx
|
|
13429
|
-
import { useRef as useRef33, useState as
|
|
13433
|
+
import { useRef as useRef33, useState as useState26 } from "react";
|
|
13430
13434
|
import { useFocusRing as useFocusRing8, useHover as useHover14, usePress, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden6 } from "react-aria";
|
|
13431
13435
|
import { useToggleState as useToggleState3 } from "react-stately";
|
|
13432
13436
|
import { trussProps as trussProps47 } from "@homebound/truss/runtime";
|
|
@@ -13441,7 +13445,7 @@ function ToggleButton(props) {
|
|
|
13441
13445
|
__storyState,
|
|
13442
13446
|
...otherProps
|
|
13443
13447
|
} = props;
|
|
13444
|
-
const [asyncInProgress, setAsyncInProgress] =
|
|
13448
|
+
const [asyncInProgress, setAsyncInProgress] = useState26(false);
|
|
13445
13449
|
const isDisabled = !!disabled || asyncInProgress;
|
|
13446
13450
|
const ariaProps = {
|
|
13447
13451
|
"aria-label": label,
|
|
@@ -14801,13 +14805,13 @@ function useScrollStorage(tableId, enabled = true) {
|
|
|
14801
14805
|
|
|
14802
14806
|
// src/components/Table/hooks/useSetupColumnSizes.ts
|
|
14803
14807
|
import { useResizeObserver } from "@react-aria/utils";
|
|
14804
|
-
import { useCallback as useCallback14, useEffect as useEffect18, useRef as useRef36, useState as
|
|
14808
|
+
import { useCallback as useCallback14, useEffect as useEffect18, useRef as useRef36, useState as useState28 } from "react";
|
|
14805
14809
|
|
|
14806
14810
|
// src/components/Table/hooks/useColumnResizing.ts
|
|
14807
|
-
import { useCallback as useCallback13, useEffect as useEffect17, useState as
|
|
14811
|
+
import { useCallback as useCallback13, useEffect as useEffect17, useState as useState27 } from "react";
|
|
14808
14812
|
import { useDebouncedCallback as useDebouncedCallback3 } from "use-debounce";
|
|
14809
14813
|
function useColumnResizing(storageKey) {
|
|
14810
|
-
const [resizedWidths, setResizedWidths] =
|
|
14814
|
+
const [resizedWidths, setResizedWidths] = useState27(() => {
|
|
14811
14815
|
if (!storageKey) return {};
|
|
14812
14816
|
try {
|
|
14813
14817
|
const stored = sessionStorage.getItem(`columnWidths_${storageKey}`);
|
|
@@ -14861,9 +14865,9 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
14861
14865
|
disableColumnResizing ? void 0 : visibleColumnsStorageKey
|
|
14862
14866
|
);
|
|
14863
14867
|
const calculateImmediately = useRef36(true);
|
|
14864
|
-
const [tableWidth, setTableWidth] =
|
|
14868
|
+
const [tableWidth, setTableWidth] = useState28();
|
|
14865
14869
|
const prevTableWidthRef = useRef36(tableWidth);
|
|
14866
|
-
const [columnSizes, setColumnSizes] =
|
|
14870
|
+
const [columnSizes, setColumnSizes] = useState28(
|
|
14867
14871
|
calcColumnSizes(columns, tableWidth, style.minWidthPx, expandedColumnIds, resizedWidths)
|
|
14868
14872
|
);
|
|
14869
14873
|
const setTableAndColumnWidths = useCallback14(
|
|
@@ -15005,7 +15009,7 @@ function GridTable(props) {
|
|
|
15005
15009
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15006
15010
|
[props.api]
|
|
15007
15011
|
);
|
|
15008
|
-
const [draggedRow, _setDraggedRow] =
|
|
15012
|
+
const [draggedRow, _setDraggedRow] = useState29(void 0);
|
|
15009
15013
|
const draggedRowRef = useRef38(draggedRow);
|
|
15010
15014
|
const setDraggedRow = (row) => {
|
|
15011
15015
|
draggedRowRef.current = row;
|
|
@@ -15309,7 +15313,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
15309
15313
|
}
|
|
15310
15314
|
function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, _stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
|
|
15311
15315
|
const customScrollParent = useVirtualizedScrollParent();
|
|
15312
|
-
const [fetchMoreInProgress, setFetchMoreInProgress] =
|
|
15316
|
+
const [fetchMoreInProgress, setFetchMoreInProgress] = useState29(false);
|
|
15313
15317
|
const {
|
|
15314
15318
|
getScrollIndex,
|
|
15315
15319
|
setScrollIndex
|
|
@@ -15518,7 +15522,7 @@ function ToggleChips(props) {
|
|
|
15518
15522
|
|
|
15519
15523
|
// src/components/Accordion.tsx
|
|
15520
15524
|
import { useId, useResizeObserver as useResizeObserver2 } from "@react-aria/utils";
|
|
15521
|
-
import { useCallback as useCallback16, useEffect as useEffect20, useMemo as useMemo25, useState as
|
|
15525
|
+
import { useCallback as useCallback16, useEffect as useEffect20, useMemo as useMemo25, useState as useState30 } from "react";
|
|
15522
15526
|
import { useFocusRing as useFocusRing10 } from "react-aria";
|
|
15523
15527
|
import { trussProps as trussProps52 } from "@homebound/truss/runtime";
|
|
15524
15528
|
import { jsx as jsx83, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -15544,16 +15548,16 @@ function Accordion(props) {
|
|
|
15544
15548
|
} = props;
|
|
15545
15549
|
const tid = useTestIds(props, "accordion");
|
|
15546
15550
|
const id = useId();
|
|
15547
|
-
const [expanded, setExpanded] =
|
|
15551
|
+
const [expanded, setExpanded] = useState30(defaultExpanded && !disabled);
|
|
15548
15552
|
const {
|
|
15549
15553
|
isFocusVisible,
|
|
15550
15554
|
focusProps
|
|
15551
15555
|
} = useFocusRing10();
|
|
15552
|
-
const [contentEl, setContentEl] =
|
|
15556
|
+
const [contentEl, setContentEl] = useState30(null);
|
|
15553
15557
|
const contentRef = useMemo25(() => ({
|
|
15554
15558
|
current: contentEl
|
|
15555
15559
|
}), [contentEl]);
|
|
15556
|
-
const [contentHeight, setContentHeight] =
|
|
15560
|
+
const [contentHeight, setContentHeight] = useState30(expanded ? "auto" : "0");
|
|
15557
15561
|
useEffect20(() => {
|
|
15558
15562
|
setExpanded(defaultExpanded && !disabled);
|
|
15559
15563
|
}, [defaultExpanded, disabled]);
|
|
@@ -15703,11 +15707,11 @@ var accordionSizes = {
|
|
|
15703
15707
|
};
|
|
15704
15708
|
|
|
15705
15709
|
// src/components/AccordionList.tsx
|
|
15706
|
-
import { useState as
|
|
15710
|
+
import { useState as useState31 } from "react";
|
|
15707
15711
|
import { Fragment as Fragment20, jsx as jsx84 } from "react/jsx-runtime";
|
|
15708
15712
|
function AccordionList(props) {
|
|
15709
15713
|
const { accordions, size, allowMultipleExpanded = true, compact = false } = props;
|
|
15710
|
-
const [expandedIndex, setExpandedIndex] =
|
|
15714
|
+
const [expandedIndex, setExpandedIndex] = useState31(
|
|
15711
15715
|
accordions.findIndex((a) => a.defaultExpanded)
|
|
15712
15716
|
);
|
|
15713
15717
|
const tid = useTestIds(props, "accordionList");
|
|
@@ -15857,7 +15861,7 @@ import { OverlayProvider } from "react-aria";
|
|
|
15857
15861
|
|
|
15858
15862
|
// src/components/Modal/Modal.tsx
|
|
15859
15863
|
import { useResizeObserver as useResizeObserver3 } from "@react-aria/utils";
|
|
15860
|
-
import { useCallback as useCallback17, useEffect as useEffect23, useRef as useRef40, useState as
|
|
15864
|
+
import { useCallback as useCallback17, useEffect as useEffect23, useRef as useRef40, useState as useState32 } from "react";
|
|
15861
15865
|
import { FocusScope as FocusScope4, OverlayContainer as OverlayContainer2, useDialog, useModal as useModal2, useOverlay as useOverlay2, usePreventScroll } from "react-aria";
|
|
15862
15866
|
import { createPortal as createPortal3 } from "react-dom";
|
|
15863
15867
|
|
|
@@ -15964,7 +15968,7 @@ function Modal(props) {
|
|
|
15964
15968
|
} = useDialog({
|
|
15965
15969
|
role: "dialog"
|
|
15966
15970
|
}, ref);
|
|
15967
|
-
const [[width2, height], setSize] =
|
|
15971
|
+
const [[width2, height], setSize] = useState32(getSize(size));
|
|
15968
15972
|
const modalBodyRef = useRef40(null);
|
|
15969
15973
|
const modalFooterRef = useRef40(null);
|
|
15970
15974
|
const modalHeaderRef = useRef40(null);
|
|
@@ -15978,7 +15982,7 @@ function Modal(props) {
|
|
|
15978
15982
|
setSize: (size2 = "md") => setSize(getSize(size2))
|
|
15979
15983
|
};
|
|
15980
15984
|
}
|
|
15981
|
-
const [hasScroll, setHasScroll] =
|
|
15985
|
+
const [hasScroll, setHasScroll] = useState32(forceScrolling ?? false);
|
|
15982
15986
|
useResizeObserver3({
|
|
15983
15987
|
ref: modalBodyRef,
|
|
15984
15988
|
onResize: useCallback17(
|
|
@@ -16132,7 +16136,7 @@ function getSize(size) {
|
|
|
16132
16136
|
}
|
|
16133
16137
|
|
|
16134
16138
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
16135
|
-
import { createContext as createContext5, useContext as useContext14, useMemo as useMemo28, useState as
|
|
16139
|
+
import { createContext as createContext5, useContext as useContext14, useMemo as useMemo28, useState as useState33 } from "react";
|
|
16136
16140
|
|
|
16137
16141
|
// src/components/Snackbar/SnackbarNotice.tsx
|
|
16138
16142
|
import { trussProps as trussProps55 } from "@homebound/truss/runtime";
|
|
@@ -16249,8 +16253,8 @@ var SnackbarContext = createContext5({ setNotices: () => {
|
|
|
16249
16253
|
}, setOffset: () => {
|
|
16250
16254
|
} });
|
|
16251
16255
|
function SnackbarProvider(props) {
|
|
16252
|
-
const [notices, setNotices] =
|
|
16253
|
-
const [offset, setOffset] =
|
|
16256
|
+
const [notices, setNotices] = useState33([]);
|
|
16257
|
+
const [offset, setOffset] = useState33({});
|
|
16254
16258
|
const contextValue = useMemo28(() => ({ setNotices, setOffset }), []);
|
|
16255
16259
|
return /* @__PURE__ */ jsxs55(SnackbarContext.Provider, { value: contextValue, children: [
|
|
16256
16260
|
props.children,
|
|
@@ -16380,7 +16384,7 @@ function SuperDrawer() {
|
|
|
16380
16384
|
}
|
|
16381
16385
|
|
|
16382
16386
|
// src/components/Layout/FormPageLayout.tsx
|
|
16383
|
-
import React16, { createRef, useCallback as useCallback21, useEffect as useEffect25, useMemo as useMemo33, useRef as useRef42, useState as
|
|
16387
|
+
import React16, { createRef, useCallback as useCallback21, useEffect as useEffect25, useMemo as useMemo33, useRef as useRef42, useState as useState39 } from "react";
|
|
16384
16388
|
import { useButton as useButton9, useFocusRing as useFocusRing11 } from "react-aria";
|
|
16385
16389
|
|
|
16386
16390
|
// src/forms/BoundCheckboxField.tsx
|
|
@@ -16635,7 +16639,7 @@ function BoundIconCardField(props) {
|
|
|
16635
16639
|
import { Observer as Observer7 } from "mobx-react";
|
|
16636
16640
|
|
|
16637
16641
|
// src/inputs/IconCardGroup.tsx
|
|
16638
|
-
import { useCallback as useCallback18, useMemo as useMemo29, useState as
|
|
16642
|
+
import { useCallback as useCallback18, useMemo as useMemo29, useState as useState34 } from "react";
|
|
16639
16643
|
import { mergeProps as mergeProps19, useField } from "react-aria";
|
|
16640
16644
|
import { trussProps as trussProps58 } from "@homebound/truss/runtime";
|
|
16641
16645
|
import { jsx as jsx99, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -16653,7 +16657,7 @@ function IconCardGroup(props) {
|
|
|
16653
16657
|
disabled: isDisabled = false,
|
|
16654
16658
|
onChange
|
|
16655
16659
|
} = props;
|
|
16656
|
-
const [selected, setSelected] =
|
|
16660
|
+
const [selected, setSelected] = useState34(values);
|
|
16657
16661
|
const exclusiveOptions = useMemo29(() => options.filter((o) => o.exclusive), [options]);
|
|
16658
16662
|
const toggleValue = useCallback18((value) => {
|
|
16659
16663
|
if (isDisabled) return;
|
|
@@ -17490,7 +17494,7 @@ function boundTreeSelectField(props) {
|
|
|
17490
17494
|
}
|
|
17491
17495
|
|
|
17492
17496
|
// src/components/internal/CompoundField.tsx
|
|
17493
|
-
import { cloneElement as cloneElement2, useState as
|
|
17497
|
+
import { cloneElement as cloneElement2, useState as useState35 } from "react";
|
|
17494
17498
|
import { trussProps as trussProps61 } from "@homebound/truss/runtime";
|
|
17495
17499
|
import { jsx as jsx115, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17496
17500
|
function CompoundField({
|
|
@@ -17513,7 +17517,7 @@ function CompoundField({
|
|
|
17513
17517
|
const internalProps = {
|
|
17514
17518
|
compound: true
|
|
17515
17519
|
};
|
|
17516
|
-
const [hasFocusWithin, setHasFocusWithin] =
|
|
17520
|
+
const [hasFocusWithin, setHasFocusWithin] = useState35(false);
|
|
17517
17521
|
function onFocusCapture() {
|
|
17518
17522
|
setHasFocusWithin(true);
|
|
17519
17523
|
}
|
|
@@ -17689,7 +17693,7 @@ import { useDebouncedCallback as useDebouncedCallback5 } from "use-debounce";
|
|
|
17689
17693
|
|
|
17690
17694
|
// src/components/RightSidebar.tsx
|
|
17691
17695
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
17692
|
-
import { useState as
|
|
17696
|
+
import { useState as useState36 } from "react";
|
|
17693
17697
|
import { trussProps as trussProps64 } from "@homebound/truss/runtime";
|
|
17694
17698
|
import { Fragment as Fragment24, jsx as jsx120, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17695
17699
|
var RIGHT_SIDEBAR_MIN_WIDTH = "250px";
|
|
@@ -17697,7 +17701,7 @@ function RightSidebar({
|
|
|
17697
17701
|
content,
|
|
17698
17702
|
headerHeightPx: headerHeightPx2
|
|
17699
17703
|
}) {
|
|
17700
|
-
const [selectedIcon, setSelectedIcon] =
|
|
17704
|
+
const [selectedIcon, setSelectedIcon] = useState36(void 0);
|
|
17701
17705
|
const tid = useTestIds({}, "rightSidebar");
|
|
17702
17706
|
return /* @__PURE__ */ jsxs62(Fragment24, { children: [
|
|
17703
17707
|
/* @__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 +17788,7 @@ function IconButtonList({
|
|
|
17784
17788
|
}
|
|
17785
17789
|
|
|
17786
17790
|
// src/components/Toast/ToastContext.tsx
|
|
17787
|
-
import { createContext as createContext6, useCallback as useCallback20, useContext as useContext15, useMemo as useMemo31, useState as
|
|
17791
|
+
import { createContext as createContext6, useCallback as useCallback20, useContext as useContext15, useMemo as useMemo31, useState as useState37 } from "react";
|
|
17788
17792
|
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
17789
17793
|
var ToastContext = createContext6({
|
|
17790
17794
|
setNotice: () => {
|
|
@@ -17795,7 +17799,7 @@ var ToastContext = createContext6({
|
|
|
17795
17799
|
notice: void 0
|
|
17796
17800
|
});
|
|
17797
17801
|
function ToastProvider(props) {
|
|
17798
|
-
const [notice, setNotice] =
|
|
17802
|
+
const [notice, setNotice] = useState37();
|
|
17799
17803
|
const clear = useCallback20(() => setNotice(void 0), [setNotice]);
|
|
17800
17804
|
const contextValue = useMemo31(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
17801
17805
|
return /* @__PURE__ */ jsx121(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
@@ -17813,7 +17817,7 @@ function Toast() {
|
|
|
17813
17817
|
}
|
|
17814
17818
|
|
|
17815
17819
|
// src/components/Layout/PageHeaderBreadcrumbs.tsx
|
|
17816
|
-
import { Fragment as Fragment26, useMemo as useMemo32, useState as
|
|
17820
|
+
import { Fragment as Fragment26, useMemo as useMemo32, useState as useState38 } from "react";
|
|
17817
17821
|
import { Link as Link4 } from "react-router-dom";
|
|
17818
17822
|
import { mergeProps as mergeProps20 } from "@homebound/truss/runtime";
|
|
17819
17823
|
import { Fragment as Fragment27, jsx as jsx123, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
@@ -17822,7 +17826,7 @@ function PageHeaderBreadcrumbs({
|
|
|
17822
17826
|
}) {
|
|
17823
17827
|
const tids = useTestIds({}, "pageHeaderBreadcrumbs");
|
|
17824
17828
|
const breadcrumbs = useMemo32(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
|
|
17825
|
-
const [collapsed, setCollapsed] =
|
|
17829
|
+
const [collapsed, setCollapsed] = useState38(true);
|
|
17826
17830
|
function renderBreadcrumb(bc, index, hideDivisor) {
|
|
17827
17831
|
return (
|
|
17828
17832
|
// Adding index to key to prevent rendering issues when multiple items have the same label
|
|
@@ -18088,7 +18092,7 @@ function SectionNavLink(props) {
|
|
|
18088
18092
|
}), ...tids.sectionNavLink, children: section.title });
|
|
18089
18093
|
}
|
|
18090
18094
|
function useActiveSection(sectionsWithRefs) {
|
|
18091
|
-
const [activeSection, setActiveSection] =
|
|
18095
|
+
const [activeSection, setActiveSection] = useState39(null);
|
|
18092
18096
|
const debouncedIntersectionCallback = useDebouncedCallback5((entries) => {
|
|
18093
18097
|
const sectionsInView = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio > 0.2).sort((a, b) => {
|
|
18094
18098
|
const ratioDiff = b.intersectionRatio - a.intersectionRatio;
|
|
@@ -18195,7 +18199,7 @@ function invertSpacing(value) {
|
|
|
18195
18199
|
}
|
|
18196
18200
|
|
|
18197
18201
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
18198
|
-
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as
|
|
18202
|
+
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as useState42 } from "react";
|
|
18199
18203
|
|
|
18200
18204
|
// src/components/ButtonMenu.tsx
|
|
18201
18205
|
import { useRef as useRef43 } from "react";
|
|
@@ -18247,7 +18251,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
18247
18251
|
}
|
|
18248
18252
|
|
|
18249
18253
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
18250
|
-
import { memo as memo2, useMemo as useMemo35, useState as
|
|
18254
|
+
import { memo as memo2, useMemo as useMemo35, useState as useState41 } from "react";
|
|
18251
18255
|
|
|
18252
18256
|
// src/components/CountBadge.tsx
|
|
18253
18257
|
import { trussProps as trussProps66 } from "@homebound/truss/runtime";
|
|
@@ -18642,7 +18646,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
18642
18646
|
};
|
|
18643
18647
|
|
|
18644
18648
|
// src/components/Filters/FilterModal.tsx
|
|
18645
|
-
import { useState as
|
|
18649
|
+
import { useState as useState40 } from "react";
|
|
18646
18650
|
|
|
18647
18651
|
// src/components/Modal/OpenModal.tsx
|
|
18648
18652
|
import { useEffect as useEffect26 } from "react";
|
|
@@ -18675,7 +18679,7 @@ function FilterModal(props) {
|
|
|
18675
18679
|
const {
|
|
18676
18680
|
closeModal
|
|
18677
18681
|
} = useModal();
|
|
18678
|
-
const [modalFilter, setModalFilter] =
|
|
18682
|
+
const [modalFilter, setModalFilter] = useState40(filter);
|
|
18679
18683
|
return /* @__PURE__ */ jsxs68(Fragment31, { children: [
|
|
18680
18684
|
/* @__PURE__ */ jsx136(ModalHeader, { children: "More Filters" }),
|
|
18681
18685
|
/* @__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 +18820,7 @@ function FilterDropdownMenu(props) {
|
|
|
18816
18820
|
groupBy
|
|
18817
18821
|
} = props;
|
|
18818
18822
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
18819
|
-
const [isOpen, setIsOpen] =
|
|
18823
|
+
const [isOpen, setIsOpen] = useState41(false);
|
|
18820
18824
|
const activeFilterCount = useMemo35(() => getActiveFilterCount(filter), [filter]);
|
|
18821
18825
|
const filterImpls = useMemo35(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
18822
18826
|
const renderFilters = () => {
|
|
@@ -19175,7 +19179,7 @@ function useGridTableLayoutState({
|
|
|
19175
19179
|
const groupBy = useGroupBy(maybeGroupBy ?? {
|
|
19176
19180
|
none: "none"
|
|
19177
19181
|
});
|
|
19178
|
-
const [searchString, setSearchString] =
|
|
19182
|
+
const [searchString, setSearchString] = useState42("");
|
|
19179
19183
|
const columnsFallback = "unset-columns";
|
|
19180
19184
|
const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
|
|
19181
19185
|
const paginationFallbackKey = "unset-pagination";
|
|
@@ -19185,7 +19189,7 @@ function useGridTableLayoutState({
|
|
|
19185
19189
|
100
|
|
19186
19190
|
// default page size
|
|
19187
19191
|
);
|
|
19188
|
-
const [page, setPage] =
|
|
19192
|
+
const [page, setPage] = useState42({
|
|
19189
19193
|
offset: 0,
|
|
19190
19194
|
limit: persistedPageSize
|
|
19191
19195
|
});
|
|
@@ -19262,7 +19266,7 @@ function SearchBox({
|
|
|
19262
19266
|
}, setQueryParams] = useQueryParams3({
|
|
19263
19267
|
search: StringParam2
|
|
19264
19268
|
});
|
|
19265
|
-
const [value, setValue] =
|
|
19269
|
+
const [value, setValue] = useState42(initialValue || "");
|
|
19266
19270
|
const [debouncedSearch] = useDebounce2(value, 300);
|
|
19267
19271
|
useEffect27(() => {
|
|
19268
19272
|
onSearch(debouncedSearch);
|
|
@@ -19287,7 +19291,7 @@ function PreventBrowserScroll({
|
|
|
19287
19291
|
}
|
|
19288
19292
|
|
|
19289
19293
|
// src/components/Layout/RightPaneLayout/RightPaneContext.tsx
|
|
19290
|
-
import React18, { useCallback as useCallback23, useContext as useContext16, useMemo as useMemo39, useState as
|
|
19294
|
+
import React18, { useCallback as useCallback23, useContext as useContext16, useMemo as useMemo39, useState as useState43 } from "react";
|
|
19291
19295
|
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
19292
19296
|
var RightPaneContext = React18.createContext({
|
|
19293
19297
|
openInPane: () => {
|
|
@@ -19300,8 +19304,8 @@ var RightPaneContext = React18.createContext({
|
|
|
19300
19304
|
rightPaneContent: null
|
|
19301
19305
|
});
|
|
19302
19306
|
function RightPaneProvider({ children }) {
|
|
19303
|
-
const [rightPaneContent, setRightPaneContent] =
|
|
19304
|
-
const [isRightPaneOpen, setIsRightPaneOpen] =
|
|
19307
|
+
const [rightPaneContent, setRightPaneContent] = useState43(void 0);
|
|
19308
|
+
const [isRightPaneOpen, setIsRightPaneOpen] = useState43(false);
|
|
19305
19309
|
const openInPane = useCallback23(
|
|
19306
19310
|
(opts) => {
|
|
19307
19311
|
setRightPaneContent(opts?.content);
|
|
@@ -19710,7 +19714,7 @@ import { useHover as useHover16 } from "react-aria";
|
|
|
19710
19714
|
|
|
19711
19715
|
// src/components/Tag.tsx
|
|
19712
19716
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
19713
|
-
import { useRef as useRef48, useState as
|
|
19717
|
+
import { useRef as useRef48, useState as useState44 } from "react";
|
|
19714
19718
|
import { trussProps as trussProps74 } from "@homebound/truss/runtime";
|
|
19715
19719
|
import { jsx as jsx152, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
19716
19720
|
function Tag(props) {
|
|
@@ -19723,7 +19727,7 @@ function Tag(props) {
|
|
|
19723
19727
|
} = props;
|
|
19724
19728
|
const typeStyles2 = getStyles(type);
|
|
19725
19729
|
const tid = useTestIds(otherProps);
|
|
19726
|
-
const [showTooltip, setShowTooltip] =
|
|
19730
|
+
const [showTooltip, setShowTooltip] = useState44(false);
|
|
19727
19731
|
const ref = useRef48(null);
|
|
19728
19732
|
useResizeObserver4({
|
|
19729
19733
|
ref,
|
|
@@ -20423,7 +20427,7 @@ function HbSpinnerProvider({
|
|
|
20423
20427
|
|
|
20424
20428
|
// src/components/MaxLines.tsx
|
|
20425
20429
|
import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
20426
|
-
import { useCallback as useCallback25, useEffect as useEffect30, useRef as useRef50, useState as
|
|
20430
|
+
import { useCallback as useCallback25, useEffect as useEffect30, useRef as useRef50, useState as useState45 } from "react";
|
|
20427
20431
|
import { trussProps as trussProps80 } from "@homebound/truss/runtime";
|
|
20428
20432
|
import { jsx as jsx160, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
20429
20433
|
function MaxLines({
|
|
@@ -20431,8 +20435,8 @@ function MaxLines({
|
|
|
20431
20435
|
children
|
|
20432
20436
|
}) {
|
|
20433
20437
|
const elRef = useRef50(null);
|
|
20434
|
-
const [hasMore, setHasMore] =
|
|
20435
|
-
const [expanded, setExpanded] =
|
|
20438
|
+
const [hasMore, setHasMore] = useState45(false);
|
|
20439
|
+
const [expanded, setExpanded] = useState45(false);
|
|
20436
20440
|
useLayoutEffect2(() => {
|
|
20437
20441
|
if (!elRef.current) return;
|
|
20438
20442
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
@@ -20466,7 +20470,7 @@ function MaxLines({
|
|
|
20466
20470
|
|
|
20467
20471
|
// src/components/ScrollShadows.tsx
|
|
20468
20472
|
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
20469
|
-
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as
|
|
20473
|
+
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as useState46 } from "react";
|
|
20470
20474
|
import { trussProps as trussProps81 } from "@homebound/truss/runtime";
|
|
20471
20475
|
import { jsx as jsx161, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
20472
20476
|
function ScrollShadows(props) {
|
|
@@ -20484,8 +20488,8 @@ function ScrollShadows(props) {
|
|
|
20484
20488
|
if (!bgColor.includes("rgba")) {
|
|
20485
20489
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
20486
20490
|
}
|
|
20487
|
-
const [showStartShadow, setShowStartShadow] =
|
|
20488
|
-
const [showEndShadow, setShowEndShadow] =
|
|
20491
|
+
const [showStartShadow, setShowStartShadow] = useState46(false);
|
|
20492
|
+
const [showEndShadow, setShowEndShadow] = useState46(false);
|
|
20489
20493
|
const scrollRef = useRef51(null);
|
|
20490
20494
|
const [startShadowStyles, endShadowStyles] = useMemo47(() => {
|
|
20491
20495
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
@@ -21131,7 +21135,7 @@ function visit(rows, fn) {
|
|
|
21131
21135
|
|
|
21132
21136
|
// src/components/Tabs.tsx
|
|
21133
21137
|
import { camelCase as camelCase5 } from "change-case";
|
|
21134
|
-
import { useEffect as useEffect32, useMemo as useMemo49, useRef as useRef53, useState as
|
|
21138
|
+
import { useEffect as useEffect32, useMemo as useMemo49, useRef as useRef53, useState as useState47 } from "react";
|
|
21135
21139
|
import { mergeProps as mergeProps26, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
21136
21140
|
import { matchPath, Route } from "react-router";
|
|
21137
21141
|
import { Link as Link5, useLocation } from "react-router-dom";
|
|
@@ -21189,7 +21193,7 @@ function Tabs(props) {
|
|
|
21189
21193
|
focusProps
|
|
21190
21194
|
} = useFocusRing15();
|
|
21191
21195
|
const tid = useTestIds(others, "tabs");
|
|
21192
|
-
const [active, setActive] =
|
|
21196
|
+
const [active, setActive] = useState47(selected);
|
|
21193
21197
|
const ref = useRef53(null);
|
|
21194
21198
|
useEffect32(() => setActive(selected), [selected]);
|
|
21195
21199
|
function onKeyUp(e) {
|