@adaptabletools/adaptable-cjs 19.1.0-canary.0 → 19.1.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/package.json +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +4 -4
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +6 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -15
- package/src/Api/Implementation/ApiBase.d.ts +12 -3
- package/src/Api/Implementation/ApiBase.js +39 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
- package/src/Api/Implementation/CalendarApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -18
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CommentsApiImpl.js +6 -4
- package/src/Api/Implementation/ConfigApiImpl.js +23 -24
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DashboardApiImpl.js +5 -5
- package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataImportApiImpl.js +3 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +5 -5
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EventApiImpl.js +2 -2
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +7 -7
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
- package/src/Api/Implementation/GridApiImpl.js +106 -103
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
- package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +3 -3
- package/src/Api/Implementation/OptionsApiImpl.js +7 -7
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +4 -4
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +8 -8
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
- package/src/Api/Internal/ActionRowInternalApi.js +8 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +55 -50
- package/src/Api/Internal/AlertInternalApi.js +9 -9
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/Api/Internal/CustomSortInternalApi.js +3 -3
- package/src/Api/Internal/DashboardInternalApi.js +4 -3
- package/src/Api/Internal/DataImportInternalApi.js +2 -2
- package/src/Api/Internal/DataSetInternalApi.js +2 -2
- package/src/Api/Internal/ExportInternalApi.js +21 -22
- package/src/Api/Internal/ExpressionInternalApi.js +4 -4
- package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
- package/src/Api/Internal/Fdc3InternalApi.js +9 -12
- package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- package/src/Api/Internal/GridInternalApi.js +26 -26
- package/src/Api/Internal/LayoutInternalApi.js +6 -5
- package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/Internal/ScheduleInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Strategy/NoteModule.d.ts +0 -1
- package/src/Strategy/NoteModule.js +4 -5
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Fdc3Service.js +1 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
- package/src/Utilities/Services/FlashingCellService.js +2 -3
- package/src/Utilities/Services/RowEditService.js +3 -5
- package/src/View/Alert/AlertStatusSubPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +4 -4
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "19.1.
|
|
3
|
+
"version": "19.1.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",
|
|
@@ -16,19 +16,19 @@ export interface FormatColumnOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
export interface CustomDisplayFormatter {
|
|
18
18
|
/**
|
|
19
|
-
* Format Id
|
|
19
|
+
* Custom Format Id
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
/**
|
|
23
|
-
* Format Description
|
|
23
|
+
* Custom Format Description
|
|
24
24
|
*/
|
|
25
25
|
label?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Function used to render Custom Display Format
|
|
27
|
+
* Function used to render the Custom Display Format
|
|
28
28
|
*/
|
|
29
29
|
handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Used by Format Columns wizard to show where Custom Display Format can be applied
|
|
32
32
|
*/
|
|
33
33
|
scope: ColumnScope;
|
|
34
34
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -456,7 +456,8 @@ export interface GridApi {
|
|
|
456
456
|
* @param rowNodes agGrid RowNodes which contain cells to refresh
|
|
457
457
|
* @param columnIds ColumnIds which contain cells to refresh
|
|
458
458
|
*/
|
|
459
|
-
refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
|
|
459
|
+
refreshCells(rowNodes: IRowNode[], columnIds: string[], suppressFlash?: boolean): void;
|
|
460
|
+
refreshAllCells(forceUpdate?: boolean): void;
|
|
460
461
|
/**
|
|
461
462
|
* Refreshes a single Grid Cell
|
|
462
463
|
* @param gridCell GridCell to refresh
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ActionColumn, ActionColumnApi } from '../../../types';
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
4
3
|
import { ColDef } from '@ag-grid-community/core';
|
|
5
4
|
export declare class ActionColumnApiImpl extends ApiBase implements ActionColumnApi {
|
|
6
|
-
constructor(adaptable: IAdaptable);
|
|
7
5
|
getActionColumns(): ActionColumn[];
|
|
8
6
|
getColDefsForActionColumns(): ColDef[];
|
|
9
7
|
}
|
|
@@ -5,9 +5,6 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
5
5
|
const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
|
|
6
6
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
7
7
|
class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
8
|
-
constructor(adaptable) {
|
|
9
|
-
super(adaptable);
|
|
10
|
-
}
|
|
11
8
|
getActionColumns() {
|
|
12
9
|
var _a;
|
|
13
10
|
return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
@@ -31,7 +28,7 @@ class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
31
28
|
filter: false,
|
|
32
29
|
sortable: false,
|
|
33
30
|
enableRowGroup: false,
|
|
34
|
-
cellRenderer: this.
|
|
31
|
+
cellRenderer: this.getGridApi().getVariant() === 'react'
|
|
35
32
|
? ActionColumnRenderer_1.ReactActionColumnRenderer
|
|
36
33
|
: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
37
34
|
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
@@ -4,7 +4,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
4
4
|
import { ActionRowInternalApi } from '../Internal/ActionRowInternalApi';
|
|
5
5
|
export declare class ActionRowApiImpl extends ApiBase implements ActionRowApi {
|
|
6
6
|
internalApi: ActionRowInternalApi;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(_adaptable: IAdaptable);
|
|
8
8
|
getActionRowButtons(): ActionRowButtonType[];
|
|
9
9
|
displayEditActionRow(primaryKey: any): void;
|
|
10
10
|
displayCreateActionRow(): void;
|
|
@@ -5,14 +5,14 @@ const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const ActionRowInternalApi_1 = require("../Internal/ActionRowInternalApi");
|
|
7
7
|
class ActionRowApiImpl extends ApiBase_1.ApiBase {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
10
|
-
this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(
|
|
8
|
+
constructor(_adaptable) {
|
|
9
|
+
super(_adaptable);
|
|
10
|
+
this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(_adaptable);
|
|
11
11
|
}
|
|
12
12
|
getActionRowButtons() {
|
|
13
13
|
var actionRowButtons = this.getActionRowOptions().actionRowButtons;
|
|
14
14
|
if (typeof actionRowButtons === 'function') {
|
|
15
|
-
const context = this.
|
|
15
|
+
const context = this.getAdaptableInternalApi().buildBaseContext();
|
|
16
16
|
actionRowButtons = actionRowButtons(context);
|
|
17
17
|
}
|
|
18
18
|
return actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
|
|
@@ -110,10 +110,12 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
110
110
|
destroyApi?: boolean;
|
|
111
111
|
}): void;
|
|
112
112
|
isDestroyed(): boolean;
|
|
113
|
+
logConsoleMessage(message: string, ...optionalParams: any[]): void;
|
|
113
114
|
logInfo(message: string, ...optionalParams: any[]): void;
|
|
114
115
|
logSuccess(message: string, ...optionalParams: any[]): void;
|
|
115
116
|
logWarn(message: string, ...optionalParams: any[]): void;
|
|
116
117
|
logError(message: string, ...optionalParams: any[]): void;
|
|
118
|
+
consoleLog(message: string, ...optionalParams: any[]): void;
|
|
117
119
|
consoleError(message: string, ...optionalParams: any[]): void;
|
|
118
120
|
consoleWarn(message: string, ...optionalParams: any[]): void;
|
|
119
121
|
}
|
|
@@ -169,6 +169,9 @@ class AdaptableApiImpl {
|
|
|
169
169
|
isDestroyed() {
|
|
170
170
|
return this.destroyed;
|
|
171
171
|
}
|
|
172
|
+
logConsoleMessage(message, ...optionalParams) {
|
|
173
|
+
this.adaptable.logger.consoleLog(message, optionalParams);
|
|
174
|
+
}
|
|
172
175
|
logInfo(message, ...optionalParams) {
|
|
173
176
|
this.adaptable.logger.info(message, optionalParams);
|
|
174
177
|
}
|
|
@@ -181,6 +184,9 @@ class AdaptableApiImpl {
|
|
|
181
184
|
logError(message, ...optionalParams) {
|
|
182
185
|
this.adaptable.logger.error(message, optionalParams);
|
|
183
186
|
}
|
|
187
|
+
consoleLog(message, ...optionalParams) {
|
|
188
|
+
this.adaptable.logger.consoleLog(message, optionalParams);
|
|
189
|
+
}
|
|
184
190
|
consoleError(message, ...optionalParams) {
|
|
185
191
|
this.adaptable.logger.consoleError(message, optionalParams);
|
|
186
192
|
}
|
|
@@ -8,7 +8,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
8
8
|
import { AlertInternalApi } from '../Internal/AlertInternalApi';
|
|
9
9
|
export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
10
10
|
internalApi: AlertInternalApi;
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(_adaptable: IAdaptable);
|
|
12
12
|
getAlertState(): AlertState;
|
|
13
13
|
getAlertDefinitions(config?: LayoutAssociatedObjectLoadConfig): AlertDefinition[];
|
|
14
14
|
getSuspendedAlertDefinitions(config?: {
|
|
@@ -12,9 +12,9 @@ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert")
|
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const AlertInternalApi_1 = require("../Internal/AlertInternalApi");
|
|
14
14
|
class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
this.internalApi = new AlertInternalApi_1.AlertInternalApi(
|
|
15
|
+
constructor(_adaptable) {
|
|
16
|
+
super(_adaptable);
|
|
17
|
+
this.internalApi = new AlertInternalApi_1.AlertInternalApi(_adaptable);
|
|
18
18
|
}
|
|
19
19
|
getAlertState() {
|
|
20
20
|
return this.getAdaptableState().Alert;
|
|
@@ -47,7 +47,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
this.addUidToAdaptableObject(alertToShow);
|
|
48
48
|
this.dispatchAction(SystemRedux.SystemAlertAdd(alertToShow, this.getAlertOptions().maxAlertsInStore));
|
|
49
49
|
// 2. Publish the Alert Fired Event
|
|
50
|
-
const alertFiredInfo = Object.assign(Object.assign({}, this.
|
|
50
|
+
const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { alert: alertToShow });
|
|
51
51
|
const results = await this.getAdaptableApi().eventApi.emit('AlertFired', alertFiredInfo);
|
|
52
52
|
const showPopup = results.reduce((endResult, aResult) => {
|
|
53
53
|
return endResult && aResult !== false;
|
|
@@ -63,7 +63,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
63
63
|
}
|
|
64
64
|
// 2. Log to console
|
|
65
65
|
if (alertProperties.LogToConsole) {
|
|
66
|
-
this.
|
|
66
|
+
this.getAdatableLogger().consoleLogByMessageType(alertToShow.header + ': ' + alertToShow.message, alertDefinition.MessageType);
|
|
67
67
|
}
|
|
68
68
|
// 3. Show it in a Div (if one has been set)
|
|
69
69
|
if (alertProperties.ShowInDiv) {
|
|
@@ -83,7 +83,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
83
83
|
if (alertProperties.JumpToCell &&
|
|
84
84
|
(0, AdaptableAlert_1.isAdaptableCellChangedAlert)(alertToShow) &&
|
|
85
85
|
alertToShow.cellDataChangedInfo) {
|
|
86
|
-
this.
|
|
86
|
+
this._adaptable.jumpToCell(alertToShow.cellDataChangedInfo.column.columnId, alertToShow.cellDataChangedInfo.rowNode);
|
|
87
87
|
}
|
|
88
88
|
// 5: Jump to the Row
|
|
89
89
|
else if (alertProperties.JumpToRow &&
|
|
@@ -91,7 +91,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
91
91
|
((_a = alertToShow.gridDataChangedInfo) === null || _a === void 0 ? void 0 : _a.rowTrigger) === 'Add') {
|
|
92
92
|
const [firstRowNode] = alertToShow.gridDataChangedInfo.rowNodes;
|
|
93
93
|
if (firstRowNode) {
|
|
94
|
-
this.
|
|
94
|
+
this._adaptable.jumpToRow(firstRowNode);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
// 6: For CellChanged Alerts either Highlight the cell or row
|
|
@@ -101,20 +101,20 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
101
101
|
(alertProperties.HighlightCell || alertProperties.HighlightRow)) {
|
|
102
102
|
let alertNode = alertToShow.cellDataChangedInfo.rowNode;
|
|
103
103
|
if (!alertNode) {
|
|
104
|
-
alertNode = this.
|
|
104
|
+
alertNode = this.getGridApi().getRowNodeForPrimaryKey(alertToShow.cellDataChangedInfo.primaryKeyValue);
|
|
105
105
|
}
|
|
106
106
|
if (alertNode) {
|
|
107
107
|
if (alertProperties.HighlightRow) {
|
|
108
108
|
this.getAdaptableApi().gridApi.refreshRowNodes([alertNode]);
|
|
109
109
|
setTimeout(() => {
|
|
110
110
|
this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
|
|
111
|
-
}, this.
|
|
111
|
+
}, this.getAlertOptions().rowHighlightDuration);
|
|
112
112
|
}
|
|
113
113
|
if (alertProperties.HighlightCell) {
|
|
114
114
|
this.getAdaptableApi().gridApi.refreshCells([alertNode], [alertToShow.cellDataChangedInfo.column.columnId]);
|
|
115
115
|
setTimeout(() => {
|
|
116
116
|
this.dispatchAction(SystemRedux.SystemAlertRemoveCellHighlight(alertToShow));
|
|
117
|
-
}, this.
|
|
117
|
+
}, this.getAlertOptions().cellHighlightDuration);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -125,7 +125,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
125
125
|
this.getAdaptableApi().gridApi.refreshRowNodes(alertToShow.gridDataChangedInfo.rowNodes);
|
|
126
126
|
setTimeout(() => {
|
|
127
127
|
this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
|
|
128
|
-
}, this.
|
|
128
|
+
}, this.getAlertOptions().rowHighlightDuration);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -199,7 +199,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
findAlertDefinitions(criteria) {
|
|
202
|
-
return this.
|
|
202
|
+
return this.getAdaptableInternalApi().findAdaptableObjectsByLookupCriteria(criteria, this.getAlertDefinitions({
|
|
203
203
|
includeLayoutNotAssociatedObjects: true,
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
@@ -224,11 +224,12 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
224
224
|
}
|
|
225
225
|
createCellDataChangeInfoStubs(relevantColumnIds) {
|
|
226
226
|
const cellDataChangeInfos = [];
|
|
227
|
+
//const adaptable: IAdaptable = this.getAdaptableInternalApi().getAdaptableInstance();
|
|
227
228
|
const relevantColumns = this.getAdaptableApi()
|
|
228
229
|
.columnApi.getColumnsWithColumnIds(relevantColumnIds)
|
|
229
230
|
.filter(Boolean);
|
|
230
231
|
const changedAt = Date.now();
|
|
231
|
-
this.
|
|
232
|
+
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
232
233
|
relevantColumns.forEach((column) => {
|
|
233
234
|
const cellDataChangeInfoStub = {
|
|
234
235
|
changedAt,
|
|
@@ -236,8 +237,8 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
236
237
|
column,
|
|
237
238
|
rowData: rowNode.data,
|
|
238
239
|
oldValue: null,
|
|
239
|
-
newValue: this.
|
|
240
|
-
primaryKeyValue: this.
|
|
240
|
+
newValue: this.getGridApi().getRawValueFromRowNode(rowNode, column.columnId),
|
|
241
|
+
primaryKeyValue: this.getGridApi().getPrimaryKeyValueForRowNode(rowNode),
|
|
241
242
|
};
|
|
242
243
|
cellDataChangeInfos.push(cellDataChangeInfoStub);
|
|
243
244
|
});
|
|
@@ -6,21 +6,27 @@ import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
|
6
6
|
import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
|
+
import { GridApi as AgGridApi } from '@ag-grid-community/core';
|
|
9
10
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
11
|
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, CommentOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ColumnScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions, ColumnMenuOptions, ContextMenuOptions } from '../../types';
|
|
11
12
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
13
|
+
import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
|
|
14
|
+
import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
|
|
15
|
+
import { IAdaptableStore } from '../../Redux/Store/Interface/IAdaptableStore';
|
|
12
16
|
export declare abstract class ApiBase {
|
|
13
|
-
protected
|
|
17
|
+
protected _adaptable: IAdaptable;
|
|
14
18
|
/**
|
|
15
19
|
* Constructor for all the api classes which simply takes and assigns an instance of Adaptable
|
|
16
|
-
* @param
|
|
20
|
+
* @param _adaptable the core IAdaptable object
|
|
17
21
|
*/
|
|
18
|
-
constructor(
|
|
22
|
+
constructor(_adaptable: IAdaptable);
|
|
23
|
+
protected getAdatableLogger(): AdaptableLogger;
|
|
19
24
|
protected logInfo(message: string, ...optionalParams: any[]): void;
|
|
20
25
|
protected logSuccess(message: string, ...optionalParams: any[]): void;
|
|
21
26
|
protected logWarn(message: string, ...optionalParams: any[]): void;
|
|
22
27
|
protected logError(message: string, ...optionalParams: any[]): void;
|
|
23
28
|
protected getAdaptableVariant(): AdaptableVariant;
|
|
29
|
+
protected isAdapTableReady(): boolean;
|
|
24
30
|
/**
|
|
25
31
|
* Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
|
|
26
32
|
*
|
|
@@ -46,6 +52,7 @@ export declare abstract class ApiBase {
|
|
|
46
52
|
* This is a simple *getState()* call
|
|
47
53
|
*/
|
|
48
54
|
getAdaptableState(): AdaptableState;
|
|
55
|
+
protected getAdaptableSore(): IAdaptableStore;
|
|
49
56
|
protected addUidToAdaptableObject(adaptableObject: AdaptableObject): void;
|
|
50
57
|
protected getModuleInfoByModuleId(module: AdaptableModule): ModuleInfo;
|
|
51
58
|
protected showModulePopup(module: AdaptableModule, moduleParams?: ModuleParams): void;
|
|
@@ -85,6 +92,8 @@ export declare abstract class ApiBase {
|
|
|
85
92
|
protected getSettingsPanelOptions(): SettingsPanelOptions;
|
|
86
93
|
protected getFdc3Options(): Fdc3Options;
|
|
87
94
|
protected getAdaptableApi(): AdaptableApi;
|
|
95
|
+
protected getAgGridApi(): AgGridApi;
|
|
96
|
+
protected getAdaptableInternalApi(): AdaptableInternalApi;
|
|
88
97
|
protected getActionColumnApi(): ActionColumnApi;
|
|
89
98
|
protected getActionRowApi(): ActionRowApi;
|
|
90
99
|
protected getApplicationApi(): ApplicationApi;
|
|
@@ -8,25 +8,31 @@ const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
|
8
8
|
class ApiBase {
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for all the api classes which simply takes and assigns an instance of Adaptable
|
|
11
|
-
* @param
|
|
11
|
+
* @param _adaptable the core IAdaptable object
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
14
|
-
this.
|
|
13
|
+
constructor(_adaptable) {
|
|
14
|
+
this._adaptable = _adaptable;
|
|
15
|
+
}
|
|
16
|
+
getAdatableLogger() {
|
|
17
|
+
return this._adaptable.logger;
|
|
15
18
|
}
|
|
16
19
|
logInfo(message, ...optionalParams) {
|
|
17
|
-
this.
|
|
20
|
+
this._adaptable.logger.info(message, ...optionalParams);
|
|
18
21
|
}
|
|
19
22
|
logSuccess(message, ...optionalParams) {
|
|
20
|
-
this.
|
|
23
|
+
this._adaptable.logger.success(message, ...optionalParams);
|
|
21
24
|
}
|
|
22
25
|
logWarn(message, ...optionalParams) {
|
|
23
|
-
this.
|
|
26
|
+
this._adaptable.logger.warn(message, ...optionalParams);
|
|
24
27
|
}
|
|
25
28
|
logError(message, ...optionalParams) {
|
|
26
|
-
this.
|
|
29
|
+
this._adaptable.logger.error(message, ...optionalParams);
|
|
27
30
|
}
|
|
28
31
|
getAdaptableVariant() {
|
|
29
|
-
return this.
|
|
32
|
+
return this._adaptable.variant;
|
|
33
|
+
}
|
|
34
|
+
isAdapTableReady() {
|
|
35
|
+
return this._adaptable.isReady;
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
|
|
@@ -55,19 +61,19 @@ class ApiBase {
|
|
|
55
61
|
return objectList;
|
|
56
62
|
}
|
|
57
63
|
const associatedLayout = (config === null || config === void 0 ? void 0 : config.associatedWithLayout)
|
|
58
|
-
? this.
|
|
64
|
+
? this._adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
|
|
59
65
|
: this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
60
|
-
return objectList.filter((objectItem) => this.
|
|
66
|
+
return objectList.filter((objectItem) => this._adaptable.api.layoutApi.internalApi.isObjectAvailableInLayout(objectItem, module, associatedLayout));
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
63
69
|
* Base api Helper method that dispatches a *Redux Action* to the Store
|
|
64
70
|
* @param action the Redux Action to be dispatched
|
|
65
71
|
*/
|
|
66
72
|
dispatchAction(action) {
|
|
67
|
-
if (this.
|
|
73
|
+
if (this._adaptable.isDestroyed) {
|
|
68
74
|
return;
|
|
69
75
|
}
|
|
70
|
-
this.
|
|
76
|
+
this._adaptable.adaptableStore.TheStore.dispatch(action);
|
|
71
77
|
}
|
|
72
78
|
/**
|
|
73
79
|
* Returns the entire State from the Store
|
|
@@ -75,7 +81,10 @@ class ApiBase {
|
|
|
75
81
|
* This is a simple *getState()* call
|
|
76
82
|
*/
|
|
77
83
|
getAdaptableState() {
|
|
78
|
-
return this.
|
|
84
|
+
return this.getAdaptableSore().TheStore.getState();
|
|
85
|
+
}
|
|
86
|
+
getAdaptableSore() {
|
|
87
|
+
return this._adaptable.adaptableStore;
|
|
79
88
|
}
|
|
80
89
|
// Add the Uuid to the object if not present;
|
|
81
90
|
// It's generally done in Redux also but no harm checking in Api also in case we missed it.
|
|
@@ -85,16 +94,16 @@ class ApiBase {
|
|
|
85
94
|
}
|
|
86
95
|
}
|
|
87
96
|
getModuleInfoByModuleId(module) {
|
|
88
|
-
return this.
|
|
97
|
+
return this._adaptable.ModuleService.getModuleInfoByModule(module);
|
|
89
98
|
}
|
|
90
99
|
showModulePopup(module, moduleParams) {
|
|
91
100
|
let moduleInfo = this.getModuleInfoByModuleId(module);
|
|
92
101
|
if (moduleInfo) {
|
|
93
|
-
this.
|
|
102
|
+
this._adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
|
|
94
103
|
}
|
|
95
104
|
}
|
|
96
105
|
getOptions() {
|
|
97
|
-
return this.
|
|
106
|
+
return this._adaptable.adaptableOptions;
|
|
98
107
|
}
|
|
99
108
|
getActionColumnOptions() {
|
|
100
109
|
return this.getOptions().actionColumnOptions;
|
|
@@ -181,25 +190,31 @@ class ApiBase {
|
|
|
181
190
|
return this.getOptions().toolPanelOptions;
|
|
182
191
|
}
|
|
183
192
|
getChartingOptions() {
|
|
184
|
-
return this.
|
|
193
|
+
return this.getOptions().chartingOptions;
|
|
185
194
|
}
|
|
186
195
|
getDataChangeHistoryOptions() {
|
|
187
|
-
return this.
|
|
196
|
+
return this.getOptions().dataChangeHistoryOptions;
|
|
188
197
|
}
|
|
189
198
|
getEntitlementOptions() {
|
|
190
|
-
return this.
|
|
199
|
+
return this.getOptions().entitlementOptions;
|
|
191
200
|
}
|
|
192
201
|
getFlashingCellOptions() {
|
|
193
|
-
return this.
|
|
202
|
+
return this.getOptions().flashingCellOptions;
|
|
194
203
|
}
|
|
195
204
|
getSettingsPanelOptions() {
|
|
196
|
-
return this.
|
|
205
|
+
return this.getOptions().settingsPanelOptions;
|
|
197
206
|
}
|
|
198
207
|
getFdc3Options() {
|
|
199
|
-
return this.
|
|
208
|
+
return this.getOptions().fdc3Options;
|
|
200
209
|
}
|
|
201
210
|
getAdaptableApi() {
|
|
202
|
-
return this.
|
|
211
|
+
return this._adaptable.api;
|
|
212
|
+
}
|
|
213
|
+
getAgGridApi() {
|
|
214
|
+
return this.getAdaptableApi().agGridApi;
|
|
215
|
+
}
|
|
216
|
+
getAdaptableInternalApi() {
|
|
217
|
+
return this.getAdaptableApi().internalApi;
|
|
203
218
|
}
|
|
204
219
|
getActionColumnApi() {
|
|
205
220
|
return this.getAdaptableApi().actionColumnApi;
|
|
@@ -334,7 +349,7 @@ class ApiBase {
|
|
|
334
349
|
return this.getAdaptableApi().fdc3Api;
|
|
335
350
|
}
|
|
336
351
|
destroy() {
|
|
337
|
-
delete this.
|
|
352
|
+
delete this._adaptable;
|
|
338
353
|
}
|
|
339
354
|
}
|
|
340
355
|
exports.ApiBase = ApiBase;
|
|
@@ -5,7 +5,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
5
5
|
import { CalculatedColumnInternalApi } from '../Internal/CalculatedColumnInternalApi';
|
|
6
6
|
export declare class CalculatedColumnApiImpl extends ApiBase implements CalculatedColumnApi {
|
|
7
7
|
internalApi: CalculatedColumnInternalApi;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(_adaptable: IAdaptable);
|
|
9
9
|
getCalculatedColumnState(): CalculatedColumnState;
|
|
10
10
|
getCalculatedColumns(): CalculatedColumn[];
|
|
11
11
|
getCalculatedColumnById(id: CalculatedColumn['Uuid']): CalculatedColumn;
|
|
@@ -7,9 +7,9 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const CalculatedColumnInternalApi_1 = require("../Internal/CalculatedColumnInternalApi");
|
|
9
9
|
class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
-
constructor(
|
|
11
|
-
super(
|
|
12
|
-
this.internalApi = new CalculatedColumnInternalApi_1.CalculatedColumnInternalApi(
|
|
10
|
+
constructor(_adaptable) {
|
|
11
|
+
super(_adaptable);
|
|
12
|
+
this.internalApi = new CalculatedColumnInternalApi_1.CalculatedColumnInternalApi(_adaptable);
|
|
13
13
|
}
|
|
14
14
|
getCalculatedColumnState() {
|
|
15
15
|
return this.getAdaptableState().CalculatedColumn;
|
|
@@ -45,7 +45,7 @@ class CalendarApiImpl extends ApiBase_1.ApiBase {
|
|
|
45
45
|
const holidays = this.getCalendarOptions().holidays;
|
|
46
46
|
if (holidays) {
|
|
47
47
|
if (typeof holidays === 'function') {
|
|
48
|
-
return holidays(this.
|
|
48
|
+
return holidays(this.getAdaptableInternalApi().buildBaseContext());
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
return holidays;
|
|
@@ -5,7 +5,7 @@ import { ChartContainer, ChartDefinition } from '../../types';
|
|
|
5
5
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
6
|
import { ExternalChartDefinition } from '../../PredefinedConfig/ChartingState';
|
|
7
7
|
export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(_adaptable: IAdaptable);
|
|
9
9
|
isChartingEnabled(): boolean;
|
|
10
10
|
getCurrentChartModels(): ChartModel[];
|
|
11
11
|
getChartRef(chartId: string): ChartRef;
|
|
@@ -9,18 +9,18 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
|
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
10
10
|
const ChartingInternalApi_1 = require("../Internal/ChartingInternalApi");
|
|
11
11
|
class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
-
constructor(
|
|
13
|
-
super(
|
|
14
|
-
this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(
|
|
12
|
+
constructor(_adaptable) {
|
|
13
|
+
super(_adaptable);
|
|
14
|
+
this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(_adaptable);
|
|
15
15
|
}
|
|
16
16
|
isChartingEnabled() {
|
|
17
|
-
return this.
|
|
17
|
+
return this._adaptable.canGenerateCharts();
|
|
18
18
|
}
|
|
19
19
|
getCurrentChartModels() {
|
|
20
|
-
return this.
|
|
20
|
+
return this._adaptable.getChartModels();
|
|
21
21
|
}
|
|
22
22
|
getChartRef(chartId) {
|
|
23
|
-
return this.
|
|
23
|
+
return this._adaptable.getChartRef(chartId);
|
|
24
24
|
}
|
|
25
25
|
saveCurrentCharts() {
|
|
26
26
|
const currentCharts = this.getCurrentChartModels();
|
|
@@ -49,14 +49,14 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
showPersistedCharts() {
|
|
52
|
-
return this.
|
|
52
|
+
return this._adaptable.showCharts(this.getChartDefinitions());
|
|
53
53
|
}
|
|
54
54
|
showChartDefinition(chartDefiniton, container) {
|
|
55
55
|
let containerElement = container;
|
|
56
56
|
if (typeof containerElement === 'string') {
|
|
57
57
|
containerElement = this.internalApi.getContainerElemetnByName(containerElement);
|
|
58
58
|
}
|
|
59
|
-
return this.
|
|
59
|
+
return this._adaptable.showChart(chartDefiniton, containerElement);
|
|
60
60
|
}
|
|
61
61
|
showChartDefinitionOnce(chartDefinition, container) {
|
|
62
62
|
var _a;
|
|
@@ -77,7 +77,7 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
77
77
|
this.updateAgChart(editedChartDefinition);
|
|
78
78
|
}
|
|
79
79
|
updateAgChart(chartDefinition) {
|
|
80
|
-
this.
|
|
80
|
+
this._adaptable.updateChart(chartDefinition);
|
|
81
81
|
}
|
|
82
82
|
addChartDefinition(chart) {
|
|
83
83
|
this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
|
|
@@ -8,7 +8,7 @@ export declare function isAutoRowGroupColumn(columnId: string): boolean;
|
|
|
8
8
|
export declare function isAutoPivotColumn(columnId: string): boolean;
|
|
9
9
|
export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
10
10
|
internalApi: ColumnInternalApi;
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(_adaptable: IAdaptable);
|
|
12
12
|
getColumns(): AdaptableColumn[];
|
|
13
13
|
getStandardColumns(): AdaptableColumn[];
|
|
14
14
|
getNonSpecialColumns(): AdaptableColumn[];
|