@adaptabletools/adaptable 18.0.0-canary.7 → 18.0.0-canary.9
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 +7 -2
- package/base.css.map +1 -1
- package/index.css +9 -2
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.js +5 -0
- package/src/Api/Implementation/ConfigApiImpl.js +6 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +13 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -4
- package/src/Api/Implementation/LayoutApiImpl.js +15 -14
- package/src/Api/Implementation/NotesApiImpl.d.ts +4 -0
- package/src/Api/Implementation/NotesApiImpl.js +5 -0
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +13 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
- package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
- package/src/Api/Internal/NotesInternalApi.js +13 -0
- package/src/Api/LayoutApi.d.ts +11 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +1 -0
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
- package/src/Redux/Store/AdaptableStore.js +11 -0
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +50 -21
- package/src/Strategy/CommentsModule.js +3 -0
- package/src/Strategy/LayoutModule.d.ts +7 -0
- package/src/Strategy/LayoutModule.js +102 -3
- package/src/Strategy/NotesModule.js +3 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/ObjectFactory.js +6 -6
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +11 -8
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.js +10 -5
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -1
- package/src/Utilities/Services/SummaryService.d.ts +19 -0
- package/src/Utilities/Services/SummaryService.js +29 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/NewScopeComponent.js +32 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +7 -7
- package/src/View/Layout/TransposedPopup.js +7 -6
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +16 -2
- package/src/agGrid/AdaptableAgGrid.js +201 -91
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +8 -0
- package/src/agGrid/AgGridColumnAdapter.js +14 -3
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +8 -0
- package/src/metamodel/adaptable.metamodel.js +18 -0
- package/src/parser/src/types.d.ts +5 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.9",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"tinycolor2": "^1.4.2",
|
|
61
61
|
"tslib": "^2.3.0",
|
|
62
62
|
"uuid": "^3.3.2",
|
|
63
|
-
"react-toastify": "
|
|
63
|
+
"react-toastify": "9.1.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@ag-grid-community/core": ">=31.1.0"
|
|
@@ -27,6 +27,7 @@ import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelSer
|
|
|
27
27
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
28
28
|
import { AdaptableLogger } from '../agGrid/AdaptableLogger';
|
|
29
29
|
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
30
|
+
import { SummaryService } from '../Utilities/Services/SummaryService';
|
|
30
31
|
import { AgGridAdapter } from '../agGrid/AgGridAdapter';
|
|
31
32
|
import { AgGridColumnAdapter } from '../agGrid/AgGridColumnAdapter';
|
|
32
33
|
import { AgGridMenuAdapter } from '../agGrid/AgGridMenuAdapter';
|
|
@@ -90,6 +91,7 @@ export interface IAdaptable {
|
|
|
90
91
|
RowEditService: RowEditService;
|
|
91
92
|
Fdc3Service: Fdc3Service;
|
|
92
93
|
CellPopupService: CellPopupService;
|
|
94
|
+
SummaryService: SummaryService;
|
|
93
95
|
/**
|
|
94
96
|
* INTERNAL ADAPTABLE EVENTS
|
|
95
97
|
* These are not called externally - for that we use eventapi
|
|
@@ -102,6 +104,7 @@ export interface IAdaptable {
|
|
|
102
104
|
_on(eventName: 'ScrollChanged', callback: () => void): () => void;
|
|
103
105
|
_on(eventName: 'MouseEnter', callback: (event: MouseEvent) => void): () => void;
|
|
104
106
|
_on(eventName: 'MouseLeave', callback: (event: MouseEvent) => void): () => void;
|
|
107
|
+
_on(eventname: 'FirstDataRendered', callback: () => void): () => void;
|
|
105
108
|
_on(eventName: 'CellEditorKeyDown', callback: (param: {
|
|
106
109
|
keyDownEvent: KeyboardEvent;
|
|
107
110
|
cellValue: any;
|
|
@@ -221,6 +224,7 @@ export interface IAdaptable {
|
|
|
221
224
|
clearColumnFilteringForColumns(columnIds: string[]): void;
|
|
222
225
|
applyColumnFiltering(): void;
|
|
223
226
|
applyGridFiltering(): void;
|
|
227
|
+
refreshQuickFilter(): void;
|
|
224
228
|
showQuickFilter(): void;
|
|
225
229
|
hideQuickFilter(): void;
|
|
226
230
|
isQuickFilterAvailable(): boolean;
|
|
@@ -249,10 +253,13 @@ export interface IAdaptable {
|
|
|
249
253
|
getExpandRowGroupsKeys(): any[];
|
|
250
254
|
getAdaptableContainerElement(): HTMLElement | null;
|
|
251
255
|
getAgGridContainerElement(): HTMLElement | null;
|
|
252
|
-
updateColumnModelAndRefreshGrid(
|
|
256
|
+
updateColumnModelAndRefreshGrid(config?: {
|
|
257
|
+
skipColDefsRefresh?: boolean;
|
|
258
|
+
}): void;
|
|
253
259
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
254
260
|
getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number | undefined;
|
|
255
261
|
getAgGridRegisteredModules(): Module[];
|
|
262
|
+
setupRowSummaries: () => void;
|
|
256
263
|
destroy(config?: {
|
|
257
264
|
unmount: boolean;
|
|
258
265
|
destroyApi?: boolean;
|
package/src/Api/ConfigApi.d.ts
CHANGED
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -516,4 +516,8 @@ export interface GridApi {
|
|
|
516
516
|
* @deprecated use `getRowCount()` instead
|
|
517
517
|
*/
|
|
518
518
|
getVisibleRowCount(): number;
|
|
519
|
+
/**
|
|
520
|
+
* Opens a window with a transposed view of Grid
|
|
521
|
+
*/
|
|
522
|
+
showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
|
|
519
523
|
}
|
|
@@ -2,7 +2,11 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
3
3
|
import { CommentThread, AdaptableComment } from '../../types';
|
|
4
4
|
import { CommentApi } from '../CommentApi';
|
|
5
|
+
import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
|
|
6
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
5
7
|
export declare class CommentsApiImpl extends ApiBase implements CommentApi {
|
|
8
|
+
internalApi: CommentsInternalApi;
|
|
9
|
+
constructor(adaptable: IAdaptable);
|
|
6
10
|
getComments(address: CellAddress): AdaptableComment[];
|
|
7
11
|
getCommentThread(address: CellAddress): CommentThread | undefined;
|
|
8
12
|
getCommentThreads(): CommentThread[];
|
|
@@ -2,7 +2,12 @@ import * as CommentRedux from '../../Redux/ActionsReducers/CommentsRedux';
|
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
3
|
import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
4
4
|
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
5
|
+
import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
|
|
5
6
|
export class CommentsApiImpl extends ApiBase {
|
|
7
|
+
constructor(adaptable) {
|
|
8
|
+
super(adaptable);
|
|
9
|
+
this.internalApi = new CommentsInternalApi(adaptable);
|
|
10
|
+
}
|
|
6
11
|
getComments(address) {
|
|
7
12
|
return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
|
|
8
13
|
}
|
|
@@ -136,16 +136,19 @@ export class ConfigApiImpl extends ApiBase {
|
|
|
136
136
|
});
|
|
137
137
|
promise
|
|
138
138
|
.then(() => {
|
|
139
|
-
this.adaptable.updateColumnModelAndRefreshGrid();
|
|
139
|
+
this.adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
140
140
|
this.adaptable.setLayout();
|
|
141
141
|
this.adaptable.api.userInterfaceApi.hideLoadingScreen();
|
|
142
142
|
})
|
|
143
143
|
.then(() => {
|
|
144
144
|
// resolve main(result) promise
|
|
145
145
|
resolve();
|
|
146
|
-
}, () => {
|
|
146
|
+
}, (error) => {
|
|
147
147
|
// reject main(result) promise
|
|
148
|
-
reject();
|
|
148
|
+
reject(error);
|
|
149
|
+
})
|
|
150
|
+
.catch((e) => {
|
|
151
|
+
this.logError('Error setting Adaptable State Key', e);
|
|
149
152
|
});
|
|
150
153
|
});
|
|
151
154
|
});
|
|
@@ -130,4 +130,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
130
130
|
openGridInfoSettingsPanel(): void;
|
|
131
131
|
getAgGridRowModelType(): RowModelType;
|
|
132
132
|
getVisibleRowCount(): number;
|
|
133
|
+
showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
|
|
133
134
|
}
|
|
@@ -5,6 +5,7 @@ import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
|
5
5
|
import { GridInternalApi } from '../Internal/GridInternalApi';
|
|
6
6
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
7
7
|
import { logDeprecation } from '../../Utilities/logDeprecation';
|
|
8
|
+
import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
|
|
8
9
|
export class GridApiImpl extends ApiBase {
|
|
9
10
|
constructor(adaptable) {
|
|
10
11
|
super(adaptable);
|
|
@@ -515,4 +516,16 @@ export class GridApiImpl extends ApiBase {
|
|
|
515
516
|
logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
516
517
|
return this.getRowCount();
|
|
517
518
|
}
|
|
519
|
+
showTransposedView(transposedColumnId, hideTransposedColumn) {
|
|
520
|
+
this.adaptable.api.internalApi.showPopupWindow({
|
|
521
|
+
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
522
|
+
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
523
|
+
title: 'Transposed View',
|
|
524
|
+
icon: 'grid',
|
|
525
|
+
popupProps: {
|
|
526
|
+
transposedColumnId,
|
|
527
|
+
hideTransposedColumn,
|
|
528
|
+
},
|
|
529
|
+
});
|
|
530
|
+
}
|
|
518
531
|
}
|
|
@@ -41,6 +41,8 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
41
41
|
removeColumnFromCurrentLayout(columnId: string): void;
|
|
42
42
|
removeColumnFromAllLayouts(columnId: string): void;
|
|
43
43
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
44
|
+
addColumnToLayout(columnId: string, layoutName: string): void;
|
|
45
|
+
addColumnToCurrentLayout(columnId: string): void;
|
|
44
46
|
getLayoutSupportedFeatures(): {
|
|
45
47
|
RowGroupedColumns: boolean;
|
|
46
48
|
AggregationColumns: boolean;
|
|
@@ -48,8 +50,4 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
48
50
|
ColumnFilters: boolean;
|
|
49
51
|
ColumnSorts: boolean;
|
|
50
52
|
};
|
|
51
|
-
showTransposePopup(config: {
|
|
52
|
-
transposedColumnId: string;
|
|
53
|
-
hideTransposedColumn?: boolean;
|
|
54
|
-
}): void;
|
|
55
53
|
}
|
|
@@ -9,7 +9,6 @@ import { createUuid } from '../../PredefinedConfig/Uuid';
|
|
|
9
9
|
import { DEFAULT_LAYOUT } from '../../Utilities/Constants/GeneralConstants';
|
|
10
10
|
import { PopupShowPrompt } from '../../Redux/ActionsReducers/PopupRedux';
|
|
11
11
|
import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
|
|
12
|
-
import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
|
|
13
12
|
export class LayoutApiImpl extends ApiBase {
|
|
14
13
|
constructor(adaptable) {
|
|
15
14
|
super(adaptable);
|
|
@@ -222,6 +221,21 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
}
|
|
224
|
+
addColumnToLayout(columnId, layoutName) {
|
|
225
|
+
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
226
|
+
if (column) {
|
|
227
|
+
const layout = this.getLayoutByName(layoutName);
|
|
228
|
+
if (layout) {
|
|
229
|
+
if (!layout.Columns.includes(columnId)) {
|
|
230
|
+
this.dispatchAction(LayoutRedux.LayoutAddColumn(layoutName, columnId));
|
|
231
|
+
this.getAdaptableApi().columnApi.showColumn(columnId);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
addColumnToCurrentLayout(columnId) {
|
|
237
|
+
this.addColumnToLayout(columnId, this.getCurrentLayoutName());
|
|
238
|
+
}
|
|
225
239
|
getLayoutSupportedFeatures() {
|
|
226
240
|
const layoutSupportedFeatures = {
|
|
227
241
|
RowGroupedColumns: true,
|
|
@@ -237,17 +251,4 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
237
251
|
}
|
|
238
252
|
return layoutSupportedFeatures;
|
|
239
253
|
}
|
|
240
|
-
showTransposePopup(config) {
|
|
241
|
-
const { transposedColumnId, hideTransposedColumn } = config;
|
|
242
|
-
this.adaptable.api.internalApi.showPopupWindow({
|
|
243
|
-
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
244
|
-
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
245
|
-
title: 'Transpose View',
|
|
246
|
-
icon: 'grid',
|
|
247
|
-
popupProps: {
|
|
248
|
-
transposedColumnId,
|
|
249
|
-
hideTransposedColumn,
|
|
250
|
-
},
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
254
|
}
|
|
@@ -2,7 +2,11 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { NotesApi } from '../NotesApi';
|
|
3
3
|
import { AdaptableNote, AdaptableNotes, NotesState } from '../../PredefinedConfig/NotesState';
|
|
4
4
|
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
5
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
|
+
import { NotesInternalApi } from '../Internal/NotesInternalApi';
|
|
5
7
|
export declare class NotesApiImpl extends ApiBase implements NotesApi {
|
|
8
|
+
internalApi: NotesInternalApi;
|
|
9
|
+
constructor(adaptable: IAdaptable);
|
|
6
10
|
addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
|
|
7
11
|
editNote(note: AdaptableNote): void;
|
|
8
12
|
updateNoteText(noteStr: string, note: AdaptableNote): void;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
|
|
3
|
+
import { NotesInternalApi } from '../Internal/NotesInternalApi';
|
|
3
4
|
export class NotesApiImpl extends ApiBase {
|
|
5
|
+
constructor(adaptable) {
|
|
6
|
+
super(adaptable);
|
|
7
|
+
this.internalApi = new NotesInternalApi(adaptable);
|
|
8
|
+
}
|
|
4
9
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
5
10
|
const note = {
|
|
6
11
|
Text: noteStr,
|
|
@@ -10,6 +10,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
|
|
|
10
10
|
scopeIsEmpty(scope: AdaptableScope): boolean;
|
|
11
11
|
scopeIsAll(scope: AdaptableScope): boolean;
|
|
12
12
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
13
|
+
scopeHasColumnType(scope: AdaptableScope): boolean;
|
|
13
14
|
scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
|
|
14
15
|
scopeHasColumns(scope: AdaptableScope): boolean;
|
|
15
16
|
isSingleColumnScope(scope: AdaptableScope): boolean;
|
|
@@ -21,6 +22,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
|
|
|
21
22
|
isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
|
|
22
23
|
getScopeToString(scope: AdaptableScope): string;
|
|
23
24
|
getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
|
|
25
|
+
getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
|
|
24
26
|
getDataTypesInScope(scope: AdaptableScope): ScopeDataType[] | undefined;
|
|
25
27
|
isColumnInNumericScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
|
|
26
28
|
isColumnInStringsScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
|
|
@@ -13,6 +13,10 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
13
13
|
if ('DataTypes' in scope && scope.DataTypes.includes(column.dataType)) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
|
+
if ('ColumnTypes' in scope &&
|
|
17
|
+
scope.ColumnTypes.some((columnType) => { var _a; return (_a = column.columnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType); })) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
16
20
|
if ('ColumnIds' in scope && scope.ColumnIds.includes(column.columnId)) {
|
|
17
21
|
return true;
|
|
18
22
|
}
|
|
@@ -27,13 +31,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
27
31
|
return columns;
|
|
28
32
|
}
|
|
29
33
|
return columns.filter((c) => {
|
|
30
|
-
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
if ('ColumnIds' in scope && scope.ColumnIds.includes(c.columnId)) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
34
|
+
return this.isColumnInScope(c, scope);
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
37
|
getScopeDescription(scope) {
|
|
@@ -44,6 +42,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
44
42
|
// do we need a true check here?
|
|
45
43
|
return 'Columns: All';
|
|
46
44
|
}
|
|
45
|
+
if ('ColumnTypes' in scope) {
|
|
46
|
+
return ((scope.ColumnTypes.length > 0 ? 'ColumnTypes' : 'ColumnType') + ': ' + scope.ColumnTypes.join(', '));
|
|
47
|
+
}
|
|
47
48
|
if ('DataTypes' in scope) {
|
|
48
49
|
return ((scope.DataTypes.length > 0 ? 'DataTypes' : 'DataType') + ': ' + scope.DataTypes.join(', '));
|
|
49
50
|
}
|
|
@@ -67,6 +68,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
67
68
|
scopeHasDataType(scope) {
|
|
68
69
|
return scope !== undefined && 'DataTypes' in scope;
|
|
69
70
|
}
|
|
71
|
+
scopeHasColumnType(scope) {
|
|
72
|
+
return scope !== undefined && 'ColumnTypes' in scope;
|
|
73
|
+
}
|
|
70
74
|
scopeHasOnlyBooleanDataType(scope) {
|
|
71
75
|
var _a;
|
|
72
76
|
return 'DataTypes' in scope && ((_a = scope.DataTypes) === null || _a === void 0 ? void 0 : _a.length) == 1 && scope.DataTypes[0] == 'Boolean';
|
|
@@ -120,6 +124,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
120
124
|
if ('All' in scope) {
|
|
121
125
|
return 'Columns: All';
|
|
122
126
|
}
|
|
127
|
+
if ('ColumnTypes' in scope) {
|
|
128
|
+
return 'ColumnTypes: ' + scope.ColumnTypes.join(',');
|
|
129
|
+
}
|
|
123
130
|
if ('DataTypes' in scope) {
|
|
124
131
|
return 'DataTypes: ' + scope.DataTypes.join(',');
|
|
125
132
|
}
|
|
@@ -140,6 +147,12 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
140
147
|
}
|
|
141
148
|
return undefined;
|
|
142
149
|
}
|
|
150
|
+
getColumnTypesInScope(scope) {
|
|
151
|
+
if (scope !== undefined && 'ColumnTypes' in scope) {
|
|
152
|
+
return scope.ColumnTypes;
|
|
153
|
+
}
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
143
156
|
getDataTypesInScope(scope) {
|
|
144
157
|
if (scope !== undefined && 'DataTypes' in scope) {
|
|
145
158
|
return scope.DataTypes;
|
|
@@ -129,7 +129,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
129
129
|
? calculatedColumn.FriendlyName
|
|
130
130
|
: calculatedColumn.ColumnId,
|
|
131
131
|
colId: calculatedColumn.ColumnId,
|
|
132
|
-
hide:
|
|
132
|
+
hide: false,
|
|
133
133
|
editable: false,
|
|
134
134
|
width: calculatedColumnSettings.Width,
|
|
135
135
|
enableValue: calculatedColumnSettings.Aggregatable,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
export class CommentsInternalApi extends ApiBase {
|
|
3
|
+
areCommentsAvailable() {
|
|
4
|
+
const currentLayout = this.getLayoutApi().getCurrentLayout();
|
|
5
|
+
if (currentLayout.EnablePivot) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (currentLayout.RowGroupedColumns) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -69,8 +69,9 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
69
69
|
// this.getFormatColumnsWithColumnScope(formatColumns)
|
|
70
70
|
(this.adaptable.api.scopeApi.scopeHasColumns(fc.Scope) ||
|
|
71
71
|
// this.getFormatColumnsWithDataTypeScope(formatColumns)
|
|
72
|
-
this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
|
|
73
|
-
|
|
72
|
+
this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
|
|
73
|
+
// this.getFormatColumnsWithAllScope(formatColumns)
|
|
74
|
+
this.adaptable.api.scopeApi.scopeIsAll(fc.Scope) || this.adaptable.api.scopeApi.scopeHasColumnType(fc.Scope))
|
|
74
75
|
);
|
|
75
76
|
});
|
|
76
77
|
}
|
|
@@ -65,7 +65,7 @@ export class FreeTextColumnInternalApi extends ApiBase {
|
|
|
65
65
|
headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
|
|
66
66
|
colId: freeTextColumn.ColumnId,
|
|
67
67
|
editable: true,
|
|
68
|
-
hide:
|
|
68
|
+
hide: false,
|
|
69
69
|
width: freeTextColumnSettings.Width,
|
|
70
70
|
enableValue: freeTextColumnSettings.Aggregatable,
|
|
71
71
|
filter: freeTextColumnSettings.Filterable,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
export class NotesInternalApi extends ApiBase {
|
|
3
|
+
areNotesAvailable() {
|
|
4
|
+
const currentLayout = this.getLayoutApi().getCurrentLayout();
|
|
5
|
+
if (currentLayout.EnablePivot) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (currentLayout.RowGroupedColumns) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -163,6 +163,17 @@ export interface LayoutApi {
|
|
|
163
163
|
* @param layoutName layout from which to remove Column
|
|
164
164
|
*/
|
|
165
165
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Adds a Column to a given Layout
|
|
168
|
+
* @param columnId Column to add
|
|
169
|
+
* @param layoutName layout to which to add Column
|
|
170
|
+
*/
|
|
171
|
+
addColumnToLayout(columnId: string, layoutName: string): void;
|
|
172
|
+
/**
|
|
173
|
+
* Adds a Column to Current Layout
|
|
174
|
+
* @param columnId Column to add
|
|
175
|
+
*/
|
|
176
|
+
addColumnToCurrentLayout(columnId: string): void;
|
|
166
177
|
/**
|
|
167
178
|
* Returns what the layout supports.
|
|
168
179
|
* This takes into account the data-source.
|
|
@@ -174,12 +185,4 @@ export interface LayoutApi {
|
|
|
174
185
|
ColumnFilters: boolean;
|
|
175
186
|
ColumnSorts: boolean;
|
|
176
187
|
};
|
|
177
|
-
/**
|
|
178
|
-
* Opens a window with a transposed view of the grid
|
|
179
|
-
* it only works for client side data
|
|
180
|
-
*/
|
|
181
|
-
showTransposePopup(config: {
|
|
182
|
-
transposedColumnId: string;
|
|
183
|
-
hideTransposedColumn?: boolean;
|
|
184
|
-
}): void;
|
|
185
188
|
}
|
package/src/Api/ScopeApi.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ export interface ScopeApi {
|
|
|
31
31
|
* @param scope Scope to check
|
|
32
32
|
*/
|
|
33
33
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True if Scope contains ColumnTypes
|
|
36
|
+
* @param scope Scope to check
|
|
37
|
+
*/
|
|
38
|
+
scopeHasColumnType(scope: AdaptableScope): boolean;
|
|
34
39
|
/**
|
|
35
40
|
* True if the Scope is DataTypes and contains only Boolean
|
|
36
41
|
* @param scope Scope to check
|
|
@@ -87,6 +92,11 @@ export interface ScopeApi {
|
|
|
87
92
|
* @param scope Scope to check
|
|
88
93
|
*/
|
|
89
94
|
getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Returns all the ColumnTypes in the Scope
|
|
97
|
+
* @param scope Scope to check
|
|
98
|
+
*/
|
|
99
|
+
getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
|
|
90
100
|
/**
|
|
91
101
|
* Returns all the DataTypes in the Scope
|
|
92
102
|
* @param scope Scope to check
|
|
@@ -19,6 +19,10 @@ export interface AdaptableColumnBase extends AdaptableObject {
|
|
|
19
19
|
* DataType of the Column
|
|
20
20
|
*/
|
|
21
21
|
dataType: AdaptableColumnDataType;
|
|
22
|
+
/**
|
|
23
|
+
* Column Types of the Column
|
|
24
|
+
*/
|
|
25
|
+
columnTypes?: string[];
|
|
22
26
|
}
|
|
23
27
|
export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
|
|
24
28
|
oldColumns: AdaptableColumn[];
|
|
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
|
|
|
54
54
|
/**
|
|
55
55
|
* All AdapTable System Icon names
|
|
56
56
|
*/
|
|
57
|
-
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
|
|
57
|
+
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'rows';
|
|
@@ -8,7 +8,10 @@ export type ScopeDataTypes<Type = ScopeDataType> = {
|
|
|
8
8
|
export type ScopeColumnIds = {
|
|
9
9
|
ColumnIds: string[];
|
|
10
10
|
};
|
|
11
|
+
export type ScopeColumnTypes = {
|
|
12
|
+
ColumnTypes: string[];
|
|
13
|
+
};
|
|
11
14
|
/**
|
|
12
15
|
* Defines where a given Object / Module is active
|
|
13
16
|
*/
|
|
14
|
-
export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds;
|
|
17
|
+
export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SummarySupportedExpression } from '../../Utilities/Services/SummaryService';
|
|
2
|
+
export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
|
|
3
|
+
export type RowSummaryPosition = 'Top' | 'Bottom';
|
|
4
|
+
export interface RowSummary {
|
|
5
|
+
Position?: RowSummaryPosition;
|
|
6
|
+
ColumnsMap: Record<string, SummarySupportedExpression>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
|
|
@@ -3,6 +3,7 @@ import { AdaptableObject } from './Common/AdaptableObject';
|
|
|
3
3
|
import { ColumnSort } from './Common/ColumnSort';
|
|
4
4
|
import { ColumnFilter, GridFilter } from '../types';
|
|
5
5
|
import { AggregationColumns } from './Common/AggregationColumns';
|
|
6
|
+
import { RowSummary } from './Common/RowSummary';
|
|
6
7
|
/**
|
|
7
8
|
* Predefined Configuration for the Layout Module
|
|
8
9
|
*/
|
|
@@ -82,4 +83,8 @@ export interface Layout extends AdaptableObject {
|
|
|
82
83
|
* Whether to include the aggFunc name in the column header: e.g. 'sum(Bank Balance)' will just be 'Bank Balance'
|
|
83
84
|
*/
|
|
84
85
|
SuppressAggFuncInHeader?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Row summaries
|
|
88
|
+
*/
|
|
89
|
+
RowSummaries?: RowSummary[];
|
|
85
90
|
}
|
|
@@ -20,6 +20,10 @@ export type { OpenFinReport };
|
|
|
20
20
|
type ROW_PRIMARY_KEY = string;
|
|
21
21
|
type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
|
|
22
22
|
export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
|
|
23
|
+
export type SystemRowSummary = {
|
|
24
|
+
Position: 'Top' | 'Bottom';
|
|
25
|
+
RowData: Record<string, any>;
|
|
26
|
+
};
|
|
23
27
|
/**
|
|
24
28
|
* Internal state, used by Adaptable during a session; none of it is provided through Predefined Config, nor is it persisted
|
|
25
29
|
*/
|
|
@@ -103,6 +107,9 @@ export interface SystemState extends InternalState, IPushPullState, OpenFinState
|
|
|
103
107
|
focusedEntity?: 'Note' | 'Comment';
|
|
104
108
|
popupPosition?: CellAddress | null;
|
|
105
109
|
};
|
|
110
|
+
RowSummary?: {
|
|
111
|
+
rowSummaries?: SystemRowSummary[];
|
|
112
|
+
};
|
|
106
113
|
}
|
|
107
114
|
export interface ProgressIndicator {
|
|
108
115
|
active: boolean;
|
|
@@ -30,6 +30,10 @@ export declare const LAYOUT_SELECT = "LAYOUT_SELECT";
|
|
|
30
30
|
* @ReduxAction A Layout has been (auto)saved
|
|
31
31
|
*/
|
|
32
32
|
export declare const LAYOUT_SAVE = "LAYOUT_SAVE";
|
|
33
|
+
/**
|
|
34
|
+
* @ReduxAction A Column has been added
|
|
35
|
+
*/
|
|
36
|
+
export declare const LAYOUT_ADD_COLUMN = "LAYOUT_ADD_COLUMN";
|
|
33
37
|
/**
|
|
34
38
|
* @ReduxAction A Column has been removed
|
|
35
39
|
*/
|
|
@@ -145,6 +149,10 @@ export interface LayoutSetColumnCaptionAction extends Redux.Action {
|
|
|
145
149
|
columnId: string;
|
|
146
150
|
caption: string;
|
|
147
151
|
}
|
|
152
|
+
export interface LayoutAddColumnAction extends Redux.Action {
|
|
153
|
+
layoutName: string;
|
|
154
|
+
columnId: string;
|
|
155
|
+
}
|
|
148
156
|
export interface LayoutRemoveColumnAction extends Redux.Action {
|
|
149
157
|
layoutName: string;
|
|
150
158
|
columnId: string;
|
|
@@ -163,6 +171,7 @@ export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
|
|
|
163
171
|
export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
|
|
164
172
|
export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
|
|
165
173
|
export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
|
|
174
|
+
export declare const LayoutAddColumn: (layoutName: string, columnId: string) => LayoutAddColumnAction;
|
|
166
175
|
export declare const LayoutRemoveColumn: (layoutName: string, columnId: string) => LayoutRemoveColumnAction;
|
|
167
176
|
export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
|
|
168
177
|
export declare const LayoutReady: (layoutState: LayoutState) => LayoutReadyAction;
|