@adaptabletools/adaptable 16.0.5 → 16.0.6-canary.1
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 +9 -9
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +14 -4
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/Api/EventApi.d.ts +15 -1
- package/src/Api/Events/Fdc3MessageInfo.d.ts +46 -0
- package/src/Api/Events/Fdc3MessageInfo.js +2 -0
- package/src/Api/GridApi.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Internal/LayoutInternalApi.js +1 -1
- package/src/Strategy/Fdc3Module.js +2 -0
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Utilities/Services/Fdc3Service.d.ts +1 -2
- package/src/Utilities/Services/Fdc3Service.js +16 -0
- package/src/agGrid/Adaptable.d.ts +2 -2
- package/src/agGrid/Adaptable.js +6 -3
- package/src/agGrid/agGridMenuHelper.js +41 -6
- package/src/metamodel/adaptable.metamodel.d.ts +11 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.6-canary.1",
|
|
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",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1693485374052;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -257,7 +257,7 @@ export interface IAdaptable {
|
|
|
257
257
|
getChartRef(chardId: string): ChartRef;
|
|
258
258
|
updateChart(chart: ChartDefinition): void;
|
|
259
259
|
getChartModels(): ChartModel[];
|
|
260
|
-
|
|
260
|
+
getAgGridRowModelType(): RowModelType;
|
|
261
261
|
getCurrentIPPStyle(): IPPStyle;
|
|
262
262
|
getDefaultIPPStyle(): IPPStyle;
|
|
263
263
|
getRowCount(): number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
2
|
+
import { AdaptableColumn, BaseContext } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Options for managing menus in AdapTable
|
|
4
5
|
*/
|
|
@@ -25,19 +26,19 @@ export interface MenuOptions<TData = any> {
|
|
|
25
26
|
*/
|
|
26
27
|
showUngroupColumnMenuItem?: boolean;
|
|
27
28
|
/**
|
|
28
|
-
* Order in which AG Grid, AdapTable and User Menu
|
|
29
|
+
* Order in which AG Grid, AdapTable and User Menu sections will appear in Column Menu (list or function)
|
|
29
30
|
*
|
|
30
31
|
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
31
32
|
* @gridInfoItem
|
|
32
33
|
*/
|
|
33
|
-
columnMenuOrder?: ('aggrid' | 'adaptable' | 'user')[];
|
|
34
|
+
columnMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
|
|
34
35
|
/**
|
|
35
|
-
* Order in which AG Grid, AdapTable and User Menu
|
|
36
|
+
* Order in which AG Grid, AdapTable and User Menu sections will appear in Context Menu (list or function)
|
|
36
37
|
*
|
|
37
38
|
* @defaultValue 'aggrid', 'adaptable', 'user'
|
|
38
39
|
* @gridInfoItem
|
|
39
40
|
*/
|
|
40
|
-
contextMenuOrder?: ('aggrid' | 'adaptable' | 'user')[];
|
|
41
|
+
contextMenuOrder?: ((context: MenuOrderContext) => ('aggrid' | 'adaptable' | 'user')[]) | ('aggrid' | 'adaptable' | 'user')[];
|
|
41
42
|
/**
|
|
42
43
|
* User-defined Menu Items to add to the Column Menu
|
|
43
44
|
*/
|
|
@@ -47,3 +48,12 @@ export interface MenuOptions<TData = any> {
|
|
|
47
48
|
*/
|
|
48
49
|
contextMenuItems?: UserMenuItem<ContextMenuContext>[];
|
|
49
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Context used when ordering Menu Sections
|
|
53
|
+
*/
|
|
54
|
+
export interface MenuOrderContext extends BaseContext {
|
|
55
|
+
/**
|
|
56
|
+
* Column in which Menu will appear
|
|
57
|
+
*/
|
|
58
|
+
column: AdaptableColumn;
|
|
59
|
+
}
|
|
@@ -40,7 +40,7 @@ export interface QuickSearchOptions<TData = any> {
|
|
|
40
40
|
*/
|
|
41
41
|
runQuickSearchOnRowGroups?: boolean;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Run Quick Search using Case Sensitivity
|
|
44
44
|
*
|
|
45
45
|
* @defaultValue false
|
|
46
46
|
* @gridInfoItem
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, ScheduleTriggeredInfo, ChartChangedInfo, ThemeEditedInfo, FilterAppliedInfo } from '../types';
|
|
2
|
+
import { Fdc3MessageInfo } from './Events/Fdc3MessageInfo';
|
|
2
3
|
/**
|
|
3
4
|
* Responsible for publishing the many Events that AdapTable fires
|
|
4
5
|
*/
|
|
@@ -308,9 +309,22 @@ export interface EventApi {
|
|
|
308
309
|
* Unsubscribe from AdaptableReady
|
|
309
310
|
*/
|
|
310
311
|
off(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): void;
|
|
312
|
+
/**
|
|
313
|
+
* Event fired when a FDC3 message is sent(raise Intent or broadcast Context) or received (Intent or Context)
|
|
314
|
+
*
|
|
315
|
+
* @param eventName Fdc3Message
|
|
316
|
+
* @param callback Fdc3MessageInfo
|
|
317
|
+
*/
|
|
318
|
+
on(eventName: 'Fdc3Message', callback: (fdc3MessageInfo: Fdc3MessageInfo) => void): () => void;
|
|
319
|
+
/**
|
|
320
|
+
* Unsubscribe from Fdc3Message
|
|
321
|
+
* @param eventName Fdc3Message
|
|
322
|
+
* @param callbackFdc3MessageInfo
|
|
323
|
+
*/
|
|
324
|
+
off(eventName: 'Fdc3Message', callback: (fdc3MessageInfo: Fdc3MessageInfo) => void): void;
|
|
311
325
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
312
326
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
313
327
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
314
|
-
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'ScheduleTriggered' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited', data?: any): Promise<any>;
|
|
328
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'ScheduleTriggered' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited', data?: any): Promise<any>;
|
|
315
329
|
destroy(): void;
|
|
316
330
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
2
|
+
import { Fdc3Context } from '../../PredefinedConfig/Common/Fdc3Context';
|
|
3
|
+
import { Fdc3IntentType } from '../../PredefinedConfig/Common/Fdc3Intent';
|
|
4
|
+
import { AppIdentifier, ContextMetadata } from '@finos/fdc3';
|
|
5
|
+
/**
|
|
6
|
+
* EventInfo returned by FDC3 Message events
|
|
7
|
+
*/
|
|
8
|
+
export declare type Fdc3MessageInfo = Fdc3MessageSentInfo | Fdc3MessageReceivedInfo;
|
|
9
|
+
export interface Fdc3MessageSentInfo extends BaseEventInfo {
|
|
10
|
+
direction: 'sent';
|
|
11
|
+
/**
|
|
12
|
+
* Type of Event: `RaiseIntent`, `RaiseIntentForContext` or `BroadcastMessage`
|
|
13
|
+
*/
|
|
14
|
+
eventType: 'RaiseIntent' | 'RaiseIntentForContext' | 'BroadcastMessage';
|
|
15
|
+
/**
|
|
16
|
+
* The FDC3 Intent which caused Event to fire (if type is `RaiseIntent`)
|
|
17
|
+
*/
|
|
18
|
+
intent?: Fdc3IntentType;
|
|
19
|
+
/**
|
|
20
|
+
* Full FDC3 Context for the object related to the event
|
|
21
|
+
*/
|
|
22
|
+
context: Fdc3Context;
|
|
23
|
+
/**
|
|
24
|
+
* The target application for the message
|
|
25
|
+
*/
|
|
26
|
+
app?: AppIdentifier;
|
|
27
|
+
}
|
|
28
|
+
export interface Fdc3MessageReceivedInfo extends BaseEventInfo {
|
|
29
|
+
direction: 'received';
|
|
30
|
+
/**
|
|
31
|
+
* Type of Event: `IntentRaised`, `ContextBroadcast`
|
|
32
|
+
*/
|
|
33
|
+
eventType: 'IntentRaised' | 'ContextBroadcast';
|
|
34
|
+
/**
|
|
35
|
+
* The FDC3 Intent which caused Event to fire (if type is `IntentRaised`)
|
|
36
|
+
*/
|
|
37
|
+
intent?: Fdc3IntentType;
|
|
38
|
+
/**
|
|
39
|
+
* Full FDC3 Context for the object related to the event
|
|
40
|
+
*/
|
|
41
|
+
context: Fdc3Context;
|
|
42
|
+
/**
|
|
43
|
+
* Metadata associated with the context
|
|
44
|
+
*/
|
|
45
|
+
metadata?: ContextMetadata;
|
|
46
|
+
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -515,7 +515,7 @@ export interface GridApi {
|
|
|
515
515
|
*/
|
|
516
516
|
openGridInfoSettingsPanel(): void;
|
|
517
517
|
/**
|
|
518
|
-
* Returns
|
|
518
|
+
* Returns AG Grid Row Model Type
|
|
519
519
|
*/
|
|
520
|
-
|
|
520
|
+
getAgGridRowModelType(): RowModelType;
|
|
521
521
|
}
|
|
@@ -127,5 +127,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
127
127
|
destroy(): void;
|
|
128
128
|
getGridContainerElement(): HTMLElement | null;
|
|
129
129
|
openGridInfoSettingsPanel(): void;
|
|
130
|
-
|
|
130
|
+
getAgGridRowModelType(): RowModelType;
|
|
131
131
|
}
|
|
@@ -527,8 +527,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
527
527
|
openGridInfoSettingsPanel() {
|
|
528
528
|
this.showModulePopup(ModuleConstants.GridInfoModuleId);
|
|
529
529
|
}
|
|
530
|
-
|
|
531
|
-
return this.adaptable.
|
|
530
|
+
getAgGridRowModelType() {
|
|
531
|
+
return this.adaptable.getAgGridRowModelType();
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
exports.GridApiImpl = GridApiImpl;
|
|
@@ -233,7 +233,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
233
233
|
ColumnFilters: true,
|
|
234
234
|
ColumnSorts: true,
|
|
235
235
|
};
|
|
236
|
-
if (this.getGridApi().
|
|
236
|
+
if (this.getGridApi().getAgGridRowModelType() === 'viewport') {
|
|
237
237
|
layoutSupportedFeatures.RowGroupedColumns = false;
|
|
238
238
|
layoutSupportedFeatures.AggregationColumns = false;
|
|
239
239
|
layoutSupportedFeatures.PivotColumns = false;
|
|
@@ -120,7 +120,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
120
120
|
ColumnFilters: true,
|
|
121
121
|
ColumnSorts: true,
|
|
122
122
|
};
|
|
123
|
-
if (this.getGridApi().
|
|
123
|
+
if (this.getGridApi().getAgGridRowModelType() === 'viewport') {
|
|
124
124
|
layoutSupportedFeatures.RowGroupedColumns = false;
|
|
125
125
|
layoutSupportedFeatures.AggregationColumns = false;
|
|
126
126
|
layoutSupportedFeatures.PivotColumns = false;
|
|
@@ -49,6 +49,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
49
49
|
this.getFdc3Api().raiseIntentFromRow(rowNode, intentType, contextType);
|
|
50
50
|
},
|
|
51
51
|
isVisible: true,
|
|
52
|
+
module: 'Fdc3',
|
|
52
53
|
};
|
|
53
54
|
if ((_a = intentConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
|
|
54
55
|
const menuItemIcon = ((_b = intentConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
|
|
@@ -67,6 +68,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
67
68
|
this.getFdc3Api().broadcastFromRow(rowNode, contextType);
|
|
68
69
|
},
|
|
69
70
|
isVisible: true,
|
|
71
|
+
module: 'Fdc3',
|
|
70
72
|
};
|
|
71
73
|
if ((_a = contextConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
|
|
72
74
|
const menuItemIcon = ((_b = contextConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
|
|
@@ -65,7 +65,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
65
65
|
* logic where layout is applied, it is easier and
|
|
66
66
|
* less error prone to just remove it.
|
|
67
67
|
*/
|
|
68
|
-
if (this.api.gridApi.
|
|
68
|
+
if (this.api.gridApi.getAgGridRowModelType() === 'viewport') {
|
|
69
69
|
this.api.layoutApi.getLayouts().forEach(this.clearUnsuportedFeaturesFromLayout);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
2
2
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
3
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
4
|
-
import { DesktopAgent, IntentResolution } from '@finos/fdc3';
|
|
4
|
+
import { DesktopAgent, IntentResolution, AppIdentifier } from '@finos/fdc3';
|
|
5
5
|
import { Context } from '@finos/fdc3/dist/context/ContextTypes';
|
|
6
|
-
import { AppIdentifier } from '@finos/fdc3/dist/api/AppIdentifier';
|
|
7
6
|
export declare class Fdc3Service implements IAdaptableService {
|
|
8
7
|
private adaptableApi;
|
|
9
8
|
private contextHandlerSubscriptions;
|
|
@@ -26,6 +26,10 @@ class Fdc3Service {
|
|
|
26
26
|
intent,
|
|
27
27
|
metadata });
|
|
28
28
|
adaptableHandleIntentFn === null || adaptableHandleIntentFn === void 0 ? void 0 : adaptableHandleIntentFn(fnContext);
|
|
29
|
+
const payload = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { direction: 'received', eventType: 'IntentRaised', intent,
|
|
30
|
+
context,
|
|
31
|
+
metadata });
|
|
32
|
+
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
29
33
|
}).then((listener) => this.intentHandlerSubscriptions.push(listener));
|
|
30
34
|
});
|
|
31
35
|
}
|
|
@@ -43,6 +47,9 @@ class Fdc3Service {
|
|
|
43
47
|
const fnContext = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { context,
|
|
44
48
|
metadata });
|
|
45
49
|
adaptableHandleContextFn === null || adaptableHandleContextFn === void 0 ? void 0 : adaptableHandleContextFn(fnContext);
|
|
50
|
+
const payload = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { direction: 'received', eventType: 'ContextBroadcast', context,
|
|
51
|
+
metadata });
|
|
52
|
+
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
46
53
|
}).then((listener) => this.contextHandlerSubscriptions.push(listener));
|
|
47
54
|
});
|
|
48
55
|
}
|
|
@@ -69,6 +76,10 @@ class Fdc3Service {
|
|
|
69
76
|
}
|
|
70
77
|
try {
|
|
71
78
|
this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
|
|
79
|
+
const payload = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { direction: 'sent', eventType: 'RaiseIntent', intent,
|
|
80
|
+
context,
|
|
81
|
+
app });
|
|
82
|
+
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
72
83
|
const intentResolution = await this.getDesktopAgent().raiseIntent(intent, context, app);
|
|
73
84
|
this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
|
|
74
85
|
this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, intent, app);
|
|
@@ -84,6 +95,9 @@ class Fdc3Service {
|
|
|
84
95
|
}
|
|
85
96
|
try {
|
|
86
97
|
this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
|
|
98
|
+
const payload = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { direction: 'sent', eventType: 'RaiseIntentForContext', context,
|
|
99
|
+
app });
|
|
100
|
+
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
87
101
|
const intentResolution = await this.getDesktopAgent().raiseIntentForContext(context, app);
|
|
88
102
|
this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
|
|
89
103
|
this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
|
|
@@ -99,6 +113,8 @@ class Fdc3Service {
|
|
|
99
113
|
}
|
|
100
114
|
try {
|
|
101
115
|
this.logFdc3Event('OUT', `broadcast`, JSON.stringify(context));
|
|
116
|
+
const payload = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { direction: 'sent', eventType: 'BroadcastMessage', context });
|
|
117
|
+
this.adaptableApi.eventApi.emit('Fdc3Message', payload);
|
|
102
118
|
return this.getDesktopAgent().broadcast(context);
|
|
103
119
|
}
|
|
104
120
|
catch (error) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartRef, ColDef, ColGroupDef, Column, ColumnRowGroupChangedEvent, ExcelStyle, GridOptions, IRowNode, Module, ModuleNames } from '@ag-grid-community/core';
|
|
1
|
+
import { ChartRef, ColDef, ColGroupDef, Column, ColumnRowGroupChangedEvent, ExcelStyle, GridOptions, IRowNode, Module, ModuleNames, RowModelType } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
|
|
3
3
|
import { AdaptableVariant, AgGridConfig, IAdaptable } from '../AdaptableInterfaces/IAdaptable';
|
|
4
4
|
import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
@@ -426,7 +426,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
426
426
|
updateChart(chart: ChartDefinition): void;
|
|
427
427
|
getChartRef(chartId: string): ChartRef;
|
|
428
428
|
getChartModels(): import("@ag-grid-community/core").ChartModel[];
|
|
429
|
-
|
|
429
|
+
getAgGridRowModelType(): RowModelType;
|
|
430
430
|
private getActiveAdaptableAggFuncForCol;
|
|
431
431
|
private registerAdaptableAggFuncs;
|
|
432
432
|
/**
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -2227,7 +2227,7 @@ class Adaptable {
|
|
|
2227
2227
|
});
|
|
2228
2228
|
}
|
|
2229
2229
|
forAllVisibleRowNodesDo(func, config) {
|
|
2230
|
-
if (this.
|
|
2230
|
+
if (this.getAgGridRowModelType() !== 'clientSide') {
|
|
2231
2231
|
// only in client-side row model can we loop through filtered&sorted rows
|
|
2232
2232
|
// see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
|
|
2233
2233
|
this.logger.warn('`forAllVisibleRowNodesDo()` is only supported in client-side row model. `forAllRowNodesDo` will be used instead.');
|
|
@@ -5078,8 +5078,11 @@ class Adaptable {
|
|
|
5078
5078
|
}
|
|
5079
5079
|
return this.gridOptions.api.getChartModels();
|
|
5080
5080
|
}
|
|
5081
|
-
|
|
5082
|
-
|
|
5081
|
+
getAgGridRowModelType() {
|
|
5082
|
+
var _a;
|
|
5083
|
+
// it seems that this can be null so we need explicitly to return "clientSide" in this case
|
|
5084
|
+
// need to check that for ServerSideRowModel it is ALWAYS returned...
|
|
5085
|
+
return (_a = this.gridOptions.rowModelType) !== null && _a !== void 0 ? _a : 'clientSide';
|
|
5083
5086
|
}
|
|
5084
5087
|
getActiveAdaptableAggFuncForCol(columnId) {
|
|
5085
5088
|
if (!columnId) {
|
|
@@ -22,9 +22,10 @@ class agGridMenuHelper {
|
|
|
22
22
|
let agGridColumnMenuItems = [];
|
|
23
23
|
let adaptableColumnMenuItems = [];
|
|
24
24
|
let userColumnMenuItems = [];
|
|
25
|
+
const menuOptions = this.adaptable.adaptableOptions.menuOptions;
|
|
25
26
|
//First get Ag Grid Column Items
|
|
26
27
|
agGridColumnMenuItems.push(...this.createAgGridColumnMenuItems(originalgetMainMenuItems, params));
|
|
27
|
-
let showAdaptableColumnMenu =
|
|
28
|
+
let showAdaptableColumnMenu = menuOptions.showAdaptableColumnMenu;
|
|
28
29
|
let hasAdaptableColumnMenuItems = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
29
30
|
if (hasAdaptableColumnMenuItems) {
|
|
30
31
|
agGridColumnMenuItems.push('separator');
|
|
@@ -50,7 +51,20 @@ class agGridMenuHelper {
|
|
|
50
51
|
adaptable: adaptableColumnMenuItems,
|
|
51
52
|
user: userColumnMenuItems,
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
+
const menuItemsArray = menuOptions.columnMenuOrder;
|
|
55
|
+
let arr = [];
|
|
56
|
+
if (menuItemsArray != null && typeof menuItemsArray === 'function') {
|
|
57
|
+
arr = menuItemsArray({
|
|
58
|
+
adaptableApi: this.adaptable.api,
|
|
59
|
+
userName: this.adaptable.adaptableOptions.userName,
|
|
60
|
+
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
61
|
+
column: adaptableColumn,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
arr = menuItemsArray;
|
|
66
|
+
}
|
|
67
|
+
return (0, flatten_1.default)(arr.map((c) => {
|
|
54
68
|
return map[c];
|
|
55
69
|
}));
|
|
56
70
|
}
|
|
@@ -61,9 +75,10 @@ class agGridMenuHelper {
|
|
|
61
75
|
let agGridContextMenuItems = [];
|
|
62
76
|
let adaptableContextMenuItems = [];
|
|
63
77
|
let userContextMenuItems = [];
|
|
64
|
-
|
|
78
|
+
const menuOptions = this.adaptable.adaptableOptions.menuOptions;
|
|
79
|
+
let showAdaptableContextMenu = menuOptions.showAdaptableContextMenu;
|
|
65
80
|
let hasAdaptableContextMenuItems = showAdaptableContextMenu == null || showAdaptableContextMenu !== false;
|
|
66
|
-
let userDefinedContextMenuItems =
|
|
81
|
+
let userDefinedContextMenuItems = menuOptions.contextMenuItems;
|
|
67
82
|
let hasUserDefinedContextMenuItems = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userDefinedContextMenuItems);
|
|
68
83
|
const agGridMenuItems = this.createAgGridContextMenuItems(originalgetContextMenuItems, params);
|
|
69
84
|
if (agGridMenuItems === null || agGridMenuItems === void 0 ? void 0 : agGridMenuItems.length) {
|
|
@@ -74,8 +89,9 @@ class agGridMenuHelper {
|
|
|
74
89
|
}
|
|
75
90
|
const adaptableMenuItems = [];
|
|
76
91
|
const agGridColumn = params.column;
|
|
92
|
+
let adaptableColumn;
|
|
77
93
|
if (agGridColumn) {
|
|
78
|
-
|
|
94
|
+
adaptableColumn = this.adaptable.api.columnApi.getColumnWithColumnId(agGridColumn.getColId());
|
|
79
95
|
// if (adaptableColumn != undefined) {
|
|
80
96
|
let menuContext = this.createContextMenuContextObject(params, adaptableColumn);
|
|
81
97
|
// keep it simple for now - if its a grouped cell then don't add the shipped menu items
|
|
@@ -99,10 +115,29 @@ class agGridMenuHelper {
|
|
|
99
115
|
adaptable: adaptableContextMenuItems,
|
|
100
116
|
user: userContextMenuItems,
|
|
101
117
|
};
|
|
102
|
-
|
|
118
|
+
const menuItemsArray = menuOptions.contextMenuOrder;
|
|
119
|
+
let arr = [];
|
|
120
|
+
if (menuItemsArray != null && typeof menuItemsArray === 'function') {
|
|
121
|
+
arr = menuItemsArray({
|
|
122
|
+
adaptableApi: this.adaptable.api,
|
|
123
|
+
userName: this.adaptable.adaptableOptions.userName,
|
|
124
|
+
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
125
|
+
column: adaptableColumn,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
arr = menuItemsArray;
|
|
130
|
+
}
|
|
131
|
+
return (0, flatten_1.default)(arr.map((c) => {
|
|
103
132
|
return map[c];
|
|
104
133
|
}));
|
|
105
134
|
}
|
|
135
|
+
//}
|
|
136
|
+
// return flatten(
|
|
137
|
+
// arr.map((c) => {
|
|
138
|
+
// return map[c];
|
|
139
|
+
// })
|
|
140
|
+
// );
|
|
106
141
|
createRemoveGroupsMenuItem(x) {
|
|
107
142
|
return {
|
|
108
143
|
name: x.label,
|
|
@@ -3584,6 +3584,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3584
3584
|
defVal: string;
|
|
3585
3585
|
})[];
|
|
3586
3586
|
};
|
|
3587
|
+
MenuOrderContext: {
|
|
3588
|
+
name: string;
|
|
3589
|
+
kind: string;
|
|
3590
|
+
desc: string;
|
|
3591
|
+
props: {
|
|
3592
|
+
name: string;
|
|
3593
|
+
kind: string;
|
|
3594
|
+
desc: string;
|
|
3595
|
+
ref: string;
|
|
3596
|
+
}[];
|
|
3597
|
+
};
|
|
3587
3598
|
ModuleExpressionFunctions: {
|
|
3588
3599
|
name: string;
|
|
3589
3600
|
kind: string;
|