@adaptabletools/adaptable 24.0.0-canary.6 → 24.0.0-canary.7

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 (77) hide show
  1. package/index.css +29 -173
  2. package/package.json +1 -1
  3. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +4 -6
  4. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
  5. package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
  6. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
  7. package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
  8. package/src/Api/Internal/AdaptableInternalApi.js +5 -3
  9. package/src/Api/Internal/StateInternalApi.js +4 -3
  10. package/src/Api/UserInterfaceApi.d.ts +0 -4
  11. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -0
  12. package/src/Redux/ActionsReducers/QuickSearchRedux.js +9 -0
  13. package/src/Redux/Store/AdaptableStore.js +4 -2
  14. package/src/Utilities/Helpers/UIHelper.d.ts +6 -11
  15. package/src/Utilities/Helpers/UIHelper.js +6 -33
  16. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
  17. package/src/View/Components/StyleComponent.js +2 -2
  18. package/src/View/Dashboard/Dashboard.d.ts +1 -1
  19. package/src/View/Dashboard/Dashboard.js +1 -1
  20. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  21. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  22. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  23. package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
  24. package/src/View/StyledColumn/RangesComponent.js +8 -11
  25. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
  26. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
  27. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  28. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
  29. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
  30. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
  31. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +4 -4
  32. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
  33. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
  34. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +7 -7
  35. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
  36. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +3 -3
  37. package/src/components/ColorField/index.d.ts +14 -0
  38. package/src/components/ColorField/index.js +6 -0
  39. package/src/env.js +2 -2
  40. package/src/migration/VersionUpgrade24.d.ts +9 -0
  41. package/src/migration/VersionUpgrade24.js +27 -0
  42. package/src/setupDevTools.js +163 -9
  43. package/tsconfig.esm.tsbuildinfo +1 -1
  44. package/vendor/components/ColorField/index.d.ts +43 -0
  45. package/vendor/components/ColorField/index.d.ts.map +1 -0
  46. package/vendor/components/ColorField/index.js +81 -0
  47. package/vendor/components/ColorField/index.js.map +1 -0
  48. package/vendor/components/ColorPicker/colorPickerTab.d.ts +2 -2
  49. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -1
  50. package/vendor/components/ColorPicker/colorPickerTab.js +6 -28
  51. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -1
  52. package/vendor/components/ColorPicker/index.d.ts +36 -8
  53. package/vendor/components/ColorPicker/index.d.ts.map +1 -1
  54. package/vendor/components/ColorPicker/index.js +97 -25
  55. package/vendor/components/ColorPicker/index.js.map +1 -1
  56. package/vendor/components/ColorPicker/themeColors.d.ts +33 -4
  57. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -1
  58. package/vendor/components/ColorPicker/themeColors.js +76 -18
  59. package/vendor/components/ColorPicker/themeColors.js.map +1 -1
  60. package/vendor/components/NumberInput/index.d.ts +51 -0
  61. package/vendor/components/NumberInput/index.d.ts.map +1 -0
  62. package/vendor/components/NumberInput/index.js +82 -0
  63. package/vendor/components/NumberInput/index.js.map +1 -0
  64. package/vendor/components/index.css +67 -24
  65. package/vendor/components/index.d.ts +6 -2
  66. package/vendor/components/index.d.ts.map +1 -1
  67. package/vendor/components/index.js +3 -1
  68. package/vendor/components/index.js.map +1 -1
  69. package/vendor/components/ui/input-group.d.ts.map +1 -1
  70. package/vendor/components/ui/input-group.js +5 -4
  71. package/vendor/components/ui/input-group.js.map +1 -1
  72. package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
  73. package/src/components/ColorPicker/ColorPicker.js +0 -48
  74. package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
  75. package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
  76. package/src/components/ColorPicker/index.d.ts +0 -2
  77. package/src/components/ColorPicker/index.js +0 -2
@@ -10,7 +10,7 @@ import { getSettingsPanelNavigationItems } from './useMenuItems';
10
10
  import { isSettingsPanelNavigationItem, } from './settingsPanelNavigationTypes';
11
11
  import { SidebarTrigger } from '../../../../components/ui/sidebar';
12
12
  import { Flex } from '../../../../components/Flex';
13
- import { Input } from '../../../../components/ui/input';
13
+ import { AdaptableFormControlTextClear } from '../../Forms/AdaptableFormControlTextClear';
14
14
  import { Tooltip } from '../../../../components/Tooltip';
15
15
  import { resolveSettingsPanelDisplayOptions } from '../../../../Utilities/Helpers/SettingsPanelHelper';
16
16
  const navigationItemClassName = 'ab-Adaptable-Popup__Navigation__List__Item';
@@ -56,13 +56,7 @@ export const filterSettingsPanelNavigationEntries = (entries, query) => {
56
56
  }
57
57
  return filtered;
58
58
  };
59
- const NavigationItem = ({ menuItem, description, isActive, dataName, customPanelIcon, isCustomSettingsPanel, onAction, showModuleIcons, showModuleDescriptions, collapsed, }) => {
60
- const ref = useRef(null);
61
- useEffect(() => {
62
- if (isActive) {
63
- ref.current?.focus();
64
- }
65
- }, [isActive]);
59
+ const NavigationItem = ({ menuItem, description, isActive, dataName, customPanelIcon, isCustomSettingsPanel, onAction, showModuleIcons, showModuleDescriptions, collapsed, buttonRef, }) => {
66
60
  const visibleDescription = !collapsed && showModuleDescriptions ? description : undefined;
67
61
  let icon = null;
68
62
  if (isCustomSettingsPanel) {
@@ -82,7 +76,7 @@ const NavigationItem = ({ menuItem, description, isActive, dataName, customPanel
82
76
  return (_jsx("li", { className: cn(navigationItemClassName, {
83
77
  [`${navigationItemClassName}--active`]: isActive,
84
78
  [`${navigationItemClassName}--collapsed`]: collapsed,
85
- }), children: _jsxs("button", { ref: ref, type: "button", title: tooltip, "aria-label": menuItem.label, className: cn(`${navigationItemClassName}__Button ${targetOwn.focusOutline}`, {
79
+ }), children: _jsxs("button", { ref: buttonRef, type: "button", title: tooltip, "aria-label": menuItem.label, className: cn(`${navigationItemClassName}__Button ${targetOwn.focusOutline}`, {
86
80
  'twa:flex twa:flex-row twa:gap-2': true,
87
81
  'twa:items-start': Boolean(visibleDescription),
88
82
  'twa:items-center': !visibleDescription,
@@ -128,6 +122,10 @@ export const Navigation = (props) => {
128
122
  const { showModuleIcons, showModuleDescriptions, showNavigationSearch, enableCollapseView, } = displayOptions;
129
123
  const collapsed = enableCollapseView && (props.collapsed ?? false);
130
124
  const visibleMenuItems = useMemo(() => filterSettingsPanelNavigationEntries(props.menuItems, searchQuery), [props.menuItems, searchQuery]);
125
+ const activeButtonRef = useRef(null);
126
+ useEffect(() => {
127
+ activeButtonRef.current?.focus();
128
+ }, [props.activeItem]);
131
129
  const makeActive = (menuItem) => {
132
130
  dispatch(menuItem.reduxAction);
133
131
  };
@@ -167,7 +165,7 @@ export const Navigation = (props) => {
167
165
  'twa:justify-center twa:px-1 twa:pt-2 twa:pb-1': collapsed,
168
166
  'twa:px-2 twa:pt-2 twa:pb-1': !collapsed,
169
167
  'twa:justify-end': !collapsed && !showSearchInput,
170
- }), children: [showSearchInput ? (_jsx(Input, { "data-name": "settings-panel-nav-search", type: "search", value: searchQuery, onChange: (event) => setSearchQuery(event.currentTarget.value), placeholder: "Search...", "aria-label": "Search Settings Panel modules", className: "twa:h-8 twa:flex-1 twa:min-w-0 twa:text-2" })) : null, collapseTrigger] })) : null, _jsxs("ul", { className: "ab-Adaptable-Popup__Navigation__List twa:m-0 twa:list-none twa:py-3 twa:gap-1 twa:flex twa:flex-col twa:flex-1 twa:min-h-0 twa:overflow-auto", onKeyDown: handleKeyPress, children: [!hasVisibleItems ? (_jsx("li", { className: "twa:list-none twa:px-3 twa:py-2 twa:text-2 twa:opacity-70", children: collapsed ? null : 'No modules match' })) : null, visibleMenuItems.map((entry, index) => {
168
+ }), children: [showSearchInput ? (_jsx(AdaptableFormControlTextClear, { "data-name": "settings-panel-nav-search", value: searchQuery, OnTextChange: setSearchQuery, placeholder: "Search...", "aria-label": "Search Settings Panel modules", className: "twa:h-8 twa:flex-1 twa:min-w-0", inputClassName: "twa:text-2" })) : null, collapseTrigger] })) : null, _jsxs("ul", { className: "ab-Adaptable-Popup__Navigation__List twa:m-0 twa:list-none twa:py-3 twa:gap-1 twa:flex twa:flex-col twa:flex-1 twa:min-h-0 twa:overflow-auto", onKeyDown: handleKeyPress, children: [!hasVisibleItems ? (_jsx("li", { className: "twa:list-none twa:px-3 twa:py-2 twa:text-2 twa:opacity-70", children: collapsed ? null : 'No modules match' })) : null, visibleMenuItems.map((entry, index) => {
171
169
  if (entry.type === 'header') {
172
170
  if (collapsed) {
173
171
  return null;
@@ -181,6 +179,6 @@ export const Navigation = (props) => {
181
179
  const dataName = isCustomSettingsPanel
182
180
  ? `CSP-${menuItem.label}`
183
181
  : menuItem.category ?? menuItem.label;
184
- return (_jsx(NavigationItem, { menuItem: menuItem, description: entry.description, isActive: isActive, dataName: dataName, customPanelIcon: customPanelIcon, isCustomSettingsPanel: isCustomSettingsPanel, showModuleIcons: showModuleIcons, showModuleDescriptions: showModuleDescriptions, collapsed: collapsed, onAction: () => makeActive(menuItem) }, menuItem.label));
182
+ return (_jsx(NavigationItem, { menuItem: menuItem, description: entry.description, isActive: isActive, dataName: dataName, customPanelIcon: customPanelIcon, isCustomSettingsPanel: isCustomSettingsPanel, showModuleIcons: showModuleIcons, showModuleDescriptions: showModuleDescriptions, collapsed: collapsed, onAction: () => makeActive(menuItem), buttonRef: isActive ? activeButtonRef : undefined }, menuItem.label));
185
183
  })] })] }));
186
184
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { OptionalColorPicker } from '../../components/ColorPicker';
3
+ import { ColorField } from '../../components/ColorField';
4
4
  import HelpBlock from '../../components/HelpBlock';
5
5
  import Panel from '../../components/Panel';
6
6
  import { Tabs } from '../../components/Tabs';
@@ -131,7 +131,7 @@ export const StyleComponent = (props) => {
131
131
  const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
132
132
  const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
133
133
  const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
134
- const styleEditorGrid = (_jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2 twa:self-stretch", children: [_jsxs(Box, { className: "twa:font-medium", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Select ", coloursSpellingVariant, " and radius"] })] }), _jsxs("span", { children: ["Back ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { api: props.api, value: componentStyle.BackColor, defaultColor: "#ffffff", onChange: onBackColorChange }), _jsxs("span", { className: "twa:row-start-3", children: ["Fore ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-3", api: props.api, value: componentStyle.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }), _jsxs("span", { className: "twa:row-start-4", children: ["Border ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-4", api: props.api, value: componentStyle.BorderColor, defaultColor: "#000000", onChange: onBorderColorChange }), _jsx("span", { className: "twa:row-start-5", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-5", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
134
+ const styleEditorGrid = (_jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2 twa:self-stretch", children: [_jsxs(Box, { className: "twa:font-medium", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Select ", coloursSpellingVariant, " and radius"] })] }), _jsxs("span", { children: ["Back ", colourSpellingVariant] }), _jsx(ColorField, { value: componentStyle.BackColor, defaultColor: "#ffffff", onChange: onBackColorChange }), _jsxs("span", { className: "twa:row-start-3", children: ["Fore ", colourSpellingVariant] }), _jsx(ColorField, { className: "twa:row-start-3", value: componentStyle.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }), _jsxs("span", { className: "twa:row-start-4", children: ["Border ", colourSpellingVariant] }), _jsx(ColorField, { className: "twa:row-start-4", value: componentStyle.BorderColor, defaultColor: "#000000", onChange: onBorderColorChange }), _jsx("span", { className: "twa:row-start-5", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-5", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
135
135
  const number = Number(event.target.value);
136
136
  if (isNaN(number)) {
137
137
  onBorderRadiusChange(0);
@@ -18,7 +18,7 @@ interface DashboardComponentProps extends ModuleViewPopupProps<any> {
18
18
  onSetIsCollapsed: (IsCollapsed: boolean) => DashboardRedux.DashboardSetIsCollapsedAction;
19
19
  onSetIsFloating: (IsFloating: boolean) => DashboardRedux.DashboardSetIsFloatingAction;
20
20
  onSetFloatingPosition: (FloatingPosition: AdaptableCoordinate) => DashboardRedux.DashboardSetFloatingPositionAction;
21
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
21
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction | QuickSearchRedux.QuickSearchClearAction;
22
22
  onShowQuickSearchPopup: () => PopupRedux.PopupShowScreenAction;
23
23
  onShowDashboardPopup: () => PopupRedux.PopupShowScreenAction;
24
24
  }
@@ -126,7 +126,7 @@ function mapDispatchToProps(dispatch) {
126
126
  onSetIsCollapsed: (IsCollapsed) => dispatch(DashboardRedux.DashboardSetIsCollapsed(IsCollapsed)),
127
127
  onSetIsFloating: (IsFloating) => dispatch(DashboardRedux.DashboardSetIsFloating(IsFloating)),
128
128
  onSetFloatingPosition: (FloatingPosition) => dispatch(DashboardRedux.DashboardSetFloatingPosition(FloatingPosition)),
129
- onRunQuickSearch: (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)),
129
+ onRunQuickSearch: (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(newQuickSearchText)),
130
130
  onShowQuickSearchPopup: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.QuickSearchModuleId, 'QuickSearchPopup')),
131
131
  onShowDashboardPopup: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.DashboardModuleId, 'DashboardPopup')),
132
132
  };
@@ -12,7 +12,7 @@ export const QuickSearchInput = (props) => {
12
12
  const adaptable = useAdaptable();
13
13
  const QuickSearchText = useSelector((state) => state.QuickSearch.QuickSearchText);
14
14
  const dispatch = useDispatch();
15
- const onRunQuickSearch = React.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
15
+ const onRunQuickSearch = React.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(newQuickSearchText)), []);
16
16
  const isServerSideRowModel = adaptable.api.gridApi.getAgGridRowModelType() === 'serverSide';
17
17
  const [searchText, search] = useQuickSearchDebounced({
18
18
  QuickSearchText,
@@ -7,7 +7,7 @@ interface QuickSearchPopupProps extends ModuleViewPopupProps<any> {
7
7
  QuickSearchTextMatchStyle: AdaptableStyle;
8
8
  QuickSearchCurrentTextMatchStyle: AdaptableStyle;
9
9
  QuickSearchCellMatchStyle: AdaptableStyle;
10
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
10
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction | QuickSearchRedux.QuickSearchClearAction;
11
11
  onSetTextMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetTextMatchingStyleAction;
12
12
  onSetCurrentTextMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetCurrentTextMatchingStyleAction;
13
13
  onSetCellMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetMatchingCellStyleAction;
@@ -39,7 +39,7 @@ function mapStateToProps(state, ownProps) {
39
39
  }
40
40
  function mapDispatchToProps(dispatch) {
41
41
  return {
42
- onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(quickSearchText)),
42
+ onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(quickSearchText)),
43
43
  onSetTextMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetTextMatchingStyle(style)),
44
44
  onSetCurrentTextMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCurrentTextMatchingStyle(style)),
45
45
  onSetCellMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style)),
@@ -1,6 +1,6 @@
1
- import { QuickSearchRunAction } from '../../../Redux/ActionsReducers/QuickSearchRedux';
1
+ import { QuickSearchClearAction, QuickSearchRunAction } from '../../../Redux/ActionsReducers/QuickSearchRedux';
2
2
  type UseQuickSearchProps = {
3
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRunAction;
3
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRunAction | QuickSearchClearAction;
4
4
  QuickSearchText: string;
5
5
  };
6
6
  export declare const useQuickSearchDebounced: (props: UseQuickSearchProps) => [string, (s: string) => void];
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { ColorPicker } from '../../components/ColorPicker';
3
+ import { ColorField } from '../../components/ColorField';
4
4
  import { clamp } from '../../Utilities/Extensions/NumberExtensions';
5
5
  import { CheckBox } from '../../components/CheckBox';
6
6
  import FormLayout, { FormRow } from '../../components/FormLayout';
7
7
  import { NumberInput } from '../../components/Input/NumberInput';
8
8
  import SimpleButton from '../../components/SimpleButton';
9
9
  import { ButtonNew } from '../Components/Buttons/ButtonNew';
10
- import { getDefaultRangeColor } from '../../Utilities/Helpers/UIHelper';
10
+ import { getDefaultRangeColor, getDefaultZeroCentredColors, } from '../../Utilities/Helpers/UIHelper';
11
11
  import { ColumnSelector } from '../Components/Selectors/ColumnSelector';
12
12
  import { Tabs } from '../../components/Tabs';
13
13
  import Radio from '../../components/Radio';
@@ -16,10 +16,7 @@ import { SingleSelect } from '../../components/Select';
16
16
  import { InputGroup } from '../../components/InputGroup';
17
17
  import { Icon } from '../../components/icons';
18
18
  import HelpBlock from '../../components/HelpBlock';
19
- const DEFAULT_ZERO_CENTRED_COLORS = {
20
- NegativeColor: 'rgba(220, 53, 69, 0.55)',
21
- PositiveColor: 'rgba(40, 167, 69, 0.55)',
22
- };
19
+ const DEFAULT_ZERO_CENTRED_COLORS = getDefaultZeroCentredColors();
23
20
  const hasConfiguredRanges = (ranges) => (ranges?.length ?? 0) > 0;
24
21
  function deriveInitialRangesType(props) {
25
22
  if (props.columnComparison) {
@@ -82,7 +79,7 @@ export class RangesComponent extends React.Component {
82
79
  range.Max === 'Col-Max' ||
83
80
  (index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
84
81
  this.changeRangeMax(index, value);
85
- } })] }), _jsx(ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
82
+ } })] }), _jsx(ColorField, { clearable: false, value: range.Color, onChange: (color) => {
86
83
  this.changeRangeColor(index, color);
87
84
  }, className: "twa:h-[33px] twa:pl-2" }), this.props.showRangeDirection && (_jsx(CheckBox, { disabled: this.props.disabled, checked: !!range.ReverseGradient, onChange: (checked) => this.changeRangeDirectionUp(index, checked), children: "Reverse Gradient" })), _jsx(SimpleButton, { icon: "delete", disabled: this.props.disabled ||
88
85
  (!this.props.allowEmptyRanges &&
@@ -93,7 +90,7 @@ export class RangesComponent extends React.Component {
93
90
  const apply = (next) => this.props.onApplyZeroCentred?.(next);
94
91
  const minLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.min : 'column min';
95
92
  const maxLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.max : 'column max';
96
- return (_jsxs(Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Colour cells on a diverging scale centred at zero." }), _jsx(Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), _jsxs(FormLayout, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [_jsx(FormRow, { label: `Negative (${minLabel} → 0):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), _jsx(FormRow, { label: `Positive (0 → ${maxLabel}):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
93
+ return (_jsxs(Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Colour cells on a diverging scale centred at zero." }), _jsx(Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), _jsxs(FormLayout, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [_jsx(FormRow, { label: `Negative (${minLabel} → 0):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), _jsx(FormRow, { label: `Positive (0 → ${maxLabel}):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
97
94
  };
98
95
  const describeBound = (bound) => {
99
96
  if (bound == null || bound === '') {
@@ -105,7 +102,7 @@ export class RangesComponent extends React.Component {
105
102
  const friendlyName = this.props.api.columnApi.getFriendlyNameForColumnId(String(bound));
106
103
  return (_jsxs(_Fragment, { children: [_jsx("strong", { children: friendlyName }), " ", _jsx("span", { className: "twa:opacity-60", children: "(per row)" })] }));
107
104
  };
108
- const renderColumnComparisonContent = () => (_jsxs(Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsxs(Box, { children: ["Scale each cell's bar between a ", _jsx("strong", { children: "Minimum" }), " and a", ' ', _jsx("strong", { children: "Maximum" }), "."] }), _jsxs(Box, { children: ["Set each to a fixed ", _jsx("strong", { children: "Value" }), " (same for all rows) or a", ' ', _jsx("strong", { children: "Column" }), " (read from that column on each row)."] })] }), _jsxs(FormLayout, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [_jsx(FormRow, { label: "Minimum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), _jsx(FormRow, { label: "Maximum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), _jsx(FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
105
+ const renderColumnComparisonContent = () => (_jsxs(Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsxs(Box, { children: ["Scale each cell's bar between a ", _jsx("strong", { children: "Minimum" }), " and a", ' ', _jsx("strong", { children: "Maximum" }), "."] }), _jsxs(Box, { children: ["Set each to a fixed ", _jsx("strong", { children: "Value" }), " (same for all rows) or a", ' ', _jsx("strong", { children: "Column" }), " (read from that column on each row)."] })] }), _jsxs(FormLayout, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [_jsx(FormRow, { label: "Minimum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), _jsx(FormRow, { label: "Maximum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), _jsx(FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: comparisonColor, onChange: (color) => {
109
106
  this.changeColumnComparisonColor(color);
110
107
  } }) })] }), _jsxs(Box, { className: "twa:mt-2 twa:p-2 twa:text-3 twa:opacity-80", "data-name": "cc-summary", children: ["Each row's bar runs from ", describeBound(this.props.columnComparison?.MinValue), " to", ' ', describeBound(this.props.columnComparison?.MaxValue), "."] })] }, 'cc'));
111
108
  const tabFlex = { flex: 1 };
@@ -263,12 +260,12 @@ export class RangesComponent extends React.Component {
263
260
  {
264
261
  Min: isPercentage ? 0 : 'Col-Min',
265
262
  Max: mid,
266
- Color: 'rgba(128, 128, 128, 0.25)',
263
+ Color: getDefaultRangeColor(),
267
264
  },
268
265
  {
269
266
  Min: mid,
270
267
  Max: isPercentage ? 100 : 'Col-Max',
271
- Color: 'rgba(128, 128, 128, 0.55)',
268
+ Color: getDefaultRangeColor(),
272
269
  },
273
270
  ];
274
271
  })();
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi } from '../../../Api/AdaptableApi';
3
2
  import { BadgePillStyle } from '../../../AdaptableState/StyledColumns/BadgeStyle';
4
3
  export interface BadgePillStyleEditorProps {
5
- api: AdaptableApi;
6
4
  /** Current pill style (may be undefined / partial). */
7
5
  value: BadgePillStyle | undefined;
8
6
  /**
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { OptionalColorPicker } from '../../../components/ColorPicker';
2
+ import { ColorField } from '../../../components/ColorField';
3
3
  import FormLayout, { FormRow } from '../../../components/FormLayout';
4
4
  import { Box, Flex } from '../../../components/Flex';
5
5
  import { Toggle, ToggleGroup } from '../../../components/Toggle';
@@ -25,7 +25,7 @@ export const BadgePillStyleEditor = (props) => {
25
25
  }
26
26
  };
27
27
  const disabledClass = disabled ? 'twa:opacity-50 twa:pointer-events-none' : '';
28
- const form = (_jsxs(FormLayout, { columns: [LABEL_COLUMN, CHILD_COLUMN], sizes: ['7.5rem', '1fr'], gridColumnGap: "0.75rem", children: [_jsx(FormRow, { label: "Background", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.BackColor, defaultColor: "#cccccc", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Text", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.ForeColor, defaultColor: "#000000", onChange: (c) => update({ ForeColor: c }) }) }), _jsx(FormRow, { label: "Border", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Font", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: pill.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: pill.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: pill.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] })] }) }) })] }));
28
+ const form = (_jsxs(FormLayout, { columns: [LABEL_COLUMN, CHILD_COLUMN], sizes: ['7.5rem', '1fr'], gridColumnGap: "0.75rem", children: [_jsx(FormRow, { label: "Background", children: _jsx(ColorField, { disabled: disabled, value: pill.BackColor, defaultColor: "#cccccc", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Text", children: _jsx(ColorField, { disabled: disabled, value: pill.ForeColor, defaultColor: "#000000", onChange: (c) => update({ ForeColor: c }) }) }), _jsx(FormRow, { label: "Border", children: _jsx(ColorField, { disabled: disabled, value: pill.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Font", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: pill.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: pill.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: pill.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] })] }) }) })] }));
29
29
  if (props.embedded) {
30
30
  return form;
31
31
  }
@@ -75,7 +75,6 @@ const getBadgeDefinitionSummaryItems = (badge, api) => {
75
75
  const BadgePreview = ({ badge, density, previewValue }) => (_jsx(Badge, { pillStyle: badge.PillStyle, icon: badge.IconProperties?.Icon, iconPosition: badge.IconProperties?.Position, shape: badge.Shape, density: density, iconGap: badge.IconProperties?.Gap, children: badge.IconProperties?.IconOnly ? '' : previewValue }));
76
76
  const BadgeCardSummary = ({ badge, api }) => (_jsx(CollapsibleWizardValueSummary, { value: renderSummaryLabelValueTags(getBadgeDefinitionSummaryItems(badge, api)) }));
77
77
  const BadgeEditorForm = (props) => {
78
- const { api } = useOnePageAdaptableWizardContext();
79
78
  const { badge, columnId, onChange } = props;
80
79
  const currentShape = badge.Shape ?? 'Rounded';
81
80
  const iconProps = badge.IconProperties;
@@ -93,7 +92,7 @@ const BadgeEditorForm = (props) => {
93
92
  }
94
93
  onChange({ ...badge, IconProperties: next });
95
94
  };
96
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
95
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, value: badge.PillStyle, onChange: (next) => {
97
96
  if (next) {
98
97
  onChange({ ...badge, PillStyle: next });
99
98
  }
@@ -263,7 +262,7 @@ export const StyledColumnBadgeStyleSection = (props) => {
263
262
  updateBadgeStyle({
264
263
  Spacing: typeof value === 'number' && value >= 0 ? value : undefined,
265
264
  });
266
- } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between adjacent badges" })] }) }) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Overflow" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure the overflow mode for badges" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Overflow mode", children: _jsx(Box, { className: "twa:ml-2", children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-badgestyle-overflow", value: currentOverflow, onRadioChange: (value) => updateBadgeStyle({ OverflowMode: value }), children: OVERFLOW_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[110px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) }) }) }) })] })] })), _jsxs(Card, { shadow: false, 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: "Styling and alignment to apply to Badge cells (overrides Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Alignment:", children: _jsx(Flex, { alignItems: "center", className: "twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: currentAlignment === 'Left', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: currentAlignment === 'Center', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: currentAlignment === 'Right', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Right' : undefined) })] }) }) }) }), _jsx(Box, { className: "twa:mt-3", children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: badgeStyle.Cell, onChange: (next) => {
265
+ } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between adjacent badges" })] }) }) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Overflow" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure the overflow mode for badges" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Overflow mode", children: _jsx(Box, { className: "twa:ml-2", children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-badgestyle-overflow", value: currentOverflow, onRadioChange: (value) => updateBadgeStyle({ OverflowMode: value }), children: OVERFLOW_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[110px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) }) }) }) })] })] })), _jsxs(Card, { shadow: false, 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: "Styling and alignment to apply to Badge cells (overrides Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Alignment:", children: _jsx(Flex, { alignItems: "center", className: "twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: currentAlignment === 'Left', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: currentAlignment === 'Center', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: currentAlignment === 'Right', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Right' : undefined) })] }) }) }) }), _jsx(Box, { className: "twa:mt-3", children: _jsx(StyledColumnCellStyleEditor, { disabled: disabled, value: badgeStyle.Cell, onChange: (next) => {
267
266
  if (next) {
268
267
  updateBadgeStyle({ Cell: next });
269
268
  }
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi } from '../../../Api/AdaptableApi';
3
2
  import { CellBoxStyle, CellFontStyle } from '../../../AdaptableState/Common/AdaptableStyle';
4
3
  export interface StyledColumnFontStyleEditorProps {
5
- api: AdaptableApi;
6
4
  /** Current Font slice (may be undefined / partial). */
7
5
  value: CellFontStyle | undefined;
8
6
  /**
@@ -19,7 +17,6 @@ export interface StyledColumnFontStyleEditorProps {
19
17
  }
20
18
  export declare const StyledColumnFontStyleEditor: React.FunctionComponent<StyledColumnFontStyleEditorProps>;
21
19
  export interface StyledColumnCellStyleEditorProps {
22
- api: AdaptableApi;
23
20
  /** Current Cell slice (may be undefined / partial). */
24
21
  value: CellBoxStyle | undefined;
25
22
  /**
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { OptionalColorPicker } from '../../../components/ColorPicker';
3
+ import { ColorField } from '../../../components/ColorField';
4
4
  import FormLayout, { FormRow } from '../../../components/FormLayout';
5
5
  import { Box, Flex } from '../../../components/Flex';
6
6
  import { NumberInput } from '../../../components/Input/NumberInput';
@@ -42,7 +42,7 @@ export const StyledColumnFontStyleEditor = (props) => {
42
42
  const onAlignmentChange = (alignment) => {
43
43
  update({ Alignment: alignment });
44
44
  };
45
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: font.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
45
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: font.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
46
46
  FontSize: (value || undefined),
47
47
  }) }) })] }) }) }), !hideAlignment && (_jsx(FormRow, { label: "Alignment:", children: _jsx(Box, { className: disabledClass, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: font.Alignment === 'Left', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: font.Alignment === 'Center', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: font.Alignment === 'Right', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Right' : undefined) })] }) }) }) }))] }) }));
48
48
  };
@@ -66,7 +66,7 @@ export const StyledColumnCellStyleEditor = (props) => {
66
66
  props.onChange(next);
67
67
  }
68
68
  };
69
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BackColor, defaultColor: "#ffffff", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Border colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
69
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: cell.BackColor, defaultColor: "#ffffff", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Border colour:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: cell.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
70
70
  };
71
71
  export const getCellFontStyleSummaryItems = (font) => {
72
72
  if (!font) {
@@ -6,7 +6,7 @@ import FormLayout, { FormRow } from '../../../components/FormLayout';
6
6
  import { Tag } from '../../../components/Tag';
7
7
  import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
8
8
  import AdaptableInput from '../../Components/AdaptableInput';
9
- import { ColorPicker } from '../../../components/ColorPicker';
9
+ import { ColorField } from '../../../components/ColorField';
10
10
  import { CheckBox } from '../../../components/CheckBox';
11
11
  import { Box, Flex } from '../../../components/Flex';
12
12
  import { getCellBoxStyleSummaryItems, StyledColumnCellStyleEditor, } from './StyledColumnSliceStyleEditors';
@@ -144,7 +144,7 @@ export const StyledColumnSparklineSettingsSection = ({ onChange }) => {
144
144
  }), placeholder: 'Auto', title: "User override for the automatically determined min value (based on series data)" }) }), _jsx(FormRow, { label: "Max Value:", children: _jsx(AdaptableInput, { disabled: disabled, type: "number", value: sparklineOptions.max ?? '', onChange: (e) => handleOptionsChange({
145
145
  ...sparklineOptions,
146
146
  max: e.target.value === '' ? undefined : Number(e.target.value),
147
- }), placeholder: 'Auto', title: "User override for the automatically determined max value (based on series data)" }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Theming" }), _jsx(Card.Body, { children: _jsx(SparklineThemingOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Axis" }), _jsx(Card.Body, { children: _jsx(SparklineAxisOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), sparklineOptions.type !== 'bar' && (_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Markers" }), _jsx(Card.Body, { children: _jsx(SparklineMarkerOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] })), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Tooltip" }), _jsx(Card.Body, { children: _jsx(SparklineTooltipOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Highlight" }), _jsx(Card.Body, { children: _jsx(SparklineHighlightOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Optional cell-box styling behind the sparkline" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: data.SparklineStyle?.Cell, onChange: (next) => {
147
+ }), placeholder: 'Auto', title: "User override for the automatically determined max value (based on series data)" }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Theming" }), _jsx(Card.Body, { children: _jsx(SparklineThemingOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Axis" }), _jsx(Card.Body, { children: _jsx(SparklineAxisOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), sparklineOptions.type !== 'bar' && (_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Markers" }), _jsx(Card.Body, { children: _jsx(SparklineMarkerOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] })), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Tooltip" }), _jsx(Card.Body, { children: _jsx(SparklineTooltipOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Highlight" }), _jsx(Card.Body, { children: _jsx(SparklineHighlightOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Optional cell-box styling behind the sparkline" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { disabled: disabled, value: data.SparklineStyle?.Cell, onChange: (next) => {
148
148
  const sparkStyle = { ...(data.SparklineStyle ?? {}) };
149
149
  if (next) {
150
150
  sparkStyle.Cell = next;
@@ -181,7 +181,6 @@ const SparklineObjectArrayProperties = ({ options, onChange, }) => {
181
181
  return (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "X Key", children: _jsx(AdaptableInput, { value: options.xKey ?? 'x', onChange: (e) => onChange({ ...options, xKey: e.target.value }) }) }), _jsx(FormRow, { label: "Y Key", children: _jsx(AdaptableInput, { value: options.yKey ?? 'y', onChange: (e) => onChange({ ...options, yKey: e.target.value }) }) }), previewData && (_jsx(FormRow, { label: "Preview", children: _jsx(Tag, { children: previewData }) }))] }));
182
182
  };
183
183
  const SparklineThemingOptions = ({ options, onChange, }) => {
184
- const { api } = useOnePageAdaptableWizardContext();
185
184
  const sparklineOptions = options;
186
185
  const handleChange = (key, value) => {
187
186
  onChange({ ...options, [key]: value });
@@ -219,7 +218,7 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
219
218
  { value: 'ag-financial', label: 'Financial' },
220
219
  { value: 'ag-financial-dark', label: 'Financial Dark' },
221
220
  ];
222
- return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorPicker, { title: "The colour for filling shapes", api: api, value: cssColorToString(sparklineOptions.fill) ?? '', onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the stroke", api: api, value: cssColorToString(sparklineOptions.stroke) ?? '', onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
221
+ return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorField, { clearable: false, title: "The colour for filling shapes", value: cssColorToString(sparklineOptions.fill) ?? '', onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the stroke", value: cssColorToString(sparklineOptions.stroke) ?? '', onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
223
222
  ? 'Line colour. Marker colours are in the Markers card.'
224
223
  : 'Outline colour — increase width to see it on bars and columns.' })] }) }), _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Top" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().top ?? '', onChange: (e) => handlePaddingChange('top', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the top of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Right" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().right ?? '', onChange: (e) => handlePaddingChange('right', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the right of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Bottom" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().bottom ?? '', onChange: (e) => handlePaddingChange('bottom', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the bottom of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Left" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().left ?? '', onChange: (e) => handlePaddingChange('left', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the left of the chart area" })] }) }), _jsx(FormRow, { label: "Line Dash", children: _jsx(AdaptableInput, { title: "Length of dashes and gaps in pixels (comma-separated values, e.g. '3,6,9')", value: sparklineOptions.lineDash?.join(',') ?? '', onChange: (e) => {
225
224
  const value = e.target.value;
@@ -233,7 +232,7 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
233
232
  } }) }), _jsx(FormRow, { label: "Line Dash Offset", children: _jsx(AdaptableInput, { title: "The offset of the line dash pattern in pixels", type: "number", min: 0, value: sparklineOptions.lineDashOffset ?? '', onChange: (e) => handleChange('lineDashOffset', Number(e.target.value)) }) }), _jsx(FormRow, { label: "Background", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: sparklineOptions.background?.visible ?? false, onChange: (visible) => handleChange('background', {
234
233
  ...sparklineOptions.background,
235
234
  visible,
236
- }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: !sparklineOptions.background?.visible, title: "The colour of the chart background", api: api, value: cssColorToString(sparklineOptions.background?.fill) ?? '', onChange: (fill) => handleChange('background', {
235
+ }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, title: "The colour of the chart background", disabled: !sparklineOptions.background?.visible, value: cssColorToString(sparklineOptions.background?.fill) ?? '', onChange: (fill) => handleChange('background', {
237
236
  ...sparklineOptions.background,
238
237
  fill,
239
238
  }) }) })] }) }), typeof sparklineOptions.theme !== 'object' && (_jsx(FormRow, { label: "Theme", children: _jsxs(Box, { children: [_jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: sparklineOptions.theme ?? SPARKLINE_CUSTOM_COLOURS_THEME, onValueChange: (themeName) => {
@@ -247,7 +246,6 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
247
246
  }, items: themes }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Palette preset. Use Custom colours when Fill / Stroke above should control the chart." })] }) }))] }));
248
247
  };
249
248
  const SparklineAxisOptions = ({ options, onChange, }) => {
250
- const { api } = useOnePageAdaptableWizardContext();
251
249
  const sparklineOptions = {
252
250
  ...(options ?? {}),
253
251
  axis: {
@@ -270,7 +268,7 @@ const SparklineAxisOptions = ({ options, onChange, }) => {
270
268
  { value: 'time', label: 'Time' },
271
269
  ];
272
270
  const isAxisEnabled = sparklineOptions.axis?.visible ?? false;
273
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isAxisEnabled, title: "The colour of the axis line", api: api, value: cssColorToString(sparklineOptions.axis?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
271
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour of the axis line", disabled: !isAxisEnabled, value: cssColorToString(sparklineOptions.axis?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
274
272
  };
275
273
  const SparklineTooltipOptions = ({ options, onChange, }) => {
276
274
  const sparklineOptions = options;
@@ -315,7 +313,6 @@ const SparklineTooltipOptions = ({ options, onChange, }) => {
315
313
  }) }) }) })] }));
316
314
  };
317
315
  const SparklineMarkerOptions = ({ options, onChange }) => {
318
- const { api } = useOnePageAdaptableWizardContext();
319
316
  const sparklineOptions = options;
320
317
  const handleChange = (value) => {
321
318
  onChange({
@@ -338,10 +335,9 @@ const SparklineMarkerOptions = ({ options, onChange }) => {
338
335
  { value: 'triangle', label: 'Triangle' },
339
336
  ];
340
337
  const isMarkerEnabled = sparklineOptions.marker?.enabled ?? false;
341
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for filling markers", api: api, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for the marker stroke", api: api, value: cssColorToString(sparklineOptions.marker?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
338
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorField, { clearable: false, title: "The colour for filling markers", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the marker stroke", disabled: !isMarkerEnabled, value: cssColorToString(sparklineOptions.marker?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
342
339
  };
343
340
  const SparklineHighlightOptions = ({ options, onChange, }) => {
344
- const { api } = useOnePageAdaptableWizardContext();
345
341
  const highlightOptions = options.highlight;
346
342
  const handleBaseChange = (value) => {
347
343
  onChange({
@@ -376,5 +372,5 @@ const SparklineHighlightOptions = ({ options, onChange, }) => {
376
372
  },
377
373
  });
378
374
  };
379
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorPicker, { title: "The colour for filling highlighted items", api: api, value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the highlighted item stroke", api: api, value: cssColorToString(highlightOptions?.highlightedItem?.stroke) ?? '', onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
375
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorField, { clearable: false, title: "The colour for filling highlighted items", value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the highlighted item stroke", value: cssColorToString(highlightOptions?.highlightedItem?.stroke) ?? '', onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
380
376
  };
@@ -4,7 +4,7 @@ import { CheckBox } from '../../../components/CheckBox';
4
4
  import ErrorBox from '../../../components/ErrorBox';
5
5
  import FormLayout, { FormRow } from '../../../components/FormLayout';
6
6
  import { Tag } from '../../../components/Tag';
7
- import { ColorPicker } from '../../../components/ColorPicker';
7
+ import { ColorField } from '../../../components/ColorField';
8
8
  import { RangesComponent } from '../RangesComponent';
9
9
  import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
10
10
  import { getDefaultRangeColor } from '../../../Utilities/Helpers/UIHelper';
@@ -346,10 +346,10 @@ export const StyledColumnWizardBulletSection = (props) => {
346
346
  { value: 'Column', label: 'Column' },
347
347
  { value: 'Col-Avg', label: 'Column Average' },
348
348
  { value: 'Col-Median', label: 'Column Median' },
349
- ] }) }) }), currentMode === 'Number' && (_jsx(FormRow, { label: "Target Value:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && (_jsx(FormRow, { label: "Target Column:", children: _jsx(Box, { className: "twa:max-w-[220px]", children: _jsx(ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Marker Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: "Marker Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Marker Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
349
+ ] }) }) }), currentMode === 'Number' && (_jsx(FormRow, { label: "Target Value:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && (_jsx(FormRow, { label: "Target Column:", children: _jsx(Box, { className: "twa:max-w-[220px]", children: _jsx(ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Marker Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: "Marker Colour:", children: _jsx(ColorField, { clearable: false, disabled: disabled, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Marker Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
350
350
  { value: 'Horizontal', label: 'Horizontal' },
351
351
  { value: 'Vertical', label: 'Vertical' },
352
- ] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
352
+ ] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorField, { clearable: false, disabled: disabled, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
353
353
  Height: e.target.value === '' ? undefined : Number(e.target.value),
354
354
  }), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
355
355
  if (v === 'Auto' || v === 'Zero') {
@@ -361,7 +361,7 @@ export const StyledColumnWizardBulletSection = (props) => {
361
361
  }, items: [
362
362
  { value: 'Auto', label: 'Auto' },
363
363
  { value: 'Zero', label: 'Zero' },
364
- ] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
364
+ ] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
365
365
  if (next) {
366
366
  update({ Font: next });
367
367
  }
@@ -51,7 +51,7 @@ export const renderStyledColumnGradientStyleSummary = (data) => {
51
51
  return renderSummaryStringTags(items);
52
52
  };
53
53
  export const StyledColumnWizardGradientSection = (props) => {
54
- const { data, api } = useOnePageAdaptableWizardContext();
54
+ const { data } = useOnePageAdaptableWizardContext();
55
55
  const gs = data.GradientStyle ?? {};
56
56
  const disabled = !data.ColumnId;
57
57
  const onFontChange = (next) => {
@@ -106,5 +106,5 @@ export const StyledColumnWizardGradientSection = (props) => {
106
106
  else {
107
107
  patchGradient({ AutoContrastText: true });
108
108
  }
109
- }, children: "Make text readable on tinted backgrounds" }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Tooltip:", children: _jsxs(Box, { className: "twa:ml-2", children: [_jsx(CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Font" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), !data.ColumnId && (_jsx(ErrorBox, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
109
+ }, children: "Make text readable on tinted backgrounds" }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Tooltip:", children: _jsxs(Box, { className: "twa:ml-2", children: [_jsx(CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Font" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnFontStyleEditor, { disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), !data.ColumnId && (_jsx(ErrorBox, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
110
110
  };