@homebound/beam 3.40.0 → 3.42.0
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/Css.json +6 -0
- package/dist/index.cjs +402 -352
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -43
- package/dist/index.d.ts +26 -43
- package/dist/index.js +429 -378
- package/dist/index.js.map +1 -1
- package/dist/truss.css +10 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1753,6 +1753,32 @@ var CssBuilder = class _CssBuilder {
|
|
|
1753
1753
|
position(value) {
|
|
1754
1754
|
return this.add("position", value);
|
|
1755
1755
|
}
|
|
1756
|
+
// scrollSnap
|
|
1757
|
+
/** Sets `scrollSnapAlign: value`. */
|
|
1758
|
+
ssa(value) {
|
|
1759
|
+
return this.add("scrollSnapAlign", value);
|
|
1760
|
+
}
|
|
1761
|
+
/** Sets `scrollSnapType: value`. */
|
|
1762
|
+
sst(value) {
|
|
1763
|
+
return this.add("scrollSnapType", value);
|
|
1764
|
+
}
|
|
1765
|
+
// scrollbarWidth
|
|
1766
|
+
/** Sets `scrollbarWidth: "auto"`. */
|
|
1767
|
+
get sbwa() {
|
|
1768
|
+
return this.add("scrollbarWidth", "auto");
|
|
1769
|
+
}
|
|
1770
|
+
/** Sets `scrollbarWidth: "thin"`. */
|
|
1771
|
+
get sbwt() {
|
|
1772
|
+
return this.add("scrollbarWidth", "thin");
|
|
1773
|
+
}
|
|
1774
|
+
/** Sets `scrollbarWidth: "none"`. */
|
|
1775
|
+
get sbwn() {
|
|
1776
|
+
return this.add("scrollbarWidth", "none");
|
|
1777
|
+
}
|
|
1778
|
+
/** Sets `scrollbarWidth: value`. */
|
|
1779
|
+
sbw(value) {
|
|
1780
|
+
return this.add("scrollbarWidth", value);
|
|
1781
|
+
}
|
|
1756
1782
|
// skins
|
|
1757
1783
|
/** Sets `color: "rgba(255, 255, 255, 1)"`. */
|
|
1758
1784
|
get white() {
|
|
@@ -16184,66 +16210,71 @@ function TableCardView(props) {
|
|
|
16184
16210
|
} = props;
|
|
16185
16211
|
const tid = useTestIds(props, "tableCardView");
|
|
16186
16212
|
const progressValue = useMemo26(() => progress !== void 0 ? clampProgress(progress) : 0, [progress]);
|
|
16213
|
+
const col1 = data.slice(0, Math.ceil(data.length / 2));
|
|
16214
|
+
const col2 = data.slice(Math.ceil(data.length / 2));
|
|
16187
16215
|
return /* @__PURE__ */ jsxs50("div", { ...trussProps51({
|
|
16188
16216
|
paddingTop: "pt3",
|
|
16189
16217
|
paddingBottom: "pb3",
|
|
16190
16218
|
paddingRight: "pr3",
|
|
16191
16219
|
paddingLeft: "pl3",
|
|
16192
16220
|
width: "w100",
|
|
16193
|
-
height: "
|
|
16221
|
+
height: "h_430px",
|
|
16194
16222
|
boxShadow: "bshBasic",
|
|
16195
16223
|
backgroundColor: ["bgColor_var", {
|
|
16196
16224
|
"--backgroundColor": "var(--b-surface)"
|
|
16197
16225
|
}],
|
|
16198
16226
|
display: "df",
|
|
16199
16227
|
flexDirection: "fdc",
|
|
16200
|
-
gap: "gap2"
|
|
16228
|
+
gap: "gap2",
|
|
16229
|
+
borderRadius: "br8"
|
|
16201
16230
|
}), ...tid, children: [
|
|
16202
16231
|
/* @__PURE__ */ jsxs50("div", { className: "relative", children: [
|
|
16203
16232
|
/* @__PURE__ */ jsx86("img", { className: "h_184px w100 objectFit_cover", src: imgSrc, alt: title, ...tid.image }),
|
|
16204
16233
|
status && /* @__PURE__ */ jsx86("div", { className: "absolute top1 left1", ...tid.status, children: /* @__PURE__ */ jsx86(Tag, { ...status }) })
|
|
16205
16234
|
] }),
|
|
16206
|
-
/* @__PURE__ */ jsxs50("div", { className: "df fdc gap2", children: [
|
|
16235
|
+
/* @__PURE__ */ jsxs50("div", { className: "df fdc gap2 jcsb h100", children: [
|
|
16207
16236
|
/* @__PURE__ */ jsxs50("div", { children: [
|
|
16208
16237
|
eyebrow && /* @__PURE__ */ jsx86("p", { className: "fw4 fz_14px lh_20px", ...tid.eyebrow, children: eyebrow }),
|
|
16209
16238
|
title && /* @__PURE__ */ jsxs50("div", { className: "dif w100 jcsb aic", children: [
|
|
16210
|
-
/* @__PURE__ */
|
|
16211
|
-
title,
|
|
16212
|
-
" "
|
|
16213
|
-
] }),
|
|
16239
|
+
/* @__PURE__ */ jsx86("h4", { className: "fwb fz_20px lh_28px oh d_negwebkit_box wbo_vertical to_ellipsis wlc_2", ...tid.title, children: title }),
|
|
16214
16240
|
(badge || badgeTags?.length) && /* @__PURE__ */ jsxs50("div", { className: "dif aic gap1 fs0", ...tid.badge, children: [
|
|
16215
16241
|
badge && /* @__PURE__ */ jsx86("span", { className: "fw4 fz_14px lh_20px wsnw", children: badge }),
|
|
16216
16242
|
badgeTags?.map((tag) => /* @__PURE__ */ jsx86(Tag, { ...tag }, tag.text))
|
|
16217
16243
|
] })
|
|
16218
16244
|
] })
|
|
16219
16245
|
] }),
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
d.label,
|
|
16229
|
-
":"
|
|
16246
|
+
/* @__PURE__ */ jsxs50("div", { className: "df fdc gap2", children: [
|
|
16247
|
+
data && data?.length > 0 && /* @__PURE__ */ jsxs50("dl", { className: "df gap2 fw4 fz_14px lh_20px", children: [
|
|
16248
|
+
/* @__PURE__ */ jsx86("div", { className: "df fdc fg1", children: col1.map((d) => /* @__PURE__ */ jsxs50("div", { className: "df gap_4px", ...tid[defaultTestId(d.label)], children: [
|
|
16249
|
+
/* @__PURE__ */ jsxs50("dt", { children: [
|
|
16250
|
+
d.label,
|
|
16251
|
+
":"
|
|
16252
|
+
] }),
|
|
16253
|
+
/* @__PURE__ */ jsx86("dd", { children: d.value })
|
|
16254
|
+
] }, d.label)) }),
|
|
16255
|
+
/* @__PURE__ */ jsx86("div", { className: "df fdc fg1", children: col2.map((d) => /* @__PURE__ */ jsxs50("div", { className: "df gap_4px", ...tid[defaultTestId(d.label)], children: [
|
|
16256
|
+
/* @__PURE__ */ jsxs50("dt", { children: [
|
|
16257
|
+
d.label,
|
|
16258
|
+
":"
|
|
16259
|
+
] }),
|
|
16260
|
+
/* @__PURE__ */ jsx86("dd", { children: d.value })
|
|
16261
|
+
] }, d.label)) })
|
|
16230
16262
|
] }),
|
|
16231
|
-
/* @__PURE__ */ jsx86("
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
] }) })
|
|
16263
|
+
progress !== void 0 && /* @__PURE__ */ jsx86("div", { className: "df fdc gap1", children: /* @__PURE__ */ jsxs50("div", { className: "df aic gap1 fs_10px lh_14px", children: [
|
|
16264
|
+
/* @__PURE__ */ jsx86("div", { className: "w25 h_8px br4 bgGray200", children: /* @__PURE__ */ jsx86("div", { ...trussProps51({
|
|
16265
|
+
height: "h100",
|
|
16266
|
+
borderRadius: "br4",
|
|
16267
|
+
backgroundColor: "bgBlue500",
|
|
16268
|
+
width: ["w_var", {
|
|
16269
|
+
"--width": maybeCssVar30(__maybeInc10(`${progressValue}%`))
|
|
16270
|
+
}]
|
|
16271
|
+
}) }) }),
|
|
16272
|
+
/* @__PURE__ */ jsxs50("span", { ...tid.progressValue, children: [
|
|
16273
|
+
progressValue,
|
|
16274
|
+
"%"
|
|
16275
|
+
] })
|
|
16276
|
+
] }) })
|
|
16277
|
+
] })
|
|
16247
16278
|
] })
|
|
16248
16279
|
] });
|
|
16249
16280
|
}
|
|
@@ -19632,7 +19663,7 @@ function invertSpacing(value) {
|
|
|
19632
19663
|
|
|
19633
19664
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
19634
19665
|
import { useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
19635
|
-
import React17, { useCallback as useCallback27, useEffect as
|
|
19666
|
+
import React17, { useCallback as useCallback27, useEffect as useEffect28, useLayoutEffect as useLayoutEffect6, useMemo as useMemo40, useRef as useRef48, useState as useState46 } from "react";
|
|
19636
19667
|
|
|
19637
19668
|
// src/components/ButtonMenu.tsx
|
|
19638
19669
|
import { useRef as useRef46 } from "react";
|
|
@@ -19671,8 +19702,26 @@ function isSelectionButtonMenuProps(props) {
|
|
|
19671
19702
|
return typeof props === "object" && "selectedItem" in props && "onChange" in props;
|
|
19672
19703
|
}
|
|
19673
19704
|
|
|
19674
|
-
// src/components/Filters/
|
|
19675
|
-
|
|
19705
|
+
// src/components/Filters/utils.tsx
|
|
19706
|
+
function getActiveFilterCount(filter) {
|
|
19707
|
+
return safeKeys(filter).filter((key) => isDefined(filter[key])).length;
|
|
19708
|
+
}
|
|
19709
|
+
function updateFilter(currentFilter, key, value) {
|
|
19710
|
+
if (value === void 0) {
|
|
19711
|
+
return omitKey(key, currentFilter);
|
|
19712
|
+
} else {
|
|
19713
|
+
return { ...currentFilter, [key]: value };
|
|
19714
|
+
}
|
|
19715
|
+
}
|
|
19716
|
+
var filterTestIdPrefix = "filter";
|
|
19717
|
+
|
|
19718
|
+
// src/components/Layout/layoutTypes.ts
|
|
19719
|
+
function isGridTableProps(props) {
|
|
19720
|
+
return "rows" in props;
|
|
19721
|
+
}
|
|
19722
|
+
|
|
19723
|
+
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
19724
|
+
import { memo as memo2, useMemo as useMemo38, useState as useState44 } from "react";
|
|
19676
19725
|
|
|
19677
19726
|
// src/components/CountBadge.tsx
|
|
19678
19727
|
import { trussProps as trussProps68, maybeCssVar as maybeCssVar41 } from "@homebound/truss/runtime";
|
|
@@ -19718,6 +19767,114 @@ function CountBadge(props) {
|
|
|
19718
19767
|
}), children: count });
|
|
19719
19768
|
}
|
|
19720
19769
|
|
|
19770
|
+
// src/components/Table/components/EditColumnsButton.tsx
|
|
19771
|
+
import { Fragment as Fragment29, useCallback as useCallback25, useMemo as useMemo36, useRef as useRef47 } from "react";
|
|
19772
|
+
import { useMenuTrigger as useMenuTrigger3 } from "react-aria";
|
|
19773
|
+
import { useMenuTriggerState as useMenuTriggerState3 } from "react-stately";
|
|
19774
|
+
import { trussProps as trussProps69 } from "@homebound/truss/runtime";
|
|
19775
|
+
import { jsx as jsx134, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
19776
|
+
function EditColumnsButton(props) {
|
|
19777
|
+
const {
|
|
19778
|
+
defaultOpen,
|
|
19779
|
+
disabled,
|
|
19780
|
+
columns,
|
|
19781
|
+
api
|
|
19782
|
+
} = props;
|
|
19783
|
+
const state = useMenuTriggerState3({
|
|
19784
|
+
isOpen: defaultOpen
|
|
19785
|
+
});
|
|
19786
|
+
const buttonRef = useRef47(null);
|
|
19787
|
+
const {
|
|
19788
|
+
menuTriggerProps
|
|
19789
|
+
} = useMenuTrigger3({
|
|
19790
|
+
isDisabled: !!disabled
|
|
19791
|
+
}, state, buttonRef);
|
|
19792
|
+
const tid = useTestIds(props, "columns");
|
|
19793
|
+
const {
|
|
19794
|
+
sm
|
|
19795
|
+
} = useBreakpoint();
|
|
19796
|
+
const options = useMemo36(() => columns.filter((column2) => column2.canHide).filter((column2) => {
|
|
19797
|
+
if (!column2.name || column2.name.length === 0 || !column2.id || column2.id.length === 0) {
|
|
19798
|
+
console.warn("Column is missing 'name' and/or 'id' property required by the Edit Columns button", column2);
|
|
19799
|
+
return false;
|
|
19800
|
+
}
|
|
19801
|
+
return true;
|
|
19802
|
+
}).map((column2) => ({
|
|
19803
|
+
label: column2.name,
|
|
19804
|
+
value: column2.id
|
|
19805
|
+
})), [columns]);
|
|
19806
|
+
const selectedValues = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
19807
|
+
const setSelectedValues = useCallback25((ids) => {
|
|
19808
|
+
api.resetColumnWidths();
|
|
19809
|
+
api.setVisibleColumns(columns.filter((column2) => column2.canHide ? ids.includes(column2.id) : true).map((c) => c.id));
|
|
19810
|
+
}, [columns, api]);
|
|
19811
|
+
const hasHiddenColumn = useMemo36(() => {
|
|
19812
|
+
const selectableOptionValues = options.map((option) => option.value);
|
|
19813
|
+
return selectableOptionValues.some((option) => !selectedValues.includes(option));
|
|
19814
|
+
}, [options, selectedValues]);
|
|
19815
|
+
return /* @__PURE__ */ jsx134(OverlayTrigger, { ...props, trigger: sm ? {
|
|
19816
|
+
icon: hasHiddenColumn ? "columnsBadged" : "columns",
|
|
19817
|
+
variant: "outline"
|
|
19818
|
+
} : {
|
|
19819
|
+
icon: hasHiddenColumn ? "columnsBadged" : "columns",
|
|
19820
|
+
label: "",
|
|
19821
|
+
size: "md",
|
|
19822
|
+
variant: "secondaryBlack"
|
|
19823
|
+
}, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */ jsxs68("div", { ...trussProps69({
|
|
19824
|
+
display: "df",
|
|
19825
|
+
flexDirection: "fdc",
|
|
19826
|
+
backgroundColor: ["bgColor_var", {
|
|
19827
|
+
"--backgroundColor": "var(--b-surface)"
|
|
19828
|
+
}],
|
|
19829
|
+
maxWidth: "maxw_326px",
|
|
19830
|
+
maxHeight: "maxh_512px",
|
|
19831
|
+
boxShadow: "h_bshHover"
|
|
19832
|
+
}), children: [
|
|
19833
|
+
/* @__PURE__ */ jsx134("div", { className: "dg gtc_1fr_auto gap2 pt2 pb2 pr2 pl2 fg1 mh0 oya", children: options.map((option) => /* @__PURE__ */ jsxs68(Fragment29, { children: [
|
|
19834
|
+
/* @__PURE__ */ jsx134("div", { className: "fw4 fz_14px lh_20px wsnw oh to_ellipsis pr1", children: option.label }),
|
|
19835
|
+
/* @__PURE__ */ jsx134(Switch, { compact: true, selected: selectedValues.includes(option.value), onChange: (value) => setSelectedValues(value ? [...selectedValues, option.value] : selectedValues.filter((v) => v !== option.value)), labelStyle: "hidden", label: option.label, ...tid[`option${option.value}`] })
|
|
19836
|
+
] }, option.value)) }),
|
|
19837
|
+
/* @__PURE__ */ jsx134("div", { ...trussProps69({
|
|
19838
|
+
display: "df",
|
|
19839
|
+
justifyContent: "jcc",
|
|
19840
|
+
paddingTop: "pt2",
|
|
19841
|
+
paddingBottom: "pb2",
|
|
19842
|
+
paddingRight: "pr2",
|
|
19843
|
+
paddingLeft: "pl2",
|
|
19844
|
+
borderTopStyle: "bts_solid",
|
|
19845
|
+
borderTopWidth: "btw_1px",
|
|
19846
|
+
borderColor: ["bc_var", {
|
|
19847
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
19848
|
+
}]
|
|
19849
|
+
}), children: /* @__PURE__ */ jsx134(Button, { variant: "tertiary", label: "Reset Column Widths", onClick: () => api.resetColumnWidths() }) })
|
|
19850
|
+
] }) });
|
|
19851
|
+
}
|
|
19852
|
+
|
|
19853
|
+
// src/components/Table/components/ViewToggleButton.tsx
|
|
19854
|
+
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
19855
|
+
function ViewToggleButton({ view, onChange, defaultOpen }) {
|
|
19856
|
+
const { sm } = useBreakpoint();
|
|
19857
|
+
const tid = useTestIds({}, "viewToggleButton");
|
|
19858
|
+
const menuItems = [
|
|
19859
|
+
{ label: "List", icon: "projects", onClick: () => onChange("list") },
|
|
19860
|
+
{ label: "Card", icon: "tile", onClick: () => onChange("card") }
|
|
19861
|
+
];
|
|
19862
|
+
const icon = view === "list" ? "projects" : "tile";
|
|
19863
|
+
return /* @__PURE__ */ jsx135(
|
|
19864
|
+
ButtonMenu,
|
|
19865
|
+
{
|
|
19866
|
+
trigger: sm ? { icon, variant: "outline" } : { icon, label: "", size: "md", variant: "secondaryBlack" },
|
|
19867
|
+
items: menuItems,
|
|
19868
|
+
defaultOpen,
|
|
19869
|
+
...tid
|
|
19870
|
+
}
|
|
19871
|
+
);
|
|
19872
|
+
}
|
|
19873
|
+
|
|
19874
|
+
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
19875
|
+
import { useDebouncedCallback as useDebouncedCallback6 } from "use-debounce";
|
|
19876
|
+
import { StringParam as StringParam2, useQueryParams as useQueryParams3 } from "use-query-params";
|
|
19877
|
+
|
|
19721
19878
|
// src/components/Filters/BaseFilter.ts
|
|
19722
19879
|
var BaseFilter = class {
|
|
19723
19880
|
constructor(key, props) {
|
|
@@ -19736,7 +19893,7 @@ var BaseFilter = class {
|
|
|
19736
19893
|
};
|
|
19737
19894
|
|
|
19738
19895
|
// src/components/Filters/DateFilter.tsx
|
|
19739
|
-
import { Fragment as
|
|
19896
|
+
import { Fragment as Fragment30, jsx as jsx136, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
19740
19897
|
function dateFilter(props) {
|
|
19741
19898
|
return (key) => new DateFilter(key, props);
|
|
19742
19899
|
}
|
|
@@ -19758,10 +19915,10 @@ var DateFilter = class extends BaseFilter {
|
|
|
19758
19915
|
}
|
|
19759
19916
|
render(value, setValue, tid, inModal, vertical) {
|
|
19760
19917
|
const { label, operations, getOperationValue, getOperationLabel, defaultValue } = this.props;
|
|
19761
|
-
return /* @__PURE__ */
|
|
19762
|
-
vertical && /* @__PURE__ */
|
|
19763
|
-
/* @__PURE__ */
|
|
19764
|
-
/* @__PURE__ */
|
|
19918
|
+
return /* @__PURE__ */ jsxs69(Fragment30, { children: [
|
|
19919
|
+
vertical && /* @__PURE__ */ jsx136(Label, { label }),
|
|
19920
|
+
/* @__PURE__ */ jsxs69(CompoundField, { children: [
|
|
19921
|
+
/* @__PURE__ */ jsx136(
|
|
19765
19922
|
SelectField,
|
|
19766
19923
|
{
|
|
19767
19924
|
sizeToContent: true,
|
|
@@ -19783,7 +19940,7 @@ var DateFilter = class extends BaseFilter {
|
|
|
19783
19940
|
...tid[`${defaultTestId(this.label)}_dateOperation`]
|
|
19784
19941
|
}
|
|
19785
19942
|
),
|
|
19786
|
-
/* @__PURE__ */
|
|
19943
|
+
/* @__PURE__ */ jsx136(
|
|
19787
19944
|
DateField,
|
|
19788
19945
|
{
|
|
19789
19946
|
labelStyle: "inline",
|
|
@@ -19807,7 +19964,7 @@ function isDateFilterValue(value) {
|
|
|
19807
19964
|
}
|
|
19808
19965
|
|
|
19809
19966
|
// src/components/Filters/DateRangeFilter.tsx
|
|
19810
|
-
import { Fragment as
|
|
19967
|
+
import { Fragment as Fragment31, jsx as jsx137, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
19811
19968
|
function dateRangeFilter(props) {
|
|
19812
19969
|
return (key) => new DateRangeFilter(key, props);
|
|
19813
19970
|
}
|
|
@@ -19829,9 +19986,9 @@ var DateRangeFilter = class extends BaseFilter {
|
|
|
19829
19986
|
}
|
|
19830
19987
|
render(value, setValue, tid, inModal, vertical) {
|
|
19831
19988
|
const { label, placeholderText, disabledDays, testFieldLabel, defaultValue } = this.props;
|
|
19832
|
-
return /* @__PURE__ */
|
|
19833
|
-
vertical && /* @__PURE__ */
|
|
19834
|
-
/* @__PURE__ */
|
|
19989
|
+
return /* @__PURE__ */ jsxs70(Fragment31, { children: [
|
|
19990
|
+
vertical && /* @__PURE__ */ jsx137(Label, { label }),
|
|
19991
|
+
/* @__PURE__ */ jsx137(
|
|
19835
19992
|
DateRangeField,
|
|
19836
19993
|
{
|
|
19837
19994
|
labelStyle: "inline",
|
|
@@ -19887,7 +20044,7 @@ function resolveNestedOptions(optionsOrLoad) {
|
|
|
19887
20044
|
}
|
|
19888
20045
|
|
|
19889
20046
|
// src/components/Filters/MultiFilter.tsx
|
|
19890
|
-
import { jsx as
|
|
20047
|
+
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
19891
20048
|
function multiFilter(props) {
|
|
19892
20049
|
return (key) => new MultiFilter(key, props);
|
|
19893
20050
|
}
|
|
@@ -19901,7 +20058,7 @@ var MultiFilter = class extends BaseFilter {
|
|
|
19901
20058
|
const { disabledOptions } = this.props;
|
|
19902
20059
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
19903
20060
|
const disabledKeys = Object.keys(disabledOptionsWithReasons);
|
|
19904
|
-
return /* @__PURE__ */
|
|
20061
|
+
return /* @__PURE__ */ jsx138(
|
|
19905
20062
|
ToggleChipGroup,
|
|
19906
20063
|
{
|
|
19907
20064
|
label: this.label,
|
|
@@ -19925,7 +20082,7 @@ var MultiFilter = class extends BaseFilter {
|
|
|
19925
20082
|
);
|
|
19926
20083
|
}
|
|
19927
20084
|
const { defaultValue, nothingSelectedText, ...props } = this.props;
|
|
19928
|
-
return /* @__PURE__ */
|
|
20085
|
+
return /* @__PURE__ */ jsx138(
|
|
19929
20086
|
MultiSelectField,
|
|
19930
20087
|
{
|
|
19931
20088
|
...props,
|
|
@@ -19944,7 +20101,7 @@ var MultiFilter = class extends BaseFilter {
|
|
|
19944
20101
|
};
|
|
19945
20102
|
|
|
19946
20103
|
// src/components/Filters/NumberRangeFilter.tsx
|
|
19947
|
-
import { Fragment as
|
|
20104
|
+
import { Fragment as Fragment32, jsx as jsx139, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
19948
20105
|
function numberRangeFilter(props) {
|
|
19949
20106
|
return (key) => new NumberRangeFilter(key, props);
|
|
19950
20107
|
}
|
|
@@ -19961,10 +20118,10 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
19961
20118
|
} = this.props;
|
|
19962
20119
|
const min = value?.min ?? void 0;
|
|
19963
20120
|
const max = value?.max ?? void 0;
|
|
19964
|
-
return /* @__PURE__ */
|
|
19965
|
-
vertical && /* @__PURE__ */
|
|
19966
|
-
/* @__PURE__ */
|
|
19967
|
-
/* @__PURE__ */
|
|
20121
|
+
return /* @__PURE__ */ jsxs71(Fragment32, { children: [
|
|
20122
|
+
vertical && /* @__PURE__ */ jsxs71("div", { ...tid, children: [
|
|
20123
|
+
/* @__PURE__ */ jsx139(Label, { label }),
|
|
20124
|
+
/* @__PURE__ */ jsx139("div", { className: "pb1", children: /* @__PURE__ */ jsx139(NumberField, { labelStyle: "inline", clearable: true, label: "Min", value: min, type: numberFieldType, numberFormatOptions, onChange: (minVal) => {
|
|
19968
20125
|
const maxValue = max ? {
|
|
19969
20126
|
max
|
|
19970
20127
|
} : {};
|
|
@@ -19973,7 +20130,7 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
19973
20130
|
...maxValue
|
|
19974
20131
|
} : void 0);
|
|
19975
20132
|
}, ...tid[`${defaultTestId(label)}_min_vertical`] }) }),
|
|
19976
|
-
/* @__PURE__ */
|
|
20133
|
+
/* @__PURE__ */ jsx139(NumberField, { labelStyle: "inline", clearable: true, label: "Max", value: max, type: numberFieldType, numberFormatOptions, onChange: (maxVal) => {
|
|
19977
20134
|
const minValue = min ? {
|
|
19978
20135
|
min
|
|
19979
20136
|
} : {};
|
|
@@ -19983,8 +20140,8 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
19983
20140
|
} : void 0);
|
|
19984
20141
|
}, ...tid[`${defaultTestId(label)}_max_vertical`] })
|
|
19985
20142
|
] }),
|
|
19986
|
-
!vertical && /* @__PURE__ */
|
|
19987
|
-
/* @__PURE__ */
|
|
20143
|
+
!vertical && /* @__PURE__ */ jsxs71(CompoundField, { ...tid, children: [
|
|
20144
|
+
/* @__PURE__ */ jsx139(
|
|
19988
20145
|
NumberField,
|
|
19989
20146
|
{
|
|
19990
20147
|
sizeToContent: !inModal,
|
|
@@ -20006,7 +20163,7 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
20006
20163
|
...tid[`${defaultTestId(label)}_min`]
|
|
20007
20164
|
}
|
|
20008
20165
|
),
|
|
20009
|
-
/* @__PURE__ */
|
|
20166
|
+
/* @__PURE__ */ jsx139(NumberField, { sizeToContent: !inModal, labelStyle: "inline", clearable: true, label: !inModal ? `${label} Max` : "Max", value: max, type: numberFieldType, numberFormatOptions, onChange: (maxVal) => {
|
|
20010
20167
|
const minValue = min ? {
|
|
20011
20168
|
min
|
|
20012
20169
|
} : {};
|
|
@@ -20021,7 +20178,7 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
20021
20178
|
};
|
|
20022
20179
|
|
|
20023
20180
|
// src/components/Filters/SingleFilter.tsx
|
|
20024
|
-
import { jsx as
|
|
20181
|
+
import { jsx as jsx140 } from "react/jsx-runtime";
|
|
20025
20182
|
function singleFilter(props) {
|
|
20026
20183
|
return (key) => new SingleFilter(key, props);
|
|
20027
20184
|
}
|
|
@@ -20042,7 +20199,7 @@ var SingleFilter = class extends BaseFilter {
|
|
|
20042
20199
|
...props
|
|
20043
20200
|
} = this.props;
|
|
20044
20201
|
const options = Array.isArray(maybeOptions) ? [allOption, ...maybeOptions] : { ...maybeOptions, current: maybeOptions.current };
|
|
20045
|
-
return /* @__PURE__ */
|
|
20202
|
+
return /* @__PURE__ */ jsx140(
|
|
20046
20203
|
SelectField,
|
|
20047
20204
|
{
|
|
20048
20205
|
...props,
|
|
@@ -20062,7 +20219,7 @@ var SingleFilter = class extends BaseFilter {
|
|
|
20062
20219
|
};
|
|
20063
20220
|
|
|
20064
20221
|
// src/components/Filters/TreeFilter.tsx
|
|
20065
|
-
import { jsx as
|
|
20222
|
+
import { jsx as jsx141 } from "react/jsx-runtime";
|
|
20066
20223
|
function treeFilter(props) {
|
|
20067
20224
|
return (key) => new TreeFilter(key, props);
|
|
20068
20225
|
}
|
|
@@ -20073,7 +20230,7 @@ var TreeFilter = class extends BaseFilter {
|
|
|
20073
20230
|
}
|
|
20074
20231
|
render(value, setValue, tid, inModal, vertical) {
|
|
20075
20232
|
const { defaultValue, nothingSelectedText, filterBy = "root", ...props } = this.props;
|
|
20076
|
-
return /* @__PURE__ */
|
|
20233
|
+
return /* @__PURE__ */ jsx141(
|
|
20077
20234
|
TreeSelectField,
|
|
20078
20235
|
{
|
|
20079
20236
|
...props,
|
|
@@ -20093,7 +20250,7 @@ var TreeFilter = class extends BaseFilter {
|
|
|
20093
20250
|
};
|
|
20094
20251
|
|
|
20095
20252
|
// src/components/Filters/BooleanFilter.tsx
|
|
20096
|
-
import { jsx as
|
|
20253
|
+
import { jsx as jsx142 } from "react/jsx-runtime";
|
|
20097
20254
|
function booleanFilter(props) {
|
|
20098
20255
|
return (key) => new BooleanFilter(key, props);
|
|
20099
20256
|
}
|
|
@@ -20105,7 +20262,7 @@ var BooleanFilter = class extends BaseFilter {
|
|
|
20105
20262
|
}
|
|
20106
20263
|
render(value, setValue, tid, inModal, vertical) {
|
|
20107
20264
|
const { options = defaultBooleanOptions, label, defaultValue, ...props } = this.props;
|
|
20108
|
-
return /* @__PURE__ */
|
|
20265
|
+
return /* @__PURE__ */ jsx142(
|
|
20109
20266
|
SelectField,
|
|
20110
20267
|
{
|
|
20111
20268
|
...props,
|
|
@@ -20132,7 +20289,7 @@ var defaultBooleanOptions = [
|
|
|
20132
20289
|
];
|
|
20133
20290
|
|
|
20134
20291
|
// src/components/Filters/CheckboxFilter.tsx
|
|
20135
|
-
import { jsx as
|
|
20292
|
+
import { jsx as jsx143 } from "react/jsx-runtime";
|
|
20136
20293
|
function checkboxFilter(props) {
|
|
20137
20294
|
return (key) => new CheckboxFilter(key, {
|
|
20138
20295
|
// If the user has set the offValue, that should be the default b/c we're only a two-state
|
|
@@ -20147,7 +20304,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
20147
20304
|
}
|
|
20148
20305
|
render(value, setValue, tid, inModal, vertical) {
|
|
20149
20306
|
const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
|
|
20150
|
-
return /* @__PURE__ */
|
|
20307
|
+
return /* @__PURE__ */ jsx143(
|
|
20151
20308
|
Checkbox,
|
|
20152
20309
|
{
|
|
20153
20310
|
...props,
|
|
@@ -20170,7 +20327,7 @@ import { useState as useState43 } from "react";
|
|
|
20170
20327
|
|
|
20171
20328
|
// src/components/Modal/OpenModal.tsx
|
|
20172
20329
|
import { useEffect as useEffect27 } from "react";
|
|
20173
|
-
import { jsx as
|
|
20330
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
20174
20331
|
function OpenModal(props) {
|
|
20175
20332
|
const { openModal } = useModal();
|
|
20176
20333
|
const { size, children, keepOpen } = props;
|
|
@@ -20180,15 +20337,15 @@ function OpenModal(props) {
|
|
|
20180
20337
|
}
|
|
20181
20338
|
}, [keepOpen, openModal, size, children]);
|
|
20182
20339
|
if (keepOpen) {
|
|
20183
|
-
return /* @__PURE__ */
|
|
20340
|
+
return /* @__PURE__ */ jsx144(Modal, { size, content: children });
|
|
20184
20341
|
} else {
|
|
20185
|
-
return /* @__PURE__ */
|
|
20342
|
+
return /* @__PURE__ */ jsx144("div", { children: "dummy content" });
|
|
20186
20343
|
}
|
|
20187
20344
|
}
|
|
20188
20345
|
|
|
20189
20346
|
// src/components/Filters/FilterModal.tsx
|
|
20190
|
-
import { trussProps as
|
|
20191
|
-
import { Fragment as
|
|
20347
|
+
import { trussProps as trussProps70 } from "@homebound/truss/runtime";
|
|
20348
|
+
import { Fragment as Fragment33, jsx as jsx145, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
20192
20349
|
function FilterModal(props) {
|
|
20193
20350
|
const {
|
|
20194
20351
|
filter,
|
|
@@ -20200,19 +20357,19 @@ function FilterModal(props) {
|
|
|
20200
20357
|
closeModal
|
|
20201
20358
|
} = useModal();
|
|
20202
20359
|
const [modalFilter, setModalFilter] = useState43(filter);
|
|
20203
|
-
return /* @__PURE__ */
|
|
20204
|
-
/* @__PURE__ */
|
|
20205
|
-
/* @__PURE__ */
|
|
20206
|
-
/* @__PURE__ */
|
|
20360
|
+
return /* @__PURE__ */ jsxs72(Fragment33, { children: [
|
|
20361
|
+
/* @__PURE__ */ jsx145(ModalHeader, { children: "More Filters" }),
|
|
20362
|
+
/* @__PURE__ */ jsx145(ModalBody, { children: /* @__PURE__ */ jsx145("div", { className: "df fdc", children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx145(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(modalFilter[key], (value) => setModalFilter(updateFilter(modalFilter, key, value)), testId, true, false) }, key)) }) }),
|
|
20363
|
+
/* @__PURE__ */ jsxs72(ModalFooter, { xss: {
|
|
20207
20364
|
justifyContent: "jcsb"
|
|
20208
20365
|
}, children: [
|
|
20209
|
-
/* @__PURE__ */
|
|
20366
|
+
/* @__PURE__ */ jsx145(Button, { label: "Clear", variant: "tertiary", disabled: safeKeys(filters).filter((fk) => modalFilter[fk] !== void 0).length === 0, onClick: () => (
|
|
20210
20367
|
// Only remove the filters keys that exist in the modal.
|
|
20211
20368
|
setModalFilter(safeKeys(filters).reduce((acc, fk) => omitKey(fk, acc), modalFilter))
|
|
20212
20369
|
), ...testId.modalClear }),
|
|
20213
|
-
/* @__PURE__ */
|
|
20214
|
-
/* @__PURE__ */
|
|
20215
|
-
/* @__PURE__ */
|
|
20370
|
+
/* @__PURE__ */ jsxs72("div", { className: "df gap1", children: [
|
|
20371
|
+
/* @__PURE__ */ jsx145(Button, { label: "Cancel", variant: "quaternary", onClick: closeModal, ...testId.modalClose }),
|
|
20372
|
+
/* @__PURE__ */ jsx145(Button, { label: "Apply", onClick: () => {
|
|
20216
20373
|
onApply(modalFilter);
|
|
20217
20374
|
closeModal();
|
|
20218
20375
|
}, ...testId.modalApply })
|
|
@@ -20224,7 +20381,7 @@ function ModalFilterItem({
|
|
|
20224
20381
|
label,
|
|
20225
20382
|
children
|
|
20226
20383
|
}) {
|
|
20227
|
-
return /* @__PURE__ */
|
|
20384
|
+
return /* @__PURE__ */ jsxs72("div", { ...trussProps70({
|
|
20228
20385
|
marginBottom: "mb4",
|
|
20229
20386
|
...!label ? {
|
|
20230
20387
|
borderTopStyle: "bts_solid",
|
|
@@ -20232,8 +20389,8 @@ function ModalFilterItem({
|
|
|
20232
20389
|
borderColor: "bcGray200"
|
|
20233
20390
|
} : {}
|
|
20234
20391
|
}), children: [
|
|
20235
|
-
label && /* @__PURE__ */
|
|
20236
|
-
/* @__PURE__ */
|
|
20392
|
+
label && /* @__PURE__ */ jsx145("h2", { className: "fw4 fz_16px lh_24px mb2", children: label }),
|
|
20393
|
+
/* @__PURE__ */ jsx145("div", { ...trussProps70({
|
|
20237
20394
|
...!label ? {
|
|
20238
20395
|
paddingTop: "pt3"
|
|
20239
20396
|
} : {}
|
|
@@ -20242,9 +20399,9 @@ function ModalFilterItem({
|
|
|
20242
20399
|
}
|
|
20243
20400
|
|
|
20244
20401
|
// src/components/Filters/Filters.tsx
|
|
20245
|
-
import { memo, useMemo as
|
|
20246
|
-
import { trussProps as
|
|
20247
|
-
import { jsx as
|
|
20402
|
+
import { memo, useMemo as useMemo37 } from "react";
|
|
20403
|
+
import { trussProps as trussProps71 } from "@homebound/truss/runtime";
|
|
20404
|
+
import { jsx as jsx146, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
20248
20405
|
function Filters(props) {
|
|
20249
20406
|
const {
|
|
20250
20407
|
filter,
|
|
@@ -20258,7 +20415,7 @@ function Filters(props) {
|
|
|
20258
20415
|
const {
|
|
20259
20416
|
openModal
|
|
20260
20417
|
} = useModal();
|
|
20261
|
-
const [pageFilters, modalFilters] =
|
|
20418
|
+
const [pageFilters, modalFilters] = useMemo37(() => {
|
|
20262
20419
|
const impls = safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]);
|
|
20263
20420
|
if (!vertical && impls.length > numberOfInlineFilters) {
|
|
20264
20421
|
return [Object.fromEntries(impls.slice(0, numberOfInlineFilters - 1)), Object.fromEntries(impls.slice(numberOfInlineFilters - 1))];
|
|
@@ -20266,8 +20423,8 @@ function Filters(props) {
|
|
|
20266
20423
|
return [Object.fromEntries(impls), {}];
|
|
20267
20424
|
}, [numberOfInlineFilters, vertical, filterDefs]);
|
|
20268
20425
|
const numModalFilters = safeKeys(modalFilters).filter((fk) => filter[fk] !== void 0).length;
|
|
20269
|
-
const maybeGroupByField = groupBy ? /* @__PURE__ */
|
|
20270
|
-
return /* @__PURE__ */
|
|
20426
|
+
const maybeGroupByField = groupBy ? /* @__PURE__ */ jsx146("div", { children: /* @__PURE__ */ jsx146(SelectField, { label: "Group by", labelStyle: !vertical ? "inline" : "above", sizeToContent: !vertical, options: groupBy.options, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name, value: groupBy.value, onSelect: (g) => g && groupBy.setValue(g) }) }) : null;
|
|
20427
|
+
return /* @__PURE__ */ jsxs73("div", { ...trussProps71({
|
|
20271
20428
|
...vertical ? {
|
|
20272
20429
|
display: "df",
|
|
20273
20430
|
flexDirection: "fdc",
|
|
@@ -20279,18 +20436,18 @@ function Filters(props) {
|
|
|
20279
20436
|
}
|
|
20280
20437
|
}), ...testId, children: [
|
|
20281
20438
|
maybeGroupByField,
|
|
20282
|
-
safeEntries(pageFilters).map(([key, f]) => /* @__PURE__ */
|
|
20283
|
-
Object.keys(modalFilters).length > 0 && /* @__PURE__ */
|
|
20439
|
+
safeEntries(pageFilters).map(([key, f]) => /* @__PURE__ */ jsx146("div", { children: f.render(filter[key], (value) => onChange(updateFilter(filter, key, value)), testId, false, vertical) }, key)),
|
|
20440
|
+
Object.keys(modalFilters).length > 0 && /* @__PURE__ */ jsx146(Button, { label: "More Filters", endAdornment: /* @__PURE__ */ jsx146(CountBadge, { count: numModalFilters, hideIfZero: true }), variant: "secondary", onClick: () => openModal({
|
|
20284
20441
|
// Spreading `props` to pass along `data-testid`
|
|
20285
|
-
content: /* @__PURE__ */
|
|
20442
|
+
content: /* @__PURE__ */ jsx146(FilterModal, { ...props, filter, onApply: onChange, filters: modalFilters })
|
|
20286
20443
|
}), ...testId.moreFiltersBtn }),
|
|
20287
|
-
Object.keys(filter).length > 0 && /* @__PURE__ */
|
|
20444
|
+
Object.keys(filter).length > 0 && /* @__PURE__ */ jsx146("div", { children: /* @__PURE__ */ jsx146(Button, { label: "Clear", variant: "tertiary", onClick: () => onChange({}), ...testId.clearBtn }) })
|
|
20288
20445
|
] });
|
|
20289
20446
|
}
|
|
20290
20447
|
var _Filters = memo(Filters);
|
|
20291
20448
|
|
|
20292
20449
|
// src/components/Filters/ToggleFilter.tsx
|
|
20293
|
-
import { jsx as
|
|
20450
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
20294
20451
|
function toggleFilter(props) {
|
|
20295
20452
|
return (key) => new ToggleFilter(key, {
|
|
20296
20453
|
// If the user has set the offValue, that should be the default b/c we're only a two-state
|
|
@@ -20305,7 +20462,7 @@ var ToggleFilter = class extends BaseFilter {
|
|
|
20305
20462
|
}
|
|
20306
20463
|
render(value, setValue, tid, inModal, vertical) {
|
|
20307
20464
|
const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
|
|
20308
|
-
return /* @__PURE__ */
|
|
20465
|
+
return /* @__PURE__ */ jsx147(
|
|
20309
20466
|
Switch,
|
|
20310
20467
|
{
|
|
20311
20468
|
...props,
|
|
@@ -20324,126 +20481,83 @@ var ToggleFilter = class extends BaseFilter {
|
|
|
20324
20481
|
}
|
|
20325
20482
|
};
|
|
20326
20483
|
|
|
20327
|
-
// src/components/
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
if (value === void 0) {
|
|
20333
|
-
return omitKey(key, currentFilter);
|
|
20334
|
-
} else {
|
|
20335
|
-
return { ...currentFilter, [key]: value };
|
|
20336
|
-
}
|
|
20484
|
+
// src/components/Layout/GridTableLayout/FilterPanel.tsx
|
|
20485
|
+
import { trussProps as trussProps72 } from "@homebound/truss/runtime";
|
|
20486
|
+
import { jsx as jsx148, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
20487
|
+
function FilterPanel(props) {
|
|
20488
|
+
return props.isOpen ? /* @__PURE__ */ jsx148(FilterPanelOpen, { ...props }) : /* @__PURE__ */ jsx148(FilterPanelClosed, { ...props });
|
|
20337
20489
|
}
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
const
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
if (searchProps) {
|
|
20368
|
-
searchProps.onSearch(debouncedSearch);
|
|
20369
|
-
setQueryParams({
|
|
20370
|
-
search: debouncedSearch || void 0
|
|
20371
|
-
}, "replaceIn");
|
|
20372
|
-
}
|
|
20373
|
-
}, [debouncedSearch, searchProps, setQueryParams]);
|
|
20374
|
-
const hasSearch = !!searchProps;
|
|
20375
|
-
const hasFilters = !!filterDefs && Object.keys(filterDefs ?? {}).length > 0;
|
|
20376
|
-
const activeFilterCount = useMemo37(() => filter ? getActiveFilterCount(filter) : 0, [filter]);
|
|
20377
|
-
const filterImpls = useMemo37(() => filterDefs ? buildFilterImpls(filterDefs) : {}, [filterDefs]);
|
|
20378
|
-
const renderFilters = () => {
|
|
20379
|
-
if (!filter || !onChange) return null;
|
|
20380
|
-
const entries = safeEntries(filterImpls);
|
|
20381
|
-
const nonCheckbox = entries.filter(([_, f]) => !f.hideLabelInModal);
|
|
20382
|
-
const checkbox = entries.filter(([_, f]) => f.hideLabelInModal);
|
|
20383
|
-
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */ jsx146("div", { children: f.render(filter[key], (value) => onChange(updateFilter(filter, key, value)), testId, false, false) }, key));
|
|
20384
|
-
};
|
|
20385
|
-
const searchTextField = /* @__PURE__ */ jsx146(TextField, { label: "Search", labelStyle: "hidden", value: searchValue, onChange: (v) => setSearchValue(v ?? ""), placeholder: "Search", clearable: true, startAdornment: /* @__PURE__ */ jsx146(Icon, { icon: "search", color: "rgba(100, 100, 100, 1)" /* Gray700 */ }) });
|
|
20386
|
-
return /* @__PURE__ */ jsxs73(Fragment33, { children: [
|
|
20387
|
-
hasSearch && /* @__PURE__ */ jsx146("div", { ...trussProps71({
|
|
20388
|
-
width: "w_244px",
|
|
20389
|
-
...sm ? {
|
|
20390
|
-
position: "absolute",
|
|
20391
|
-
overflow: "oh",
|
|
20392
|
-
clip: "cli_inset_50",
|
|
20393
|
-
clipPath: "clp_none",
|
|
20394
|
-
border: "bd_0",
|
|
20395
|
-
height: "h_1px",
|
|
20396
|
-
margin: "m_neg1px",
|
|
20397
|
-
width: "w_1px",
|
|
20398
|
-
padding: "p_0",
|
|
20399
|
-
whiteSpace: "wsnw",
|
|
20400
|
-
opacity: "o0"
|
|
20401
|
-
} : {}
|
|
20402
|
-
}), children: searchTextField }),
|
|
20403
|
-
sm && hasSearch && /* @__PURE__ */ jsx146(IconButton, { variant: "outline", icon: searchValue ? "searchBadged" : "search", label: "Search", onClick: () => setSearchIsOpen(!searchIsOpen), active: searchIsOpen, ...testId.searchButton }),
|
|
20404
|
-
sm && hasFilters && /* @__PURE__ */ jsx146(IconButton, { variant: "outline", icon: activeFilterCount > 0 ? "filterBadged" : "filter", label: "Filter", active: isOpen, onClick: () => setIsOpen(!isOpen), ...testId.button }),
|
|
20405
|
-
!sm && hasFilters && /* @__PURE__ */ jsx146(Button, { label: "Filter", icon: "filter", size: "md", endAdornment: /* @__PURE__ */ jsxs73("div", { className: "df aic gap1", children: [
|
|
20406
|
-
activeFilterCount > 0 && /* @__PURE__ */ jsx146(CountBadge, { count: activeFilterCount }),
|
|
20407
|
-
/* @__PURE__ */ jsx146(Icon, { icon: isOpen ? "chevronUp" : "chevronDown" })
|
|
20408
|
-
] }), variant: "secondaryBlack", onClick: () => setIsOpen(!isOpen), active: isOpen, ...testId.button }),
|
|
20409
|
-
searchIsOpen && /* @__PURE__ */ jsx146("div", { ...trussProps71({
|
|
20410
|
-
width: "w100",
|
|
20411
|
-
...!sm ? {
|
|
20412
|
-
position: "absolute",
|
|
20413
|
-
overflow: "oh",
|
|
20414
|
-
clip: "cli_inset_50",
|
|
20415
|
-
clipPath: "clp_none",
|
|
20416
|
-
border: "bd_0",
|
|
20417
|
-
height: "h_1px",
|
|
20418
|
-
margin: "m_neg1px",
|
|
20419
|
-
width: "w_1px",
|
|
20420
|
-
padding: "p_0",
|
|
20421
|
-
whiteSpace: "wsnw",
|
|
20422
|
-
opacity: "o0"
|
|
20490
|
+
function FilterPanelOpen({
|
|
20491
|
+
groupBy,
|
|
20492
|
+
filterImpls,
|
|
20493
|
+
filter,
|
|
20494
|
+
setFilter,
|
|
20495
|
+
onClear
|
|
20496
|
+
}) {
|
|
20497
|
+
const tid = useTestIds({}, filterTestIdPrefix);
|
|
20498
|
+
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
20499
|
+
const activeFilterCount = getActiveFilterCount(filter ?? {});
|
|
20500
|
+
const filterControls = filter && setFilter ? buildFilterControls(filterImpls, filter, setFilter, tid) : null;
|
|
20501
|
+
return /* @__PURE__ */ jsxs74("div", { ...trussProps72({
|
|
20502
|
+
...{
|
|
20503
|
+
display: "df",
|
|
20504
|
+
alignItems: "aic",
|
|
20505
|
+
gap: "gap1",
|
|
20506
|
+
scrollbarWidth: "sbwn"
|
|
20507
|
+
},
|
|
20508
|
+
...{
|
|
20509
|
+
overflowX: "sm_oxa",
|
|
20510
|
+
minWidth: "sm_mw0"
|
|
20511
|
+
},
|
|
20512
|
+
...{
|
|
20513
|
+
flexWrap: "mdandup_fww"
|
|
20514
|
+
},
|
|
20515
|
+
...{
|
|
20516
|
+
...inDocumentScrollLayout ? {
|
|
20517
|
+
paddingLeft: "pl3",
|
|
20518
|
+
paddingRight: "pr3"
|
|
20423
20519
|
} : {}
|
|
20424
|
-
}
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
] }),
|
|
20430
|
-
hasFilters && !isOpen && filter && onChange && /* @__PURE__ */ jsx146(FilterChips, { filter, filterImpls, onChange, onClear: () => onChange({}), testId })
|
|
20520
|
+
}
|
|
20521
|
+
}), children: [
|
|
20522
|
+
groupBy && /* @__PURE__ */ jsx148(SelectField, { label: "Group by", labelStyle: "inline", sizeToContent: true, options: groupBy.options, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name, value: groupBy.value, onSelect: (g) => g && groupBy.setValue(g) }),
|
|
20523
|
+
filterControls,
|
|
20524
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx148(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...tid.clearBtn })
|
|
20431
20525
|
] });
|
|
20432
20526
|
}
|
|
20433
|
-
function
|
|
20434
|
-
filter,
|
|
20527
|
+
function FilterPanelClosed({
|
|
20435
20528
|
filterImpls,
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20529
|
+
filter,
|
|
20530
|
+
setFilter,
|
|
20531
|
+
onClear
|
|
20439
20532
|
}) {
|
|
20440
|
-
const
|
|
20533
|
+
const tid = useTestIds({}, filterTestIdPrefix);
|
|
20534
|
+
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
20535
|
+
if (!filter || !setFilter) return null;
|
|
20536
|
+
const chips = safeEntries(filterImpls).flatMap(([key, f]) => chipsForFilterKey(key, f, filter, setFilter, tid));
|
|
20441
20537
|
if (chips.length === 0) return null;
|
|
20442
|
-
return /* @__PURE__ */
|
|
20538
|
+
return /* @__PURE__ */ jsxs74("div", { ...trussProps72({
|
|
20539
|
+
display: "df",
|
|
20540
|
+
gap: "gap1",
|
|
20541
|
+
alignItems: "aic",
|
|
20542
|
+
minWidth: "mw0",
|
|
20543
|
+
flexWrap: "fww",
|
|
20544
|
+
...inDocumentScrollLayout ? {
|
|
20545
|
+
paddingLeft: "pl3"
|
|
20546
|
+
} : {}
|
|
20547
|
+
}), children: [
|
|
20443
20548
|
chips,
|
|
20444
|
-
/* @__PURE__ */
|
|
20549
|
+
/* @__PURE__ */ jsx148(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...tid.clearBtn })
|
|
20445
20550
|
] });
|
|
20446
20551
|
}
|
|
20552
|
+
function buildFilterControls(filterImpls, filter, setFilter, testId) {
|
|
20553
|
+
const entries = safeEntries(filterImpls);
|
|
20554
|
+
const nonCheckbox = entries.filter(([_, f]) => !f.hideLabelInModal);
|
|
20555
|
+
const checkbox = entries.filter(([_, f]) => f.hideLabelInModal);
|
|
20556
|
+
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */ jsx148("div", { children: f.render(filter[key], (value) => setFilter(updateFilter(filter, key, value)), testId, false, false) }, key));
|
|
20557
|
+
}
|
|
20558
|
+
function buildFilterImpls(filterDefs) {
|
|
20559
|
+
return Object.fromEntries(safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]));
|
|
20560
|
+
}
|
|
20447
20561
|
function chipsForFilterKey(key, f, filter, onChange, testId) {
|
|
20448
20562
|
const value = filter[key];
|
|
20449
20563
|
if (!isDefined(value)) return [];
|
|
@@ -20453,143 +20567,90 @@ function chipsForFilterKey(key, f, filter, onChange, testId) {
|
|
|
20453
20567
|
if (!isDefined(label2)) return [];
|
|
20454
20568
|
const chipKey = `${String(key)}_${item}`;
|
|
20455
20569
|
const newArray = value.filter((v) => v !== item);
|
|
20456
|
-
return /* @__PURE__ */
|
|
20570
|
+
return /* @__PURE__ */ jsx148(ToggleChip, { text: label2, onClick: () => onChange(updateFilter(filter, key, newArray.length > 0 ? newArray : void 0)), ...testId[`chip_${chipKey}`] }, chipKey);
|
|
20457
20571
|
});
|
|
20458
20572
|
}
|
|
20459
20573
|
const label = f.formatSelectedFilterLabel(value);
|
|
20460
20574
|
if (!isDefined(label)) return [];
|
|
20461
|
-
return /* @__PURE__ */
|
|
20462
|
-
}
|
|
20463
|
-
function buildFilterImpls(filterDefs) {
|
|
20464
|
-
return Object.fromEntries(safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]));
|
|
20575
|
+
return /* @__PURE__ */ jsx148(ToggleChip, { text: label, onClick: () => onChange(updateFilter(filter, key, void 0)), ...testId[`chip_${String(key)}`] }, String(key));
|
|
20465
20576
|
}
|
|
20466
|
-
var _FilterDropdownMenu = memo2(FilterDropdownMenu);
|
|
20467
20577
|
|
|
20468
|
-
// src/components/
|
|
20469
|
-
import {
|
|
20470
|
-
import {
|
|
20471
|
-
|
|
20472
|
-
import { trussProps as trussProps72 } from "@homebound/truss/runtime";
|
|
20473
|
-
import { jsx as jsx147, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
20474
|
-
function EditColumnsButton(props) {
|
|
20578
|
+
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
20579
|
+
import { trussProps as trussProps73 } from "@homebound/truss/runtime";
|
|
20580
|
+
import { jsx as jsx149, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
20581
|
+
function GridTableLayoutActionsComponent(props) {
|
|
20475
20582
|
const {
|
|
20476
|
-
|
|
20477
|
-
|
|
20583
|
+
filter,
|
|
20584
|
+
setFilter,
|
|
20585
|
+
filterDefs,
|
|
20586
|
+
groupBy,
|
|
20587
|
+
searchProps,
|
|
20588
|
+
hasHideableColumns,
|
|
20478
20589
|
columns,
|
|
20479
|
-
api
|
|
20590
|
+
api,
|
|
20591
|
+
withCardView,
|
|
20592
|
+
view,
|
|
20593
|
+
setView
|
|
20480
20594
|
} = props;
|
|
20481
|
-
const
|
|
20482
|
-
isOpen: defaultOpen
|
|
20483
|
-
});
|
|
20484
|
-
const buttonRef = useRef47(null);
|
|
20485
|
-
const {
|
|
20486
|
-
menuTriggerProps
|
|
20487
|
-
} = useMenuTrigger3({
|
|
20488
|
-
isDisabled: !!disabled
|
|
20489
|
-
}, state, buttonRef);
|
|
20490
|
-
const tid = useTestIds(props, "columns");
|
|
20595
|
+
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
20491
20596
|
const {
|
|
20492
20597
|
sm
|
|
20493
20598
|
} = useBreakpoint();
|
|
20494
|
-
const
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
return /* @__PURE__ */ jsx147(OverlayTrigger, { ...props, trigger: {
|
|
20510
|
-
icon: "columns",
|
|
20511
|
-
size: "md",
|
|
20512
|
-
label: "",
|
|
20513
|
-
variant: "secondaryBlack"
|
|
20514
|
-
}, menuTriggerProps, state, buttonRef, hideEndAdornment: sm, ...tid, children: /* @__PURE__ */ jsxs74("div", { ...trussProps72({
|
|
20515
|
-
display: "df",
|
|
20516
|
-
flexDirection: "fdc",
|
|
20517
|
-
backgroundColor: ["bgColor_var", {
|
|
20518
|
-
"--backgroundColor": "var(--b-surface)"
|
|
20519
|
-
}],
|
|
20520
|
-
maxWidth: "maxw_326px",
|
|
20521
|
-
maxHeight: "maxh_512px",
|
|
20522
|
-
boxShadow: "h_bshHover"
|
|
20523
|
-
}), children: [
|
|
20524
|
-
/* @__PURE__ */ jsx147("div", { className: "dg gtc_1fr_auto gap2 pt2 pb2 pr2 pl2 fg1 mh0 oya", children: options.map((option) => /* @__PURE__ */ jsxs74(Fragment34, { children: [
|
|
20525
|
-
/* @__PURE__ */ jsx147("div", { className: "fw4 fz_14px lh_20px wsnw oh to_ellipsis pr1", children: option.label }),
|
|
20526
|
-
/* @__PURE__ */ jsx147(Switch, { compact: true, selected: selectedValues.includes(option.value), onChange: (value) => setSelectedValues(value ? [...selectedValues, option.value] : selectedValues.filter((v) => v !== option.value)), labelStyle: "hidden", label: option.label, ...tid[`option${option.value}`] })
|
|
20527
|
-
] }, option.value)) }),
|
|
20528
|
-
/* @__PURE__ */ jsx147("div", { ...trussProps72({
|
|
20529
|
-
display: "df",
|
|
20530
|
-
justifyContent: "jcc",
|
|
20531
|
-
paddingTop: "pt2",
|
|
20532
|
-
paddingBottom: "pb2",
|
|
20533
|
-
paddingRight: "pr2",
|
|
20534
|
-
paddingLeft: "pl2",
|
|
20535
|
-
borderTopStyle: "bts_solid",
|
|
20536
|
-
borderTopWidth: "btw_1px",
|
|
20537
|
-
borderColor: ["bc_var", {
|
|
20538
|
-
"--borderColor": "var(--b-surface-separator)"
|
|
20539
|
-
}]
|
|
20540
|
-
}), children: /* @__PURE__ */ jsx147(Button, { variant: "tertiary", label: "Reset Column Widths", onClick: () => api.resetColumnWidths() }) })
|
|
20541
|
-
] }) });
|
|
20542
|
-
}
|
|
20543
|
-
|
|
20544
|
-
// src/components/Table/components/ViewToggleButton.tsx
|
|
20545
|
-
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
20546
|
-
function ViewToggleButton({ view, onChange, defaultOpen }) {
|
|
20547
|
-
const { sm } = useBreakpoint();
|
|
20548
|
-
const tid = useTestIds({}, "viewToggleButton");
|
|
20549
|
-
const menuItems = [
|
|
20550
|
-
{ label: "List", icon: "projects", onClick: () => onChange("list") },
|
|
20551
|
-
{ label: "Card", icon: "tile", onClick: () => onChange("card") }
|
|
20552
|
-
];
|
|
20553
|
-
return /* @__PURE__ */ jsx148(
|
|
20554
|
-
ButtonMenu,
|
|
20555
|
-
{
|
|
20556
|
-
trigger: { icon: view === "list" ? "projects" : "tile", label: "", size: "md", variant: "secondaryBlack" },
|
|
20557
|
-
items: menuItems,
|
|
20558
|
-
hideEndAdornment: sm,
|
|
20559
|
-
defaultOpen,
|
|
20560
|
-
...tid
|
|
20599
|
+
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
20600
|
+
const [showSearch, setShowSearch] = useState44(false);
|
|
20601
|
+
const [showFilters, setShowFilters] = useState44(false);
|
|
20602
|
+
const [{
|
|
20603
|
+
search: initialValue
|
|
20604
|
+
}, setQueryParams] = useQueryParams3({
|
|
20605
|
+
search: StringParam2
|
|
20606
|
+
});
|
|
20607
|
+
const [searchValue, setSearchValue] = useState44(initialValue || "");
|
|
20608
|
+
const handleSearchDebounced = useDebouncedCallback6((value) => {
|
|
20609
|
+
if (searchProps) {
|
|
20610
|
+
searchProps.onSearch(value);
|
|
20611
|
+
setQueryParams({
|
|
20612
|
+
search: value || void 0
|
|
20613
|
+
}, "replaceIn");
|
|
20561
20614
|
}
|
|
20562
|
-
);
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
} = props;
|
|
20574
|
-
return /* @__PURE__ */ jsxs75("div", { ...trussProps73({
|
|
20575
|
-
...{
|
|
20615
|
+
}, 300);
|
|
20616
|
+
const hasSearch = !!searchProps;
|
|
20617
|
+
const hasFilters = !!filterDefs && Object.keys(filterDefs ?? {}).length > 0;
|
|
20618
|
+
const activeFilterCount = useMemo38(() => filter ? getActiveFilterCount(filter) : 0, [filter]);
|
|
20619
|
+
const filterImpls = useMemo38(() => filterDefs ? buildFilterImpls(filterDefs) : {}, [filterDefs]);
|
|
20620
|
+
const searchTextField = /* @__PURE__ */ jsx149(TextField, { label: "Search", labelStyle: "hidden", value: searchValue, onChange: (v) => {
|
|
20621
|
+
setSearchValue(v ?? "");
|
|
20622
|
+
handleSearchDebounced(v ?? "");
|
|
20623
|
+
}, placeholder: "Search", clearable: true, fullWidth: true, startAdornment: /* @__PURE__ */ jsx149(Icon, { icon: "search", color: "rgba(100, 100, 100, 1)" /* Gray700 */ }) });
|
|
20624
|
+
return /* @__PURE__ */ jsxs75("div", { className: "df fdc gap1 pb2", children: [
|
|
20625
|
+
/* @__PURE__ */ jsxs75("div", { ...trussProps73({
|
|
20576
20626
|
display: "df",
|
|
20577
20627
|
gap: "gap1",
|
|
20578
|
-
alignItems: "aifs",
|
|
20579
20628
|
justifyContent: "jcsb",
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20629
|
+
paddingTop: "pt3",
|
|
20630
|
+
...inDocumentScrollLayout ? {
|
|
20631
|
+
paddingLeft: "pl3",
|
|
20632
|
+
paddingRight: "pr3"
|
|
20633
|
+
} : {}
|
|
20634
|
+
}), children: [
|
|
20635
|
+
/* @__PURE__ */ jsxs75("div", { className: "df gap1 aic", children: [
|
|
20636
|
+
!sm && hasSearch && /* @__PURE__ */ jsx149("div", { className: "w_244px", children: searchTextField }),
|
|
20637
|
+
sm && hasSearch && /* @__PURE__ */ jsx149(IconButton, { variant: "outline", icon: searchValue ? "searchBadged" : "search", label: "Search", onClick: () => setShowSearch(!showSearch), active: showSearch, ...testId.searchButton }),
|
|
20638
|
+
sm && hasFilters && /* @__PURE__ */ jsx149(IconButton, { variant: "outline", icon: activeFilterCount > 0 ? "filterBadged" : "filter", label: "Filter", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterSmallButton }),
|
|
20639
|
+
!sm && hasFilters && /* @__PURE__ */ jsx149(Button, { label: "Filter", icon: "filter", size: "md", endAdornment: /* @__PURE__ */ jsxs75("div", { className: "df aic gap1", children: [
|
|
20640
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx149(CountBadge, { count: activeFilterCount }),
|
|
20641
|
+
/* @__PURE__ */ jsx149(Icon, { icon: showFilters ? "chevronUp" : "chevronDown" })
|
|
20642
|
+
] }), variant: "secondaryBlack", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterButton })
|
|
20643
|
+
] }),
|
|
20644
|
+
(hasHideableColumns || withCardView) && /* @__PURE__ */ jsxs75("div", { className: "df gap1", children: [
|
|
20645
|
+
hasHideableColumns && view === "list" && columns && api && /* @__PURE__ */ jsx149(EditColumnsButton, { columns, api, tooltip: "Display columns" }),
|
|
20646
|
+
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx149(ViewToggleButton, { view, onChange: setView })
|
|
20647
|
+
] })
|
|
20648
|
+
] }),
|
|
20649
|
+
sm && showSearch && /* @__PURE__ */ jsx149("div", { className: "pl3 pr3", children: searchTextField }),
|
|
20650
|
+
hasFilters && /* @__PURE__ */ jsx149(FilterPanel, { isOpen: showFilters, groupBy, filterImpls, filter, setFilter, onClear: () => setFilter?.({}) })
|
|
20586
20651
|
] });
|
|
20587
20652
|
}
|
|
20588
|
-
|
|
20589
|
-
// src/components/Layout/layoutTypes.ts
|
|
20590
|
-
function isGridTableProps(props) {
|
|
20591
|
-
return "rows" in props;
|
|
20592
|
-
}
|
|
20653
|
+
var _GridTableLayoutActions = memo2(GridTableLayoutActionsComponent);
|
|
20593
20654
|
|
|
20594
20655
|
// src/components/Layout/GridTableLayout/QueryTable.tsx
|
|
20595
20656
|
import { useMemo as useMemo39 } from "react";
|
|
@@ -20640,7 +20701,7 @@ var sizeToPixels2 = {
|
|
|
20640
20701
|
};
|
|
20641
20702
|
|
|
20642
20703
|
// src/components/Layout/GridTableLayout/QueryTable.tsx
|
|
20643
|
-
import { Fragment as
|
|
20704
|
+
import { Fragment as Fragment34, jsx as jsx151, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
20644
20705
|
function QueryTable(props) {
|
|
20645
20706
|
const {
|
|
20646
20707
|
emptyFallback,
|
|
@@ -20664,7 +20725,7 @@ function QueryTable(props) {
|
|
|
20664
20725
|
}
|
|
20665
20726
|
function LoadingTable(props) {
|
|
20666
20727
|
const { columns } = props;
|
|
20667
|
-
return /* @__PURE__ */ jsxs76(
|
|
20728
|
+
return /* @__PURE__ */ jsxs76(Fragment34, { children: [
|
|
20668
20729
|
/* @__PURE__ */ jsx151(LoadingSkeleton, { rows: 1, columns: 1 }),
|
|
20669
20730
|
/* @__PURE__ */ jsx151(LoadingSkeleton, { rows: 5, columns: columns ?? 5 })
|
|
20670
20731
|
] });
|
|
@@ -20705,7 +20766,7 @@ function parseStoredTableView(raw) {
|
|
|
20705
20766
|
|
|
20706
20767
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
20707
20768
|
import { trussProps as trussProps75, maybeCssVar as maybeCssVar43 } from "@homebound/truss/runtime";
|
|
20708
|
-
import { Fragment as
|
|
20769
|
+
import { Fragment as Fragment35, jsx as jsx152, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
20709
20770
|
var __maybeInc15 = (inc) => {
|
|
20710
20771
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
20711
20772
|
};
|
|
@@ -20741,7 +20802,7 @@ function GridTableLayoutComponent(props) {
|
|
|
20741
20802
|
const tableWrapperRef = useRef48(null);
|
|
20742
20803
|
useSetTableActionsHeight(tableWrapperRef, tableActionsRef, inDocumentScrollLayout && showTableActions);
|
|
20743
20804
|
const visibleColumnIds = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
20744
|
-
|
|
20805
|
+
useEffect28(() => {
|
|
20745
20806
|
if (layoutState?.setVisibleColumnIds) {
|
|
20746
20807
|
layoutState.setVisibleColumnIds(visibleColumnIds);
|
|
20747
20808
|
}
|
|
@@ -20751,18 +20812,9 @@ function GridTableLayoutComponent(props) {
|
|
|
20751
20812
|
onSearch: layoutState.setSearchString
|
|
20752
20813
|
} : void 0, [layoutState?.search, layoutState?.setSearchString]);
|
|
20753
20814
|
const emptyState = useMemo40(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback), [layoutEmptyFallback, layoutState, tableProps]);
|
|
20754
|
-
const tableActionsEl = /* @__PURE__ */ jsx152(
|
|
20755
|
-
hasHideableColumns && view === "list" && /* @__PURE__ */ jsx152(EditColumnsButton, { columns, api, tooltip: "Display columns", ...tid.editColumnsButton }),
|
|
20756
|
-
withCardView && /* @__PURE__ */ jsx152(ViewToggleButton, { view, onChange: setView })
|
|
20757
|
-
] }), xss: {
|
|
20758
|
-
paddingTop: "pt3",
|
|
20759
|
-
...inDocumentScrollLayout ? {
|
|
20760
|
-
paddingLeft: "pl3",
|
|
20761
|
-
paddingRight: "pr3"
|
|
20762
|
-
} : {}
|
|
20763
|
-
}, children: layoutState && (layoutState.filterDefs || layoutState.search) && /* @__PURE__ */ jsx152(_FilterDropdownMenu, { filterDefs: layoutState.filterDefs, filter: layoutState.filter, onChange: layoutState.setFilter, groupBy: layoutState.groupBy, searchProps: filterSearchProps }) });
|
|
20815
|
+
const tableActionsEl = /* @__PURE__ */ jsx152(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView });
|
|
20764
20816
|
const cardAs = withCardView && view === "card" ? "card" : void 0;
|
|
20765
|
-
const tableBody = /* @__PURE__ */ jsx152(
|
|
20817
|
+
const tableBody = /* @__PURE__ */ jsx152(Fragment35, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx152(GridTable, { ...tableProps, ...cardAs ? {
|
|
20766
20818
|
as: cardAs
|
|
20767
20819
|
} : {}, api, emptyState, filter: clientSearch, style: {
|
|
20768
20820
|
allWhite: true,
|
|
@@ -20773,7 +20825,7 @@ function GridTableLayoutComponent(props) {
|
|
|
20773
20825
|
allWhite: true,
|
|
20774
20826
|
roundedHeader: !inDocumentScrollLayout
|
|
20775
20827
|
}, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
|
|
20776
|
-
const tableScrollContent = /* @__PURE__ */ jsxs77(
|
|
20828
|
+
const tableScrollContent = /* @__PURE__ */ jsxs77(Fragment35, { children: [
|
|
20777
20829
|
showTableActions && /* @__PURE__ */ jsx152("div", { ref: tableActionsRef, ...trussProps75({
|
|
20778
20830
|
...inDocumentScrollLayout ? {
|
|
20779
20831
|
transition: "transitionTop",
|
|
@@ -20797,7 +20849,7 @@ function GridTableLayoutComponent(props) {
|
|
|
20797
20849
|
}), ...tid.stickyContent, children: tableActionsEl }),
|
|
20798
20850
|
inDocumentScrollLayout ? tableBody : /* @__PURE__ */ jsx152(ScrollableContent, { virtualized: isVirtualized, children: tableBody })
|
|
20799
20851
|
] });
|
|
20800
|
-
return /* @__PURE__ */ jsxs77(
|
|
20852
|
+
return /* @__PURE__ */ jsxs77(Fragment35, { children: [
|
|
20801
20853
|
pageTitle && /* @__PURE__ */ jsx152(Header2, { pageTitle, breadCrumb, primaryAction, secondaryAction, tertiaryAction, actionMenu }),
|
|
20802
20854
|
/* @__PURE__ */ jsx152("div", { ref: tableWrapperRef, className: "display_contents", ...tid.tableWrapper, children: tableScrollContent })
|
|
20803
20855
|
] });
|
|
@@ -20976,9 +21028,9 @@ function useRightPaneContext() {
|
|
|
20976
21028
|
|
|
20977
21029
|
// src/components/Layout/RightPaneLayout/RightPaneLayout.tsx
|
|
20978
21030
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
20979
|
-
import { useEffect as
|
|
21031
|
+
import { useEffect as useEffect29 } from "react";
|
|
20980
21032
|
import { trussProps as trussProps76, maybeCssVar as maybeCssVar44 } from "@homebound/truss/runtime";
|
|
20981
|
-
import { Fragment as
|
|
21033
|
+
import { Fragment as Fragment36, jsx as jsx155, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
20982
21034
|
var __maybeInc16 = (inc) => {
|
|
20983
21035
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
20984
21036
|
};
|
|
@@ -20995,8 +21047,8 @@ function RightPaneLayout(props) {
|
|
|
20995
21047
|
clearPane,
|
|
20996
21048
|
closePane
|
|
20997
21049
|
} = useRightPaneContext();
|
|
20998
|
-
|
|
20999
|
-
return /* @__PURE__ */ jsx155("div", { className: "h100 df oxh", children: /* @__PURE__ */ jsxs78(
|
|
21050
|
+
useEffect29(() => closePane, [closePane]);
|
|
21051
|
+
return /* @__PURE__ */ jsx155("div", { className: "h100 df oxh", children: /* @__PURE__ */ jsxs78(Fragment36, { children: [
|
|
21000
21052
|
/* @__PURE__ */ jsx155("div", { ...trussProps76({
|
|
21001
21053
|
...{
|
|
21002
21054
|
width: ["w_var", {
|
|
@@ -21095,19 +21147,19 @@ function useRightPane() {
|
|
|
21095
21147
|
|
|
21096
21148
|
// src/components/Layout/ScrollableFooter.tsx
|
|
21097
21149
|
import { createPortal as createPortal5 } from "react-dom";
|
|
21098
|
-
import { Fragment as
|
|
21150
|
+
import { Fragment as Fragment37, jsx as jsx156 } from "react/jsx-runtime";
|
|
21099
21151
|
function ScrollableFooter(props) {
|
|
21100
21152
|
const { children } = props;
|
|
21101
21153
|
const { footerEl } = useScrollableParent();
|
|
21102
21154
|
if (!footerEl) {
|
|
21103
|
-
return /* @__PURE__ */ jsx156(
|
|
21155
|
+
return /* @__PURE__ */ jsx156(Fragment37, { children });
|
|
21104
21156
|
}
|
|
21105
|
-
return createPortal5(/* @__PURE__ */ jsx156(
|
|
21157
|
+
return createPortal5(/* @__PURE__ */ jsx156(Fragment37, { children }), footerEl);
|
|
21106
21158
|
}
|
|
21107
21159
|
|
|
21108
21160
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
21109
21161
|
import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
|
|
21110
|
-
import { useEffect as
|
|
21162
|
+
import { useEffect as useEffect30, useState as useState48 } from "react";
|
|
21111
21163
|
|
|
21112
21164
|
// src/components/Layout/TableReviewLayout/SidePanel.tsx
|
|
21113
21165
|
import { jsx as jsx157, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
@@ -21148,7 +21200,7 @@ function TableReviewLayout(props) {
|
|
|
21148
21200
|
} = props;
|
|
21149
21201
|
const tid = useTestIds(props, "tableReviewLayout");
|
|
21150
21202
|
const [isPanelVisible, setIsPanelVisible] = useState48(!!panelContent);
|
|
21151
|
-
|
|
21203
|
+
useEffect30(() => {
|
|
21152
21204
|
setIsPanelVisible(!!panelContent);
|
|
21153
21205
|
}, [panelContent]);
|
|
21154
21206
|
function handleClosePanel() {
|
|
@@ -22348,7 +22400,7 @@ function useResponsiveGrid(props) {
|
|
|
22348
22400
|
}
|
|
22349
22401
|
|
|
22350
22402
|
// src/components/Grid/useResponsiveGridItem.ts
|
|
22351
|
-
import { useContext as useContext23, useEffect as
|
|
22403
|
+
import { useContext as useContext23, useEffect as useEffect31, useMemo as useMemo47 } from "react";
|
|
22352
22404
|
var injectedResponsiveGridClasses = /* @__PURE__ */ new Set();
|
|
22353
22405
|
var responsiveGridStyleEl;
|
|
22354
22406
|
function useResponsiveGridItem(props) {
|
|
@@ -22378,7 +22430,7 @@ function useResponsiveGridItem(props) {
|
|
|
22378
22430
|
};
|
|
22379
22431
|
}
|
|
22380
22432
|
function useResponsiveGridItemStyle(className, cssText) {
|
|
22381
|
-
|
|
22433
|
+
useEffect31(
|
|
22382
22434
|
function() {
|
|
22383
22435
|
if (!className || !cssText || typeof document === "undefined") return;
|
|
22384
22436
|
if (!responsiveGridStyleEl) {
|
|
@@ -22487,7 +22539,7 @@ function HomeboundLogo(props) {
|
|
|
22487
22539
|
|
|
22488
22540
|
// src/components/MaxLines.tsx
|
|
22489
22541
|
import { useLayoutEffect as useLayoutEffect7, useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
|
|
22490
|
-
import { useCallback as useCallback30, useEffect as
|
|
22542
|
+
import { useCallback as useCallback30, useEffect as useEffect32, useRef as useRef54, useState as useState50 } from "react";
|
|
22491
22543
|
import { trussProps as trussProps87, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
|
|
22492
22544
|
import { jsx as jsx172, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
22493
22545
|
function MaxLines({
|
|
@@ -22501,7 +22553,7 @@ function MaxLines({
|
|
|
22501
22553
|
if (!elRef.current) return;
|
|
22502
22554
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
22503
22555
|
}, []);
|
|
22504
|
-
|
|
22556
|
+
useEffect32(() => {
|
|
22505
22557
|
setExpanded(false);
|
|
22506
22558
|
}, [children]);
|
|
22507
22559
|
const onResize = useCallback30(() => {
|
|
@@ -22534,7 +22586,7 @@ import { camelCase as camelCase6 } from "change-case";
|
|
|
22534
22586
|
// src/components/AppNav/AppNavGroup.tsx
|
|
22535
22587
|
import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
|
|
22536
22588
|
import { camelCase as camelCase5, kebabCase } from "change-case";
|
|
22537
|
-
import { useCallback as useCallback32, useEffect as
|
|
22589
|
+
import { useCallback as useCallback32, useEffect as useEffect33, useMemo as useMemo50, useState as useState52 } from "react";
|
|
22538
22590
|
|
|
22539
22591
|
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
22540
22592
|
import { useMemo as useMemo49, useRef as useRef55 } from "react";
|
|
@@ -22737,7 +22789,7 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
22737
22789
|
|
|
22738
22790
|
// src/components/AppNav/AppNavGroup.tsx
|
|
22739
22791
|
import { trussProps as trussProps89, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
|
|
22740
|
-
import { Fragment as
|
|
22792
|
+
import { Fragment as Fragment38, jsx as jsx174, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
22741
22793
|
var __maybeInc19 = (inc) => {
|
|
22742
22794
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
22743
22795
|
};
|
|
@@ -22748,7 +22800,7 @@ function AppNavGroupView(props) {
|
|
|
22748
22800
|
} = props;
|
|
22749
22801
|
const tid = useTestIds(props, "linkGroup");
|
|
22750
22802
|
if (panelCollapsed) {
|
|
22751
|
-
return /* @__PURE__ */ jsx174(
|
|
22803
|
+
return /* @__PURE__ */ jsx174(Fragment38, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ jsx174(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${camelCase5(link.label)}`] }, link.label)) });
|
|
22752
22804
|
}
|
|
22753
22805
|
return /* @__PURE__ */ jsx174(AppNavGroupDisclosure, { ...props });
|
|
22754
22806
|
}
|
|
@@ -22767,7 +22819,7 @@ function AppNavGroupDisclosure(props) {
|
|
|
22767
22819
|
current: contentEl
|
|
22768
22820
|
}), [contentEl]);
|
|
22769
22821
|
const [contentHeight, setContentHeight] = useState52(expanded ? "auto" : "0");
|
|
22770
|
-
|
|
22822
|
+
useEffect33(() => {
|
|
22771
22823
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
22772
22824
|
}, [expanded, contentEl]);
|
|
22773
22825
|
const onResize = useCallback32(() => {
|
|
@@ -22864,11 +22916,11 @@ function AppNavSectionView(props) {
|
|
|
22864
22916
|
}
|
|
22865
22917
|
|
|
22866
22918
|
// src/components/AppNav/AppNavItems.tsx
|
|
22867
|
-
import { Fragment as
|
|
22919
|
+
import { Fragment as Fragment39, jsx as jsx177 } from "react/jsx-runtime";
|
|
22868
22920
|
function AppNavItems(props) {
|
|
22869
22921
|
const { items, variant = "side", panelCollapsed = false } = props;
|
|
22870
22922
|
const tid = useTestIds(props, "appNav");
|
|
22871
|
-
return /* @__PURE__ */ jsx177(
|
|
22923
|
+
return /* @__PURE__ */ jsx177(Fragment39, { children: items.map((item, idx) => {
|
|
22872
22924
|
if (isAppNavLink(item)) {
|
|
22873
22925
|
return /* @__PURE__ */ jsx177(
|
|
22874
22926
|
NavLink,
|
|
@@ -22911,7 +22963,7 @@ function AppNavItems(props) {
|
|
|
22911
22963
|
|
|
22912
22964
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
22913
22965
|
import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
|
|
22914
|
-
import { useEffect as
|
|
22966
|
+
import { useEffect as useEffect34, useState as useState53 } from "react";
|
|
22915
22967
|
import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll2 } from "react-aria";
|
|
22916
22968
|
import { createPortal as createPortal6 } from "react-dom";
|
|
22917
22969
|
import { useLocation } from "react-router-dom";
|
|
@@ -22929,7 +22981,7 @@ function useEnvironmentBannerLayoutHeight() {
|
|
|
22929
22981
|
|
|
22930
22982
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
22931
22983
|
import { mergeProps as mergeProps28, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
|
|
22932
|
-
import { Fragment as
|
|
22984
|
+
import { Fragment as Fragment40, jsx as jsx179, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
22933
22985
|
function NavbarMobileMenu(props) {
|
|
22934
22986
|
const {
|
|
22935
22987
|
items
|
|
@@ -22943,11 +22995,11 @@ function NavbarMobileMenu(props) {
|
|
|
22943
22995
|
usePreventScroll2({
|
|
22944
22996
|
isDisabled: !isOpen
|
|
22945
22997
|
});
|
|
22946
|
-
|
|
22998
|
+
useEffect34(() => {
|
|
22947
22999
|
setIsOpen(false);
|
|
22948
23000
|
}, [pathname, search]);
|
|
22949
23001
|
const close = () => setIsOpen(false);
|
|
22950
|
-
return /* @__PURE__ */ jsxs91(
|
|
23002
|
+
return /* @__PURE__ */ jsxs91(Fragment40, { children: [
|
|
22951
23003
|
/* @__PURE__ */ jsx179(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => setIsOpen((open) => !open), ...tid.mobileMenu }),
|
|
22952
23004
|
createPortal6(/* @__PURE__ */ jsx179(ContrastScope, { children: /* @__PURE__ */ jsx179(AnimatePresence5, { children: isOpen && /* @__PURE__ */ jsx179(NavbarMobileDrawer, { items, onClose: close, tid }) }) }), document.body)
|
|
22953
23005
|
] });
|
|
@@ -22961,7 +23013,7 @@ function NavbarMobileDrawer({
|
|
|
22961
23013
|
const overlayTopStyle = {
|
|
22962
23014
|
top: bannerHeightPx
|
|
22963
23015
|
};
|
|
22964
|
-
return /* @__PURE__ */ jsxs91(
|
|
23016
|
+
return /* @__PURE__ */ jsxs91(Fragment40, { children: [
|
|
22965
23017
|
/* @__PURE__ */ jsx179(motion5.div, { ...mergeProps28(void 0, overlayTopStyle, {
|
|
22966
23018
|
position: "fixed",
|
|
22967
23019
|
right: "right0",
|
|
@@ -23105,17 +23157,17 @@ function NavbarUserMenu({
|
|
|
23105
23157
|
|
|
23106
23158
|
// src/components/Tabs.tsx
|
|
23107
23159
|
import { camelCase as camelCase7 } from "change-case";
|
|
23108
|
-
import { useEffect as
|
|
23160
|
+
import { useEffect as useEffect35, useMemo as useMemo51, useRef as useRef56, useState as useState54 } from "react";
|
|
23109
23161
|
import { mergeProps as mergeProps29, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
23110
23162
|
import { matchPath } from "react-router";
|
|
23111
23163
|
import { Link as Link6, useLocation as useLocation2 } from "react-router-dom";
|
|
23112
23164
|
import { trussProps as trussProps92, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
|
|
23113
|
-
import { Fragment as
|
|
23165
|
+
import { Fragment as Fragment41, jsx as jsx181, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
23114
23166
|
function TabsWithContent(props) {
|
|
23115
23167
|
const styles = hideTabs(props) ? {} : {
|
|
23116
23168
|
paddingTop: "pt3"
|
|
23117
23169
|
};
|
|
23118
|
-
return /* @__PURE__ */ jsxs93(
|
|
23170
|
+
return /* @__PURE__ */ jsxs93(Fragment41, { children: [
|
|
23119
23171
|
/* @__PURE__ */ jsx181(Tabs, { ...props }),
|
|
23120
23172
|
/* @__PURE__ */ jsx181(TabContent, { ...props, contentXss: {
|
|
23121
23173
|
...styles,
|
|
@@ -23168,7 +23220,7 @@ function Tabs(props) {
|
|
|
23168
23220
|
const tid = useTestIds(others, "tabs");
|
|
23169
23221
|
const [active, setActive] = useState54(selected);
|
|
23170
23222
|
const ref = useRef56(null);
|
|
23171
|
-
|
|
23223
|
+
useEffect35(() => setActive(selected), [selected]);
|
|
23172
23224
|
function onKeyUp(e) {
|
|
23173
23225
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
23174
23226
|
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
@@ -23264,7 +23316,7 @@ function TabImpl(props) {
|
|
|
23264
23316
|
onClick: () => onClick(tab.value)
|
|
23265
23317
|
}
|
|
23266
23318
|
});
|
|
23267
|
-
const tabLabel = /* @__PURE__ */ jsxs93(
|
|
23319
|
+
const tabLabel = /* @__PURE__ */ jsxs93(Fragment41, { children: [
|
|
23268
23320
|
label,
|
|
23269
23321
|
(icon || endAdornment) && /* @__PURE__ */ jsx181("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx181(Icon, { icon }) : endAdornment })
|
|
23270
23322
|
] });
|
|
@@ -23618,7 +23670,7 @@ import {
|
|
|
23618
23670
|
createContext as createContext14,
|
|
23619
23671
|
useCallback as useCallback34,
|
|
23620
23672
|
useContext as useContext26,
|
|
23621
|
-
useEffect as
|
|
23673
|
+
useEffect as useEffect36,
|
|
23622
23674
|
useMemo as useMemo53,
|
|
23623
23675
|
useRef as useRef58,
|
|
23624
23676
|
useState as useState56
|
|
@@ -23652,7 +23704,7 @@ function SideNavLayoutProvider(props) {
|
|
|
23652
23704
|
);
|
|
23653
23705
|
const bp = useBreakpoint();
|
|
23654
23706
|
const prevMdAndUp = useRef58(bp.mdAndUp);
|
|
23655
|
-
|
|
23707
|
+
useEffect36(() => {
|
|
23656
23708
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
23657
23709
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
23658
23710
|
}
|
|
@@ -23737,7 +23789,7 @@ function SideNav(props) {
|
|
|
23737
23789
|
}
|
|
23738
23790
|
|
|
23739
23791
|
// src/components/Snackbar/useSnackbar.tsx
|
|
23740
|
-
import { useCallback as useCallback35, useEffect as
|
|
23792
|
+
import { useCallback as useCallback35, useEffect as useEffect37 } from "react";
|
|
23741
23793
|
function useSnackbar() {
|
|
23742
23794
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
23743
23795
|
const onClose = useCallback35(
|
|
@@ -23787,7 +23839,7 @@ function useSnackbar() {
|
|
|
23787
23839
|
[onClose, setNotices]
|
|
23788
23840
|
);
|
|
23789
23841
|
const closeNotice = useCallback35((id) => onClose(id), [onClose]);
|
|
23790
|
-
const useSnackbarOffset = ({ bottom }) =>
|
|
23842
|
+
const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
|
|
23791
23843
|
setOffset({ bottom });
|
|
23792
23844
|
return () => setOffset({});
|
|
23793
23845
|
}, [bottom]);
|
|
@@ -24023,14 +24075,14 @@ function isStructuredProps(props) {
|
|
|
24023
24075
|
}
|
|
24024
24076
|
|
|
24025
24077
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
24026
|
-
import { Fragment as
|
|
24078
|
+
import { Fragment as Fragment42, jsx as jsx189, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
24027
24079
|
function ConfirmCloseModal(props) {
|
|
24028
24080
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
24029
24081
|
const { modalState } = useBeamContext();
|
|
24030
24082
|
function closeModal() {
|
|
24031
24083
|
modalState.current = void 0;
|
|
24032
24084
|
}
|
|
24033
|
-
return /* @__PURE__ */ jsxs100(
|
|
24085
|
+
return /* @__PURE__ */ jsxs100(Fragment42, { children: [
|
|
24034
24086
|
/* @__PURE__ */ jsx189(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
24035
24087
|
/* @__PURE__ */ jsx189(ModalBody, { children: /* @__PURE__ */ jsx189("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
24036
24088
|
/* @__PURE__ */ jsxs100(ModalFooter, { children: [
|
|
@@ -24183,7 +24235,7 @@ function canClose(canCloseCheck) {
|
|
|
24183
24235
|
|
|
24184
24236
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
24185
24237
|
import { mergeProps as mergeProps30 } from "@homebound/truss/runtime";
|
|
24186
|
-
import { Fragment as
|
|
24238
|
+
import { Fragment as Fragment43, jsx as jsx191, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
24187
24239
|
var SuperDrawerContent = ({
|
|
24188
24240
|
children,
|
|
24189
24241
|
actions
|
|
@@ -24242,7 +24294,7 @@ var SuperDrawerContent = ({
|
|
|
24242
24294
|
}) }, "content");
|
|
24243
24295
|
}
|
|
24244
24296
|
}
|
|
24245
|
-
return /* @__PURE__ */ jsxs101(
|
|
24297
|
+
return /* @__PURE__ */ jsxs101(Fragment43, { children: [
|
|
24246
24298
|
wrapWithMotionAndMaybeBack(children),
|
|
24247
24299
|
actions && /* @__PURE__ */ jsx191("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx191("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx191(Button, { ...buttonProps }, i)) }) })
|
|
24248
24300
|
] });
|
|
@@ -24808,7 +24860,6 @@ export {
|
|
|
24808
24860
|
EnvironmentBannerLayout,
|
|
24809
24861
|
ErrorMessage,
|
|
24810
24862
|
FieldGroup,
|
|
24811
|
-
_FilterDropdownMenu as FilterDropdownMenu,
|
|
24812
24863
|
FilterModal,
|
|
24813
24864
|
_Filters as Filters,
|
|
24814
24865
|
FormDivider,
|