@adaptabletools/adaptable 15.0.0-canary.1 → 15.0.0-canary.3
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/bundle.cjs.js +210 -210
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/ActionOptions.d.ts +30 -30
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -13
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +4 -4
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -14
- package/src/AdaptableOptions/ChartingOptions.d.ts +2 -3
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -6
- package/src/AdaptableOptions/EditOptions.d.ts +8 -8
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +9 -9
- package/src/AdaptableOptions/MenuOptions.d.ts +3 -3
- package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
- package/src/AdaptableOptions/SearchOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +23 -23
- package/src/Api/ChartingApi.d.ts +18 -19
- package/src/Api/EventApi.d.ts +13 -1
- package/src/Api/Events/ActionRowSubmitted.d.ts +7 -7
- package/src/Api/Events/AdaptableReady.d.ts +2 -2
- package/src/Api/Events/GridDataChanged.d.ts +3 -3
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/GridApi.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ThemeApiImpl.js +14 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +18 -0
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +4 -4
- package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +4 -4
- package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.d.ts +8 -8
- package/src/PredefinedConfig/Selection/GridCell.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridRow.d.ts +3 -3
- package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
- package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
- package/src/PredefinedConfig/StatusBarState.js +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +1 -2
- package/src/PredefinedConfig/ThemeState.d.ts +4 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
- package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ObjectFactory.d.ts +3 -1
- package/src/Utilities/ObjectFactory.js +10 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
- package/src/Utilities/Services/Interface/IThemeService.js +2 -0
- package/src/Utilities/Services/MetamodelService.d.ts +2 -0
- package/src/Utilities/Services/MetamodelService.js +26 -19
- package/src/Utilities/Services/ThemeService.d.ts +12 -0
- package/src/Utilities/Services/ThemeService.js +49 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
- package/src/View/Charting/ShowChartButton.js +2 -1
- package/src/View/Charting/useChartingElements.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/Theme/ThemeEditor.d.ts +7 -0
- package/src/View/Theme/ThemeEditor.js +186 -0
- package/src/View/Theme/ThemePopup.d.ts +3 -0
- package/src/View/Theme/ThemePopup.js +30 -6
- package/src/agGrid/Adaptable.d.ts +3 -2
- package/src/agGrid/Adaptable.js +8 -17
- package/src/agGrid/createAgStatusPanelComponent.js +1 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
- package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -2,7 +2,7 @@ import { InitialGroupOrderComparatorParams, IRowNode } from '@ag-grid-community/
|
|
|
2
2
|
/**
|
|
3
3
|
* Standard comparer function used to evaluate custom sorts, returns -1, 0, 1 as required
|
|
4
4
|
*/
|
|
5
|
-
export declare type AdaptableComparerFunction = (
|
|
5
|
+
export declare type AdaptableComparerFunction<TData = any> = (
|
|
6
6
|
/**
|
|
7
7
|
* First Cell to compare
|
|
8
8
|
*/
|
|
@@ -14,9 +14,9 @@ valueB: any,
|
|
|
14
14
|
/**
|
|
15
15
|
* First Row Node to compare
|
|
16
16
|
*/
|
|
17
|
-
nodeA?: IRowNode
|
|
17
|
+
nodeA?: IRowNode<TData>,
|
|
18
18
|
/**
|
|
19
19
|
* Second Row Node to compare
|
|
20
20
|
*/
|
|
21
|
-
nodeB?: IRowNode) => number;
|
|
22
|
-
export declare type AdaptableNodeComparerFunction = (params: InitialGroupOrderComparatorParams) => number;
|
|
21
|
+
nodeB?: IRowNode<TData>) => number;
|
|
22
|
+
export declare type AdaptableNodeComparerFunction<TData = any> = (params: InitialGroupOrderComparatorParams<TData>) => number;
|
|
@@ -3,7 +3,7 @@ import { AdaptableColumn } from './AdaptableColumn';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
|
|
5
5
|
*/
|
|
6
|
-
export interface CellDataChangedInfo {
|
|
6
|
+
export interface CellDataChangedInfo<TData = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Timestamp of change occurrence (in milliseconds)
|
|
9
9
|
*/
|
|
@@ -19,7 +19,7 @@ export interface CellDataChangedInfo {
|
|
|
19
19
|
/**
|
|
20
20
|
* Column in which cell is situated
|
|
21
21
|
*/
|
|
22
|
-
column: AdaptableColumn
|
|
22
|
+
column: AdaptableColumn<TData>;
|
|
23
23
|
/**
|
|
24
24
|
* Primary Key Column's value for the row where edited cell is situated
|
|
25
25
|
*/
|
|
@@ -27,11 +27,11 @@ export interface CellDataChangedInfo {
|
|
|
27
27
|
/**
|
|
28
28
|
* AG Grid RowNode that contains the cell
|
|
29
29
|
*/
|
|
30
|
-
rowNode?: IRowNode
|
|
30
|
+
rowNode?: IRowNode<TData>;
|
|
31
31
|
/**
|
|
32
32
|
* Data in the Row
|
|
33
33
|
*/
|
|
34
|
-
rowData?:
|
|
34
|
+
rowData?: TData;
|
|
35
35
|
/**
|
|
36
36
|
* What triggered the change - user, background change or a reverted change?
|
|
37
37
|
*/
|
|
@@ -17,7 +17,7 @@ export interface CellSummmary {
|
|
|
17
17
|
/**
|
|
18
18
|
* Defines a Custom Cell Summary operation provided by a user
|
|
19
19
|
*/
|
|
20
|
-
export interface CellSummaryOperation {
|
|
20
|
+
export interface CellSummaryOperation<TData = any> {
|
|
21
21
|
/**
|
|
22
22
|
* Name of the Operation - will be displayed in the Cell Summary components
|
|
23
23
|
*/
|
|
@@ -25,16 +25,16 @@ export interface CellSummaryOperation {
|
|
|
25
25
|
/**
|
|
26
26
|
* Function to run when a summary result is required
|
|
27
27
|
*/
|
|
28
|
-
operationFunction: (operationContext: CellSummaryOperationContext) => any;
|
|
28
|
+
operationFunction: (operationContext: CellSummaryOperationContext<TData>) => any;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Context provided to a custom Cell Summary Operation function
|
|
32
32
|
*/
|
|
33
|
-
export interface CellSummaryOperationContext extends BaseContext {
|
|
33
|
+
export interface CellSummaryOperationContext<TData = any> extends BaseContext {
|
|
34
34
|
/**
|
|
35
35
|
* Currently selected cells
|
|
36
36
|
*/
|
|
37
|
-
selectedCellInfo: SelectedCellInfo
|
|
37
|
+
selectedCellInfo: SelectedCellInfo<TData>;
|
|
38
38
|
/**
|
|
39
39
|
* All values of selected cells
|
|
40
40
|
*/
|
|
@@ -71,11 +71,11 @@ export interface UserMenuItem<CONTEXT_TYPE extends BaseContext> {
|
|
|
71
71
|
/**
|
|
72
72
|
* Provides full details about the Column in which the Column Menu will appear
|
|
73
73
|
*/
|
|
74
|
-
export interface ColumnMenuContext extends BaseContext {
|
|
74
|
+
export interface ColumnMenuContext<TData = any> extends BaseContext {
|
|
75
75
|
/**
|
|
76
76
|
* Current Adaptable Column
|
|
77
77
|
*/
|
|
78
|
-
adaptableColumn: AdaptableColumn
|
|
78
|
+
adaptableColumn: AdaptableColumn<TData>;
|
|
79
79
|
/**
|
|
80
80
|
* Current AG Grid Column
|
|
81
81
|
*/
|
|
@@ -88,15 +88,15 @@ export interface ColumnMenuContext extends BaseContext {
|
|
|
88
88
|
/**
|
|
89
89
|
* Provides full details about current cell (and selected cells) where the Context Menu will appear
|
|
90
90
|
*/
|
|
91
|
-
export interface ContextMenuContext extends BaseContext {
|
|
91
|
+
export interface ContextMenuContext<TData = any> extends BaseContext {
|
|
92
92
|
/**
|
|
93
93
|
* Cell that has been clicked; contains cell value
|
|
94
94
|
*/
|
|
95
|
-
gridCell: GridCell
|
|
95
|
+
gridCell: GridCell<TData>;
|
|
96
96
|
/**
|
|
97
97
|
* Current Adaptable Column
|
|
98
98
|
*/
|
|
99
|
-
adaptableColumn: AdaptableColumn
|
|
99
|
+
adaptableColumn: AdaptableColumn<TData>;
|
|
100
100
|
/**
|
|
101
101
|
* Current AG Grid Column
|
|
102
102
|
*/
|
|
@@ -116,7 +116,7 @@ export interface ContextMenuContext extends BaseContext {
|
|
|
116
116
|
/**
|
|
117
117
|
* Current AG Grid row node
|
|
118
118
|
*/
|
|
119
|
-
rowNode: IRowNode
|
|
119
|
+
rowNode: IRowNode<TData>;
|
|
120
120
|
/**
|
|
121
121
|
* Whether current AG Grid row node is grouped
|
|
122
122
|
*/
|
|
@@ -132,9 +132,9 @@ export interface ContextMenuContext extends BaseContext {
|
|
|
132
132
|
/**
|
|
133
133
|
* Currently selected cells in the grid
|
|
134
134
|
*/
|
|
135
|
-
selectedCellInfo: SelectedCellInfo
|
|
135
|
+
selectedCellInfo: SelectedCellInfo<TData>;
|
|
136
136
|
/**
|
|
137
137
|
* Currently selected rows in the grid
|
|
138
138
|
*/
|
|
139
|
-
selectedRowInfo: SelectedRowInfo
|
|
139
|
+
selectedRowInfo: SelectedRowInfo<TData>;
|
|
140
140
|
}
|
|
@@ -3,11 +3,11 @@ import { AdaptableColumn } from '../Common/AdaptableColumn';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines a Cell in Adaptable - every cell is an intersection of a Column Id and a Primary Key Value
|
|
5
5
|
*/
|
|
6
|
-
export interface GridCell {
|
|
6
|
+
export interface GridCell<TData = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Column in which cell is situated
|
|
9
9
|
*/
|
|
10
|
-
column: AdaptableColumn
|
|
10
|
+
column: AdaptableColumn<TData>;
|
|
11
11
|
/**
|
|
12
12
|
* Actual raw value of cell
|
|
13
13
|
*/
|
|
@@ -27,5 +27,5 @@ export interface GridCell {
|
|
|
27
27
|
/**
|
|
28
28
|
* AG Grid Row Node that holds the cell
|
|
29
29
|
*/
|
|
30
|
-
rowNode: IRowNode
|
|
30
|
+
rowNode: IRowNode<TData>;
|
|
31
31
|
}
|
|
@@ -2,7 +2,7 @@ import { IRowNode } from '@ag-grid-community/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Detailed information about a Row in AdapTable
|
|
4
4
|
*/
|
|
5
|
-
export interface GridRow {
|
|
5
|
+
export interface GridRow<TData = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Primary Key column's value for Row - how Adaptable locates a cell
|
|
8
8
|
*/
|
|
@@ -10,7 +10,7 @@ export interface GridRow {
|
|
|
10
10
|
/**
|
|
11
11
|
* Actual data in the Row
|
|
12
12
|
*/
|
|
13
|
-
rowData?:
|
|
13
|
+
rowData?: TData;
|
|
14
14
|
/**
|
|
15
15
|
* Object which provides 'meta data' about the Row
|
|
16
16
|
*/
|
|
@@ -18,7 +18,7 @@ export interface GridRow {
|
|
|
18
18
|
/**
|
|
19
19
|
* AG Grid Row Node object for the Row
|
|
20
20
|
*/
|
|
21
|
-
rowNode?: IRowNode
|
|
21
|
+
rowNode?: IRowNode<TData>;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Provides meta data about a Row in Adaptable
|
|
@@ -3,13 +3,13 @@ import { GridCell } from './GridCell';
|
|
|
3
3
|
/**
|
|
4
4
|
* Describes which Cells are currently selected in AdapTable
|
|
5
5
|
*/
|
|
6
|
-
export interface SelectedCellInfo {
|
|
6
|
+
export interface SelectedCellInfo<TData = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Array of Columns which have selected cells
|
|
9
9
|
*/
|
|
10
|
-
columns: AdaptableColumn[];
|
|
10
|
+
columns: AdaptableColumn<TData>[];
|
|
11
11
|
/**
|
|
12
12
|
* Array of GridCells (which provide cell value, primary kev value and other info)
|
|
13
13
|
*/
|
|
14
|
-
gridCells: GridCell[];
|
|
14
|
+
gridCells: GridCell<TData>[];
|
|
15
15
|
}
|
|
@@ -2,9 +2,9 @@ import { GridRow } from './GridRow';
|
|
|
2
2
|
/**
|
|
3
3
|
* Describes which Rows are currently selected in AdapTable
|
|
4
4
|
*/
|
|
5
|
-
export interface SelectedRowInfo {
|
|
5
|
+
export interface SelectedRowInfo<TData = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Array of Grid Rows containing full information about a row in AdapTable
|
|
8
8
|
*/
|
|
9
|
-
gridRows: GridRow[];
|
|
9
|
+
gridRows: GridRow<TData>[];
|
|
10
10
|
}
|
|
@@ -11,7 +11,7 @@ export interface StatusBarState extends ConfigState {
|
|
|
11
11
|
StatusBars?: AdaptableStatusBar[];
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Name of the component specified in
|
|
14
|
+
* Name of the component specified in AG Grid gridOptions.statusBar.statusPanels
|
|
15
15
|
*/
|
|
16
16
|
export declare const ADAPTABLE_STATUS_PANEL = "AdaptableStatusPanel";
|
|
17
17
|
/**
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ADAPTABLE_STATUS_PANEL = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Name of the component specified in
|
|
5
|
+
* Name of the component specified in AG Grid gridOptions.statusBar.statusPanels
|
|
6
6
|
*/
|
|
7
7
|
exports.ADAPTABLE_STATUS_PANEL = 'AdaptableStatusPanel';
|
|
@@ -74,8 +74,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
74
74
|
CurrentDataSet: string;
|
|
75
75
|
/**
|
|
76
76
|
* Chart modes are saved here for every chart event.
|
|
77
|
-
* This way any part of the application can listen to chart-model changes without
|
|
78
|
-
* directly listening to ag-grid events.
|
|
77
|
+
* This way any part of the application can listen to chart-model changes without directly listening to AG Grid events
|
|
79
78
|
*/
|
|
80
79
|
Charting: {
|
|
81
80
|
currentChartModels: ChartModel[];
|
|
@@ -195,8 +195,8 @@ export declare const GridRemoveColumn: (Column: AdaptableColumn) => GridRemoveCo
|
|
|
195
195
|
export declare const GridEditColumn: (Column: AdaptableColumn) => GridEditColumnAction;
|
|
196
196
|
export declare const GridSetSort: (ColumnSorts: ColumnSort[]) => GridSetSortAction;
|
|
197
197
|
export declare const GridClearSort: () => GridClearSortAction;
|
|
198
|
-
export declare const GridSetSelectedCells: (SelectedCellInfo: SelectedCellInfo) => GridSetSelectedCellsAction;
|
|
199
|
-
export declare const GridSetSelectedRows: (SelectedRowInfo: SelectedRowInfo) => GridSetSelectedRowsAction;
|
|
198
|
+
export declare const GridSetSelectedCells: (SelectedCellInfo: SelectedCellInfo<any>) => GridSetSelectedCellsAction;
|
|
199
|
+
export declare const GridSetSelectedRows: (SelectedRowInfo: SelectedRowInfo<any>) => GridSetSelectedRowsAction;
|
|
200
200
|
export declare const GridCreateCellSummary: () => GridCreateCellSummaryAction;
|
|
201
201
|
export declare const GridSetCellSummary: (CellSummary: CellSummmary) => GridSetCellSummaryAction;
|
|
202
202
|
export declare const GridRefreshCells: (rowNodes: IRowNode[], columnIds: string[]) => GridRefreshCellsAction;
|
|
@@ -16,6 +16,18 @@ export declare const THEME_SELECT = "THEME_SELECT";
|
|
|
16
16
|
* @ReduxAction Theme Module is ready
|
|
17
17
|
*/
|
|
18
18
|
export declare const THEME_READY = "THEME_READY";
|
|
19
|
+
/**
|
|
20
|
+
* @ReduxAction Theme Module is edited
|
|
21
|
+
*/
|
|
22
|
+
export declare const THEME_EDIT = "THEME_EDIT";
|
|
23
|
+
/**
|
|
24
|
+
* @ReduxAction A new theme is added
|
|
25
|
+
*/
|
|
26
|
+
export declare const THEME_ADD = "THEME_ADD";
|
|
27
|
+
/**
|
|
28
|
+
* @ReduxAction A theme is deleted
|
|
29
|
+
*/
|
|
30
|
+
export declare const THEME_DELETE = "THEME_DELETE";
|
|
19
31
|
export interface ThemeSetSystemThemesAction extends Redux.Action {
|
|
20
32
|
SystemThemes: AdaptableTheme[];
|
|
21
33
|
}
|
|
@@ -28,8 +40,23 @@ export interface ThemeSelectAction extends Redux.Action {
|
|
|
28
40
|
export interface ThemeReadyAction extends Redux.Action {
|
|
29
41
|
themeState: ThemeState;
|
|
30
42
|
}
|
|
43
|
+
export interface ThemeReadyAction extends Redux.Action {
|
|
44
|
+
themeState: ThemeState;
|
|
45
|
+
}
|
|
46
|
+
export interface ThemeEditAction extends Redux.Action {
|
|
47
|
+
theme: AdaptableTheme;
|
|
48
|
+
}
|
|
49
|
+
export interface ThemeAddUserThemeAction extends Redux.Action {
|
|
50
|
+
theme: AdaptableTheme;
|
|
51
|
+
}
|
|
52
|
+
export interface ThemeDeleteUserThemeAction extends Redux.Action {
|
|
53
|
+
theme: AdaptableTheme;
|
|
54
|
+
}
|
|
31
55
|
export declare const ThemeSetSystemThemes: (SystemThemes: AdaptableTheme[]) => ThemeSetSystemThemesAction;
|
|
32
56
|
export declare const ThemeSetUserThemes: (UserThemes: AdaptableTheme[]) => ThemeSetUserThemesAction;
|
|
33
57
|
export declare const ThemeSelect: (Theme: string) => ThemeSelectAction;
|
|
34
58
|
export declare const ThemeReady: (themeState: ThemeState) => ThemeReadyAction;
|
|
59
|
+
export declare const ThemeEdit: (theme: AdaptableTheme) => ThemeEditAction;
|
|
60
|
+
export declare const ThemeAdd: (theme: AdaptableTheme) => ThemeAddUserThemeAction;
|
|
61
|
+
export declare const ThemeDelete: (theme: AdaptableTheme) => ThemeDeleteUserThemeAction;
|
|
35
62
|
export declare const ThemeReducer: Redux.Reducer<ThemeState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThemeReducer = exports.ThemeReady = exports.ThemeSelect = exports.ThemeSetUserThemes = exports.ThemeSetSystemThemes = exports.THEME_READY = exports.THEME_SELECT = exports.THEME_SET_USER_THEMES = exports.THEME_SET_SYSTEM_THEMES = void 0;
|
|
3
|
+
exports.ThemeReducer = exports.ThemeDelete = exports.ThemeAdd = exports.ThemeEdit = exports.ThemeReady = exports.ThemeSelect = exports.ThemeSetUserThemes = exports.ThemeSetSystemThemes = exports.THEME_DELETE = exports.THEME_ADD = exports.THEME_EDIT = exports.THEME_READY = exports.THEME_SELECT = exports.THEME_SET_USER_THEMES = exports.THEME_SET_SYSTEM_THEMES = void 0;
|
|
4
4
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
5
5
|
/**
|
|
6
6
|
* @ReduxAction System Themes have been set
|
|
@@ -18,6 +18,18 @@ exports.THEME_SELECT = 'THEME_SELECT';
|
|
|
18
18
|
* @ReduxAction Theme Module is ready
|
|
19
19
|
*/
|
|
20
20
|
exports.THEME_READY = 'THEME_READY';
|
|
21
|
+
/**
|
|
22
|
+
* @ReduxAction Theme Module is edited
|
|
23
|
+
*/
|
|
24
|
+
exports.THEME_EDIT = 'THEME_EDIT';
|
|
25
|
+
/**
|
|
26
|
+
* @ReduxAction A new theme is added
|
|
27
|
+
*/
|
|
28
|
+
exports.THEME_ADD = 'THEME_ADD';
|
|
29
|
+
/**
|
|
30
|
+
* @ReduxAction A theme is deleted
|
|
31
|
+
*/
|
|
32
|
+
exports.THEME_DELETE = 'THEME_DELETE';
|
|
21
33
|
const ThemeSetSystemThemes = (SystemThemes) => ({
|
|
22
34
|
type: exports.THEME_SET_SYSTEM_THEMES,
|
|
23
35
|
SystemThemes,
|
|
@@ -38,6 +50,21 @@ const ThemeReady = (themeState) => ({
|
|
|
38
50
|
themeState,
|
|
39
51
|
});
|
|
40
52
|
exports.ThemeReady = ThemeReady;
|
|
53
|
+
const ThemeEdit = (theme) => ({
|
|
54
|
+
type: exports.THEME_EDIT,
|
|
55
|
+
theme,
|
|
56
|
+
});
|
|
57
|
+
exports.ThemeEdit = ThemeEdit;
|
|
58
|
+
const ThemeAdd = (theme) => ({
|
|
59
|
+
type: exports.THEME_ADD,
|
|
60
|
+
theme,
|
|
61
|
+
});
|
|
62
|
+
exports.ThemeAdd = ThemeAdd;
|
|
63
|
+
const ThemeDelete = (theme) => ({
|
|
64
|
+
type: exports.THEME_DELETE,
|
|
65
|
+
theme,
|
|
66
|
+
});
|
|
67
|
+
exports.ThemeDelete = ThemeDelete;
|
|
41
68
|
const initialState = {
|
|
42
69
|
CurrentTheme: GeneralConstants_1.THEME_DEFAULT_CURRENT_THEME,
|
|
43
70
|
SystemThemes: GeneralConstants_1.SYSTEM_THEMES,
|
|
@@ -57,6 +84,41 @@ const ThemeReducer = (state = initialState, action) => {
|
|
|
57
84
|
return Object.assign({}, state, {
|
|
58
85
|
CurrentTheme: action.Theme,
|
|
59
86
|
});
|
|
87
|
+
case exports.THEME_EDIT:
|
|
88
|
+
let newThemes = null;
|
|
89
|
+
// find by UUID, or by name
|
|
90
|
+
const themeToBeReplaced = action.theme;
|
|
91
|
+
let replaceIndex = state.UserThemes.findIndex((theme) => themeToBeReplaced.Uuid === theme.Uuid);
|
|
92
|
+
// try by name
|
|
93
|
+
if (replaceIndex === -1) {
|
|
94
|
+
replaceIndex = state.UserThemes.findIndex((theme) => themeToBeReplaced.Name === theme.Name);
|
|
95
|
+
}
|
|
96
|
+
// fond one, either by name or by uuid
|
|
97
|
+
if (replaceIndex !== -1) {
|
|
98
|
+
newThemes = [...state.UserThemes];
|
|
99
|
+
newThemes[replaceIndex] = themeToBeReplaced;
|
|
100
|
+
}
|
|
101
|
+
if (newThemes === null) {
|
|
102
|
+
return state;
|
|
103
|
+
}
|
|
104
|
+
// if name changed, need to update the current name
|
|
105
|
+
let currentTheme = state.CurrentTheme;
|
|
106
|
+
if (currentTheme !== themeToBeReplaced.Name) {
|
|
107
|
+
// need to update the current theme if it name has changed
|
|
108
|
+
currentTheme = themeToBeReplaced.Name;
|
|
109
|
+
}
|
|
110
|
+
return Object.assign({}, state, {
|
|
111
|
+
CurrentTheme: currentTheme,
|
|
112
|
+
UserThemes: newThemes,
|
|
113
|
+
});
|
|
114
|
+
case exports.THEME_ADD:
|
|
115
|
+
return Object.assign({}, state, {
|
|
116
|
+
UserThemes: [...state.UserThemes, action.theme],
|
|
117
|
+
});
|
|
118
|
+
case exports.THEME_DELETE:
|
|
119
|
+
return Object.assign({}, state, {
|
|
120
|
+
UserThemes: state.UserThemes.filter((theme) => theme.Uuid !== action.theme.Uuid),
|
|
121
|
+
});
|
|
60
122
|
default:
|
|
61
123
|
return state;
|
|
62
124
|
}
|
|
@@ -110,7 +110,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
110
110
|
switch (exportDestination) {
|
|
111
111
|
case Enums_1.ExportDestination.Excel:
|
|
112
112
|
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
113
|
-
// WYSIWYG is fully delegated to the
|
|
113
|
+
// WYSIWYG is fully delegated to the AG Grid excel export
|
|
114
114
|
this.api.exportApi.exportVisualDataToExcel();
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
@@ -26,6 +26,7 @@ export declare const AB_SPECIAL_COLUMN: AdaptableColumnType;
|
|
|
26
26
|
export declare const HALF_SECOND: number;
|
|
27
27
|
export declare const AG_GRID_GROUPED_COLUMN: string;
|
|
28
28
|
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
29
|
+
export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
|
|
29
30
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS = "adaptableRowActionButtons";
|
|
30
31
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = "(ActionRowButtons)";
|
|
31
32
|
export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = void 0;
|
|
3
|
+
exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
|
+
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = void 0;
|
|
5
5
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
7
7
|
exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
|
|
@@ -29,6 +29,7 @@ exports.AB_SPECIAL_COLUMN = 'abSpecialColumn';
|
|
|
29
29
|
exports.HALF_SECOND = 500;
|
|
30
30
|
exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
|
|
31
31
|
exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
32
|
+
exports.AG_GRID_CHART_WINDOW = 'AG Grid Window';
|
|
32
33
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS = 'adaptableRowActionButtons';
|
|
33
34
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = '(ActionRowButtons)';
|
|
34
35
|
exports.DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
|
|
@@ -24,9 +24,9 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
|
|
|
24
24
|
'SystemStatus',
|
|
25
25
|
'-',
|
|
26
26
|
'FormatColumn',
|
|
27
|
+
'StyledColumn',
|
|
27
28
|
'FlashingCell',
|
|
28
29
|
'Theme',
|
|
29
|
-
'StyledColumn',
|
|
30
30
|
'-',
|
|
31
31
|
'QuickSearch',
|
|
32
32
|
'Query',
|
|
@@ -37,8 +37,8 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
|
|
|
37
37
|
'Shortcut',
|
|
38
38
|
'DataChangeHistory',
|
|
39
39
|
'-',
|
|
40
|
+
'Charting',
|
|
40
41
|
'Schedule',
|
|
41
42
|
'StateManagement',
|
|
42
43
|
'TeamSharing',
|
|
43
|
-
'Charting',
|
|
44
44
|
];
|
|
@@ -23,7 +23,7 @@ import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessag
|
|
|
23
23
|
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
24
24
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
25
25
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
26
|
-
import { ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
26
|
+
import { AdaptableTheme, ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
27
27
|
import { IRowNode } from '@ag-grid-community/core';
|
|
28
28
|
import { AdaptableApi } from '../../types';
|
|
29
29
|
import { ToastOptions } from '../components/Toastify';
|
|
@@ -66,6 +66,7 @@ export declare function CreateColumnFilter(ColumnId: string, PredicateId: System
|
|
|
66
66
|
export declare function CreateEmptyStyledColumn(): StyledColumn;
|
|
67
67
|
export declare function CreateEmptyChartDefinition(chartDefinition?: ChartDefinition): ChartDefinition;
|
|
68
68
|
export declare function CreateCustomDisplayFormatterContext(value: any, node: IRowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
69
|
+
export declare function CreateEmptyTheme(name?: string): AdaptableTheme;
|
|
69
70
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
70
71
|
onClose?: VoidFunction;
|
|
71
72
|
containerId: string;
|
|
@@ -110,5 +111,6 @@ export declare const ObjectFactory: {
|
|
|
110
111
|
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
111
112
|
CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
|
|
112
113
|
CreateEmptyChartDefinition: typeof CreateEmptyChartDefinition;
|
|
114
|
+
CreateEmptyTheme: typeof CreateEmptyTheme;
|
|
113
115
|
};
|
|
114
116
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyTheme = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -379,6 +379,14 @@ function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
|
|
382
|
+
function CreateEmptyTheme(name) {
|
|
383
|
+
return {
|
|
384
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
385
|
+
Name: name || 'Custom Theme',
|
|
386
|
+
Description: name || 'Custom Theme',
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
exports.CreateEmptyTheme = CreateEmptyTheme;
|
|
382
390
|
function CreateToastOptions(notificationsOptions, { onClose, containerId }, overides) {
|
|
383
391
|
var _a;
|
|
384
392
|
const adaptableToastPosition = notificationsOptions.position;
|
|
@@ -471,5 +479,6 @@ exports.ObjectFactory = {
|
|
|
471
479
|
CreateCustomDisplayFormatterContext,
|
|
472
480
|
CreateEmptyStyledColumn,
|
|
473
481
|
CreateEmptyChartDefinition,
|
|
482
|
+
CreateEmptyTheme,
|
|
474
483
|
};
|
|
475
484
|
exports.default = exports.ObjectFactory;
|