@adaptabletools/adaptable 18.0.0-canary.1 → 18.0.0-canary.11
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 +8 -7
- 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 +1 -181
- 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/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- 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/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- 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 +7 -3
- 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/License/LicenseWatermark.js +1 -61
- 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/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 +1 -9313
- 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
|
@@ -3,12 +3,15 @@ import { SortOrder } from '../../PredefinedConfig/Common/Enums';
|
|
|
3
3
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
4
4
|
import * as GridRedux from '../../Redux/ActionsReducers/GridRedux';
|
|
5
5
|
import NumberExtensions from '../../Utilities/Extensions/NumberExtensions';
|
|
6
|
+
import { convertAdaptableStyleToCSS } from '../../Utilities/Helpers/StyleHelper';
|
|
7
|
+
import UIHelper from '../../View/UIHelper';
|
|
8
|
+
import { createBaseContext } from '../../Utilities/ObjectFactory';
|
|
6
9
|
export class GridInternalApi extends ApiBase {
|
|
7
10
|
/**
|
|
8
11
|
* Fires Grid Sorted Event
|
|
9
12
|
*/
|
|
10
13
|
fireGridSortedEvent() {
|
|
11
|
-
if (this.adaptable.
|
|
14
|
+
if (this.adaptable.isReady) {
|
|
12
15
|
const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
|
|
13
16
|
const adaptableApi = this.getAdaptableApi();
|
|
14
17
|
const gridSortedInfo = {
|
|
@@ -24,7 +27,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
24
27
|
* Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
|
|
25
28
|
*/
|
|
26
29
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
27
|
-
if (this.adaptable.
|
|
30
|
+
if (this.adaptable.isReady) {
|
|
28
31
|
const cellChangedInfo = {
|
|
29
32
|
adaptableApi: this.adaptable.api,
|
|
30
33
|
cellChange: cellDataChangedInfo,
|
|
@@ -38,7 +41,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
38
41
|
* Fires Grid Data Changed Event - when a row has changed in AG Grid
|
|
39
42
|
*/
|
|
40
43
|
fireGridDataChangedEvent(dataRows, rowNodes, rowTrigger) {
|
|
41
|
-
if (this.adaptable.
|
|
44
|
+
if (this.adaptable.isReady) {
|
|
42
45
|
const gridDataChangedInfo = {
|
|
43
46
|
changedAt: Date.now(),
|
|
44
47
|
adaptableApi: this.adaptable.api,
|
|
@@ -88,7 +91,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
88
91
|
const distinctValuesParams = {
|
|
89
92
|
visibleRowsOnly: showFilteredRowsOnly,
|
|
90
93
|
};
|
|
91
|
-
const { gridCells, suppressClientSideFilter } = await this.
|
|
94
|
+
const { gridCells, suppressClientSideFilter } = await this.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
|
|
92
95
|
const sortedDistinctValues = this.sortDistinctValues(gridCells, abColumn);
|
|
93
96
|
let shouldShowValuesCount = false;
|
|
94
97
|
const showValuesCountFunction = this.getColumnFilterOptions().valuesFilterOptions.showValuesCount;
|
|
@@ -128,6 +131,26 @@ export class GridInternalApi extends ApiBase {
|
|
|
128
131
|
suppressClientSideFilter,
|
|
129
132
|
};
|
|
130
133
|
}
|
|
134
|
+
async getDistinctFilterListValuesForColumn(column, filter, distinctValuesParams) {
|
|
135
|
+
var _a;
|
|
136
|
+
const filterPermittedValues = (_a = this.getUserInterfaceApi().getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
|
|
137
|
+
suppressFilterSearchBar: false,
|
|
138
|
+
values: () => undefined,
|
|
139
|
+
};
|
|
140
|
+
let preparedPermittedValues = undefined;
|
|
141
|
+
try {
|
|
142
|
+
const filterPermittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column, searchFilter: filter });
|
|
143
|
+
preparedPermittedValues = await (filterPermittedValues === null || filterPermittedValues === void 0 ? void 0 : filterPermittedValues.values(filterPermittedValuesParams));
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
this.adaptable.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
|
|
147
|
+
}
|
|
148
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
149
|
+
return {
|
|
150
|
+
suppressClientSideFilter: filterPermittedValues.suppressFilterSearchBar,
|
|
151
|
+
gridCells: this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
131
154
|
/**
|
|
132
155
|
* Gets all distinct Custom Sort values for the Column with the given ColumnId
|
|
133
156
|
* @param columnId Column to check
|
|
@@ -140,11 +163,24 @@ export class GridInternalApi extends ApiBase {
|
|
|
140
163
|
const distinctValuesParams = {
|
|
141
164
|
visibleRowsOnly: false,
|
|
142
165
|
};
|
|
143
|
-
const gridCells = await this.
|
|
166
|
+
const gridCells = await this.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
|
|
144
167
|
return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
145
168
|
return cv.normalisedValue;
|
|
146
169
|
});
|
|
147
170
|
}
|
|
171
|
+
async getDistinctCustomSortValuesForColumn(column, distinctValuesParams) {
|
|
172
|
+
const customSortPermittedValues = await this.getUserInterfaceApi().getCustomSortPermittedValuesForColumn(column);
|
|
173
|
+
let preparedPermittedValues = undefined;
|
|
174
|
+
try {
|
|
175
|
+
const permittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column });
|
|
176
|
+
preparedPermittedValues = await (customSortPermittedValues === null || customSortPermittedValues === void 0 ? void 0 : customSortPermittedValues.values(permittedValuesParams));
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
this.adaptable.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
|
|
180
|
+
}
|
|
181
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
182
|
+
return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
183
|
+
}
|
|
148
184
|
/**
|
|
149
185
|
* Gets all distinct Bulk Update values for the Column with the given ColumnId
|
|
150
186
|
* @param columnId Column to check
|
|
@@ -158,11 +194,24 @@ export class GridInternalApi extends ApiBase {
|
|
|
158
194
|
const distinctValuesParams = {
|
|
159
195
|
visibleRowsOnly: false,
|
|
160
196
|
};
|
|
161
|
-
const gridCells = await this.
|
|
197
|
+
const gridCells = await this.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
|
|
162
198
|
return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
163
199
|
return cv.normalisedValue;
|
|
164
200
|
});
|
|
165
201
|
}
|
|
202
|
+
async getDistinctBulkUpdateValuesForColumn(column, selectedGridCells, distinctValuesParams) {
|
|
203
|
+
const bulkUpdatePermittedValues = await this.getUserInterfaceApi().getBulkUpdatePermittedValuesForColumn(column);
|
|
204
|
+
let preparedPermittedValues = undefined;
|
|
205
|
+
try {
|
|
206
|
+
const bulkUpdatePermittedValuesParams = Object.assign(Object.assign({}, createBaseContext(this.adaptable.api)), { column: column, gridCells: selectedGridCells });
|
|
207
|
+
preparedPermittedValues = await (bulkUpdatePermittedValues === null || bulkUpdatePermittedValues === void 0 ? void 0 : bulkUpdatePermittedValues.values(bulkUpdatePermittedValuesParams));
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
this.adaptable.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
|
|
211
|
+
}
|
|
212
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
213
|
+
return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
214
|
+
}
|
|
166
215
|
/**
|
|
167
216
|
* Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
|
|
168
217
|
* @param columnId Column to check
|
|
@@ -257,7 +306,7 @@ export class GridInternalApi extends ApiBase {
|
|
|
257
306
|
this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
|
|
258
307
|
}
|
|
259
308
|
buildStandaloneColumnHeader(column) {
|
|
260
|
-
return this.adaptable.buildStandaloneColumnHeader(column);
|
|
309
|
+
return this.adaptable.agGridMenuAdapter.buildStandaloneColumnHeader(column);
|
|
261
310
|
}
|
|
262
311
|
getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
|
|
263
312
|
if (!editLookUpItem || !column) {
|
|
@@ -285,4 +334,74 @@ export class GridInternalApi extends ApiBase {
|
|
|
285
334
|
// this will use the columnApi method that first looks for permitted values and then distinct values
|
|
286
335
|
return this.getDistinctDisplayValuesForColumn(column.columnId);
|
|
287
336
|
}
|
|
337
|
+
getAgGridDataType(dataType) {
|
|
338
|
+
if (!dataType) {
|
|
339
|
+
return 'abColDefString';
|
|
340
|
+
}
|
|
341
|
+
switch (dataType) {
|
|
342
|
+
case 'Boolean':
|
|
343
|
+
return 'abColDefBoolean';
|
|
344
|
+
case 'Date':
|
|
345
|
+
return 'abColDefDate';
|
|
346
|
+
case 'Number':
|
|
347
|
+
return 'abColDefNumber';
|
|
348
|
+
case 'Object':
|
|
349
|
+
return 'abColDefObject';
|
|
350
|
+
case 'String':
|
|
351
|
+
return 'abColDefString';
|
|
352
|
+
case 'NumberArray':
|
|
353
|
+
return 'abColDefNumberArray';
|
|
354
|
+
case 'TupleNumberArray':
|
|
355
|
+
return 'abColDefTupleNumberArray';
|
|
356
|
+
case 'ObjectNumberArray':
|
|
357
|
+
return 'abColDefObjectNumberArray';
|
|
358
|
+
default:
|
|
359
|
+
return 'abColDefCustom';
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
getRowHighlightStyle(params) {
|
|
363
|
+
var _a;
|
|
364
|
+
const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
365
|
+
const highlightRow = (_a = this.getAdaptableApi()
|
|
366
|
+
.internalApi.getSystemState()
|
|
367
|
+
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
368
|
+
return highlightRow.primaryKeyValue === primaryKeyValue;
|
|
369
|
+
});
|
|
370
|
+
if (highlightRow) {
|
|
371
|
+
return convertAdaptableStyleToCSS(highlightRow.highlightStyle);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
getAlertRowStyle(params) {
|
|
375
|
+
var _a, _b;
|
|
376
|
+
const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
|
|
377
|
+
const highlightRow = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow;
|
|
378
|
+
if (highlightRow) {
|
|
379
|
+
return typeof highlightRow === 'object'
|
|
380
|
+
? convertAdaptableStyleToCSS(highlightRow)
|
|
381
|
+
: {
|
|
382
|
+
backgroundColor: UIHelper.getColorByMessageType(alert.alertDefinition.MessageType),
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
getAlertRowClass(params) {
|
|
388
|
+
var _a, _b;
|
|
389
|
+
const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
|
|
390
|
+
const highlightRow = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow;
|
|
391
|
+
return typeof highlightRow === 'object' && (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName)
|
|
392
|
+
? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
|
|
393
|
+
: null;
|
|
394
|
+
}
|
|
395
|
+
getRowHighlightClass(params) {
|
|
396
|
+
var _a;
|
|
397
|
+
const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
398
|
+
const highlightRow = (_a = this.getAdaptableApi()
|
|
399
|
+
.internalApi.getSystemState()
|
|
400
|
+
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
401
|
+
return highlightRow.primaryKeyValue === primaryKeyValue;
|
|
402
|
+
});
|
|
403
|
+
return typeof (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.highlightStyle) === 'object'
|
|
404
|
+
? highlightRow.highlightStyle.ClassName
|
|
405
|
+
: null;
|
|
406
|
+
}
|
|
288
407
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
export class NotesInternalApi extends ApiBase {
|
|
3
|
+
areNotesAvailable() {
|
|
4
|
+
var _a;
|
|
5
|
+
const currentLayout = this.getLayoutApi().getCurrentLayout();
|
|
6
|
+
if (currentLayout.EnablePivot) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -5,7 +5,7 @@ export class TeamSharingInternalApi extends ApiBase {
|
|
|
5
5
|
* @param sharedEntity Entity that has been changed
|
|
6
6
|
*/
|
|
7
7
|
fireTeamSharingEntityChangedEvent(sharedEntity) {
|
|
8
|
-
if (this.adaptable.
|
|
8
|
+
if (this.adaptable.isReady) {
|
|
9
9
|
const teamSharingEntityChangedInfo = {
|
|
10
10
|
adaptableApi: this.adaptable.api,
|
|
11
11
|
sharedEntity: sharedEntity,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InteropioPluginOptions } from '../AdaptableOptions/InteropioPluginOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Provides run-time access to the
|
|
3
|
+
* Provides run-time access to the Interopio Plugin
|
|
4
4
|
*/
|
|
5
5
|
export interface InteropioPluginApi {
|
|
6
6
|
/**
|
|
7
|
-
* Retrieves the
|
|
7
|
+
* Retrieves the InteropioPlugOptions provided in interopio Plugin
|
|
8
8
|
*/
|
|
9
9
|
getPluginOptions(): InteropioPluginOptions;
|
|
10
10
|
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -163,6 +163,17 @@ export interface LayoutApi {
|
|
|
163
163
|
* @param layoutName layout from which to remove Column
|
|
164
164
|
*/
|
|
165
165
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Adds a Column to a given Layout
|
|
168
|
+
* @param columnId Column to add
|
|
169
|
+
* @param layoutName layout to which to add Column
|
|
170
|
+
*/
|
|
171
|
+
addColumnToLayout(columnId: string, layoutName: string): void;
|
|
172
|
+
/**
|
|
173
|
+
* Adds a Column to Current Layout
|
|
174
|
+
* @param columnId Column to add
|
|
175
|
+
*/
|
|
176
|
+
addColumnToCurrentLayout(columnId: string): void;
|
|
166
177
|
/**
|
|
167
178
|
* Returns what the layout supports.
|
|
168
179
|
* This takes into account the data-source.
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions,
|
|
|
5
5
|
import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
|
|
6
6
|
import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
|
|
7
7
|
import { DataImportOptions } from '../AdaptableOptions/DataImportOptions';
|
|
8
|
-
import { CommentsOptions } from '../AdaptableOptions/
|
|
8
|
+
import { CommentsOptions } from '../AdaptableOptions/CommentOptions';
|
|
9
9
|
/**
|
|
10
10
|
* Range of functions to access Adaptable Options
|
|
11
11
|
*/
|
|
@@ -42,6 +42,10 @@ export interface OptionsApi {
|
|
|
42
42
|
* Returns `AdaptableOptions.actionColumnOptions`
|
|
43
43
|
*/
|
|
44
44
|
getActionColumnOptions(): Readonly<ActionColumnOptions>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns available columns types defined under columnOptions.columnTypes
|
|
47
|
+
*/
|
|
48
|
+
getColumnTypes(): string[];
|
|
45
49
|
/**
|
|
46
50
|
* Returns `AdaptableOptions.actionRowOptions`
|
|
47
51
|
*/
|
package/src/Api/ScopeApi.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ export interface ScopeApi {
|
|
|
31
31
|
* @param scope Scope to check
|
|
32
32
|
*/
|
|
33
33
|
scopeHasDataType(scope: AdaptableScope): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True if Scope contains ColumnTypes
|
|
36
|
+
* @param scope Scope to check
|
|
37
|
+
*/
|
|
38
|
+
scopeHasColumnType(scope: AdaptableScope): boolean;
|
|
34
39
|
/**
|
|
35
40
|
* True if the Scope is DataTypes and contains only Boolean
|
|
36
41
|
* @param scope Scope to check
|
|
@@ -87,6 +92,11 @@ export interface ScopeApi {
|
|
|
87
92
|
* @param scope Scope to check
|
|
88
93
|
*/
|
|
89
94
|
getColumnIdsInScope(scope: AdaptableScope): string[] | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Returns all the ColumnTypes in the Scope
|
|
97
|
+
* @param scope Scope to check
|
|
98
|
+
*/
|
|
99
|
+
getColumnTypesInScope(scope: AdaptableScope): string[] | undefined;
|
|
90
100
|
/**
|
|
91
101
|
* Returns all the DataTypes in the Scope
|
|
92
102
|
* @param scope Scope to check
|
package/src/EnvVars.d.ts
ADDED
package/src/EnvVars.js
ADDED
|
@@ -19,6 +19,10 @@ export interface AdaptableColumnBase extends AdaptableObject {
|
|
|
19
19
|
* DataType of the Column
|
|
20
20
|
*/
|
|
21
21
|
dataType: AdaptableColumnDataType;
|
|
22
|
+
/**
|
|
23
|
+
* Column Types of the Column
|
|
24
|
+
*/
|
|
25
|
+
columnTypes?: string[];
|
|
22
26
|
}
|
|
23
27
|
export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
|
|
24
28
|
oldColumns: AdaptableColumn[];
|
|
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
|
|
|
54
54
|
/**
|
|
55
55
|
* All AdapTable System Icon names
|
|
56
56
|
*/
|
|
57
|
-
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
|
|
57
|
+
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter' | 'rows';
|
|
@@ -8,7 +8,10 @@ export type ScopeDataTypes<Type = ScopeDataType> = {
|
|
|
8
8
|
export type ScopeColumnIds = {
|
|
9
9
|
ColumnIds: string[];
|
|
10
10
|
};
|
|
11
|
+
export type ScopeColumnTypes = {
|
|
12
|
+
ColumnTypes: string[];
|
|
13
|
+
};
|
|
11
14
|
/**
|
|
12
15
|
* Defines where a given Object / Module is active
|
|
13
16
|
*/
|
|
14
|
-
export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds;
|
|
17
|
+
export type AdaptableScope<Type = ScopeDataType> = ScopeAll | ScopeDataTypes<Type> | ScopeColumnIds | ScopeColumnTypes;
|
|
@@ -16,3 +16,4 @@ export interface WeightedAverageAggregation {
|
|
|
16
16
|
* Defines which Columns in a Layout display Aggregated values when Row-Grouped
|
|
17
17
|
*/
|
|
18
18
|
export type AggregationColumns = Record<string, string | true | WeightedAverageAggregation>;
|
|
19
|
+
export declare const isWeightedAverageAggregation: (aggFunc: AggregationColumns[keyof AggregationColumns]) => aggFunc is WeightedAverageAggregation;
|
|
@@ -6,6 +6,14 @@ export interface DataUpdateConfig {
|
|
|
6
6
|
* Whether data should be updated asynchronously
|
|
7
7
|
*/
|
|
8
8
|
runAsync?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to flush async updates.
|
|
11
|
+
*
|
|
12
|
+
* If `true`, any async transactions will be flushed.
|
|
13
|
+
* This flag can be true even if you runAsync is `false`.
|
|
14
|
+
* So even if the currenct transaction/operation is synchronous, this will flush existing async transactions.
|
|
15
|
+
*/
|
|
16
|
+
flushAsync?: boolean;
|
|
9
17
|
/**
|
|
10
18
|
* Callback function invoked when a batch successfully updates
|
|
11
19
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SummarySupportedExpression } from '../../Utilities/Services/SummaryService';
|
|
2
|
+
export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
|
|
3
|
+
export type RowSummaryPosition = 'Top' | 'Bottom';
|
|
4
|
+
export interface RowSummary {
|
|
5
|
+
Position?: RowSummaryPosition;
|
|
6
|
+
ColumnsMap: Record<string, SummarySupportedExpression>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
|
|
@@ -3,6 +3,7 @@ import { AdaptableObject } from './Common/AdaptableObject';
|
|
|
3
3
|
import { ColumnSort } from './Common/ColumnSort';
|
|
4
4
|
import { ColumnFilter, GridFilter } from '../types';
|
|
5
5
|
import { AggregationColumns } from './Common/AggregationColumns';
|
|
6
|
+
import { RowSummary } from './Common/RowSummary';
|
|
6
7
|
/**
|
|
7
8
|
* Predefined Configuration for the Layout Module
|
|
8
9
|
*/
|
|
@@ -82,4 +83,8 @@ export interface Layout extends AdaptableObject {
|
|
|
82
83
|
* Whether to include the aggFunc name in the column header: e.g. 'sum(Bank Balance)' will just be 'Bank Balance'
|
|
83
84
|
*/
|
|
84
85
|
SuppressAggFuncInHeader?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Row summaries
|
|
88
|
+
*/
|
|
89
|
+
RowSummaries?: RowSummary[];
|
|
85
90
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { AdaptableObject } from '../types';
|
|
2
2
|
import { ConfigState } from './ConfigState';
|
|
3
|
+
/**
|
|
4
|
+
* Predefined Configuration for Notes Module
|
|
5
|
+
*/
|
|
6
|
+
export interface NotesState extends ConfigState {
|
|
7
|
+
/**
|
|
8
|
+
* Collection of AdapTable Notes
|
|
9
|
+
*/
|
|
10
|
+
Notes?: AdaptableNotes;
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
13
|
* Note that can be applied to a Cell in AdapTable
|
|
5
14
|
*/
|
|
@@ -11,13 +20,7 @@ export interface AdaptableNote extends AdaptableObject {
|
|
|
11
20
|
/**
|
|
12
21
|
* Value of the Note
|
|
13
22
|
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Author of the Note
|
|
17
|
-
*/
|
|
18
|
-
Author: {
|
|
19
|
-
UserName: string;
|
|
20
|
-
};
|
|
23
|
+
Text: string;
|
|
21
24
|
/**
|
|
22
25
|
* Value in Grid's Primary Key Column
|
|
23
26
|
*/
|
|
@@ -26,21 +29,8 @@ export interface AdaptableNote extends AdaptableObject {
|
|
|
26
29
|
* Id of Column containing the Note
|
|
27
30
|
*/
|
|
28
31
|
ColumnId: string;
|
|
29
|
-
/**
|
|
30
|
-
* Id of this AdapTable instance
|
|
31
|
-
*/
|
|
32
|
-
AdaptableId: string;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* Collection of Cell Notes
|
|
36
35
|
*/
|
|
37
36
|
export type AdaptableNotes = AdaptableNote[];
|
|
38
|
-
/**
|
|
39
|
-
* Predefined Configuration for Notes Module
|
|
40
|
-
*/
|
|
41
|
-
export interface NotesState extends ConfigState {
|
|
42
|
-
/**
|
|
43
|
-
* Collection of AdapTable Notes
|
|
44
|
-
*/
|
|
45
|
-
Notes?: AdaptableNotes;
|
|
46
|
-
}
|
|
@@ -20,6 +20,10 @@ export type { OpenFinReport };
|
|
|
20
20
|
type ROW_PRIMARY_KEY = string;
|
|
21
21
|
type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
|
|
22
22
|
export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
|
|
23
|
+
export type SystemRowSummary = {
|
|
24
|
+
Position: 'Top' | 'Bottom';
|
|
25
|
+
RowData: Record<string, any>;
|
|
26
|
+
};
|
|
23
27
|
/**
|
|
24
28
|
* Internal state, used by Adaptable during a session; none of it is provided through Predefined Config, nor is it persisted
|
|
25
29
|
*/
|
|
@@ -103,6 +107,9 @@ export interface SystemState extends InternalState, IPushPullState, OpenFinState
|
|
|
103
107
|
focusedEntity?: 'Note' | 'Comment';
|
|
104
108
|
popupPosition?: CellAddress | null;
|
|
105
109
|
};
|
|
110
|
+
RowSummary?: {
|
|
111
|
+
rowSummaries?: SystemRowSummary[];
|
|
112
|
+
};
|
|
106
113
|
}
|
|
107
114
|
export interface ProgressIndicator {
|
|
108
115
|
active: boolean;
|
|
@@ -30,6 +30,10 @@ export declare const LAYOUT_SELECT = "LAYOUT_SELECT";
|
|
|
30
30
|
* @ReduxAction A Layout has been (auto)saved
|
|
31
31
|
*/
|
|
32
32
|
export declare const LAYOUT_SAVE = "LAYOUT_SAVE";
|
|
33
|
+
/**
|
|
34
|
+
* @ReduxAction A Column has been added
|
|
35
|
+
*/
|
|
36
|
+
export declare const LAYOUT_ADD_COLUMN = "LAYOUT_ADD_COLUMN";
|
|
33
37
|
/**
|
|
34
38
|
* @ReduxAction A Column has been removed
|
|
35
39
|
*/
|
|
@@ -145,6 +149,10 @@ export interface LayoutSetColumnCaptionAction extends Redux.Action {
|
|
|
145
149
|
columnId: string;
|
|
146
150
|
caption: string;
|
|
147
151
|
}
|
|
152
|
+
export interface LayoutAddColumnAction extends Redux.Action {
|
|
153
|
+
layoutName: string;
|
|
154
|
+
columnId: string;
|
|
155
|
+
}
|
|
148
156
|
export interface LayoutRemoveColumnAction extends Redux.Action {
|
|
149
157
|
layoutName: string;
|
|
150
158
|
columnId: string;
|
|
@@ -163,6 +171,7 @@ export declare const LayoutAdd: (layout: Layout) => LayoutAddAction;
|
|
|
163
171
|
export declare const LayoutDelete: (layout: Layout) => LayoutDeleteAction;
|
|
164
172
|
export declare const LayoutSave: (layout: Layout) => LayoutSaveAction;
|
|
165
173
|
export declare const LayoutSetColumnCaption: (layoutName: string, columnId: string, caption: string) => LayoutSetColumnCaptionAction;
|
|
174
|
+
export declare const LayoutAddColumn: (layoutName: string, columnId: string) => LayoutAddColumnAction;
|
|
166
175
|
export declare const LayoutRemoveColumn: (layoutName: string, columnId: string) => LayoutRemoveColumnAction;
|
|
167
176
|
export declare const LayoutSelect: (layoutName: string) => LayoutSelectAction;
|
|
168
177
|
export declare const LayoutReady: (layoutState: LayoutState) => LayoutReadyAction;
|
|
@@ -28,6 +28,10 @@ export const LAYOUT_SELECT = 'LAYOUT_SELECT';
|
|
|
28
28
|
* @ReduxAction A Layout has been (auto)saved
|
|
29
29
|
*/
|
|
30
30
|
export const LAYOUT_SAVE = 'LAYOUT_SAVE';
|
|
31
|
+
/**
|
|
32
|
+
* @ReduxAction A Column has been added
|
|
33
|
+
*/
|
|
34
|
+
export const LAYOUT_ADD_COLUMN = 'LAYOUT_ADD_COLUMN';
|
|
31
35
|
/**
|
|
32
36
|
* @ReduxAction A Column has been removed
|
|
33
37
|
*/
|
|
@@ -149,6 +153,11 @@ export const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
|
|
|
149
153
|
columnId,
|
|
150
154
|
caption,
|
|
151
155
|
});
|
|
156
|
+
export const LayoutAddColumn = (layoutName, columnId) => ({
|
|
157
|
+
type: LAYOUT_ADD_COLUMN,
|
|
158
|
+
layoutName,
|
|
159
|
+
columnId,
|
|
160
|
+
});
|
|
152
161
|
export const LayoutRemoveColumn = (layoutName, columnId) => ({
|
|
153
162
|
type: LAYOUT_REMOVE_COLUMN,
|
|
154
163
|
layoutName,
|
|
@@ -218,6 +227,17 @@ export const LayoutReducer = (state = initialState, action) => {
|
|
|
218
227
|
}
|
|
219
228
|
return state;
|
|
220
229
|
}
|
|
230
|
+
case LAYOUT_ADD_COLUMN: {
|
|
231
|
+
const addColumnAction = action;
|
|
232
|
+
const layoutname = addColumnAction.layoutName;
|
|
233
|
+
const colToAdd = addColumnAction.columnId;
|
|
234
|
+
let layoutToUpdate = state.Layouts.find((l) => l.Name === layoutname);
|
|
235
|
+
if (layoutToUpdate) {
|
|
236
|
+
layoutToUpdate.Columns.push(colToAdd);
|
|
237
|
+
return Object.assign(Object.assign({}, state), { Layouts: state.Layouts.map((abObject) => abObject.Uuid === layoutToUpdate.Uuid ? layoutToUpdate : abObject) });
|
|
238
|
+
}
|
|
239
|
+
return state;
|
|
240
|
+
}
|
|
221
241
|
case LAYOUT_REMOVE_COLUMN: {
|
|
222
242
|
const removeColumnAction = action;
|
|
223
243
|
const layoutname = removeColumnAction.layoutName;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AdaptableNote, NotesState } from '../../PredefinedConfig/NotesState';
|
|
2
2
|
import * as Redux from 'redux';
|
|
3
|
+
import { CellAddress } from '../../types';
|
|
3
4
|
/**
|
|
4
5
|
* @ReduxAction A Notes has been added
|
|
5
6
|
*/
|
|
@@ -32,8 +33,6 @@ export declare const NotesAdd: (note: AdaptableNote) => AdaptableNotesAddAction;
|
|
|
32
33
|
export declare const NotesEdit: (note: AdaptableNote) => AdaptableNotesEditAction;
|
|
33
34
|
export declare const NotesDelete: (note: AdaptableNote) => AdaptableNotesDeleteAction;
|
|
34
35
|
export declare const NotesReady: (note: NotesState) => NoteReadyAction;
|
|
35
|
-
export declare const
|
|
36
|
-
|
|
37
|
-
ColumnId: string;
|
|
38
|
-
}) => AdaptableNote[];
|
|
36
|
+
export declare const GetAllNotesSelector: (state: NotesState) => AdaptableNote[];
|
|
37
|
+
export declare const GetNotesSelector: (state: NotesState, address: CellAddress) => AdaptableNote[];
|
|
39
38
|
export declare const NotesReducer: Redux.Reducer<NotesState>;
|
|
@@ -32,21 +32,22 @@ export const NotesReady = (note) => ({
|
|
|
32
32
|
type: NOTES_READY,
|
|
33
33
|
notesState: note,
|
|
34
34
|
});
|
|
35
|
-
export const
|
|
35
|
+
export const GetAllNotesSelector = (state) => state.Notes;
|
|
36
|
+
export const GetNotesSelector = (state, address) => {
|
|
36
37
|
var _a;
|
|
37
|
-
if (!
|
|
38
|
+
if (!address) {
|
|
38
39
|
return [];
|
|
39
40
|
}
|
|
40
41
|
return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
|
|
41
|
-
if (note.PrimaryKeyValue ===
|
|
42
|
+
if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
|
|
42
43
|
// happy check
|
|
43
44
|
return true;
|
|
44
45
|
}
|
|
45
46
|
// Primary keys retreived from the grid dom are always strings, so we must also consider them strings
|
|
46
|
-
if ((typeof
|
|
47
|
-
(typeof
|
|
48
|
-
return (note.PrimaryKeyValue.toString() ===
|
|
49
|
-
note.ColumnId ===
|
|
47
|
+
if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
|
|
48
|
+
(typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
|
|
49
|
+
return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
|
|
50
|
+
note.ColumnId === address.ColumnId);
|
|
50
51
|
}
|
|
51
52
|
return false;
|
|
52
53
|
});
|