@adaptabletools/adaptable 23.0.0-canary.9 → 23.0.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.
Files changed (43) hide show
  1. package/index.css +13 -39
  2. package/package.json +1 -1
  3. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -6
  4. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +1 -1
  5. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +1 -1
  6. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -2
  7. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +5 -2
  8. package/src/View/Layout/LayoutCloneButton.js +2 -1
  9. package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -5
  10. package/src/View/StatusBar/StatusBarPopup.js +4 -0
  11. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  12. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +1 -2
  13. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +40 -11
  14. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +1 -2
  15. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +1 -2
  16. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +1 -2
  17. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +1 -2
  18. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -2
  19. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +0 -3
  20. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +5 -5
  21. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +0 -3
  22. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -2
  23. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +0 -3
  24. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +1 -3
  25. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +0 -3
  26. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +1 -3
  27. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +0 -3
  28. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +0 -2
  29. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +0 -3
  30. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -2
  31. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +0 -3
  32. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +3 -3
  33. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +0 -3
  34. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +1 -3
  35. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -2
  36. package/src/View/Wizard/CollapsibleWizardCard.js +1 -1
  37. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +7 -0
  38. package/src/View/Wizard/OnePageWizards.d.ts +8 -0
  39. package/src/View/Wizard/OnePageWizards.js +3 -3
  40. package/src/components/DragAndDropContext/ModuleManager.js +5 -2
  41. package/src/components/DragAndDropContext/types.d.ts +7 -0
  42. package/src/env.js +2 -2
  43. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -1,9 +1,8 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { isAdaptableCustomIcon, isAdaptableElementIcon, isAdaptableSystemIcon, } from '../../../../../components/Icon';
3
3
  import { resolveEffectiveIconStyleMappings } from '../../../../../agGrid/cellRenderers/IconRenderer';
4
4
  import { AdaptableIconComponent } from '../../../../Components/AdaptableIconComponent';
5
5
  import { Box } from '../../../../../components/Flex';
6
- import { Card } from '../../../../../components/Card';
7
6
  import { Tag } from '../../../../../components/Tag';
8
7
  import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
9
8
  export const DEFAULT_ICON_STYLE_SIZE = 18;
@@ -88,4 +87,3 @@ export const StyledColumnIconPreview = ({ data }) => {
88
87
  const previewCellChrome = getIconCellChromeCss(iconStyle.Cell);
89
88
  return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(IconCellPreviewTree, { iconStyle: iconStyle, mapping: effectiveMappings[0] }) }));
90
89
  };
91
- export const StyledColumnIconPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnIconPreview, { data: data }) })] }));
@@ -3,6 +3,3 @@ import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
3
3
  export declare const StyledColumnPercentBarPreview: React.FunctionComponent<React.PropsWithChildren<{
4
4
  data: StyledColumn;
5
5
  }>>;
6
- export declare const StyledColumnPercentBarPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
7
- data: StyledColumn;
8
- }>>;
@@ -3,7 +3,6 @@ import { convertAdaptableStyleToCSS } from '../../../../../Utilities/Helpers/Sty
3
3
  import { getPercentBarPreviewGeometry, getPercentBarPreviewResolvedBarColor, getPercentBarPreviewSampleValues, getPercentBarPreviewScale, getPercentBarPreviewTrackColor, hasPercentBarRangesConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/PercentBarStyleHelper';
4
4
  import { buildBarStyleCellTextLabels, getBarStyleCellTextSlotPresence, hasBarStyleCellTextConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
5
5
  import { Box, Flex } from '../../../../../components/Flex';
6
- import { Card } from '../../../../../components/Card';
7
6
  import { Tag } from '../../../../../components/Tag';
8
7
  import { BarStyleCellTextPreview, shouldShowBarStyleCellTextOutsideBar, } from './BarStyleCellTextPreview';
9
8
  const PREVIEW_CELL_CLASS = 'ab-PercentBarPreviewCell twa:w-[72px] twa:min-h-[32px] twa:px-1 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
@@ -58,4 +57,3 @@ export const StyledColumnPercentBarPreview = ({ data }) => {
58
57
  const sampleValues = getPercentBarPreviewSampleValues(pb);
59
58
  return (_jsx(Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => (_jsx(PercentBarPreviewCell, { styledColumn: data, value: value, min: min, max: max }, value))) }));
60
59
  };
61
- export const StyledColumnPercentBarPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnPercentBarPreview, { data: data }) })] }));
@@ -3,6 +3,3 @@ import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
3
3
  export declare const StyledColumnRangeBarPreview: React.FunctionComponent<React.PropsWithChildren<{
4
4
  data: StyledColumn;
5
5
  }>>;
6
- export declare const StyledColumnRangeBarPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
7
- data: StyledColumn;
8
- }>>;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { buildBarStyleCellTextLabels, getBarStyleCellTextSlotPresence, hasBarStyleCellTextConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
3
3
  import { Box, Flex } from '../../../../../components/Flex';
4
- import { Card } from '../../../../../components/Card';
5
4
  import { Tag } from '../../../../../components/Tag';
6
5
  import { StyledColumnRangeBarListPreview } from './StyledColumnChartListPreviews';
7
6
  import { BarStyleCellTextPreview } from './BarStyleCellTextPreview';
@@ -44,4 +43,3 @@ export const StyledColumnRangeBarPreview = ({ data }) => {
44
43
  }
45
44
  return (_jsx(Box, { className: PREVIEW_CELL_CLASS, children: _jsx(RangeBarPreviewContent, { range: range }) }));
46
45
  };
47
- export const StyledColumnRangeBarPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnRangeBarPreview, { data: data }) })] }));
@@ -14,6 +14,3 @@ export declare const RatingPreview: React.FC<{
14
14
  export declare const StyledColumnRatingPreview: React.FunctionComponent<React.PropsWithChildren<{
15
15
  data: StyledColumn;
16
16
  }>>;
17
- export declare const StyledColumnRatingPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
18
- data: StyledColumn;
19
- }>>;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { Box } from '../../../../../components/Flex';
4
- import { Card } from '../../../../../components/Card';
5
4
  import { Tag } from '../../../../../components/Tag';
6
5
  import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
7
6
  export const DEFAULT_RATING_MAX = 5;
@@ -35,6 +34,8 @@ export const RatingPreview = ({ rating, value, }) => {
35
34
  const allowHalf = rating.AllowHalf ?? true;
36
35
  const previewValue = value ?? Math.max(1, Math.min(max, max * 0.7));
37
36
  const effective = allowHalf ? previewValue : Math.round(previewValue);
37
+ // Display rounded to 1 dp so e.g. 3 * 0.7 doesn't surface as 2.0999999999999996.
38
+ const displayValue = Math.round(previewValue * 10) / 10;
38
39
  const d = ICON_PATHS[icon];
39
40
  return (_jsxs("span", { style: {
40
41
  display: 'inline-flex',
@@ -45,7 +46,7 @@ export const RatingPreview = ({ rating, value, }) => {
45
46
  const fill = clamp(effective - i, 0, 1);
46
47
  const clipId = `ab-rating-preview-clip-${instanceId}-${i}`;
47
48
  return (_jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", children: [_jsx("path", { d: d, fill: emptyColor }), fill > 0 && (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipId, children: _jsx("rect", { x: 0, y: 0, width: 24 * fill, height: 24 }) }) }), _jsx("path", { d: d, fill: filledColor, clipPath: `url(#${clipId})` })] }))] }, i));
48
- }), rating.ShowValue && (_jsx("span", { style: { marginLeft: 6, fontVariantNumeric: 'tabular-nums' }, children: previewValue }))] }));
49
+ }), rating.ShowValue && (_jsx("span", { style: { marginLeft: 6, fontVariantNumeric: 'tabular-nums' }, children: displayValue }))] }));
49
50
  };
50
51
  export const StyledColumnRatingPreview = ({ data }) => {
51
52
  const rating = data.RatingStyle;
@@ -55,4 +56,3 @@ export const StyledColumnRatingPreview = ({ data }) => {
55
56
  const previewCellChrome = getRatingCellChromeCss(rating.Cell);
56
57
  return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(RatingPreview, { rating: rating }) }));
57
58
  };
58
- export const StyledColumnRatingPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnRatingPreview, { data: data }) })] }));
@@ -5,6 +5,3 @@ export declare function getSparklineCellChromeCss(cell: CellBoxStyle | undefined
5
5
  export declare const StyledColumnSparklinePreview: React.FunctionComponent<React.PropsWithChildren<{
6
6
  data: StyledColumn;
7
7
  }>>;
8
- export declare const StyledColumnSparklinePreviewCard: React.FunctionComponent<React.PropsWithChildren<{
9
- data: StyledColumn;
10
- }>>;
@@ -1,11 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
4
4
  import { AdaptableHelper } from '../../../../../Utilities/Helpers/AdaptableHelper';
5
5
  import { resolveSparklineOptionsForRender } from '../../../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
6
6
  import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
7
7
  import { Box } from '../../../../../components/Flex';
8
- import { Card } from '../../../../../components/Card';
9
8
  import { Tag } from '../../../../../components/Tag';
10
9
  import { useAdaptable } from '../../../../AdaptableContext';
11
10
  const FALLBACK_NUMBER_ARRAY = [12, 18, 9, 22, 15, 28, 19, 24, 17, 21];
@@ -123,4 +122,3 @@ export const StyledColumnSparklinePreview = ({ data }) => {
123
122
  const previewCellChrome = getSparklineCellChromeCss(sparklineStyle.Cell);
124
123
  return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(SparklinePreviewCanvas, { sparklineStyle: sparklineStyle, columnId: data.ColumnId }) }));
125
124
  };
126
- export const StyledColumnSparklinePreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Preview" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Sample sparkline using first non-empty cell in Column (or demo data when unavailable)" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnSparklinePreview, { data: data }) })] }));
@@ -13,7 +13,6 @@ import Radio, { RadioGroup } from '../../../../components/Radio';
13
13
  import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from '../StyledColumnSliceStyleEditors';
14
14
  import { Card } from '../../../../components/Card';
15
15
  import { renderSummaryStringTags } from '../../../Wizard/SummaryColorTag';
16
- import { StyledColumnPercentBarPreviewCard } from './Components/StyledColumnPercentBarPreview';
17
16
  // Re-export the Ranges section + summary for legacy import paths.
18
17
  export { renderStyledColumnRangesSummary, StyledColumnWizardRangesSection, } from './StyledColumnWizardRangesSection';
19
18
  // ---------------------------------------------------------------------------
@@ -158,5 +157,5 @@ export const StyledColumnWizardStyleSection = (props) => {
158
157
  delete cleaned.Font;
159
158
  props.onChange({ ...data, PercentBarStyle: cleaned });
160
159
  }
161
- } }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: pb.BackColor ?? undefined, defaultColor: getGraySwatchColor(), onChange: onBackColorChange }) })] }) })] }), _jsx(StyledColumnPercentBarPreviewCard, { data: data })] }));
160
+ } }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: pb.BackColor ?? undefined, defaultColor: getGraySwatchColor(), onChange: onBackColorChange }) })] }) })] })] }));
162
161
  };
@@ -48,7 +48,7 @@ export const CollapsibleWizardCard = (props) => {
48
48
  // inset so it stays inside the element and is always visible.
49
49
  targetOwn.focusOutline, 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: toggleExpanded, onKeyDown: handleTitleKeyDown, tabIndex: 0, "aria-expanded": expanded, role: "button", children: [_jsxs(Box, { className: "twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:cursor-pointer twa:select-none", children: [_jsx(IconComponent, { icon: { name: expanded ? 'collapse' : 'expand' } }), _jsx(Box, { className: "twa:font-medium", children: title })] }), headerVisual ? (_jsx(Box, { className: "twa:flex-1 twa:min-w-0 twa:flex twa:justify-end twa:items-center twa:overflow-hidden twa:pointer-events-none", children: headerVisual })) : headerInline ? (_jsx(Box, { className: cn('twa:flex-1 twa:min-w-0 twa:font-normal', isInteractiveCompactSummary
50
50
  ? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
51
- : cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : (_jsx(Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? (_jsx(Box, { className: "twa:shrink-0", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? (_jsx(Card.Body, { className: cn('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? (_jsx(Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
51
+ : cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : (_jsx(Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? (_jsx(Box, { className: "twa:shrink-0 twa:gap-2 twa:flex", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? (_jsx(Card.Body, { className: cn('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? (_jsx(Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
52
52
  };
53
53
  export function useWizardCardAccordion(initialExpandedId, options) {
54
54
  const fillExpandedCard = options?.fillExpandedCard ?? false;
@@ -57,6 +57,13 @@ export interface OnePageAdaptableWizardProps<ENTITY> {
57
57
  * `FriendlyName`.
58
58
  */
59
59
  moduleName?: string;
60
+ /**
61
+ * Persistent preview rendered as a full-width band beneath the wizard
62
+ * header — visible on every step. Used by wizards (e.g. Styled Column)
63
+ * that want users to see a live preview of the object they're building
64
+ * as they progress.
65
+ */
66
+ headerPreview?: React.ReactNode;
60
67
  }
61
68
  export declare const OnePageAdaptableWizard: <ENTITY extends unknown>(props: OnePageAdaptableWizardProps<ENTITY>) => React.JSX.Element;
62
69
  export declare const OnePageWizardSummary: <ENTITY extends unknown>() => React.JSX.Element;
@@ -41,6 +41,14 @@ export interface OnePageWizardProps<ENTITY> {
41
41
  closeTooltip?: string;
42
42
  finishText?: React.ReactNode;
43
43
  moduleName?: string;
44
+ /**
45
+ * Optional persistent preview rendered as a full-width band beneath the
46
+ * header. Used by wizards (e.g. Styled Column) that want users to see a
47
+ * live preview of the object they're building on every step — the same
48
+ * card the existing Style / Summary steps render, hoisted so it is
49
+ * always visible.
50
+ */
51
+ headerPreview?: React.ReactNode;
44
52
  }
45
53
  export declare const OnePageWizard: <ENTITY extends unknown>(props: OnePageWizardProps<ENTITY>) => React.JSX.Element;
46
54
  export {};
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useState, useRef } from 'react';
4
4
  import { cn } from '../../lib/utils';
@@ -78,7 +78,7 @@ export const OnePageWizard = (props) => {
78
78
  if (section === '-') {
79
79
  return _jsx(React.Fragment, {}, index);
80
80
  }
81
- return (_jsx(Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:min-h-full twa:mr-2", children: _jsx(Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-background", children: section.render(props.data, index) }) }, index));
81
+ return (_jsx(Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:flex-1 twa:overflow-hidden", children: _jsx(Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-background", children: section.render(props.data, index) }) }, index));
82
82
  };
83
83
  const handleNavigation = useKeyboardNavigation(setCurrentSection, visibleSections);
84
84
  const selectedNodeRef = useRef(null);
@@ -166,5 +166,5 @@ export const OnePageWizard = (props) => {
166
166
  }, children: [_jsx(KeyHint, { className: cn('twa:mr-2 twa:inline-block', {
167
167
  'twa:text-accent-foreground': active,
168
168
  }), children: navIndex }), _jsx("div", { className: "twa:flex-1", children: section.title }), _jsx(Icon, { name: "error", className: cn('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
169
- }), selectedFeedback, _jsx(Box, { className: "twa:flex-1" }), _jsxs(KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [isMacLike() ? 'Cmd' : 'Ctrl', " + #", _jsx("br", {}), "or arrow keys", _jsx("br", {}), "to navigate"] })] }), _jsx(Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1", children: renderSection(currentSection) })] }), _jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [_jsx(SimpleButton, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), _jsx(KeyHint, { className: "twa:ml-2", children: "Esc" }), _jsx(Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), _jsx(SimpleButton, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
169
+ }), selectedFeedback, _jsx(Box, { className: "twa:flex-1" }), _jsxs(KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [isMacLike() ? 'Cmd' : 'Ctrl', " + #", _jsx("br", {}), "or arrow keys", _jsx("br", {}), "to navigate"] })] }), _jsxs(Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:overflow-hidden twa:min-w-0 twa:flex-1 twa:gap-2 twa:mr-2", children: [props.headerPreview ? (_jsxs(_Fragment, { children: [_jsx(Box, { className: "ab-OnePageWizard__header-preview", children: props.headerPreview }), _jsx(Box, { as: "hr", className: "ab-OnePageWizard__header-preview-separator twa:w-full twa:border-0 twa:border-t twa:my-0 twa:border-t-input-border" })] })) : null, renderSection(currentSection)] })] }), _jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [_jsx(SimpleButton, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), _jsx(KeyHint, { className: "twa:ml-2", children: "Esc" }), _jsx(Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), _jsx(SimpleButton, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
170
170
  };
@@ -71,9 +71,12 @@ export const ModuleManager = (props) => {
71
71
  'ab-ModuleSelector__UnusedGroups--row': groupsLayout === 'row',
72
72
  }), children: unusedItemGroups.map((group, index) => {
73
73
  const listId = group.listId ?? `UNUSED-${index}`;
74
+ const isRow = groupsLayout === 'row';
75
+ const hasCustomFlex = typeof group.flex === 'number';
74
76
  return (_jsxs(Card, { className: cn('twa:m-0 ab-ModuleSelector__UnusedGroup', {
75
- 'twa:flex-1 twa:min-w-0': groupsLayout === 'row',
76
- }), children: [_jsxs(Card.Title, { border: false, className: "twa:py-2", children: [_jsx(Box, { className: "twa:text-sm twa:font-medium", children: group.title }), group.help ? (_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal", children: group.help })) : null] }), _jsx(Card.Body, { className: "twa:px-0 twa:pt-0", children: _jsx(UnusedPanel, { listId: listId, disabled: disabled, items: group.items }) })] }, listId));
77
+ 'twa:min-w-0': isRow,
78
+ 'twa:flex-1': isRow && !hasCustomFlex,
79
+ }), style: isRow && hasCustomFlex ? { flex: group.flex } : undefined, children: [_jsxs(Card.Title, { border: false, className: "twa:py-2", children: [_jsx(Box, { className: "twa:text-sm twa:font-medium", children: group.title }), group.help ? (_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal", children: group.help })) : null] }), _jsx(Card.Body, { className: "twa:px-0 twa:pt-0", children: _jsx(UnusedPanel, { listId: listId, disabled: disabled, items: group.items }) })] }, listId));
77
80
  }) })] }));
78
81
  };
79
82
  const renderAvailableItemPanels = (options) => {
@@ -12,4 +12,11 @@ export interface UnusedItemGroup {
12
12
  title: string;
13
13
  help?: string;
14
14
  items: string[];
15
+ /**
16
+ * Optional flex weight when groups are laid out in a row. If any group
17
+ * sets this, the weights are used as `flex-grow` values (so e.g. 40 / 60
18
+ * gives a 40% / 60% split). When omitted on every group the layout falls
19
+ * back to equal-width columns.
20
+ */
21
+ flex?: number;
15
22
  }
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1782138884372 || Date.now(),
4
- VERSION: "23.0.0-canary.9" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1782227625016 || Date.now(),
4
+ VERSION: "23.0.0" || '--current-version--',
5
5
  };