@adaptabletools/adaptable 15.4.3 → 16.0.0-canary.0
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 +1 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +234 -228
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +82 -0
- package/src/AdaptableOptions/{ActionOptions.d.ts → ActionRowOptions.d.ts} +15 -90
- package/src/AdaptableOptions/AdaptableOptions.d.ts +32 -7
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -12
- package/src/AdaptableOptions/AlertOptions.d.ts +9 -0
- package/src/AdaptableOptions/CalendarOptions.d.ts +11 -0
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +10 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +0 -4
- package/src/AdaptableOptions/CustomSortOptions.d.ts +24 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +5 -1
- package/src/AdaptableOptions/DataSetOptions.d.ts +41 -0
- package/src/AdaptableOptions/DataSetOptions.js +2 -0
- package/src/AdaptableOptions/EditOptions.d.ts +4 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +0 -16
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -4
- package/src/AdaptableOptions/ExpressionOptions.d.ts +7 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/GroupingOptions.d.ts +50 -0
- package/src/AdaptableOptions/GroupingOptions.js +2 -0
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +9 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +4 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +0 -8
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +30 -1
- package/src/Api/ActionColumnApi.d.ts +10 -0
- package/src/Api/ActionColumnApi.js +2 -0
- package/src/Api/{ActionApi.d.ts → ActionRowApi.d.ts} +4 -15
- package/src/Api/ActionRowApi.js +2 -0
- package/src/Api/AdaptableApi.d.ts +11 -6
- package/src/Api/AlertApi.d.ts +2 -111
- package/src/Api/BulkUpdateApi.d.ts +0 -7
- package/src/Api/CalculatedColumnApi.d.ts +0 -31
- package/src/Api/CalendarApi.d.ts +1 -1
- package/src/Api/CellSummaryApi.d.ts +0 -7
- package/src/Api/ChartingApi.d.ts +0 -7
- package/src/Api/ColumnApi.d.ts +1 -131
- package/src/Api/ConfigApi.d.ts +1 -7
- package/src/Api/CustomSortApi.d.ts +0 -25
- package/src/Api/DashboardApi.d.ts +0 -16
- package/src/Api/DataChangeHistoryApi.d.ts +0 -7
- package/src/Api/DataSetApi.d.ts +1 -16
- package/src/Api/EventApi.d.ts +1 -9
- package/src/Api/Events/AdaptableStateChanged.d.ts +0 -8
- package/src/Api/Events/AdaptableStateReloaded.d.ts +0 -4
- package/src/Api/Events/BaseEventInfo.d.ts +9 -1
- package/src/Api/Events/LiveDataChanged.d.ts +3 -7
- package/src/Api/ExportApi.d.ts +7 -31
- package/src/Api/{QueryLanguageApi.d.ts → ExpressionApi.d.ts} +2 -2
- package/src/Api/ExpressionApi.js +2 -0
- package/src/Api/FilterApi.d.ts +1 -59
- package/src/Api/FlashingCellApi.d.ts +0 -15
- package/src/Api/FormatColumnApi.d.ts +1 -91
- package/src/Api/FreeTextColumnApi.d.ts +0 -39
- package/src/Api/GridApi.d.ts +0 -31
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +14 -0
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +12 -0
- package/src/Api/Implementation/{ActionApiImpl.js → ActionRowApiImpl.js} +8 -15
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -4
- package/src/Api/Implementation/AdaptableApiImpl.js +7 -5
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -43
- package/src/Api/Implementation/AlertApiImpl.js +4 -94
- package/src/Api/Implementation/ApiBase.d.ts +15 -5
- package/src/Api/Implementation/ApiBase.js +26 -8
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +0 -7
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -32
- package/src/Api/Implementation/CalendarApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CalendarApiImpl.js +20 -17
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -1
- package/src/Api/Implementation/CellSummaryApiImpl.js +1 -6
- package/src/Api/Implementation/ChartingApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -5
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -35
- package/src/Api/Implementation/ColumnApiImpl.js +1 -138
- package/src/Api/Implementation/ConfigApiImpl.js +2 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -5
- package/src/Api/Implementation/CustomSortApiImpl.js +0 -16
- package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -4
- package/src/Api/Implementation/DashboardApiImpl.js +2 -24
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +0 -1
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +0 -5
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -4
- package/src/Api/Implementation/DataSetApiImpl.js +1 -14
- package/src/Api/Implementation/ExportApiImpl.d.ts +4 -10
- package/src/Api/Implementation/ExportApiImpl.js +15 -34
- package/src/Api/Implementation/{QueryLanguageApiImpl.d.ts → ExpressionApiImpl.d.ts} +4 -4
- package/src/Api/Implementation/{QueryLanguageApiImpl.js → ExpressionApiImpl.js} +7 -5
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -17
- package/src/Api/Implementation/FilterApiImpl.js +0 -53
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +0 -3
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -13
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -34
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -73
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -8
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -29
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -7
- package/src/Api/Implementation/GridApiImpl.js +3 -32
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -6
- package/src/Api/Implementation/LayoutApiImpl.js +2 -27
- package/src/Api/Implementation/OptionsApiImpl.d.ts +10 -5
- package/src/Api/Implementation/OptionsApiImpl.js +19 -7
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +0 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +0 -5
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -8
- package/src/Api/Implementation/PredicateApiImpl.js +2 -30
- package/src/Api/Implementation/QueryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/QueryApiImpl.js +0 -21
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +0 -1
- package/src/Api/Implementation/QuickSearchApiImpl.js +0 -5
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -18
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -69
- package/src/Api/Implementation/ScopeApiImpl.js +1 -1
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +0 -2
- package/src/Api/Implementation/SettingsPanelApiImpl.js +0 -9
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -6
- package/src/Api/Implementation/ShortcutApiImpl.js +0 -21
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +0 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +0 -5
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -5
- package/src/Api/Implementation/StyledColumnApiImpl.js +2 -17
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +0 -2
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -9
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +0 -5
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -21
- package/src/Api/Implementation/ThemeApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -17
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +4 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.js +17 -10
- package/src/Api/Internal/{ActionInternalApi.d.ts → ActionRowInternalApi.d.ts} +2 -2
- package/src/Api/Internal/{ActionInternalApi.js → ActionRowInternalApi.js} +12 -5
- package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -10
- package/src/Api/Internal/AdaptableInternalApi.js +9 -20
- package/src/Api/Internal/AlertInternalApi.js +9 -6
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/CustomSortInternalApi.d.ts +1 -1
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.d.ts +1 -1
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/{QueryLanguageInternalApi.d.ts → ExpressionnternalApi.d.ts} +1 -1
- package/src/Api/Internal/{QueryLanguageInternalApi.js → ExpressionnternalApi.js} +9 -5
- package/src/Api/Internal/FilterInternalApi.js +4 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.js +8 -0
- package/src/Api/Internal/LayoutInternalApi.js +6 -1
- package/src/Api/Internal/PredicateInternalApi.js +10 -0
- package/src/Api/Internal/QueryInternalApi.js +3 -1
- package/src/Api/Internal/SystemStatusInternalApi.js +4 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -0
- package/src/Api/LayoutApi.d.ts +3 -27
- package/src/Api/OptionsApi.d.ts +28 -10
- package/src/Api/PlusMinusApi.d.ts +0 -7
- package/src/Api/PredicateApi.d.ts +1 -32
- package/src/Api/QueryApi.d.ts +0 -23
- package/src/Api/QuickSearchApi.d.ts +0 -4
- package/src/Api/ScheduleApi.d.ts +0 -81
- package/src/Api/SettingsPanelApi.d.ts +0 -11
- package/src/Api/ShortcutApi.d.ts +0 -25
- package/src/Api/SmartEditApi.d.ts +0 -7
- package/src/Api/StyledColumnApi.d.ts +0 -21
- package/src/Api/SystemStatusApi.d.ts +0 -11
- package/src/Api/TeamSharingApi.d.ts +0 -23
- package/src/Api/ThemeApi.d.ts +0 -19
- package/src/Api/UserInterfaceApi.d.ts +4 -9
- package/src/PredefinedConfig/AlertState.d.ts +4 -1
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +3 -0
- package/src/PredefinedConfig/Common/BaseContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/DataChangedScope.d.ts +9 -0
- package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -6
- package/src/PredefinedConfig/SystemState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
- package/src/PredefinedConfig/ThemeState.d.ts +3 -0
- package/src/Strategy/AdaptableModuleBase.js +3 -3
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.js +2 -0
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +3 -3
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +2 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +24 -22
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +12 -6
- package/src/Utilities/Helpers/FormatHelper.js +7 -0
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/ObjectFactory.js +6 -4
- package/src/Utilities/Services/AlertService.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -2
- package/src/Utilities/Services/ChartingService.js +2 -0
- package/src/Utilities/Services/EntitlementService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +10 -10
- package/src/Utilities/Services/QueryLanguageService.js +16 -0
- package/src/Utilities/Services/ReportService.js +8 -6
- package/src/Utilities/Services/RowEditService.js +4 -2
- package/src/Utilities/Services/ValidationService.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +1 -1
- package/src/View/Components/AdaptableIconSelector/index.d.ts +6 -0
- package/src/View/Components/AdaptableIconSelector/index.js +18 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -2
- package/src/View/Components/AdaptableViewIcon/index.d.ts +10 -0
- package/src/View/Components/AdaptableViewIcon/index.js +18 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +3 -3
- package/src/View/Components/ExternalRenderer.js +14 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +4 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -0
- package/src/View/Components/RangesComponent.d.ts +4 -4
- package/src/View/Components/RangesComponent.js +13 -22
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.js +2 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +13 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +5 -5
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
- package/src/View/DataChangeHistory/buildActionColumnButton.js +3 -2
- package/src/View/Export/ExportViewPanel.js +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -1
- package/src/View/GridInfo/GridInfoPopup.d.ts +0 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -2
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +2 -0
- package/src/View/Layout/SaveLayoutButton.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +8 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -1
- package/src/agGrid/ActionColumnRenderer.js +5 -1
- package/src/agGrid/Adaptable.d.ts +14 -3
- package/src/agGrid/Adaptable.js +129 -30
- package/src/agGrid/BadgeRenderer.js +10 -2
- package/src/agGrid/CheckboxRenderer.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +4 -5
- package/src/agGrid/agGridMenuHelper.js +4 -0
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +11 -11
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -3
- package/src/components/AdaptableIconComponent/index.js +6 -3
- package/src/components/ExpressionEditor/BaseEditorInput.js +2 -0
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/IconSelector/IconSelector.d.ts +2 -0
- package/src/components/IconSelector/IconSelector.js +21 -5
- package/src/components/Input/NumberInput.d.ts +10 -0
- package/src/components/Input/NumberInput.js +46 -0
- package/src/metamodel/adaptable.metamodel.d.ts +230 -145
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +13 -8
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -159
- package/src/Api/Events/SearchChanged.d.ts +0 -12
- package/src/Api/Implementation/ActionApiImpl.d.ts +0 -14
- /package/src/AdaptableOptions/{ActionOptions.js → ActionColumnOptions.js} +0 -0
- /package/src/AdaptableOptions/{GeneralOptions.js → ActionRowOptions.js} +0 -0
- /package/src/{Api/ActionApi.js → AdaptableOptions/CalendarOptions.js} +0 -0
- /package/src/{Api/Events/SearchChanged.js → AdaptableOptions/CellSummaryOptions.js} +0 -0
- /package/src/{Api/QueryLanguageApi.js → AdaptableOptions/CustomSortOptions.js} +0 -0
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -287,11 +287,9 @@ class Adaptable {
|
|
|
287
287
|
if (!((_a = runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
288
288
|
AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
|
|
289
289
|
}
|
|
290
|
-
else {
|
|
291
|
-
core_1.ModuleRegistry.registerModules(runtimeConfig.agGridModules);
|
|
292
|
-
}
|
|
293
290
|
return Adaptable.initInternal(adaptableOptions, {
|
|
294
291
|
supressReact18RenderWarning: true,
|
|
292
|
+
agGridModules: runtimeConfig.agGridModules,
|
|
295
293
|
});
|
|
296
294
|
}
|
|
297
295
|
/**
|
|
@@ -610,7 +608,28 @@ class Adaptable {
|
|
|
610
608
|
}
|
|
611
609
|
}
|
|
612
610
|
initializeAgGrid() {
|
|
611
|
+
var _a;
|
|
613
612
|
const perfInitializeAgGrid = this.logger.beginPerf('initializeAgGrid()');
|
|
613
|
+
this.setGridOptionsProperty('dataTypeDefinitions', () => {
|
|
614
|
+
// temporary workaround until https://github.com/AdaptableTools/adaptable/issues/2230
|
|
615
|
+
const revertedDateTypeDefinitions = {
|
|
616
|
+
date: {
|
|
617
|
+
baseDataType: 'date',
|
|
618
|
+
extendsDataType: 'date',
|
|
619
|
+
valueParser: null,
|
|
620
|
+
valueFormatter: null,
|
|
621
|
+
suppressDefaultProperties: true,
|
|
622
|
+
},
|
|
623
|
+
dateString: {
|
|
624
|
+
baseDataType: 'dateString',
|
|
625
|
+
extendsDataType: 'dateString',
|
|
626
|
+
valueParser: null,
|
|
627
|
+
valueFormatter: null,
|
|
628
|
+
suppressDefaultProperties: true,
|
|
629
|
+
},
|
|
630
|
+
};
|
|
631
|
+
return revertedDateTypeDefinitions;
|
|
632
|
+
});
|
|
614
633
|
// set up whether we use the getRowNode method or loop when finding a rowNode (former is preferable)
|
|
615
634
|
// can only do that here as the gridOptions not yet set up
|
|
616
635
|
this.useRowNodeLookUp = this.agGridHelper.TrySetUpNodeIds(this.hasAutogeneratedPrimaryKey());
|
|
@@ -672,8 +691,11 @@ class Adaptable {
|
|
|
672
691
|
let grid;
|
|
673
692
|
const agGridContainer = this.getAgGridContainerElement();
|
|
674
693
|
const perfAgGridInstance = this.logger.beginPerf('new AgGrid()');
|
|
675
|
-
|
|
676
|
-
|
|
694
|
+
let gridParams;
|
|
695
|
+
if ((_a = this.runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length) {
|
|
696
|
+
gridParams = { modules: this.runtimeConfig.agGridModules };
|
|
697
|
+
}
|
|
698
|
+
grid = new core_1.Grid(agGridContainer, this.gridOptions, gridParams);
|
|
677
699
|
perfAgGridInstance.end();
|
|
678
700
|
// add our adaptable object to the grid options api object
|
|
679
701
|
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
@@ -1316,7 +1338,7 @@ class Adaptable {
|
|
|
1316
1338
|
this.updateColumnsIntoStore();
|
|
1317
1339
|
}
|
|
1318
1340
|
persistLayout(layout) {
|
|
1319
|
-
if (this.api.layoutApi.
|
|
1341
|
+
if (this.api.layoutApi.shouldAutoSaveLayouts()) {
|
|
1320
1342
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
1321
1343
|
}
|
|
1322
1344
|
else {
|
|
@@ -1508,6 +1530,7 @@ class Adaptable {
|
|
|
1508
1530
|
state: newColumnsState,
|
|
1509
1531
|
applyOrder: true,
|
|
1510
1532
|
});
|
|
1533
|
+
this.applyGroupColumnWidth(layout);
|
|
1511
1534
|
perfApplyColumnState.end();
|
|
1512
1535
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
1513
1536
|
this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
|
|
@@ -1551,6 +1574,37 @@ class Adaptable {
|
|
|
1551
1574
|
});
|
|
1552
1575
|
perfSetLayout.end();
|
|
1553
1576
|
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Setting layout works by modifing the column state.
|
|
1579
|
+
* The column state is based on the current existing columns.
|
|
1580
|
+
* At this point the column groups do not exist, and the widths from layout are not applied.
|
|
1581
|
+
*
|
|
1582
|
+
* After the col sate is applied and the column groups are created we need
|
|
1583
|
+
* to apply the state again to update the widths of the group columns.
|
|
1584
|
+
*/
|
|
1585
|
+
applyGroupColumnWidth(layout) {
|
|
1586
|
+
if (!layout.RowGroupedColumns || !layout.RowGroupedColumns.length) {
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
const groupColumnWithDifferentWidths = this.gridOptions
|
|
1590
|
+
.columnApi.getColumnState()
|
|
1591
|
+
.reduce((acc, col) => {
|
|
1592
|
+
var _a;
|
|
1593
|
+
if (col.colId === (GeneralConstants === null || GeneralConstants === void 0 ? void 0 : GeneralConstants.AG_GRID_GROUPED_COLUMN)) {
|
|
1594
|
+
const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
|
|
1595
|
+
if (widthInLayout && widthInLayout !== col.width) {
|
|
1596
|
+
acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
return acc;
|
|
1600
|
+
}, []);
|
|
1601
|
+
if (groupColumnWithDifferentWidths.length === 0) {
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
1605
|
+
state: groupColumnWithDifferentWidths,
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1554
1608
|
updateRowGroupsExpandedState(layout) {
|
|
1555
1609
|
if (!layout) {
|
|
1556
1610
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
@@ -1625,7 +1679,7 @@ class Adaptable {
|
|
|
1625
1679
|
});
|
|
1626
1680
|
groupedColumns = groupedColumns.filter((x) => !!x);
|
|
1627
1681
|
pivotedColumns = pivotedColumns.filter((x) => !!x);
|
|
1628
|
-
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.
|
|
1682
|
+
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
|
|
1629
1683
|
columnOrder = this.restoreUnGroupColumnOrder({
|
|
1630
1684
|
columnOrder,
|
|
1631
1685
|
newGroupColumns: groupedColumns,
|
|
@@ -1833,7 +1887,13 @@ class Adaptable {
|
|
|
1833
1887
|
});
|
|
1834
1888
|
}
|
|
1835
1889
|
}
|
|
1836
|
-
const uniqueVals = (0, uniqBy_1.default)(returnValues,
|
|
1890
|
+
const uniqueVals = (0, uniqBy_1.default)(returnValues, (dataItem) => {
|
|
1891
|
+
const value = dataItem.rawValue;
|
|
1892
|
+
if (value instanceof Date) {
|
|
1893
|
+
return value.toISOString();
|
|
1894
|
+
}
|
|
1895
|
+
return value;
|
|
1896
|
+
});
|
|
1837
1897
|
return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
|
|
1838
1898
|
}
|
|
1839
1899
|
async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
|
|
@@ -1846,6 +1906,8 @@ class Adaptable {
|
|
|
1846
1906
|
try {
|
|
1847
1907
|
const filterPermittedValuesParams = {
|
|
1848
1908
|
adaptableApi: this.api,
|
|
1909
|
+
userName: this.adaptableOptions.userName,
|
|
1910
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1849
1911
|
column: column,
|
|
1850
1912
|
searchFilter: filter,
|
|
1851
1913
|
};
|
|
@@ -1865,6 +1927,8 @@ class Adaptable {
|
|
|
1865
1927
|
try {
|
|
1866
1928
|
const permittedValuesParams = {
|
|
1867
1929
|
adaptableApi: this.api,
|
|
1930
|
+
userName: this.adaptableOptions.userName,
|
|
1931
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1868
1932
|
column: column,
|
|
1869
1933
|
};
|
|
1870
1934
|
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(permittedValuesParams));
|
|
@@ -1882,6 +1946,8 @@ class Adaptable {
|
|
|
1882
1946
|
adaptableApi: this.api,
|
|
1883
1947
|
column: column,
|
|
1884
1948
|
gridCells: selectedGridCells,
|
|
1949
|
+
userName: this.adaptableOptions.userName,
|
|
1950
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1885
1951
|
};
|
|
1886
1952
|
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(bulkUpdatePermittedValuesParams));
|
|
1887
1953
|
}
|
|
@@ -2321,7 +2387,7 @@ class Adaptable {
|
|
|
2321
2387
|
});
|
|
2322
2388
|
}
|
|
2323
2389
|
getColDefsForRowEditColumns() {
|
|
2324
|
-
const actionRowButtons = this.api.
|
|
2390
|
+
const actionRowButtons = this.api.actionRowApi.getActionRowButtons();
|
|
2325
2391
|
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
2326
2392
|
return [];
|
|
2327
2393
|
}
|
|
@@ -2332,7 +2398,7 @@ class Adaptable {
|
|
|
2332
2398
|
},
|
|
2333
2399
|
tooltip: 'Create',
|
|
2334
2400
|
onClick: () => {
|
|
2335
|
-
this.api.
|
|
2401
|
+
this.api.actionRowApi.displayCreateActionRow();
|
|
2336
2402
|
},
|
|
2337
2403
|
},
|
|
2338
2404
|
edit: {
|
|
@@ -2341,7 +2407,7 @@ class Adaptable {
|
|
|
2341
2407
|
},
|
|
2342
2408
|
tooltip: 'Edit',
|
|
2343
2409
|
onClick: (button, context) => {
|
|
2344
|
-
this.api.
|
|
2410
|
+
this.api.actionRowApi.displayEditActionRow(context.primaryKeyValue);
|
|
2345
2411
|
},
|
|
2346
2412
|
},
|
|
2347
2413
|
clone: {
|
|
@@ -2350,7 +2416,7 @@ class Adaptable {
|
|
|
2350
2416
|
},
|
|
2351
2417
|
tooltip: 'Clone',
|
|
2352
2418
|
onClick: (button, context) => {
|
|
2353
|
-
this.api.
|
|
2419
|
+
this.api.actionRowApi.displayCloneActionRow(context.primaryKeyValue);
|
|
2354
2420
|
},
|
|
2355
2421
|
},
|
|
2356
2422
|
delete: {
|
|
@@ -2364,9 +2430,11 @@ class Adaptable {
|
|
|
2364
2430
|
type: 'rowDeleted',
|
|
2365
2431
|
rowNode: context.rowNode,
|
|
2366
2432
|
adaptableApi: context.adaptableApi,
|
|
2433
|
+
userName: context.userName,
|
|
2434
|
+
adaptableId: context.adaptableId,
|
|
2367
2435
|
};
|
|
2368
2436
|
this.api.eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
2369
|
-
(_b = (_a = this.adaptableOptions.
|
|
2437
|
+
(_b = (_a = this.adaptableOptions.actionRowOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
2370
2438
|
},
|
|
2371
2439
|
},
|
|
2372
2440
|
};
|
|
@@ -2378,9 +2446,11 @@ class Adaptable {
|
|
|
2378
2446
|
// should NOT happen unless the user sent some invalid button type in the predefined config
|
|
2379
2447
|
return;
|
|
2380
2448
|
}
|
|
2381
|
-
const customButtonConfig = (_b = (_a = this.adaptableOptions.
|
|
2449
|
+
const customButtonConfig = (_b = (_a = this.adaptableOptions.actionRowOptions.actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
2382
2450
|
adaptableApi: this.api,
|
|
2383
2451
|
actionRowButtonType,
|
|
2452
|
+
userName: this.adaptableOptions.userName,
|
|
2453
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
2384
2454
|
});
|
|
2385
2455
|
if (!customButtonConfig) {
|
|
2386
2456
|
return defaultButtonConfig;
|
|
@@ -2412,7 +2482,7 @@ class Adaptable {
|
|
|
2412
2482
|
filter: false,
|
|
2413
2483
|
sortable: false,
|
|
2414
2484
|
enableRowGroup: false,
|
|
2415
|
-
pinned: this.adaptableOptions.
|
|
2485
|
+
pinned: this.adaptableOptions.actionRowOptions.actionRowButtonOptions.position === 'pinnedRight'
|
|
2416
2486
|
? 'right'
|
|
2417
2487
|
: 'left',
|
|
2418
2488
|
cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
|
|
@@ -2430,7 +2500,7 @@ class Adaptable {
|
|
|
2430
2500
|
suppressMenu: false,
|
|
2431
2501
|
suppressMovable: false,
|
|
2432
2502
|
};
|
|
2433
|
-
return this.api.
|
|
2503
|
+
return this.api.actionColumnApi.getActionColumns().map((actionColumn) => {
|
|
2434
2504
|
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
2435
2505
|
const newColDef = {
|
|
2436
2506
|
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
@@ -2528,7 +2598,7 @@ class Adaptable {
|
|
|
2528
2598
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
|
|
2529
2599
|
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2530
2600
|
}
|
|
2531
|
-
const isExternalEvaluation = !this.api.
|
|
2601
|
+
const isExternalEvaluation = !this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
2532
2602
|
const newColDef = {
|
|
2533
2603
|
headerName: calculatedColumn.FriendlyName
|
|
2534
2604
|
? calculatedColumn.FriendlyName
|
|
@@ -2833,8 +2903,8 @@ class Adaptable {
|
|
|
2833
2903
|
* Action: Stop editing
|
|
2834
2904
|
*/
|
|
2835
2905
|
this.gridOptions.api.addEventListener(core_1.Events.EVENT_CELL_EDITING_STARTED, (this.listenerCellEditingStarted = () => {
|
|
2836
|
-
var _a
|
|
2837
|
-
if ((
|
|
2906
|
+
var _a;
|
|
2907
|
+
if ((_a = this.adaptableOptions.actionRowOptions) === null || _a === void 0 ? void 0 : _a.disableInlineEditing)
|
|
2838
2908
|
this.gridOptions.api.stopEditing();
|
|
2839
2909
|
}));
|
|
2840
2910
|
/**
|
|
@@ -2921,7 +2991,7 @@ class Adaptable {
|
|
|
2921
2991
|
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2922
2992
|
return;
|
|
2923
2993
|
}
|
|
2924
|
-
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.
|
|
2994
|
+
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
|
|
2925
2995
|
this.persistColumnIndexBeforeGrouping(params);
|
|
2926
2996
|
}
|
|
2927
2997
|
}));
|
|
@@ -2967,7 +3037,7 @@ class Adaptable {
|
|
|
2967
3037
|
this.onSortChanged();
|
|
2968
3038
|
this.debouncedSetSelectedCells();
|
|
2969
3039
|
}));
|
|
2970
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.
|
|
3040
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.groupingOptions.showGroupingTotalsAsHeader;
|
|
2971
3041
|
/**
|
|
2972
3042
|
* Use Case: Model has updated
|
|
2973
3043
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
@@ -3051,9 +3121,9 @@ class Adaptable {
|
|
|
3051
3121
|
if (!this.isGroupRowNode(node)) {
|
|
3052
3122
|
const currentQuery = this.api.queryApi.getCurrentQuery();
|
|
3053
3123
|
if (currentQuery) {
|
|
3054
|
-
const evaluateQueryOnClient = this.api.
|
|
3124
|
+
const evaluateQueryOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('Query', undefined, currentQuery);
|
|
3055
3125
|
if (evaluateQueryOnClient) {
|
|
3056
|
-
const isCurrentQueryValid = this.api.
|
|
3126
|
+
const isCurrentQueryValid = this.api.expressionApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
|
|
3057
3127
|
if (!isCurrentQueryValid ||
|
|
3058
3128
|
!this.api.internalApi
|
|
3059
3129
|
.getQueryLanguageService()
|
|
@@ -3067,7 +3137,7 @@ class Adaptable {
|
|
|
3067
3137
|
try {
|
|
3068
3138
|
if (columnFilters.length > 0) {
|
|
3069
3139
|
for (const columnFilter of columnFilters) {
|
|
3070
|
-
const evaluateFilterOnClient = this.api.
|
|
3140
|
+
const evaluateFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('Filter', columnFilter, [columnFilter.Predicate]);
|
|
3071
3141
|
if (evaluateFilterOnClient) {
|
|
3072
3142
|
// we then assess filters (if running locally)
|
|
3073
3143
|
if (!this.api.filterApi.internalApi.evaluateColumnFilter(columnFilter, node)) {
|
|
@@ -3181,6 +3251,9 @@ class Adaptable {
|
|
|
3181
3251
|
this.setupColumnQuickFilerText(colSetupInfo);
|
|
3182
3252
|
this.setupAllowedAggFuncs(colSetupInfo);
|
|
3183
3253
|
this.setupColumnKeyCreator(colSetupInfo);
|
|
3254
|
+
// this is just to make sure that AG Grid does NOT infer the cellDataType
|
|
3255
|
+
// https://github.com/AdaptableTools/adaptable/issues/2230 should render it obsolete
|
|
3256
|
+
this.setupColumnCellDataType(colSetupInfo);
|
|
3184
3257
|
});
|
|
3185
3258
|
this.setupRowStyling();
|
|
3186
3259
|
// setupAggregationColumnHeaders() is executed on every setLayout()
|
|
@@ -3462,13 +3535,15 @@ class Adaptable {
|
|
|
3462
3535
|
return userPropertyValue(params);
|
|
3463
3536
|
}
|
|
3464
3537
|
const value = params.value;
|
|
3465
|
-
const unbalancedGroupsKey = (_a = adaptableOptions.
|
|
3538
|
+
const unbalancedGroupsKey = (_a = adaptableOptions.groupingOptions) === null || _a === void 0 ? void 0 : _a.unbalancedGroupsKey;
|
|
3466
3539
|
if (!unbalancedGroupsKey) {
|
|
3467
3540
|
return value;
|
|
3468
3541
|
}
|
|
3469
3542
|
let groupUnbalancedGroupsUnderKeyValue = typeof unbalancedGroupsKey === 'function'
|
|
3470
3543
|
? unbalancedGroupsKey({
|
|
3471
3544
|
adaptableApi: adaptableApi,
|
|
3545
|
+
userName: this.adaptableOptions.userName,
|
|
3546
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
3472
3547
|
adaptableColumn: abColumn,
|
|
3473
3548
|
params,
|
|
3474
3549
|
})
|
|
@@ -3477,6 +3552,14 @@ class Adaptable {
|
|
|
3477
3552
|
};
|
|
3478
3553
|
});
|
|
3479
3554
|
}
|
|
3555
|
+
setupColumnCellDataType(columnSetupInfo) {
|
|
3556
|
+
const { col } = columnSetupInfo;
|
|
3557
|
+
// AG Grid introduced since v30.x an inferred cellDataType
|
|
3558
|
+
// the problem is that it breaks the default value formatter and/or editor (especially for Date columns)
|
|
3559
|
+
this.setColDefProperty(col, 'cellDataType', () => {
|
|
3560
|
+
return false;
|
|
3561
|
+
});
|
|
3562
|
+
}
|
|
3480
3563
|
setupColumnHeader({ col, abColumn }) {
|
|
3481
3564
|
var _a, _b;
|
|
3482
3565
|
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
@@ -3527,7 +3610,7 @@ class Adaptable {
|
|
|
3527
3610
|
});
|
|
3528
3611
|
}
|
|
3529
3612
|
setupColumnValueFormatter({ col, abColumn }) {
|
|
3530
|
-
this.setColDefProperty(col, 'valueFormatter', (
|
|
3613
|
+
this.setColDefProperty(col, 'valueFormatter', (userPropertyValue) => {
|
|
3531
3614
|
const activeFormatColumnsWithDisplayFormat = this.api.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
3532
3615
|
if (!activeFormatColumnsWithDisplayFormat.length) {
|
|
3533
3616
|
return;
|
|
@@ -3578,6 +3661,8 @@ class Adaptable {
|
|
|
3578
3661
|
const cellEditableContext = {
|
|
3579
3662
|
gridCell,
|
|
3580
3663
|
adaptableApi: this.api,
|
|
3664
|
+
userName: this.adaptableOptions.userName,
|
|
3665
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
3581
3666
|
};
|
|
3582
3667
|
return cellEditableFn(cellEditableContext);
|
|
3583
3668
|
};
|
|
@@ -3680,10 +3765,23 @@ class Adaptable {
|
|
|
3680
3765
|
this.agGridHelper.checkShouldClearExistingFiltersOrSearches();
|
|
3681
3766
|
}
|
|
3682
3767
|
isAgGridModulePresent(moduleName) {
|
|
3683
|
-
|
|
3768
|
+
const standardAgGridRegistrationCheck = core_1.ModuleRegistry.__isRegistered(moduleName, this.gridOptions.gridId);
|
|
3769
|
+
if (standardAgGridRegistrationCheck) {
|
|
3770
|
+
return true;
|
|
3771
|
+
}
|
|
3772
|
+
// as of AG Grid 30.0.3 the ModuleRegistry gets an dynamic grid ID for the framework versions
|
|
3773
|
+
// because of that we have to check ALL grid IDs to see if the module is registered
|
|
3774
|
+
// TODO AFL: we should recheck this later, it seems AG Grid is already refactoring this faulty registration process
|
|
3775
|
+
// @ts-ignore
|
|
3776
|
+
const gridModulesMap = core_1.ModuleRegistry.gridModulesMap;
|
|
3777
|
+
let allGridModulesMap = {};
|
|
3778
|
+
Object.keys(gridModulesMap).forEach((gridId) => {
|
|
3779
|
+
allGridModulesMap = Object.assign(Object.assign({}, allGridModulesMap), gridModulesMap[gridId]);
|
|
3780
|
+
});
|
|
3781
|
+
return !!allGridModulesMap[moduleName];
|
|
3684
3782
|
}
|
|
3685
3783
|
getAgGridRegisteredModules() {
|
|
3686
|
-
return core_1.ModuleRegistry.
|
|
3784
|
+
return core_1.ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId).map((module) => module.moduleName);
|
|
3687
3785
|
}
|
|
3688
3786
|
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
3689
3787
|
if (oldData == null || oldData == undefined) {
|
|
@@ -3824,7 +3922,7 @@ class Adaptable {
|
|
|
3824
3922
|
if (!dataChangedScope.wholeRow) {
|
|
3825
3923
|
formatColumnsWithExpression.forEach((styleModule) => {
|
|
3826
3924
|
if (!dataChangedScope.wholeRow) {
|
|
3827
|
-
const columnIds = this.api.
|
|
3925
|
+
const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3828
3926
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3829
3927
|
if (this.api.scopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3830
3928
|
dataChangedScope.wholeRow = true;
|
|
@@ -5033,6 +5131,7 @@ class AdaptableNoCodeWizard {
|
|
|
5033
5131
|
* @param adaptableOptions
|
|
5034
5132
|
*/
|
|
5035
5133
|
constructor(adaptableOptions, extraOptions = {}) {
|
|
5134
|
+
var _a;
|
|
5036
5135
|
const defaultInit = async ({ gridOptions, adaptableOptions, agGridModules, }) => {
|
|
5037
5136
|
adaptableOptions.gridOptions = gridOptions;
|
|
5038
5137
|
return await Adaptable.init(adaptableOptions, { agGridModules: agGridModules });
|
|
@@ -5040,7 +5139,7 @@ class AdaptableNoCodeWizard {
|
|
|
5040
5139
|
this.adaptableOptions = adaptableOptions;
|
|
5041
5140
|
this.init = extraOptions.onInit || defaultInit;
|
|
5042
5141
|
this.extraOptions = extraOptions;
|
|
5043
|
-
this.agGridModules = core_1.ModuleRegistry.
|
|
5142
|
+
this.agGridModules = core_1.ModuleRegistry.__getRegisteredModules((_a = this.adaptableOptions.gridOptions) === null || _a === void 0 ? void 0 : _a.gridId);
|
|
5044
5143
|
this.render();
|
|
5045
5144
|
}
|
|
5046
5145
|
render(container) {
|
|
@@ -8,7 +8,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
8
8
|
}
|
|
9
9
|
return class BadgetRenderer {
|
|
10
10
|
init(params) {
|
|
11
|
-
var _a, _b, _c, _d;
|
|
11
|
+
var _a, _b, _c, _d, _e, _f;
|
|
12
12
|
this.eGui = document.createElement('div');
|
|
13
13
|
this.eGui.className = 'ab-Badge__wrapper';
|
|
14
14
|
const formattedValue = (_c = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value) !== null && _c !== void 0 ? _c : '';
|
|
@@ -36,11 +36,19 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
36
36
|
if (icon && 'name' in icon && icon.size === undefined) {
|
|
37
37
|
icon.size = 14;
|
|
38
38
|
}
|
|
39
|
+
const userInterfaceOptions = (_d = api.optionsApi.getAdaptableOptions()) === null || _d === void 0 ? void 0 : _d.userInterfaceOptions;
|
|
40
|
+
const customDefinedIcons = (_e = userInterfaceOptions.customIcons) !== null && _e !== void 0 ? _e : [];
|
|
41
|
+
let customIcon = badge.Icon && 'name' in badge.Icon
|
|
42
|
+
? api.userInterfaceApi.getCustomIconDefinition(badge.Icon.name)
|
|
43
|
+
: null;
|
|
44
|
+
if (customIcon) {
|
|
45
|
+
icon = customIcon;
|
|
46
|
+
}
|
|
39
47
|
this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, Badge_1.Badge)({
|
|
40
48
|
adaptableStyle: badge.Style,
|
|
41
49
|
children: formattedValue,
|
|
42
50
|
icon,
|
|
43
|
-
iconPosition: (
|
|
51
|
+
iconPosition: (_f = badge.IconPosition) !== null && _f !== void 0 ? _f : 'start',
|
|
44
52
|
}), this.eGui);
|
|
45
53
|
}
|
|
46
54
|
getGui() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ICellRendererFunc } from '@ag-grid-community/core';
|
|
1
|
+
import { ICellEditorComp, ICellEditorParams, ICellRendererFunc } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
-
import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core/dist/cjs/es5/interfaces/iCellEditor';
|
|
4
3
|
export declare const getCheckboxRendererForColumn: (columnId: string, isColumnReadOnly: boolean, api: AdaptableApi) => ICellRendererFunc;
|
|
5
4
|
export declare class CheckboxEditor implements ICellEditorComp {
|
|
6
5
|
private eGui;
|
|
@@ -111,10 +111,7 @@ class agGridHelper {
|
|
|
111
111
|
// if no valid pk then always false
|
|
112
112
|
return false;
|
|
113
113
|
}
|
|
114
|
-
if (Helper_1.Helper.objectExists(this.gridOptions.
|
|
115
|
-
Helper_1.Helper.objectExists(this.gridOptions.getRowId)) {
|
|
116
|
-
// if the user provided a getRowNodeId/getRowId then we don't need to do anything
|
|
117
|
-
// Note: starting with 27.1.0 'getRowNodeId' method is deprecated and will be removed in future versions
|
|
114
|
+
if (Helper_1.Helper.objectExists(this.gridOptions.getRowId)) {
|
|
118
115
|
return true;
|
|
119
116
|
}
|
|
120
117
|
const primaryKey = this.adaptable.adaptableOptions.primaryKey;
|
|
@@ -274,6 +271,8 @@ class agGridHelper {
|
|
|
274
271
|
adaptableApi: this.adaptable.api,
|
|
275
272
|
selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
|
|
276
273
|
selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
|
|
274
|
+
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
275
|
+
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
277
276
|
};
|
|
278
277
|
this.adaptable.api.eventApi.emit('SelectionChanged', selectionChangedInfo);
|
|
279
278
|
}
|
|
@@ -336,7 +335,7 @@ class agGridHelper {
|
|
|
336
335
|
friendlyName: friendlyName,
|
|
337
336
|
dataType: datatype,
|
|
338
337
|
};
|
|
339
|
-
return this.adaptable.api.
|
|
338
|
+
return this.adaptable.api.expressionApi.isColumnQueryable(abColumnBase);
|
|
340
339
|
}
|
|
341
340
|
isColumnExportable(colDef, columnId, friendlyName, datatype) {
|
|
342
341
|
if (!colDef) {
|
|
@@ -237,6 +237,8 @@ class agGridMenuHelper {
|
|
|
237
237
|
adaptableColumn: adaptableColumn,
|
|
238
238
|
agGridColumn: agGridColumn,
|
|
239
239
|
adaptableApi: this.adaptable.api,
|
|
240
|
+
userName: this.adaptable.adaptableOptions.userName,
|
|
241
|
+
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
240
242
|
isRowGroupColumn: this.adaptable.api.columnApi.isAutoRowGroupColumn(agGridColumn.getColId()),
|
|
241
243
|
};
|
|
242
244
|
}
|
|
@@ -276,6 +278,8 @@ class agGridMenuHelper {
|
|
|
276
278
|
isSingleSelectedCell: isSelectedCell && (selectedCellInfo === null || selectedCellInfo === void 0 ? void 0 : selectedCellInfo.gridCells.length) == 1,
|
|
277
279
|
primaryKeyValue: clickedCell ? clickedCell.primaryKeyValue : undefined,
|
|
278
280
|
adaptableApi: this.adaptable.api,
|
|
281
|
+
userName: this.adaptable.adaptableOptions.userName,
|
|
282
|
+
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
279
283
|
selectedCellInfo: selectedCellInfo,
|
|
280
284
|
selectedRowInfo: selectedRowInfo,
|
|
281
285
|
isRowGroupColumn: this.adaptable.api.columnApi.isAutoRowGroupColumn(params.column.getColId()),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { GridOptions } from '@ag-grid-community/core';
|
|
2
2
|
export declare const attachColumnTypes: (gridOptions: GridOptions) => {
|
|
3
|
-
[key: string]: import("@ag-grid-community/core").ColDef<any>;
|
|
3
|
+
[key: string]: import("@ag-grid-community/core").ColDef<any, any>;
|
|
4
4
|
} & {
|
|
5
|
-
[x: string]: import("@ag-grid-community/core").ColDef<any>;
|
|
6
|
-
abColDefNumber: import("@ag-grid-community/core").ColDef<any>;
|
|
7
|
-
abColDefString: import("@ag-grid-community/core").ColDef<any>;
|
|
8
|
-
abColDefBoolean: import("@ag-grid-community/core").ColDef<any>;
|
|
9
|
-
abColDefDate: import("@ag-grid-community/core").ColDef<any>;
|
|
10
|
-
abColDefObject: import("@ag-grid-community/core").ColDef<any>;
|
|
11
|
-
abColDefCustom: import("@ag-grid-community/core").ColDef<any>;
|
|
12
|
-
abColDefNumberArray: import("@ag-grid-community/core").ColDef<any>;
|
|
13
|
-
abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any>;
|
|
14
|
-
abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any>;
|
|
5
|
+
[x: string]: import("@ag-grid-community/core").ColDef<any, any>;
|
|
6
|
+
abColDefNumber: import("@ag-grid-community/core").ColDef<any, any>;
|
|
7
|
+
abColDefString: import("@ag-grid-community/core").ColDef<any, any>;
|
|
8
|
+
abColDefBoolean: import("@ag-grid-community/core").ColDef<any, any>;
|
|
9
|
+
abColDefDate: import("@ag-grid-community/core").ColDef<any, any>;
|
|
10
|
+
abColDefObject: import("@ag-grid-community/core").ColDef<any, any>;
|
|
11
|
+
abColDefCustom: import("@ag-grid-community/core").ColDef<any, any>;
|
|
12
|
+
abColDefNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
|
|
13
|
+
abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
|
|
14
|
+
abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
|
|
15
15
|
};
|
|
@@ -60,6 +60,7 @@ exports.ReactAdaptableDateEditor = (0, react_1.forwardRef)((props, ref) => {
|
|
|
60
60
|
Pattern,
|
|
61
61
|
});
|
|
62
62
|
} });
|
|
63
|
+
// @ts-ignore it will be fixed with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
63
64
|
valueRef.current = valueParser(params);
|
|
64
65
|
}
|
|
65
66
|
else {
|
|
@@ -159,6 +160,7 @@ class AdaptableDateEditor {
|
|
|
159
160
|
Pattern,
|
|
160
161
|
});
|
|
161
162
|
} });
|
|
163
|
+
// @ts-ignore it will be fixed with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
162
164
|
this.value = this.valueParser(params);
|
|
163
165
|
}
|
|
164
166
|
else {
|
|
@@ -19,8 +19,8 @@ function getStartValue(params) {
|
|
|
19
19
|
if (shouldClearExistingValue(params)) {
|
|
20
20
|
return '';
|
|
21
21
|
}
|
|
22
|
-
if (params.
|
|
23
|
-
return params.
|
|
22
|
+
if (params.eventKey && isValidChar(params.eventKey)) {
|
|
23
|
+
return params.eventKey;
|
|
24
24
|
}
|
|
25
25
|
return params.value;
|
|
26
26
|
}
|
|
@@ -18,9 +18,12 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
|
|
|
18
18
|
height: 15,
|
|
19
19
|
width: 15,
|
|
20
20
|
});
|
|
21
|
-
let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api
|
|
22
|
-
|
|
23
|
-
let
|
|
21
|
+
let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
|
|
22
|
+
adaptableId: this.getOptions().adaptableId, });
|
|
23
|
+
let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
|
|
24
|
+
adaptableId: this.getOptions().adaptableId, });
|
|
25
|
+
let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
|
|
26
|
+
adaptableId: this.getOptions().adaptableId, });
|
|
24
27
|
return (React.createElement(SimpleButton_1.default, { autoFocus: focusFirstButton && index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, icon: buttonIcon, tone: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _a !== void 0 ? _a : defaultTone, variant: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant, "data-text": buttonLabel, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, marginLeft: index ? 2 : 0, onClick: () => {
|
|
25
28
|
onClick(button);
|
|
26
29
|
} }, buttonLabel));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isAdaptableIcon = exports.isAdaptableElementIcon = exports.isAdaptableExternalIcon = exports.isAdaptableInternalIcon = exports.AdaptableIconComponent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const icons_1 = require("../icons");
|
|
6
|
+
const icons_1 = tslib_1.__importStar(require("../icons"));
|
|
7
7
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const AdaptableIconComponent = (props) => {
|
|
@@ -26,6 +26,9 @@ const AdaptableIconComponent = (props) => {
|
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
28
|
htmlElement = icon.element;
|
|
29
|
+
// THe element neets to be cloned.
|
|
30
|
+
// when it is used in more than one plce the element is removed from the DOM
|
|
31
|
+
htmlElement = htmlElement.cloneNode(true);
|
|
29
32
|
}
|
|
30
33
|
divRef.current.insertAdjacentElement('afterend', htmlElement);
|
|
31
34
|
}
|
|
@@ -35,8 +38,8 @@ const AdaptableIconComponent = (props) => {
|
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
40
|
}, [icon]);
|
|
38
|
-
if ((0, exports.isAdaptableInternalIcon)(icon)) {
|
|
39
|
-
return React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className });
|
|
41
|
+
if ((0, exports.isAdaptableInternalIcon)(icon) && icon.name in icons_1.default) {
|
|
42
|
+
return (React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className }));
|
|
40
43
|
}
|
|
41
44
|
if ((0, exports.isAdaptableExternalIcon)(icon)) {
|
|
42
45
|
let width = (_b = (_a = icon.style) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-icon__width)';
|
|
@@ -195,6 +195,8 @@ function BaseEditorInput(props) {
|
|
|
195
195
|
// we need a fully-fledged rowNode as Adaptable accesses internal methods of it
|
|
196
196
|
node: testRowNode,
|
|
197
197
|
adaptableApi: props.api,
|
|
198
|
+
userName: props.api.optionsApi.getUserName(),
|
|
199
|
+
adaptableId: props.api.optionsApi.getAdaptableId(),
|
|
198
200
|
functions: expressionFunctions,
|
|
199
201
|
evaluateCustomQueryVariable: props.api.internalApi.getQueryLanguageService().evaluateCustomQueryVariable,
|
|
200
202
|
});
|
|
@@ -112,7 +112,7 @@ function ExpressionEditor(props) {
|
|
|
112
112
|
padding: 5,
|
|
113
113
|
} }, showColumnIds
|
|
114
114
|
? namedQuery.BooleanExpression
|
|
115
|
-
: props.api.
|
|
115
|
+
: props.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(namedQuery)))))));
|
|
116
116
|
const showDocumentationLinks = props.api.internalApi.isDocumentationLinksDisplayed();
|
|
117
117
|
const queryDocumentationLink = queryDocumentationLinks[type];
|
|
118
118
|
return (React.createElement(EditorContext_1.ExpressionEditorContext.Provider, { value: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
+
import { UserInterfaceOptions } from '../../types';
|
|
2
3
|
export interface IconSelectorProps {
|
|
4
|
+
customIcons?: UserInterfaceOptions['customIcons'];
|
|
3
5
|
value?: string;
|
|
4
6
|
onChange: (iconName: string) => void;
|
|
5
7
|
clearable?: boolean;
|