@adaptabletools/adaptable 15.4.2 → 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 +232 -226
- 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/AdaptableNoCodeWizard.d.ts +3 -0
- 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/FilterOptions.d.ts +3 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +24 -0
- package/src/AdaptableOptions/GroupingOptions.d.ts +50 -0
- package/src/AdaptableOptions/GroupingOptions.js +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +3 -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/ToolPanelOptions.d.ts +3 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +36 -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 +10 -34
- 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 +20 -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 +6 -35
- 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 +11 -5
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +13 -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 +4 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -6
- package/src/PredefinedConfig/StyledColumnState.d.ts +3 -0
- 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/FilterForm/QuickFilterValues.js +8 -1
- 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 +138 -38
- 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 +360 -143
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +3 -0
- 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
|
@@ -67,6 +67,7 @@ const ChartingService_1 = require("../Utilities/Services/ChartingService");
|
|
|
67
67
|
const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
68
68
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
69
69
|
const attachAddaptableColumnTypes_1 = require("./attachAddaptableColumnTypes");
|
|
70
|
+
const FormatHelper_1 = require("../Utilities/Helpers/FormatHelper");
|
|
70
71
|
const tinycolor = require('tinycolor2');
|
|
71
72
|
const GROUP_PATH_SEPARATOR = '/';
|
|
72
73
|
// IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
|
|
@@ -286,11 +287,9 @@ class Adaptable {
|
|
|
286
287
|
if (!((_a = runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
287
288
|
AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
|
|
288
289
|
}
|
|
289
|
-
else {
|
|
290
|
-
core_1.ModuleRegistry.registerModules(runtimeConfig.agGridModules);
|
|
291
|
-
}
|
|
292
290
|
return Adaptable.initInternal(adaptableOptions, {
|
|
293
291
|
supressReact18RenderWarning: true,
|
|
292
|
+
agGridModules: runtimeConfig.agGridModules,
|
|
294
293
|
});
|
|
295
294
|
}
|
|
296
295
|
/**
|
|
@@ -609,7 +608,28 @@ class Adaptable {
|
|
|
609
608
|
}
|
|
610
609
|
}
|
|
611
610
|
initializeAgGrid() {
|
|
611
|
+
var _a;
|
|
612
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
|
+
});
|
|
613
633
|
// set up whether we use the getRowNode method or loop when finding a rowNode (former is preferable)
|
|
614
634
|
// can only do that here as the gridOptions not yet set up
|
|
615
635
|
this.useRowNodeLookUp = this.agGridHelper.TrySetUpNodeIds(this.hasAutogeneratedPrimaryKey());
|
|
@@ -671,8 +691,11 @@ class Adaptable {
|
|
|
671
691
|
let grid;
|
|
672
692
|
const agGridContainer = this.getAgGridContainerElement();
|
|
673
693
|
const perfAgGridInstance = this.logger.beginPerf('new AgGrid()');
|
|
674
|
-
|
|
675
|
-
|
|
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);
|
|
676
699
|
perfAgGridInstance.end();
|
|
677
700
|
// add our adaptable object to the grid options api object
|
|
678
701
|
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
@@ -1315,7 +1338,7 @@ class Adaptable {
|
|
|
1315
1338
|
this.updateColumnsIntoStore();
|
|
1316
1339
|
}
|
|
1317
1340
|
persistLayout(layout) {
|
|
1318
|
-
if (this.api.layoutApi.
|
|
1341
|
+
if (this.api.layoutApi.shouldAutoSaveLayouts()) {
|
|
1319
1342
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
1320
1343
|
}
|
|
1321
1344
|
else {
|
|
@@ -1507,6 +1530,7 @@ class Adaptable {
|
|
|
1507
1530
|
state: newColumnsState,
|
|
1508
1531
|
applyOrder: true,
|
|
1509
1532
|
});
|
|
1533
|
+
this.applyGroupColumnWidth(layout);
|
|
1510
1534
|
perfApplyColumnState.end();
|
|
1511
1535
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
1512
1536
|
this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
|
|
@@ -1550,6 +1574,37 @@ class Adaptable {
|
|
|
1550
1574
|
});
|
|
1551
1575
|
perfSetLayout.end();
|
|
1552
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
|
+
}
|
|
1553
1608
|
updateRowGroupsExpandedState(layout) {
|
|
1554
1609
|
if (!layout) {
|
|
1555
1610
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
@@ -1624,7 +1679,7 @@ class Adaptable {
|
|
|
1624
1679
|
});
|
|
1625
1680
|
groupedColumns = groupedColumns.filter((x) => !!x);
|
|
1626
1681
|
pivotedColumns = pivotedColumns.filter((x) => !!x);
|
|
1627
|
-
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) {
|
|
1628
1683
|
columnOrder = this.restoreUnGroupColumnOrder({
|
|
1629
1684
|
columnOrder,
|
|
1630
1685
|
newGroupColumns: groupedColumns,
|
|
@@ -1832,7 +1887,13 @@ class Adaptable {
|
|
|
1832
1887
|
});
|
|
1833
1888
|
}
|
|
1834
1889
|
}
|
|
1835
|
-
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
|
+
});
|
|
1836
1897
|
return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
|
|
1837
1898
|
}
|
|
1838
1899
|
async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
|
|
@@ -1845,6 +1906,8 @@ class Adaptable {
|
|
|
1845
1906
|
try {
|
|
1846
1907
|
const filterPermittedValuesParams = {
|
|
1847
1908
|
adaptableApi: this.api,
|
|
1909
|
+
userName: this.adaptableOptions.userName,
|
|
1910
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1848
1911
|
column: column,
|
|
1849
1912
|
searchFilter: filter,
|
|
1850
1913
|
};
|
|
@@ -1864,6 +1927,8 @@ class Adaptable {
|
|
|
1864
1927
|
try {
|
|
1865
1928
|
const permittedValuesParams = {
|
|
1866
1929
|
adaptableApi: this.api,
|
|
1930
|
+
userName: this.adaptableOptions.userName,
|
|
1931
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1867
1932
|
column: column,
|
|
1868
1933
|
};
|
|
1869
1934
|
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(permittedValuesParams));
|
|
@@ -1881,6 +1946,8 @@ class Adaptable {
|
|
|
1881
1946
|
adaptableApi: this.api,
|
|
1882
1947
|
column: column,
|
|
1883
1948
|
gridCells: selectedGridCells,
|
|
1949
|
+
userName: this.adaptableOptions.userName,
|
|
1950
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
1884
1951
|
};
|
|
1885
1952
|
preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(bulkUpdatePermittedValuesParams));
|
|
1886
1953
|
}
|
|
@@ -2320,7 +2387,7 @@ class Adaptable {
|
|
|
2320
2387
|
});
|
|
2321
2388
|
}
|
|
2322
2389
|
getColDefsForRowEditColumns() {
|
|
2323
|
-
const actionRowButtons = this.api.
|
|
2390
|
+
const actionRowButtons = this.api.actionRowApi.getActionRowButtons();
|
|
2324
2391
|
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
2325
2392
|
return [];
|
|
2326
2393
|
}
|
|
@@ -2331,7 +2398,7 @@ class Adaptable {
|
|
|
2331
2398
|
},
|
|
2332
2399
|
tooltip: 'Create',
|
|
2333
2400
|
onClick: () => {
|
|
2334
|
-
this.api.
|
|
2401
|
+
this.api.actionRowApi.displayCreateActionRow();
|
|
2335
2402
|
},
|
|
2336
2403
|
},
|
|
2337
2404
|
edit: {
|
|
@@ -2340,7 +2407,7 @@ class Adaptable {
|
|
|
2340
2407
|
},
|
|
2341
2408
|
tooltip: 'Edit',
|
|
2342
2409
|
onClick: (button, context) => {
|
|
2343
|
-
this.api.
|
|
2410
|
+
this.api.actionRowApi.displayEditActionRow(context.primaryKeyValue);
|
|
2344
2411
|
},
|
|
2345
2412
|
},
|
|
2346
2413
|
clone: {
|
|
@@ -2349,7 +2416,7 @@ class Adaptable {
|
|
|
2349
2416
|
},
|
|
2350
2417
|
tooltip: 'Clone',
|
|
2351
2418
|
onClick: (button, context) => {
|
|
2352
|
-
this.api.
|
|
2419
|
+
this.api.actionRowApi.displayCloneActionRow(context.primaryKeyValue);
|
|
2353
2420
|
},
|
|
2354
2421
|
},
|
|
2355
2422
|
delete: {
|
|
@@ -2363,9 +2430,11 @@ class Adaptable {
|
|
|
2363
2430
|
type: 'rowDeleted',
|
|
2364
2431
|
rowNode: context.rowNode,
|
|
2365
2432
|
adaptableApi: context.adaptableApi,
|
|
2433
|
+
userName: context.userName,
|
|
2434
|
+
adaptableId: context.adaptableId,
|
|
2366
2435
|
};
|
|
2367
2436
|
this.api.eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
2368
|
-
(_b = (_a = this.adaptableOptions.
|
|
2437
|
+
(_b = (_a = this.adaptableOptions.actionRowOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
2369
2438
|
},
|
|
2370
2439
|
},
|
|
2371
2440
|
};
|
|
@@ -2377,9 +2446,11 @@ class Adaptable {
|
|
|
2377
2446
|
// should NOT happen unless the user sent some invalid button type in the predefined config
|
|
2378
2447
|
return;
|
|
2379
2448
|
}
|
|
2380
|
-
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, {
|
|
2381
2450
|
adaptableApi: this.api,
|
|
2382
2451
|
actionRowButtonType,
|
|
2452
|
+
userName: this.adaptableOptions.userName,
|
|
2453
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
2383
2454
|
});
|
|
2384
2455
|
if (!customButtonConfig) {
|
|
2385
2456
|
return defaultButtonConfig;
|
|
@@ -2411,7 +2482,7 @@ class Adaptable {
|
|
|
2411
2482
|
filter: false,
|
|
2412
2483
|
sortable: false,
|
|
2413
2484
|
enableRowGroup: false,
|
|
2414
|
-
pinned: this.adaptableOptions.
|
|
2485
|
+
pinned: this.adaptableOptions.actionRowOptions.actionRowButtonOptions.position === 'pinnedRight'
|
|
2415
2486
|
? 'right'
|
|
2416
2487
|
: 'left',
|
|
2417
2488
|
cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
|
|
@@ -2429,7 +2500,7 @@ class Adaptable {
|
|
|
2429
2500
|
suppressMenu: false,
|
|
2430
2501
|
suppressMovable: false,
|
|
2431
2502
|
};
|
|
2432
|
-
return this.api.
|
|
2503
|
+
return this.api.actionColumnApi.getActionColumns().map((actionColumn) => {
|
|
2433
2504
|
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
2434
2505
|
const newColDef = {
|
|
2435
2506
|
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
@@ -2527,7 +2598,7 @@ class Adaptable {
|
|
|
2527
2598
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
|
|
2528
2599
|
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2529
2600
|
}
|
|
2530
|
-
const isExternalEvaluation = !this.api.
|
|
2601
|
+
const isExternalEvaluation = !this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
2531
2602
|
const newColDef = {
|
|
2532
2603
|
headerName: calculatedColumn.FriendlyName
|
|
2533
2604
|
? calculatedColumn.FriendlyName
|
|
@@ -2832,8 +2903,8 @@ class Adaptable {
|
|
|
2832
2903
|
* Action: Stop editing
|
|
2833
2904
|
*/
|
|
2834
2905
|
this.gridOptions.api.addEventListener(core_1.Events.EVENT_CELL_EDITING_STARTED, (this.listenerCellEditingStarted = () => {
|
|
2835
|
-
var _a
|
|
2836
|
-
if ((
|
|
2906
|
+
var _a;
|
|
2907
|
+
if ((_a = this.adaptableOptions.actionRowOptions) === null || _a === void 0 ? void 0 : _a.disableInlineEditing)
|
|
2837
2908
|
this.gridOptions.api.stopEditing();
|
|
2838
2909
|
}));
|
|
2839
2910
|
/**
|
|
@@ -2920,7 +2991,7 @@ class Adaptable {
|
|
|
2920
2991
|
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2921
2992
|
return;
|
|
2922
2993
|
}
|
|
2923
|
-
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) {
|
|
2924
2995
|
this.persistColumnIndexBeforeGrouping(params);
|
|
2925
2996
|
}
|
|
2926
2997
|
}));
|
|
@@ -2966,7 +3037,7 @@ class Adaptable {
|
|
|
2966
3037
|
this.onSortChanged();
|
|
2967
3038
|
this.debouncedSetSelectedCells();
|
|
2968
3039
|
}));
|
|
2969
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.
|
|
3040
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.groupingOptions.showGroupingTotalsAsHeader;
|
|
2970
3041
|
/**
|
|
2971
3042
|
* Use Case: Model has updated
|
|
2972
3043
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
@@ -3050,9 +3121,9 @@ class Adaptable {
|
|
|
3050
3121
|
if (!this.isGroupRowNode(node)) {
|
|
3051
3122
|
const currentQuery = this.api.queryApi.getCurrentQuery();
|
|
3052
3123
|
if (currentQuery) {
|
|
3053
|
-
const evaluateQueryOnClient = this.api.
|
|
3124
|
+
const evaluateQueryOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('Query', undefined, currentQuery);
|
|
3054
3125
|
if (evaluateQueryOnClient) {
|
|
3055
|
-
const isCurrentQueryValid = this.api.
|
|
3126
|
+
const isCurrentQueryValid = this.api.expressionApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
|
|
3056
3127
|
if (!isCurrentQueryValid ||
|
|
3057
3128
|
!this.api.internalApi
|
|
3058
3129
|
.getQueryLanguageService()
|
|
@@ -3066,7 +3137,7 @@ class Adaptable {
|
|
|
3066
3137
|
try {
|
|
3067
3138
|
if (columnFilters.length > 0) {
|
|
3068
3139
|
for (const columnFilter of columnFilters) {
|
|
3069
|
-
const evaluateFilterOnClient = this.api.
|
|
3140
|
+
const evaluateFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('Filter', columnFilter, [columnFilter.Predicate]);
|
|
3070
3141
|
if (evaluateFilterOnClient) {
|
|
3071
3142
|
// we then assess filters (if running locally)
|
|
3072
3143
|
if (!this.api.filterApi.internalApi.evaluateColumnFilter(columnFilter, node)) {
|
|
@@ -3180,6 +3251,9 @@ class Adaptable {
|
|
|
3180
3251
|
this.setupColumnQuickFilerText(colSetupInfo);
|
|
3181
3252
|
this.setupAllowedAggFuncs(colSetupInfo);
|
|
3182
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);
|
|
3183
3257
|
});
|
|
3184
3258
|
this.setupRowStyling();
|
|
3185
3259
|
// setupAggregationColumnHeaders() is executed on every setLayout()
|
|
@@ -3461,13 +3535,15 @@ class Adaptable {
|
|
|
3461
3535
|
return userPropertyValue(params);
|
|
3462
3536
|
}
|
|
3463
3537
|
const value = params.value;
|
|
3464
|
-
const unbalancedGroupsKey = (_a = adaptableOptions.
|
|
3538
|
+
const unbalancedGroupsKey = (_a = adaptableOptions.groupingOptions) === null || _a === void 0 ? void 0 : _a.unbalancedGroupsKey;
|
|
3465
3539
|
if (!unbalancedGroupsKey) {
|
|
3466
3540
|
return value;
|
|
3467
3541
|
}
|
|
3468
3542
|
let groupUnbalancedGroupsUnderKeyValue = typeof unbalancedGroupsKey === 'function'
|
|
3469
3543
|
? unbalancedGroupsKey({
|
|
3470
3544
|
adaptableApi: adaptableApi,
|
|
3545
|
+
userName: this.adaptableOptions.userName,
|
|
3546
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
3471
3547
|
adaptableColumn: abColumn,
|
|
3472
3548
|
params,
|
|
3473
3549
|
})
|
|
@@ -3476,6 +3552,14 @@ class Adaptable {
|
|
|
3476
3552
|
};
|
|
3477
3553
|
});
|
|
3478
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
|
+
}
|
|
3479
3563
|
setupColumnHeader({ col, abColumn }) {
|
|
3480
3564
|
var _a, _b;
|
|
3481
3565
|
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
@@ -3526,7 +3610,7 @@ class Adaptable {
|
|
|
3526
3610
|
});
|
|
3527
3611
|
}
|
|
3528
3612
|
setupColumnValueFormatter({ col, abColumn }) {
|
|
3529
|
-
this.setColDefProperty(col, 'valueFormatter', (
|
|
3613
|
+
this.setColDefProperty(col, 'valueFormatter', (userPropertyValue) => {
|
|
3530
3614
|
const activeFormatColumnsWithDisplayFormat = this.api.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
3531
3615
|
if (!activeFormatColumnsWithDisplayFormat.length) {
|
|
3532
3616
|
return;
|
|
@@ -3577,6 +3661,8 @@ class Adaptable {
|
|
|
3577
3661
|
const cellEditableContext = {
|
|
3578
3662
|
gridCell,
|
|
3579
3663
|
adaptableApi: this.api,
|
|
3664
|
+
userName: this.adaptableOptions.userName,
|
|
3665
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
3580
3666
|
};
|
|
3581
3667
|
return cellEditableFn(cellEditableContext);
|
|
3582
3668
|
};
|
|
@@ -3679,10 +3765,23 @@ class Adaptable {
|
|
|
3679
3765
|
this.agGridHelper.checkShouldClearExistingFiltersOrSearches();
|
|
3680
3766
|
}
|
|
3681
3767
|
isAgGridModulePresent(moduleName) {
|
|
3682
|
-
|
|
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];
|
|
3683
3782
|
}
|
|
3684
3783
|
getAgGridRegisteredModules() {
|
|
3685
|
-
return core_1.ModuleRegistry.
|
|
3784
|
+
return core_1.ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId).map((module) => module.moduleName);
|
|
3686
3785
|
}
|
|
3687
3786
|
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
3688
3787
|
if (oldData == null || oldData == undefined) {
|
|
@@ -3823,7 +3922,7 @@ class Adaptable {
|
|
|
3823
3922
|
if (!dataChangedScope.wholeRow) {
|
|
3824
3923
|
formatColumnsWithExpression.forEach((styleModule) => {
|
|
3825
3924
|
if (!dataChangedScope.wholeRow) {
|
|
3826
|
-
const columnIds = this.api.
|
|
3925
|
+
const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3827
3926
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3828
3927
|
if (this.api.scopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3829
3928
|
dataChangedScope.wholeRow = true;
|
|
@@ -4651,11 +4750,10 @@ class Adaptable {
|
|
|
4651
4750
|
}
|
|
4652
4751
|
const excelDataType = this.api.exportApi.internalApi.getExcelDataType(colDef === null || colDef === void 0 ? void 0 : colDef.type);
|
|
4653
4752
|
const rawValue = this.getRawValueFromRowNode(node, column.getId());
|
|
4654
|
-
// don't add the cell style if it has no adaptable custom styles
|
|
4655
|
-
if (
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
!(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue))) {
|
|
4753
|
+
// don't add the cell style if it has no adaptable custom styles
|
|
4754
|
+
if (!excelStyles.length &&
|
|
4755
|
+
// if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
|
|
4756
|
+
!(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue)) {
|
|
4659
4757
|
return;
|
|
4660
4758
|
}
|
|
4661
4759
|
const cellClassId = this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
|
|
@@ -4674,9 +4772,10 @@ class Adaptable {
|
|
|
4674
4772
|
if (normalisedValue) {
|
|
4675
4773
|
// we have to pass the date in the ISO format to Excel
|
|
4676
4774
|
// see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
|
|
4677
|
-
// we
|
|
4678
|
-
const
|
|
4679
|
-
|
|
4775
|
+
// we can NOT use Date.toISOString() because we don't want the timezone corrections to kick in
|
|
4776
|
+
const isoFormattedValue = (0, FormatHelper_1.DateFormatter)(normalisedValue, {
|
|
4777
|
+
Pattern: `yyyy-MM-dd'T'HH:mm:ss.SSS`,
|
|
4778
|
+
});
|
|
4680
4779
|
if (isoFormattedValue) {
|
|
4681
4780
|
finalCellExcelStyle.dataType = 'DateTime';
|
|
4682
4781
|
finalCellExcelStyle.numberFormat = { format: dateFormatPattern };
|
|
@@ -5032,6 +5131,7 @@ class AdaptableNoCodeWizard {
|
|
|
5032
5131
|
* @param adaptableOptions
|
|
5033
5132
|
*/
|
|
5034
5133
|
constructor(adaptableOptions, extraOptions = {}) {
|
|
5134
|
+
var _a;
|
|
5035
5135
|
const defaultInit = async ({ gridOptions, adaptableOptions, agGridModules, }) => {
|
|
5036
5136
|
adaptableOptions.gridOptions = gridOptions;
|
|
5037
5137
|
return await Adaptable.init(adaptableOptions, { agGridModules: agGridModules });
|
|
@@ -5039,7 +5139,7 @@ class AdaptableNoCodeWizard {
|
|
|
5039
5139
|
this.adaptableOptions = adaptableOptions;
|
|
5040
5140
|
this.init = extraOptions.onInit || defaultInit;
|
|
5041
5141
|
this.extraOptions = extraOptions;
|
|
5042
|
-
this.agGridModules = core_1.ModuleRegistry.
|
|
5142
|
+
this.agGridModules = core_1.ModuleRegistry.__getRegisteredModules((_a = this.adaptableOptions.gridOptions) === null || _a === void 0 ? void 0 : _a.gridId);
|
|
5043
5143
|
this.render();
|
|
5044
5144
|
}
|
|
5045
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
|
});
|