@adaptabletools/adaptable 24.0.0-canary.5 → 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.
- package/devtools.d.ts +182 -1
- package/index.css +271 -102
- package/package.json +2 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -4
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +5 -5
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +3 -3
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +6 -4
- package/src/AdaptableOptions/StateOptions.d.ts +37 -13
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/QuickSearchState.d.ts +4 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.js +4 -3
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/StateInternalApi.d.ts +1 -1
- package/src/Api/Internal/StateInternalApi.js +2 -2
- package/src/Api/StateApi.d.ts +2 -2
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -7
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +8 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +12 -12
- package/src/Redux/Store/AdaptableStore.d.ts +8 -5
- package/src/Redux/Store/AdaptableStore.js +47 -19
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +5 -5
- package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
- package/src/Redux/Store/StateOptionsGuards.d.ts +58 -0
- package/src/Redux/Store/StateOptionsGuards.js +112 -0
- package/src/Redux/Store/isTransientReduxAction.d.ts +5 -0
- package/src/Redux/Store/isTransientReduxAction.js +19 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
- package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
- package/src/Utilities/Constants/ReduxConstants.js +5 -5
- package/src/Utilities/Helpers/AlertTypeHelper.d.ts +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +14 -0
- package/src/Utilities/Helpers/SettingsPanelHelper.js +37 -1
- package/src/Utilities/Helpers/UIHelper.d.ts +6 -3
- package/src/Utilities/Helpers/UIHelper.js +8 -4
- package/src/Utilities/ObjectFactory.js +3 -3
- package/src/View/Dashboard/DashboardPopupSections.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +62 -25
- package/src/View/StyledColumn/RangesComponent.js +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +2 -2
- package/src/View/Wizard/CollapsibleWizardCard.d.ts +3 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +17 -9
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -4
- package/src/agGrid/AdaptableAgGrid.js +2 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
- package/src/agGrid/AgGridColumnAdapter.js +4 -4
- package/src/components/aql/QueryBuilder/QueryBuilderInputs.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/normalizeLayoutModel.d.ts +1 -1
- package/src/layout-manager/src/simplifyLayoutModel.d.ts +1 -1
- package/src/migration/AdaptableUpgradeHelper.d.ts +7 -2
- package/src/migration/VersionUpgrade17.js +13 -8
- package/src/setupDevTools.js +442 -103
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/vendor/components/Button/index.d.ts +1 -1
- package/vendor/components/Button/index.d.ts.map +1 -1
- package/vendor/components/Button/index.js.map +1 -1
- package/vendor/components/CheckBox/index.d.ts +1 -1
- package/vendor/components/CheckBox/index.d.ts.map +1 -1
- package/vendor/components/CheckBox/index.js.map +1 -1
- package/vendor/components/ColorPicker/colorPickerTab.d.ts +4 -0
- package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -0
- package/vendor/components/ColorPicker/colorPickerTab.js +50 -0
- package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
- package/vendor/components/ColorPicker/index.d.ts +31 -0
- package/vendor/components/ColorPicker/index.d.ts.map +1 -0
- package/vendor/components/ColorPicker/index.js +132 -0
- package/vendor/components/ColorPicker/index.js.map +1 -0
- package/vendor/components/ColorPicker/themeColors.d.ts +24 -0
- package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
- package/vendor/components/ColorPicker/themeColors.js +52 -0
- package/vendor/components/ColorPicker/themeColors.js.map +1 -0
- package/vendor/components/Combobox/VirtualizedList.d.ts +1 -1
- package/vendor/components/Combobox/VirtualizedList.d.ts.map +1 -1
- package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
- package/vendor/components/Combobox/index.d.ts +1 -1
- package/vendor/components/Combobox/index.d.ts.map +1 -1
- package/vendor/components/Combobox/index.js.map +1 -1
- package/vendor/components/index.css +213 -0
- package/vendor/components/index.d.ts +2 -0
- package/vendor/components/index.d.ts.map +1 -1
- package/vendor/components/index.js +1 -0
- package/vendor/components/index.js.map +1 -1
- package/vendor/components/ui/combobox.d.ts.map +1 -1
- package/vendor/components/ui/combobox.js +1 -1
- package/vendor/components/ui/combobox.js.map +1 -1
|
@@ -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
|
|
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
|
-
|
|
37
|
+
summaryKeyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
|
|
36
38
|
}
|
|
37
39
|
if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
|
|
38
|
-
|
|
40
|
+
summaryKeyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
|
|
39
41
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
96
|
+
layoutKeyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
|
|
54
97
|
? ArrayExtensions.createCommaSeparatedString(freeTextColumns)
|
|
55
98
|
: 'None' });
|
|
56
|
-
|
|
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
|
|
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: "
|
|
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 {
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 {
|
|
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:
|
|
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 {
|
|
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:
|
|
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:
|
|
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:
|
|
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 {
|
|
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:
|
|
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 {
|
|
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:
|
|
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
|
|
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
|
|
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 =
|
|
31
|
-
const isInteractiveCompactSummary =
|
|
32
|
-
const toggleExpanded = () =>
|
|
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]',
|
|
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),
|
|
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: !
|
|
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',
|
|
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 {
|
|
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:
|
|
161
|
-
buildPostLoadHook(gridOptions: NormalizeAdaptableStateOptions): (state:
|
|
162
|
-
normalizeAdaptableState(state:
|
|
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
|
|
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.
|
|
@@ -67,7 +67,7 @@ const STABLE_CALLBACK_COL_DEF_PROPERTIES = new Set([
|
|
|
67
67
|
'pivotComparator',
|
|
68
68
|
'getFindText',
|
|
69
69
|
'getQuickFilterText',
|
|
70
|
-
'
|
|
70
|
+
'tooltip',
|
|
71
71
|
'cellEditorParams',
|
|
72
72
|
'suppressNoteActions',
|
|
73
73
|
]);
|
|
@@ -333,7 +333,7 @@ export class AgGridColumnAdapter {
|
|
|
333
333
|
this.setupColumnHeaderStyle(colSetupInfo);
|
|
334
334
|
this.setupColumnHeaderClass(colSetupInfo);
|
|
335
335
|
this.setupColumnValueGetter(colSetupInfo);
|
|
336
|
-
this.
|
|
336
|
+
this.setupColumnTooltip(colSetupInfo);
|
|
337
337
|
if (!isAutoRowGroupColumn) {
|
|
338
338
|
this.setupColumnFilter(colSetupInfo);
|
|
339
339
|
this.setupColumnFloatingFilter(colSetupInfo);
|
|
@@ -676,9 +676,9 @@ export class AgGridColumnAdapter {
|
|
|
676
676
|
}
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
|
|
679
|
+
setupColumnTooltip({ col, colId, abColumn }) {
|
|
680
680
|
let hasTooptip = false;
|
|
681
|
-
this.setColDefProperty(col, '
|
|
681
|
+
this.setColDefProperty(col, 'tooltip', () => {
|
|
682
682
|
const styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
683
683
|
if (!styledColumn || styledColumn.IsSuspended) {
|
|
684
684
|
return undefined;
|
|
@@ -97,7 +97,7 @@ export const PrimitiveColumnOrFieldSelector = (props) => {
|
|
|
97
97
|
input = (_jsx(Box, { "data-id": "query-input-row-display", "data-name": "qb2-whole-row", "data-slot": "select-trigger", className: subjectPillClassName, children: "Whole Row" }));
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
|
-
input = (_jsx(Box, { "data-id": "query-input-scope-display", "data-slot": "select-trigger", className: subjectPillClassName, children:
|
|
100
|
+
input = (_jsx(Box, { "data-id": "query-input-scope-display", "data-slot": "select-trigger", className: subjectPillClassName, children: "Scoped Columns" }));
|
|
101
101
|
}
|
|
102
102
|
const typeOptions = [
|
|
103
103
|
{
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "24.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1792067993639 || Date.now(),
|
|
4
|
+
VERSION: "24.0.0-canary.6" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -7,4 +7,4 @@ export declare function normalizeTableLayoutModel(layout: TableLayoutModel, opti
|
|
|
7
7
|
export declare function normalizePivotLayoutModel(layout: PivotLayoutModel): PivotLayoutModel;
|
|
8
8
|
export declare function normalizeLayoutModel(layout: TableLayoutModel | PivotLayoutModel, options?: {
|
|
9
9
|
isTree: boolean;
|
|
10
|
-
}):
|
|
10
|
+
}): TableLayoutModel | PivotLayoutModel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
|
|
2
2
|
export declare function simplifyTableLayoutModel(layout: TableLayoutModel): TableLayoutModel;
|
|
3
3
|
export declare function simplifyPivotLayoutModel(layout: PivotLayoutModel): PivotLayoutModel;
|
|
4
|
-
export declare function simplifyLayoutModel(layout: TableLayoutModel | PivotLayoutModel):
|
|
4
|
+
export declare function simplifyLayoutModel(layout: TableLayoutModel | PivotLayoutModel): TableLayoutModel | PivotLayoutModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VersionUpgrade } from './VersionUpgrade';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptablePersistentState } from '../AdaptableState/AdaptableState';
|
|
3
3
|
import { LayoutTagOptions } from '../AdaptableOptions/LayoutOptions';
|
|
4
4
|
/**
|
|
5
5
|
* Config object used by State Auto-migration Wizard
|
|
@@ -38,7 +38,12 @@ export declare class AdaptableUpgradeHelper {
|
|
|
38
38
|
protected versionUpgrades: Map<number, VersionUpgrade>;
|
|
39
39
|
protected logger: MigrationLogger;
|
|
40
40
|
private constructor();
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Migrates the given Adaptable State from `config.fromVersion` to `config.toVersion`.
|
|
43
|
+
*
|
|
44
|
+
* Accepts both a full `AdaptableState` and a (partial) `AdaptablePersistentState` - e.g. as received in `StateOptions.applyState()` - and returns the same shape.
|
|
45
|
+
*/
|
|
46
|
+
static migrateAdaptableState<T extends Partial<AdaptablePersistentState>>(state: T, config: UpgradeConfig): T;
|
|
42
47
|
/**
|
|
43
48
|
* Published major version. When `VERSION` is not a parseable semver (local
|
|
44
49
|
* builds and tests) this is 24, matching the previous helper fallback.
|
|
@@ -91,7 +91,7 @@ export class VersionUpgrade17 extends VersionUpgrade {
|
|
|
91
91
|
if (dashboardState?.VisibleButtons) {
|
|
92
92
|
this.logger.warn(`Migrating deprecated DashboardState.VisibleButtons: [${dashboardState.VisibleButtons}].`);
|
|
93
93
|
state.Dashboard.ModuleButtons = [
|
|
94
|
-
...state.Dashboard.ModuleButtons,
|
|
94
|
+
...(state.Dashboard.ModuleButtons ?? []),
|
|
95
95
|
...dashboardState.VisibleButtons,
|
|
96
96
|
];
|
|
97
97
|
delete state.Dashboard.VisibleButtons;
|
|
@@ -175,22 +175,24 @@ export class VersionUpgrade17 extends VersionUpgrade {
|
|
|
175
175
|
return state;
|
|
176
176
|
}
|
|
177
177
|
const expression = oldQueryState.CurrentQuery;
|
|
178
|
-
const currentLayout = state.Layout
|
|
178
|
+
const currentLayout = state.Layout?.Layouts?.find((l) => l.Name === state.Layout?.CurrentLayout);
|
|
179
179
|
const currentGridFilter = currentLayout?.GridFilter;
|
|
180
180
|
const currentGridFilterExpression = currentGridFilter && !currentGridFilter.IsSuspended ? currentGridFilter.Expression || '' : '';
|
|
181
|
-
if (expression &&
|
|
181
|
+
if (expression &&
|
|
182
|
+
currentLayout &&
|
|
183
|
+
StringExtensions.IsNullOrEmpty(currentGridFilterExpression)) {
|
|
182
184
|
currentLayout.GridFilter = {
|
|
183
185
|
...currentGridFilter,
|
|
184
186
|
Expression: expression,
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
|
-
state.Dashboard
|
|
189
|
+
state.Dashboard?.Tabs?.forEach((tab) => {
|
|
188
190
|
if (tab.Toolbars.includes('Query')) {
|
|
189
191
|
tab.Toolbars = tab.Toolbars.map((t) => (t == 'Query' ? 'GridFilter' : t));
|
|
190
192
|
}
|
|
191
193
|
});
|
|
192
194
|
let updatePinnedToolbars = false;
|
|
193
|
-
if (state.Dashboard
|
|
195
|
+
if (state.Dashboard?.PinnedToolbars) {
|
|
194
196
|
state.Dashboard.PinnedToolbars = state.Dashboard.PinnedToolbars.map((pinnedToolbar) => {
|
|
195
197
|
if (pinnedToolbar == 'Query') {
|
|
196
198
|
return 'GridFilter';
|
|
@@ -204,11 +206,12 @@ export class VersionUpgrade17 extends VersionUpgrade {
|
|
|
204
206
|
const oldQueryState = state.Query;
|
|
205
207
|
const oldNamedQueries = oldQueryState?.NamedQueries;
|
|
206
208
|
if (ArrayExtensions.IsNotNullOrEmpty(oldNamedQueries)) {
|
|
207
|
-
|
|
209
|
+
state.NamedQuery ??= {};
|
|
210
|
+
const currentNamedQueries = (state.NamedQuery.NamedQueries ??= []);
|
|
208
211
|
oldNamedQueries.forEach((oldNamedQuery) => {
|
|
209
212
|
const currentQuery = currentNamedQueries.find((q) => q.Name === oldNamedQuery.Name);
|
|
210
213
|
if (!currentQuery) {
|
|
211
|
-
|
|
214
|
+
currentNamedQueries.push(oldNamedQuery);
|
|
212
215
|
}
|
|
213
216
|
});
|
|
214
217
|
}
|
|
@@ -236,6 +239,7 @@ export class VersionUpgrade17 extends VersionUpgrade {
|
|
|
236
239
|
};
|
|
237
240
|
})
|
|
238
241
|
.filter(Boolean);
|
|
242
|
+
state.StyledColumn ??= {};
|
|
239
243
|
state.StyledColumn.StyledColumns ??= [];
|
|
240
244
|
styledColumns.forEach((styledColumn) => {
|
|
241
245
|
state.StyledColumn.StyledColumns.push(styledColumn);
|
|
@@ -263,8 +267,9 @@ export class VersionUpgrade17 extends VersionUpgrade {
|
|
|
263
267
|
}
|
|
264
268
|
});
|
|
265
269
|
const alertState = state.Alert;
|
|
266
|
-
if (ArrayExtensions.
|
|
270
|
+
if (ArrayExtensions.IsNullOrEmpty(state.FlashingCell?.FlashingCellDefinitions) &&
|
|
267
271
|
ArrayExtensions.IsNotNullOrEmpty(alertState?.FlashingAlertDefinitions)) {
|
|
272
|
+
state.FlashingCell ??= {};
|
|
268
273
|
state.FlashingCell.FlashingCellDefinitions = alertState.FlashingAlertDefinitions;
|
|
269
274
|
delete state.Alert.FlashingAlertDefinitions;
|
|
270
275
|
}
|