@adaptabletools/adaptable 18.0.0-canary.0 → 18.0.0-canary.10
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/agGrid.d.ts +4 -21
- package/agGrid.js +9 -26
- package/base.css +11 -3
- package/base.css.map +1 -1
- package/index.css +88 -70
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
- package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +1 -5
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +18 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +4 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.js +7 -1
- package/src/Api/Implementation/ConfigApiImpl.js +13 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
- package/src/Api/Implementation/GridApiImpl.js +33 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +15 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
- package/src/Api/Implementation/NotesApiImpl.js +9 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
- package/src/Api/Implementation/OptionsApiImpl.js +12 -2
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
- package/src/Api/Internal/ActionRowInternalApi.js +106 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +10 -8
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
- package/src/Api/Internal/GridFilterInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.d.ts +21 -3
- package/src/Api/Internal/GridInternalApi.js +126 -7
- package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
- package/src/Api/Internal/NotesInternalApi.js +14 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +11 -0
- package/src/Api/OptionsApi.d.ts +5 -1
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +1 -0
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +11 -10
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +33 -50
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
- package/src/Strategy/AdaptableModuleBase.js +4 -7
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +2 -55
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +5 -25
- package/src/Strategy/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +50 -21
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -64
- package/src/Strategy/CommentsModule.d.ts +1 -0
- package/src/Strategy/CommentsModule.js +5 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +1 -8
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +2 -15
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +0 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +0 -30
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +8 -3
- package/src/Strategy/LayoutModule.js +108 -53
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/NotesModule.js +3 -4
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +0 -1
- package/src/Strategy/StyledColumnModule.js +0 -21
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +1 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/ObjectFactory.js +6 -6
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
- package/src/Utilities/Services/CellPopupService.js +0 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +19 -7
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -1
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/SummaryService.d.ts +19 -0
- package/src/Utilities/Services/SummaryService.js +29 -0
- package/src/View/AdaptableView.js +1 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +46 -8
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +194 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Notes/NotesPopup.js +9 -11
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
- package/src/agGrid/AdaptableAgGrid.js +3936 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +62 -0
- package/src/agGrid/AgGridAdapter.js +577 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +824 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +271 -0
- package/src/agGrid/AgGridOptionsService.d.ts +12 -0
- package/src/agGrid/AgGridOptionsService.js +54 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/components/Textarea/index.d.ts +9 -0
- package/src/components/Textarea/index.js +50 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +74 -11
- package/src/metamodel/adaptable.metamodel.js +157 -34
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- package/src/parser/src/types.d.ts +5 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { ActionColumnRenderer, ReactActionColumnRenderer } from '../../agGrid/ActionColumnRenderer';
|
|
3
|
+
import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
|
|
2
4
|
export class ActionColumnApiImpl extends ApiBase {
|
|
3
5
|
constructor(adaptable) {
|
|
4
6
|
super(adaptable);
|
|
@@ -7,4 +9,35 @@ export class ActionColumnApiImpl extends ApiBase {
|
|
|
7
9
|
var _a;
|
|
8
10
|
return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
9
11
|
}
|
|
12
|
+
getColDefsForActionColumns() {
|
|
13
|
+
const defaultActionColumnSettings = {
|
|
14
|
+
resizable: true,
|
|
15
|
+
suppressMenu: false,
|
|
16
|
+
suppressMovable: false,
|
|
17
|
+
};
|
|
18
|
+
return this.getActionColumnApi()
|
|
19
|
+
.getActionColumns()
|
|
20
|
+
.map((actionColumn) => {
|
|
21
|
+
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
22
|
+
const newColDef = {
|
|
23
|
+
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
24
|
+
colId: actionColumn.columnId,
|
|
25
|
+
hide: false,
|
|
26
|
+
editable: false,
|
|
27
|
+
width: actionColumnSettings.width,
|
|
28
|
+
resizable: actionColumnSettings.resizable,
|
|
29
|
+
suppressMenu: actionColumnSettings.suppressMenu,
|
|
30
|
+
suppressMovable: actionColumnSettings.suppressMovable,
|
|
31
|
+
filter: false,
|
|
32
|
+
sortable: false,
|
|
33
|
+
enableRowGroup: false,
|
|
34
|
+
cellRenderer: this.getAdaptableApi().internalApi.getAdaptableInstance().variant === 'react'
|
|
35
|
+
? ReactActionColumnRenderer
|
|
36
|
+
: ActionColumnRenderer,
|
|
37
|
+
type: [AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
38
|
+
};
|
|
39
|
+
this.getAdaptableApi().logInfo('Setting up Action Column: ' + actionColumn.columnId);
|
|
40
|
+
return newColDef;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
10
43
|
}
|
|
@@ -98,6 +98,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
98
98
|
commentApi: CommentApi;
|
|
99
99
|
private destroyed;
|
|
100
100
|
constructor(adaptable: IAdaptable);
|
|
101
|
+
get agGridApi(): import("@ag-grid-community/core/dist/esm/es6/gridApi").GridApi<any>;
|
|
101
102
|
/**
|
|
102
103
|
* This is only meant to be called by the Adaptable instance.
|
|
103
104
|
*/
|
|
@@ -103,6 +103,9 @@ export class AdaptableApiImpl {
|
|
|
103
103
|
// adaptable internal api
|
|
104
104
|
this.internalApi = new AdaptableInternalApi(adaptable);
|
|
105
105
|
}
|
|
106
|
+
get agGridApi() {
|
|
107
|
+
return this.adaptable.agGridAdapter.getAgGridApi();
|
|
108
|
+
}
|
|
106
109
|
/**
|
|
107
110
|
* This is only meant to be called by the Adaptable instance.
|
|
108
111
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action } from 'redux';
|
|
2
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
|
+
import { AdaptableVariant, IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
3
3
|
import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
|
|
4
4
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -20,6 +20,7 @@ export declare abstract class ApiBase {
|
|
|
20
20
|
protected logSuccess(message: string, ...optionalParams: any[]): void;
|
|
21
21
|
protected logWarn(message: string, ...optionalParams: any[]): void;
|
|
22
22
|
protected logError(message: string, ...optionalParams: any[]): void;
|
|
23
|
+
protected getAdaptableVariant(): AdaptableVariant;
|
|
23
24
|
/**
|
|
24
25
|
* Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
|
|
25
26
|
*
|
|
@@ -21,6 +21,9 @@ export class ApiBase {
|
|
|
21
21
|
logError(message, ...optionalParams) {
|
|
22
22
|
this.adaptable.logger.error(message, ...optionalParams);
|
|
23
23
|
}
|
|
24
|
+
getAdaptableVariant() {
|
|
25
|
+
return this.adaptable.variant;
|
|
26
|
+
}
|
|
24
27
|
/**
|
|
25
28
|
* Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
|
|
26
29
|
*
|
|
@@ -99,7 +102,7 @@ export class ApiBase {
|
|
|
99
102
|
return this.getOptions().columnOptions;
|
|
100
103
|
}
|
|
101
104
|
getNotesOptions() {
|
|
102
|
-
return this.getOptions().
|
|
105
|
+
return this.getOptions().noteOptions;
|
|
103
106
|
}
|
|
104
107
|
getCustomSortOptions() {
|
|
105
108
|
return this.getOptions().customSortOptions;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
3
3
|
import * as BulkUpdateRedux from '../../Redux/ActionsReducers/BulkUpdateRedux';
|
|
4
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
5
4
|
export class BulkUpdateApiImpl extends ApiBase {
|
|
6
5
|
getBulkUpdateValue() {
|
|
7
6
|
return this.getAdaptableState().System.BulkUpdateValue;
|
|
@@ -15,7 +14,4 @@ export class BulkUpdateApiImpl extends ApiBase {
|
|
|
15
14
|
applyBulkUpdate(cellUpdateRequests) {
|
|
16
15
|
this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
|
|
17
16
|
}
|
|
18
|
-
setBulkUpdateValue(bulkUpdateValue) {
|
|
19
|
-
this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
|
|
20
|
-
}
|
|
21
17
|
}
|
|
@@ -2,7 +2,11 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
3
3
|
import { CommentThread, AdaptableComment } from '../../types';
|
|
4
4
|
import { CommentApi } from '../CommentApi';
|
|
5
|
+
import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
|
|
6
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
5
7
|
export declare class CommentsApiImpl extends ApiBase implements CommentApi {
|
|
8
|
+
internalApi: CommentsInternalApi;
|
|
9
|
+
constructor(adaptable: IAdaptable);
|
|
6
10
|
getComments(address: CellAddress): AdaptableComment[];
|
|
7
11
|
getCommentThread(address: CellAddress): CommentThread | undefined;
|
|
8
12
|
getCommentThreads(): CommentThread[];
|
|
@@ -2,7 +2,12 @@ import * as CommentRedux from '../../Redux/ActionsReducers/CommentsRedux';
|
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
3
|
import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
4
4
|
import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
|
|
5
|
+
import { CommentsInternalApi } from '../Internal/CommentsInternalApi';
|
|
5
6
|
export class CommentsApiImpl extends ApiBase {
|
|
7
|
+
constructor(adaptable) {
|
|
8
|
+
super(adaptable);
|
|
9
|
+
this.internalApi = new CommentsInternalApi(adaptable);
|
|
10
|
+
}
|
|
6
11
|
getComments(address) {
|
|
7
12
|
return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
|
|
8
13
|
}
|
|
@@ -10,7 +15,8 @@ export class CommentsApiImpl extends ApiBase {
|
|
|
10
15
|
return CommentRedux.GetCellCommentSelector(this.getAdaptableState().Comment, address);
|
|
11
16
|
}
|
|
12
17
|
getCommentThreads() {
|
|
13
|
-
|
|
18
|
+
var _a;
|
|
19
|
+
return (_a = this.getAdaptableState().Comment.CommentThreads) !== null && _a !== void 0 ? _a : [];
|
|
14
20
|
}
|
|
15
21
|
editComment(comment, address) {
|
|
16
22
|
this.dispatchAction(CommentRedux.CommentsEdit({ comment, cellAddress: address }));
|
|
@@ -117,7 +117,6 @@ export class ConfigApiImpl extends ApiBase {
|
|
|
117
117
|
setAdaptableStateKey(adaptableStateKey, config) {
|
|
118
118
|
return new Promise((resolve, reject) => {
|
|
119
119
|
this.adaptable.api.internalApi.executeWithProgressIndicator(`Initialising...`, () => {
|
|
120
|
-
this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
|
|
121
120
|
const flushCurrentState = !config || config.flushCurrentState !== false;
|
|
122
121
|
// make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
|
|
123
122
|
// the state to be persisted with a delay, which we dont want in this case
|
|
@@ -125,22 +124,31 @@ export class ConfigApiImpl extends ApiBase {
|
|
|
125
124
|
? this.adaptable.adaptableStore.saveStateNow(this.adaptable)
|
|
126
125
|
: Promise.resolve(true);
|
|
127
126
|
flushStatePromise.then(() => {
|
|
127
|
+
this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
|
|
128
128
|
let predefinedConfig = config === null || config === void 0 ? void 0 : config.predefinedConfig;
|
|
129
129
|
if (predefinedConfig) {
|
|
130
130
|
predefinedConfig = initPredefinedConfigWithUuids(predefinedConfig);
|
|
131
131
|
}
|
|
132
|
-
const promise = this.adaptable.adaptableStore.loadStore(
|
|
132
|
+
const promise = this.adaptable.adaptableStore.loadStore({
|
|
133
|
+
adaptable: this.adaptable,
|
|
134
|
+
adaptableStateKey,
|
|
135
|
+
predefinedConfig,
|
|
136
|
+
});
|
|
133
137
|
promise
|
|
134
138
|
.then(() => {
|
|
135
|
-
this.adaptable.
|
|
139
|
+
this.adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
140
|
+
this.adaptable.setLayout();
|
|
136
141
|
this.adaptable.api.userInterfaceApi.hideLoadingScreen();
|
|
137
142
|
})
|
|
138
143
|
.then(() => {
|
|
139
144
|
// resolve main(result) promise
|
|
140
145
|
resolve();
|
|
141
|
-
}, () => {
|
|
146
|
+
}, (error) => {
|
|
142
147
|
// reject main(result) promise
|
|
143
|
-
reject();
|
|
148
|
+
reject(error);
|
|
149
|
+
})
|
|
150
|
+
.catch((e) => {
|
|
151
|
+
this.logError('Error setting Adaptable State Key', e);
|
|
144
152
|
});
|
|
145
153
|
});
|
|
146
154
|
});
|
|
@@ -8,7 +8,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
|
8
8
|
import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
|
|
9
9
|
import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
|
|
10
10
|
import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
|
|
11
|
-
import {
|
|
11
|
+
import { IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
12
12
|
import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
@@ -18,6 +18,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
18
18
|
internalApi: GridInternalApi;
|
|
19
19
|
constructor(adaptable: IAdaptable);
|
|
20
20
|
getGridState(): GridState;
|
|
21
|
+
loadGridData(dataSource: any): void;
|
|
21
22
|
resetGridData(dataSource: any[]): void;
|
|
22
23
|
setInitialGridData(data: any): void;
|
|
23
24
|
getGridData(): any[];
|
|
@@ -40,7 +41,6 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
40
41
|
hideFilterForm(): void;
|
|
41
42
|
applyGridFiltering(): void;
|
|
42
43
|
clearGridFiltering(): void;
|
|
43
|
-
getAgGridInstance(): GridOptions;
|
|
44
44
|
getColumnSorts(): ColumnSort[];
|
|
45
45
|
getColumnSortForColumn(columnId: string): ColumnSort | undefined;
|
|
46
46
|
setAdaptableSorting(columnSorts: ColumnSort[]): void;
|
|
@@ -120,7 +120,6 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
120
120
|
isCellEditable(gridCell: GridCell): boolean;
|
|
121
121
|
isEveryCellEditable(gridCells: GridCell[]): boolean;
|
|
122
122
|
getRowCount(): number;
|
|
123
|
-
getVisibleRowCount(): number;
|
|
124
123
|
getRowsInViewport(): IRowNode[];
|
|
125
124
|
getColumnCount(): number;
|
|
126
125
|
getVisibleColumnCount(): number;
|
|
@@ -130,4 +129,6 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
130
129
|
getGridContainerElement(): HTMLElement | null;
|
|
131
130
|
openGridInfoSettingsPanel(): void;
|
|
132
131
|
getAgGridRowModelType(): RowModelType;
|
|
132
|
+
getVisibleRowCount(): number;
|
|
133
|
+
showTransposedView(transposedColumnId: string, hideTransposedColumn?: boolean): void;
|
|
133
134
|
}
|
|
@@ -4,6 +4,8 @@ import { SystemHighlightCellAdd, SystemHighlightCellDelete, SystemHighlightCellD
|
|
|
4
4
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
5
5
|
import { GridInternalApi } from '../Internal/GridInternalApi';
|
|
6
6
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
7
|
+
import { logDeprecation } from '../../Utilities/logDeprecation';
|
|
8
|
+
import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
|
|
7
9
|
export class GridApiImpl extends ApiBase {
|
|
8
10
|
constructor(adaptable) {
|
|
9
11
|
super(adaptable);
|
|
@@ -12,13 +14,18 @@ export class GridApiImpl extends ApiBase {
|
|
|
12
14
|
getGridState() {
|
|
13
15
|
return this.getAdaptableState().Grid;
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
loadGridData(dataSource) {
|
|
16
18
|
this.adaptable.setGridData(dataSource);
|
|
17
19
|
const allRowNodes = this.getAllRowNodes();
|
|
18
|
-
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, '
|
|
20
|
+
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Load');
|
|
21
|
+
}
|
|
22
|
+
resetGridData(dataSource) {
|
|
23
|
+
logDeprecation(this.adaptable.logger, 'GridApi', 'resetGridData', 'loadGridData');
|
|
24
|
+
this.loadGridData(dataSource);
|
|
19
25
|
}
|
|
20
26
|
setInitialGridData(data) {
|
|
21
|
-
this.adaptable.
|
|
27
|
+
logDeprecation(this.adaptable.logger, 'GridApi', 'setInitialGridData', 'loadGridData');
|
|
28
|
+
this.loadGridData(data);
|
|
22
29
|
}
|
|
23
30
|
getGridData() {
|
|
24
31
|
return this.adaptable.getGridData();
|
|
@@ -114,9 +121,6 @@ export class GridApiImpl extends ApiBase {
|
|
|
114
121
|
// slightly round the houses but we have to call ColumnFilterAPI as it does it properly
|
|
115
122
|
this.adaptable.api.columnFilterApi.clearColumnFilters();
|
|
116
123
|
}
|
|
117
|
-
getAgGridInstance() {
|
|
118
|
-
return this.adaptable.gridOptions;
|
|
119
|
-
}
|
|
120
124
|
getColumnSorts() {
|
|
121
125
|
return this.getAdaptableState().Grid.ColumnSorts;
|
|
122
126
|
}
|
|
@@ -271,7 +275,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
271
275
|
return this.adaptable.getFirstDisplayedRowNode();
|
|
272
276
|
}
|
|
273
277
|
getVisibleRowNodes(config) {
|
|
274
|
-
|
|
278
|
+
const rowNodes = [];
|
|
279
|
+
this.adaptable.forAllVisibleRowNodesDo((rowNode) => rowNodes.push(rowNode), config);
|
|
280
|
+
return rowNodes;
|
|
275
281
|
}
|
|
276
282
|
getAllRowNodes(config) {
|
|
277
283
|
return this.adaptable.getAllRowNodes(config);
|
|
@@ -330,10 +336,10 @@ export class GridApiImpl extends ApiBase {
|
|
|
330
336
|
this.adaptable.expandRowGroupsForValues(columnValues);
|
|
331
337
|
}
|
|
332
338
|
isGridPivotable() {
|
|
333
|
-
return this.
|
|
339
|
+
return !this.getAdaptableApi().internalApi.isGridInTreeMode();
|
|
334
340
|
}
|
|
335
341
|
isGridGroupable() {
|
|
336
|
-
return this.
|
|
342
|
+
return !this.getAdaptableApi().internalApi.isGridInTreeMode();
|
|
337
343
|
}
|
|
338
344
|
isGridSelectable() {
|
|
339
345
|
return this.adaptable.isGridSelectable();
|
|
@@ -349,7 +355,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
349
355
|
}
|
|
350
356
|
redrawGrid() {
|
|
351
357
|
this.adaptable.redrawBody();
|
|
352
|
-
this.adaptable.
|
|
358
|
+
this.adaptable.refreshHeader();
|
|
353
359
|
}
|
|
354
360
|
getGridCellsForRawValue(columnId, rawValue) {
|
|
355
361
|
const gridCells = this.adaptable.getGridCellsForColumn(columnId);
|
|
@@ -452,7 +458,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
452
458
|
}
|
|
453
459
|
refreshGroupRowNodes() {
|
|
454
460
|
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
455
|
-
this.
|
|
461
|
+
this.getAdaptableApi().agGridApi.refreshClientSideRowModel('group');
|
|
456
462
|
this.adaptable.updateRowGroupsExpandedState();
|
|
457
463
|
}
|
|
458
464
|
isCellEditable(gridCell) {
|
|
@@ -479,9 +485,6 @@ export class GridApiImpl extends ApiBase {
|
|
|
479
485
|
getRowCount() {
|
|
480
486
|
return this.adaptable.getRowCount();
|
|
481
487
|
}
|
|
482
|
-
getVisibleRowCount() {
|
|
483
|
-
return this.adaptable.getVisibleRowCount();
|
|
484
|
-
}
|
|
485
488
|
getRowsInViewport() {
|
|
486
489
|
return this.adaptable.getRowsInViewport();
|
|
487
490
|
}
|
|
@@ -509,4 +512,20 @@ export class GridApiImpl extends ApiBase {
|
|
|
509
512
|
getAgGridRowModelType() {
|
|
510
513
|
return this.adaptable.getAgGridRowModelType();
|
|
511
514
|
}
|
|
515
|
+
getVisibleRowCount() {
|
|
516
|
+
logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
517
|
+
return this.getRowCount();
|
|
518
|
+
}
|
|
519
|
+
showTransposedView(transposedColumnId, hideTransposedColumn) {
|
|
520
|
+
this.adaptable.api.internalApi.showPopupWindow({
|
|
521
|
+
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
522
|
+
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
523
|
+
title: 'Transposed View',
|
|
524
|
+
icon: 'grid',
|
|
525
|
+
popupProps: {
|
|
526
|
+
transposedColumnId,
|
|
527
|
+
hideTransposedColumn,
|
|
528
|
+
},
|
|
529
|
+
});
|
|
530
|
+
}
|
|
512
531
|
}
|
|
@@ -41,6 +41,8 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
41
41
|
removeColumnFromCurrentLayout(columnId: string): void;
|
|
42
42
|
removeColumnFromAllLayouts(columnId: string): void;
|
|
43
43
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
44
|
+
addColumnToLayout(columnId: string, layoutName: string): void;
|
|
45
|
+
addColumnToCurrentLayout(columnId: string): void;
|
|
44
46
|
getLayoutSupportedFeatures(): {
|
|
45
47
|
RowGroupedColumns: boolean;
|
|
46
48
|
AggregationColumns: boolean;
|
|
@@ -221,6 +221,21 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
+
addColumnToLayout(columnId, layoutName) {
|
|
225
|
+
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
226
|
+
if (column) {
|
|
227
|
+
const layout = this.getLayoutByName(layoutName);
|
|
228
|
+
if (layout) {
|
|
229
|
+
if (!layout.Columns.includes(columnId)) {
|
|
230
|
+
this.dispatchAction(LayoutRedux.LayoutAddColumn(layoutName, columnId));
|
|
231
|
+
this.getAdaptableApi().columnApi.showColumn(columnId);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
addColumnToCurrentLayout(columnId) {
|
|
237
|
+
this.addColumnToLayout(columnId, this.getCurrentLayoutName());
|
|
238
|
+
}
|
|
224
239
|
getLayoutSupportedFeatures() {
|
|
225
240
|
const layoutSupportedFeatures = {
|
|
226
241
|
RowGroupedColumns: true,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { NotesApi } from '../NotesApi';
|
|
3
3
|
import { AdaptableNote, AdaptableNotes, NotesState } from '../../PredefinedConfig/NotesState';
|
|
4
|
+
import { CellAddress } from '../../PredefinedConfig/CellAddress';
|
|
5
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
|
+
import { NotesInternalApi } from '../Internal/NotesInternalApi';
|
|
4
7
|
export declare class NotesApiImpl extends ApiBase implements NotesApi {
|
|
8
|
+
internalApi: NotesInternalApi;
|
|
9
|
+
constructor(adaptable: IAdaptable);
|
|
5
10
|
addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
|
|
6
11
|
editNote(note: AdaptableNote): void;
|
|
7
12
|
updateNoteText(noteStr: string, note: AdaptableNote): void;
|
|
8
13
|
deleteNote(note: AdaptableNote): void;
|
|
9
14
|
getNotesState(): NotesState;
|
|
10
15
|
getAllNotes(): AdaptableNotes;
|
|
11
|
-
getCellNotes(
|
|
12
|
-
PrimaryKeyValue: string | number;
|
|
13
|
-
ColumnId: string;
|
|
14
|
-
}): AdaptableNotes;
|
|
16
|
+
getCellNotes(address: CellAddress): AdaptableNote[];
|
|
15
17
|
getNoteByUuid(uuid: string): AdaptableNote | undefined;
|
|
16
18
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
|
|
3
|
+
import { NotesInternalApi } from '../Internal/NotesInternalApi';
|
|
3
4
|
export class NotesApiImpl extends ApiBase {
|
|
5
|
+
constructor(adaptable) {
|
|
6
|
+
super(adaptable);
|
|
7
|
+
this.internalApi = new NotesInternalApi(adaptable);
|
|
8
|
+
}
|
|
4
9
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
5
10
|
const note = {
|
|
6
|
-
|
|
11
|
+
Text: noteStr,
|
|
7
12
|
PrimaryKeyValue: primaryKeyValue,
|
|
8
13
|
ColumnId: columnId,
|
|
9
|
-
AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
10
|
-
Author: {
|
|
11
|
-
UserName: this.adaptable.api.optionsApi.getUserName(),
|
|
12
|
-
},
|
|
13
14
|
Timestamp: Date.now(),
|
|
14
15
|
};
|
|
15
16
|
this.dispatchAction(NotesRedux.NotesAdd(note));
|
|
@@ -19,7 +20,7 @@ export class NotesApiImpl extends ApiBase {
|
|
|
19
20
|
this.dispatchAction(NotesRedux.NotesEdit(note));
|
|
20
21
|
}
|
|
21
22
|
updateNoteText(noteStr, note) {
|
|
22
|
-
this.editNote(Object.assign(Object.assign({}, note), {
|
|
23
|
+
this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
|
|
23
24
|
}
|
|
24
25
|
deleteNote(note) {
|
|
25
26
|
this.dispatchAction(NotesRedux.NotesDelete(note));
|
|
@@ -30,8 +31,8 @@ export class NotesApiImpl extends ApiBase {
|
|
|
30
31
|
getAllNotes() {
|
|
31
32
|
return this.getNotesState().Notes;
|
|
32
33
|
}
|
|
33
|
-
getCellNotes(
|
|
34
|
-
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes,
|
|
34
|
+
getCellNotes(address) {
|
|
35
|
+
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
|
|
35
36
|
}
|
|
36
37
|
getNoteByUuid(uuid) {
|
|
37
38
|
return this.getAllNotes().find((note) => note.Uuid === uuid);
|
|
@@ -5,7 +5,7 @@ import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
|
|
|
5
5
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
6
6
|
import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
|
|
7
7
|
import { ColumnFilterOptions } from '../../AdaptableOptions/ColumnFilterOptions';
|
|
8
|
-
import { CommentsOptions } from '../../AdaptableOptions/
|
|
8
|
+
import { CommentsOptions } from '../../AdaptableOptions/CommentOptions';
|
|
9
9
|
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
10
10
|
getAdaptableId(): string;
|
|
11
11
|
getAdaptableStateKey(): string;
|
|
@@ -15,6 +15,7 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
|
15
15
|
getUserName(): string;
|
|
16
16
|
getAdaptableOptions(): AdaptableOptions;
|
|
17
17
|
getActionColumnOptions(): ActionColumnOptions;
|
|
18
|
+
getColumnTypes(): string[];
|
|
18
19
|
getActionRowOptions(): ActionRowOptions;
|
|
19
20
|
getCellSummaryOptions(): CellSummaryOptions;
|
|
20
21
|
getCalendarOptions(): CalendarOptions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { createBaseContext } from '../../Utilities/ObjectFactory';
|
|
2
3
|
export class OptionsApiImpl extends ApiBase {
|
|
3
4
|
getAdaptableId() {
|
|
4
5
|
return this.adaptable.adaptableOptions.adaptableId;
|
|
@@ -24,6 +25,15 @@ export class OptionsApiImpl extends ApiBase {
|
|
|
24
25
|
getActionColumnOptions() {
|
|
25
26
|
return this.getOptions().actionColumnOptions;
|
|
26
27
|
}
|
|
28
|
+
getColumnTypes() {
|
|
29
|
+
const columnTypes = this.getOptions().columnOptions.columnTypes;
|
|
30
|
+
if (typeof columnTypes === 'function') {
|
|
31
|
+
return columnTypes(createBaseContext(this.getAdaptableApi()));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return columnTypes;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
27
37
|
getActionRowOptions() {
|
|
28
38
|
return this.getOptions().actionRowOptions;
|
|
29
39
|
}
|
|
@@ -37,10 +47,10 @@ export class OptionsApiImpl extends ApiBase {
|
|
|
37
47
|
return this.getOptions().columnOptions;
|
|
38
48
|
}
|
|
39
49
|
getNotesOptions() {
|
|
40
|
-
return this.getOptions().
|
|
50
|
+
return this.getOptions().noteOptions;
|
|
41
51
|
}
|
|
42
52
|
getCommentsOptions() {
|
|
43
|
-
return this.getOptions().
|
|
53
|
+
return this.getOptions().commentOptions;
|
|
44
54
|
}
|
|
45
55
|
getCustomSortOptions() {
|
|
46
56
|
return this.getOptions().customSortOptions;
|
|
@@ -10,6 +10,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
|
|
|
10
10
|
scopeIsEmpty(scope: AdaptableScope): boolean;
|
|
11
11
|
scopeIsAll(scope: AdaptableScope): boolean;
|
|
12
12
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
13
|
+
scopeHasColumnType(scope: AdaptableScope): boolean;
|
|
13
14
|
scopeHasOnlyBooleanDataType(scope: AdaptableScope): boolean;
|
|
14
15
|
scopeHasColumns(scope: AdaptableScope): boolean;
|
|
15
16
|
isSingleColumnScope(scope: AdaptableScope): boolean;
|
|
@@ -21,6 +22,7 @@ export declare class ScopeApiImpl extends ApiBase implements ScopeApi {
|
|
|
21
22
|
isPrimaryKeyColumnInScopeColumns(scope: AdaptableScope): boolean;
|
|
22
23
|
getScopeToString(scope: AdaptableScope): string;
|
|
23
24
|
getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
|
|
25
|
+
getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
|
|
24
26
|
getDataTypesInScope(scope: AdaptableScope): ScopeDataType[] | undefined;
|
|
25
27
|
isColumnInNumericScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
|
|
26
28
|
isColumnInStringsScope(column: AdaptableColumn, scope: AdaptableScope): boolean;
|
|
@@ -13,6 +13,10 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
13
13
|
if ('DataTypes' in scope && scope.DataTypes.includes(column.dataType)) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
|
+
if ('ColumnTypes' in scope &&
|
|
17
|
+
scope.ColumnTypes.some((columnType) => { var _a; return (_a = column.columnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType); })) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
16
20
|
if ('ColumnIds' in scope && scope.ColumnIds.includes(column.columnId)) {
|
|
17
21
|
return true;
|
|
18
22
|
}
|
|
@@ -27,13 +31,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
27
31
|
return columns;
|
|
28
32
|
}
|
|
29
33
|
return columns.filter((c) => {
|
|
30
|
-
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
if ('ColumnIds' in scope && scope.ColumnIds.includes(c.columnId)) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
34
|
+
return this.isColumnInScope(c, scope);
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
37
|
getScopeDescription(scope) {
|
|
@@ -44,6 +42,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
44
42
|
// do we need a true check here?
|
|
45
43
|
return 'Columns: All';
|
|
46
44
|
}
|
|
45
|
+
if ('ColumnTypes' in scope) {
|
|
46
|
+
return ((scope.ColumnTypes.length > 0 ? 'ColumnTypes' : 'ColumnType') + ': ' + scope.ColumnTypes.join(', '));
|
|
47
|
+
}
|
|
47
48
|
if ('DataTypes' in scope) {
|
|
48
49
|
return ((scope.DataTypes.length > 0 ? 'DataTypes' : 'DataType') + ': ' + scope.DataTypes.join(', '));
|
|
49
50
|
}
|
|
@@ -67,6 +68,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
67
68
|
scopeHasDataType(scope) {
|
|
68
69
|
return scope !== undefined && 'DataTypes' in scope;
|
|
69
70
|
}
|
|
71
|
+
scopeHasColumnType(scope) {
|
|
72
|
+
return scope !== undefined && 'ColumnTypes' in scope;
|
|
73
|
+
}
|
|
70
74
|
scopeHasOnlyBooleanDataType(scope) {
|
|
71
75
|
var _a;
|
|
72
76
|
return 'DataTypes' in scope && ((_a = scope.DataTypes) === null || _a === void 0 ? void 0 : _a.length) == 1 && scope.DataTypes[0] == 'Boolean';
|
|
@@ -120,6 +124,9 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
120
124
|
if ('All' in scope) {
|
|
121
125
|
return 'Columns: All';
|
|
122
126
|
}
|
|
127
|
+
if ('ColumnTypes' in scope) {
|
|
128
|
+
return 'ColumnTypes: ' + scope.ColumnTypes.join(',');
|
|
129
|
+
}
|
|
123
130
|
if ('DataTypes' in scope) {
|
|
124
131
|
return 'DataTypes: ' + scope.DataTypes.join(',');
|
|
125
132
|
}
|
|
@@ -140,6 +147,12 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
140
147
|
}
|
|
141
148
|
return undefined;
|
|
142
149
|
}
|
|
150
|
+
getColumnTypesInScope(scope) {
|
|
151
|
+
if (scope !== undefined && 'ColumnTypes' in scope) {
|
|
152
|
+
return scope.ColumnTypes;
|
|
153
|
+
}
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
143
156
|
getDataTypesInScope(scope) {
|
|
144
157
|
if (scope !== undefined && 'DataTypes' in scope) {
|
|
145
158
|
return scope.DataTypes;
|
|
@@ -5,6 +5,5 @@ import { StatusPanelDef } from '@ag-grid-community/core';
|
|
|
5
5
|
export declare class StatusBarApiImpl extends ApiBase implements StatusBarApi {
|
|
6
6
|
getAdaptableStatusBars(): AdaptableStatusBar[];
|
|
7
7
|
getAgGridStatusPanels(): StatusPanelDef[];
|
|
8
|
-
getAgGridStatusBar(): StatusPanelDef[];
|
|
9
8
|
setStatusBarPanels(statusPanels: AdaptableStatusBar[]): void;
|
|
10
9
|
}
|
|
@@ -7,9 +7,6 @@ export class StatusBarApiImpl extends ApiBase {
|
|
|
7
7
|
getAgGridStatusPanels() {
|
|
8
8
|
return this.adaptable.getAgGridStatusPanels();
|
|
9
9
|
}
|
|
10
|
-
getAgGridStatusBar() {
|
|
11
|
-
return this.adaptable.getAgGridStatusPanels();
|
|
12
|
-
}
|
|
13
10
|
setStatusBarPanels(statusPanels) {
|
|
14
11
|
this.dispatchAction(StatusBarSetPanels(statusPanels));
|
|
15
12
|
}
|
|
@@ -10,15 +10,15 @@ export class ToolPanelApiImpl extends ApiBase {
|
|
|
10
10
|
this.showModulePopup(ModuleConstants.ToolPanelModuleId);
|
|
11
11
|
}
|
|
12
12
|
openAdapTableToolPanel() {
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
13
|
+
const agGridApi = this.getAdaptableApi().agGridApi;
|
|
14
|
+
if (agGridApi) {
|
|
15
|
+
agGridApi.openToolPanel('adaptable');
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
closeAdapTableToolPanel() {
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
19
|
+
const agGridApi = this.getAdaptableApi().agGridApi;
|
|
20
|
+
if (agGridApi) {
|
|
21
|
+
agGridApi.closeToolPanel();
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
getCustomToolPanels() {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IRowNode } from '@ag-grid-community/core';
|
|
1
|
+
import { ColDef, IRowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
3
3
|
import { CreateActionRowFormContext, EditActionRowFormContext } from '../../AdaptableOptions/ActionRowOptions';
|
|
4
|
+
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
4
5
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
6
|
+
import { ActionColumnContext } from '../../AdaptableOptions/ActionColumnOptions';
|
|
5
7
|
export declare class ActionRowInternalApi extends ApiBase {
|
|
6
8
|
buildRowEditForm(rowNode: IRowNode): AdaptableForm<EditActionRowFormContext>;
|
|
7
9
|
buildRowCreateForm(clonedRowNode?: IRowNode): AdaptableForm<CreateActionRowFormContext>;
|
|
@@ -21,4 +23,6 @@ export declare class ActionRowInternalApi extends ApiBase {
|
|
|
21
23
|
private buildFormFieldLabelContext;
|
|
22
24
|
private getFieldTypeFromColumnType;
|
|
23
25
|
private getFieldValueOptions;
|
|
26
|
+
getColDefsForActionRowColumns(): ColDef[];
|
|
27
|
+
getActionRowButtonDefs(): AdaptableButton<ActionColumnContext<any>>[];
|
|
24
28
|
}
|