@adaptabletools/adaptable 24.0.0-canary.5 → 24.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/devtools.d.ts +182 -1
- package/index.css +300 -275
- 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/AdaptableOptions/UserInterfaceOptions.d.ts +4 -6
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/QuickSearchState.d.ts +4 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.js +4 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
- package/src/Api/Internal/AdaptableInternalApi.js +5 -3
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/StateInternalApi.d.ts +1 -1
- package/src/Api/Internal/StateInternalApi.js +6 -5
- package/src/Api/StateApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +0 -4
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -4
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +12 -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 +51 -21
- 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 +12 -14
- package/src/Utilities/Helpers/UIHelper.js +12 -35
- package/src/Utilities/ObjectFactory.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
- package/src/View/Components/StyleComponent.js +2 -2
- package/src/View/Dashboard/Dashboard.d.ts +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Dashboard/DashboardPopupSections.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +62 -25
- package/src/View/QuickSearch/QuickSearchInput.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
- package/src/View/StyledColumn/RangesComponent.js +13 -16
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +4 -4
- 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/ColorField/index.d.ts +14 -0
- package/src/components/ColorField/index.js +6 -0
- 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/migration/VersionUpgrade24.d.ts +9 -0
- package/src/migration/VersionUpgrade24.js +27 -0
- package/src/setupDevTools.js +605 -112
- 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/ColorField/index.d.ts +43 -0
- package/vendor/components/ColorField/index.d.ts.map +1 -0
- package/vendor/components/ColorField/index.js +81 -0
- package/vendor/components/ColorField/index.js.map +1 -0
- 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 +28 -0
- package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
- package/vendor/components/ColorPicker/index.d.ts +59 -0
- package/vendor/components/ColorPicker/index.d.ts.map +1 -0
- package/vendor/components/ColorPicker/index.js +204 -0
- package/vendor/components/ColorPicker/index.js.map +1 -0
- package/vendor/components/ColorPicker/themeColors.d.ts +53 -0
- package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
- package/vendor/components/ColorPicker/themeColors.js +110 -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/NumberInput/index.d.ts +51 -0
- package/vendor/components/NumberInput/index.d.ts.map +1 -0
- package/vendor/components/NumberInput/index.js +82 -0
- package/vendor/components/NumberInput/index.js.map +1 -0
- package/vendor/components/index.css +280 -24
- package/vendor/components/index.d.ts +6 -0
- package/vendor/components/index.d.ts.map +1 -1
- package/vendor/components/index.js +3 -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
- package/vendor/components/ui/input-group.d.ts.map +1 -1
- package/vendor/components/ui/input-group.js +5 -4
- package/vendor/components/ui/input-group.js.map +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
- package/src/components/ColorPicker/ColorPicker.js +0 -48
- package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
- package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
- package/src/components/ColorPicker/index.d.ts +0 -2
- package/src/components/ColorPicker/index.js +0 -2
|
@@ -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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ColorFieldProps as SharedColorFieldProps } from "../../../vendor/components/ColorField";
|
|
3
|
+
export type ColorFieldProps = Omit<SharedColorFieldProps, 'onChange' | 'clearable' | 'data-name'> & {
|
|
4
|
+
'data-name'?: string;
|
|
5
|
+
} & ({
|
|
6
|
+
clearable?: true;
|
|
7
|
+
onChange: (color: string | undefined) => void;
|
|
8
|
+
} | {
|
|
9
|
+
/** The colour is required, so there is no clear button and `onChange` always gets one. */
|
|
10
|
+
clearable: false;
|
|
11
|
+
onChange: (color: string) => void;
|
|
12
|
+
});
|
|
13
|
+
/** The shared colour field with AdapTable's defaults. */
|
|
14
|
+
export declare const ColorField: (props: ColorFieldProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ColorField as SharedColorField, } from "../../../vendor/components/ColorField";
|
|
3
|
+
export const ColorField = (props) => {
|
|
4
|
+
const { onChange, 'data-name': dataName = 'color-field', ...rest } = props;
|
|
5
|
+
return (_jsx(SharedColorField, { ...rest, "data-name": dataName, onChange: onChange }));
|
|
6
|
+
};
|
|
@@ -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: 1792496906928 || Date.now(),
|
|
4
|
+
VERSION: "24.0.0-canary.7" || '--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
|
}
|
|
@@ -33,6 +33,8 @@ import type { MigrationLogger } from './AdaptableUpgradeHelper';
|
|
|
33
33
|
* `Type: 'Change'` when missing
|
|
34
34
|
* 16. {@link migrateLayoutTagsToRegistry} — Layout extensions held in object Tags
|
|
35
35
|
* (`layoutTagOptions.autoCheckTagsForLayouts`) → `Layout.LayoutExtensions`
|
|
36
|
+
* 17. {@link VersionUpgrade24.migrateSwatchColorVars} — `--ab-color-swatch-N`
|
|
37
|
+
* colours → `--ab-color-palette-{N+12}`
|
|
36
38
|
*/
|
|
37
39
|
export declare class VersionUpgrade24 extends VersionUpgrade {
|
|
38
40
|
private options;
|
|
@@ -40,6 +42,13 @@ export declare class VersionUpgrade24 extends VersionUpgrade {
|
|
|
40
42
|
layoutTagOptions?: LayoutTagOptions;
|
|
41
43
|
});
|
|
42
44
|
migrateState(state: AdaptableState): AdaptableState;
|
|
45
|
+
/**
|
|
46
|
+
* Step 17. The 20 swatch colours were merged into the palette after its 12
|
|
47
|
+
* light / dark pairs, so `var(--ab-color-swatch-N)` in any saved style
|
|
48
|
+
* (Format Columns, Styled Columns, Alerts, Flashing Cells, shared entities…)
|
|
49
|
+
* becomes `var(--ab-color-palette-{N+12})` with the same colour.
|
|
50
|
+
*/
|
|
51
|
+
private migrateSwatchColorVars;
|
|
43
52
|
/**
|
|
44
53
|
* Migrates Notes from a single `Timestamp` to explicit `CreatedAt` / `UpdatedAt`.
|
|
45
54
|
*
|
|
@@ -34,8 +34,35 @@ export class VersionUpgrade24 extends VersionUpgrade {
|
|
|
34
34
|
this.retypeObservableCalculatedColumns(state);
|
|
35
35
|
this.stampFlashingCellTypes(state);
|
|
36
36
|
migrateLayoutTagsToRegistry(state, this.logger, this.options.layoutTagOptions);
|
|
37
|
+
this.migrateSwatchColorVars(state);
|
|
37
38
|
return state;
|
|
38
39
|
}
|
|
40
|
+
migrateSwatchColorVars(state) {
|
|
41
|
+
const swatchVar = /--ab-color-swatch-(\d+)\b/g;
|
|
42
|
+
let rewritten = 0;
|
|
43
|
+
const visit = (node) => {
|
|
44
|
+
if (!node || typeof node !== 'object') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const container = node;
|
|
48
|
+
for (const key of Object.keys(container)) {
|
|
49
|
+
const value = container[key];
|
|
50
|
+
if (typeof value !== 'string') {
|
|
51
|
+
visit(value);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const next = value.replace(swatchVar, (_, n) => `--ab-color-palette-${Number(n) + 12}`);
|
|
55
|
+
if (next !== value) {
|
|
56
|
+
container[key] = next;
|
|
57
|
+
rewritten++;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
visit(state);
|
|
62
|
+
if (rewritten > 0) {
|
|
63
|
+
this.logger.info(`Rewrote ${rewritten} colour value(s) from --ab-color-swatch-N to --ab-color-palette-{N+12} (v24).`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
39
66
|
migrateNoteTimestamps(state) {
|
|
40
67
|
const notes = state.Note?.Notes;
|
|
41
68
|
if (!notes?.length) {
|