@adaptabletools/adaptable 11.0.0-canary.3 → 11.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +5 -4
- package/agGrid.js +9 -7
- package/base.css +135 -69
- package/bundle.cjs.js +104 -99
- package/index.css +136 -69
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -7
- package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +34 -9
- package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
- package/src/AdaptableOptions/StateOptions.d.ts +9 -8
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/CalculatedColumnApi.d.ts +2 -9
- package/src/Api/ColumnApi.d.ts +0 -4
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/GridApi.d.ts +13 -2
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +19 -10
- package/src/Api/Implementation/ApiBase.d.ts +5 -2
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +27 -4
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
- package/src/Api/Implementation/InternalApiImpl.js +7 -6
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +11 -0
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +20 -8
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
- package/src/Api/InternalApi.d.ts +2 -3
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/QueryApi.d.ts +2 -2
- package/src/Api/QueryLanguageApi.d.ts +23 -10
- package/src/Api/SettingsPanelApi.d.ts +16 -0
- package/src/Api/SettingsPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +8 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -5
- package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -6
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +3 -1
- package/src/PredefinedConfig/Common/Types.js +1 -0
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +3 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -1
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +34 -8
- package/src/Strategy/AlertModule.js +16 -6
- package/src/Strategy/CalculatedColumnModule.js +4 -4
- package/src/Strategy/ChartingModule.d.ts +3 -3
- package/src/Strategy/ChartingModule.js +2 -2
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +11 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
- package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +23 -17
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +24 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +339 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/groupingMap.js +105 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/AlertService.js +8 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +9 -3
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +11 -4
- package/src/Utilities/Services/QueryLanguageService.js +92 -28
- package/src/Utilities/Services/ReportService.js +6 -2
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +10 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertWizard.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/ColorPicker.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.js +11 -12
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -88
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +5 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +3 -1
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +7 -0
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/Dashboard/DashboardPopup.js +3 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +6 -2
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +3 -1
- package/src/View/Query/Wizard/NamedQueryWizard.js +3 -3
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -2
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +12 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +5 -1
- package/src/agGrid/Adaptable.d.ts +3 -3
- package/src/agGrid/Adaptable.js +117 -77
- package/src/agGrid/agGridHelper.js +4 -9
- package/src/agGrid/agGridMenuHelper.js +4 -8
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +5 -2
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -2
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
- package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
- package/src/components/ExpressionEditor/index.d.ts +2 -1
- package/src/components/ExpressionEditor/index.js +20 -6
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Logo/index.js +8 -7
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +114 -59
- package/src/metamodel/adaptable.metamodel.js +373 -242
- package/src/types.d.ts +9 -6
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -291,7 +291,7 @@ class Adaptable {
|
|
|
291
291
|
// the 'old' constructor which takes an Adaptable adaptable object
|
|
292
292
|
// this is still used internally but should not be used externally as a preference
|
|
293
293
|
async init(adaptableOptions, runtimeConfig, _staticInit) {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f
|
|
294
|
+
var _a, _b, _c, _d, _e, _f;
|
|
295
295
|
if (!_staticInit) {
|
|
296
296
|
LoggingHelper_1.ConsoleLogWarning(`
|
|
297
297
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -340,7 +340,8 @@ class Adaptable {
|
|
|
340
340
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
341
341
|
if (!this.getDefaultGroupOrderComparator(this.gridOptions) &&
|
|
342
342
|
this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
|
|
343
|
-
this.gridOptions.defaultGroupOrderComparator =
|
|
343
|
+
this.gridOptions.defaultGroupOrderComparator =
|
|
344
|
+
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
344
345
|
}
|
|
345
346
|
// we prefer the grid to be NOT instantiated so that we can do it
|
|
346
347
|
// perhaps in future we will force instantiation only?
|
|
@@ -375,7 +376,6 @@ class Adaptable {
|
|
|
375
376
|
abColDefDate: (_d = this.gridOptions.columnTypes.abColDefDate) !== null && _d !== void 0 ? _d : {},
|
|
376
377
|
abColDefObject: (_e = this.gridOptions.columnTypes.abColDefObject) !== null && _e !== void 0 ? _e : {},
|
|
377
378
|
abColDefCustom: (_f = this.gridOptions.columnTypes.abColDefCustom) !== null && _f !== void 0 ? _f : {},
|
|
378
|
-
abColDefNumberArray: (_g = this.gridOptions.columnTypes.abColDefNumberArray) !== null && _g !== void 0 ? _g : {},
|
|
379
379
|
});
|
|
380
380
|
if (this.gridOptions.columnTypes.abColDefNumber.cellEditor === undefined) {
|
|
381
381
|
this.gridOptions.columnTypes.abColDefNumber.cellEditor = AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
@@ -427,8 +427,16 @@ class Adaptable {
|
|
|
427
427
|
ReactDOM.render(AdaptableView_1.AdaptableApp({ Adaptable: this }), this.abContainerElement);
|
|
428
428
|
}
|
|
429
429
|
// create debounce methods that take a time based on user settings
|
|
430
|
-
this.throttleFilterOnEditDataChange = throttle_1.default(
|
|
431
|
-
|
|
430
|
+
this.throttleFilterOnEditDataChange = throttle_1.default(
|
|
431
|
+
// the extra function is to make sure we have a reference to ag-grid-api
|
|
432
|
+
() => this.gridOptions.api.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnUserDataChange.throttleDelay, {
|
|
433
|
+
trailing: true,
|
|
434
|
+
leading: false,
|
|
435
|
+
});
|
|
436
|
+
this.throttleFilterOnTickingDataChange = throttle_1.default(() => this.gridOptions.api.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnExternalDataChange.throttleDelay, {
|
|
437
|
+
trailing: true,
|
|
438
|
+
leading: false,
|
|
439
|
+
});
|
|
432
440
|
return this.api;
|
|
433
441
|
});
|
|
434
442
|
}
|
|
@@ -513,7 +521,7 @@ class Adaptable {
|
|
|
513
521
|
this.gridOptions.columnDefs.forEach(assignColId);
|
|
514
522
|
}
|
|
515
523
|
if ((_a = this.adaptableOptions.generalOptions) === null || _a === void 0 ? void 0 : _a.hideEmptyGroupRows) {
|
|
516
|
-
LoggingHelper_1.
|
|
524
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: 'GeneralOptions.hideEmptyGroupRows' is deprecated and will no longer be evaluated!`);
|
|
517
525
|
// disabled due to showstopper starting with AG Grid v26
|
|
518
526
|
// the internal implementation of AG Grids GroupCellRenderer has changed A LOT!
|
|
519
527
|
// this.gridOptions.components = this.gridOptions.components || {};
|
|
@@ -729,12 +737,12 @@ class Adaptable {
|
|
|
729
737
|
const groupsCount = {};
|
|
730
738
|
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
731
739
|
var _a, _b, _c;
|
|
732
|
-
if (!((_b = (_a = columnGroup.
|
|
740
|
+
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
733
741
|
return acc;
|
|
734
742
|
}
|
|
735
743
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
736
|
-
const AllowGroupSplit = !columnGroup.
|
|
737
|
-
const FriendlyName = (_c = columnGroup.
|
|
744
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef().marryChildren;
|
|
745
|
+
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
738
746
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
739
747
|
columnsInGroup.forEach((col) => {
|
|
740
748
|
const group = {
|
|
@@ -1105,7 +1113,10 @@ class Adaptable {
|
|
|
1105
1113
|
}
|
|
1106
1114
|
setColumnOrder(VisibleColumnList) {
|
|
1107
1115
|
const newColumnState = this.getSortedColumnStateForVisibleColumns(VisibleColumnList);
|
|
1108
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
1116
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
1117
|
+
state: newColumnState,
|
|
1118
|
+
applyOrder: true,
|
|
1119
|
+
});
|
|
1109
1120
|
this.updateColumnsIntoStore();
|
|
1110
1121
|
}
|
|
1111
1122
|
persistLayout(layout) {
|
|
@@ -1259,7 +1270,10 @@ class Adaptable {
|
|
|
1259
1270
|
if (shouldUpdatePivoted) {
|
|
1260
1271
|
this.gridOptions.columnApi.setPivotMode(pivoted);
|
|
1261
1272
|
}
|
|
1262
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
1273
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
1274
|
+
state: newColState,
|
|
1275
|
+
applyOrder: true,
|
|
1276
|
+
});
|
|
1263
1277
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
1264
1278
|
this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
|
|
1265
1279
|
// aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
|
|
@@ -1425,7 +1439,10 @@ class Adaptable {
|
|
|
1425
1439
|
}
|
|
1426
1440
|
});
|
|
1427
1441
|
}
|
|
1428
|
-
const selectedCellInfo = {
|
|
1442
|
+
const selectedCellInfo = {
|
|
1443
|
+
columns: columns,
|
|
1444
|
+
gridCells: selectedCells,
|
|
1445
|
+
};
|
|
1429
1446
|
this.api.internalApi.setSelectedCells(selectedCellInfo);
|
|
1430
1447
|
this._emit('CellsSelected');
|
|
1431
1448
|
this.agGridHelper.fireSelectionChangedEvent();
|
|
@@ -1675,18 +1692,15 @@ class Adaptable {
|
|
|
1675
1692
|
let returnValue;
|
|
1676
1693
|
if (this.useRowNodeLookUp) {
|
|
1677
1694
|
const rowNode = this.gridOptions.api.getRowNode(id);
|
|
1678
|
-
|
|
1679
|
-
if (gridCell) {
|
|
1680
|
-
returnValue = gridCell.displayValue;
|
|
1681
|
-
}
|
|
1695
|
+
return this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1682
1696
|
}
|
|
1683
1697
|
else {
|
|
1684
1698
|
let foundRow = false;
|
|
1685
1699
|
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1686
1700
|
if (!foundRow) {
|
|
1687
|
-
const
|
|
1688
|
-
if (
|
|
1689
|
-
returnValue =
|
|
1701
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1702
|
+
if (id == primaryKeyValue) {
|
|
1703
|
+
returnValue = this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1690
1704
|
}
|
|
1691
1705
|
foundRow = true;
|
|
1692
1706
|
}
|
|
@@ -1712,15 +1726,14 @@ class Adaptable {
|
|
|
1712
1726
|
rowNode: rowNode,
|
|
1713
1727
|
};
|
|
1714
1728
|
}
|
|
1715
|
-
getDisplayValueFromRowNode(
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
return this.getDisplayValueFromRawValue(columnId, rawValue, true);
|
|
1729
|
+
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
1730
|
+
if (rowNode == null) {
|
|
1731
|
+
return undefined;
|
|
1732
|
+
}
|
|
1733
|
+
const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
|
|
1734
|
+
return this.getDisplayValueFromRawValue(columnId, rawValue);
|
|
1722
1735
|
}
|
|
1723
|
-
getDisplayValueFromRawValue(columnId, rawValue
|
|
1736
|
+
getDisplayValueFromRawValue(columnId, rawValue) {
|
|
1724
1737
|
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1725
1738
|
const isRenderedColumn = this.api.columnApi.isFormatNumericStyleColumn(abColumn);
|
|
1726
1739
|
if (isRenderedColumn) {
|
|
@@ -1738,14 +1751,17 @@ class Adaptable {
|
|
|
1738
1751
|
if (colDef) {
|
|
1739
1752
|
if (typeof colDef.valueFormatter == 'function') {
|
|
1740
1753
|
const formattedValue = this.getFormattedValue(rawValue, columnId, colDef, colDef.valueFormatter);
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1754
|
+
// Never use cellRenderer:
|
|
1755
|
+
// - when a string, you never know if it is HTML or a normal string
|
|
1756
|
+
// - when an object, cannot be used
|
|
1757
|
+
// if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1758
|
+
// return this.agGridHelper.getRenderedValue(colDef, formattedValue);
|
|
1759
|
+
// }
|
|
1744
1760
|
return formattedValue || '';
|
|
1745
1761
|
}
|
|
1746
|
-
if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1747
|
-
|
|
1748
|
-
}
|
|
1762
|
+
// if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1763
|
+
// return this.agGridHelper.getRenderedValue(colDef, rawValue);
|
|
1764
|
+
// }
|
|
1749
1765
|
}
|
|
1750
1766
|
return this.agGridHelper.getCleanValue(rawValue);
|
|
1751
1767
|
}
|
|
@@ -1783,9 +1799,10 @@ class Adaptable {
|
|
|
1783
1799
|
if (dataType === 'Boolean') {
|
|
1784
1800
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : returnValue;
|
|
1785
1801
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1802
|
+
// Do not normalize dates to Date type
|
|
1803
|
+
// - breaks when rendering in filter-form
|
|
1804
|
+
// - breaks quick-search; the Date is transformed to string;
|
|
1805
|
+
// -- an incorrect comparison is made (new Date().toString).incudes('query)
|
|
1789
1806
|
return returnValue;
|
|
1790
1807
|
}
|
|
1791
1808
|
getRawValueFromRowNode(rowNode, columnId) {
|
|
@@ -1806,6 +1823,9 @@ class Adaptable {
|
|
|
1806
1823
|
});
|
|
1807
1824
|
}
|
|
1808
1825
|
}
|
|
1826
|
+
getRowNodeByIndex(index) {
|
|
1827
|
+
return this.gridOptions.api.getDisplayedRowAtIndex(index);
|
|
1828
|
+
}
|
|
1809
1829
|
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
1810
1830
|
let rowNodes = [];
|
|
1811
1831
|
if (this.useRowNodeLookUp) {
|
|
@@ -1889,8 +1909,10 @@ class Adaptable {
|
|
|
1889
1909
|
return isVisible;
|
|
1890
1910
|
}
|
|
1891
1911
|
redrawBody() {
|
|
1892
|
-
|
|
1893
|
-
|
|
1912
|
+
setTimeout(() => {
|
|
1913
|
+
this.gridOptions.api.redrawRows();
|
|
1914
|
+
this._emit('GridRefreshed');
|
|
1915
|
+
}, 0);
|
|
1894
1916
|
}
|
|
1895
1917
|
redrawHeader() {
|
|
1896
1918
|
this.gridOptions.api.refreshHeader();
|
|
@@ -1942,10 +1964,8 @@ class Adaptable {
|
|
|
1942
1964
|
];
|
|
1943
1965
|
}
|
|
1944
1966
|
getColDefsForFreeTextColumns() {
|
|
1945
|
-
const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions
|
|
1946
|
-
|
|
1947
|
-
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable)
|
|
1948
|
-
.FreeTextColumnSettings;
|
|
1967
|
+
const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns;
|
|
1968
|
+
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable).FreeTextColumnSettings;
|
|
1949
1969
|
return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
|
|
1950
1970
|
var _a;
|
|
1951
1971
|
const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
|
|
@@ -2089,13 +2109,12 @@ class Adaptable {
|
|
|
2089
2109
|
.enableFilterOnSpecialColumns
|
|
2090
2110
|
? this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
|
|
2091
2111
|
: true;
|
|
2092
|
-
const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable)
|
|
2093
|
-
.CalculatedColumnSettings;
|
|
2112
|
+
const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable).CalculatedColumnSettings;
|
|
2094
2113
|
return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
|
|
2095
|
-
var _a;
|
|
2096
2114
|
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
2097
2115
|
if (!calculatedColumnSettings.DataType) {
|
|
2098
|
-
calculatedColumnSettings.DataType =
|
|
2116
|
+
calculatedColumnSettings.DataType =
|
|
2117
|
+
this.CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
|
|
2099
2118
|
}
|
|
2100
2119
|
const columnTypes = [
|
|
2101
2120
|
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
@@ -2123,15 +2142,13 @@ class Adaptable {
|
|
|
2123
2142
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2124
2143
|
type: columnTypes,
|
|
2125
2144
|
valueGetter: (params) => {
|
|
2126
|
-
|
|
2127
|
-
return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
|
|
2145
|
+
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2128
2146
|
},
|
|
2129
2147
|
};
|
|
2130
2148
|
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
2131
2149
|
calculatedColumnSettings.ShowToolTip == true) {
|
|
2132
2150
|
newColDef.tooltipValueGetter = () => {
|
|
2133
|
-
|
|
2134
|
-
return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression;
|
|
2151
|
+
return this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query);
|
|
2135
2152
|
};
|
|
2136
2153
|
}
|
|
2137
2154
|
LoggingHelper_1.LogAdaptableInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
|
|
@@ -2474,8 +2491,7 @@ class Adaptable {
|
|
|
2474
2491
|
this.onSortChanged();
|
|
2475
2492
|
this.debouncedSetSelectedCells();
|
|
2476
2493
|
});
|
|
2477
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions
|
|
2478
|
-
.showGroupingTotalsAsHeader;
|
|
2494
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
|
|
2479
2495
|
/**
|
|
2480
2496
|
* Use Case: Model has updated
|
|
2481
2497
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
@@ -2527,10 +2543,9 @@ class Adaptable {
|
|
|
2527
2543
|
const node = event.node;
|
|
2528
2544
|
const result = RowNode_dispatchLocalEvent.apply(this, arguments);
|
|
2529
2545
|
const extractGridApiFromRowNode = (rowNode) => {
|
|
2530
|
-
var _a, _b
|
|
2546
|
+
var _a, _b;
|
|
2531
2547
|
// starting with AG Grid 26.1.0 the gridApi is wrapped in a Beans property
|
|
2532
|
-
|
|
2533
|
-
const rowNodeApi = (_c = (_b = (_a = rowNode) === null || _a === void 0 ? void 0 : _a.beans) === null || _b === void 0 ? void 0 : _b.gridApi) !== null && _c !== void 0 ? _c : (_d = rowNode) === null || _d === void 0 ? void 0 : _d.gridApi;
|
|
2548
|
+
const rowNodeApi = (_b = (_a = rowNode) === null || _a === void 0 ? void 0 : _a.beans) === null || _b === void 0 ? void 0 : _b.gridApi;
|
|
2534
2549
|
if (!rowNodeApi) {
|
|
2535
2550
|
LoggingHelper_1.LogAdaptableWarning(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
|
|
2536
2551
|
}
|
|
@@ -2582,8 +2597,8 @@ class Adaptable {
|
|
|
2582
2597
|
(originalisExternalFilterPresent ? originalisExternalFilterPresent() : false));
|
|
2583
2598
|
};
|
|
2584
2599
|
const originaldoesExternalFilterPass = this.gridOptions.doesExternalFilterPass;
|
|
2585
|
-
const evaluateQueryOnClient =
|
|
2586
|
-
const evaluateFilterOnClient =
|
|
2600
|
+
const evaluateQueryOnClient = this.api.internalApi.runModuleInAdaptableQL('Query');
|
|
2601
|
+
const evaluateFilterOnClient = this.api.internalApi.runModuleInAdaptableQL('Filter');
|
|
2587
2602
|
this.gridOptions.doesExternalFilterPass = (node) => {
|
|
2588
2603
|
// first we assess Query (if its running locally)
|
|
2589
2604
|
if (evaluateQueryOnClient && !this.isGroupRowNode(node)) {
|
|
@@ -2640,7 +2655,7 @@ class Adaptable {
|
|
|
2640
2655
|
try {
|
|
2641
2656
|
// it is very important that this method is executed as soon as possible and BEFORE the updateColDefsForSpecialColumns() method
|
|
2642
2657
|
// this will ensure that the columns are recreated as expected (see method implementation&comments for more details)
|
|
2643
|
-
this.cleanupFloatingFilters_WORKAROUND();
|
|
2658
|
+
//this.cleanupFloatingFilters_WORKAROUND();
|
|
2644
2659
|
this.updateColDefsForSpecialColumns();
|
|
2645
2660
|
this.applyCurrentTheme();
|
|
2646
2661
|
this.applyFinalRendering();
|
|
@@ -2801,16 +2816,18 @@ class Adaptable {
|
|
|
2801
2816
|
readonlyClassName,
|
|
2802
2817
|
highlightAlertClassName,
|
|
2803
2818
|
]
|
|
2804
|
-
|
|
2805
|
-
.
|
|
2819
|
+
// we flatten the array because 'userCellClass' might return a string[]
|
|
2820
|
+
.flat()
|
|
2821
|
+
.filter((x) => !!x);
|
|
2822
|
+
const returnValueHash = returnValue.join(' ');
|
|
2806
2823
|
const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2807
2824
|
const key = `${primaryKey}:${params.colDef.colId}`;
|
|
2808
2825
|
if (classNameMap[key] &&
|
|
2809
|
-
classNameMap[key] !==
|
|
2826
|
+
classNameMap[key] !== returnValueHash &&
|
|
2810
2827
|
// only hard-reset when removing class-names
|
|
2811
2828
|
// ag-grid does not remove class-names, it accumulates them
|
|
2812
2829
|
// https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
|
|
2813
|
-
|
|
2830
|
+
returnValueHash.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2814
2831
|
setTimeout(() => {
|
|
2815
2832
|
/**
|
|
2816
2833
|
* This is called inside a getter function, inside ag-grid.
|
|
@@ -2820,14 +2837,18 @@ class Adaptable {
|
|
|
2820
2837
|
params.api.redrawRows({ rowNodes: [params.node] });
|
|
2821
2838
|
}, 0);
|
|
2822
2839
|
}
|
|
2823
|
-
classNameMap[key] =
|
|
2824
|
-
return
|
|
2840
|
+
classNameMap[key] = returnValueHash;
|
|
2841
|
+
return returnValue.length ? returnValue : undefined;
|
|
2825
2842
|
};
|
|
2826
2843
|
return cellClass;
|
|
2827
2844
|
});
|
|
2828
2845
|
}
|
|
2829
2846
|
getExcelClassNameForCell(colId, primaryKeyValue) {
|
|
2830
|
-
|
|
2847
|
+
let excelClassName = `--excel-cell-${colId}-${primaryKeyValue}`;
|
|
2848
|
+
if (excelClassName.indexOf(' ') > 0) {
|
|
2849
|
+
excelClassName = excelClassName.replace(/\s/g, '_');
|
|
2850
|
+
}
|
|
2851
|
+
return excelClassName;
|
|
2831
2852
|
}
|
|
2832
2853
|
setupColumnCellEditor({ colId, col }) {
|
|
2833
2854
|
const adaptableColumn = this.api.columnApi.getColumnFromId(colId);
|
|
@@ -2909,8 +2930,7 @@ class Adaptable {
|
|
|
2909
2930
|
// set the default to the AG Grid provided values
|
|
2910
2931
|
// from https://github.com/ag-grid/ag-grid/blob/v26.1.0/community-modules/core/src/ts/columns/columnModel.ts#L2515
|
|
2911
2932
|
let resultHeaderName = userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(col.getColDef().field);
|
|
2912
|
-
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout()
|
|
2913
|
-
.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2933
|
+
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout().ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2914
2934
|
if (layoutCustomHeader) {
|
|
2915
2935
|
resultHeaderName = layoutCustomHeader;
|
|
2916
2936
|
}
|
|
@@ -2919,6 +2939,7 @@ class Adaptable {
|
|
|
2919
2939
|
if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
|
|
2920
2940
|
// fallback to the formatColumn property if no Layout custom header is provided
|
|
2921
2941
|
resultHeaderName = formatColumn.HeaderName;
|
|
2942
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: 'FormatColumn.HeaderName' is deprecated: use 'Layout.ColumnHeadersMap' instead`);
|
|
2922
2943
|
}
|
|
2923
2944
|
// required here for the initial layout rendering
|
|
2924
2945
|
abColumn.friendlyName = resultHeaderName;
|
|
@@ -3496,7 +3517,10 @@ class Adaptable {
|
|
|
3496
3517
|
}
|
|
3497
3518
|
return state;
|
|
3498
3519
|
});
|
|
3499
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
3520
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
3521
|
+
state: newColumnState,
|
|
3522
|
+
applyOrder: true,
|
|
3523
|
+
});
|
|
3500
3524
|
this.gridOptions.api.onSortChanged();
|
|
3501
3525
|
}
|
|
3502
3526
|
clearColumnSort() {
|
|
@@ -3553,7 +3577,9 @@ class Adaptable {
|
|
|
3553
3577
|
});
|
|
3554
3578
|
}
|
|
3555
3579
|
else {
|
|
3556
|
-
const transaction = this.gridOptions.api.applyTransaction({
|
|
3580
|
+
const transaction = this.gridOptions.api.applyTransaction({
|
|
3581
|
+
update: dataRows,
|
|
3582
|
+
});
|
|
3557
3583
|
return Promise.resolve(transaction === null || transaction === void 0 ? void 0 : transaction.update);
|
|
3558
3584
|
}
|
|
3559
3585
|
}
|
|
@@ -3594,7 +3620,9 @@ class Adaptable {
|
|
|
3594
3620
|
});
|
|
3595
3621
|
}
|
|
3596
3622
|
else {
|
|
3597
|
-
const transaction = this.gridOptions.api.applyTransaction({
|
|
3623
|
+
const transaction = this.gridOptions.api.applyTransaction({
|
|
3624
|
+
remove: dataRows,
|
|
3625
|
+
});
|
|
3598
3626
|
return Promise.resolve(transaction.remove);
|
|
3599
3627
|
}
|
|
3600
3628
|
}
|
|
@@ -3868,9 +3896,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3868
3896
|
alertHighlightClassName,
|
|
3869
3897
|
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
3870
3898
|
]
|
|
3871
|
-
|
|
3872
|
-
.
|
|
3873
|
-
|
|
3899
|
+
// we flatten it because 'userGetRowClass' might return a string[]
|
|
3900
|
+
.flat()
|
|
3901
|
+
.filter((x) => !!x);
|
|
3902
|
+
return (returnValue === null || returnValue === void 0 ? void 0 : returnValue.length) ? returnValue : undefined;
|
|
3874
3903
|
};
|
|
3875
3904
|
});
|
|
3876
3905
|
}
|
|
@@ -4002,9 +4031,17 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4002
4031
|
const cellStyle = typeof colDef.cellStyle === 'function' ? colDef.cellStyle(cellParams) : {};
|
|
4003
4032
|
const excelStyles = [];
|
|
4004
4033
|
// add user defined excel styles
|
|
4005
|
-
|
|
4034
|
+
let userColDefCellClass = this.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
4035
|
+
const userDefinedCellClass = typeof userColDefCellClass === 'function'
|
|
4036
|
+
? userColDefCellClass(cellParams)
|
|
4037
|
+
: userColDefCellClass;
|
|
4006
4038
|
const userDefinedExcelStyle = userDefinedCellClass &&
|
|
4007
|
-
userExcelStyles.find((excelStyle) =>
|
|
4039
|
+
userExcelStyles.find((excelStyle) => {
|
|
4040
|
+
var _a;
|
|
4041
|
+
return typeof userDefinedCellClass === 'string'
|
|
4042
|
+
? userDefinedCellClass === excelStyle.id
|
|
4043
|
+
: (_a = userDefinedCellClass === null || userDefinedCellClass === void 0 ? void 0 : userDefinedCellClass.includes) === null || _a === void 0 ? void 0 : _a.call(userDefinedCellClass, excelStyle.id);
|
|
4044
|
+
});
|
|
4008
4045
|
if (userDefinedExcelStyle) {
|
|
4009
4046
|
excelStyles.push(userDefinedExcelStyle);
|
|
4010
4047
|
}
|
|
@@ -4022,9 +4059,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4022
4059
|
if (!excelStyles.length) {
|
|
4023
4060
|
return;
|
|
4024
4061
|
}
|
|
4025
|
-
const
|
|
4062
|
+
const cellClass = typeof colDef.cellClass === 'function'
|
|
4026
4063
|
? colDef.cellClass(cellParams)
|
|
4027
4064
|
: this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node));
|
|
4065
|
+
const cellClassId = Array.isArray(cellClass) ? cellClass.join(' ') : cellClass;
|
|
4028
4066
|
const finalCellExcelStyle = Object.assign({}, ...excelStyles, {
|
|
4029
4067
|
id: cellClassId,
|
|
4030
4068
|
});
|
|
@@ -4173,7 +4211,9 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4173
4211
|
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
4174
4212
|
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY ||
|
|
4175
4213
|
this.api.internalApi.getAdaptableOptions().licenseKey;
|
|
4176
|
-
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
4214
|
+
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
4215
|
+
publishedAt: publishTimestamp_1.default,
|
|
4216
|
+
});
|
|
4177
4217
|
}
|
|
4178
4218
|
}
|
|
4179
4219
|
exports.Adaptable = Adaptable;
|
|
@@ -39,7 +39,7 @@ const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/For
|
|
|
39
39
|
const CheckboxRenderer_1 = require("./CheckboxRenderer");
|
|
40
40
|
const DataChangeHistoryModule_1 = require("../Strategy/DataChangeHistoryModule");
|
|
41
41
|
const FlashingCellModule_1 = require("../Strategy/FlashingCellModule");
|
|
42
|
-
const
|
|
42
|
+
const SettingsPanelModule_1 = require("../Strategy/SettingsPanelModule");
|
|
43
43
|
const ChartingModule_1 = require("../Strategy/ChartingModule");
|
|
44
44
|
const tinycolor = require('tinycolor2');
|
|
45
45
|
/**
|
|
@@ -97,7 +97,7 @@ class agGridHelper {
|
|
|
97
97
|
modules.set(ModuleConstants.SystemStatusModuleId, new SystemStatusModule_1.SystemStatusModule(api));
|
|
98
98
|
modules.set(ModuleConstants.ThemeModuleId, new ThemeModule_1.ThemeModule(api));
|
|
99
99
|
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule_1.GridInfoModule(api));
|
|
100
|
-
modules.set(ModuleConstants.SettingsPanelModuleId, new
|
|
100
|
+
modules.set(ModuleConstants.SettingsPanelModuleId, new SettingsPanelModule_1.SettingsPanelModule(api));
|
|
101
101
|
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule_1.ChartingModule(api));
|
|
102
102
|
return modules;
|
|
103
103
|
}
|
|
@@ -248,8 +248,7 @@ class agGridHelper {
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
// lets set this here one as the function cannot change the result so dont need to run it each time
|
|
251
|
-
let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.searchOptions
|
|
252
|
-
.excludeColumnFromQuickSearch;
|
|
251
|
+
let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.searchOptions.excludeColumnFromQuickSearch;
|
|
253
252
|
if (excludeColumnFromQuickSearch) {
|
|
254
253
|
if (excludeColumnFromQuickSearch(abColumn)) {
|
|
255
254
|
abColumn.isExcludedFromQuickSearch = true;
|
|
@@ -495,7 +494,7 @@ class agGridHelper {
|
|
|
495
494
|
dataType = Enums_1.DataType.Date;
|
|
496
495
|
}
|
|
497
496
|
else if (Array.isArray(value) && value.length && typeof value[0] === 'number') {
|
|
498
|
-
dataType = Enums_1.DataType.
|
|
497
|
+
dataType = Enums_1.DataType.Unknown;
|
|
499
498
|
}
|
|
500
499
|
else {
|
|
501
500
|
switch (typeof value) {
|
|
@@ -526,8 +525,6 @@ class agGridHelper {
|
|
|
526
525
|
switch (colType) {
|
|
527
526
|
case 'abColDefNumber':
|
|
528
527
|
return Enums_1.DataType.Number;
|
|
529
|
-
case 'abColDefNumberArray':
|
|
530
|
-
return Enums_1.DataType.NumberArray;
|
|
531
528
|
case 'abColDefString':
|
|
532
529
|
return Enums_1.DataType.String;
|
|
533
530
|
case 'abColDefBoolean':
|
|
@@ -553,8 +550,6 @@ class agGridHelper {
|
|
|
553
550
|
return 'abColDefDate';
|
|
554
551
|
case Enums_1.DataType.Number:
|
|
555
552
|
return 'abColDefNumber';
|
|
556
|
-
case Enums_1.DataType.NumberArray:
|
|
557
|
-
return 'abColDefNumberArray';
|
|
558
553
|
case Enums_1.DataType.Object:
|
|
559
554
|
return 'abColDefObject';
|
|
560
555
|
case Enums_1.DataType.String:
|
|
@@ -21,8 +21,7 @@ class agGridMenuHelper {
|
|
|
21
21
|
let userColumnMenuItems = [];
|
|
22
22
|
//First get Ag Grid Column Items
|
|
23
23
|
agGridColumnMenuItems.push(...this.createAgGridColumnMenuItems(originalgetMainMenuItems, params));
|
|
24
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
25
|
-
.showAdaptableColumnMenu;
|
|
24
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
|
|
26
25
|
let hasAdaptableColumnMenuItems = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
27
26
|
if (hasAdaptableColumnMenuItems) {
|
|
28
27
|
agGridColumnMenuItems.push('separator');
|
|
@@ -56,8 +55,7 @@ class agGridMenuHelper {
|
|
|
56
55
|
let agGridContextMenuItems = [];
|
|
57
56
|
let adaptableContextMenuItems = [];
|
|
58
57
|
let userContextMenuItems = [];
|
|
59
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
60
|
-
.showAdaptableContextMenu;
|
|
58
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
|
|
61
59
|
let hasAdaptableContextMenuItems = showAdaptableContextMenu == null || showAdaptableContextMenu !== false;
|
|
62
60
|
let userDefinedContextMenuItems = this.adaptable.adaptableOptions.menuOptions.contextMenuItems;
|
|
63
61
|
let hasUserDefinedContextMenuItems = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userDefinedContextMenuItems);
|
|
@@ -285,8 +283,7 @@ class agGridMenuHelper {
|
|
|
285
283
|
// here we create agGrid Menu items based on Adaptable Menu Items
|
|
286
284
|
// user has ability to decide whether to show or not
|
|
287
285
|
let contextMenuItems = [];
|
|
288
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
289
|
-
.showAdaptableContextMenu;
|
|
286
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
|
|
290
287
|
if (showAdaptableContextMenu == null || showAdaptableContextMenu !== false) {
|
|
291
288
|
adaptableMenuItems.forEach((adaptableMenuItem) => {
|
|
292
289
|
if (adaptableMenuItem) {
|
|
@@ -321,8 +318,7 @@ class agGridMenuHelper {
|
|
|
321
318
|
// method to get all the Adaptable Menu Items - together with running the function where user can choose whether or not to display
|
|
322
319
|
getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext) {
|
|
323
320
|
const adaptableMenuItems = [];
|
|
324
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
325
|
-
.showAdaptableColumnMenu;
|
|
321
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
|
|
326
322
|
let runCheck = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
327
323
|
// if (adaptableColumn != null) {
|
|
328
324
|
this.adaptable.adaptableModules.forEach((s) => {
|
|
@@ -117,7 +117,7 @@ class AdaptableDateEditor {
|
|
|
117
117
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
118
118
|
}
|
|
119
119
|
shouldClearExistingValue(params) {
|
|
120
|
-
return params.
|
|
120
|
+
return params.key === all_modules_1.KeyCode.BACKSPACE || params.key === all_modules_1.KeyCode.DELETE;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
exports.AdaptableDateEditor = AdaptableDateEditor;
|
|
@@ -93,7 +93,7 @@ class AdaptableNumberEditor {
|
|
|
93
93
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
94
94
|
}
|
|
95
95
|
shouldClearExistingValue(params) {
|
|
96
|
-
return params.
|
|
96
|
+
return params.key === all_modules_1.KeyCode.BACKSPACE || params.key === all_modules_1.KeyCode.DELETE;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
exports.AdaptableNumberEditor = AdaptableNumberEditor;
|
|
@@ -11,14 +11,16 @@ interface AdaptableFormComponentProps {
|
|
|
11
11
|
displayTitle: boolean;
|
|
12
12
|
api: AdaptableApi;
|
|
13
13
|
context?: ButtonContext;
|
|
14
|
+
focusFirstButton?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, }: {
|
|
16
|
+
export declare function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, focusFirstButton, }: {
|
|
16
17
|
disabledButtons?: boolean[];
|
|
17
18
|
defaultTone: SimpleButtonProps['tone'];
|
|
18
19
|
onClick: (button: AdaptableButton<ButtonContext>) => void;
|
|
19
20
|
formDef: AdaptableForm<ButtonContext>;
|
|
20
21
|
api: AdaptableApi;
|
|
21
22
|
context: ButtonContext;
|
|
23
|
+
focusFirstButton?: boolean;
|
|
22
24
|
}): JSX.Element;
|
|
23
|
-
export declare function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, }: AdaptableFormComponentProps): JSX.Element;
|
|
25
|
+
export declare function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, focusFirstButton, }: AdaptableFormComponentProps): JSX.Element;
|
|
24
26
|
export {};
|
|
@@ -10,7 +10,7 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
|
|
|
10
10
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../View/Components/AdaptableInput"));
|
|
11
11
|
const DropdownButton_1 = tslib_1.__importDefault(require("../DropdownButton"));
|
|
12
12
|
const react_1 = require("react");
|
|
13
|
-
function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, }) {
|
|
13
|
+
function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, focusFirstButton = true, }) {
|
|
14
14
|
return (React.createElement(React.Fragment, null, formDef.buttons.map((button, index) => {
|
|
15
15
|
var _a;
|
|
16
16
|
const defaultIconProps = {
|
|
@@ -23,7 +23,7 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
|
|
|
23
23
|
let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api });
|
|
24
24
|
let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api });
|
|
25
25
|
let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api });
|
|
26
|
-
return (React.createElement(SimpleButton_1.default, { autoFocus: index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, 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: () => {
|
|
26
|
+
return (React.createElement(SimpleButton_1.default, { autoFocus: focusFirstButton && index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, 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: () => {
|
|
27
27
|
onClick(button);
|
|
28
28
|
} },
|
|
29
29
|
button.icon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
@@ -31,7 +31,7 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
|
|
|
31
31
|
})));
|
|
32
32
|
}
|
|
33
33
|
exports.AdaptableFormComponentButtons = AdaptableFormComponentButtons;
|
|
34
|
-
function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, }) {
|
|
34
|
+
function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, focusFirstButton, }) {
|
|
35
35
|
var _a;
|
|
36
36
|
const getFieldValue = (key) => data[key];
|
|
37
37
|
const setFieldValue = (key, value) => {
|
|
@@ -92,6 +92,6 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
92
92
|
formDef.description && React.createElement(rebass_1.Box, { mb: 3 }, formDef.description),
|
|
93
93
|
React.createElement(FormLayout_1.default, null, (_a = formDef.fields) === null || _a === void 0 ? void 0 : _a.map((field) => (React.createElement(FormLayout_1.FormRow, { key: field.name, label: field.label }, renderField(field))))),
|
|
94
94
|
formDef.buttons ? (React.createElement(rebass_1.Flex, { marginTop: 3, flexDirection: "row", alignItems: "center", justifyContent: "center" },
|
|
95
|
-
React.createElement(AdaptableFormComponentButtons, { onClick: onButtonClick, disabledButtons: disabledButtons, defaultTone: "success", formDef: formDef, api: api, context: context }))) : null));
|
|
95
|
+
React.createElement(AdaptableFormComponentButtons, { focusFirstButton: focusFirstButton, onClick: onButtonClick, disabledButtons: disabledButtons, defaultTone: "success", formDef: formDef, api: api, context: context }))) : null));
|
|
96
96
|
}
|
|
97
97
|
exports.AdaptableFormComponent = AdaptableFormComponent;
|