@homebound/beam 4.55.1 → 4.56.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 +49 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -10
- package/dist/index.d.ts +9 -10
- package/dist/index.js +49 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7277,13 +7277,13 @@ function hierarchyFirstContentCss(opts) {
|
|
|
7277
7277
|
const {
|
|
7278
7278
|
level,
|
|
7279
7279
|
skipIndent,
|
|
7280
|
-
|
|
7280
|
+
hasChildren
|
|
7281
7281
|
} = opts;
|
|
7282
7282
|
const paddingLeft = skipIndent ? void 0 : hierarchyIndentPaddingPx(level);
|
|
7283
|
-
const
|
|
7284
|
-
if (!
|
|
7283
|
+
const typeStyle = hierarchyLevelType(level, hasChildren);
|
|
7284
|
+
if (!typeStyle && paddingLeft === void 0) return void 0;
|
|
7285
7285
|
return {
|
|
7286
|
-
...
|
|
7286
|
+
...typeStyle ?? {},
|
|
7287
7287
|
...paddingLeft !== void 0 ? {
|
|
7288
7288
|
paddingLeft: ["pl_var", {
|
|
7289
7289
|
"--paddingLeft": `${paddingLeft}px`
|
|
@@ -7291,16 +7291,20 @@ function hierarchyFirstContentCss(opts) {
|
|
|
7291
7291
|
} : {}
|
|
7292
7292
|
};
|
|
7293
7293
|
}
|
|
7294
|
-
function hierarchyLevelType(level,
|
|
7295
|
-
if (level
|
|
7296
|
-
return level === 0 ? {
|
|
7294
|
+
function hierarchyLevelType(level, hasChildren) {
|
|
7295
|
+
if (level === 0) return hasChildren ? {
|
|
7297
7296
|
fontWeight: "fw6",
|
|
7298
7297
|
fontSize: "fz_14px",
|
|
7299
7298
|
lineHeight: "lh_20px"
|
|
7300
|
-
} :
|
|
7299
|
+
} : void 0;
|
|
7300
|
+
return hasChildren ? {
|
|
7301
7301
|
fontWeight: "fw6",
|
|
7302
7302
|
fontSize: "fz_12px",
|
|
7303
7303
|
lineHeight: "lh_16px"
|
|
7304
|
+
} : {
|
|
7305
|
+
fontWeight: "fw4",
|
|
7306
|
+
fontSize: "fz_12px",
|
|
7307
|
+
lineHeight: "lh_16px"
|
|
7304
7308
|
};
|
|
7305
7309
|
}
|
|
7306
7310
|
var loadingTableCss = {
|
|
@@ -8831,8 +8835,6 @@ var RowStates = class {
|
|
|
8831
8835
|
keptGroupRow;
|
|
8832
8836
|
/** The first level of rows, i.e. not the header (or kept group), but the totals + top-level children. */
|
|
8833
8837
|
topRows = [];
|
|
8834
|
-
/** Deepest data-row level from the latest `setRows`. `0` when every body row is top-level. */
|
|
8835
|
-
maxNestingLevel = 0;
|
|
8836
8838
|
constructor(table) {
|
|
8837
8839
|
this.table = table;
|
|
8838
8840
|
this.header = this.createHeaderRow();
|
|
@@ -8860,8 +8862,7 @@ var RowStates = class {
|
|
|
8860
8862
|
const map = this.map;
|
|
8861
8863
|
const seenIds = /* @__PURE__ */ new Set();
|
|
8862
8864
|
const maybeKept = new Set(this.map.values());
|
|
8863
|
-
|
|
8864
|
-
function addRowAndChildren(parent, row, level) {
|
|
8865
|
+
function addRowAndChildren(parent, row) {
|
|
8865
8866
|
const key = row.id;
|
|
8866
8867
|
if (seenIds.has(key)) {
|
|
8867
8868
|
throw new Error(`Duplicate row id ${key}`);
|
|
@@ -8878,15 +8879,12 @@ var RowStates = class {
|
|
|
8878
8879
|
state.removed = false;
|
|
8879
8880
|
maybeKept.delete(state);
|
|
8880
8881
|
}
|
|
8881
|
-
|
|
8882
|
-
if (!reserved && level > maxNestingLevel) maxNestingLevel = level;
|
|
8883
|
-
state.children = row.children?.map((child) => addRowAndChildren(state, child, reserved ? level : level + 1));
|
|
8882
|
+
state.children = row.children?.map((child) => addRowAndChildren(state, child));
|
|
8884
8883
|
return state;
|
|
8885
8884
|
}
|
|
8886
8885
|
const headerRow = rows.find((r) => r.kind === HEADER);
|
|
8887
8886
|
this.header.row = headerRow || missingHeader;
|
|
8888
|
-
this.topRows = rows.filter((row) => row !== headerRow).map((row) => addRowAndChildren(this.header, row
|
|
8889
|
-
this.maxNestingLevel = maxNestingLevel;
|
|
8887
|
+
this.topRows = rows.filter((row) => row !== headerRow).map((row) => addRowAndChildren(this.header, row));
|
|
8890
8888
|
this.header.children = [this.keptGroupRow, ...this.topRows];
|
|
8891
8889
|
for (const state of maybeKept) state.markRemoved();
|
|
8892
8890
|
if (this.topRows.some((rs) => !reservedRowKinds.includes(rs.row.kind))) {
|
|
@@ -9088,8 +9086,6 @@ var TableState = class {
|
|
|
9088
9086
|
persistCollapse;
|
|
9089
9087
|
// The current list of rows, basically a useRef.current. Only shallow reactive.
|
|
9090
9088
|
rows = [];
|
|
9091
|
-
/** Deepest data-row level, set with the rows. `0` when the table has a single level. Every row's type is chosen from this. */
|
|
9092
|
-
maxNestingLevel = 0;
|
|
9093
9089
|
// The current list of columns, basically a useRef.current. Only ref reactive.
|
|
9094
9090
|
columns = [];
|
|
9095
9091
|
api;
|
|
@@ -9187,7 +9183,6 @@ var TableState = class {
|
|
|
9187
9183
|
setRows(rows) {
|
|
9188
9184
|
this.rowStates.setRows(rows);
|
|
9189
9185
|
this.rows = rows;
|
|
9190
|
-
this.maxNestingLevel = this.rowStates.maxNestingLevel;
|
|
9191
9186
|
}
|
|
9192
9187
|
setColumns(columns, visibleColumnsStorageKey) {
|
|
9193
9188
|
if (columns !== this.columns) {
|
|
@@ -11381,7 +11376,7 @@ function RowImpl(props) {
|
|
|
11381
11376
|
...isBodyRow && applyFirstContentColumnStyles && hierarchyFirstContentCss({
|
|
11382
11377
|
level,
|
|
11383
11378
|
skipIndent: levelIndent !== void 0 || !hasCollapseColumn,
|
|
11384
|
-
|
|
11379
|
+
hasChildren: !!row.children?.length
|
|
11385
11380
|
}),
|
|
11386
11381
|
// Apply any declarative column border styling after header/body defaults.
|
|
11387
11382
|
...getColumnBorderCss(column2.border, style),
|
|
@@ -34446,26 +34441,28 @@ function WorkflowActions(props) {
|
|
|
34446
34441
|
onCancel,
|
|
34447
34442
|
onSaveAndExit,
|
|
34448
34443
|
destructiveAction,
|
|
34449
|
-
completeLabel,
|
|
34450
34444
|
onComplete,
|
|
34451
34445
|
primaryDisabled,
|
|
34452
34446
|
aiMode = false,
|
|
34453
34447
|
isFirstStep = true,
|
|
34454
34448
|
isLastStep = true,
|
|
34455
34449
|
onBack,
|
|
34456
|
-
onContinue
|
|
34450
|
+
onContinue,
|
|
34451
|
+
completeLabel,
|
|
34452
|
+
nonStandardCompleteLabel
|
|
34457
34453
|
} = props;
|
|
34458
34454
|
const {
|
|
34459
34455
|
sm: isMobile
|
|
34460
34456
|
} = useBreakpoint();
|
|
34461
34457
|
const primaryVariant = aiMode ? "ai" : "primary";
|
|
34458
|
+
const completeButtonLabel = nonStandardCompleteLabel ?? completeLabel ?? "Save";
|
|
34462
34459
|
return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
|
|
34463
34460
|
/* @__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 }) }),
|
|
34464
34461
|
/* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "df aic g_1", children: [
|
|
34465
34462
|
/* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
34466
34463
|
onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
34467
34464
|
destructiveAction && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label: destructiveAction.label ?? "Remove", variant: "danger", onClick: destructiveAction.onConfirm }),
|
|
34468
|
-
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Button, { label:
|
|
34465
|
+
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 () => {
|
|
34469
34466
|
await onContinue?.();
|
|
34470
34467
|
}, disabled: primaryDisabled })
|
|
34471
34468
|
] })
|
|
@@ -34493,7 +34490,15 @@ function WorkflowPageLayout(props) {
|
|
|
34493
34490
|
destructiveAction,
|
|
34494
34491
|
rightPaneTriggers,
|
|
34495
34492
|
banner: bannerProp,
|
|
34496
|
-
|
|
34493
|
+
onSaveAndExit,
|
|
34494
|
+
onComplete,
|
|
34495
|
+
primaryDisabled,
|
|
34496
|
+
isFirstStep,
|
|
34497
|
+
isLastStep,
|
|
34498
|
+
onBack,
|
|
34499
|
+
onContinue,
|
|
34500
|
+
completeLabel,
|
|
34501
|
+
nonStandardCompleteLabel
|
|
34497
34502
|
} = props;
|
|
34498
34503
|
const tid = useTestIds(props, "workflowPageLayout");
|
|
34499
34504
|
const {
|
|
@@ -34513,7 +34518,7 @@ function WorkflowPageLayout(props) {
|
|
|
34513
34518
|
onCancel,
|
|
34514
34519
|
destructiveAction
|
|
34515
34520
|
});
|
|
34516
|
-
const actions = /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(WorkflowActions, {
|
|
34521
|
+
const actions = /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(WorkflowActions, { completeLabel, nonStandardCompleteLabel, onSaveAndExit, onComplete, primaryDisabled, isFirstStep, isLastStep, onBack, onContinue, aiMode, onCancel: onCancelClick, destructiveAction: destructiveAction && {
|
|
34517
34522
|
...destructiveAction,
|
|
34518
34523
|
onConfirm: onDestructiveActionClick
|
|
34519
34524
|
} });
|
|
@@ -34641,7 +34646,6 @@ var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
|
34641
34646
|
function FocusedFormLayout(props) {
|
|
34642
34647
|
const {
|
|
34643
34648
|
onCancel,
|
|
34644
|
-
completeLabel,
|
|
34645
34649
|
onComplete,
|
|
34646
34650
|
onSaveAndExit,
|
|
34647
34651
|
destructiveAction,
|
|
@@ -34652,14 +34656,20 @@ function FocusedFormLayout(props) {
|
|
|
34652
34656
|
rightPaneTriggers,
|
|
34653
34657
|
banner,
|
|
34654
34658
|
children,
|
|
34655
|
-
|
|
34659
|
+
title,
|
|
34660
|
+
documentTitleSuffix,
|
|
34661
|
+
breadcrumbs,
|
|
34662
|
+
completeLabel,
|
|
34663
|
+
nonStandardCompleteLabel
|
|
34656
34664
|
} = props;
|
|
34657
34665
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
34658
34666
|
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
|
34659
34667
|
WorkflowPageLayout,
|
|
34660
34668
|
{
|
|
34661
34669
|
...tid,
|
|
34662
|
-
|
|
34670
|
+
title,
|
|
34671
|
+
documentTitleSuffix,
|
|
34672
|
+
breadcrumbs,
|
|
34663
34673
|
banner,
|
|
34664
34674
|
aiMode,
|
|
34665
34675
|
isDirty,
|
|
@@ -34668,6 +34678,7 @@ function FocusedFormLayout(props) {
|
|
|
34668
34678
|
onSaveAndExit,
|
|
34669
34679
|
destructiveAction,
|
|
34670
34680
|
completeLabel,
|
|
34681
|
+
nonStandardCompleteLabel,
|
|
34671
34682
|
onComplete,
|
|
34672
34683
|
primaryDisabled,
|
|
34673
34684
|
rightPaneTriggers,
|
|
@@ -34684,7 +34695,6 @@ function StepperLayout(props) {
|
|
|
34684
34695
|
steps,
|
|
34685
34696
|
defaultStep,
|
|
34686
34697
|
onCancel,
|
|
34687
|
-
completeLabel,
|
|
34688
34698
|
onComplete,
|
|
34689
34699
|
onSaveAndExit,
|
|
34690
34700
|
destructiveAction,
|
|
@@ -34692,7 +34702,11 @@ function StepperLayout(props) {
|
|
|
34692
34702
|
allowNavigation,
|
|
34693
34703
|
aiMode,
|
|
34694
34704
|
banner,
|
|
34695
|
-
|
|
34705
|
+
title,
|
|
34706
|
+
documentTitleSuffix,
|
|
34707
|
+
breadcrumbs,
|
|
34708
|
+
completeLabel,
|
|
34709
|
+
nonStandardCompleteLabel
|
|
34696
34710
|
} = props;
|
|
34697
34711
|
const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
|
|
34698
34712
|
const [currentStep, setCurrentStep] = (0, import_react189.useState)(() => getInitialStep(stepTabs, defaultStep));
|
|
@@ -34709,7 +34723,9 @@ function StepperLayout(props) {
|
|
|
34709
34723
|
WorkflowPageLayout,
|
|
34710
34724
|
{
|
|
34711
34725
|
...tid,
|
|
34712
|
-
|
|
34726
|
+
title,
|
|
34727
|
+
documentTitleSuffix,
|
|
34728
|
+
breadcrumbs,
|
|
34713
34729
|
banner,
|
|
34714
34730
|
aiMode,
|
|
34715
34731
|
stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
|
|
@@ -34725,6 +34741,7 @@ function StepperLayout(props) {
|
|
|
34725
34741
|
onSaveAndExit,
|
|
34726
34742
|
destructiveAction,
|
|
34727
34743
|
completeLabel,
|
|
34744
|
+
nonStandardCompleteLabel,
|
|
34728
34745
|
onComplete,
|
|
34729
34746
|
primaryDisabled: activeStep?.primaryDisabled,
|
|
34730
34747
|
rightPaneTriggers: activeStep?.rightPaneTriggers,
|