@homebound/beam 3.15.0 → 3.15.1
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 +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -13510,6 +13510,7 @@ function RadioGroupField(props) {
|
|
|
13510
13510
|
onChange,
|
|
13511
13511
|
options,
|
|
13512
13512
|
disabled = false,
|
|
13513
|
+
required,
|
|
13513
13514
|
errorMsg,
|
|
13514
13515
|
helperText,
|
|
13515
13516
|
layout = "vertical",
|
|
@@ -13524,12 +13525,14 @@ function RadioGroupField(props) {
|
|
|
13524
13525
|
isReadOnly: false
|
|
13525
13526
|
});
|
|
13526
13527
|
const tid = useTestIds(props, defaultTestId(label));
|
|
13528
|
+
const labelSuffix = useLabelSuffix(required, false);
|
|
13527
13529
|
const {
|
|
13528
13530
|
labelProps,
|
|
13529
13531
|
radioGroupProps
|
|
13530
13532
|
} = (0, import_react_aria34.useRadioGroup)({
|
|
13531
13533
|
label,
|
|
13532
|
-
isDisabled: disabled
|
|
13534
|
+
isDisabled: disabled,
|
|
13535
|
+
isRequired: required
|
|
13533
13536
|
}, state);
|
|
13534
13537
|
return (
|
|
13535
13538
|
// default styling to position `<Label />` above.
|
|
@@ -13544,7 +13547,7 @@ function RadioGroupField(props) {
|
|
|
13544
13547
|
justifyContent: "jcsb"
|
|
13545
13548
|
} : {}
|
|
13546
13549
|
}), children: [
|
|
13547
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Label, { label, ...labelProps, ...tid.label, hidden: labelStyle === "hidden" }),
|
|
13550
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Label, { label, ...labelProps, ...tid.label, suffix: labelSuffix, hidden: labelStyle === "hidden" }),
|
|
13548
13551
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { ...radioGroupProps, children: [
|
|
13549
13552
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ...(0, import_runtime47.trussProps)({
|
|
13550
13553
|
display: "df",
|
|
@@ -14870,17 +14873,26 @@ var ColumnStorage = class {
|
|
|
14870
14873
|
}
|
|
14871
14874
|
expandedIds;
|
|
14872
14875
|
visibleIds;
|
|
14876
|
+
// `loadExpanded`/`loadVisible` can be called multiple times (i.e. when `props.columns`
|
|
14877
|
+
// change, which also changes the auto-derived storage key). Each call wires up a mobx
|
|
14878
|
+
// autorun/reaction that writes to its key, so we must dispose the previous one. Otherwise
|
|
14879
|
+
// a stale writer keeps firing against an old key and clobbers it with the current visible
|
|
14880
|
+
// set, e.g. a conditional column's key gets overwritten while that column isn't rendered.
|
|
14881
|
+
disposeExpanded;
|
|
14882
|
+
disposeVisible;
|
|
14873
14883
|
loadExpanded(persistCollapse) {
|
|
14884
|
+
this.disposeExpanded?.();
|
|
14874
14885
|
const key = `expandedColumn_${persistCollapse}`;
|
|
14875
14886
|
this.expandedIds = loadArrayOrUndefined(key);
|
|
14876
|
-
(0, import_mobx4.reaction)(
|
|
14887
|
+
this.disposeExpanded = (0, import_mobx4.reaction)(
|
|
14877
14888
|
() => this.states.expandedColumns.map((cs) => cs.column.id),
|
|
14878
14889
|
(columnIds) => sessionStorage.setItem(key, JSON.stringify(columnIds))
|
|
14879
14890
|
);
|
|
14880
14891
|
}
|
|
14881
14892
|
loadVisible(storageKey) {
|
|
14893
|
+
this.disposeVisible?.();
|
|
14882
14894
|
this.visibleIds = loadArrayOrUndefined(storageKey);
|
|
14883
|
-
(0, import_mobx4.autorun)(() => {
|
|
14895
|
+
this.disposeVisible = (0, import_mobx4.autorun)(() => {
|
|
14884
14896
|
const columnIds = this.states.allVisibleColumns("web").map((cs) => cs.column.id);
|
|
14885
14897
|
sessionStorage.setItem(storageKey, JSON.stringify(columnIds));
|
|
14886
14898
|
});
|
|
@@ -17811,6 +17823,7 @@ function BoundRadioGroupField(props) {
|
|
|
17811
17823
|
RadioGroupField,
|
|
17812
17824
|
{
|
|
17813
17825
|
label,
|
|
17826
|
+
required: field.required,
|
|
17814
17827
|
value: field.value || void 0,
|
|
17815
17828
|
onChange: (value) => {
|
|
17816
17829
|
onChange(value);
|