@adaptabletools/adaptable-cjs 18.0.0-canary.0 → 18.0.0-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -21
- package/agGrid.js +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 +13 -11
- 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 +45 -7
- 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/Textarea/index.d.ts +9 -0
- package/src/components/Textarea/index.js +50 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +74 -11
- package/src/metamodel/adaptable.metamodel.js +157 -34
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +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
|
@@ -7,12 +7,15 @@ const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
|
7
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
8
8
|
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
9
9
|
const NumberExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/NumberExtensions"));
|
|
10
|
+
const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
|
|
11
|
+
const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
|
|
12
|
+
const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
|
|
10
13
|
class GridInternalApi extends ApiBase_1.ApiBase {
|
|
11
14
|
/**
|
|
12
15
|
* Fires Grid Sorted Event
|
|
13
16
|
*/
|
|
14
17
|
fireGridSortedEvent() {
|
|
15
|
-
if (this.adaptable.
|
|
18
|
+
if (this.adaptable.isReady) {
|
|
16
19
|
const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
|
|
17
20
|
const adaptableApi = this.getAdaptableApi();
|
|
18
21
|
const gridSortedInfo = {
|
|
@@ -28,7 +31,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
28
31
|
* Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
|
|
29
32
|
*/
|
|
30
33
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
31
|
-
if (this.adaptable.
|
|
34
|
+
if (this.adaptable.isReady) {
|
|
32
35
|
const cellChangedInfo = {
|
|
33
36
|
adaptableApi: this.adaptable.api,
|
|
34
37
|
cellChange: cellDataChangedInfo,
|
|
@@ -42,7 +45,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
42
45
|
* Fires Grid Data Changed Event - when a row has changed in AG Grid
|
|
43
46
|
*/
|
|
44
47
|
fireGridDataChangedEvent(dataRows, rowNodes, rowTrigger) {
|
|
45
|
-
if (this.adaptable.
|
|
48
|
+
if (this.adaptable.isReady) {
|
|
46
49
|
const gridDataChangedInfo = {
|
|
47
50
|
changedAt: Date.now(),
|
|
48
51
|
adaptableApi: this.adaptable.api,
|
|
@@ -92,7 +95,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
92
95
|
const distinctValuesParams = {
|
|
93
96
|
visibleRowsOnly: showFilteredRowsOnly,
|
|
94
97
|
};
|
|
95
|
-
const { gridCells, suppressClientSideFilter } = await this.
|
|
98
|
+
const { gridCells, suppressClientSideFilter } = await this.getDistinctFilterListValuesForColumn(abColumn, filter, distinctValuesParams);
|
|
96
99
|
const sortedDistinctValues = this.sortDistinctValues(gridCells, abColumn);
|
|
97
100
|
let shouldShowValuesCount = false;
|
|
98
101
|
const showValuesCountFunction = this.getColumnFilterOptions().valuesFilterOptions.showValuesCount;
|
|
@@ -132,6 +135,26 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
132
135
|
suppressClientSideFilter,
|
|
133
136
|
};
|
|
134
137
|
}
|
|
138
|
+
async getDistinctFilterListValuesForColumn(column, filter, distinctValuesParams) {
|
|
139
|
+
var _a;
|
|
140
|
+
const filterPermittedValues = (_a = this.getUserInterfaceApi().getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
|
|
141
|
+
suppressFilterSearchBar: false,
|
|
142
|
+
values: () => undefined,
|
|
143
|
+
};
|
|
144
|
+
let preparedPermittedValues = undefined;
|
|
145
|
+
try {
|
|
146
|
+
const filterPermittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column, searchFilter: filter });
|
|
147
|
+
preparedPermittedValues = await (filterPermittedValues === null || filterPermittedValues === void 0 ? void 0 : filterPermittedValues.values(filterPermittedValuesParams));
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
this.adaptable.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
|
|
151
|
+
}
|
|
152
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
153
|
+
return {
|
|
154
|
+
suppressClientSideFilter: filterPermittedValues.suppressFilterSearchBar,
|
|
155
|
+
gridCells: this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
135
158
|
/**
|
|
136
159
|
* Gets all distinct Custom Sort values for the Column with the given ColumnId
|
|
137
160
|
* @param columnId Column to check
|
|
@@ -144,11 +167,24 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
144
167
|
const distinctValuesParams = {
|
|
145
168
|
visibleRowsOnly: false,
|
|
146
169
|
};
|
|
147
|
-
const gridCells = await this.
|
|
170
|
+
const gridCells = await this.getDistinctCustomSortValuesForColumn(abColumn, distinctValuesParams);
|
|
148
171
|
return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
149
172
|
return cv.normalisedValue;
|
|
150
173
|
});
|
|
151
174
|
}
|
|
175
|
+
async getDistinctCustomSortValuesForColumn(column, distinctValuesParams) {
|
|
176
|
+
const customSortPermittedValues = await this.getUserInterfaceApi().getCustomSortPermittedValuesForColumn(column);
|
|
177
|
+
let preparedPermittedValues = undefined;
|
|
178
|
+
try {
|
|
179
|
+
const permittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column });
|
|
180
|
+
preparedPermittedValues = await (customSortPermittedValues === null || customSortPermittedValues === void 0 ? void 0 : customSortPermittedValues.values(permittedValuesParams));
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
this.adaptable.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
|
|
184
|
+
}
|
|
185
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
186
|
+
return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
187
|
+
}
|
|
152
188
|
/**
|
|
153
189
|
* Gets all distinct Bulk Update values for the Column with the given ColumnId
|
|
154
190
|
* @param columnId Column to check
|
|
@@ -162,11 +198,24 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
162
198
|
const distinctValuesParams = {
|
|
163
199
|
visibleRowsOnly: false,
|
|
164
200
|
};
|
|
165
|
-
const gridCells = await this.
|
|
201
|
+
const gridCells = await this.getDistinctBulkUpdateValuesForColumn(abColumn, selectedGridCells, distinctValuesParams);
|
|
166
202
|
return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
167
203
|
return cv.normalisedValue;
|
|
168
204
|
});
|
|
169
205
|
}
|
|
206
|
+
async getDistinctBulkUpdateValuesForColumn(column, selectedGridCells, distinctValuesParams) {
|
|
207
|
+
const bulkUpdatePermittedValues = await this.getUserInterfaceApi().getBulkUpdatePermittedValuesForColumn(column);
|
|
208
|
+
let preparedPermittedValues = undefined;
|
|
209
|
+
try {
|
|
210
|
+
const bulkUpdatePermittedValuesParams = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)), { column: column, gridCells: selectedGridCells });
|
|
211
|
+
preparedPermittedValues = await (bulkUpdatePermittedValues === null || bulkUpdatePermittedValues === void 0 ? void 0 : bulkUpdatePermittedValues.values(bulkUpdatePermittedValuesParams));
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
this.adaptable.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
|
|
215
|
+
}
|
|
216
|
+
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
217
|
+
return this.adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
218
|
+
}
|
|
170
219
|
/**
|
|
171
220
|
* Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
|
|
172
221
|
* @param columnId Column to check
|
|
@@ -261,7 +310,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
261
310
|
this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
|
|
262
311
|
}
|
|
263
312
|
buildStandaloneColumnHeader(column) {
|
|
264
|
-
return this.adaptable.buildStandaloneColumnHeader(column);
|
|
313
|
+
return this.adaptable.agGridMenuAdapter.buildStandaloneColumnHeader(column);
|
|
265
314
|
}
|
|
266
315
|
getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
|
|
267
316
|
if (!editLookUpItem || !column) {
|
|
@@ -289,5 +338,75 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
289
338
|
// this will use the columnApi method that first looks for permitted values and then distinct values
|
|
290
339
|
return this.getDistinctDisplayValuesForColumn(column.columnId);
|
|
291
340
|
}
|
|
341
|
+
getAgGridDataType(dataType) {
|
|
342
|
+
if (!dataType) {
|
|
343
|
+
return 'abColDefString';
|
|
344
|
+
}
|
|
345
|
+
switch (dataType) {
|
|
346
|
+
case 'Boolean':
|
|
347
|
+
return 'abColDefBoolean';
|
|
348
|
+
case 'Date':
|
|
349
|
+
return 'abColDefDate';
|
|
350
|
+
case 'Number':
|
|
351
|
+
return 'abColDefNumber';
|
|
352
|
+
case 'Object':
|
|
353
|
+
return 'abColDefObject';
|
|
354
|
+
case 'String':
|
|
355
|
+
return 'abColDefString';
|
|
356
|
+
case 'NumberArray':
|
|
357
|
+
return 'abColDefNumberArray';
|
|
358
|
+
case 'TupleNumberArray':
|
|
359
|
+
return 'abColDefTupleNumberArray';
|
|
360
|
+
case 'ObjectNumberArray':
|
|
361
|
+
return 'abColDefObjectNumberArray';
|
|
362
|
+
default:
|
|
363
|
+
return 'abColDefCustom';
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
getRowHighlightStyle(params) {
|
|
367
|
+
var _a;
|
|
368
|
+
const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
369
|
+
const highlightRow = (_a = this.getAdaptableApi()
|
|
370
|
+
.internalApi.getSystemState()
|
|
371
|
+
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
372
|
+
return highlightRow.primaryKeyValue === primaryKeyValue;
|
|
373
|
+
});
|
|
374
|
+
if (highlightRow) {
|
|
375
|
+
return (0, StyleHelper_1.convertAdaptableStyleToCSS)(highlightRow.highlightStyle);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
getAlertRowStyle(params) {
|
|
379
|
+
var _a, _b;
|
|
380
|
+
const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
|
|
381
|
+
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;
|
|
382
|
+
if (highlightRow) {
|
|
383
|
+
return typeof highlightRow === 'object'
|
|
384
|
+
? (0, StyleHelper_1.convertAdaptableStyleToCSS)(highlightRow)
|
|
385
|
+
: {
|
|
386
|
+
backgroundColor: UIHelper_1.default.getColorByMessageType(alert.alertDefinition.MessageType),
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
getAlertRowClass(params) {
|
|
392
|
+
var _a, _b;
|
|
393
|
+
const alert = this.getAlertApi().internalApi.getAdaptableAlertWithHighlightRow(params.node);
|
|
394
|
+
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;
|
|
395
|
+
return typeof highlightRow === 'object' && (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName)
|
|
396
|
+
? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
|
|
397
|
+
: null;
|
|
398
|
+
}
|
|
399
|
+
getRowHighlightClass(params) {
|
|
400
|
+
var _a;
|
|
401
|
+
const primaryKeyValue = this.adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
402
|
+
const highlightRow = (_a = this.getAdaptableApi()
|
|
403
|
+
.internalApi.getSystemState()
|
|
404
|
+
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
405
|
+
return highlightRow.primaryKeyValue === primaryKeyValue;
|
|
406
|
+
});
|
|
407
|
+
return typeof (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.highlightStyle) === 'object'
|
|
408
|
+
? highlightRow.highlightStyle.ClassName
|
|
409
|
+
: null;
|
|
410
|
+
}
|
|
292
411
|
}
|
|
293
412
|
exports.GridInternalApi = GridInternalApi;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotesInternalApi = void 0;
|
|
4
|
+
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
5
|
+
class NotesInternalApi extends ApiBase_1.ApiBase {
|
|
6
|
+
areNotesAvailable() {
|
|
7
|
+
var _a;
|
|
8
|
+
const currentLayout = this.getLayoutApi().getCurrentLayout();
|
|
9
|
+
if (currentLayout.EnablePivot) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.NotesInternalApi = NotesInternalApi;
|
|
@@ -8,7 +8,7 @@ class TeamSharingInternalApi extends ApiBase_1.ApiBase {
|
|
|
8
8
|
* @param sharedEntity Entity that has been changed
|
|
9
9
|
*/
|
|
10
10
|
fireTeamSharingEntityChangedEvent(sharedEntity) {
|
|
11
|
-
if (this.adaptable.
|
|
11
|
+
if (this.adaptable.isReady) {
|
|
12
12
|
const teamSharingEntityChangedInfo = {
|
|
13
13
|
adaptableApi: this.adaptable.api,
|
|
14
14
|
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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INFINITE_TABLE_LICENSE_KEY = exports.ADAPTABLE_PUBLISH_TIMESTAMP = exports.ADAPTABLE_VERSION = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const env_1 = tslib_1.__importDefault(require("./env"));
|
|
6
|
+
exports.ADAPTABLE_VERSION = env_1.default.VERSION;
|
|
7
|
+
exports.ADAPTABLE_PUBLISH_TIMESTAMP = env_1.default.PUBLISH_TIMESTAMP;
|
|
8
|
+
exports.INFINITE_TABLE_LICENSE_KEY = env_1.default.INFINITE_TABLE_LICENSE_KEY;
|
|
@@ -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;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
|
|
3
|
+
exports.isWeightedAverageAggregation = exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
|
|
4
4
|
exports.WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
5
|
+
const isWeightedAverageAggregation = (aggFunc) => {
|
|
6
|
+
return (aggFunc === null || aggFunc === void 0 ? void 0 : aggFunc.type) === 'weightedAverage';
|
|
7
|
+
};
|
|
8
|
+
exports.isWeightedAverageAggregation = isWeightedAverageAggregation;
|
|
@@ -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
|
+
}
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LayoutGridFilterClear = exports.LayoutGridFilterUnSuspend = exports.LayoutGridFilterSuspend = exports.LayoutGridFilterSet = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_GRID_FILTER_CLEAR = exports.LAYOUT_GRID_FILTER_SET = exports.LAYOUT_GRID_FILTER_UNSUSPEND = exports.LAYOUT_GRID_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = void 0;
|
|
3
|
+
exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutAddColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LayoutGridFilterClear = exports.LayoutGridFilterUnSuspend = exports.LayoutGridFilterSuspend = exports.LayoutGridFilterSet = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_GRID_FILTER_CLEAR = exports.LAYOUT_GRID_FILTER_SET = exports.LAYOUT_GRID_FILTER_UNSUSPEND = exports.LAYOUT_GRID_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_ADD_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
@@ -32,6 +32,10 @@ exports.LAYOUT_SELECT = 'LAYOUT_SELECT';
|
|
|
32
32
|
* @ReduxAction A Layout has been (auto)saved
|
|
33
33
|
*/
|
|
34
34
|
exports.LAYOUT_SAVE = 'LAYOUT_SAVE';
|
|
35
|
+
/**
|
|
36
|
+
* @ReduxAction A Column has been added
|
|
37
|
+
*/
|
|
38
|
+
exports.LAYOUT_ADD_COLUMN = 'LAYOUT_ADD_COLUMN';
|
|
35
39
|
/**
|
|
36
40
|
* @ReduxAction A Column has been removed
|
|
37
41
|
*/
|
|
@@ -170,6 +174,12 @@ const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
|
|
|
170
174
|
caption,
|
|
171
175
|
});
|
|
172
176
|
exports.LayoutSetColumnCaption = LayoutSetColumnCaption;
|
|
177
|
+
const LayoutAddColumn = (layoutName, columnId) => ({
|
|
178
|
+
type: exports.LAYOUT_ADD_COLUMN,
|
|
179
|
+
layoutName,
|
|
180
|
+
columnId,
|
|
181
|
+
});
|
|
182
|
+
exports.LayoutAddColumn = LayoutAddColumn;
|
|
173
183
|
const LayoutRemoveColumn = (layoutName, columnId) => ({
|
|
174
184
|
type: exports.LAYOUT_REMOVE_COLUMN,
|
|
175
185
|
layoutName,
|
|
@@ -243,6 +253,17 @@ const LayoutReducer = (state = initialState, action) => {
|
|
|
243
253
|
}
|
|
244
254
|
return state;
|
|
245
255
|
}
|
|
256
|
+
case exports.LAYOUT_ADD_COLUMN: {
|
|
257
|
+
const addColumnAction = action;
|
|
258
|
+
const layoutname = addColumnAction.layoutName;
|
|
259
|
+
const colToAdd = addColumnAction.columnId;
|
|
260
|
+
let layoutToUpdate = state.Layouts.find((l) => l.Name === layoutname);
|
|
261
|
+
if (layoutToUpdate) {
|
|
262
|
+
layoutToUpdate.Columns.push(colToAdd);
|
|
263
|
+
return Object.assign(Object.assign({}, state), { Layouts: state.Layouts.map((abObject) => abObject.Uuid === layoutToUpdate.Uuid ? layoutToUpdate : abObject) });
|
|
264
|
+
}
|
|
265
|
+
return state;
|
|
266
|
+
}
|
|
246
267
|
case exports.LAYOUT_REMOVE_COLUMN: {
|
|
247
268
|
const removeColumnAction = action;
|
|
248
269
|
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
|
-
}) => import("../../PredefinedConfig/NotesState").AdaptableNotes;
|
|
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>;
|