@adaptabletools/adaptable 10.0.2 → 10.0.4-canary.2
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +84 -32
- package/bundle.cjs.js +350 -0
- package/index.css +100 -34
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +24 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +22 -15
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +49 -5
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +44 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +22 -15
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
- package/src/Api/Implementation/ColumnApiImpl.js +79 -44
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -41
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
- package/src/Api/Implementation/GridApiImpl.js +30 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
- package/src/Api/Implementation/InternalApiImpl.js +21 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
- package/src/Api/InternalApi.d.ts +4 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +19 -9
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +5 -1
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +3 -3
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +25 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -4
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
- package/src/Utilities/Helpers/DateHelper.js +30 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/ReportService.js +13 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +57 -38
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +21 -4
- package/src/agGrid/Adaptable.d.ts +28 -11
- package/src/agGrid/Adaptable.js +326 -168
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +176 -52
- package/src/metamodel/adaptable.metamodel.js +659 -366
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -124,6 +124,7 @@ class Adaptable {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
this._adaptableReady = false;
|
|
127
|
+
this.isDestroyed = false;
|
|
127
128
|
this.agGridModules = [];
|
|
128
129
|
this.isPluginLoaded = (pluginId) => {
|
|
129
130
|
const plugins = this.adaptableOptions.plugins || [];
|
|
@@ -137,7 +138,7 @@ class Adaptable {
|
|
|
137
138
|
};
|
|
138
139
|
this.isAgGridReady = () => {
|
|
139
140
|
var _a, _b;
|
|
140
|
-
const waitTimeout = (_b = (_a = this.adaptableOptions.containerOptions) === null || _a === void 0 ? void 0 : _a.
|
|
141
|
+
const waitTimeout = (_b = (_a = this.adaptableOptions.containerOptions) === null || _a === void 0 ? void 0 : _a.agGridContainerWaitTimeout) !== null && _b !== void 0 ? _b : 60000;
|
|
141
142
|
return waitForCondition_1.waitForCondition(() => !!this.gridOptions.api, waitTimeout);
|
|
142
143
|
};
|
|
143
144
|
// debounced methods
|
|
@@ -339,7 +340,8 @@ class Adaptable {
|
|
|
339
340
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
340
341
|
if (!this.getDefaultGroupOrderComparator(this.gridOptions) &&
|
|
341
342
|
this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
|
|
342
|
-
this.gridOptions.defaultGroupOrderComparator =
|
|
343
|
+
this.gridOptions.defaultGroupOrderComparator =
|
|
344
|
+
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
343
345
|
}
|
|
344
346
|
// we prefer the grid to be NOT instantiated so that we can do it
|
|
345
347
|
// perhaps in future we will force instantiation only?
|
|
@@ -357,7 +359,7 @@ class Adaptable {
|
|
|
357
359
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this);
|
|
358
360
|
this.MetamodelService = new MetamodelService_1.MetamodelService(this);
|
|
359
361
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
360
|
-
// Set up Modules - we set up all the Modules suitable for
|
|
362
|
+
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
361
363
|
// But users can make some hidden or readonly in their entitlements
|
|
362
364
|
this.modules = this.agGridHelper.setUpModules();
|
|
363
365
|
this.forPlugins((plugin) => plugin.afterInitModules(this, this.modules));
|
|
@@ -404,6 +406,9 @@ class Adaptable {
|
|
|
404
406
|
}
|
|
405
407
|
// Load the store
|
|
406
408
|
this.adaptableStore.Load.then(() => {
|
|
409
|
+
if (this.isDestroyed) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
407
412
|
this.initInternalGridLogic();
|
|
408
413
|
AdaptableHelper_1.default.checkValidPrimaryKey(this);
|
|
409
414
|
}, (e) => {
|
|
@@ -416,7 +421,7 @@ class Adaptable {
|
|
|
416
421
|
this.isInitialised = true;
|
|
417
422
|
});
|
|
418
423
|
if (this.abContainerElement == null) {
|
|
419
|
-
this.abContainerElement = this.
|
|
424
|
+
this.abContainerElement = this.getAdaptableContainerElement();
|
|
420
425
|
}
|
|
421
426
|
if (this.abContainerElement != null) {
|
|
422
427
|
this.abContainerElement.innerHTML = '';
|
|
@@ -478,23 +483,26 @@ class Adaptable {
|
|
|
478
483
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
479
484
|
this.api.eventApi.emit('AdaptableReady', {
|
|
480
485
|
adaptableApi: this.api,
|
|
481
|
-
|
|
486
|
+
gridOptions: this.adaptableOptions.vendorGrid,
|
|
482
487
|
});
|
|
483
488
|
}
|
|
484
489
|
});
|
|
485
490
|
}
|
|
486
491
|
performAudit(action, oldState, newState) {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
492
|
+
if (this.isInitialised) {
|
|
493
|
+
const adaptableStateChangedInfo = {
|
|
494
|
+
adaptableApi: this.api,
|
|
495
|
+
actionName: action.type,
|
|
496
|
+
clientTimestamp: new Date(),
|
|
497
|
+
userName: this.adaptableOptions.userName,
|
|
498
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
499
|
+
adaptableStateKey: this.adaptableOptions.adaptableStateKey,
|
|
500
|
+
action: action,
|
|
501
|
+
oldState: oldState,
|
|
502
|
+
newState: newState,
|
|
503
|
+
};
|
|
504
|
+
this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
|
|
505
|
+
}
|
|
498
506
|
}
|
|
499
507
|
initializeAgGrid() {
|
|
500
508
|
var _a;
|
|
@@ -551,12 +559,12 @@ class Adaptable {
|
|
|
551
559
|
}
|
|
552
560
|
}
|
|
553
561
|
}
|
|
554
|
-
const
|
|
555
|
-
let
|
|
556
|
-
if (!
|
|
557
|
-
|
|
558
|
-
if (!
|
|
559
|
-
LoggingHelper_1.ConsoleLogError('You must provide an element id in `containerOptions.
|
|
562
|
+
const checkAgGridContainer = () => {
|
|
563
|
+
let agGridContainer = this.getAgGridContainerElement();
|
|
564
|
+
if (!agGridContainer) {
|
|
565
|
+
agGridContainer = this.initAgGridContainerFromInitializedAgGrid();
|
|
566
|
+
if (!agGridContainer) {
|
|
567
|
+
LoggingHelper_1.ConsoleLogError('You must provide an element id in `containerOptions.agGridContainer`');
|
|
560
568
|
return false;
|
|
561
569
|
}
|
|
562
570
|
}
|
|
@@ -564,14 +572,14 @@ class Adaptable {
|
|
|
564
572
|
};
|
|
565
573
|
const isGridInstantiated = this.gridOptions.api && typeof this.gridOptions.api.getValue === 'function';
|
|
566
574
|
if (isGridInstantiated) {
|
|
567
|
-
if (!
|
|
575
|
+
if (!checkAgGridContainer()) {
|
|
568
576
|
return Promise.resolve(false);
|
|
569
577
|
}
|
|
570
578
|
return Promise.resolve(true);
|
|
571
579
|
}
|
|
572
580
|
if (this.runtimeConfig.waitForAgGrid) {
|
|
573
581
|
return this.isAgGridReady().then(() => {
|
|
574
|
-
this.
|
|
582
|
+
this.initAgGridContainerFromInitializedAgGrid();
|
|
575
583
|
return Promise.resolve(true);
|
|
576
584
|
}, () => {
|
|
577
585
|
LoggingHelper_1.ConsoleLogError(`Could not find any agGrid instance rendered. Could not find reference to ag-grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AgGrid`);
|
|
@@ -579,7 +587,7 @@ class Adaptable {
|
|
|
579
587
|
});
|
|
580
588
|
}
|
|
581
589
|
else {
|
|
582
|
-
if (!
|
|
590
|
+
if (!checkAgGridContainer()) {
|
|
583
591
|
return Promise.resolve(false);
|
|
584
592
|
}
|
|
585
593
|
}
|
|
@@ -587,11 +595,11 @@ class Adaptable {
|
|
|
587
595
|
let grid;
|
|
588
596
|
const modules = (this.adaptableOptions.vendorGrid || {}).modules || [];
|
|
589
597
|
this.agGridModules = [...this.agGridModules, ...modules];
|
|
590
|
-
const
|
|
598
|
+
const agGridContainer = this.getAgGridContainerElement();
|
|
591
599
|
if (this.gridOptions.modules) {
|
|
592
600
|
delete this.gridOptions.modules;
|
|
593
601
|
}
|
|
594
|
-
grid = new all_modules_1.Grid(
|
|
602
|
+
grid = new all_modules_1.Grid(agGridContainer, this.gridOptions, { modules });
|
|
595
603
|
// add our adaptable object to the grid options api object
|
|
596
604
|
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
597
605
|
if (this.gridOptions.api) {
|
|
@@ -599,8 +607,8 @@ class Adaptable {
|
|
|
599
607
|
}
|
|
600
608
|
return Promise.resolve(grid != null);
|
|
601
609
|
}
|
|
602
|
-
|
|
603
|
-
if (this.
|
|
610
|
+
initAgGridContainerFromInitializedAgGrid() {
|
|
611
|
+
if (this.getAgGridContainerElement()) {
|
|
604
612
|
return;
|
|
605
613
|
}
|
|
606
614
|
const layoutElements = this.gridOptions.api
|
|
@@ -612,21 +620,21 @@ class Adaptable {
|
|
|
612
620
|
// aggrid 25.3.0 doesn't have layoutElements anymore, so we try to retrieve this element
|
|
613
621
|
layoutElements.push(this.gridOptions.api.gridBodyCon.eGridBody);
|
|
614
622
|
}
|
|
615
|
-
let
|
|
623
|
+
let agGridContainer;
|
|
616
624
|
for (let i = 0, len = layoutElements.length; i < len; i++) {
|
|
617
625
|
const element = layoutElements[i];
|
|
618
626
|
if (element && element.matches('.ag-root-wrapper, .ag-root')) {
|
|
619
627
|
const gridContainer = element.closest('[class*="ag-theme"]');
|
|
620
628
|
if (gridContainer) {
|
|
621
|
-
|
|
629
|
+
agGridContainer = gridContainer;
|
|
622
630
|
break;
|
|
623
631
|
}
|
|
624
632
|
}
|
|
625
633
|
}
|
|
626
|
-
if (!
|
|
627
|
-
LoggingHelper_1.ConsoleLogError(`Could not find the
|
|
634
|
+
if (!agGridContainer) {
|
|
635
|
+
LoggingHelper_1.ConsoleLogError(`Could not find the AG Grid Container. This will probably break some AdapTable functionality.`);
|
|
628
636
|
}
|
|
629
|
-
return (this.adaptableOptions.containerOptions.
|
|
637
|
+
return (this.adaptableOptions.containerOptions.agGridContainer = agGridContainer);
|
|
630
638
|
}
|
|
631
639
|
filterOnEditDataChange() {
|
|
632
640
|
if (this.adaptableOptions.filterOptions.filterActionOnUserDataChange.applyFilter ==
|
|
@@ -720,7 +728,7 @@ class Adaptable {
|
|
|
720
728
|
// }
|
|
721
729
|
// }
|
|
722
730
|
const allColumns = [];
|
|
723
|
-
const
|
|
731
|
+
const agGridCols = this.gridOptions.columnApi.getAllColumns();
|
|
724
732
|
const columnGroupChildren = this.gridOptions.columnApi.getAllDisplayedColumnGroups();
|
|
725
733
|
const groupsCount = {};
|
|
726
734
|
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
@@ -734,31 +742,31 @@ class Adaptable {
|
|
|
734
742
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
735
743
|
columnsInGroup.forEach((col) => {
|
|
736
744
|
const group = {
|
|
737
|
-
|
|
738
|
-
FriendlyName,
|
|
739
|
-
|
|
740
|
-
|
|
745
|
+
columnGroupId: ColumnGroupId,
|
|
746
|
+
friendlyName: FriendlyName,
|
|
747
|
+
allowGroupSplit: AllowGroupSplit,
|
|
748
|
+
groupCount: 0,
|
|
741
749
|
};
|
|
742
|
-
groupsCount[group.
|
|
743
|
-
groupsCount[group.
|
|
750
|
+
groupsCount[group.columnGroupId] = groupsCount[group.columnGroupId] || 0;
|
|
751
|
+
groupsCount[group.columnGroupId] += columnsInGroup.length;
|
|
744
752
|
acc[col.getColId()] = group;
|
|
745
753
|
});
|
|
746
754
|
return acc;
|
|
747
755
|
}, {});
|
|
748
756
|
Object.keys(colsToGroups).forEach((colId) => {
|
|
749
|
-
colsToGroups[colId].
|
|
757
|
+
colsToGroups[colId].groupCount = groupsCount[colsToGroups[colId].columnGroupId];
|
|
750
758
|
});
|
|
751
759
|
// TODO sort the visible columns by layout order
|
|
752
|
-
|
|
753
|
-
const colId =
|
|
760
|
+
agGridCols.forEach((agGridColumn) => {
|
|
761
|
+
const colId = agGridColumn.getColId();
|
|
754
762
|
if (!this.api.columnApi.isRowGroupColumn(colId)) {
|
|
755
|
-
allColumns.push(this.createAdaptableColumn(
|
|
763
|
+
allColumns.push(this.createAdaptableColumn(agGridColumn, colsToGroups));
|
|
756
764
|
}
|
|
757
765
|
});
|
|
758
766
|
this.api.internalApi.setColumns(allColumns);
|
|
759
767
|
}
|
|
760
|
-
createAdaptableColumn(
|
|
761
|
-
const abColumn = this.agGridHelper.
|
|
768
|
+
createAdaptableColumn(agGridColumn, colsToGroups) {
|
|
769
|
+
const abColumn = this.agGridHelper.createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups);
|
|
762
770
|
return abColumn;
|
|
763
771
|
}
|
|
764
772
|
safeSetColDefs(colDefs) {
|
|
@@ -838,7 +846,8 @@ class Adaptable {
|
|
|
838
846
|
var _a;
|
|
839
847
|
return ((_a = aa.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
|
|
840
848
|
aa.dataChangedInfo &&
|
|
841
|
-
aa.dataChangedInfo.
|
|
849
|
+
aa.dataChangedInfo.column &&
|
|
850
|
+
aa.dataChangedInfo.column.columnId === col.columnId &&
|
|
842
851
|
aa.dataChangedInfo.rowNode === params.node;
|
|
843
852
|
});
|
|
844
853
|
const alert = activeAlerts[0];
|
|
@@ -866,7 +875,7 @@ class Adaptable {
|
|
|
866
875
|
}
|
|
867
876
|
getFlashingAlertCellStyle(col, params) {
|
|
868
877
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
869
|
-
return this.getFlashingAlertStyleFor(primaryKeyValue, col.
|
|
878
|
+
return this.getFlashingAlertStyleFor(primaryKeyValue, col.columnId);
|
|
870
879
|
}
|
|
871
880
|
getCellHighlightStyle(col, params) {
|
|
872
881
|
var _a;
|
|
@@ -874,7 +883,7 @@ class Adaptable {
|
|
|
874
883
|
const cellHightlight = this.api.internalApi
|
|
875
884
|
.getSystemState()
|
|
876
885
|
.HighlightedCells.find((cellHighlightInfo) => {
|
|
877
|
-
return (col.
|
|
886
|
+
return (col.columnId === cellHighlightInfo.columnId &&
|
|
878
887
|
cellHighlightInfo.primaryKeyValue === primaryKeyValue);
|
|
879
888
|
});
|
|
880
889
|
if (cellHightlight) {
|
|
@@ -903,7 +912,7 @@ class Adaptable {
|
|
|
903
912
|
if (!editableCellStyle) {
|
|
904
913
|
return undefined;
|
|
905
914
|
}
|
|
906
|
-
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.
|
|
915
|
+
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
|
|
907
916
|
if (gridCell) {
|
|
908
917
|
if (this.api.gridApi.areCellsEditable([gridCell])) {
|
|
909
918
|
return this.convertAdaptableStyleToCSS(editableCellStyle);
|
|
@@ -916,7 +925,7 @@ class Adaptable {
|
|
|
916
925
|
if (!editableCellStyle) {
|
|
917
926
|
return undefined;
|
|
918
927
|
}
|
|
919
|
-
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.
|
|
928
|
+
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
|
|
920
929
|
if (gridCell) {
|
|
921
930
|
if (!this.api.gridApi.areCellsEditable([gridCell])) {
|
|
922
931
|
return this.convertAdaptableStyleToCSS(editableCellStyle);
|
|
@@ -950,8 +959,28 @@ class Adaptable {
|
|
|
950
959
|
.join(' ');
|
|
951
960
|
return classNames;
|
|
952
961
|
}
|
|
962
|
+
getEditableCellClass(abColumn, params) {
|
|
963
|
+
const editableCellStyle = this.api.userInterfaceApi.getEditableCellStyle();
|
|
964
|
+
if (!(editableCellStyle === null || editableCellStyle === void 0 ? void 0 : editableCellStyle.ClassName)) {
|
|
965
|
+
return null;
|
|
966
|
+
}
|
|
967
|
+
const isCellEditable = this.api.gridApi.areCellsEditable([
|
|
968
|
+
this.getGridCellFromRowNode(params.node, abColumn.columnId),
|
|
969
|
+
]);
|
|
970
|
+
return isCellEditable ? editableCellStyle.ClassName : null;
|
|
971
|
+
}
|
|
972
|
+
getReadonlyCellClass(abColumn, params) {
|
|
973
|
+
const readonlyCellStyle = this.api.userInterfaceApi.getReadOnlyCellStyle();
|
|
974
|
+
if (!(readonlyCellStyle === null || readonlyCellStyle === void 0 ? void 0 : readonlyCellStyle.ClassName)) {
|
|
975
|
+
return null;
|
|
976
|
+
}
|
|
977
|
+
const isCellReadonly = !this.api.gridApi.areCellsEditable([
|
|
978
|
+
this.getGridCellFromRowNode(params.node, abColumn.columnId),
|
|
979
|
+
]);
|
|
980
|
+
return isCellReadonly ? readonlyCellStyle.ClassName : null;
|
|
981
|
+
}
|
|
953
982
|
isQuickSearchActive(abColumn, params) {
|
|
954
|
-
if (abColumn.
|
|
983
|
+
if (abColumn.isExcludedFromQuickSearch) {
|
|
955
984
|
return false;
|
|
956
985
|
}
|
|
957
986
|
if (!params.node || params.node.group) {
|
|
@@ -961,7 +990,7 @@ class Adaptable {
|
|
|
961
990
|
if (StringExtensions_1.StringExtensions.IsNullOrEmpty(quickSearchValue)) {
|
|
962
991
|
return false;
|
|
963
992
|
}
|
|
964
|
-
const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.
|
|
993
|
+
const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.columnId, 'Contains', [quickSearchValue]);
|
|
965
994
|
return this.api.filterApi.evaluateColumnFilter(columnFilter, params.node);
|
|
966
995
|
}
|
|
967
996
|
getPrimaryKeyValueFromRowNode(rowNode) {
|
|
@@ -1325,7 +1354,7 @@ class Adaptable {
|
|
|
1325
1354
|
const colId = column.getColId();
|
|
1326
1355
|
const selectedColumn = this.api.columnApi.getColumnFromId(colId);
|
|
1327
1356
|
if (selectedColumn &&
|
|
1328
|
-
columns.find((c) => c.
|
|
1357
|
+
columns.find((c) => c.columnId == selectedColumn.columnId) == null) {
|
|
1329
1358
|
columns.push(selectedColumn);
|
|
1330
1359
|
}
|
|
1331
1360
|
for (let rowIndex = y1; rowIndex <= y2; rowIndex++) {
|
|
@@ -1365,7 +1394,9 @@ class Adaptable {
|
|
|
1365
1394
|
isMaster: !!(node.master != null && node.master == true),
|
|
1366
1395
|
isExpanded: !!(node.expanded != null && node.expanded == true),
|
|
1367
1396
|
isGroup: !!(node.group != null && node.group == true),
|
|
1368
|
-
|
|
1397
|
+
isSelected: true,
|
|
1398
|
+
isDisplayed: node.displayed == true,
|
|
1399
|
+
rowGroupLevel: node.level,
|
|
1369
1400
|
};
|
|
1370
1401
|
const gridRow = {
|
|
1371
1402
|
primaryKeyValue: this.getPrimaryKeyValueFromRowNode(node),
|
|
@@ -1384,20 +1415,20 @@ class Adaptable {
|
|
|
1384
1415
|
setValue(dataChangedInfo) {
|
|
1385
1416
|
// note: because we use rownode set data value this will cause Validation to fire
|
|
1386
1417
|
let newValue;
|
|
1387
|
-
let dataType =
|
|
1418
|
+
let dataType = dataChangedInfo.column.dataType;
|
|
1388
1419
|
newValue =
|
|
1389
1420
|
dataType == Enums_1.DataType.Number ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
|
|
1390
1421
|
if (dataType == undefined) {
|
|
1391
1422
|
return; // no point continuing as probably a wrong column
|
|
1392
1423
|
}
|
|
1393
1424
|
if (dataChangedInfo.rowNode) {
|
|
1394
|
-
dataChangedInfo.rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1425
|
+
dataChangedInfo.rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
|
|
1395
1426
|
}
|
|
1396
1427
|
else {
|
|
1397
1428
|
if (this.useRowNodeLookUp) {
|
|
1398
1429
|
const rowNode = this.gridOptions.api.getRowNode(dataChangedInfo.primaryKeyValue);
|
|
1399
1430
|
if (rowNode != null) {
|
|
1400
|
-
rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1431
|
+
rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
|
|
1401
1432
|
dataChangedInfo.rowNode = rowNode;
|
|
1402
1433
|
}
|
|
1403
1434
|
}
|
|
@@ -1407,7 +1438,7 @@ class Adaptable {
|
|
|
1407
1438
|
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1408
1439
|
if (!isUpdated) {
|
|
1409
1440
|
if (dataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
|
|
1410
|
-
rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1441
|
+
rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
|
|
1411
1442
|
dataChangedInfo.rowNode = rowNode;
|
|
1412
1443
|
isUpdated = true;
|
|
1413
1444
|
}
|
|
@@ -1419,18 +1450,19 @@ class Adaptable {
|
|
|
1419
1450
|
cancelEdit() {
|
|
1420
1451
|
this.gridOptions.api.stopEditing(true);
|
|
1421
1452
|
}
|
|
1422
|
-
getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode) {
|
|
1453
|
+
getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, permittedValues) {
|
|
1423
1454
|
let returnValues = [];
|
|
1424
1455
|
// this function does NOT look up for server values but actually it should...
|
|
1425
1456
|
// that is currently commented out in the column api function (previously in filter form)
|
|
1426
|
-
|
|
1457
|
+
permittedValues = permittedValues !== null && permittedValues !== void 0 ? permittedValues : this.api.userInterfaceApi.getPermittedValuesForColumn(column);
|
|
1427
1458
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNull(permittedValues)) {
|
|
1428
1459
|
returnValues = permittedValues.map((pv) => {
|
|
1429
1460
|
return {
|
|
1430
1461
|
rawValue: pv,
|
|
1431
1462
|
displayValue: pv,
|
|
1432
1463
|
normalisedValue: pv,
|
|
1433
|
-
columnId: column.
|
|
1464
|
+
columnId: column.columnId,
|
|
1465
|
+
column: column,
|
|
1434
1466
|
rowNode: undefined,
|
|
1435
1467
|
};
|
|
1436
1468
|
});
|
|
@@ -1438,7 +1470,7 @@ class Adaptable {
|
|
|
1438
1470
|
else {
|
|
1439
1471
|
if (visibleRowsOnly) {
|
|
1440
1472
|
this.gridOptions.api.forEachNodeAfterFilter((rowNode) => {
|
|
1441
|
-
const gridCell = this.addDistinctColumnValue(rowNode, column.
|
|
1473
|
+
const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
|
|
1442
1474
|
if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
|
|
1443
1475
|
returnValues.push(gridCell);
|
|
1444
1476
|
}
|
|
@@ -1446,7 +1478,7 @@ class Adaptable {
|
|
|
1446
1478
|
}
|
|
1447
1479
|
else {
|
|
1448
1480
|
this.gridOptions.api.forEachNode((rowNode) => {
|
|
1449
|
-
const gridCell = this.addDistinctColumnValue(rowNode, column.
|
|
1481
|
+
const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
|
|
1450
1482
|
if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
|
|
1451
1483
|
returnValues.push(gridCell);
|
|
1452
1484
|
}
|
|
@@ -1456,6 +1488,60 @@ class Adaptable {
|
|
|
1456
1488
|
const uniqueVals = uniqBy_1.default(returnValues, 'displayValue');
|
|
1457
1489
|
return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
|
|
1458
1490
|
}
|
|
1491
|
+
async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
|
|
1492
|
+
var _a;
|
|
1493
|
+
const permittedValues = (_a = this.api.userInterfaceApi.getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
|
|
1494
|
+
suppressFilterSearchBar: false,
|
|
1495
|
+
values: () => undefined,
|
|
1496
|
+
};
|
|
1497
|
+
let preparedPermittedValues = undefined;
|
|
1498
|
+
try {
|
|
1499
|
+
const filterPermittedValuesParams = {
|
|
1500
|
+
adaptableApi: this.api,
|
|
1501
|
+
column: column,
|
|
1502
|
+
filter: filter,
|
|
1503
|
+
};
|
|
1504
|
+
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(filterPermittedValuesParams));
|
|
1505
|
+
}
|
|
1506
|
+
catch (error) {
|
|
1507
|
+
LoggingHelper_1.ConsoleLogError(`Failed to load filter permitted values`, column, filter, error);
|
|
1508
|
+
}
|
|
1509
|
+
return {
|
|
1510
|
+
suppressClientSideFilter: permittedValues.suppressFilterSearchBar,
|
|
1511
|
+
gridCells: this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues),
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
async getDistinctCustomSortValuesForColumn(column, visibleRowsOnly, skipRowNode) {
|
|
1515
|
+
const permittedValues = await this.api.userInterfaceApi.getCustomSortPermittedValuesForColumn(column);
|
|
1516
|
+
let preparedPermittedValues = undefined;
|
|
1517
|
+
try {
|
|
1518
|
+
const permittedValuesParams = {
|
|
1519
|
+
adaptableApi: this.api,
|
|
1520
|
+
column: column,
|
|
1521
|
+
};
|
|
1522
|
+
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(permittedValuesParams));
|
|
1523
|
+
}
|
|
1524
|
+
catch (error) {
|
|
1525
|
+
LoggingHelper_1.ConsoleLogError(`Failed to load custom sort permitted values`, column, error);
|
|
1526
|
+
}
|
|
1527
|
+
return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
|
|
1528
|
+
}
|
|
1529
|
+
async getDistinctBulkUpdateValuesForColumn(column, visibleRowsOnly, selectedGridCells, skipRowNode) {
|
|
1530
|
+
const permittedValues = await this.api.userInterfaceApi.getBulkUpdatePermittedValuesForColumn(column);
|
|
1531
|
+
let preparedPermittedValues = undefined;
|
|
1532
|
+
try {
|
|
1533
|
+
const bulkUpdatePermittedValuesParams = {
|
|
1534
|
+
adaptableApi: this.api,
|
|
1535
|
+
column: column,
|
|
1536
|
+
gridCells: selectedGridCells,
|
|
1537
|
+
};
|
|
1538
|
+
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(bulkUpdatePermittedValuesParams));
|
|
1539
|
+
}
|
|
1540
|
+
catch (error) {
|
|
1541
|
+
LoggingHelper_1.ConsoleLogError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
|
|
1542
|
+
}
|
|
1543
|
+
return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
|
|
1544
|
+
}
|
|
1459
1545
|
getColumnValueDisplayValuePairList(columnId, visibleRowsOnly, onlyIncludeIds) {
|
|
1460
1546
|
const returnArray = [];
|
|
1461
1547
|
let permittedMap = new Map();
|
|
@@ -1469,7 +1555,7 @@ class Adaptable {
|
|
|
1469
1555
|
rawValue: pv,
|
|
1470
1556
|
displayValue: pv,
|
|
1471
1557
|
normalisedValue: pv,
|
|
1472
|
-
|
|
1558
|
+
column: abColumn,
|
|
1473
1559
|
rowNode: undefined,
|
|
1474
1560
|
});
|
|
1475
1561
|
});
|
|
@@ -1518,7 +1604,7 @@ class Adaptable {
|
|
|
1518
1604
|
}
|
|
1519
1605
|
shouldUseRawValueForColumn(column) {
|
|
1520
1606
|
// we need to return false if the column has a cell rendeerer i think...
|
|
1521
|
-
const colDef = this.gridOptions.api.getColumnDef(column.
|
|
1607
|
+
const colDef = this.gridOptions.api.getColumnDef(column.columnId);
|
|
1522
1608
|
if (colDef && colDef.cellRenderer != null) {
|
|
1523
1609
|
return true;
|
|
1524
1610
|
}
|
|
@@ -1563,7 +1649,7 @@ class Adaptable {
|
|
|
1563
1649
|
rawValue: rawValue,
|
|
1564
1650
|
displayValue: displayValue,
|
|
1565
1651
|
normalisedValue: normalisedvalue,
|
|
1566
|
-
|
|
1652
|
+
column: abColumn,
|
|
1567
1653
|
primaryKeyValue: pkValue,
|
|
1568
1654
|
rowNode: rowNode,
|
|
1569
1655
|
};
|
|
@@ -1794,9 +1880,10 @@ class Adaptable {
|
|
|
1794
1880
|
];
|
|
1795
1881
|
}
|
|
1796
1882
|
getColDefsForFreeTextColumns() {
|
|
1797
|
-
|
|
1798
|
-
|
|
1883
|
+
const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns;
|
|
1884
|
+
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable).FreeTextColumnSettings;
|
|
1799
1885
|
return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
|
|
1886
|
+
const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
|
|
1800
1887
|
const dataTypeEditor = freeTextColumn.DataType === 'Number'
|
|
1801
1888
|
? AdaptableNumberEditor_1.AdaptableNumberEditor
|
|
1802
1889
|
: freeTextColumn.DataType === 'Date'
|
|
@@ -1808,10 +1895,16 @@ class Adaptable {
|
|
|
1808
1895
|
colId: freeTextColumn.ColumnId,
|
|
1809
1896
|
editable: true,
|
|
1810
1897
|
hide: true,
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1898
|
+
width: freeTextColumnSettings.Width,
|
|
1899
|
+
enableValue: freeTextColumnSettings.Aggregatable,
|
|
1900
|
+
filter: freeTextColumnSettings.Filterable,
|
|
1901
|
+
floatingFilter: freeTextColumnSettings.Filterable,
|
|
1902
|
+
resizable: freeTextColumnSettings.Resizable,
|
|
1903
|
+
enableRowGroup: freeTextColumnSettings.Groupable,
|
|
1904
|
+
sortable: freeTextColumnSettings.Sortable,
|
|
1905
|
+
enablePivot: freeTextColumnSettings.Pivotable,
|
|
1906
|
+
suppressMenu: freeTextColumnSettings.SuppressMenu,
|
|
1907
|
+
suppressMovable: freeTextColumnSettings.SuppressMovable,
|
|
1815
1908
|
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
1816
1909
|
? 'agLargeTextCellEditor'
|
|
1817
1910
|
: 'agTextCellEditor'),
|
|
@@ -1846,15 +1939,24 @@ class Adaptable {
|
|
|
1846
1939
|
}
|
|
1847
1940
|
}
|
|
1848
1941
|
getColDefsForActionColumns() {
|
|
1942
|
+
const defaultActionColumnSettings = {
|
|
1943
|
+
resizable: true,
|
|
1944
|
+
suppressMenu: false,
|
|
1945
|
+
suppressMovable: false,
|
|
1946
|
+
};
|
|
1849
1947
|
return this.api.userInterfaceApi.getAllActionColumn().map((actionColumn) => {
|
|
1948
|
+
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
1850
1949
|
const newColDef = {
|
|
1851
1950
|
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
1852
1951
|
colId: actionColumn.columnId,
|
|
1853
|
-
editable: false,
|
|
1854
1952
|
hide: false,
|
|
1953
|
+
editable: false,
|
|
1954
|
+
width: actionColumnSettings.width,
|
|
1955
|
+
resizable: actionColumnSettings.resizable,
|
|
1956
|
+
suppressMenu: actionColumnSettings.suppressMenu,
|
|
1957
|
+
suppressMovable: actionColumnSettings.suppressMovable,
|
|
1855
1958
|
filter: false,
|
|
1856
1959
|
sortable: false,
|
|
1857
|
-
resizable: true,
|
|
1858
1960
|
enableRowGroup: false,
|
|
1859
1961
|
cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
1860
1962
|
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
@@ -1881,16 +1983,17 @@ class Adaptable {
|
|
|
1881
1983
|
this.setLayout();
|
|
1882
1984
|
}
|
|
1883
1985
|
getColDefsForCalculatedColumns() {
|
|
1986
|
+
const specialColumnsAreFilterable = this.adaptableOptions.filterOptions
|
|
1987
|
+
.enableFilterOnSpecialColumns
|
|
1988
|
+
? this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
|
|
1989
|
+
: true;
|
|
1990
|
+
const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable).CalculatedColumnSettings;
|
|
1884
1991
|
return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
|
|
1885
1992
|
var _a;
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
:
|
|
1890
|
-
calculatedColumn.CalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(filterable).CalculatedColumnSettings;
|
|
1891
|
-
}
|
|
1892
|
-
if (!calculatedColumn.CalculatedColumnSettings.DataType) {
|
|
1893
|
-
calculatedColumn.CalculatedColumnSettings.DataType = this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
1993
|
+
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
1994
|
+
if (!calculatedColumnSettings.DataType) {
|
|
1995
|
+
calculatedColumnSettings.DataType =
|
|
1996
|
+
this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
1894
1997
|
}
|
|
1895
1998
|
const newColDef = {
|
|
1896
1999
|
headerName: calculatedColumn.FriendlyName
|
|
@@ -1899,25 +2002,27 @@ class Adaptable {
|
|
|
1899
2002
|
colId: calculatedColumn.ColumnId,
|
|
1900
2003
|
hide: true,
|
|
1901
2004
|
editable: false,
|
|
1902
|
-
width:
|
|
1903
|
-
enableValue:
|
|
1904
|
-
filter:
|
|
1905
|
-
floatingFilter:
|
|
1906
|
-
resizable:
|
|
1907
|
-
enableRowGroup:
|
|
1908
|
-
sortable:
|
|
1909
|
-
enablePivot:
|
|
2005
|
+
width: calculatedColumnSettings.Width,
|
|
2006
|
+
enableValue: calculatedColumnSettings.Aggregatable,
|
|
2007
|
+
filter: calculatedColumnSettings.Filterable,
|
|
2008
|
+
floatingFilter: calculatedColumnSettings.Filterable,
|
|
2009
|
+
resizable: calculatedColumnSettings.Resizable,
|
|
2010
|
+
enableRowGroup: calculatedColumnSettings.Groupable,
|
|
2011
|
+
sortable: calculatedColumnSettings.Sortable,
|
|
2012
|
+
enablePivot: calculatedColumnSettings.Pivotable,
|
|
2013
|
+
suppressMenu: calculatedColumnSettings.SuppressMenu,
|
|
2014
|
+
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
1910
2015
|
type: [
|
|
1911
2016
|
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1912
|
-
this.agGridHelper.getAgGridDataType(
|
|
2017
|
+
this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
1913
2018
|
],
|
|
1914
2019
|
valueGetter: (params) => {
|
|
1915
2020
|
var _a;
|
|
1916
2021
|
return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
|
|
1917
2022
|
},
|
|
1918
2023
|
};
|
|
1919
|
-
if (
|
|
1920
|
-
|
|
2024
|
+
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
2025
|
+
calculatedColumnSettings.ShowToolTip == true) {
|
|
1921
2026
|
newColDef.tooltipValueGetter = () => {
|
|
1922
2027
|
var _a;
|
|
1923
2028
|
return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression;
|
|
@@ -1986,7 +2091,7 @@ class Adaptable {
|
|
|
1986
2091
|
this.emitter = null;
|
|
1987
2092
|
this._adaptableReady = false;
|
|
1988
2093
|
Adaptable.dismissInstance(this);
|
|
1989
|
-
const abContainerElement = this.
|
|
2094
|
+
const abContainerElement = this.getAdaptableContainerElement();
|
|
1990
2095
|
if (config && !config.unmount) {
|
|
1991
2096
|
return;
|
|
1992
2097
|
}
|
|
@@ -2004,6 +2109,7 @@ class Adaptable {
|
|
|
2004
2109
|
(_j = this.TeamSharingService) === null || _j === void 0 ? void 0 : _j.destroy();
|
|
2005
2110
|
(_k = this.MetamodelService) === null || _k === void 0 ? void 0 : _k.destroy();
|
|
2006
2111
|
(_l = this.LicenseService) === null || _l === void 0 ? void 0 : _l.destroy();
|
|
2112
|
+
this.isDestroyed = true;
|
|
2007
2113
|
}
|
|
2008
2114
|
// really really need to do this properly but as a temp fix lets create a default style for when no data
|
|
2009
2115
|
getDefaultIPPStyle() {
|
|
@@ -2018,7 +2124,7 @@ class Adaptable {
|
|
|
2018
2124
|
height: 65,
|
|
2019
2125
|
Columns: this.api.columnApi.getColumns().map((col) => {
|
|
2020
2126
|
return {
|
|
2021
|
-
columnFriendlyName: col.
|
|
2127
|
+
columnFriendlyName: col.friendlyName,
|
|
2022
2128
|
width: 200,
|
|
2023
2129
|
textAlign: 'start',
|
|
2024
2130
|
};
|
|
@@ -2035,7 +2141,7 @@ class Adaptable {
|
|
|
2035
2141
|
height: 30,
|
|
2036
2142
|
Columns: this.api.columnApi.getColumns().map((col) => {
|
|
2037
2143
|
return {
|
|
2038
|
-
columnFriendlyName: col.
|
|
2144
|
+
columnFriendlyName: col.friendlyName,
|
|
2039
2145
|
width: 200,
|
|
2040
2146
|
textAlign: 'start',
|
|
2041
2147
|
};
|
|
@@ -2048,7 +2154,7 @@ class Adaptable {
|
|
|
2048
2154
|
getCurrentIPPStyle() {
|
|
2049
2155
|
return this.agGridHelper.getCurrentIPPStyle();
|
|
2050
2156
|
}
|
|
2051
|
-
|
|
2157
|
+
getAdaptableContainerElement() {
|
|
2052
2158
|
if (!this.abContainerElement) {
|
|
2053
2159
|
let containerOptionsContainer = this.adaptableOptions.containerOptions.adaptableContainer;
|
|
2054
2160
|
this.abContainerElement =
|
|
@@ -2072,19 +2178,19 @@ class Adaptable {
|
|
|
2072
2178
|
}
|
|
2073
2179
|
return this.abContainerElement;
|
|
2074
2180
|
}
|
|
2075
|
-
|
|
2181
|
+
getAgGridContainerElement() {
|
|
2076
2182
|
if (!this.gridContainerElement) {
|
|
2077
2183
|
this.gridContainerElement =
|
|
2078
|
-
typeof this.adaptableOptions.containerOptions.
|
|
2079
|
-
? document.getElementById(this.adaptableOptions.containerOptions.
|
|
2080
|
-
: this.adaptableOptions.containerOptions.
|
|
2184
|
+
typeof this.adaptableOptions.containerOptions.agGridContainer === 'string'
|
|
2185
|
+
? document.getElementById(this.adaptableOptions.containerOptions.agGridContainer)
|
|
2186
|
+
: this.adaptableOptions.containerOptions.agGridContainer;
|
|
2081
2187
|
}
|
|
2082
2188
|
return this.gridContainerElement;
|
|
2083
2189
|
}
|
|
2084
2190
|
initInternalGridLogic() {
|
|
2085
2191
|
LoggingHelper_1.LogAdaptableInfo(`Initializing InternalGridLogic...`);
|
|
2086
2192
|
if (this.abContainerElement == null) {
|
|
2087
|
-
this.abContainerElement = this.
|
|
2193
|
+
this.abContainerElement = this.getAdaptableContainerElement();
|
|
2088
2194
|
}
|
|
2089
2195
|
if (this.abContainerElement == null) {
|
|
2090
2196
|
if (typeof this.adaptableOptions.containerOptions.adaptableContainer === 'string') {
|
|
@@ -2095,7 +2201,7 @@ class Adaptable {
|
|
|
2095
2201
|
}
|
|
2096
2202
|
return;
|
|
2097
2203
|
}
|
|
2098
|
-
const gridContainerElement = this.
|
|
2204
|
+
const gridContainerElement = this.getAgGridContainerElement();
|
|
2099
2205
|
if (gridContainerElement) {
|
|
2100
2206
|
gridContainerElement.addEventListener('keydown', (event) => this._emit('KeyDown', event));
|
|
2101
2207
|
}
|
|
@@ -2145,7 +2251,7 @@ class Adaptable {
|
|
|
2145
2251
|
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
2146
2252
|
if (cellEditableFn) {
|
|
2147
2253
|
let gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
2148
|
-
let isEditable = cellEditableFn(gridCell
|
|
2254
|
+
let isEditable = cellEditableFn(gridCell);
|
|
2149
2255
|
if (!isEditable) {
|
|
2150
2256
|
this.gridOptions.api.stopEditing();
|
|
2151
2257
|
}
|
|
@@ -2263,8 +2369,7 @@ class Adaptable {
|
|
|
2263
2369
|
this.onSortChanged();
|
|
2264
2370
|
this.debouncedSetSelectedCells();
|
|
2265
2371
|
});
|
|
2266
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions
|
|
2267
|
-
.showGroupingTotalsAsHeader;
|
|
2372
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
|
|
2268
2373
|
/**
|
|
2269
2374
|
* Use Case: Model has updated
|
|
2270
2375
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
@@ -2568,9 +2673,13 @@ class Adaptable {
|
|
|
2568
2673
|
const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
|
|
2569
2674
|
const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
2570
2675
|
const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
2676
|
+
const classNameMap = {};
|
|
2571
2677
|
const cellClass = (params) => {
|
|
2678
|
+
var _a;
|
|
2572
2679
|
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
|
|
2573
2680
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2681
|
+
const editableClassName = this.getEditableCellClass(abColumn, params);
|
|
2682
|
+
const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
|
|
2574
2683
|
let returnValue = [
|
|
2575
2684
|
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
2576
2685
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
@@ -2579,9 +2688,29 @@ class Adaptable {
|
|
|
2579
2688
|
? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
|
|
2580
2689
|
: null,
|
|
2581
2690
|
isQuickSearchActive ? quickSearchStyleClassName : null,
|
|
2691
|
+
editableClassName,
|
|
2692
|
+
readonlyClassName,
|
|
2582
2693
|
]
|
|
2583
2694
|
.filter((x) => !!x)
|
|
2584
2695
|
.join(' ');
|
|
2696
|
+
const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2697
|
+
const key = `${primaryKey}:${params.colDef.colId}`;
|
|
2698
|
+
if (classNameMap[key] &&
|
|
2699
|
+
classNameMap[key] !== returnValue &&
|
|
2700
|
+
// only hard-reset when removing class-names
|
|
2701
|
+
// ag-grid does not remove class-names, it accumulates them
|
|
2702
|
+
// https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
|
|
2703
|
+
returnValue.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2704
|
+
setTimeout(() => {
|
|
2705
|
+
/**
|
|
2706
|
+
* This is called inside a getter function, inside ag-grid.
|
|
2707
|
+
* To allow ag-grid run it's logic, the redraw is done inside an timeout
|
|
2708
|
+
* to make sure it is not done in an inappropriate time.
|
|
2709
|
+
*/
|
|
2710
|
+
params.api.redrawRows({ rowNodes: [params.node] });
|
|
2711
|
+
}, 0);
|
|
2712
|
+
}
|
|
2713
|
+
classNameMap[key] = returnValue;
|
|
2585
2714
|
return StringExtensions_1.StringExtensions.IsNotNullOrEmpty(returnValue) ? returnValue : undefined;
|
|
2586
2715
|
};
|
|
2587
2716
|
return cellClass;
|
|
@@ -2591,7 +2720,8 @@ class Adaptable {
|
|
|
2591
2720
|
return `--excel-cell-${colId}-${primaryKeyValue}`;
|
|
2592
2721
|
}
|
|
2593
2722
|
setupColumnCellEditor({ colId, col }) {
|
|
2594
|
-
const
|
|
2723
|
+
const adaptableColumn = this.api.columnApi.getColumnFromId(colId);
|
|
2724
|
+
const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(adaptableColumn);
|
|
2595
2725
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
2596
2726
|
if (editLookUpItem) {
|
|
2597
2727
|
return this.isModulePresent('rich-select')
|
|
@@ -2599,10 +2729,13 @@ class Adaptable {
|
|
|
2599
2729
|
: 'agSelectCellEditor';
|
|
2600
2730
|
}
|
|
2601
2731
|
});
|
|
2602
|
-
this.setColDefProperty(col, 'cellEditorParams', () => {
|
|
2732
|
+
this.setColDefProperty(col, 'cellEditorParams', (params) => {
|
|
2603
2733
|
if (editLookUpItem) {
|
|
2604
|
-
return {
|
|
2605
|
-
|
|
2734
|
+
return (params) => {
|
|
2735
|
+
const gridCell = this.getGridCellFromRowNode(params === null || params === void 0 ? void 0 : params.node, colId);
|
|
2736
|
+
return {
|
|
2737
|
+
values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, gridCell),
|
|
2738
|
+
};
|
|
2606
2739
|
};
|
|
2607
2740
|
}
|
|
2608
2741
|
});
|
|
@@ -2615,7 +2748,7 @@ class Adaptable {
|
|
|
2615
2748
|
return this.agGridHelper.createNumericStyleRendererFunc(formatColumn);
|
|
2616
2749
|
}
|
|
2617
2750
|
if (formatColumn.ColumnStyle.CheckBoxStyle) {
|
|
2618
|
-
return this.agGridHelper.createCheckboxRendererComp(abColumn.
|
|
2751
|
+
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
2619
2752
|
}
|
|
2620
2753
|
}
|
|
2621
2754
|
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
@@ -2678,19 +2811,18 @@ class Adaptable {
|
|
|
2678
2811
|
// set the default to the AG Grid provided values
|
|
2679
2812
|
// from https://github.com/ag-grid/ag-grid/blob/v26.1.0/community-modules/core/src/ts/columns/columnModel.ts#L2515
|
|
2680
2813
|
let resultHeaderName = userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(col.getColDef().field);
|
|
2681
|
-
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout()
|
|
2682
|
-
.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2814
|
+
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout().ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2683
2815
|
if (layoutCustomHeader) {
|
|
2684
2816
|
resultHeaderName = layoutCustomHeader;
|
|
2685
2817
|
}
|
|
2686
2818
|
// check if the deprecated formatColumn header is used
|
|
2687
|
-
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.
|
|
2819
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.columnId);
|
|
2688
2820
|
if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
|
|
2689
2821
|
// fallback to the formatColumn property if no Layout custom header is provided
|
|
2690
2822
|
resultHeaderName = formatColumn.HeaderName;
|
|
2691
2823
|
}
|
|
2692
2824
|
// required here for the initial layout rendering
|
|
2693
|
-
abColumn.
|
|
2825
|
+
abColumn.friendlyName = resultHeaderName;
|
|
2694
2826
|
return resultHeaderName;
|
|
2695
2827
|
});
|
|
2696
2828
|
const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
|
|
@@ -2786,7 +2918,7 @@ class Adaptable {
|
|
|
2786
2918
|
var _a;
|
|
2787
2919
|
if (cellEditableFn) {
|
|
2788
2920
|
let gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
2789
|
-
let isEditable = cellEditableFn(gridCell
|
|
2921
|
+
let isEditable = cellEditableFn(gridCell);
|
|
2790
2922
|
if (!isEditable) {
|
|
2791
2923
|
return false;
|
|
2792
2924
|
}
|
|
@@ -2809,7 +2941,7 @@ class Adaptable {
|
|
|
2809
2941
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2810
2942
|
oldValue: params.oldValue,
|
|
2811
2943
|
newValue: params.newValue,
|
|
2812
|
-
|
|
2944
|
+
column: this.api.columnApi.getColumnFromId(params.column.getColId()),
|
|
2813
2945
|
primaryKeyValue: this.getPrimaryKeyValueFromRowNode(params.node),
|
|
2814
2946
|
rowNode: params.node,
|
|
2815
2947
|
trigger: 'edit',
|
|
@@ -2904,7 +3036,7 @@ class Adaptable {
|
|
|
2904
3036
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2905
3037
|
oldValue: oldValue,
|
|
2906
3038
|
newValue: newValue,
|
|
2907
|
-
|
|
3039
|
+
column: this.api.columnApi.getColumnFromId(key),
|
|
2908
3040
|
primaryKeyValue: primaryKeyValue,
|
|
2909
3041
|
rowNode: rowNode,
|
|
2910
3042
|
trigger: 'tick',
|
|
@@ -2926,13 +3058,14 @@ class Adaptable {
|
|
|
2926
3058
|
if (!primaryKeyValue) {
|
|
2927
3059
|
return;
|
|
2928
3060
|
}
|
|
2929
|
-
|
|
3061
|
+
const abColumn = this.api.columnApi.getColumnFromId(colId);
|
|
3062
|
+
if (!abColumn) {
|
|
2930
3063
|
return;
|
|
2931
3064
|
}
|
|
2932
3065
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2933
3066
|
oldValue: oldValue,
|
|
2934
3067
|
newValue: newValue,
|
|
2935
|
-
|
|
3068
|
+
column: abColumn,
|
|
2936
3069
|
primaryKeyValue: primaryKeyValue,
|
|
2937
3070
|
rowNode: rowNode,
|
|
2938
3071
|
trigger: 'edit',
|
|
@@ -2957,7 +3090,7 @@ class Adaptable {
|
|
|
2957
3090
|
}
|
|
2958
3091
|
dataChangedInfos.forEach((dataChangedInfo) => {
|
|
2959
3092
|
if (dataChangedInfo.trigger === 'undo') {
|
|
2960
|
-
LoggingHelper_1.LogAdaptableInfo(`Undo data change: PK(${dataChangedInfo.primaryKeyValue}) Col(${dataChangedInfo.
|
|
3093
|
+
LoggingHelper_1.LogAdaptableInfo(`Undo data change: PK(${dataChangedInfo.primaryKeyValue}) Col(${dataChangedInfo.column}) RevertedValue(${dataChangedInfo.oldValue}) OriginalValue(${dataChangedInfo.newValue})`);
|
|
2961
3094
|
}
|
|
2962
3095
|
if (dataChangedInfo.trigger === 'edit' || dataChangedInfo.trigger === 'undo') {
|
|
2963
3096
|
this.checkChangedCellCurrentlySelected(dataChangedInfo);
|
|
@@ -2996,7 +3129,7 @@ class Adaptable {
|
|
|
2996
3129
|
stylesWithExpression.forEach((conditionalStyle) => {
|
|
2997
3130
|
if (!dataChangedScope.wholeRow) {
|
|
2998
3131
|
const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
|
|
2999
|
-
if (columnIds.includes(dataChangedInfo.columnId)) {
|
|
3132
|
+
if (columnIds.includes(dataChangedInfo.column.columnId)) {
|
|
3000
3133
|
if (this.api.scopeApi.scopeIsAll(conditionalStyle.Scope)) {
|
|
3001
3134
|
dataChangedScope.wholeRow = true;
|
|
3002
3135
|
return;
|
|
@@ -3004,7 +3137,7 @@ class Adaptable {
|
|
|
3004
3137
|
else {
|
|
3005
3138
|
this.api.scopeApi
|
|
3006
3139
|
.getColumnsForScope(conditionalStyle.Scope)
|
|
3007
|
-
.map((c) => c.
|
|
3140
|
+
.map((c) => c.columnId)
|
|
3008
3141
|
.forEach((colId) => {
|
|
3009
3142
|
dataChangedScope.columnIds.add(colId);
|
|
3010
3143
|
});
|
|
@@ -3022,10 +3155,10 @@ class Adaptable {
|
|
|
3022
3155
|
let affectedColumnIds = this.api.formatColumnApi.getColumnIdsFromColumnComparison(columnComparision);
|
|
3023
3156
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(affectedColumnIds)) {
|
|
3024
3157
|
dataChangedInfos.forEach((dataChangedInfo) => {
|
|
3025
|
-
if (affectedColumnIds.includes(dataChangedInfo.columnId)) {
|
|
3158
|
+
if (affectedColumnIds.includes(dataChangedInfo.column.columnId)) {
|
|
3026
3159
|
this.api.scopeApi
|
|
3027
3160
|
.getColumnsForScope(fc.Scope)
|
|
3028
|
-
.map((c) => c.
|
|
3161
|
+
.map((c) => c.columnId)
|
|
3029
3162
|
.forEach((colId) => {
|
|
3030
3163
|
dataChangedScope.columnIds.add(colId);
|
|
3031
3164
|
});
|
|
@@ -3039,7 +3172,7 @@ class Adaptable {
|
|
|
3039
3172
|
let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
|
|
3040
3173
|
if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
|
|
3041
3174
|
let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == dataChangedInfo.primaryKeyValue &&
|
|
3042
|
-
gc.
|
|
3175
|
+
gc.column == dataChangedInfo.column);
|
|
3043
3176
|
if (matchingCell) {
|
|
3044
3177
|
this.setSelectedCells();
|
|
3045
3178
|
}
|
|
@@ -3120,11 +3253,10 @@ class Adaptable {
|
|
|
3120
3253
|
this.gridOptions.api.onGroupExpandedOrCollapsed();
|
|
3121
3254
|
}
|
|
3122
3255
|
}
|
|
3123
|
-
|
|
3124
|
-
|
|
3256
|
+
getAgGridColumnForAdaptableColumn(abColumn) {
|
|
3257
|
+
return this.gridOptions.columnApi
|
|
3125
3258
|
.getAllColumns()
|
|
3126
|
-
.find((c) => c.getColId() === abColumn.
|
|
3127
|
-
return agGridColumn.getColDef().field || '';
|
|
3259
|
+
.find((c) => c.getColId() === abColumn.columnId);
|
|
3128
3260
|
}
|
|
3129
3261
|
setRowGroupColumns(columnIds) {
|
|
3130
3262
|
this.gridOptions.columnApi.setRowGroupColumns(columnIds);
|
|
@@ -3188,15 +3320,15 @@ class Adaptable {
|
|
|
3188
3320
|
this.gridOptions.api.clearRangeSelection();
|
|
3189
3321
|
}
|
|
3190
3322
|
hideColumn(columnId) {
|
|
3191
|
-
let
|
|
3192
|
-
if (
|
|
3323
|
+
let agGridColumn = this.gridOptions.columnApi.getColumn(columnId);
|
|
3324
|
+
if (agGridColumn) {
|
|
3193
3325
|
this.gridOptions.columnApi.setColumnVisible(columnId, false);
|
|
3194
3326
|
this.updateColumnsIntoStore();
|
|
3195
3327
|
}
|
|
3196
3328
|
}
|
|
3197
3329
|
showColumn(columnId) {
|
|
3198
|
-
let
|
|
3199
|
-
if (
|
|
3330
|
+
let agGridColumn = this.gridOptions.columnApi.getColumn(columnId);
|
|
3331
|
+
if (agGridColumn) {
|
|
3200
3332
|
this.gridOptions.columnApi.setColumnVisible(columnId, true);
|
|
3201
3333
|
this.updateColumnsIntoStore();
|
|
3202
3334
|
}
|
|
@@ -3250,6 +3382,26 @@ class Adaptable {
|
|
|
3250
3382
|
}
|
|
3251
3383
|
this.gridOptions.api.setRowData(dataSource);
|
|
3252
3384
|
}
|
|
3385
|
+
getGridData() {
|
|
3386
|
+
var _a;
|
|
3387
|
+
const data = [];
|
|
3388
|
+
(_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.api.forEachNode((rowNode) => {
|
|
3389
|
+
if (!this.isGroupRowNode(rowNode)) {
|
|
3390
|
+
data.push(rowNode.data);
|
|
3391
|
+
}
|
|
3392
|
+
});
|
|
3393
|
+
return data;
|
|
3394
|
+
}
|
|
3395
|
+
getFilteredData() {
|
|
3396
|
+
var _a;
|
|
3397
|
+
const data = [];
|
|
3398
|
+
(_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.api.forEachNodeAfterFilter((rowNode) => {
|
|
3399
|
+
if (!this.isGroupRowNode(rowNode)) {
|
|
3400
|
+
data.push(rowNode.data);
|
|
3401
|
+
}
|
|
3402
|
+
});
|
|
3403
|
+
return data;
|
|
3404
|
+
}
|
|
3253
3405
|
loadDataSource(dataSource) {
|
|
3254
3406
|
if (this.hasAutogeneratedPrimaryKey()) {
|
|
3255
3407
|
this.addSyntheticPrimaryKey(dataSource);
|
|
@@ -3273,11 +3425,15 @@ class Adaptable {
|
|
|
3273
3425
|
this.addSyntheticPrimaryKey(dataRows);
|
|
3274
3426
|
}
|
|
3275
3427
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
3428
|
+
const newData = { add: dataRows };
|
|
3429
|
+
if (dataUpdateConfig.addIndex !== undefined) {
|
|
3430
|
+
newData.addIndex = dataUpdateConfig.addIndex;
|
|
3431
|
+
}
|
|
3276
3432
|
if (dataUpdateConfig.runAsync) {
|
|
3277
|
-
this.gridOptions.api.applyTransactionAsync(
|
|
3433
|
+
this.gridOptions.api.applyTransactionAsync(newData, dataUpdateConfig.callback);
|
|
3278
3434
|
}
|
|
3279
3435
|
else {
|
|
3280
|
-
this.gridOptions.api.applyTransaction(
|
|
3436
|
+
this.gridOptions.api.applyTransaction(newData);
|
|
3281
3437
|
}
|
|
3282
3438
|
}
|
|
3283
3439
|
deleteRows(dataRows, dataUpdateConfig) {
|
|
@@ -3299,7 +3455,7 @@ class Adaptable {
|
|
|
3299
3455
|
checkColumnsDataTypeSet() {
|
|
3300
3456
|
// check that we have no unknown columns - if we do then ok
|
|
3301
3457
|
const firstCol = this.api.columnApi.getColumns()[0];
|
|
3302
|
-
if (firstCol && firstCol.
|
|
3458
|
+
if (firstCol && firstCol.dataType == Enums_1.DataType.Unknown) {
|
|
3303
3459
|
this.updateColumnsIntoStore();
|
|
3304
3460
|
}
|
|
3305
3461
|
}
|
|
@@ -3387,7 +3543,7 @@ class Adaptable {
|
|
|
3387
3543
|
hideQuickFilter() {
|
|
3388
3544
|
this.gridOptions.api.setFloatingFiltersHeight(0);
|
|
3389
3545
|
}
|
|
3390
|
-
|
|
3546
|
+
getAgGridColumnType(columnId) {
|
|
3391
3547
|
var _a;
|
|
3392
3548
|
const { type } = (_a = this.gridOptions.api.getColumnDef(columnId)) !== null && _a !== void 0 ? _a : {};
|
|
3393
3549
|
return type || '';
|
|
@@ -3404,8 +3560,8 @@ class Adaptable {
|
|
|
3404
3560
|
: this.runAdaptableComparerFunction(customSort.ColumnId, customSort.SortedValues);
|
|
3405
3561
|
return comparerFunction;
|
|
3406
3562
|
}
|
|
3407
|
-
|
|
3408
|
-
const container = this.
|
|
3563
|
+
getAgGridLightThemeName() {
|
|
3564
|
+
const container = this.getAgGridContainerElement();
|
|
3409
3565
|
if (container && container.classList) {
|
|
3410
3566
|
// we detect the ag theme class
|
|
3411
3567
|
const classList = container.classList;
|
|
@@ -3417,10 +3573,10 @@ class Adaptable {
|
|
|
3417
3573
|
}
|
|
3418
3574
|
}
|
|
3419
3575
|
}
|
|
3420
|
-
return this.agGridHelper.
|
|
3576
|
+
return this.agGridHelper.getAgGridLightThemeName();
|
|
3421
3577
|
}
|
|
3422
|
-
|
|
3423
|
-
const container = this.
|
|
3578
|
+
getAgGridCurrentThemeName() {
|
|
3579
|
+
const container = this.getAgGridContainerElement();
|
|
3424
3580
|
if (container && container.classList) {
|
|
3425
3581
|
// we detect the ag theme class
|
|
3426
3582
|
const classList = container.classList;
|
|
@@ -3431,7 +3587,7 @@ class Adaptable {
|
|
|
3431
3587
|
}
|
|
3432
3588
|
}
|
|
3433
3589
|
}
|
|
3434
|
-
return this.
|
|
3590
|
+
return this.getAgGridLightThemeName();
|
|
3435
3591
|
}
|
|
3436
3592
|
applyAdaptableTheme(theme) {
|
|
3437
3593
|
const themeName = typeof theme === 'string' ? theme : theme.Name;
|
|
@@ -3487,39 +3643,39 @@ class Adaptable {
|
|
|
3487
3643
|
});
|
|
3488
3644
|
const systemThemes = this.api.themeApi.getAllSystemTheme();
|
|
3489
3645
|
const isSystemTheme = !!systemThemes.filter((t) => t.Name === themeName)[0];
|
|
3490
|
-
const container = this.
|
|
3491
|
-
const
|
|
3492
|
-
const
|
|
3646
|
+
const container = this.getAgGridContainerElement();
|
|
3647
|
+
const getAgGridLightThemeName = () => this.getAgGridLightThemeName();
|
|
3648
|
+
const getAgGridDarkThemeName = () => getAgGridLightThemeName() + '-dark';
|
|
3493
3649
|
if (newTheme && isSystemTheme) {
|
|
3494
3650
|
if (themeName === GeneralConstants_1.LIGHT_THEME) {
|
|
3495
|
-
newTheme.
|
|
3651
|
+
newTheme.AgGridClassName = newTheme.AgGridClassName || getAgGridLightThemeName();
|
|
3496
3652
|
}
|
|
3497
3653
|
if (themeName === GeneralConstants_1.DARK_THEME) {
|
|
3498
|
-
newTheme.
|
|
3654
|
+
newTheme.AgGridClassName = newTheme.AgGridClassName || getAgGridDarkThemeName();
|
|
3499
3655
|
}
|
|
3500
3656
|
}
|
|
3501
|
-
if (!newTheme.
|
|
3502
|
-
// default
|
|
3503
|
-
newTheme.
|
|
3657
|
+
if (!newTheme.AgGridClassName) {
|
|
3658
|
+
// default AG Grid to its light theme
|
|
3659
|
+
newTheme.AgGridClassName = getAgGridLightThemeName();
|
|
3504
3660
|
}
|
|
3505
3661
|
if (container != null) {
|
|
3506
3662
|
if (themesToRemove.length) {
|
|
3507
3663
|
themesToRemove.forEach((theme) => {
|
|
3508
|
-
if (theme.
|
|
3509
|
-
container.classList.remove(theme.
|
|
3664
|
+
if (theme.AgGridClassName) {
|
|
3665
|
+
container.classList.remove(theme.AgGridClassName);
|
|
3510
3666
|
}
|
|
3511
3667
|
});
|
|
3512
3668
|
}
|
|
3513
|
-
// also remove all
|
|
3514
|
-
const
|
|
3669
|
+
// also remove all AG Grid theme class names
|
|
3670
|
+
const agGridClassNamesToRemove = [];
|
|
3515
3671
|
container.classList.forEach((x) => {
|
|
3516
3672
|
if (x && x.indexOf('ag-theme-') === 0) {
|
|
3517
|
-
|
|
3673
|
+
agGridClassNamesToRemove.push(x);
|
|
3518
3674
|
}
|
|
3519
3675
|
});
|
|
3520
|
-
|
|
3521
|
-
if (newTheme && newTheme.
|
|
3522
|
-
container.classList.add(newTheme.
|
|
3676
|
+
agGridClassNamesToRemove.forEach((x) => container.classList.remove(x));
|
|
3677
|
+
if (newTheme && newTheme.AgGridClassName) {
|
|
3678
|
+
container.classList.add(newTheme.AgGridClassName);
|
|
3523
3679
|
}
|
|
3524
3680
|
container.classList.add('ab-Grid');
|
|
3525
3681
|
if (this.adaptableOptions.filterOptions.indicateFilteredColumns) {
|
|
@@ -3607,21 +3763,23 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3607
3763
|
}
|
|
3608
3764
|
exportToExcel(reportData, fileName) {
|
|
3609
3765
|
const columnDefs = reportData.columns.map((column) => ({
|
|
3610
|
-
field: column.
|
|
3611
|
-
headerName: column.
|
|
3766
|
+
field: column.columnId,
|
|
3767
|
+
headerName: column.friendlyName,
|
|
3612
3768
|
}));
|
|
3613
3769
|
const NESTED_COL_SEPARATOR = '.';
|
|
3614
|
-
const nestedColumns = reportData.columns.filter((column) => column.
|
|
3770
|
+
const nestedColumns = reportData.columns.filter((column) => column.columnId.includes(NESTED_COL_SEPARATOR));
|
|
3615
3771
|
if (nestedColumns.length) {
|
|
3616
3772
|
// the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
|
|
3617
3773
|
// ex.
|
|
3618
3774
|
// current state: { field: 'outerKey.innerKey', value: 2}
|
|
3619
3775
|
// original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
|
|
3620
3776
|
reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
|
|
3621
|
-
const cellExportValue = rowDataEntry[nestedColumn.
|
|
3777
|
+
const cellExportValue = rowDataEntry[nestedColumn.columnId];
|
|
3622
3778
|
let intermediaryValue = rowDataEntry;
|
|
3623
3779
|
// augment the rowDataEntry with the new object
|
|
3624
|
-
nestedColumn.
|
|
3780
|
+
nestedColumn.columnId
|
|
3781
|
+
.split(NESTED_COL_SEPARATOR)
|
|
3782
|
+
.forEach((nestedKey, index, nestedCols) => {
|
|
3625
3783
|
// we reached the leaf node, so we set the cell value and break
|
|
3626
3784
|
if (index === nestedCols.length - 1) {
|
|
3627
3785
|
intermediaryValue[nestedKey] = cellExportValue;
|
|
@@ -3633,7 +3791,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3633
3791
|
intermediaryValue = intermediaryValue[nestedKey];
|
|
3634
3792
|
});
|
|
3635
3793
|
// delete the obsolete flattened property
|
|
3636
|
-
delete rowDataEntry[nestedColumn.
|
|
3794
|
+
delete rowDataEntry[nestedColumn.columnId];
|
|
3637
3795
|
}));
|
|
3638
3796
|
}
|
|
3639
3797
|
const gridOptions = {
|