@adaptabletools/adaptable-cjs 20.0.0-canary.23 → 20.0.0-canary.25
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/base.css +5 -0
- package/base.css.map +1 -1
- package/index.css +4 -0
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/src/AdaptableOptions/StateOptions.d.ts +1 -1
- package/src/AdaptableState/AdaptableState.d.ts +2 -2
- package/src/AdaptableState/AlertState.d.ts +2 -2
- package/src/AdaptableState/ApplicationState.d.ts +2 -2
- package/src/AdaptableState/{ConfigState.d.ts → BaseState.d.ts} +1 -1
- package/src/AdaptableState/CalculatedColumnState.d.ts +2 -2
- package/src/AdaptableState/ChartingState.d.ts +2 -2
- package/src/AdaptableState/CommentState.d.ts +2 -2
- package/src/AdaptableState/CustomSortState.d.ts +2 -2
- package/src/AdaptableState/DashboardState.d.ts +2 -2
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FlashingCellState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +2 -2
- package/src/AdaptableState/FreeTextColumnState.d.ts +2 -2
- package/src/AdaptableState/IPushPullState.d.ts +2 -2
- package/src/AdaptableState/LayoutState.d.ts +2 -2
- package/src/AdaptableState/NamedQueryState.d.ts +2 -2
- package/src/AdaptableState/NoteState.d.ts +2 -2
- package/src/AdaptableState/OpenFinState.d.ts +2 -2
- package/src/AdaptableState/PlusMinusState.d.ts +2 -2
- package/src/AdaptableState/PopupState.d.ts +2 -2
- package/src/AdaptableState/QuickSearchState.d.ts +2 -2
- package/src/AdaptableState/ScheduleState.d.ts +2 -2
- package/src/AdaptableState/ShortcutState.d.ts +2 -2
- package/src/AdaptableState/StatusBarState.d.ts +2 -2
- package/src/AdaptableState/StyledColumnState.d.ts +2 -2
- package/src/AdaptableState/TeamSharingState.d.ts +2 -2
- package/src/AdaptableState/ThemeState.d.ts +2 -2
- package/src/AdaptableState/ToolPanelState.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/ApiBase.d.ts +2 -2
- package/src/Api/Implementation/ApiBase.js +2 -2
- package/src/Api/Implementation/{ConfigApiImpl.d.ts → StateApiImpl.d.ts} +6 -6
- package/src/Api/Implementation/{ConfigApiImpl.js → StateApiImpl.js} +5 -5
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Api/{ConfigApi.d.ts → StateApi.d.ts} +4 -4
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -2
- package/src/Redux/Store/AdaptableReduxMerger.d.ts +2 -2
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Strategy/AdaptableModuleBase.js +2 -3
- package/src/View/StateManagement/StateManagementPopup.js +5 -5
- package/src/View/StateManagement/StateManagementViewPanel.js +2 -2
- package/src/View/StateManagement/components/ExportDropdown.js +2 -2
- package/src/agGrid/AgGridExportAdapter.js +4 -0
- package/src/components/Select/Select.js +11 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +11 -11
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -4
- package/tsconfig.cjs.tsbuildinfo +1 -1
- /package/src/AdaptableState/{ConfigState.js → BaseState.js} +0 -0
- /package/src/Api/{ConfigApi.js → StateApi.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScreenPopup, ConfirmationPopup, PromptPopup, WindowPopup, FormPopup } from '../Utilities/Interface/MessagePopups';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseState } from './BaseState';
|
|
3
3
|
import { ProgressIndicatorConfig } from './Common/ProgressIndicatorConfig';
|
|
4
4
|
export interface ProgressIndicator extends ProgressIndicatorConfig {
|
|
5
5
|
active: boolean;
|
|
@@ -7,7 +7,7 @@ export interface ProgressIndicator extends ProgressIndicatorConfig {
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal state to manage open popups - NOT persisted by Redux
|
|
9
9
|
*/
|
|
10
|
-
export interface PopupState extends
|
|
10
|
+
export interface PopupState extends BaseState {
|
|
11
11
|
ScreenPopup: ScreenPopup;
|
|
12
12
|
WindowPopup: WindowPopup;
|
|
13
13
|
FormPopup: FormPopup;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AdaptableStyle } from './Common/AdaptableStyle';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseState } from './BaseState';
|
|
3
3
|
/**
|
|
4
4
|
* Adaptable State Section for Quick Search Module
|
|
5
5
|
*/
|
|
6
|
-
export interface QuickSearchState extends
|
|
6
|
+
export interface QuickSearchState extends BaseState {
|
|
7
7
|
/**
|
|
8
8
|
* Last Quick Search that was run (and will run again at start up)
|
|
9
9
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { IPushPullSchedule } from './IPushPullState';
|
|
3
3
|
import { OpenFinSchedule } from './OpenFinState';
|
|
4
4
|
import { AdaptableMessageType, ReportSchedule } from '../types';
|
|
@@ -7,7 +7,7 @@ import { BaseSchedule } from './Common/Schedule';
|
|
|
7
7
|
* Adaptable State Section for the Schedule Module
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
export interface ScheduleState extends
|
|
10
|
+
export interface ScheduleState extends BaseState {
|
|
11
11
|
/**
|
|
12
12
|
* Schedules connected to Reports (created in the Export function)
|
|
13
13
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { ColumnScope } from './Common/ColumnScope';
|
|
3
3
|
import { SuspendableObject } from './Common/SuspendableObject';
|
|
4
4
|
/**
|
|
5
5
|
* Adaptable State Section for Shortcut Module
|
|
6
6
|
*/
|
|
7
|
-
export interface ShortcutState extends
|
|
7
|
+
export interface ShortcutState extends BaseState {
|
|
8
8
|
/**
|
|
9
9
|
* Collection of Shortcuts - designed to speed up data entry
|
|
10
10
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from '../types';
|
|
2
2
|
import { AdaptableStatusBarPanel } from './Common/Types';
|
|
3
3
|
/**
|
|
4
4
|
* Adaptable State Section for the Adaptable Status Bar
|
|
5
5
|
*/
|
|
6
|
-
export interface StatusBarState extends
|
|
6
|
+
export interface StatusBarState extends BaseState {
|
|
7
7
|
/**
|
|
8
8
|
* Adaptable Status Bars to display - can be unlimited and displayed in 3 locations
|
|
9
9
|
* @defaultValue null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { SuspendableObject } from './Common/SuspendableObject';
|
|
3
3
|
import { AdaptableCustomIcon, AdaptableSystemIcon, AdaptablePredicate, AdaptableStyle, AdaptableBooleanQuery } from '../types';
|
|
4
4
|
import { TypeHint } from './Common/Types';
|
|
@@ -7,7 +7,7 @@ import { AgSparklineOptions } from 'ag-charts-types';
|
|
|
7
7
|
/**
|
|
8
8
|
* Adaptable State Section for Styled Column Module
|
|
9
9
|
*/
|
|
10
|
-
export interface StyledColumnState extends
|
|
10
|
+
export interface StyledColumnState extends BaseState {
|
|
11
11
|
/**
|
|
12
12
|
* Collection of Special Column Styles
|
|
13
13
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { AdaptableObject, AdaptableObjectTag } from './Common/AdaptableObject';
|
|
3
3
|
import { AdaptableModule } from '../types';
|
|
4
4
|
import { TypeUuid } from './Uuid';
|
|
@@ -6,7 +6,7 @@ import * as Redux from 'redux';
|
|
|
6
6
|
/**
|
|
7
7
|
* State for Team Sharing; internal so not designed to be provided as part of Initial Adaptable State
|
|
8
8
|
*/
|
|
9
|
-
export interface TeamSharingState extends
|
|
9
|
+
export interface TeamSharingState extends BaseState {
|
|
10
10
|
/**
|
|
11
11
|
* List of objects currently being Team Shared
|
|
12
12
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { AdaptableObject } from './Common/AdaptableObject';
|
|
3
3
|
import { TypeHint } from './Common/Types';
|
|
4
4
|
/**
|
|
5
5
|
* Theme section of Adaptable State
|
|
6
6
|
*/
|
|
7
|
-
export interface ThemeState extends
|
|
7
|
+
export interface ThemeState extends BaseState {
|
|
8
8
|
/**
|
|
9
9
|
* Name of current theme (or theme to set at startup); leave blank if using 'Light Theme', set to 'dark' for 'Dark Theme' or provide name of Custom Theme
|
|
10
10
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
2
|
import { AdaptableModuleButtons, AdaptableToolPanel } from './Common/Types';
|
|
3
3
|
/**
|
|
4
4
|
* Adaptable State Section for the AdapTable ToolPanel
|
|
5
5
|
*/
|
|
6
|
-
export interface ToolPanelState extends
|
|
6
|
+
export interface ToolPanelState extends BaseState {
|
|
7
7
|
/**
|
|
8
8
|
* Adaptable Tool Panels which are viaible
|
|
9
9
|
* @defaultValue ToolPanels for all available Modules (subject to Entitlement rules)
|
|
@@ -5,7 +5,7 @@ import { BulkUpdateApi } from './BulkUpdateApi';
|
|
|
5
5
|
import { CalendarApi } from './CalendarApi';
|
|
6
6
|
import { CalculatedColumnApi } from './CalculatedColumnApi';
|
|
7
7
|
import { CellSummaryApi } from './CellSummaryApi';
|
|
8
|
-
import {
|
|
8
|
+
import { StateApi } from './StateApi';
|
|
9
9
|
import { CustomSortApi } from './CustomSortApi';
|
|
10
10
|
import { DashboardApi } from './DashboardApi';
|
|
11
11
|
import { ToolPanelApi } from './ToolPanelApi';
|
|
@@ -95,7 +95,7 @@ export interface AdaptableApi {
|
|
|
95
95
|
/**
|
|
96
96
|
* Methods giving access to Adaptable State
|
|
97
97
|
*/
|
|
98
|
-
|
|
98
|
+
stateApi: StateApi;
|
|
99
99
|
/**
|
|
100
100
|
* Provides access to the Custom Sort Module
|
|
101
101
|
*/
|
|
@@ -6,7 +6,7 @@ import { BulkUpdateApi } from '../BulkUpdateApi';
|
|
|
6
6
|
import { CalendarApi } from '../CalendarApi';
|
|
7
7
|
import { CalculatedColumnApi } from '../CalculatedColumnApi';
|
|
8
8
|
import { CellSummaryApi } from '../CellSummaryApi';
|
|
9
|
-
import {
|
|
9
|
+
import { StateApi } from '../StateApi';
|
|
10
10
|
import { CustomSortApi } from '../CustomSortApi';
|
|
11
11
|
import { DashboardApi } from '../DashboardApi';
|
|
12
12
|
import { ToolPanelApi } from '../ToolPanelApi';
|
|
@@ -57,7 +57,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
57
57
|
calculatedColumnApi: CalculatedColumnApi;
|
|
58
58
|
cellSummaryApi: CellSummaryApi;
|
|
59
59
|
columnApi: ColumnApi;
|
|
60
|
-
|
|
60
|
+
stateApi: StateApi;
|
|
61
61
|
customSortApi: CustomSortApi;
|
|
62
62
|
dashboardApi: DashboardApi;
|
|
63
63
|
dataSetApi: DataSetApi;
|
|
@@ -8,7 +8,7 @@ const PluginsApiImpl_1 = require("./PluginsApiImpl");
|
|
|
8
8
|
const BulkUpdateApiImpl_1 = require("./BulkUpdateApiImpl");
|
|
9
9
|
const CalculatedColumnApiImpl_1 = require("./CalculatedColumnApiImpl");
|
|
10
10
|
const CellSummaryApiImpl_1 = require("./CellSummaryApiImpl");
|
|
11
|
-
const
|
|
11
|
+
const StateApiImpl_1 = require("./StateApiImpl");
|
|
12
12
|
const CustomSortApiImpl_1 = require("./CustomSortApiImpl");
|
|
13
13
|
const DashboardApiImpl_1 = require("./DashboardApiImpl");
|
|
14
14
|
const ToolPanelApiImpl_1 = require("./ToolPanelApiImpl");
|
|
@@ -70,7 +70,7 @@ class AdaptableApiImpl {
|
|
|
70
70
|
this.columnApi = new ColumnApiImpl_1.ColumnApiImpl(adaptable);
|
|
71
71
|
this.columnMenuApi = new ColumnMenuApiImpl_1.ColumnMenuApiImpl(adaptable);
|
|
72
72
|
this.contextMenuApi = new ContextMenuApiImpl_1.ContextMenuApiImpl(adaptable);
|
|
73
|
-
this.
|
|
73
|
+
this.stateApi = new StateApiImpl_1.StateApiImpl(adaptable);
|
|
74
74
|
this.customSortApi = new CustomSortApiImpl_1.CustomSortApiImpl(adaptable);
|
|
75
75
|
this.dashboardApi = new DashboardApiImpl_1.DashboardApiImpl(adaptable);
|
|
76
76
|
this.dataSetApi = new DataSetApiImpl_1.DataSetApiImpl(adaptable);
|
|
@@ -131,7 +131,7 @@ class AdaptableApiImpl {
|
|
|
131
131
|
this.cellSummaryApi = null;
|
|
132
132
|
this.chartingApi = null;
|
|
133
133
|
this.columnApi = null;
|
|
134
|
-
this.
|
|
134
|
+
this.stateApi = null;
|
|
135
135
|
this.customSortApi = null;
|
|
136
136
|
this.dashboardApi = null;
|
|
137
137
|
this.dataChangeHistoryApi = null;
|
|
@@ -8,7 +8,7 @@ import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { GridApi as AgGridApi } from 'ag-grid-enterprise';
|
|
10
10
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
11
|
-
import { ActionColumnApi, ActionColumnOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, FilterApi, ColumnOptions, CommentOptions,
|
|
11
|
+
import { ActionColumnApi, ActionColumnOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, FilterApi, ColumnOptions, CommentOptions, StateApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ColumnScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions, ColumnMenuOptions, ContextMenuOptions, FilterOptions, ColumnFilterApi, OptionsApi } from '../../types';
|
|
12
12
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
13
13
|
import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
|
|
14
14
|
import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
|
|
@@ -105,7 +105,7 @@ export declare abstract class ApiBase {
|
|
|
105
105
|
protected getCalculatedColumnApi(): CalculatedColumnApi;
|
|
106
106
|
protected getCellSummaryApi(): CellSummaryApi;
|
|
107
107
|
protected getColumnApi(): ColumnApi;
|
|
108
|
-
protected
|
|
108
|
+
protected getStateApi(): StateApi;
|
|
109
109
|
protected getCustomSortApi(): CustomSortApi;
|
|
110
110
|
protected getDashboardApi(): DashboardApi;
|
|
111
111
|
protected getDataSetApi(): DataSetApi;
|
|
@@ -243,8 +243,8 @@ class ApiBase {
|
|
|
243
243
|
getColumnApi() {
|
|
244
244
|
return this.getAdaptableApi().columnApi;
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
return this.getAdaptableApi().
|
|
246
|
+
getStateApi() {
|
|
247
|
+
return this.getAdaptableApi().stateApi;
|
|
248
248
|
}
|
|
249
249
|
getCustomSortApi() {
|
|
250
250
|
return this.getAdaptableApi().customSortApi;
|
|
@@ -9,29 +9,29 @@ import { DashboardState } from '../../AdaptableState/DashboardState';
|
|
|
9
9
|
import { CustomSortState } from '../../AdaptableState/CustomSortState';
|
|
10
10
|
import { CalculatedColumnState } from '../../AdaptableState/CalculatedColumnState';
|
|
11
11
|
import { AlertState } from '../../AdaptableState/AlertState';
|
|
12
|
-
import {
|
|
12
|
+
import { BaseState } from '../../AdaptableState/BaseState';
|
|
13
13
|
import { AdaptablePersistentState, AdaptableState } from '../../AdaptableState/AdaptableState';
|
|
14
14
|
import { ApiBase } from './ApiBase';
|
|
15
15
|
import { ApplicationState } from '../../AdaptableState/ApplicationState';
|
|
16
16
|
import { FreeTextColumnState } from '../../AdaptableState/FreeTextColumnState';
|
|
17
17
|
import { ToolPanelState } from '../../AdaptableState/ToolPanelState';
|
|
18
|
-
import {
|
|
18
|
+
import { StateApi } from '../StateApi';
|
|
19
19
|
import { AdaptableModule, AdaptableStateKey } from '../../AdaptableState/Common/Types';
|
|
20
20
|
import { AdaptableOptions, AdaptableSearchState, AdaptableSortState, FlashingCellState, InitialState, NamedQueryState, ScheduleState, StatusBarState, StyledColumnState } from '../../types';
|
|
21
21
|
import { PredefinedConfig } from '../../AdaptableState/InitialState';
|
|
22
22
|
import { ChartingState } from '../../AdaptableState/ChartingState';
|
|
23
23
|
import { NoteState } from '../../AdaptableState/NoteState';
|
|
24
|
-
export declare class
|
|
24
|
+
export declare class StateApiImpl extends ApiBase implements StateApi {
|
|
25
25
|
configInit(): void;
|
|
26
26
|
copyAllStateToClipboard(): void;
|
|
27
27
|
copyUserStateToClipboard(): void;
|
|
28
28
|
getPredefinedConfig(): PredefinedConfig | any;
|
|
29
|
-
getInitialState():
|
|
29
|
+
getInitialState(): InitialState | any;
|
|
30
30
|
reloadPredefinedConfig(newPredefinedConfig?: PredefinedConfig): void;
|
|
31
31
|
reloadInitialState(newInitialState?: InitialState): void;
|
|
32
32
|
getAllState(): AdaptableState;
|
|
33
33
|
getPersistedState(): AdaptablePersistentState;
|
|
34
|
-
getAllUserState():
|
|
34
|
+
getAllUserState(): BaseState[];
|
|
35
35
|
loadUserState(state: InitialState): void;
|
|
36
36
|
getAdaptableSearchState(): AdaptableSearchState;
|
|
37
37
|
getAdaptableSortState(): AdaptableSortState;
|
|
@@ -43,7 +43,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
43
43
|
}): Promise<void>;
|
|
44
44
|
getDescriptionForModule(module: AdaptableModule): string;
|
|
45
45
|
getHelpPageForModule(module: AdaptableModule): string;
|
|
46
|
-
getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean):
|
|
46
|
+
getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean): BaseState | string;
|
|
47
47
|
incrementUserStateRevision(stateKey: AdaptableStateKey): void;
|
|
48
48
|
getAlertState(returnJson?: boolean): AlertState;
|
|
49
49
|
getApplicationState(returnJson?: boolean): ApplicationState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StateApiImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableStore_1 = require("../../Redux/Store/AdaptableStore");
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
@@ -27,7 +27,7 @@ const SmartEditRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers
|
|
|
27
27
|
const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
|
|
28
28
|
const ToolPanelRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ToolPanelRedux"));
|
|
29
29
|
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
30
|
-
class
|
|
30
|
+
class StateApiImpl extends ApiBase_1.ApiBase {
|
|
31
31
|
configInit() {
|
|
32
32
|
this.dispatchAction((0, AdaptableStore_1.InitState)());
|
|
33
33
|
}
|
|
@@ -44,14 +44,14 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
44
44
|
Helper_1.default.copyToClipboard(stringifiedState);
|
|
45
45
|
}
|
|
46
46
|
getPredefinedConfig() {
|
|
47
|
-
(0, logDeprecation_1.logDeprecation)(this.getAdatableLogger(), '
|
|
47
|
+
(0, logDeprecation_1.logDeprecation)(this.getAdatableLogger(), 'StateApi', 'getPredefinedConfig', 'getInitialState');
|
|
48
48
|
return this.getInitialState();
|
|
49
49
|
}
|
|
50
50
|
getInitialState() {
|
|
51
51
|
return this._adaptable.adaptableOptions.initialState;
|
|
52
52
|
}
|
|
53
53
|
reloadPredefinedConfig(newPredefinedConfig) {
|
|
54
|
-
(0, logDeprecation_1.logDeprecation)(this.getAdatableLogger(), '
|
|
54
|
+
(0, logDeprecation_1.logDeprecation)(this.getAdatableLogger(), 'StateApi', 'reloadPredefinedConfig', 'reloadInitialState');
|
|
55
55
|
this.reloadInitialState(newPredefinedConfig);
|
|
56
56
|
}
|
|
57
57
|
reloadInitialState(newInitialState) {
|
|
@@ -393,4 +393,4 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
exports.
|
|
396
|
+
exports.StateApiImpl = StateApiImpl;
|
|
@@ -7,7 +7,7 @@ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
|
7
7
|
class EventInternalApi extends ApiBase_1.ApiBase {
|
|
8
8
|
fireGridSortedEvent() {
|
|
9
9
|
if (this.isAdapTableReady()) {
|
|
10
|
-
const adaptableSortState = this.
|
|
10
|
+
const adaptableSortState = this.getStateApi().getAdaptableSortState();
|
|
11
11
|
const gridSortedInfo = {
|
|
12
12
|
adaptableSortState: adaptableSortState,
|
|
13
13
|
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
@@ -8,7 +8,7 @@ import { DashboardState } from '../AdaptableState/DashboardState';
|
|
|
8
8
|
import { CustomSortState } from '../AdaptableState/CustomSortState';
|
|
9
9
|
import { CalculatedColumnState } from '../AdaptableState/CalculatedColumnState';
|
|
10
10
|
import { AlertState } from '../AdaptableState/AlertState';
|
|
11
|
-
import {
|
|
11
|
+
import { BaseState } from '../AdaptableState/BaseState';
|
|
12
12
|
import { PlusMinusState } from '../AdaptableState/PlusMinusState';
|
|
13
13
|
import { ApplicationState } from '../AdaptableState/ApplicationState';
|
|
14
14
|
import { AdaptablePersistentState, AdaptableState } from '../AdaptableState/AdaptableState';
|
|
@@ -19,7 +19,7 @@ import { AdaptableSearchState, AdaptableSortState, ChartingState, FlashingCellSt
|
|
|
19
19
|
/**
|
|
20
20
|
* Range of functions to access Initial and Full Adaptable State
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface StateApi {
|
|
23
23
|
/**
|
|
24
24
|
* Changes the key used for persisting the AdaptableState into localStorage. Optionally provides a initialState to load.
|
|
25
25
|
* @param adaptableStateKey - key for persisting the AdaptableState into localStorage
|
|
@@ -62,7 +62,7 @@ export interface ConfigApi {
|
|
|
62
62
|
* Loads supplied user state, replacing (NOT merging) existing User(persisted) State.
|
|
63
63
|
* @param state
|
|
64
64
|
*/
|
|
65
|
-
loadUserState(
|
|
65
|
+
loadUserState(state: InitialState): void;
|
|
66
66
|
/**
|
|
67
67
|
* Retrieves ALL state which is currently stored by Adaptable (both persistent and transient/internal)
|
|
68
68
|
*/
|
|
@@ -94,7 +94,7 @@ export interface ConfigApi {
|
|
|
94
94
|
* @param stateKey section of State to return
|
|
95
95
|
* @param returnJson whether to return section as JSON or object
|
|
96
96
|
*/
|
|
97
|
-
getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean):
|
|
97
|
+
getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean): BaseState | string;
|
|
98
98
|
/**
|
|
99
99
|
* Adds '1' to current revision number of State element
|
|
100
100
|
* @param stateKey Adaptable State Key to update
|
|
@@ -54,8 +54,8 @@ class AdaptableReduxLocalStorageEngine {
|
|
|
54
54
|
}).then((parsedJsonState) => {
|
|
55
55
|
// we need to merge the Initial Adaptable State
|
|
56
56
|
return Promise.resolve(initialState)
|
|
57
|
-
.then((
|
|
58
|
-
return (0, AdaptableReduxMerger_1.MergeStateFunction)(
|
|
57
|
+
.then((parsedInitialState) => {
|
|
58
|
+
return (0, AdaptableReduxMerger_1.MergeStateFunction)(parsedInitialState, parsedJsonState);
|
|
59
59
|
})
|
|
60
60
|
.catch((err) => AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`AdaptableId: ${this.adaptableId}`, err));
|
|
61
61
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseState } from '../../AdaptableState/BaseState';
|
|
2
2
|
import { AdaptableState } from '../../AdaptableState/AdaptableState';
|
|
3
3
|
export declare function AddStateSource(stateObject: any, source: 'Config' | 'User'): any;
|
|
4
4
|
export declare function ProcessKeepUserDefinedRevision(configState: any, currentUserState: any): any;
|
|
@@ -7,7 +7,7 @@ export declare function MergeState(oldState: any, newState: any): any;
|
|
|
7
7
|
type TypeReducer = (state: AdaptableState, action: {
|
|
8
8
|
type: string;
|
|
9
9
|
State?: {
|
|
10
|
-
[s: string]:
|
|
10
|
+
[s: string]: BaseState;
|
|
11
11
|
};
|
|
12
12
|
}) => AdaptableState;
|
|
13
13
|
export declare const mergeReducer: (rootReducer: TypeReducer, LOAD_STATE_TYPE: string) => TypeReducer;
|
|
@@ -80,7 +80,7 @@ function MergeStateFunction(oldState, newState) {
|
|
|
80
80
|
if (newState === '') {
|
|
81
81
|
newState = {};
|
|
82
82
|
}
|
|
83
|
-
// add source 'Config' only to
|
|
83
|
+
// add source 'Config' only to initial state objects
|
|
84
84
|
const config = AddStateSource(oldState, 'Config');
|
|
85
85
|
// source 'User' will be added to all other objects, after the merge (see bottom of this function)
|
|
86
86
|
let state = newState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
3
3
|
import { AdaptableState } from '../../AdaptableState/AdaptableState';
|
|
4
|
-
import {
|
|
4
|
+
import { BaseState } from '../../AdaptableState/BaseState';
|
|
5
5
|
import { IAdaptableStore, LoadStoreConfig } from './Interface/IAdaptableStore';
|
|
6
6
|
type EmitterCallback = (data?: any) => any;
|
|
7
7
|
type EmitterAnyCallback = (eventName: string, data?: any) => any;
|
|
@@ -13,12 +13,12 @@ export interface InitStateAction extends Redux.Action {
|
|
|
13
13
|
}
|
|
14
14
|
export interface LoadStateAction extends Redux.Action {
|
|
15
15
|
State: {
|
|
16
|
-
[s: string]:
|
|
16
|
+
[s: string]: BaseState;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export declare const InitState: () => ResetUserDataAction;
|
|
20
20
|
export declare const LoadState: (State: {
|
|
21
|
-
[s: string]:
|
|
21
|
+
[s: string]: BaseState;
|
|
22
22
|
}) => LoadStateAction;
|
|
23
23
|
export declare class AdaptableStore implements IAdaptableStore {
|
|
24
24
|
TheStore: Redux.Store<AdaptableState, Redux.Action>;
|
|
@@ -21,7 +21,7 @@ class AdaptableModuleBase {
|
|
|
21
21
|
this.api = api;
|
|
22
22
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
23
23
|
this.onAdaptableReady();
|
|
24
|
-
this.api.
|
|
24
|
+
this.api.stateApi.dispatchStateReadyAction(this.moduleInfo.ModuleName);
|
|
25
25
|
});
|
|
26
26
|
this.api.eventApi.on('AdaptableStateReloaded', (adaptableStateReloadedInfo) => {
|
|
27
27
|
this.onAdaptableStateReloaded(adaptableStateReloadedInfo);
|
|
@@ -71,8 +71,7 @@ class AdaptableModuleBase {
|
|
|
71
71
|
// override where necessary in base classes
|
|
72
72
|
}
|
|
73
73
|
setModuleEntitlement() {
|
|
74
|
-
this.AccessLevel = this.api.entitlementApi
|
|
75
|
-
.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
|
|
74
|
+
this.AccessLevel = this.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
|
|
76
75
|
}
|
|
77
76
|
createModuleMenuItem(source) {
|
|
78
77
|
if (this.isModuleAvailable() && this.moduleInfo.Popup) {
|
|
@@ -15,18 +15,18 @@ const StateManagementPopup = (props) => {
|
|
|
15
15
|
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "user-state", header: 'User State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginRight: 2, mb: 2 },
|
|
16
16
|
React.createElement(HelpBlock_1.default, { marginBottom: 2 }, 'Clear all current user state that has been persisted'),
|
|
17
17
|
React.createElement(HelpBlock_1.default, { style: { color: 'var(--ab-color-warn)' } }, 'This will cause this window to close and any State you have previously created will be lost, and the Initial Adaptable State will be reapplied'),
|
|
18
|
-
React.createElement(ClearButton_1.ClearButton, { "data-name": "clear-user-state-button", tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.
|
|
19
|
-
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "
|
|
18
|
+
React.createElement(ClearButton_1.ClearButton, { "data-name": "clear-user-state-button", tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.stateApi.reloadInitialState() }, "Clear User State")),
|
|
19
|
+
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "initial-state", header: 'Initial Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
|
|
20
20
|
React.createElement(HelpBlock_1.default, { marginTop: 2 }, 'Load Initial Adaptable State (from a .json file) - this will cause this window to close'),
|
|
21
21
|
' ',
|
|
22
|
-
React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.
|
|
22
|
+
React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.stateApi.reloadInitialState(json), "data-name": "load-initial-state-button" }, "Load Initial Adaptable State")),
|
|
23
23
|
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "adaptable-state", header: 'Export Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
|
|
24
24
|
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the currently persisted Adaptable State'),
|
|
25
25
|
' ',
|
|
26
26
|
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'], "data-name": "export-adaptable-state-dropdown" }, "Select Export Destination")),
|
|
27
|
-
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "initial-
|
|
27
|
+
React.createElement(Panel_1.default, { className: `${baseClassName}__panel`, "data-name": "initial-state", header: 'Export Initial Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2, mb: 2 },
|
|
28
28
|
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the Initial Adaptable State which was provided at design time'),
|
|
29
29
|
' ',
|
|
30
|
-
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "initialState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'], "data-name": "export-initial-
|
|
30
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "initialState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'], "data-name": "export-initial-state-dropdown" }, "Select Export Destination"))));
|
|
31
31
|
};
|
|
32
32
|
exports.StateManagementPopup = StateManagementPopup;
|
|
@@ -14,8 +14,8 @@ const StateManagementViewPanel = (props) => {
|
|
|
14
14
|
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
15
15
|
return (React.createElement(rebass_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap`) },
|
|
16
16
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
17
|
-
React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Initial Adaptable State", variant: "text", icon: "upload", onLoad: (json) => props.api.
|
|
18
|
-
React.createElement(ClearButton_1.ClearButton, { icon: "delete", tooltip: "Clear User State", variant: "text", onClick: () => props.api.
|
|
17
|
+
React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Initial Adaptable State", variant: "text", icon: "upload", onLoad: (json) => props.api.stateApi.reloadInitialState(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
|
|
18
|
+
React.createElement(ClearButton_1.ClearButton, { icon: "delete", tooltip: "Clear User State", variant: "text", onClick: () => props.api.stateApi.reloadInitialState(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
|
|
19
19
|
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState" }, "All State"),
|
|
20
20
|
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "initialState" }, "Initial Adaptable State")));
|
|
21
21
|
};
|
|
@@ -9,11 +9,11 @@ const ExportDropdown = (props) => {
|
|
|
9
9
|
const handleChange = (destination) => {
|
|
10
10
|
switch (props.type) {
|
|
11
11
|
case 'adaptableState':
|
|
12
|
-
const adaptableState = props.api.
|
|
12
|
+
const adaptableState = props.api.stateApi.getPersistedState();
|
|
13
13
|
(0, handleExportState_1.handleExportState)(destination, 'adaptableState', adaptableState);
|
|
14
14
|
break;
|
|
15
15
|
case 'initialState':
|
|
16
|
-
const initialState = props.api.
|
|
16
|
+
const initialState = props.api.stateApi.getInitialState();
|
|
17
17
|
(0, handleExportState_1.handleExportState)(destination, 'initialState', initialState);
|
|
18
18
|
break;
|
|
19
19
|
}
|
|
@@ -478,6 +478,10 @@ class AgGridExportAdapter {
|
|
|
478
478
|
const colDef = colDefs[columnIndex];
|
|
479
479
|
const columnId = column.getId();
|
|
480
480
|
const adaptableColumn = getAdaptableColumnWithColumnId(columnId);
|
|
481
|
+
if (!adaptableColumn) {
|
|
482
|
+
this.logger.warn(`Export Styling: Column with id ${columnId} not found in Adaptable`);
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
481
485
|
const isDateCellExportedAsFormattedValue = this.isDateCellExportedAsFormattedValue(adaptableColumn);
|
|
482
486
|
let cellClassParams;
|
|
483
487
|
const getLazyCellClassParams = () => {
|
|
@@ -155,7 +155,7 @@ const Select = function (props) {
|
|
|
155
155
|
});
|
|
156
156
|
const title = typeof customRenderValue === 'string' ? customRenderValue : '';
|
|
157
157
|
children = customRenderValue ? (React.createElement(rebass_1.Box, { display: 'flex', flexDirection: 'row', flex: 1, flexWrap: 'nowrap', alignItems: 'center', overflow: 'hidden' },
|
|
158
|
-
React.createElement("span", { title: title, style: {
|
|
158
|
+
React.createElement("span", { title: title, "data-name": "multi-value-text", style: {
|
|
159
159
|
flex: '0 1 auto',
|
|
160
160
|
appearance: 'none',
|
|
161
161
|
border: 'none',
|
|
@@ -352,7 +352,16 @@ const Select = function (props) {
|
|
|
352
352
|
focusedRef.current = false;
|
|
353
353
|
props.onBlur?.();
|
|
354
354
|
}, [props.onBlur]);
|
|
355
|
-
|
|
355
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
356
|
+
const onInputChange = React.useCallback((value, actionMeta) => {
|
|
357
|
+
if (isMulti && actionMeta.action === 'set-value') {
|
|
358
|
+
// when selecting an option, don't clear the input filter
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
setInputValue(value);
|
|
362
|
+
props.onInputChange?.(value);
|
|
363
|
+
}, [props.onInputChange, isMulti]);
|
|
364
|
+
return (React.createElement(SelectComponent, { ref: ref, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
356
365
|
// This needed so the menu is not clipped by overflow: hidden
|
|
357
366
|
menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
358
367
|
if (isMulti) {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1742730875874 || Date.now(),
|
|
6
|
+
VERSION: "20.0.0-canary.25" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -1525,6 +1525,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1525
1525
|
isOpt?: undefined;
|
|
1526
1526
|
})[];
|
|
1527
1527
|
};
|
|
1528
|
+
BaseState: {
|
|
1529
|
+
name: string;
|
|
1530
|
+
kind: string;
|
|
1531
|
+
desc: string;
|
|
1532
|
+
props: {
|
|
1533
|
+
name: string;
|
|
1534
|
+
kind: string;
|
|
1535
|
+
desc: string;
|
|
1536
|
+
isOpt: boolean;
|
|
1537
|
+
}[];
|
|
1538
|
+
};
|
|
1528
1539
|
BroadcastConfig: {
|
|
1529
1540
|
name: string;
|
|
1530
1541
|
kind: string;
|
|
@@ -2106,17 +2117,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2106
2117
|
ref: string;
|
|
2107
2118
|
})[];
|
|
2108
2119
|
};
|
|
2109
|
-
ConfigState: {
|
|
2110
|
-
name: string;
|
|
2111
|
-
kind: string;
|
|
2112
|
-
desc: string;
|
|
2113
|
-
props: {
|
|
2114
|
-
name: string;
|
|
2115
|
-
kind: string;
|
|
2116
|
-
desc: string;
|
|
2117
|
-
isOpt: boolean;
|
|
2118
|
-
}[];
|
|
2119
|
-
};
|
|
2120
2120
|
ContainerOptions: {
|
|
2121
2121
|
name: string;
|
|
2122
2122
|
kind: string;
|