@homebound/beam 4.55.0 → 4.56.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/index.cjs +45 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +45 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20428,6 +20428,7 @@ function useMenuSelectField(props) {
|
|
|
20428
20428
|
getOptionLabel = defaultOptionLabel,
|
|
20429
20429
|
getOptionMenuLabel,
|
|
20430
20430
|
getOptionSearchText,
|
|
20431
|
+
autoSort = true,
|
|
20431
20432
|
onSearch,
|
|
20432
20433
|
disabledOptions,
|
|
20433
20434
|
nothingSelectedText = "",
|
|
@@ -20470,10 +20471,10 @@ function useMenuSelectField(props) {
|
|
|
20470
20471
|
const [optionsLoading, setOptionsLoading] = (0, import_react85.useState)(false);
|
|
20471
20472
|
const didRequestOptionsRef = (0, import_react85.useRef)(false);
|
|
20472
20473
|
const options = (0, import_react85.useMemo)(
|
|
20473
|
-
() => initializeOptions(optionsProp, getOptionValue, getOptionLabel, void 0,
|
|
20474
|
+
() => initializeOptions(optionsProp, getOptionValue, getOptionLabel, void 0, autoSort),
|
|
20474
20475
|
// getOptionValue and getOptionLabel are typically inline lambdas
|
|
20475
20476
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
20476
|
-
[optionsProp]
|
|
20477
|
+
[optionsProp, autoSort]
|
|
20477
20478
|
);
|
|
20478
20479
|
const { hoverProps, isHovered } = (0, import_react_aria37.useHover)({});
|
|
20479
20480
|
const { focusProps, isFocusVisible } = (0, import_react_aria37.useFocusRing)();
|
|
@@ -22333,11 +22334,12 @@ var import_mobx_react11 = require("mobx-react");
|
|
|
22333
22334
|
// src/inputs/MenuSelectField/MenuTreeSelectField.tsx
|
|
22334
22335
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
22335
22336
|
function MenuTreeSelectField(props) {
|
|
22336
|
-
const { onSelect, selectionDisplay = "all", defaultExpanded = false, ...rest } = props;
|
|
22337
|
+
const { onSelect, selectionDisplay = "all", defaultExpanded = false, autoSort = false, ...rest } = props;
|
|
22337
22338
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
22338
22339
|
BaseMenuSelectField,
|
|
22339
22340
|
{
|
|
22340
22341
|
...rest,
|
|
22342
|
+
autoSort,
|
|
22341
22343
|
selectionMode: "multiple",
|
|
22342
22344
|
tree: { getChildren: getNestedChildren, display: selectionDisplay, defaultExpanded },
|
|
22343
22345
|
onCommit: (values, opts) => onSelect(treeSelectResponse(values, opts))
|
|
@@ -32009,14 +32011,19 @@ var SingleFilter = class extends BaseFilter {
|
|
|
32009
32011
|
return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
|
|
32010
32012
|
}
|
|
32011
32013
|
render(value, setValue, tid, inModal, vertical) {
|
|
32012
|
-
const { label, defaultValue, options: maybeOptions, nothingSelectedText, ...props } = this.props;
|
|
32014
|
+
const { label, defaultValue, options: maybeOptions, nothingSelectedText, autoSort, ...props } = this.props;
|
|
32013
32015
|
const { getOptionValue, getOptionLabel } = optionReaders2(this.props);
|
|
32014
32016
|
const unsetText = nothingSelectedText ?? "All";
|
|
32015
|
-
const
|
|
32017
|
+
const isStaticList = Array.isArray(maybeOptions);
|
|
32018
|
+
const options = isStaticList ? [
|
|
32019
|
+
allOption,
|
|
32020
|
+
...initializeOptions(maybeOptions, getOptionValue, getOptionLabel, void 0, autoSort ?? true)
|
|
32021
|
+
] : maybeOptions;
|
|
32016
32022
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
32017
32023
|
MenuSelectField,
|
|
32018
32024
|
{
|
|
32019
32025
|
...props,
|
|
32026
|
+
autoSort: isStaticList ? false : autoSort,
|
|
32020
32027
|
options,
|
|
32021
32028
|
getOptionValue: (option) => option === allOption ? void 0 : getOptionValue(option),
|
|
32022
32029
|
getOptionLabel: (option) => option === allOption ? unsetText : getOptionLabel(option),
|
|
@@ -34439,26 +34446,28 @@ function WorkflowActions(props) {
|
|
|
34439
34446
|
onCancel,
|
|
34440
34447
|
onSaveAndExit,
|
|
34441
34448
|
destructiveAction,
|
|
34442
|
-
completeLabel,
|
|
34443
34449
|
onComplete,
|
|
34444
34450
|
primaryDisabled,
|
|
34445
34451
|
aiMode = false,
|
|
34446
34452
|
isFirstStep = true,
|
|
34447
34453
|
isLastStep = true,
|
|
34448
34454
|
onBack,
|
|
34449
|
-
onContinue
|
|
34455
|
+
onContinue,
|
|
34456
|
+
completeLabel,
|
|
34457
|
+
nonStandardCompleteLabel
|
|
34450
34458
|
} = props;
|
|
34451
34459
|
const {
|
|
34452
34460
|
sm: isMobile
|
|
34453
34461
|
} = useBreakpoint();
|
|
34454
34462
|
const primaryVariant = aiMode ? "ai" : "primary";
|
|
34463
|
+
const completeButtonLabel = nonStandardCompleteLabel ?? completeLabel ?? "Save";
|
|
34455
34464
|
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
|
|
34456
34465
|
/* @__PURE__ */ (0, import_jsx_runtime273.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
34457
34466
|
/* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "df aic g_1", children: [
|
|
34458
34467
|
/* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
34459
34468
|
onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
34460
34469
|
destructiveAction && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: destructiveAction.label ?? "Remove", variant: "danger", onClick: destructiveAction.onConfirm }),
|
|
34461
|
-
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label:
|
|
34470
|
+
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: completeButtonLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
|
|
34462
34471
|
await onContinue?.();
|
|
34463
34472
|
}, disabled: primaryDisabled })
|
|
34464
34473
|
] })
|
|
@@ -34486,7 +34495,15 @@ function WorkflowPageLayout(props) {
|
|
|
34486
34495
|
destructiveAction,
|
|
34487
34496
|
rightPaneTriggers,
|
|
34488
34497
|
banner: bannerProp,
|
|
34489
|
-
|
|
34498
|
+
onSaveAndExit,
|
|
34499
|
+
onComplete,
|
|
34500
|
+
primaryDisabled,
|
|
34501
|
+
isFirstStep,
|
|
34502
|
+
isLastStep,
|
|
34503
|
+
onBack,
|
|
34504
|
+
onContinue,
|
|
34505
|
+
completeLabel,
|
|
34506
|
+
nonStandardCompleteLabel
|
|
34490
34507
|
} = props;
|
|
34491
34508
|
const tid = useTestIds(props, "workflowPageLayout");
|
|
34492
34509
|
const {
|
|
@@ -34506,7 +34523,7 @@ function WorkflowPageLayout(props) {
|
|
|
34506
34523
|
onCancel,
|
|
34507
34524
|
destructiveAction
|
|
34508
34525
|
});
|
|
34509
|
-
const actions = /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(WorkflowActions, {
|
|
34526
|
+
const actions = /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(WorkflowActions, { completeLabel, nonStandardCompleteLabel, onSaveAndExit, onComplete, primaryDisabled, isFirstStep, isLastStep, onBack, onContinue, aiMode, onCancel: onCancelClick, destructiveAction: destructiveAction && {
|
|
34510
34527
|
...destructiveAction,
|
|
34511
34528
|
onConfirm: onDestructiveActionClick
|
|
34512
34529
|
} });
|
|
@@ -34634,7 +34651,6 @@ var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
|
34634
34651
|
function FocusedFormLayout(props) {
|
|
34635
34652
|
const {
|
|
34636
34653
|
onCancel,
|
|
34637
|
-
completeLabel,
|
|
34638
34654
|
onComplete,
|
|
34639
34655
|
onSaveAndExit,
|
|
34640
34656
|
destructiveAction,
|
|
@@ -34645,14 +34661,20 @@ function FocusedFormLayout(props) {
|
|
|
34645
34661
|
rightPaneTriggers,
|
|
34646
34662
|
banner,
|
|
34647
34663
|
children,
|
|
34648
|
-
|
|
34664
|
+
title,
|
|
34665
|
+
documentTitleSuffix,
|
|
34666
|
+
breadcrumbs,
|
|
34667
|
+
completeLabel,
|
|
34668
|
+
nonStandardCompleteLabel
|
|
34649
34669
|
} = props;
|
|
34650
34670
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
34651
34671
|
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
34652
34672
|
WorkflowPageLayout,
|
|
34653
34673
|
{
|
|
34654
34674
|
...tid,
|
|
34655
|
-
|
|
34675
|
+
title,
|
|
34676
|
+
documentTitleSuffix,
|
|
34677
|
+
breadcrumbs,
|
|
34656
34678
|
banner,
|
|
34657
34679
|
aiMode,
|
|
34658
34680
|
isDirty,
|
|
@@ -34661,6 +34683,7 @@ function FocusedFormLayout(props) {
|
|
|
34661
34683
|
onSaveAndExit,
|
|
34662
34684
|
destructiveAction,
|
|
34663
34685
|
completeLabel,
|
|
34686
|
+
nonStandardCompleteLabel,
|
|
34664
34687
|
onComplete,
|
|
34665
34688
|
primaryDisabled,
|
|
34666
34689
|
rightPaneTriggers,
|
|
@@ -34677,7 +34700,6 @@ function StepperLayout(props) {
|
|
|
34677
34700
|
steps,
|
|
34678
34701
|
defaultStep,
|
|
34679
34702
|
onCancel,
|
|
34680
|
-
completeLabel,
|
|
34681
34703
|
onComplete,
|
|
34682
34704
|
onSaveAndExit,
|
|
34683
34705
|
destructiveAction,
|
|
@@ -34685,7 +34707,11 @@ function StepperLayout(props) {
|
|
|
34685
34707
|
allowNavigation,
|
|
34686
34708
|
aiMode,
|
|
34687
34709
|
banner,
|
|
34688
|
-
|
|
34710
|
+
title,
|
|
34711
|
+
documentTitleSuffix,
|
|
34712
|
+
breadcrumbs,
|
|
34713
|
+
completeLabel,
|
|
34714
|
+
nonStandardCompleteLabel
|
|
34689
34715
|
} = props;
|
|
34690
34716
|
const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
|
|
34691
34717
|
const [currentStep, setCurrentStep] = (0, import_react189.useState)(() => getInitialStep(stepTabs, defaultStep));
|
|
@@ -34702,7 +34728,9 @@ function StepperLayout(props) {
|
|
|
34702
34728
|
WorkflowPageLayout,
|
|
34703
34729
|
{
|
|
34704
34730
|
...tid,
|
|
34705
|
-
|
|
34731
|
+
title,
|
|
34732
|
+
documentTitleSuffix,
|
|
34733
|
+
breadcrumbs,
|
|
34706
34734
|
banner,
|
|
34707
34735
|
aiMode,
|
|
34708
34736
|
stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
|
|
@@ -34718,6 +34746,7 @@ function StepperLayout(props) {
|
|
|
34718
34746
|
onSaveAndExit,
|
|
34719
34747
|
destructiveAction,
|
|
34720
34748
|
completeLabel,
|
|
34749
|
+
nonStandardCompleteLabel,
|
|
34721
34750
|
onComplete,
|
|
34722
34751
|
primaryDisabled: activeStep?.primaryDisabled,
|
|
34723
34752
|
rightPaneTriggers: activeStep?.rightPaneTriggers,
|