@adaptabletools/adaptable-cjs 18.0.0-canary.1 → 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 +5 -21
- 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 +2 -6
- 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 +107 -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 +71 -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 +18 -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 +60 -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 +18 -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 +8 -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 +5 -1
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +4 -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 +22 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +10 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -3
- 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 +3 -2
- 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 +6 -1
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +6 -1
- 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 +33 -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 +4 -1
- 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 +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +199 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Notes/NotesPopup.js +8 -10
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +7 -5291
- package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
- package/src/agGrid/AdaptableAgGrid.js +3941 -0
- package/src/agGrid/AdaptableLogger.js +78 -13
- package/src/agGrid/AgGridAdapter.d.ts +62 -0
- package/src/agGrid/AgGridAdapter.js +582 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +829 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +276 -0
- package/src/agGrid/AgGridOptionsService.d.ts +12 -0
- package/src/agGrid/AgGridOptionsService.js +58 -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} +73 -10
- 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 +6 -4
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +74 -11
- package/src/metamodel/adaptable.metamodel.js +147 -34
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +52 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +15 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +347 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +10 -0
- package/src/parser/src/types.d.ts +5 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.cjs.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 -2
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -138
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -691
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -673
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActionColumnApiImpl = void 0;
|
|
4
4
|
const ApiBase_1 = require("./ApiBase");
|
|
5
|
+
const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
|
|
6
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
5
7
|
class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
6
8
|
constructor(adaptable) {
|
|
7
9
|
super(adaptable);
|
|
@@ -10,5 +12,36 @@ class ActionColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
12
|
var _a;
|
|
11
13
|
return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
12
14
|
}
|
|
15
|
+
getColDefsForActionColumns() {
|
|
16
|
+
const defaultActionColumnSettings = {
|
|
17
|
+
resizable: true,
|
|
18
|
+
suppressMenu: false,
|
|
19
|
+
suppressMovable: false,
|
|
20
|
+
};
|
|
21
|
+
return this.getActionColumnApi()
|
|
22
|
+
.getActionColumns()
|
|
23
|
+
.map((actionColumn) => {
|
|
24
|
+
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
25
|
+
const newColDef = {
|
|
26
|
+
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
27
|
+
colId: actionColumn.columnId,
|
|
28
|
+
hide: false,
|
|
29
|
+
editable: false,
|
|
30
|
+
width: actionColumnSettings.width,
|
|
31
|
+
resizable: actionColumnSettings.resizable,
|
|
32
|
+
suppressMenu: actionColumnSettings.suppressMenu,
|
|
33
|
+
suppressMovable: actionColumnSettings.suppressMovable,
|
|
34
|
+
filter: false,
|
|
35
|
+
sortable: false,
|
|
36
|
+
enableRowGroup: false,
|
|
37
|
+
cellRenderer: this.getAdaptableApi().internalApi.getAdaptableInstance().variant === 'react'
|
|
38
|
+
? ActionColumnRenderer_1.ReactActionColumnRenderer
|
|
39
|
+
: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
40
|
+
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
41
|
+
};
|
|
42
|
+
this.getAdaptableApi().logInfo('Setting up Action Column: ' + actionColumn.columnId);
|
|
43
|
+
return newColDef;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
13
46
|
}
|
|
14
47
|
exports.ActionColumnApiImpl = ActionColumnApiImpl;
|
|
@@ -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
|
*/
|
|
@@ -106,6 +106,9 @@ class AdaptableApiImpl {
|
|
|
106
106
|
// adaptable internal api
|
|
107
107
|
this.internalApi = new AdaptableInternalApi_1.AdaptableInternalApi(adaptable);
|
|
108
108
|
}
|
|
109
|
+
get agGridApi() {
|
|
110
|
+
return this.adaptable.agGridAdapter.getAgGridApi();
|
|
111
|
+
}
|
|
109
112
|
/**
|
|
110
113
|
* This is only meant to be called by the Adaptable instance.
|
|
111
114
|
*/
|
|
@@ -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
|
*
|
|
@@ -25,6 +25,9 @@ class ApiBase {
|
|
|
25
25
|
logError(message, ...optionalParams) {
|
|
26
26
|
this.adaptable.logger.error(message, ...optionalParams);
|
|
27
27
|
}
|
|
28
|
+
getAdaptableVariant() {
|
|
29
|
+
return this.adaptable.variant;
|
|
30
|
+
}
|
|
28
31
|
/**
|
|
29
32
|
* Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
|
|
30
33
|
*
|
|
@@ -103,7 +106,7 @@ class ApiBase {
|
|
|
103
106
|
return this.getOptions().columnOptions;
|
|
104
107
|
}
|
|
105
108
|
getNotesOptions() {
|
|
106
|
-
return this.getOptions().
|
|
109
|
+
return this.getOptions().noteOptions;
|
|
107
110
|
}
|
|
108
111
|
getCustomSortOptions() {
|
|
109
112
|
return this.getOptions().customSortOptions;
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
8
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
9
8
|
class BulkUpdateApiImpl extends ApiBase_1.ApiBase {
|
|
10
9
|
getBulkUpdateValue() {
|
|
11
10
|
return this.getAdaptableState().System.BulkUpdateValue;
|
|
@@ -19,8 +18,5 @@ class BulkUpdateApiImpl extends ApiBase_1.ApiBase {
|
|
|
19
18
|
applyBulkUpdate(cellUpdateRequests) {
|
|
20
19
|
this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
|
|
21
20
|
}
|
|
22
|
-
setBulkUpdateValue(bulkUpdateValue) {
|
|
23
|
-
this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
exports.BulkUpdateApiImpl = BulkUpdateApiImpl;
|
|
@@ -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[];
|
|
@@ -6,7 +6,12 @@ const CommentRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/C
|
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
7
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
8
8
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
9
|
+
const CommentsInternalApi_1 = require("../Internal/CommentsInternalApi");
|
|
9
10
|
class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
constructor(adaptable) {
|
|
12
|
+
super(adaptable);
|
|
13
|
+
this.internalApi = new CommentsInternalApi_1.CommentsInternalApi(adaptable);
|
|
14
|
+
}
|
|
10
15
|
getComments(address) {
|
|
11
16
|
return CommentRedux.GetCommentsSelector(this.getAdaptableState().Comment, address);
|
|
12
17
|
}
|
|
@@ -14,7 +19,8 @@ class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
|
14
19
|
return CommentRedux.GetCellCommentSelector(this.getAdaptableState().Comment, address);
|
|
15
20
|
}
|
|
16
21
|
getCommentThreads() {
|
|
17
|
-
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = this.getAdaptableState().Comment.CommentThreads) !== null && _a !== void 0 ? _a : [];
|
|
18
24
|
}
|
|
19
25
|
editComment(comment, address) {
|
|
20
26
|
this.dispatchAction(CommentRedux.CommentsEdit({ comment, cellAddress: address }));
|
|
@@ -121,7 +121,6 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
121
121
|
setAdaptableStateKey(adaptableStateKey, config) {
|
|
122
122
|
return new Promise((resolve, reject) => {
|
|
123
123
|
this.adaptable.api.internalApi.executeWithProgressIndicator(`Initialising...`, () => {
|
|
124
|
-
this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
|
|
125
124
|
const flushCurrentState = !config || config.flushCurrentState !== false;
|
|
126
125
|
// make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
|
|
127
126
|
// the state to be persisted with a delay, which we dont want in this case
|
|
@@ -129,22 +128,31 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
129
128
|
? this.adaptable.adaptableStore.saveStateNow(this.adaptable)
|
|
130
129
|
: Promise.resolve(true);
|
|
131
130
|
flushStatePromise.then(() => {
|
|
131
|
+
this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
|
|
132
132
|
let predefinedConfig = config === null || config === void 0 ? void 0 : config.predefinedConfig;
|
|
133
133
|
if (predefinedConfig) {
|
|
134
134
|
predefinedConfig = (0, AdaptableHelper_1.initPredefinedConfigWithUuids)(predefinedConfig);
|
|
135
135
|
}
|
|
136
|
-
const promise = this.adaptable.adaptableStore.loadStore(
|
|
136
|
+
const promise = this.adaptable.adaptableStore.loadStore({
|
|
137
|
+
adaptable: this.adaptable,
|
|
138
|
+
adaptableStateKey,
|
|
139
|
+
predefinedConfig,
|
|
140
|
+
});
|
|
137
141
|
promise
|
|
138
142
|
.then(() => {
|
|
139
|
-
this.adaptable.
|
|
143
|
+
this.adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
144
|
+
this.adaptable.setLayout();
|
|
140
145
|
this.adaptable.api.userInterfaceApi.hideLoadingScreen();
|
|
141
146
|
})
|
|
142
147
|
.then(() => {
|
|
143
148
|
// resolve main(result) promise
|
|
144
149
|
resolve();
|
|
145
|
-
}, () => {
|
|
150
|
+
}, (error) => {
|
|
146
151
|
// reject main(result) promise
|
|
147
|
-
reject();
|
|
152
|
+
reject(error);
|
|
153
|
+
})
|
|
154
|
+
.catch((e) => {
|
|
155
|
+
this.logError('Error setting Adaptable State Key', e);
|
|
148
156
|
});
|
|
149
157
|
});
|
|
150
158
|
});
|
|
@@ -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
|
}
|
|
@@ -8,6 +8,8 @@ const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
|
8
8
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
9
9
|
const GridInternalApi_1 = require("../Internal/GridInternalApi");
|
|
10
10
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
11
|
+
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
12
|
+
const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
|
|
11
13
|
class GridApiImpl extends ApiBase_1.ApiBase {
|
|
12
14
|
constructor(adaptable) {
|
|
13
15
|
super(adaptable);
|
|
@@ -16,13 +18,18 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
16
18
|
getGridState() {
|
|
17
19
|
return this.getAdaptableState().Grid;
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
loadGridData(dataSource) {
|
|
20
22
|
this.adaptable.setGridData(dataSource);
|
|
21
23
|
const allRowNodes = this.getAllRowNodes();
|
|
22
|
-
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, '
|
|
24
|
+
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Load');
|
|
25
|
+
}
|
|
26
|
+
resetGridData(dataSource) {
|
|
27
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'resetGridData', 'loadGridData');
|
|
28
|
+
this.loadGridData(dataSource);
|
|
23
29
|
}
|
|
24
30
|
setInitialGridData(data) {
|
|
25
|
-
this.adaptable.
|
|
31
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'setInitialGridData', 'loadGridData');
|
|
32
|
+
this.loadGridData(data);
|
|
26
33
|
}
|
|
27
34
|
getGridData() {
|
|
28
35
|
return this.adaptable.getGridData();
|
|
@@ -118,9 +125,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
118
125
|
// slightly round the houses but we have to call ColumnFilterAPI as it does it properly
|
|
119
126
|
this.adaptable.api.columnFilterApi.clearColumnFilters();
|
|
120
127
|
}
|
|
121
|
-
getAgGridInstance() {
|
|
122
|
-
return this.adaptable.gridOptions;
|
|
123
|
-
}
|
|
124
128
|
getColumnSorts() {
|
|
125
129
|
return this.getAdaptableState().Grid.ColumnSorts;
|
|
126
130
|
}
|
|
@@ -275,7 +279,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
275
279
|
return this.adaptable.getFirstDisplayedRowNode();
|
|
276
280
|
}
|
|
277
281
|
getVisibleRowNodes(config) {
|
|
278
|
-
|
|
282
|
+
const rowNodes = [];
|
|
283
|
+
this.adaptable.forAllVisibleRowNodesDo((rowNode) => rowNodes.push(rowNode), config);
|
|
284
|
+
return rowNodes;
|
|
279
285
|
}
|
|
280
286
|
getAllRowNodes(config) {
|
|
281
287
|
return this.adaptable.getAllRowNodes(config);
|
|
@@ -334,10 +340,10 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
334
340
|
this.adaptable.expandRowGroupsForValues(columnValues);
|
|
335
341
|
}
|
|
336
342
|
isGridPivotable() {
|
|
337
|
-
return this.
|
|
343
|
+
return !this.getAdaptableApi().internalApi.isGridInTreeMode();
|
|
338
344
|
}
|
|
339
345
|
isGridGroupable() {
|
|
340
|
-
return this.
|
|
346
|
+
return !this.getAdaptableApi().internalApi.isGridInTreeMode();
|
|
341
347
|
}
|
|
342
348
|
isGridSelectable() {
|
|
343
349
|
return this.adaptable.isGridSelectable();
|
|
@@ -353,7 +359,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
353
359
|
}
|
|
354
360
|
redrawGrid() {
|
|
355
361
|
this.adaptable.redrawBody();
|
|
356
|
-
this.adaptable.
|
|
362
|
+
this.adaptable.refreshHeader();
|
|
357
363
|
}
|
|
358
364
|
getGridCellsForRawValue(columnId, rawValue) {
|
|
359
365
|
const gridCells = this.adaptable.getGridCellsForColumn(columnId);
|
|
@@ -456,7 +462,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
456
462
|
}
|
|
457
463
|
refreshGroupRowNodes() {
|
|
458
464
|
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
459
|
-
this.
|
|
465
|
+
this.getAdaptableApi().agGridApi.refreshClientSideRowModel('group');
|
|
460
466
|
this.adaptable.updateRowGroupsExpandedState();
|
|
461
467
|
}
|
|
462
468
|
isCellEditable(gridCell) {
|
|
@@ -483,9 +489,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
483
489
|
getRowCount() {
|
|
484
490
|
return this.adaptable.getRowCount();
|
|
485
491
|
}
|
|
486
|
-
getVisibleRowCount() {
|
|
487
|
-
return this.adaptable.getVisibleRowCount();
|
|
488
|
-
}
|
|
489
492
|
getRowsInViewport() {
|
|
490
493
|
return this.adaptable.getRowsInViewport();
|
|
491
494
|
}
|
|
@@ -513,5 +516,21 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
513
516
|
getAgGridRowModelType() {
|
|
514
517
|
return this.adaptable.getAgGridRowModelType();
|
|
515
518
|
}
|
|
519
|
+
getVisibleRowCount() {
|
|
520
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
|
|
521
|
+
return this.getRowCount();
|
|
522
|
+
}
|
|
523
|
+
showTransposedView(transposedColumnId, hideTransposedColumn) {
|
|
524
|
+
this.adaptable.api.internalApi.showPopupWindow({
|
|
525
|
+
id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
526
|
+
factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
527
|
+
title: 'Transposed View',
|
|
528
|
+
icon: 'grid',
|
|
529
|
+
popupProps: {
|
|
530
|
+
transposedColumnId,
|
|
531
|
+
hideTransposedColumn,
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
}
|
|
516
535
|
}
|
|
517
536
|
exports.GridApiImpl = GridApiImpl;
|
|
@@ -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;
|
|
@@ -225,6 +225,21 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
+
addColumnToLayout(columnId, layoutName) {
|
|
229
|
+
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
230
|
+
if (column) {
|
|
231
|
+
const layout = this.getLayoutByName(layoutName);
|
|
232
|
+
if (layout) {
|
|
233
|
+
if (!layout.Columns.includes(columnId)) {
|
|
234
|
+
this.dispatchAction(LayoutRedux.LayoutAddColumn(layoutName, columnId));
|
|
235
|
+
this.getAdaptableApi().columnApi.showColumn(columnId);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
addColumnToCurrentLayout(columnId) {
|
|
241
|
+
this.addColumnToLayout(columnId, this.getCurrentLayoutName());
|
|
242
|
+
}
|
|
228
243
|
getLayoutSupportedFeatures() {
|
|
229
244
|
const layoutSupportedFeatures = {
|
|
230
245
|
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
|
-
}): AdaptableNote[];
|
|
16
|
+
getCellNotes(address: CellAddress): AdaptableNote[];
|
|
15
17
|
getNoteByUuid(uuid: string): AdaptableNote | undefined;
|
|
16
18
|
}
|
|
@@ -4,16 +4,17 @@ exports.NotesApiImpl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const NotesRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NotesRedux"));
|
|
7
|
+
const NotesInternalApi_1 = require("../Internal/NotesInternalApi");
|
|
7
8
|
class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
constructor(adaptable) {
|
|
10
|
+
super(adaptable);
|
|
11
|
+
this.internalApi = new NotesInternalApi_1.NotesInternalApi(adaptable);
|
|
12
|
+
}
|
|
8
13
|
addNote(noteStr, primaryKeyValue, columnId) {
|
|
9
14
|
const note = {
|
|
10
|
-
|
|
15
|
+
Text: noteStr,
|
|
11
16
|
PrimaryKeyValue: primaryKeyValue,
|
|
12
17
|
ColumnId: columnId,
|
|
13
|
-
AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
14
|
-
Author: {
|
|
15
|
-
UserName: this.adaptable.api.optionsApi.getUserName(),
|
|
16
|
-
},
|
|
17
18
|
Timestamp: Date.now(),
|
|
18
19
|
};
|
|
19
20
|
this.dispatchAction(NotesRedux.NotesAdd(note));
|
|
@@ -23,7 +24,7 @@ class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
|
23
24
|
this.dispatchAction(NotesRedux.NotesEdit(note));
|
|
24
25
|
}
|
|
25
26
|
updateNoteText(noteStr, note) {
|
|
26
|
-
this.editNote(Object.assign(Object.assign({}, note), {
|
|
27
|
+
this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
|
|
27
28
|
}
|
|
28
29
|
deleteNote(note) {
|
|
29
30
|
this.dispatchAction(NotesRedux.NotesDelete(note));
|
|
@@ -34,8 +35,8 @@ class NotesApiImpl extends ApiBase_1.ApiBase {
|
|
|
34
35
|
getAllNotes() {
|
|
35
36
|
return this.getNotesState().Notes;
|
|
36
37
|
}
|
|
37
|
-
getCellNotes(
|
|
38
|
-
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes,
|
|
38
|
+
getCellNotes(address) {
|
|
39
|
+
return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
|
|
39
40
|
}
|
|
40
41
|
getNoteByUuid(uuid) {
|
|
41
42
|
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;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OptionsApiImpl = void 0;
|
|
4
4
|
const ApiBase_1 = require("./ApiBase");
|
|
5
|
+
const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
|
|
5
6
|
class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
6
7
|
getAdaptableId() {
|
|
7
8
|
return this.adaptable.adaptableOptions.adaptableId;
|
|
@@ -27,6 +28,15 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
|
27
28
|
getActionColumnOptions() {
|
|
28
29
|
return this.getOptions().actionColumnOptions;
|
|
29
30
|
}
|
|
31
|
+
getColumnTypes() {
|
|
32
|
+
const columnTypes = this.getOptions().columnOptions.columnTypes;
|
|
33
|
+
if (typeof columnTypes === 'function') {
|
|
34
|
+
return columnTypes((0, ObjectFactory_1.createBaseContext)(this.getAdaptableApi()));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return columnTypes;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
30
40
|
getActionRowOptions() {
|
|
31
41
|
return this.getOptions().actionRowOptions;
|
|
32
42
|
}
|
|
@@ -40,10 +50,10 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
|
40
50
|
return this.getOptions().columnOptions;
|
|
41
51
|
}
|
|
42
52
|
getNotesOptions() {
|
|
43
|
-
return this.getOptions().
|
|
53
|
+
return this.getOptions().noteOptions;
|
|
44
54
|
}
|
|
45
55
|
getCommentsOptions() {
|
|
46
|
-
return this.getOptions().
|
|
56
|
+
return this.getOptions().commentOptions;
|
|
47
57
|
}
|
|
48
58
|
getCustomSortOptions() {
|
|
49
59
|
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;
|
|
@@ -17,6 +17,10 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
17
17
|
if ('DataTypes' in scope && scope.DataTypes.includes(column.dataType)) {
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
20
|
+
if ('ColumnTypes' in scope &&
|
|
21
|
+
scope.ColumnTypes.some((columnType) => { var _a; return (_a = column.columnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType); })) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
20
24
|
if ('ColumnIds' in scope && scope.ColumnIds.includes(column.columnId)) {
|
|
21
25
|
return true;
|
|
22
26
|
}
|
|
@@ -31,13 +35,7 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
31
35
|
return columns;
|
|
32
36
|
}
|
|
33
37
|
return columns.filter((c) => {
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
if ('ColumnIds' in scope && scope.ColumnIds.includes(c.columnId)) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
38
|
+
return this.isColumnInScope(c, scope);
|
|
41
39
|
});
|
|
42
40
|
}
|
|
43
41
|
getScopeDescription(scope) {
|
|
@@ -48,6 +46,9 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
48
46
|
// do we need a true check here?
|
|
49
47
|
return 'Columns: All';
|
|
50
48
|
}
|
|
49
|
+
if ('ColumnTypes' in scope) {
|
|
50
|
+
return ((scope.ColumnTypes.length > 0 ? 'ColumnTypes' : 'ColumnType') + ': ' + scope.ColumnTypes.join(', '));
|
|
51
|
+
}
|
|
51
52
|
if ('DataTypes' in scope) {
|
|
52
53
|
return ((scope.DataTypes.length > 0 ? 'DataTypes' : 'DataType') + ': ' + scope.DataTypes.join(', '));
|
|
53
54
|
}
|
|
@@ -71,6 +72,9 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
71
72
|
scopeHasDataType(scope) {
|
|
72
73
|
return scope !== undefined && 'DataTypes' in scope;
|
|
73
74
|
}
|
|
75
|
+
scopeHasColumnType(scope) {
|
|
76
|
+
return scope !== undefined && 'ColumnTypes' in scope;
|
|
77
|
+
}
|
|
74
78
|
scopeHasOnlyBooleanDataType(scope) {
|
|
75
79
|
var _a;
|
|
76
80
|
return 'DataTypes' in scope && ((_a = scope.DataTypes) === null || _a === void 0 ? void 0 : _a.length) == 1 && scope.DataTypes[0] == 'Boolean';
|
|
@@ -124,6 +128,9 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
124
128
|
if ('All' in scope) {
|
|
125
129
|
return 'Columns: All';
|
|
126
130
|
}
|
|
131
|
+
if ('ColumnTypes' in scope) {
|
|
132
|
+
return 'ColumnTypes: ' + scope.ColumnTypes.join(',');
|
|
133
|
+
}
|
|
127
134
|
if ('DataTypes' in scope) {
|
|
128
135
|
return 'DataTypes: ' + scope.DataTypes.join(',');
|
|
129
136
|
}
|
|
@@ -144,6 +151,12 @@ class ScopeApiImpl extends ApiBase_1.ApiBase {
|
|
|
144
151
|
}
|
|
145
152
|
return undefined;
|
|
146
153
|
}
|
|
154
|
+
getColumnTypesInScope(scope) {
|
|
155
|
+
if (scope !== undefined && 'ColumnTypes' in scope) {
|
|
156
|
+
return scope.ColumnTypes;
|
|
157
|
+
}
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
147
160
|
getDataTypesInScope(scope) {
|
|
148
161
|
if (scope !== undefined && 'DataTypes' in scope) {
|
|
149
162
|
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
|
}
|
|
@@ -10,9 +10,6 @@ class StatusBarApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
getAgGridStatusPanels() {
|
|
11
11
|
return this.adaptable.getAgGridStatusPanels();
|
|
12
12
|
}
|
|
13
|
-
getAgGridStatusBar() {
|
|
14
|
-
return this.adaptable.getAgGridStatusPanels();
|
|
15
|
-
}
|
|
16
13
|
setStatusBarPanels(statusPanels) {
|
|
17
14
|
this.dispatchAction((0, StatusBarRedux_1.StatusBarSetPanels)(statusPanels));
|
|
18
15
|
}
|
|
@@ -14,15 +14,15 @@ class ToolPanelApiImpl extends ApiBase_1.ApiBase {
|
|
|
14
14
|
this.showModulePopup(ModuleConstants.ToolPanelModuleId);
|
|
15
15
|
}
|
|
16
16
|
openAdapTableToolPanel() {
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
17
|
+
const agGridApi = this.getAdaptableApi().agGridApi;
|
|
18
|
+
if (agGridApi) {
|
|
19
|
+
agGridApi.openToolPanel('adaptable');
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
closeAdapTableToolPanel() {
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
|
|
23
|
+
const agGridApi = this.getAdaptableApi().agGridApi;
|
|
24
|
+
if (agGridApi) {
|
|
25
|
+
agGridApi.closeToolPanel();
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
getCustomToolPanels() {
|