@adaptabletools/adaptable 11.2.4 → 12.0.0-canary.1
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/base.css +568 -273
- package/bundle.cjs.js +120 -120
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +91 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +9 -8
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +25 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/AdaptableOptions/{SmartEdit.js → MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +95 -50
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +9 -4
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/Api/{DataSourceApi.js → DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +29 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/RowFormSubmitted.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +4 -5
- package/src/Api/ExportApi.d.ts +2 -2
- package/src/Api/FilterApi.d.ts +28 -36
- package/src/Api/FormatColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +15 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.js +17 -16
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +11 -11
- package/src/Api/Implementation/FilterApiImpl.js +59 -72
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +45 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
- package/src/Api/Implementation/InternalApiImpl.js +51 -10
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +20 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PredicateApiImpl.js +19 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
- package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +14 -3
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/FormContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/FormContext.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +4 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +134 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/BulkUpdateModule.js +3 -4
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +29 -16
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +26 -20
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +25 -2
- package/src/Strategy/PlusMinusModule.js +1 -4
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +7 -8
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +8 -2
- package/src/Utilities/Constants/GeneralConstants.js +8 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +24 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +6 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
- package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +26 -0
- package/src/Utilities/Services/RowEditService.js +197 -0
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +13 -7
- package/src/View/CellSummary/CellSummaryDetails.js +4 -4
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +10 -8
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
- package/src/View/Components/PreviewResultsPanel.js +3 -3
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Components/WizardSummaryPage.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +5 -4
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +10 -13
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -7
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +4 -5
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +10 -10
- package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
- package/src/agGrid/ActionColumnRenderer.js +9 -6
- package/src/agGrid/Adaptable.d.ts +7 -2
- package/src/agGrid/Adaptable.js +213 -69
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +7 -8
- package/src/agGrid/agGridHelper.js +68 -86
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +5 -0
- package/src/agGrid/rowEditIcons.js +10 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +19 -18
- package/src/components/InfiniteTable/index.js +1 -0
- package/src/components/List/GridList/index.js +1 -1
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/WindowModal/WindowModal.d.ts +2 -0
- package/src/components/WindowModal/WindowModal.js +1 -1
- package/src/components/icons/{data-source.d.ts → add-row.d.ts} +0 -0
- package/src/components/icons/add-row.js +7 -0
- package/src/components/icons/data-set.d.ts +3 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +4 -2
- package/src/metamodel/adaptable.metamodel.d.ts +226 -69
- package/src/metamodel/adaptable.metamodel.js +532 -311
- package/src/types.d.ts +18 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -9
- package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
- package/src/View/Components/Forms/AdaptableForm.js +0 -21
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -61,6 +61,8 @@ const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
|
|
|
61
61
|
const StatusBarState_1 = require("../PredefinedConfig/StatusBarState");
|
|
62
62
|
const createAgStatusPanelComponent_1 = require("./createAgStatusPanelComponent");
|
|
63
63
|
const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
|
|
64
|
+
const RowEditService_1 = require("../Utilities/Services/RowEditService");
|
|
65
|
+
const rowEditIcons_1 = require("./rowEditIcons");
|
|
64
66
|
const tinycolor = require('tinycolor2');
|
|
65
67
|
all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
|
|
66
68
|
const GROUP_PATH_SEPARATOR = '/';
|
|
@@ -373,7 +375,7 @@ class Adaptable {
|
|
|
373
375
|
// Build the default group sort comparator - will get custom sort values (but not functions) in real time
|
|
374
376
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
375
377
|
if (!this.getInitialGroupOrderComparator(this.gridOptions) &&
|
|
376
|
-
this.adaptableOptions.
|
|
378
|
+
this.adaptableOptions.columnOptions.autoOrderGroupedColumns) {
|
|
377
379
|
this.gridOptions.initialGroupOrderComparator =
|
|
378
380
|
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
379
381
|
}
|
|
@@ -391,6 +393,7 @@ class Adaptable {
|
|
|
391
393
|
this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this.api);
|
|
392
394
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
393
395
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
396
|
+
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
394
397
|
this.MetamodelService = new MetamodelService_1.MetamodelService(this.api);
|
|
395
398
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
396
399
|
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
@@ -452,6 +455,13 @@ class Adaptable {
|
|
|
452
455
|
}).then(async () => {
|
|
453
456
|
this.api.internalApi.hideLoadingScreen();
|
|
454
457
|
this.isInitialised = true;
|
|
458
|
+
this._adaptableReady = true;
|
|
459
|
+
// setTimeout(() => {
|
|
460
|
+
// this.api.eventApi.emit('AdaptableReady', {
|
|
461
|
+
// adaptableApi: this.api,
|
|
462
|
+
// gridOptions: this.adaptableOptions.gridOptions,
|
|
463
|
+
// });
|
|
464
|
+
// }, 0);
|
|
455
465
|
});
|
|
456
466
|
if (this.abContainerElement == null) {
|
|
457
467
|
this.abContainerElement = this.getAdaptableContainerElement();
|
|
@@ -516,16 +526,18 @@ class Adaptable {
|
|
|
516
526
|
this.performAudit(data.action, data.state, data.newState);
|
|
517
527
|
this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
|
|
518
528
|
if (eventName == AdaptableStore_1.INIT_STATE) {
|
|
519
|
-
this._adaptableReady = true;
|
|
520
529
|
LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
|
|
521
530
|
this.adaptableModules.forEach((m) => m.updateOldConfig());
|
|
522
531
|
// call stuff here
|
|
523
532
|
// and reset state also?
|
|
524
533
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
534
|
+
this._adaptableReady = true;
|
|
535
|
+
// setTimeout(() => {
|
|
525
536
|
this.api.eventApi.emit('AdaptableReady', {
|
|
526
537
|
adaptableApi: this.api,
|
|
527
538
|
gridOptions: this.adaptableOptions.gridOptions,
|
|
528
539
|
});
|
|
540
|
+
// }, 0);
|
|
529
541
|
}
|
|
530
542
|
});
|
|
531
543
|
}
|
|
@@ -566,39 +578,19 @@ class Adaptable {
|
|
|
566
578
|
// this.gridOptions.components.__adaptableGroupCellRenderer = AdaptableGroupCellRenderer;
|
|
567
579
|
// }
|
|
568
580
|
}
|
|
569
|
-
|
|
570
|
-
if (
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
else if (sidebar === 'columns') {
|
|
581
|
-
// Possibility 2: Sidebar is 'columns' (string) - meaning column only so create just that
|
|
582
|
-
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(false, true);
|
|
583
|
-
}
|
|
584
|
-
else if (sidebar === 'filters') {
|
|
585
|
-
// Possibility 3: Sidebar is 'filters' (string) - meaning filters only so create just that
|
|
586
|
-
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, false);
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
// Possibilty 4: either no sidebar or they created their own; in either case, should add adaptable Tool panel
|
|
590
|
-
const sidebarDef = this.gridOptions.sideBar;
|
|
591
|
-
if (sidebarDef) {
|
|
592
|
-
sidebarDef.toolPanels = sidebarDef.toolPanels || [];
|
|
593
|
-
sidebarDef.toolPanels.push(this.agGridHelper.createAdaptableToolPanel());
|
|
594
|
-
this.agGridHelper.orderToolPanels(sidebarDef.toolPanels);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
|
|
598
|
-
if (this.gridOptions.api) {
|
|
599
|
-
this.gridOptions.api.setSideBar(this.gridOptions.sideBar);
|
|
600
|
-
}
|
|
581
|
+
const adaptableSideBarDef = this.createAdaptableSideBarDef();
|
|
582
|
+
if (!!adaptableSideBarDef) {
|
|
583
|
+
this.gridOptions.components = this.gridOptions.components || {};
|
|
584
|
+
this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
|
|
585
|
+
}
|
|
586
|
+
if (this.agGridHelper.isSideBarDefObject(adaptableSideBarDef)) {
|
|
587
|
+
if (this.gridOptions.api) {
|
|
588
|
+
this.gridOptions.api.setSideBar(adaptableSideBarDef);
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
this.gridOptions.sideBar = adaptableSideBarDef;
|
|
601
592
|
}
|
|
593
|
+
this.hasAdaptableToolPanel = true;
|
|
602
594
|
}
|
|
603
595
|
this.createStatusBars();
|
|
604
596
|
const checkAgGridContainer = () => {
|
|
@@ -680,6 +672,50 @@ class Adaptable {
|
|
|
680
672
|
}
|
|
681
673
|
return (this.adaptableOptions.containerOptions.agGridContainer = agGridContainer);
|
|
682
674
|
}
|
|
675
|
+
createAdaptableSideBarDef() {
|
|
676
|
+
var _a;
|
|
677
|
+
if (
|
|
678
|
+
// no need to create the sidebar if it is not enabled
|
|
679
|
+
!this.gridOptions.sideBar) {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
if (this.gridOptions.sideBar === true) {
|
|
683
|
+
// create all tool panels with default settings
|
|
684
|
+
return {
|
|
685
|
+
toolPanels: [
|
|
686
|
+
GeneralConstants.AGGRID_TOOLPANEL_FILTERS,
|
|
687
|
+
GeneralConstants.AGGRID_TOOLPANEL_COLUMNS,
|
|
688
|
+
this.agGridHelper.buildAdaptableToolPanelDef(),
|
|
689
|
+
],
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
else if (typeof this.gridOptions.sideBar === 'string') {
|
|
693
|
+
// there is only one tool panel, and it's the adaptable one => we have to handle it
|
|
694
|
+
if (this.gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
|
|
695
|
+
return {
|
|
696
|
+
toolPanels: [this.agGridHelper.buildAdaptableToolPanelDef()],
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
else if (Array.isArray(this.gridOptions.sideBar)) {
|
|
701
|
+
if (!this.gridOptions.sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
// if it's an array, process the tool panel definitions
|
|
705
|
+
const sidebarDef = {};
|
|
706
|
+
sidebarDef.toolPanels = this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar);
|
|
707
|
+
return sidebarDef;
|
|
708
|
+
}
|
|
709
|
+
else if (this.agGridHelper.isSideBarDefObject(this.gridOptions.sideBar)) {
|
|
710
|
+
if ((_a = this.gridOptions.sideBar.toolPanels) === null || _a === void 0 ? void 0 : _a.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
|
|
711
|
+
toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
|
|
712
|
+
// return the boolean flag so that we know that we need the custom AdaptableToolPanel component
|
|
713
|
+
return true;
|
|
714
|
+
}
|
|
715
|
+
// if it's fully-fledged SideBarDef, process its tool panel definitions
|
|
716
|
+
return Object.assign(Object.assign({}, this.gridOptions.sideBar), { toolPanels: this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar.toolPanels) });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
683
719
|
createStatusBars() {
|
|
684
720
|
var _a, _b;
|
|
685
721
|
const statusBarOptions = Object.assign({}, this.gridOptions.statusBar);
|
|
@@ -1205,6 +1241,12 @@ class Adaptable {
|
|
|
1205
1241
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
1206
1242
|
}
|
|
1207
1243
|
layout.Columns = layout.Columns || [];
|
|
1244
|
+
const rowEditActionColumn = this.getColDefsForRowEditColumns()[0];
|
|
1245
|
+
if (rowEditActionColumn) {
|
|
1246
|
+
layout.Columns.push(rowEditActionColumn.colId);
|
|
1247
|
+
layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
|
|
1248
|
+
layout.PinnedColumnsMap[rowEditActionColumn.colId] = rowEditActionColumn.pinned;
|
|
1249
|
+
}
|
|
1208
1250
|
const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
|
|
1209
1251
|
acc[colId] = true;
|
|
1210
1252
|
return acc;
|
|
@@ -1244,7 +1286,7 @@ class Adaptable {
|
|
|
1244
1286
|
let newColState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
1245
1287
|
newColState = newColState
|
|
1246
1288
|
.map((colState) => {
|
|
1247
|
-
var _a, _b, _c, _d;
|
|
1289
|
+
var _a, _b, _c, _d, _e;
|
|
1248
1290
|
const { colId } = colState;
|
|
1249
1291
|
const oldColState = columnsStateMap[colId];
|
|
1250
1292
|
const hide = this.api.columnApi.isAutoPivotColumn(colId)
|
|
@@ -1283,10 +1325,16 @@ class Adaptable {
|
|
|
1283
1325
|
newColState.aggFunc =
|
|
1284
1326
|
aggregationFunctionsColumnsMap[colId] === true
|
|
1285
1327
|
? // if we have true, it means - take the default aggFunc from colDef
|
|
1286
|
-
(_d = (_c =
|
|
1328
|
+
(_e = (_d = (_c =
|
|
1287
1329
|
// NOTE: colState gives us the current aggFunc, which can be null,
|
|
1288
1330
|
// while the colDef gives us the initially configured aggFunc for that column
|
|
1289
|
-
colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d :
|
|
1331
|
+
colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d :
|
|
1332
|
+
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1333
|
+
colDef === null ||
|
|
1334
|
+
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1335
|
+
colDef === void 0 ? void 0 :
|
|
1336
|
+
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1337
|
+
colDef.defaultAggFunc) !== null && _e !== void 0 ? _e : 'sum' : aggregationFunctionsColumnsMap[colId];
|
|
1290
1338
|
}
|
|
1291
1339
|
if (sortModelMap[colId]) {
|
|
1292
1340
|
newColState.sort = sortModelMap[colId].sort;
|
|
@@ -1577,7 +1625,7 @@ class Adaptable {
|
|
|
1577
1625
|
// see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
|
|
1578
1626
|
let newValue;
|
|
1579
1627
|
let dataType = column.dataType;
|
|
1580
|
-
newValue = dataType ==
|
|
1628
|
+
newValue = dataType == 'Number' ? Number(value) : value;
|
|
1581
1629
|
if (dataType == undefined) {
|
|
1582
1630
|
return; // no point continuing as probably a wrong column
|
|
1583
1631
|
}
|
|
@@ -2067,6 +2115,7 @@ class Adaptable {
|
|
|
2067
2115
|
...this.getColDefsForCalculatedColumns(),
|
|
2068
2116
|
...this.getColDefsForActionColumns(),
|
|
2069
2117
|
...this.getColDefsForFreeTextColumns(),
|
|
2118
|
+
...this.getColDefsForRowEditColumns(),
|
|
2070
2119
|
];
|
|
2071
2120
|
}
|
|
2072
2121
|
getColDefsForFreeTextColumns() {
|
|
@@ -2134,6 +2183,102 @@ class Adaptable {
|
|
|
2134
2183
|
});
|
|
2135
2184
|
}
|
|
2136
2185
|
}
|
|
2186
|
+
getColDefsForRowEditColumns() {
|
|
2187
|
+
const actionRowButtons = this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtons;
|
|
2188
|
+
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
2189
|
+
return [];
|
|
2190
|
+
}
|
|
2191
|
+
const editButtons = actionRowButtons
|
|
2192
|
+
.map((buttonName) => {
|
|
2193
|
+
if (buttonName === 'create') {
|
|
2194
|
+
// we need this dirty hack until ActionColumn support for custom icons is improved
|
|
2195
|
+
const label = rowEditIcons_1.rowAddIcon;
|
|
2196
|
+
return {
|
|
2197
|
+
label,
|
|
2198
|
+
tooltip: 'Create',
|
|
2199
|
+
onClick: () => {
|
|
2200
|
+
this.api.gridApi.openCreateRowForm();
|
|
2201
|
+
},
|
|
2202
|
+
};
|
|
2203
|
+
}
|
|
2204
|
+
if (buttonName === 'edit') {
|
|
2205
|
+
// we need this dirty hack until ActionColumn support for custom icons is improved
|
|
2206
|
+
const label = rowEditIcons_1.rowEditIcon;
|
|
2207
|
+
return {
|
|
2208
|
+
label,
|
|
2209
|
+
tooltip: 'Edit',
|
|
2210
|
+
onClick: (button, context) => {
|
|
2211
|
+
this.api.gridApi.openEditRowForm(context.primaryKeyValue);
|
|
2212
|
+
},
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
if (buttonName === 'clone') {
|
|
2216
|
+
// we need this dirty hack until ActionColumn support for custom icons is improved
|
|
2217
|
+
const label = rowEditIcons_1.rowCloneIcon;
|
|
2218
|
+
return {
|
|
2219
|
+
label,
|
|
2220
|
+
tooltip: 'Clone',
|
|
2221
|
+
onClick: (button, context) => {
|
|
2222
|
+
this.api.gridApi.openCloneRowForm(context.primaryKeyValue);
|
|
2223
|
+
},
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2226
|
+
if (buttonName === 'delete') {
|
|
2227
|
+
// we need this dirty hack until ActionColumn support for custom icons is improved
|
|
2228
|
+
const label = rowEditIcons_1.rowDeleteIcon;
|
|
2229
|
+
return {
|
|
2230
|
+
label,
|
|
2231
|
+
tooltip: 'Delete',
|
|
2232
|
+
onClick: (button, context) => {
|
|
2233
|
+
var _a, _b;
|
|
2234
|
+
const eventInfo = {
|
|
2235
|
+
type: 'rowDeleted',
|
|
2236
|
+
rowNode: context.rowNode,
|
|
2237
|
+
adaptableApi: context.adaptableApi,
|
|
2238
|
+
};
|
|
2239
|
+
this.api.eventApi.emit('RowFormSubmitted', eventInfo);
|
|
2240
|
+
(_b = (_a = this.adaptableOptions.editOptions.rowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
2241
|
+
},
|
|
2242
|
+
};
|
|
2243
|
+
}
|
|
2244
|
+
})
|
|
2245
|
+
.filter(Boolean);
|
|
2246
|
+
if (!editButtons.length) {
|
|
2247
|
+
return [];
|
|
2248
|
+
}
|
|
2249
|
+
const rowEditActionColumn = {
|
|
2250
|
+
columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
2251
|
+
actionColumnButton: editButtons,
|
|
2252
|
+
};
|
|
2253
|
+
return [
|
|
2254
|
+
{
|
|
2255
|
+
headerName: '',
|
|
2256
|
+
colId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
2257
|
+
hide: false,
|
|
2258
|
+
editable: false,
|
|
2259
|
+
width: editButtons.length * 42,
|
|
2260
|
+
resizable: false,
|
|
2261
|
+
lockVisible: true,
|
|
2262
|
+
suppressColumnsToolPanel: true,
|
|
2263
|
+
suppressFiltersToolPanel: true,
|
|
2264
|
+
suppressMenu: true,
|
|
2265
|
+
suppressMovable: true,
|
|
2266
|
+
filter: false,
|
|
2267
|
+
sortable: false,
|
|
2268
|
+
enableRowGroup: false,
|
|
2269
|
+
pinned: this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtonsPosition ===
|
|
2270
|
+
'pinnedRight'
|
|
2271
|
+
? 'right'
|
|
2272
|
+
: 'left',
|
|
2273
|
+
cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
2274
|
+
cellRendererParams: {
|
|
2275
|
+
actionColumn: rowEditActionColumn,
|
|
2276
|
+
},
|
|
2277
|
+
cellClass: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
2278
|
+
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
2279
|
+
},
|
|
2280
|
+
];
|
|
2281
|
+
}
|
|
2137
2282
|
getColDefsForActionColumns() {
|
|
2138
2283
|
const defaultActionColumnSettings = {
|
|
2139
2284
|
resizable: true,
|
|
@@ -2286,6 +2431,10 @@ class Adaptable {
|
|
|
2286
2431
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2287
2432
|
type: columnTypes,
|
|
2288
2433
|
valueGetter: (params) => {
|
|
2434
|
+
var _a, _b;
|
|
2435
|
+
if ((_a = calculatedColumn.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.ExternallyEvaluatedExpression) {
|
|
2436
|
+
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
2437
|
+
}
|
|
2289
2438
|
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2290
2439
|
},
|
|
2291
2440
|
};
|
|
@@ -2347,7 +2496,7 @@ class Adaptable {
|
|
|
2347
2496
|
return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
|
|
2348
2497
|
}
|
|
2349
2498
|
destroy(config) {
|
|
2350
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2499
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
2351
2500
|
if (this.gridOptions && this.gridOptions.api) {
|
|
2352
2501
|
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
|
|
2353
2502
|
this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
|
|
@@ -2407,27 +2556,29 @@ class Adaptable {
|
|
|
2407
2556
|
this.adaptableStore = null;
|
|
2408
2557
|
this.gridOptions = null;
|
|
2409
2558
|
this.adaptableOptions = null;
|
|
2410
|
-
(_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2559
|
+
(_c = (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
2411
2560
|
this.CalculatedColumnExpressionService = null;
|
|
2412
|
-
(
|
|
2561
|
+
(_e = (_d = this.DataService) === null || _d === void 0 ? void 0 : _d.destroy) === null || _e === void 0 ? void 0 : _e.call(_d);
|
|
2413
2562
|
this.DataService = null;
|
|
2414
|
-
(
|
|
2563
|
+
(_g = (_f = this.EntitlementService) === null || _f === void 0 ? void 0 : _f.destroy) === null || _g === void 0 ? void 0 : _g.call(_f);
|
|
2415
2564
|
this.EntitlementService = null;
|
|
2416
|
-
(
|
|
2565
|
+
(_j = (_h = this.ReportService) === null || _h === void 0 ? void 0 : _h.destroy) === null || _j === void 0 ? void 0 : _j.call(_h);
|
|
2417
2566
|
this.ReportService = null;
|
|
2418
|
-
(
|
|
2567
|
+
(_l = (_k = this.ModuleService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
|
|
2419
2568
|
this.ModuleService = null;
|
|
2420
|
-
(
|
|
2569
|
+
(_o = (_m = this.ValidationService) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
|
|
2421
2570
|
this.ValidationService = null;
|
|
2422
|
-
(
|
|
2571
|
+
(_q = (_p = this.QueryLanguageService) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
|
|
2423
2572
|
this.QueryLanguageService = null;
|
|
2424
|
-
(
|
|
2573
|
+
(_s = (_r = this.AlertService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
|
|
2425
2574
|
this.AlertService = null;
|
|
2426
|
-
(
|
|
2575
|
+
(_u = (_t = this.TeamSharingService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
|
|
2427
2576
|
this.TeamSharingService = null;
|
|
2428
|
-
(
|
|
2577
|
+
(_w = (_v = this.RowEditService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
|
|
2578
|
+
this.RowEditService = null;
|
|
2579
|
+
(_y = (_x = this.MetamodelService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
|
|
2429
2580
|
this.MetamodelService = null;
|
|
2430
|
-
(
|
|
2581
|
+
(_0 = (_z = this.LicenseService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
|
|
2431
2582
|
this.LicenseService = null;
|
|
2432
2583
|
this.isDestroyed = true;
|
|
2433
2584
|
}
|
|
@@ -2606,6 +2757,7 @@ class Adaptable {
|
|
|
2606
2757
|
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2607
2758
|
all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
|
|
2608
2759
|
];
|
|
2760
|
+
// ADD filter event
|
|
2609
2761
|
this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
2610
2762
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
2611
2763
|
this.debouncedSaveGridLayout();
|
|
@@ -2619,7 +2771,7 @@ class Adaptable {
|
|
|
2619
2771
|
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2620
2772
|
return;
|
|
2621
2773
|
}
|
|
2622
|
-
if (this.adaptableOptions.
|
|
2774
|
+
if (this.adaptableOptions.columnOptions.hideColumnWhenGrouped === true &&
|
|
2623
2775
|
params.source !== 'api') {
|
|
2624
2776
|
params.columns.forEach((col) => {
|
|
2625
2777
|
if (col.isVisible()) {
|
|
@@ -2719,7 +2871,7 @@ class Adaptable {
|
|
|
2719
2871
|
if (this.isDestroyed) {
|
|
2720
2872
|
return true;
|
|
2721
2873
|
}
|
|
2722
|
-
const columnFilters = this.api.filterApi.
|
|
2874
|
+
const columnFilters = this.api.filterApi.getColumnFilters();
|
|
2723
2875
|
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2724
2876
|
const isQueryActive = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.api.queryApi.getCurrentQuery());
|
|
2725
2877
|
return (isFilterActive ||
|
|
@@ -2750,7 +2902,7 @@ class Adaptable {
|
|
|
2750
2902
|
try {
|
|
2751
2903
|
// we then assess filters (if running locally)
|
|
2752
2904
|
if (evaluateFilterOnClient) {
|
|
2753
|
-
const columnFilters = this.api.filterApi.
|
|
2905
|
+
const columnFilters = this.api.filterApi.getColumnFilters();
|
|
2754
2906
|
if (columnFilters.length > 0) {
|
|
2755
2907
|
for (const columnFilter of columnFilters) {
|
|
2756
2908
|
if (!this.api.filterApi.evaluateColumnFilter(columnFilter, node)) {
|
|
@@ -2780,7 +2932,7 @@ class Adaptable {
|
|
|
2780
2932
|
this.prepareGrid();
|
|
2781
2933
|
}
|
|
2782
2934
|
updateColumnFilterActiveState() {
|
|
2783
|
-
const columnFilters = this.api.filterApi.
|
|
2935
|
+
const columnFilters = this.api.filterApi.getColumnFilters();
|
|
2784
2936
|
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2785
2937
|
const columnsWithActiveFilters = {};
|
|
2786
2938
|
if (isFilterActive) {
|
|
@@ -2943,7 +3095,7 @@ class Adaptable {
|
|
|
2943
3095
|
fontSize: null,
|
|
2944
3096
|
borderColor: null,
|
|
2945
3097
|
};
|
|
2946
|
-
const formatColumn = this.api.formatColumnApi.
|
|
3098
|
+
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
2947
3099
|
const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
|
|
2948
3100
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
2949
3101
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
@@ -3010,7 +3162,7 @@ class Adaptable {
|
|
|
3010
3162
|
const hasRichSelectCellEditor = this.isModulePresent('rich-select');
|
|
3011
3163
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
3012
3164
|
var _a;
|
|
3013
|
-
const formatColumn = this.api.formatColumnApi.
|
|
3165
|
+
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(adaptableColumn);
|
|
3014
3166
|
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle)) {
|
|
3015
3167
|
return CheckboxRenderer_1.CheckboxEditor;
|
|
3016
3168
|
}
|
|
@@ -3038,7 +3190,7 @@ class Adaptable {
|
|
|
3038
3190
|
}
|
|
3039
3191
|
setupColumnCellRenderer({ col, colId, abColumn }) {
|
|
3040
3192
|
this.setColDefProperty(col, 'cellRenderer', () => {
|
|
3041
|
-
const formatColumn = this.api.formatColumnApi.
|
|
3193
|
+
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3042
3194
|
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
|
|
3043
3195
|
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
3044
3196
|
return this.agGridHelper.createPercentBarRendererComp(formatColumn);
|
|
@@ -3113,14 +3265,6 @@ class Adaptable {
|
|
|
3113
3265
|
const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
|
|
3114
3266
|
return previousColumnHeader !== newColumnHeader;
|
|
3115
3267
|
}
|
|
3116
|
-
getUserDefinedHeaderName(columnId) {
|
|
3117
|
-
const column = this.gridOptions.columnApi.getColumn(columnId);
|
|
3118
|
-
if (!column) {
|
|
3119
|
-
return columnId;
|
|
3120
|
-
}
|
|
3121
|
-
const userHeaderName = this.getUserColDefProperty(column.getColId(), 'headerName');
|
|
3122
|
-
return userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(column.getColDef().field);
|
|
3123
|
-
}
|
|
3124
3268
|
setupColumnFilter({ col, colDef }) {
|
|
3125
3269
|
this.setColDefProperty(col, 'filter', () => {
|
|
3126
3270
|
if (!colDef.filter) {
|
|
@@ -3600,7 +3744,7 @@ class Adaptable {
|
|
|
3600
3744
|
}
|
|
3601
3745
|
getRowCount() {
|
|
3602
3746
|
return this.gridOptions.rowData
|
|
3603
|
-
? this.
|
|
3747
|
+
? this.getGridData().length
|
|
3604
3748
|
: this.gridOptions.api.getDisplayedRowCount();
|
|
3605
3749
|
}
|
|
3606
3750
|
getColumnCount() {
|
|
@@ -3817,7 +3961,7 @@ class Adaptable {
|
|
|
3817
3961
|
checkColumnsDataTypeSet() {
|
|
3818
3962
|
// check that we have no unknown columns - if we do then ok
|
|
3819
3963
|
const colDefs = this.api.columnApi.getColumns();
|
|
3820
|
-
if (colDefs.some((colDef) => colDef.dataType ===
|
|
3964
|
+
if (colDefs.some((colDef) => colDef.dataType === 'Unknown')) {
|
|
3821
3965
|
this.updateColumnsIntoStore();
|
|
3822
3966
|
}
|
|
3823
3967
|
}
|
|
@@ -3996,7 +4140,7 @@ class Adaptable {
|
|
|
3996
4140
|
themeClassNamesToRemove.forEach((cssClassName) => el.classList.remove(cssClassName));
|
|
3997
4141
|
// remove infinite table classnames
|
|
3998
4142
|
themesToRemove.forEach((theme) => {
|
|
3999
|
-
el.classList.remove(`
|
|
4143
|
+
el.classList.remove(`infinite-${theme.Name}`);
|
|
4000
4144
|
});
|
|
4001
4145
|
if (this.adaptableOptions.userInterfaceOptions &&
|
|
4002
4146
|
this.adaptableOptions.userInterfaceOptions.useCustomMacLikeScrollbars &&
|
|
@@ -4010,7 +4154,7 @@ class Adaptable {
|
|
|
4010
4154
|
const newThemeClassName = GeneralConstants.THEME_STYLE + themeName;
|
|
4011
4155
|
el.classList.add(newThemeClassName);
|
|
4012
4156
|
// add infinite table classname for theme
|
|
4013
|
-
el.classList.add(`
|
|
4157
|
+
el.classList.add(`infinite-${themeName}`);
|
|
4014
4158
|
const computedDocumentStyle = getComputedStyle(el);
|
|
4015
4159
|
const [abLoaded, abThemeLoaded] = ['--ab-loaded', '--ab-theme-loaded'].map((variable) => {
|
|
4016
4160
|
let val = computedDocumentStyle.getPropertyValue(variable);
|
|
@@ -16,7 +16,7 @@ exports.FilterWrapperFactory = (adaptable) => {
|
|
|
16
16
|
isFilterActive() {
|
|
17
17
|
//make the small filter icon to appear when there is a filter
|
|
18
18
|
return (adaptable.api.filterApi
|
|
19
|
-
.
|
|
19
|
+
.getColumnFilters()
|
|
20
20
|
.findIndex((x) => x.ColumnId == this.params.column.getColId()) > -1);
|
|
21
21
|
}
|
|
22
22
|
doesFilterPass(params) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ColDef, Column, GridOptions, ICellRendererFunc, SideBarDef, ToolPanelDef } from '@ag-grid-community/all-modules';
|
|
2
2
|
import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
|
|
3
|
-
import { AdaptableColumn, AdaptableColumnGroup } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
+
import { AdaptableColumn, AdaptableColumnDataType, AdaptableColumnGroup } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { AdaptableNodeComparerFunction } from '../PredefinedConfig/Common/AdaptableComparerFunction';
|
|
5
|
-
import {
|
|
6
|
-
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
5
|
+
import { AdaptableColumnType, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
7
6
|
import { IModule } from '../Strategy/Interface/IModule';
|
|
8
7
|
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
9
8
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
@@ -26,9 +25,9 @@ export declare class agGridHelper {
|
|
|
26
25
|
getCleanValue(value: string): string | undefined;
|
|
27
26
|
getRenderedValue(colDef: ColDef, valueToRender: any): any;
|
|
28
27
|
createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
buildAdaptableToolPanelDef(): ToolPanelDef;
|
|
29
|
+
isSideBarDefObject(sidebarDef: unknown): sidebarDef is SideBarDef;
|
|
30
|
+
mapToolPanelDefs(toolPanelDefs?: (ToolPanelDef | string)[]): (ToolPanelDef | string)[];
|
|
32
31
|
reselectSelectedCells(): void;
|
|
33
32
|
fireSelectionChangedEvent(): void;
|
|
34
33
|
private isColumnReadonly;
|
|
@@ -46,8 +45,8 @@ export declare class agGridHelper {
|
|
|
46
45
|
private isColumnGrouped;
|
|
47
46
|
private isColumnSparkline;
|
|
48
47
|
private getColumnDataType;
|
|
49
|
-
private
|
|
50
|
-
getAgGridDataType(dataType:
|
|
48
|
+
private getAbColDefValue;
|
|
49
|
+
getAgGridDataType(dataType: AdaptableColumnDataType): AdaptableColumnType;
|
|
51
50
|
checkShouldClearExistingFiltersOrSearches(): void;
|
|
52
51
|
runAdaptableGroupComparerFunction(): AdaptableNodeComparerFunction;
|
|
53
52
|
getCurrentIPPStyle(): IPPStyle;
|