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

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 (104) hide show
  1. package/aql.d.ts +104 -0
  2. package/aql.js +212 -0
  3. package/devtools.d.ts +182 -1
  4. package/index.css +271 -102
  5. package/package.json +2 -1
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -4
  7. package/src/AdaptableOptions/DefaultAdaptableOptions.js +5 -5
  8. package/src/AdaptableOptions/FlashingCellOptions.d.ts +3 -3
  9. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +6 -4
  10. package/src/AdaptableOptions/StateOptions.d.ts +37 -13
  11. package/src/AdaptableState/AdaptableState.d.ts +2 -0
  12. package/src/AdaptableState/Common/AdaptableAlert.d.ts +15 -0
  13. package/src/AdaptableState/Common/AdaptableAlert.js +9 -0
  14. package/src/AdaptableState/QuickSearchState.d.ts +4 -0
  15. package/src/Api/Events/LayoutChanged.d.ts +5 -3
  16. package/src/Api/Implementation/AlertApiImpl.d.ts +5 -5
  17. package/src/Api/Implementation/AlertApiImpl.js +26 -19
  18. package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
  19. package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/StateApiImpl.js +4 -3
  21. package/src/Api/Internal/AlertInternalApi.js +12 -7
  22. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  23. package/src/Api/Internal/StateInternalApi.d.ts +1 -1
  24. package/src/Api/Internal/StateInternalApi.js +2 -2
  25. package/src/Api/StateApi.d.ts +2 -2
  26. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
  27. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +0 -4
  28. package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -7
  29. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +8 -0
  30. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +12 -12
  31. package/src/Redux/Store/AdaptableStore.d.ts +8 -5
  32. package/src/Redux/Store/AdaptableStore.js +70 -38
  33. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +5 -5
  34. package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
  35. package/src/Redux/Store/StateOptionsGuards.d.ts +58 -0
  36. package/src/Redux/Store/StateOptionsGuards.js +112 -0
  37. package/src/Redux/Store/isTransientReduxAction.d.ts +5 -0
  38. package/src/Redux/Store/isTransientReduxAction.js +19 -0
  39. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  40. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
  41. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  42. package/src/Utilities/Constants/ReduxConstants.js +5 -5
  43. package/src/Utilities/Helpers/AlertTypeHelper.d.ts +1 -1
  44. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +14 -0
  45. package/src/Utilities/Helpers/SettingsPanelHelper.js +37 -1
  46. package/src/Utilities/Helpers/UIHelper.d.ts +6 -3
  47. package/src/Utilities/Helpers/UIHelper.js +8 -4
  48. package/src/Utilities/ObjectFactory.js +3 -3
  49. package/src/View/Dashboard/DashboardPopupSections.js +1 -1
  50. package/src/View/GridInfo/GridInfoPopup.js +62 -25
  51. package/src/View/StyledColumn/RangesComponent.js +6 -6
  52. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +2 -2
  53. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +4 -4
  54. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
  55. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +2 -2
  56. package/src/View/Wizard/CollapsibleWizardCard.d.ts +3 -1
  57. package/src/View/Wizard/CollapsibleWizardCard.js +17 -9
  58. package/src/agGrid/AdaptableAgGrid.d.ts +4 -4
  59. package/src/agGrid/AdaptableAgGrid.js +2 -0
  60. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
  61. package/src/agGrid/AgGridColumnAdapter.js +7 -5
  62. package/src/components/aql/QueryBuilder/QueryBuilderInputs.js +12 -2
  63. package/src/env.js +2 -2
  64. package/src/layout-manager/src/normalizeLayoutModel.d.ts +1 -1
  65. package/src/layout-manager/src/simplifyLayoutModel.d.ts +1 -1
  66. package/src/migration/AdaptableUpgradeHelper.d.ts +7 -2
  67. package/src/migration/VersionUpgrade17.js +13 -8
  68. package/src/setupDevTools.js +442 -103
  69. package/src/types.d.ts +1 -1
  70. package/tsconfig.esm.tsbuildinfo +1 -1
  71. package/upgrade.d.ts +1 -0
  72. package/upgrade.js +1 -0
  73. package/vendor/components/Button/index.d.ts +1 -1
  74. package/vendor/components/Button/index.d.ts.map +1 -1
  75. package/vendor/components/Button/index.js.map +1 -1
  76. package/vendor/components/CheckBox/index.d.ts +1 -1
  77. package/vendor/components/CheckBox/index.d.ts.map +1 -1
  78. package/vendor/components/CheckBox/index.js.map +1 -1
  79. package/vendor/components/ColorPicker/colorPickerTab.d.ts +4 -0
  80. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -0
  81. package/vendor/components/ColorPicker/colorPickerTab.js +50 -0
  82. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
  83. package/vendor/components/ColorPicker/index.d.ts +31 -0
  84. package/vendor/components/ColorPicker/index.d.ts.map +1 -0
  85. package/vendor/components/ColorPicker/index.js +132 -0
  86. package/vendor/components/ColorPicker/index.js.map +1 -0
  87. package/vendor/components/ColorPicker/themeColors.d.ts +24 -0
  88. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
  89. package/vendor/components/ColorPicker/themeColors.js +52 -0
  90. package/vendor/components/ColorPicker/themeColors.js.map +1 -0
  91. package/vendor/components/Combobox/VirtualizedList.d.ts +1 -1
  92. package/vendor/components/Combobox/VirtualizedList.d.ts.map +1 -1
  93. package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
  94. package/vendor/components/Combobox/index.d.ts +1 -1
  95. package/vendor/components/Combobox/index.d.ts.map +1 -1
  96. package/vendor/components/Combobox/index.js.map +1 -1
  97. package/vendor/components/index.css +213 -0
  98. package/vendor/components/index.d.ts +2 -0
  99. package/vendor/components/index.d.ts.map +1 -1
  100. package/vendor/components/index.js +1 -0
  101. package/vendor/components/index.js.map +1 -1
  102. package/vendor/components/ui/combobox.d.ts.map +1 -1
  103. package/vendor/components/ui/combobox.js +1 -1
  104. package/vendor/components/ui/combobox.js.map +1 -1
@@ -1,6 +1,15 @@
1
1
  import { AdaptableApi } from '../../Api/AdaptableApi';
2
2
  import { SettingsPanelDisplayOptions, SettingsPanelNavigation, SettingsPanelNavigationGroup, SettingsPanelOptions } from '../../AdaptableOptions/SettingsPanelOptions';
3
3
  import { AdaptableIcon } from '../../types';
4
+ /** One Settings Panel sidebar module (visible for the current grid / entitlements). */
5
+ export type VisibleSettingsPanelNavigationItem = {
6
+ moduleName: string;
7
+ label: string;
8
+ };
9
+ export type VisibleSettingsPanelNavigationGroup = {
10
+ label: string;
11
+ items: VisibleSettingsPanelNavigationItem[];
12
+ };
4
13
  /**
5
14
  * True when `adaptableId` is the framework placeholder (`adaptable_id` or `adaptable_id_<n>`),
6
15
  * not a developer-supplied human name.
@@ -41,3 +50,8 @@ export declare const getSettingsPanelOpenIcon: (resolvedIcon: SettingsPanelOptio
41
50
  export declare const DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS: SettingsPanelNavigationGroup[];
42
51
  export declare const buildDefaultSettingsPanelNavigation: (customPanelNames?: string[]) => SettingsPanelNavigation;
43
52
  export declare const resolveSettingsPanelNavigation: (api: AdaptableApi, settingsPanelOptions: SettingsPanelOptions) => SettingsPanelNavigation;
53
+ /**
54
+ * Settings Panel navigation groups containing only modules that appear in the
55
+ * panel sidebar (same rules as {@link useMenuItems} in AdaptablePopup).
56
+ */
57
+ export declare function resolveVisibleSettingsPanelNavigationGroups(api: AdaptableApi): VisibleSettingsPanelNavigationGroup[];
@@ -1,4 +1,4 @@
1
- import { ADAPTABLE_ID } from '../Constants/GeneralConstants';
1
+ import { ADAPTABLE_ID, STANDALONE_MODULE_POPUPS } from '../Constants/GeneralConstants';
2
2
  import { SettingsPanelFriendlyName } from '../Constants/ModuleConstants';
3
3
  import StringExtensions from '../Extensions/StringExtensions';
4
4
  export const isGenericAdaptableId = (adaptableId) => {
@@ -143,3 +143,39 @@ export const resolveSettingsPanelNavigation = (api, settingsPanelOptions) => {
143
143
  warnLegacyNavigationOnce(api);
144
144
  return convertLegacyFlatNavigationToGrouped(navigation);
145
145
  };
146
+ export function resolveVisibleSettingsPanelNavigationGroups(api) {
147
+ const settingsPanelOptions = api.optionsApi.getAdaptableOptions().settingsPanelOptions;
148
+ const navigation = resolveSettingsPanelNavigation(api, settingsPanelOptions ?? {});
149
+ const allMenuItems = api.internalApi.getInternalState().SettingsPanelModuleEntries ?? [];
150
+ const visibleItems = allMenuItems.filter((item) => item.category !== 'General' &&
151
+ item.category !== 'CustomSettingsPanel' &&
152
+ item.category !== 'Group' &&
153
+ !STANDALONE_MODULE_POPUPS.includes(item.category) &&
154
+ item.isVisible);
155
+ const moduleService = api.internalApi.getModuleService();
156
+ const groups = [];
157
+ for (const group of navigation.groups) {
158
+ const items = [];
159
+ for (const moduleName of group.items) {
160
+ const moduleId = String(moduleName);
161
+ const customSettingsPanel = settingsPanelOptions?.customSettingsPanels?.find((panel) => panel.name === moduleId);
162
+ if (customSettingsPanel) {
163
+ items.push({ moduleName: moduleId, label: customSettingsPanel.name });
164
+ continue;
165
+ }
166
+ const menuItem = visibleItems.find((item) => item.category === moduleId);
167
+ if (!menuItem) {
168
+ continue;
169
+ }
170
+ items.push({
171
+ moduleName: moduleId,
172
+ label: menuItem.label ??
173
+ moduleService.getModuleFriendlyName(moduleId),
174
+ });
175
+ }
176
+ if (items.length) {
177
+ groups.push({ label: group.label ?? '', items });
178
+ }
179
+ }
180
+ return groups;
181
+ }
@@ -6,10 +6,12 @@ import { Schedule, Weekday } from '../../AdaptableState/Common/Schedule';
6
6
  import { AdaptableColumnDataType, AdaptableSystemIconName } from '../../types';
7
7
  import { AdaptableAlert } from '../../AdaptableState/Common/AdaptableAlert';
8
8
  import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType';
9
+ /** A theme colour token as a CSS value: `themeColorVar('badge')` → `var(--ab-color-badge)`. */
10
+ export declare function themeColorVar(token: string): string;
9
11
  /** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
10
12
  export declare function getSwatchColorVar(index: number): string;
11
- /** Default mid-gray from the theme swatch palette (`--ab-color-swatch-4`). */
12
- export declare function getGraySwatchColor(): string;
13
+ /** Default colour of a new range in Range Bar, Bullet and Ranges styled columns. */
14
+ export declare function getDefaultRangeColor(): string;
13
15
  export declare function getSwatchColorPaletteEntries(): string[];
14
16
  /** Theme semantic colours for the Colour Picker (resolved at runtime per active theme). */
15
17
  export declare function getThemeSemanticColorPaletteEntries(): string[];
@@ -41,8 +43,9 @@ export declare function getCSSVariableValue(cssVariable: string): string | undef
41
43
  export declare function setCSSVariableValue(cssVariable: string, value: string): void;
42
44
  export declare function isBrowserDocumentAvailable(): boolean;
43
45
  export declare const UIHelper: {
46
+ themeColorVar: typeof themeColorVar;
44
47
  getSwatchColorVar: typeof getSwatchColorVar;
45
- getGraySwatchColor: typeof getGraySwatchColor;
48
+ getDefaultRangeColor: typeof getDefaultRangeColor;
46
49
  getSwatchColorPaletteEntries: typeof getSwatchColorPaletteEntries;
47
50
  getThemeSemanticColorPaletteEntries: typeof getThemeSemanticColorPaletteEntries;
48
51
  getDefaultColorPalette: typeof getDefaultColorPalette;
@@ -3,11 +3,14 @@ import { FontWeight, FontStyle, StatusColour } from '../../AdaptableState/Common
3
3
  import { StringExtensions } from '../Extensions/StringExtensions';
4
4
  import { getScheduleDescription as getScheduleDescriptionFromHelper } from './Scheduling/ScheduleHelper';
5
5
  import ArrayExtensions from '../Extensions/ArrayExtensions';
6
+ export function themeColorVar(token) {
7
+ return `var(--ab-color-${token})`;
8
+ }
6
9
  export function getSwatchColorVar(index) {
7
- return `var(--ab-color-swatch-${index})`;
10
+ return themeColorVar(`swatch-${index}`);
8
11
  }
9
- export function getGraySwatchColor() {
10
- return getSwatchColorVar(4);
12
+ export function getDefaultRangeColor() {
13
+ return themeColorVar('range-default');
11
14
  }
12
15
  export function getSwatchColorPaletteEntries() {
13
16
  return Array.from({ length: 20 }, (_, i) => getSwatchColorVar(i + 1));
@@ -324,8 +327,9 @@ export function isBrowserDocumentAvailable() {
324
327
  return typeof window !== 'undefined' && typeof window.document !== 'undefined';
325
328
  }
326
329
  export const UIHelper = {
330
+ themeColorVar,
327
331
  getSwatchColorVar,
328
- getGraySwatchColor,
332
+ getDefaultRangeColor,
329
333
  getSwatchColorPaletteEntries,
330
334
  getThemeSemanticColorPaletteEntries,
331
335
  getDefaultColorPalette,
@@ -4,7 +4,7 @@ import { buildCronExpression } from './Helpers/Scheduling/ScheduleHelper';
4
4
  import { EMPTY_STRING } from './Constants/GeneralConstants';
5
5
  import { ALERT_DEFAULT_MESSAGE_TYPE, ALERT_DEFAULT_SHOW_POPUP, PLUS_MINUS_DEFAULT_NUDGE_VALUE, } from './Constants/ObjectDefaultConstants';
6
6
  import { Bounce, Flip, Slide, Zoom } from '../components/Toastify';
7
- import { getSwatchColorVar } from './Helpers/UIHelper';
7
+ import { themeColorVar } from './Helpers/UIHelper';
8
8
  import { isPivotLayout } from './Helpers/Layouts/LayoutHelper';
9
9
  export function CreateEmptyCustomSort() {
10
10
  return { Uuid: createUuid(), Name: EMPTY_STRING, ColumnId: EMPTY_STRING, SortedValues: [] };
@@ -250,8 +250,8 @@ export function CreateDefaultStyledColumnBadge() {
250
250
  return {
251
251
  Shape: 'Rounded',
252
252
  PillStyle: {
253
- BackColor: getSwatchColorVar(3),
254
- ForeColor: getSwatchColorVar(1),
253
+ BackColor: themeColorVar('badge'),
254
+ ForeColor: themeColorVar('badge-foreground'),
255
255
  },
256
256
  };
257
257
  }
@@ -61,5 +61,5 @@ export const DashboardPopupSections = (props) => {
61
61
  return (_jsxs(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [_jsxs(Tag, { children: ["Tab: ", tab.Name] }), toolbarTitles.map((title, index) => (_jsx(Tag, { children: title }, `${tab.Name}-${title}-${index}`)))] }, tab.Uuid ?? tab.Name));
62
62
  }) })) : (_jsx(Tag, { children: "No Tabs Configured" }));
63
63
  const moduleButtonsSummary = moduleButtonLabels.length > 0 ? (_jsx(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: moduleButtonLabels.map((label) => (_jsx(Tag, { children: label }, label))) })) : (_jsx(Tag, { children: "No Module Buttons" }));
64
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-0 twa:gap-3 twa:overflow-y-auto", children: [props.areDashboardSettingsVisible && (_jsx(CollapsibleWizardCard, { ...bindCard('settings'), "data-name": "dashboard-settings", title: "Settings", help: "Control Dashboard visibility, expansion and floating mode", compactSummary: settingsToggles, compactSummaryInteractive: true, summary: settingsToggles, className: "twa:overflow-hidden", children: settingsToggles })), _jsx(CollapsibleWizardCard, { ...bindCard('pinned-toolbars'), "data-name": "dashboard-pinned-toolbars", title: "Pinned Toolbars", help: "Optional strip along the top of the grid \u2014 pin Toolbars you want always visible (e.g. Grid Filter)", compactSummary: renderCompactAccentTags(pinnedToolbarTitles, (title) => title, { emptyLabel: 'No Pinned Toolbars' }), summary: pinnedSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:overflow-hidden", children: _jsx(PinnedToolbarsSelector, {}) }), _jsx(CollapsibleWizardCard, { ...bindCard('tabs-toolbars'), "data-name": "dashboard-tabs-toolbars", title: "Tabs & Toolbars", help: "Group Toolbars into named Tabs in the Dashboard header (independent of Pinned Toolbars)", compactSummary: renderCompactAccentTags(tabsCompactLabels, (label) => label, { emptyLabel: 'No Tabs Configured' }), summary: tabsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[280px] twa:overflow-hidden", children: _jsx(DashboardManagerUI, { disabled: props.isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: props.onDashboardSetTabs, api: api }) }), _jsx(CollapsibleWizardCard, { ...bindCard('module-buttons', { fillAvailable: true }), "data-name": "dashboard-module-buttons", title: "Module Buttons", help: "Buttons in the Dashboard header that open Module settings", compactSummary: renderCompactAccentTags(moduleButtonLabels, (label) => label, { emptyLabel: 'No Module Buttons' }), summary: moduleButtonsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[240px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: _jsx(ModuleValueSelector, { disabled: props.isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, onChange: (selectedValues) => props.onDashboardSetModuleButtons(selectedValues) }) })] }));
64
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-0 twa:gap-3 twa:overflow-y-auto", children: [props.areDashboardSettingsVisible && (_jsx(CollapsibleWizardCard, { "data-name": "dashboard-settings", title: "Settings", help: "Control Dashboard visibility, expansion and floating mode", summary: settingsToggles, collapsible: false, className: "twa:overflow-hidden" })), _jsx(CollapsibleWizardCard, { ...bindCard('pinned-toolbars'), "data-name": "dashboard-pinned-toolbars", title: "Pinned Toolbars", help: "Optional strip along the top of the grid \u2014 pin Toolbars you want always visible (e.g. Grid Filter)", compactSummary: renderCompactAccentTags(pinnedToolbarTitles, (title) => title, { emptyLabel: 'No Pinned Toolbars' }), summary: pinnedSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:overflow-hidden", children: _jsx(PinnedToolbarsSelector, {}) }), _jsx(CollapsibleWizardCard, { ...bindCard('tabs-toolbars'), "data-name": "dashboard-tabs-toolbars", title: "Tabs & Toolbars", help: "Group Toolbars into named Tabs in the Dashboard header (independent of Pinned Toolbars)", compactSummary: renderCompactAccentTags(tabsCompactLabels, (label) => label, { emptyLabel: 'No Tabs Configured' }), summary: tabsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[280px] twa:overflow-hidden", children: _jsx(DashboardManagerUI, { disabled: props.isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: props.onDashboardSetTabs, api: api }) }), _jsx(CollapsibleWizardCard, { ...bindCard('module-buttons', { fillAvailable: true }), "data-name": "dashboard-module-buttons", title: "Module Buttons", help: "Buttons in the Dashboard header that open Module settings", compactSummary: renderCompactAccentTags(moduleButtonLabels, (label) => label, { emptyLabel: 'No Module Buttons' }), summary: moduleButtonsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[240px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: _jsx(ModuleValueSelector, { disabled: props.isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, onChange: (selectedValues) => props.onDashboardSetModuleButtons(selectedValues) }) })] }));
65
65
  };
@@ -8,12 +8,14 @@ import { Tabs } from '../../components/Tabs';
8
8
  import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
9
9
  import { AdaptableObjectsSummary } from './AdaptableObjectsSummary';
10
10
  import { getDefaultAdaptableOptions } from '../../AdaptableOptions/DefaultAdaptableOptions';
11
+ import { isPivotLayout } from '../../Utilities/Helpers/Layouts/LayoutHelper';
11
12
  import { cn } from '../../lib/utils';
12
13
  const adaptableVersion = ADAPTABLE_VERSION;
13
14
  const agGridVersion = AG_GRID_VERSION;
14
15
  export const GridInfoPopup = (props) => {
15
16
  const api = props.api;
16
- const keyValuePairs = [];
17
+ const summaryKeyValuePairs = [];
18
+ const layoutKeyValuePairs = [];
17
19
  const calcColumns = api.calculatedColumnApi
18
20
  .getCalculatedColumns()
19
21
  .map((c) => c.ColumnId);
@@ -32,40 +34,74 @@ export const GridInfoPopup = (props) => {
32
34
  : null;
33
35
  const selectedRowInfo = api.gridApi.getSelectedRowInfo();
34
36
  if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
35
- keyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
37
+ summaryKeyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
36
38
  }
37
39
  if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
38
- keyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
40
+ summaryKeyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
39
41
  }
40
- keyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
41
- keyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
42
- keyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
43
- keyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
44
- keyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
45
- keyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
46
- keyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
47
- keyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
48
- keyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
49
- keyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
50
- keyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(calcColumns)
42
+ summaryKeyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
43
+ summaryKeyValuePairs.push({ Key: 'Adaptable Id', Value: api.optionsApi.getAdaptableId() });
44
+ summaryKeyValuePairs.push({ Key: 'State Key', Value: api.optionsApi.getAdaptableStateKey() });
45
+ summaryKeyValuePairs.push({ Key: 'User Name', Value: api.optionsApi.getUserName() });
46
+ const primaryKey = api.optionsApi.getPrimaryKey();
47
+ const primaryKeyFriendly = primaryKey
48
+ ? api.columnApi.getFriendlyNameForColumnId(primaryKey)
49
+ : undefined;
50
+ const primaryKeyLabel = primaryKeyFriendly && primaryKeyFriendly !== primaryKey
51
+ ? `${primaryKeyFriendly} (${primaryKey})`
52
+ : primaryKey;
53
+ summaryKeyValuePairs.push({
54
+ Key: 'Primary Key',
55
+ Value: api.optionsApi.isAutogeneratePrimaryKey()
56
+ ? `${primaryKeyLabel} (auto-generated)`
57
+ : primaryKeyLabel,
58
+ });
59
+ const currentLayout = api.layoutApi.getCurrentLayout();
60
+ const isPivot = isPivotLayout(currentLayout);
61
+ const columnLabels = (columnIds) => ArrayExtensions.IsNotNullOrEmpty(columnIds)
62
+ ? columnIds
63
+ .map((columnId) => api.columnApi.getFriendlyNameForColumnId(columnId) || columnId)
64
+ .join(', ')
65
+ : 'None';
66
+ layoutKeyValuePairs.push({
67
+ Key: 'Current Layout',
68
+ Value: api.layoutApi.getCurrentLayoutName() || 'None',
69
+ });
70
+ layoutKeyValuePairs.push({
71
+ Key: 'Layout Type',
72
+ Value: isPivot ? 'Pivot' : 'Table',
73
+ });
74
+ layoutKeyValuePairs.push({
75
+ Key: 'Row Groups',
76
+ Value: columnLabels(api.layoutApi.getCurrentRowGroupsColumnIds()),
77
+ });
78
+ if (isPivot) {
79
+ layoutKeyValuePairs.push({
80
+ Key: 'Pivot Columns',
81
+ Value: columnLabels(currentLayout.PivotColumns),
82
+ });
83
+ }
84
+ layoutKeyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
85
+ layoutKeyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
86
+ layoutKeyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
87
+ layoutKeyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
88
+ layoutKeyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
89
+ layoutKeyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
90
+ layoutKeyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
91
+ layoutKeyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
92
+ layoutKeyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
93
+ layoutKeyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(calcColumns)
51
94
  ? ArrayExtensions.createCommaSeparatedString(calcColumns)
52
95
  : 'None' });
53
- keyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
96
+ layoutKeyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
54
97
  ? ArrayExtensions.createCommaSeparatedString(freeTextColumns)
55
98
  : 'None' });
56
- keyValuePairs.push({ Key: 'Action Columns', Value: ArrayExtensions.IsNotNullOrEmpty(actionColumns)
99
+ layoutKeyValuePairs.push({ Key: 'Action Columns', Value: ArrayExtensions.IsNotNullOrEmpty(actionColumns)
57
100
  ? ArrayExtensions.createCommaSeparatedString(actionColumns)
58
101
  : 'None' });
59
102
  const domProps = {
60
103
  className: 'twa:flex-1 twa:min-h-0 twa:w-full',
61
104
  };
62
- keyValuePairs.map((keyValuePair) => {
63
- return {
64
- Key: keyValuePair.Key,
65
- Value: keyValuePair.Value === 'Ignore' ? null : keyValuePair.Value,
66
- };
67
- })
68
- .filter((x) => x.Value);
69
105
  const columnsMap = {
70
106
  Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
71
107
  Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
@@ -199,12 +235,13 @@ export const GridInfoPopup = (props) => {
199
235
  return Math.min(total + 40, 400);
200
236
  };
201
237
  const enabledTabs = api.optionsApi.getSettingsPanelOptions()?.gridInfoTabs ??
202
- ['Grid Options', 'Grid Summary', 'Grid State'];
238
+ ['Grid Summary', 'Layout', 'Grid State', 'Grid Options'];
203
239
  const showSummary = enabledTabs.includes('Grid Summary');
240
+ const showLayout = enabledTabs.includes('Layout');
204
241
  const showState = enabledTabs.includes('Grid State');
205
242
  const showOptions = enabledTabs.includes('Grid Options');
206
243
  const baseClassName = 'ab-GridInfo';
207
- return (_jsx(PopupPanel, { className: cn(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false, children: _jsx(Panel, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden", children: _jsx(Panel.FlexBody, { children: _jsxs(Tabs, { className: "twa:flex-1 twa:min-h-0", children: [showSummary ? _jsx(Tabs.Tab, { children: "Grid Summary" }) : null, showState ? _jsx(Tabs.Tab, { children: "Grid State" }) : null, showOptions ? _jsx(Tabs.Tab, { children: "Grid Options" }) : null, showSummary ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: keyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showState ? (_jsx(Tabs.Content, { children: _jsx(AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" }) })) : null, showOptions ? (_jsx(Tabs.Content, { children: _jsx("div", { className: "twa:min-h-0 twa:overflow-auto twa:p-2 twa:flex twa:flex-col twa:gap-4", children: gridOptionsSections.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: "twa:font-semibold twa:mb-1", children: section.title }), _jsx(DataSource, { data: section.rows, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: {
244
+ return (_jsx(PopupPanel, { className: cn(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false, children: _jsx(Panel, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden", children: _jsx(Panel.FlexBody, { children: _jsxs(Tabs, { className: "twa:flex-1 twa:min-h-0", children: [showSummary ? _jsx(Tabs.Tab, { children: "Summary" }) : null, showLayout ? _jsx(Tabs.Tab, { children: "Layout" }) : null, showState ? _jsx(Tabs.Tab, { children: "State" }) : null, showOptions ? _jsx(Tabs.Tab, { children: "Options" }) : null, showSummary ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: summaryKeyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showLayout ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: layoutKeyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showState ? (_jsx(Tabs.Content, { children: _jsx(AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" }) })) : null, showOptions ? (_jsx(Tabs.Content, { children: _jsx("div", { className: "twa:min-h-0 twa:overflow-auto twa:p-2 twa:flex twa:flex-col twa:gap-4", children: gridOptionsSections.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: "twa:font-semibold twa:mb-1", children: section.title }), _jsx(DataSource, { data: section.rows, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: {
208
245
  style: { height: sectionHeight(section.rows), width: '100%' },
209
246
  }, rowHeight: (rowInfo) => calculateRowHeight(rowInfo.data), columns: optionsColumnsMap }) })] }, section.title))) }) })) : null] }) }) }) }));
210
247
  };
@@ -7,7 +7,7 @@ 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 { getGraySwatchColor } from '../../Utilities/Helpers/UIHelper';
10
+ import { getDefaultRangeColor } 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';
@@ -159,7 +159,7 @@ export class RangesComponent extends React.Component {
159
159
  }
160
160
  if (value === 'ColumnComparison') {
161
161
  const columnComparison = {
162
- Color: getGraySwatchColor(),
162
+ Color: getDefaultRangeColor(),
163
163
  MinValue: undefined,
164
164
  MaxValue: undefined,
165
165
  };
@@ -252,7 +252,7 @@ export class RangesComponent extends React.Component {
252
252
  {
253
253
  Min: isPercentage ? 0 : 'Col-Min',
254
254
  Max: isPercentage ? 100 : 'Col-Max',
255
- Color: getGraySwatchColor(),
255
+ Color: getDefaultRangeColor(),
256
256
  },
257
257
  ]
258
258
  : (() => {
@@ -298,7 +298,7 @@ export class RangesComponent extends React.Component {
298
298
  const newRange = {
299
299
  Min,
300
300
  Max: lastRange.Max,
301
- Color: getGraySwatchColor(),
301
+ Color: getDefaultRangeColor(),
302
302
  };
303
303
  const newRanges = [...existingRanges.slice(0, -1), previousRange, newRange];
304
304
  this.props.updateRanges(newRanges);
@@ -311,7 +311,7 @@ export class RangesComponent extends React.Component {
311
311
  }
312
312
  return [
313
313
  { ...onlyRange, Max: 50 },
314
- { Min: 50, Max: 100, Color: getGraySwatchColor() },
314
+ { Min: 50, Max: 100, Color: getDefaultRangeColor() },
315
315
  ];
316
316
  }
317
317
  if (onlyRange.Min !== 'Col-Min' || onlyRange.Max !== 'Col-Max') {
@@ -322,7 +322,7 @@ export class RangesComponent extends React.Component {
322
322
  const mid = Math.round((min + max) / 2);
323
323
  return [
324
324
  { ...onlyRange, Max: mid },
325
- { Min: mid, Max: 'Col-Max', Color: getGraySwatchColor() },
325
+ { Min: mid, Max: 'Col-Max', Color: getDefaultRangeColor() },
326
326
  ];
327
327
  }
328
328
  setColumnComparisonMin(value) {
@@ -7,7 +7,7 @@ import { Tag } from '../../../components/Tag';
7
7
  import { ColorPicker } from '../../../components/ColorPicker';
8
8
  import { RangesComponent } from '../RangesComponent';
9
9
  import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
10
- import { getGraySwatchColor } from '../../../Utilities/Helpers/UIHelper';
10
+ import { getDefaultRangeColor } from '../../../Utilities/Helpers/UIHelper';
11
11
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
12
12
  import AdaptableInput from '../../Components/AdaptableInput';
13
13
  import { Box, Flex } from '../../../components/Flex';
@@ -230,7 +230,7 @@ export const StyledColumnWizardBulletSection = (props) => {
230
230
  {
231
231
  Min: 0,
232
232
  Max: 100,
233
- Color: getGraySwatchColor(),
233
+ Color: getDefaultRangeColor(),
234
234
  },
235
235
  ];
236
236
  props.onChange({
@@ -8,7 +8,7 @@ import { InputGroup } from '../../../components/InputGroup';
8
8
  import { ColorPicker, OptionalColorPicker } from '../../../components/ColorPicker';
9
9
  import { RangesComponent } from '../RangesComponent';
10
10
  import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
11
- import { getGraySwatchColor } from '../../../Utilities/Helpers/UIHelper';
11
+ import { getDefaultRangeColor } from '../../../Utilities/Helpers/UIHelper';
12
12
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
13
13
  import AdaptableInput from '../../Components/AdaptableInput';
14
14
  import { Box, Flex } from '../../../components/Flex';
@@ -276,7 +276,7 @@ export const StyledColumnWizardRangeBarSection = (props) => {
276
276
  const onRangeValueTypeChange = React.useCallback((rangeValueType) => {
277
277
  const ranges = rangeValueType === 'Number'
278
278
  ? api.columnScopeApi.createCellColorRangesForScope(scope)
279
- : [{ Min: 0, Max: 100, Color: getGraySwatchColor() }];
279
+ : [{ Min: 0, Max: 100, Color: getDefaultRangeColor() }];
280
280
  props.onChange({
281
281
  ...data,
282
282
  RangeBarStyle: {
@@ -424,9 +424,9 @@ export const StyledColumnWizardRangeBarSection = (props) => {
424
424
  : 'Optional second marker when a Reference bound is set on the Style step.' })] }), _jsx(Card.Body, { children: hasReference ? (_jsxs(FormLayout, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: referenceMarker.Shape, onValueChange: (s) => updateReferenceMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: `${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(ColorPicker, { disabled: disabled, api: api, value: referenceMarker.Color || undefined, onChange: (c) => updateReferenceMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: referenceMarker.Size, onChange: (e) => updateReferenceMarker({ Size: Number(e.target.value) }) }) }) })] })) : (_jsx(Box, { className: "twa:text-xs twa:opacity-60 twa:max-w-[520px]", children: "Add a Reference value on the Style step (Bounds section) to enable this marker (e.g. previous close, target, midpoint)." })) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Track" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "The line representing the [Min, Max] interval, plus optional cell background." })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: range.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
425
425
  { value: 'Horizontal', label: 'Horizontal' },
426
426
  { value: 'Vertical', label: 'Vertical' },
427
- ] }) }) }), range.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500 twa:max-w-[520px]", children: ["Tip: vertical Range Bars 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: `Track ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: range.Track?.Color, defaultColor: getGraySwatchColor(), onChange: (c) => updateTrackProperties({ Color: c }) }) }), _jsx(FormRow, { label: range.Orientation === 'Vertical' ? 'Track Width (px):' : 'Track Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: range.Track?.Height ?? '', onChange: (e) => updateTrackProperties({
427
+ ] }) }) }), range.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500 twa:max-w-[520px]", children: ["Tip: vertical Range Bars 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: `Track ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: range.Track?.Color, defaultColor: getDefaultRangeColor(), onChange: (c) => updateTrackProperties({ Color: c }) }) }), _jsx(FormRow, { label: range.Orientation === 'Vertical' ? 'Track Width (px):' : 'Track Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: range.Track?.Height ?? '', onChange: (e) => updateTrackProperties({
428
428
  Height: e.target.value === '' ? undefined : Number(e.target.value),
429
- }), placeholder: "4" }) }) }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: range.BackColor ?? undefined, defaultColor: getGraySwatchColor(), onChange: (c) => updateBackColor(c) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Out of Range" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "How to draw the value marker when the cell value falls outside [Min, Max]." })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Behaviour:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: outOfRangeMode, onValueChange: (v) => updateOutOfRangeProperties({
429
+ }), placeholder: "4" }) }) }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: range.BackColor ?? undefined, defaultColor: getDefaultRangeColor(), onChange: (c) => updateBackColor(c) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Out of Range" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "How to draw the value marker when the cell value falls outside [Min, Max]." })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Behaviour:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: outOfRangeMode, onValueChange: (v) => updateOutOfRangeProperties({
430
430
  Mode: v,
431
431
  }), items: [
432
432
  { value: 'Clamp', label: 'Clamp to edge' },
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import ErrorBox from '../../../../components/ErrorBox';
4
4
  import { Tag } from '../../../../components/Tag';
5
5
  import { RangesComponent } from '../../RangesComponent';
6
- import { getGraySwatchColor } from '../../../../Utilities/Helpers/UIHelper';
6
+ import { getDefaultRangeColor } from '../../../../Utilities/Helpers/UIHelper';
7
7
  import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
8
8
  import { Box } from '../../../../components/Flex';
9
9
  import { PercentBarColumnComparisonPreview } from './Components/PercentBarColumnComparisonPreview';
@@ -108,7 +108,7 @@ export const StyledColumnWizardRangesSection = (props) => {
108
108
  {
109
109
  Min: 0,
110
110
  Max: 100,
111
- Color: getGraySwatchColor(),
111
+ Color: getDefaultRangeColor(),
112
112
  },
113
113
  ];
114
114
  let newStyledColumn = data;
@@ -6,7 +6,7 @@ import { Tag } from '../../../../components/Tag';
6
6
  import { formatBarStyleCellTextLayoutSummary, getActiveBarStyleCellTextTokens, hasBarStyleCellTextConfigured, patchBarStyleCellTextPlacement, resolveBarStyleCellTextLayout, toggleBarStyleCellTextToken, } from '../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
7
7
  import { BarStyleCellTextLayoutEditor } from './Components/BarStyleCellTextLayoutEditor';
8
8
  import { OptionalColorPicker } from '../../../../components/ColorPicker';
9
- import { getGraySwatchColor } from '../../../../Utilities/Helpers/UIHelper';
9
+ import { getDefaultRangeColor } from '../../../../Utilities/Helpers/UIHelper';
10
10
  import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
11
11
  import { Box, Flex } from '../../../../components/Flex';
12
12
  import Radio, { RadioGroup } from '../../../../components/Radio';
@@ -145,5 +145,5 @@ export const StyledColumnWizardStyleSection = (props) => {
145
145
  delete cleaned.Font;
146
146
  props.onChange({ ...data, PercentBarStyle: cleaned });
147
147
  }
148
- } }) })] })] }), _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 }) })] }) })] })] }));
148
+ } }) })] })] }), _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: getDefaultRangeColor(), onChange: onBackColorChange }) })] }) })] })] }));
149
149
  };
@@ -19,7 +19,9 @@ export interface CollapsibleWizardCardProps {
19
19
  headerVisual?: React.ReactNode;
20
20
  /** Trailing header controls (all states) — e.g. delete. Clicks do not toggle expand. */
21
21
  headerActions?: React.ReactNode;
22
- children: React.ReactNode;
22
+ children?: React.ReactNode;
23
+ /** When false, the card is a static header + summary (no expand chevron). Default: true. */
24
+ collapsible?: boolean;
23
25
  defaultExpanded?: boolean;
24
26
  expanded?: boolean;
25
27
  /** When true, only the header row is shown (another card in the accordion is expanded). */
@@ -21,28 +21,36 @@ export function renderCompactAccentTags(ids, getLabel, options) {
21
21
  return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: [visibleIds.map((id) => (_jsx(AccentTag, { className: "twa:shrink-0", children: getLabel(id) }, id))), remainder > 0 ? (_jsxs("span", { className: "twa:text-xs twa:opacity-70 twa:shrink-0", children: ["+", remainder] })) : null] }));
22
22
  }
23
23
  export const CollapsibleWizardCard = (props) => {
24
- const { title, help, collapsedHelp, summary, compactSummary, compactSummaryInteractive = false, headerVisual, headerActions, children, defaultExpanded = false, compact = false, fillAvailable = false, className, bodyClassName, surface = 'popup', 'data-name': dataName, } = props;
24
+ const { title, help, collapsedHelp, summary, compactSummary, compactSummaryInteractive = false, headerVisual, headerActions, children, collapsible = true, defaultExpanded = false, compact = false, fillAvailable = false, className, bodyClassName, surface = 'popup', 'data-name': dataName, } = props;
25
25
  const [expanded, setExpanded] = useProperty(props, 'expanded', defaultExpanded, {
26
26
  onChange: props.onExpandedChange,
27
27
  });
28
- const showSummary = !expanded && !compact;
28
+ const canToggle = collapsible;
29
+ const isExpanded = canToggle && expanded;
30
+ const isCompact = canToggle && compact;
31
+ const showSummary = !isExpanded && !isCompact;
29
32
  const collapsedHeaderInline = collapsedHelp === false ? undefined : collapsedHelp ?? help;
30
- const headerInline = expanded ? help : compact ? compactSummary : collapsedHeaderInline;
31
- const isInteractiveCompactSummary = compact && compactSummaryInteractive;
32
- const toggleExpanded = () => setExpanded(!expanded);
33
+ const headerInline = isExpanded ? help : isCompact ? compactSummary : collapsedHeaderInline;
34
+ const isInteractiveCompactSummary = isCompact && compactSummaryInteractive;
35
+ const toggleExpanded = () => {
36
+ if (!canToggle) {
37
+ return;
38
+ }
39
+ setExpanded(!expanded);
40
+ };
33
41
  const handleTitleKeyDown = (event) => {
34
42
  if (event.key === 'Enter' || event.key === ' ') {
35
43
  event.preventDefault();
36
44
  toggleExpanded();
37
45
  }
38
46
  };
39
- return (_jsxs(Card, { shadow: false, className: cn('ab-CollapsibleWizardCard twa:border twa:transition-[border-color,background-color]', expanded
47
+ return (_jsxs(Card, { shadow: false, className: cn('ab-CollapsibleWizardCard twa:border twa:transition-[border-color,background-color]', isExpanded
40
48
  ? getCollapsibleWizardCardExpandedClasses(surface)
41
- : getCollapsibleWizardCardCollapsedClasses(surface), compact && 'ab-CollapsibleWizardCard--compact twa:p-0!', fillAvailable
49
+ : getCollapsibleWizardCardCollapsedClasses(surface), isCompact && 'ab-CollapsibleWizardCard--compact twa:p-0!', fillAvailable
42
50
  ? 'twa:flex-1 twa:min-h-0 twa:flex twa:flex-col twa:overflow-hidden'
43
- : 'twa:shrink-0', className), children: [_jsx(Card.Title, { className: "twa:p-0", border: !compact, children: _jsxs(Box, { className: cn('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:w-full twa:px-2 twa:cursor-pointer twa:rounded-standard twa:hover:bg-primary', { 'twa:py-2': true, 'twa:mb-0.5': !compact && !expanded }, 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
51
+ : 'twa:shrink-0', className), children: [_jsx(Card.Title, { className: "twa:p-0", border: !isCompact, children: _jsxs(Box, { className: cn('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:w-full twa:px-2 twa:rounded-standard', canToggle && 'twa:cursor-pointer twa:hover:bg-primary', { 'twa:py-2': true, 'twa:mb-0.5': !isCompact && !isExpanded }, canToggle && targetOwn.focusOutline, canToggle && 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: canToggle ? toggleExpanded : undefined, onKeyDown: canToggle ? handleTitleKeyDown : undefined, tabIndex: canToggle ? 0 : undefined, "aria-expanded": canToggle ? isExpanded : undefined, role: canToggle ? 'button' : undefined, children: [_jsxs(Box, { className: cn('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:select-none', canToggle && 'twa:cursor-pointer'), children: [canToggle ? (_jsx(IconComponent, { icon: { name: isExpanded ? 'collapse' : 'expand' } })) : null, _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
44
52
  ? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
45
- : 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] }));
53
+ : cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', isCompact ? '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] }) }), isExpanded ? (_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] }));
46
54
  };
47
55
  export function useWizardCardAccordion(initialExpandedId, options) {
48
56
  const fillExpandedCard = options?.fillExpandedCard ?? false;
@@ -7,7 +7,7 @@ import { EmitterCallback } from '../Utilities/Emitter';
7
7
  import { AdaptablePlugin } from '../AdaptableOptions/AdaptablePlugin';
8
8
  import { AgGridAdapter, RowNodeEvent } from './AgGridAdapter';
9
9
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
10
- import { AdaptableState } from '../AdaptableState/AdaptableState';
10
+ import { AdaptablePersistentState } from '../AdaptableState/AdaptableState';
11
11
  import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
12
12
  import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
13
13
  import { IModuleService } from '../Utilities/Services/Interface/IModuleService';
@@ -157,9 +157,9 @@ export declare class AdaptableAgGrid implements IAdaptable {
157
157
  static _initInternal(config: AdaptableInitInternalConfig): Promise<AdaptableApi>;
158
158
  private _initAdaptableAgGrid;
159
159
  midwayDestroy(): void;
160
- migrateLoadedAdaptableState(state: AdaptableState): AdaptableState;
161
- buildPostLoadHook(gridOptions: NormalizeAdaptableStateOptions): (state: AdaptableState) => AdaptableState;
162
- normalizeAdaptableState(state: AdaptableState, agGridOptions: NormalizeAdaptableStateOptions): AdaptableState;
160
+ migrateLoadedAdaptableState<T extends Partial<AdaptablePersistentState>>(state: T): T;
161
+ buildPostLoadHook(gridOptions: NormalizeAdaptableStateOptions): (state: Partial<AdaptablePersistentState>) => Partial<AdaptablePersistentState>;
162
+ normalizeAdaptableState(state: Partial<AdaptablePersistentState>, agGridOptions: NormalizeAdaptableStateOptions): Partial<AdaptablePersistentState>;
163
163
  private normaliseLayoutState;
164
164
  private normaliseToolPanelState;
165
165
  private getCurrentLayoutModel;
@@ -15,6 +15,7 @@ import { AG_GRID_GRAND_TOTAL_ROW_ID, AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_C
15
15
  import { generateSelectionColumn } from '../Api/Implementation/ColumnApiImpl';
16
16
  import { DataService } from '../Utilities/Services/DataService';
17
17
  import { AdaptableStore } from '../Redux/Store/AdaptableStore';
18
+ import { validateStateOptions } from '../Redux/Store/StateOptionsGuards';
18
19
  import { AdaptableApiImpl } from '../Api/Implementation/AdaptableApiImpl';
19
20
  import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
20
21
  import { CommentsService } from '../Utilities/Services/CommentsService';
@@ -739,6 +740,7 @@ export class AdaptableAgGrid {
739
740
  }
740
741
  }
741
742
  normalizeAdaptableOptions(adaptableOptions) {
743
+ validateStateOptions(adaptableOptions.stateOptions, this.logger);
742
744
  if (this.hasAutogeneratedPrimaryKey) {
743
745
  this.logger.warn(`Autogenerated primary key is enabled (adaptableOptions.autogeneratedPrimaryKey = true). This should be a last resort as it limits some Adaptable features. See: ${PrimaryKeyDocsLink}`);
744
746
  this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
@@ -88,7 +88,7 @@ export declare class AgGridColumnAdapter {
88
88
  private setupColumnHeaderStyle;
89
89
  private setupColumnCellEditor;
90
90
  private setupColumnCellRenderer;
91
- private setupColumnTooltipValueGetter;
91
+ private setupColumnTooltip;
92
92
  /**
93
93
  * Resolves a Range Bar bound (number / column id / Col-Min / Col-Max /
94
94
  * Col-Avg / Col-Median) into a concrete numeric value for the supplied row.