@adaptabletools/adaptable-cjs 19.1.0 → 19.1.2-canary.0
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/AdaptableInterfaces/IAdaptable.d.ts +2 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +3 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +2 -2
- package/src/AdaptableOptions/NoteOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +21 -11
- package/src/Api/Events/GridDataChanged.d.ts +3 -0
- package/src/Api/GridApi.d.ts +8 -3
- 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 +5 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +7 -1
- 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 +108 -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/CommentsInternalApi.d.ts +1 -0
- package/src/Api/Internal/CommentsInternalApi.js +4 -0
- 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/NoteInternalApi.d.ts +1 -0
- package/src/Api/Internal/NoteInternalApi.js +4 -0
- 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/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +3 -0
- 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/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +1 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Note/NotePopup.js +1 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -5
- package/src/agGrid/AdaptableAgGrid.js +47 -26
- package/src/agGrid/AgGridAdapter.js +3 -3
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/agGrid/defaultAdaptableOptions.js +100 -96
- 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.d.ts +32 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +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.0",
|
|
3
|
+
"version": "19.1.2-canary.0",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChartModel, ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType, StatusPanelDef } from '@ag-grid-community/core';
|
|
3
|
-
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
+
import { AdaptableApi, DestroyConfig } from '../Api/AdaptableApi';
|
|
4
4
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
5
5
|
import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
|
|
6
6
|
import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
|
|
@@ -262,10 +262,7 @@ export interface IAdaptable {
|
|
|
262
262
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
263
263
|
getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number | undefined;
|
|
264
264
|
getAgGridRegisteredModules(): Module[];
|
|
265
|
-
destroy(config?:
|
|
266
|
-
unmount: boolean;
|
|
267
|
-
destroyApi?: boolean;
|
|
268
|
-
}): void;
|
|
265
|
+
destroy(config?: DestroyConfig): void;
|
|
269
266
|
setLayout(layout?: Layout): void;
|
|
270
267
|
canExportToExcel(): boolean;
|
|
271
268
|
exportToExcel(reportData: ReportData, fileName: string): void;
|
|
@@ -68,6 +68,9 @@ export interface AlertOptions<TData = any> {
|
|
|
68
68
|
*/
|
|
69
69
|
showMissingPrimaryKeyAlert?: boolean;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Cell Change that will trigger an Alert: can be 'rawValue' or 'formattedValue'
|
|
73
|
+
*/
|
|
71
74
|
export type DataChangeDetectionPolicy = 'rawValue' | 'formattedValue';
|
|
72
75
|
/**
|
|
73
76
|
* Handles a Form Button Action
|
|
@@ -91,4 +91,4 @@ export interface UserColumnMenuItem {
|
|
|
91
91
|
/**
|
|
92
92
|
* Defines AG Grid Column Menu Items
|
|
93
93
|
*/
|
|
94
|
-
export type AgGridColumnMenuItemType = 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
|
|
94
|
+
export type AgGridColumnMenuItemType = 'sortAscending' | 'sortDescending' | 'sortUnSort' | 'columnFilter' | 'columnChooser' | 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
|
|
@@ -17,11 +17,11 @@ export interface CommentOptions<TData = any> {
|
|
|
17
17
|
*/
|
|
18
18
|
persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;
|
|
19
19
|
/**
|
|
20
|
-
* Format string for
|
|
20
|
+
* Format string for Dates in Comments Popup
|
|
21
21
|
*
|
|
22
22
|
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
|
|
23
23
|
*/
|
|
24
|
-
dateFormat?: string;
|
|
24
|
+
dateFormat?: string | (() => string);
|
|
25
25
|
/**
|
|
26
26
|
* Show the Close Button in the Comments Popup
|
|
27
27
|
* @defaultValue true
|
|
@@ -8,11 +8,11 @@ export interface NoteOptions<TData = any> {
|
|
|
8
8
|
*/
|
|
9
9
|
isCellNotable?: (context: NotableCellContext) => boolean;
|
|
10
10
|
/**
|
|
11
|
-
* Format string for
|
|
11
|
+
* Format string for Dates in Notes Popup
|
|
12
12
|
*
|
|
13
13
|
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
|
|
14
14
|
*/
|
|
15
|
-
dateFormat?: string;
|
|
15
|
+
dateFormat?: string | (() => string);
|
|
16
16
|
/**
|
|
17
17
|
* Show the Close Button in the Notes Popup
|
|
18
18
|
*
|
|
@@ -258,23 +258,33 @@ export interface AdaptableApi {
|
|
|
258
258
|
*/
|
|
259
259
|
gridFilterApi: GridFilterApi;
|
|
260
260
|
/**
|
|
261
|
-
* Cleanup method -
|
|
262
|
-
*
|
|
261
|
+
* Cleanup method - call only for vanilla JavaScript components, as framework components handle cleanup on destroy/unmount. By default, it unmounts the Adaptable component and destroys the AG Grid instance.
|
|
262
|
+
* @param config - optional configuration object
|
|
263
263
|
*/
|
|
264
|
-
destroy: (config?:
|
|
265
|
-
unmount: boolean;
|
|
266
|
-
destroyApi?: boolean;
|
|
267
|
-
}) => void;
|
|
264
|
+
destroy: (config?: DestroyConfig) => void;
|
|
268
265
|
/**
|
|
269
266
|
* Whether the Adaptable instance has been destroyed
|
|
270
267
|
*/
|
|
271
268
|
isDestroyed: () => boolean;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Adaptable Destroy Configuration
|
|
272
|
+
*/
|
|
273
|
+
export interface DestroyConfig {
|
|
274
|
+
/**
|
|
275
|
+
* Unmount the Adaptable component (Dashboard)
|
|
276
|
+
*
|
|
277
|
+
* @defaultValue true
|
|
278
|
+
*/
|
|
279
|
+
unmount: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated use `destroyAgGrid` instead
|
|
282
|
+
*/
|
|
283
|
+
destroyApi?: boolean;
|
|
272
284
|
/**
|
|
273
|
-
*
|
|
285
|
+
* Destroy the AgGrid instance
|
|
274
286
|
*
|
|
287
|
+
* @defaultValue true
|
|
275
288
|
*/
|
|
276
|
-
|
|
277
|
-
unmount: boolean;
|
|
278
|
-
destroyApi?: boolean;
|
|
279
|
-
}) => void;
|
|
289
|
+
destroyAgGrid: boolean;
|
|
280
290
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
/**
|
|
4
|
+
* What row action triggered the Grid change: 'Add', 'Update', 'Delete' or 'Load'
|
|
5
|
+
*/
|
|
3
6
|
export type GridDataChangeTrigger = 'Add' | 'Update' | 'Delete' | 'Load';
|
|
4
7
|
/**
|
|
5
8
|
* EventInfo returned by GridDataChanged event
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -456,7 +456,12 @@ 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
|
+
/**
|
|
461
|
+
* Refreshes all Cells in the Grid
|
|
462
|
+
* @param forceUpdate forces AG Grid change detection
|
|
463
|
+
*/
|
|
464
|
+
refreshAllCells(forceUpdate?: boolean): void;
|
|
460
465
|
/**
|
|
461
466
|
* Refreshes a single Grid Cell
|
|
462
467
|
* @param gridCell GridCell to refresh
|
|
@@ -468,7 +473,7 @@ export interface GridApi {
|
|
|
468
473
|
*/
|
|
469
474
|
refreshGridCells(gridCells: GridCell[]): void;
|
|
470
475
|
/**
|
|
471
|
-
* Forces a re-render of
|
|
476
|
+
* Forces a re-render of Row with given Primary Key value
|
|
472
477
|
* @param primaryKey row primary key
|
|
473
478
|
*/
|
|
474
479
|
refreshRowByPrimaryKey(primaryKey: any): void;
|
|
@@ -503,7 +508,7 @@ export interface GridApi {
|
|
|
503
508
|
*/
|
|
504
509
|
getVisibleColumnCount(): number;
|
|
505
510
|
/**
|
|
506
|
-
*
|
|
511
|
+
* @deprecated use `AdaptableApi.destroy()` instead
|
|
507
512
|
*/
|
|
508
513
|
destroy(): void;
|
|
509
514
|
/**
|
|
@@ -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 : [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
|
|
3
|
-
import { AdaptableApi, ColumnMenuApi, ContextMenuApi, DataImportApi, NamedQueryApi, OptionsApi, SettingsPanelApi } from '../../types';
|
|
3
|
+
import { AdaptableApi, ColumnMenuApi, ContextMenuApi, DataImportApi, DestroyConfig, NamedQueryApi, OptionsApi, SettingsPanelApi } from '../../types';
|
|
4
4
|
import { AlertApi } from '../AlertApi';
|
|
5
5
|
import { BulkUpdateApi } from '../BulkUpdateApi';
|
|
6
6
|
import { CalendarApi } from '../CalendarApi';
|
|
@@ -104,16 +104,15 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
104
104
|
/**
|
|
105
105
|
* This is only meant to be called by the Adaptable instance.
|
|
106
106
|
*/
|
|
107
|
-
|
|
108
|
-
destroy(config?:
|
|
109
|
-
unmount: boolean;
|
|
110
|
-
destroyApi?: boolean;
|
|
111
|
-
}): void;
|
|
107
|
+
_internalDestroySelf(): void;
|
|
108
|
+
destroy(config?: DestroyConfig): void;
|
|
112
109
|
isDestroyed(): boolean;
|
|
110
|
+
logConsoleMessage(message: string, ...optionalParams: any[]): void;
|
|
113
111
|
logInfo(message: string, ...optionalParams: any[]): void;
|
|
114
112
|
logSuccess(message: string, ...optionalParams: any[]): void;
|
|
115
113
|
logWarn(message: string, ...optionalParams: any[]): void;
|
|
116
114
|
logError(message: string, ...optionalParams: any[]): void;
|
|
115
|
+
consoleLog(message: string, ...optionalParams: any[]): void;
|
|
117
116
|
consoleError(message: string, ...optionalParams: any[]): void;
|
|
118
117
|
consoleWarn(message: string, ...optionalParams: any[]): void;
|
|
119
118
|
}
|
|
@@ -116,7 +116,7 @@ class AdaptableApiImpl {
|
|
|
116
116
|
/**
|
|
117
117
|
* This is only meant to be called by the Adaptable instance.
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
_internalDestroySelf() {
|
|
120
120
|
if (this.destroyed) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
@@ -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;
|