@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.30
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 +4 -21
- package/agGrid.js +9 -26
- package/base.css +27 -21
- package/base.css.map +1 -1
- package/index.css +108 -88
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -109
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +39 -0
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -26
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -71
- package/src/AdaptableOptions/MenuOptions.js +1 -99
- package/src/AdaptableOptions/NoteOptions.d.ts +25 -0
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +9 -4
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +42 -14
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/AlertApiImpl.js +5 -10
- package/src/Api/Implementation/ApiBase.d.ts +5 -3
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ColumnApiImpl.js +45 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/CommentsApiImpl.d.ts +8 -5
- package/src/Api/Implementation/CommentsApiImpl.js +12 -6
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +34 -30
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +14 -19
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +10 -3
- package/src/Api/Implementation/GridApiImpl.js +78 -23
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -7
- package/src/Api/Implementation/LayoutApiImpl.js +19 -13
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +40 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/OptionsApiImpl.js +4 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +64 -18
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -25
- package/src/Api/Internal/ActionRowInternalApi.d.ts +6 -1
- package/src/Api/Internal/ActionRowInternalApi.js +117 -38
- package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -8
- package/src/Api/Internal/AdaptableInternalApi.js +25 -37
- package/src/Api/Internal/AlertInternalApi.js +4 -17
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +78 -14
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +35 -31
- package/src/Api/Internal/ColumnInternalApi.d.ts +6 -1
- package/src/Api/Internal/ColumnInternalApi.js +19 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +33 -2
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +3 -8
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +2 -12
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +26 -28
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +61 -1
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +9 -9
- package/src/Api/Internal/GridInternalApi.d.ts +23 -3
- package/src/Api/Internal/GridInternalApi.js +151 -44
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -0
- package/src/Api/Internal/LayoutInternalApi.js +26 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/NoteInternalApi.js +14 -0
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.js +5 -5
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +3 -8
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +17 -9
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/OptionsApi.d.ts +8 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +4 -1
- package/src/PredefinedConfig/Common/Enums.js +3 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +116 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +17 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +6 -1
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -0
- package/src/PredefinedConfig/SystemState.d.ts +12 -4
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -34
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +32 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +29 -28
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +0 -19
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +15 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +24 -9
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +70 -80
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +11 -12
- package/src/Strategy/AdaptableModuleBase.js +17 -23
- package/src/Strategy/AlertModule.d.ts +2 -3
- package/src/Strategy/AlertModule.js +4 -57
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +4 -5
- package/src/Strategy/CalculatedColumnModule.js +8 -28
- package/src/Strategy/CellSummaryModule.d.ts +10 -8
- package/src/Strategy/CellSummaryModule.js +85 -70
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +3 -4
- package/src/Strategy/ColumnFilterModule.js +37 -121
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +11 -0
- package/src/Strategy/CommentModule.js +70 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +4 -3
- package/src/Strategy/DashboardModule.d.ts +3 -4
- package/src/Strategy/DashboardModule.js +11 -28
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +39 -42
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +3 -4
- package/src/Strategy/FlashingCellModule.js +8 -21
- package/src/Strategy/FormatColumnModule.d.ts +1 -3
- package/src/Strategy/FormatColumnModule.js +27 -91
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -32
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +3 -4
- package/src/Strategy/LayoutModule.d.ts +5 -6
- package/src/Strategy/LayoutModule.js +77 -122
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +3 -3
- package/src/Strategy/NoteModule.js +55 -0
- package/src/Strategy/PlusMinusModule.d.ts +2 -2
- package/src/Strategy/PlusMinusModule.js +3 -3
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -2
- package/src/Strategy/StyledColumnModule.js +45 -40
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +1 -0
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +2 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +6 -6
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +433 -3
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +19 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +6 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
- package/src/Utilities/Services/CellPopupService.js +2 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -181
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +4 -3
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +243 -24
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +22 -0
- package/src/Utilities/Services/RowSummaryService.js +141 -0
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +14 -0
- package/src/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- package/src/View/AdaptableView.js +1 -3
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +25 -13
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +42 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +6 -3
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +19 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +11 -7
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +195 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +38 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +17 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +174 -0
- package/src/View/License/LicenseWatermark.js +1 -61
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +20 -17
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +14 -10
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +346 -0
- package/src/agGrid/AdaptableAgGrid.js +3910 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +64 -0
- package/src/agGrid/AgGridAdapter.js +589 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +54 -0
- package/src/agGrid/AgGridColumnAdapter.js +794 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +44 -0
- package/src/agGrid/AgGridMenuAdapter.js +600 -0
- package/src/agGrid/AgGridOptionsService.d.ts +15 -0
- package/src/agGrid/AgGridOptionsService.js +76 -0
- package/src/agGrid/BadgeRenderer.js +8 -2
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/PercentBarRenderer.js +3 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +120 -0
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +71 -18
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/agGrid/sortColumnStateForVisibleColumns.d.ts +12 -0
- package/src/agGrid/sortColumnStateForVisibleColumns.js +46 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +3 -1
- package/src/components/Select/Select.js +4 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +4 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +4 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +4 -0
- package/src/components/icons/index.js +14 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +4 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +4 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +203 -47
- package/src/metamodel/adaptable.metamodel.js +1 -9313
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- package/src/parser/src/parser.js +576 -553
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -4
- package/src/parser/src/types.d.ts +7 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +27 -20
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
- package/src/AdaptableOptions/NotesOptions.d.ts +0 -16
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
- package/src/Api/Implementation/NotesApiImpl.js +0 -39
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -4
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
- package/src/Strategy/CommentsModule.d.ts +0 -16
- package/src/Strategy/CommentsModule.js +0 -77
- package/src/Strategy/NotesModule.js +0 -57
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
- /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
- /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
- /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -1,686 +0,0 @@
|
|
|
1
|
-
import { createUuid } from '../PredefinedConfig/Uuid';
|
|
2
|
-
import { AlertModule } from '../Strategy/AlertModule';
|
|
3
|
-
import { BulkUpdateModule } from '../Strategy/BulkUpdateModule';
|
|
4
|
-
import { CalculatedColumnModule } from '../Strategy/CalculatedColumnModule';
|
|
5
|
-
import { CellSummaryModule } from '../Strategy/CellSummaryModule';
|
|
6
|
-
import { ChartingModule } from '../Strategy/ChartingModule';
|
|
7
|
-
import { ColumnInfoModule } from '../Strategy/ColumnInfoModule';
|
|
8
|
-
import { CustomSortModule } from '../Strategy/CustomSortModule';
|
|
9
|
-
import { DashboardModule } from '../Strategy/DashboardModule';
|
|
10
|
-
import { DataChangeHistoryModule } from '../Strategy/DataChangeHistoryModule';
|
|
11
|
-
import { DataImportModule } from '../Strategy/DataImportModule';
|
|
12
|
-
import { DataSetModule } from '../Strategy/DataSetModule';
|
|
13
|
-
import { ExportModule } from '../Strategy/ExportModule';
|
|
14
|
-
import { Fdc3Module } from '../Strategy/Fdc3Module';
|
|
15
|
-
import { ColumnFilterModule } from '../Strategy/ColumnFilterModule';
|
|
16
|
-
import { FlashingCellModule } from '../Strategy/FlashingCellModule';
|
|
17
|
-
import { FormatColumnModule } from '../Strategy/FormatColumnModule';
|
|
18
|
-
import { FreeTextColumnModule } from '../Strategy/FreeTextColumnModule';
|
|
19
|
-
import { GridFilterModule } from '../Strategy/GridFilterModule';
|
|
20
|
-
import { GridInfoModule } from '../Strategy/GridInfoModule';
|
|
21
|
-
import { LayoutModule } from '../Strategy/LayoutModule';
|
|
22
|
-
import { NamedQueryModule } from '../Strategy/NamedQueryModule';
|
|
23
|
-
import { NotesModule } from '../Strategy/NotesModule';
|
|
24
|
-
import { PlusMinusModule } from '../Strategy/PlusMinusModule';
|
|
25
|
-
import { QuickSearchModule } from '../Strategy/QuickSearchModule';
|
|
26
|
-
import { ScheduleModule } from '../Strategy/ScheduleModule';
|
|
27
|
-
import { SettingsPanelModule } from '../Strategy/SettingsPanelModule';
|
|
28
|
-
import { ShortcutModule } from '../Strategy/ShortcutModule';
|
|
29
|
-
import { SmartEditModule } from '../Strategy/SmartEditModule';
|
|
30
|
-
import { StateManagementModule } from '../Strategy/StateManagementModule';
|
|
31
|
-
import { StatusBarModule } from '../Strategy/StatusBarModule';
|
|
32
|
-
import { StyledColumnModule } from '../Strategy/StyledColumnModule';
|
|
33
|
-
import { SystemStatusModule } from '../Strategy/SystemStatusModule';
|
|
34
|
-
import { TeamSharingModule } from '../Strategy/TeamSharingModule';
|
|
35
|
-
import { ThemeModule } from '../Strategy/ThemeModule';
|
|
36
|
-
import { ToolPanelModule } from '../Strategy/ToolPanelModule';
|
|
37
|
-
import * as GeneralConstants from '../Utilities/Constants/GeneralConstants';
|
|
38
|
-
import { ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME, ADAPTABLE_ROW_ACTION_BUTTONS, ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME, } from '../Utilities/Constants/GeneralConstants';
|
|
39
|
-
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
40
|
-
import { ArrayExtensions } from '../Utilities/Extensions/ArrayExtensions';
|
|
41
|
-
import { StringExtensions } from '../Utilities/Extensions/StringExtensions';
|
|
42
|
-
import { Helper } from '../Utilities/Helpers/Helper';
|
|
43
|
-
import UIHelper from '../View/UIHelper';
|
|
44
|
-
import { getBadgeRendererForColumn } from './BadgeRenderer';
|
|
45
|
-
import { getPercentBarRendererForColumn } from './PercentBarRenderer';
|
|
46
|
-
import { CommentsModule } from '../Strategy/CommentsModule';
|
|
47
|
-
import tinycolor from 'tinycolor2';
|
|
48
|
-
/**
|
|
49
|
-
* Adaptable AG Grid implementation is getting really big and unwieldy
|
|
50
|
-
* So lets put some of the more obvious 'Helper' functions here
|
|
51
|
-
* This is a bit crap - it should take a GridOptions object...
|
|
52
|
-
*/
|
|
53
|
-
// tslint:disable-next-line: class-name
|
|
54
|
-
export class agGridHelper {
|
|
55
|
-
constructor(adaptable, gridOptions) {
|
|
56
|
-
this.adaptable = adaptable;
|
|
57
|
-
this.gridOptions = gridOptions;
|
|
58
|
-
this.initialAgGridColDefs = {};
|
|
59
|
-
}
|
|
60
|
-
destroy() {
|
|
61
|
-
this.adaptable = null;
|
|
62
|
-
this.gridOptions = null;
|
|
63
|
-
}
|
|
64
|
-
getAgGridLightThemeName() {
|
|
65
|
-
// we try not to call these two methods, as we try to detect the default grid
|
|
66
|
-
// theme from the grid container element - users should set their aggrid theme in html, on the container element
|
|
67
|
-
// so we read it from there. if we don't find it there, we'll call this method, as a last resort.
|
|
68
|
-
return 'ag-theme-balham';
|
|
69
|
-
}
|
|
70
|
-
getAgGridDarkThemeName() {
|
|
71
|
-
return 'ag-theme-balham-dark';
|
|
72
|
-
}
|
|
73
|
-
setUpModules() {
|
|
74
|
-
const modules = new Map();
|
|
75
|
-
const api = this.adaptable.api;
|
|
76
|
-
// this is order is semi important as it currently decides the order of the items in the Column Menu
|
|
77
|
-
// so we put Dashboard first and then the rest in alphabetical order with Grid Info last
|
|
78
|
-
modules.set(ModuleConstants.DashboardModuleId, new DashboardModule(api));
|
|
79
|
-
modules.set(ModuleConstants.AlertModuleId, new AlertModule(api));
|
|
80
|
-
modules.set(ModuleConstants.FlashingCellModuleId, new FlashingCellModule(api));
|
|
81
|
-
modules.set(ModuleConstants.BulkUpdateModuleId, new BulkUpdateModule(api));
|
|
82
|
-
modules.set(ModuleConstants.CalculatedColumnModuleId, new CalculatedColumnModule(api));
|
|
83
|
-
modules.set(ModuleConstants.CellSummaryModuleId, new CellSummaryModule(api));
|
|
84
|
-
modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule(api));
|
|
85
|
-
modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule(api));
|
|
86
|
-
modules.set(ModuleConstants.DataImportModuleId, new DataImportModule(api));
|
|
87
|
-
modules.set(ModuleConstants.DataSetModuleId, new DataSetModule(api));
|
|
88
|
-
modules.set(ModuleConstants.ExportModuleId, new ExportModule(api));
|
|
89
|
-
modules.set(ModuleConstants.ColumnFilterModuleId, new ColumnFilterModule(api));
|
|
90
|
-
modules.set(ModuleConstants.FormatColumnModuleId, new FormatColumnModule(api));
|
|
91
|
-
modules.set(ModuleConstants.FreeTextColumnModuleId, new FreeTextColumnModule(api));
|
|
92
|
-
modules.set(ModuleConstants.LayoutModuleId, new LayoutModule(api));
|
|
93
|
-
modules.set(ModuleConstants.PlusMinusModuleId, new PlusMinusModule(api));
|
|
94
|
-
modules.set(ModuleConstants.QuickSearchModuleId, new QuickSearchModule(api));
|
|
95
|
-
modules.set(ModuleConstants.ScheduleModuleId, new ScheduleModule(api));
|
|
96
|
-
modules.set(ModuleConstants.SmartEditModuleId, new SmartEditModule(api));
|
|
97
|
-
modules.set(ModuleConstants.ShortcutModuleId, new ShortcutModule(api));
|
|
98
|
-
modules.set(ModuleConstants.StateManagementModuleId, new StateManagementModule(api));
|
|
99
|
-
modules.set(ModuleConstants.TeamSharingModuleId, new TeamSharingModule(api));
|
|
100
|
-
modules.set(ModuleConstants.ToolPanelModuleId, new ToolPanelModule(api));
|
|
101
|
-
modules.set(ModuleConstants.SystemStatusModuleId, new SystemStatusModule(api));
|
|
102
|
-
modules.set(ModuleConstants.ThemeModuleId, new ThemeModule(api));
|
|
103
|
-
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule(api));
|
|
104
|
-
modules.set(ModuleConstants.ColumnInfoModuleId, new ColumnInfoModule(api));
|
|
105
|
-
modules.set(ModuleConstants.SettingsPanelModuleId, new SettingsPanelModule(api));
|
|
106
|
-
modules.set(ModuleConstants.StatusBarModuleId, new StatusBarModule(api));
|
|
107
|
-
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule(api));
|
|
108
|
-
modules.set(ModuleConstants.NotesModuleId, new NotesModule(api));
|
|
109
|
-
modules.set(ModuleConstants.StyledColumnModuleId, new StyledColumnModule(api));
|
|
110
|
-
modules.set(ModuleConstants.Fdc3ModuleId, new Fdc3Module(api));
|
|
111
|
-
modules.set(ModuleConstants.GridFilterModuleId, new GridFilterModule(api));
|
|
112
|
-
modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule(api));
|
|
113
|
-
modules.set(ModuleConstants.CommentsModuleId, new CommentsModule(api));
|
|
114
|
-
return modules;
|
|
115
|
-
}
|
|
116
|
-
TrySetUpNodeIds(hasAutogeneratedPrimaryKey) {
|
|
117
|
-
if (StringExtensions.IsNullOrEmpty(this.adaptable.adaptableOptions.primaryKey)) {
|
|
118
|
-
// if no valid pk then always false
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
if (Helper.objectExists(this.gridOptions.getRowId)) {
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
const primaryKey = this.adaptable.adaptableOptions.primaryKey;
|
|
125
|
-
if (hasAutogeneratedPrimaryKey) {
|
|
126
|
-
this.gridOptions.getRowId = (params) => {
|
|
127
|
-
// if the PK value is autogenerated, we need to make sure that the rowData has a valid PK value
|
|
128
|
-
// this should be taken care of in the Adaptable.[loadDataSource/setDataSource/updateRows]() methods, but the users will always make silly decisions
|
|
129
|
-
// so just to be safe we'll check here and add a PK value is missing
|
|
130
|
-
// thus adding a side-effect in a getter, but what can we do against it?! :)
|
|
131
|
-
if (Helper.objectNotExists(params.data[primaryKey])) {
|
|
132
|
-
params.data[primaryKey] = createUuid();
|
|
133
|
-
}
|
|
134
|
-
return params.data[primaryKey];
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
this.gridOptions.getRowId = (params) => {
|
|
139
|
-
var _a;
|
|
140
|
-
if (params.data[primaryKey]) {
|
|
141
|
-
return params.data[primaryKey];
|
|
142
|
-
}
|
|
143
|
-
// row does not have primary key => might be a group row
|
|
144
|
-
const parentKeys = (_a = params.parentKeys) !== null && _a !== void 0 ? _a : [];
|
|
145
|
-
const values = Object.values(params.data);
|
|
146
|
-
if (values.length) {
|
|
147
|
-
const id = [...parentKeys, values[0]].join('/');
|
|
148
|
-
return id;
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
createPercentBarRendererComp(styledColumn, abColumn) {
|
|
155
|
-
return getPercentBarRendererForColumn(styledColumn, abColumn, this.adaptable.api);
|
|
156
|
-
}
|
|
157
|
-
createBadgeRendererComp(styledColumn, abColumn) {
|
|
158
|
-
return getBadgeRendererForColumn(styledColumn, abColumn, this.adaptable.api);
|
|
159
|
-
}
|
|
160
|
-
getCleanValue(value) {
|
|
161
|
-
if (typeof value === 'string') {
|
|
162
|
-
return value;
|
|
163
|
-
}
|
|
164
|
-
if (value == null || value == 'null' || value == undefined || value == 'undefined') {
|
|
165
|
-
return undefined;
|
|
166
|
-
}
|
|
167
|
-
return String(value) || '';
|
|
168
|
-
}
|
|
169
|
-
getRenderedValue(colDef, valueToRender) {
|
|
170
|
-
const render = colDef.cellRenderer;
|
|
171
|
-
if (typeof render === 'string') {
|
|
172
|
-
return this.getCleanValue(valueToRender);
|
|
173
|
-
}
|
|
174
|
-
return render({ value: valueToRender }) || '';
|
|
175
|
-
}
|
|
176
|
-
createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups) {
|
|
177
|
-
const colId = agGridColumn.getColId();
|
|
178
|
-
const colDef = agGridColumn.getColDef();
|
|
179
|
-
const ColumnId = colId;
|
|
180
|
-
const pkColumn = this.adaptable.adaptableOptions.primaryKey;
|
|
181
|
-
const ColumnGroup = colsToGroups === null || colsToGroups === void 0 ? void 0 : colsToGroups[ColumnId];
|
|
182
|
-
const isRealColumnGroup = ColumnGroup
|
|
183
|
-
? ColumnGroup.columnGroupId !== ColumnGroup.friendlyName
|
|
184
|
-
: false;
|
|
185
|
-
const isActionRowButtonColumn = this.adaptable.api.columnApi.internalApi.isActionRowButtonColumn(colId);
|
|
186
|
-
const isFdc3MainActionColumn = this.adaptable.api.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
|
|
187
|
-
let friendlyName;
|
|
188
|
-
const colExists = this.adaptable.api.columnApi.doesColumnExist(ColumnId);
|
|
189
|
-
if (colExists) {
|
|
190
|
-
friendlyName = this.adaptable.api.columnApi.getFriendlyNameForColumnId(ColumnId);
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
const displayName = this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
|
|
194
|
-
const columnFriendlyName = this.adaptable.adaptableOptions.columnOptions.columnFriendlyName;
|
|
195
|
-
const customFriendlyName = typeof columnFriendlyName === 'function'
|
|
196
|
-
? columnFriendlyName({
|
|
197
|
-
colId: colId,
|
|
198
|
-
agColumn: agGridColumn,
|
|
199
|
-
columnGroup: isRealColumnGroup ? ColumnGroup : undefined,
|
|
200
|
-
displayName: displayName,
|
|
201
|
-
})
|
|
202
|
-
: null;
|
|
203
|
-
friendlyName =
|
|
204
|
-
customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : (isActionRowButtonColumn
|
|
205
|
-
? ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME
|
|
206
|
-
: isFdc3MainActionColumn
|
|
207
|
-
? ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME
|
|
208
|
-
: displayName);
|
|
209
|
-
// Add Column Group;s friendlyname to the Column Friendly Name if its in a legitimate Column Group
|
|
210
|
-
if (this.adaptable.adaptableOptions.columnOptions.addColumnGroupToColumnFriendlyName &&
|
|
211
|
-
colDef.columnGroupShow &&
|
|
212
|
-
ColumnGroup &&
|
|
213
|
-
ColumnGroup.columnGroupId !== ColumnGroup.friendlyName) {
|
|
214
|
-
friendlyName += ' [' + ColumnGroup.friendlyName + ']';
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
if (!this.initialAgGridColDefs[colId]) {
|
|
218
|
-
this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
|
|
219
|
-
}
|
|
220
|
-
const dataType = this.getColumnDataType(agGridColumn, false);
|
|
221
|
-
const abColumn = {
|
|
222
|
-
Uuid: createUuid(),
|
|
223
|
-
columnId: ColumnId,
|
|
224
|
-
field: colDef.field,
|
|
225
|
-
friendlyName: friendlyName,
|
|
226
|
-
isPrimaryKey: ColumnId === pkColumn,
|
|
227
|
-
dataType: dataType,
|
|
228
|
-
visible: agGridColumn.isVisible(),
|
|
229
|
-
readOnly: this.isColumnReadonly(colDef),
|
|
230
|
-
columnGroup: ColumnGroup,
|
|
231
|
-
fieldOnly: this.isColumnFieldonly(colDef),
|
|
232
|
-
sortable: this.isColumnSortable(colDef),
|
|
233
|
-
filterable: this.isColumnFilterable(colDef),
|
|
234
|
-
groupable: this.isColumnRowGroupable(colDef),
|
|
235
|
-
pivotable: this.isColumnPivotable(colDef),
|
|
236
|
-
aggregatable: this.isColumnAggregetable(colDef),
|
|
237
|
-
availableAggregationFunctions: null,
|
|
238
|
-
aggregationFunction: null,
|
|
239
|
-
moveable: this.isColumnMoveable(colDef),
|
|
240
|
-
hideable: this.isColumnHideable(colDef),
|
|
241
|
-
queryable: this.isColumnQueryable(colDef, ColumnId, friendlyName, dataType),
|
|
242
|
-
exportable: this.isColumnExportable(colDef, ColumnId, friendlyName, dataType),
|
|
243
|
-
isGrouped: this.isColumnRowGrouped(colDef),
|
|
244
|
-
isFixed: this.isColumnFixed(colDef),
|
|
245
|
-
pinned: this.getColumnPinnedPosition(colDef),
|
|
246
|
-
isExcludedFromQuickSearch: false,
|
|
247
|
-
isSparkline: this.isColumnSparkline(colDef),
|
|
248
|
-
};
|
|
249
|
-
if (abColumn.aggregatable) {
|
|
250
|
-
abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
|
|
251
|
-
if (typeof colDef.aggFunc === 'string') {
|
|
252
|
-
abColumn.aggregationFunction = colDef.aggFunc;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
// lets set this here one as the function cannot change the result so dont need to run it each time
|
|
256
|
-
let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.quickSearchOptions.excludeColumnFromQuickSearch;
|
|
257
|
-
if (excludeColumnFromQuickSearch) {
|
|
258
|
-
if (excludeColumnFromQuickSearch(abColumn)) {
|
|
259
|
-
abColumn.isExcludedFromQuickSearch = true;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return abColumn;
|
|
263
|
-
}
|
|
264
|
-
buildAdaptableToolPanelDef() {
|
|
265
|
-
return {
|
|
266
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
267
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
268
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
269
|
-
labelKey: 'adaptable',
|
|
270
|
-
iconKey: 'menu',
|
|
271
|
-
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
272
|
-
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
273
|
-
// maxWidth = undefined,
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
isSideBarDefObject(sidebarDef) {
|
|
277
|
-
return Array.isArray(sidebarDef === null || sidebarDef === void 0 ? void 0 : sidebarDef.toolPanels);
|
|
278
|
-
}
|
|
279
|
-
mapToolPanelDefs(toolPanelDefs = []) {
|
|
280
|
-
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
281
|
-
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
282
|
-
? this.buildAdaptableToolPanelDef()
|
|
283
|
-
: toolPanelDef);
|
|
284
|
-
}
|
|
285
|
-
// This method reselects cells - only IF they are in a single column
|
|
286
|
-
// Might be able to change that later
|
|
287
|
-
// We do this by gettng the selected cells, clearing the selection and then re-applying
|
|
288
|
-
reselectSelectedCells() {
|
|
289
|
-
const selectedCellRanges = this.gridOptions.api.getCellRanges();
|
|
290
|
-
if (ArrayExtensions.CorrectLength(selectedCellRanges, 1)) {
|
|
291
|
-
const selectedCellRange = selectedCellRanges[0];
|
|
292
|
-
const cellRangeParams = {
|
|
293
|
-
rowStartIndex: selectedCellRange.startRow.rowIndex,
|
|
294
|
-
rowEndIndex: selectedCellRange.endRow.rowIndex,
|
|
295
|
-
columns: selectedCellRange.columns,
|
|
296
|
-
};
|
|
297
|
-
this.gridOptions.api.clearRangeSelection();
|
|
298
|
-
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
fireCellSelectionChangedEvent() {
|
|
302
|
-
let cellSelectionChangedInfo = {
|
|
303
|
-
adaptableApi: this.adaptable.api,
|
|
304
|
-
selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
|
|
305
|
-
// selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
|
|
306
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
307
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
308
|
-
};
|
|
309
|
-
this.adaptable.api.eventApi.emit('CellSelectionChanged', cellSelectionChangedInfo);
|
|
310
|
-
}
|
|
311
|
-
fireRowSelectionChangedEvent() {
|
|
312
|
-
let rowSelectionChangedInfo = {
|
|
313
|
-
adaptableApi: this.adaptable.api,
|
|
314
|
-
// selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
|
|
315
|
-
selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
|
|
316
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
317
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
318
|
-
};
|
|
319
|
-
this.adaptable.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
|
|
320
|
-
}
|
|
321
|
-
isColumnReadonly(colDef) {
|
|
322
|
-
// if the column has conditional/dynamic editability, we assume some rows may be editable
|
|
323
|
-
if (colDef && typeof colDef.editable === 'function') {
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
// otherwise we evaluate the colDef.editable property (columns are NOT editable by default)
|
|
327
|
-
return !colDef.editable;
|
|
328
|
-
}
|
|
329
|
-
isColumnFieldonly(colDef) {
|
|
330
|
-
if (colDef.hide == true && colDef.initialHide == true && colDef.lockVisible == true) {
|
|
331
|
-
return true;
|
|
332
|
-
}
|
|
333
|
-
return false;
|
|
334
|
-
}
|
|
335
|
-
isColumnSortable(colDef) {
|
|
336
|
-
if (colDef && colDef.sortable != null) {
|
|
337
|
-
return colDef.sortable;
|
|
338
|
-
}
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
isColumnRowGroupable(colDef) {
|
|
342
|
-
if (colDef && colDef.enableRowGroup != null) {
|
|
343
|
-
return colDef.enableRowGroup;
|
|
344
|
-
}
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
isColumnPivotable(colDef) {
|
|
348
|
-
if (colDef && colDef.enablePivot != null) {
|
|
349
|
-
return colDef.enablePivot;
|
|
350
|
-
}
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
isColumnAggregetable(colDef) {
|
|
354
|
-
if (colDef && colDef.enableValue != null) {
|
|
355
|
-
return colDef.enableValue;
|
|
356
|
-
}
|
|
357
|
-
return false;
|
|
358
|
-
}
|
|
359
|
-
getColumnAggregationFunctions(colDef) {
|
|
360
|
-
return colDef.allowedAggFuncs || ['sum', 'min', 'max', 'count', 'avg', 'first', 'last']; // those are the default fns aggrid supports out-of-the-box
|
|
361
|
-
}
|
|
362
|
-
isColumnMoveable(colDef) {
|
|
363
|
-
if (!colDef) {
|
|
364
|
-
return false;
|
|
365
|
-
}
|
|
366
|
-
if (colDef.suppressMovable != null && colDef.suppressMovable == true) {
|
|
367
|
-
return false;
|
|
368
|
-
}
|
|
369
|
-
if (this.isColumnFixed(colDef)) {
|
|
370
|
-
return false;
|
|
371
|
-
}
|
|
372
|
-
return true;
|
|
373
|
-
}
|
|
374
|
-
isColumnQueryable(colDef, columnId, friendlyName, datatype) {
|
|
375
|
-
if (!colDef) {
|
|
376
|
-
return false;
|
|
377
|
-
}
|
|
378
|
-
if (colDef.colId === ADAPTABLE_ROW_ACTION_BUTTONS) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
const abColumnBase = {
|
|
382
|
-
columnId: columnId,
|
|
383
|
-
friendlyName: friendlyName,
|
|
384
|
-
dataType: datatype,
|
|
385
|
-
};
|
|
386
|
-
return this.adaptable.api.expressionApi.isColumnQueryable(abColumnBase);
|
|
387
|
-
}
|
|
388
|
-
isColumnExportable(colDef, columnId, friendlyName, datatype) {
|
|
389
|
-
if (!colDef) {
|
|
390
|
-
return false;
|
|
391
|
-
}
|
|
392
|
-
if (colDef.colId === ADAPTABLE_ROW_ACTION_BUTTONS) {
|
|
393
|
-
return false;
|
|
394
|
-
}
|
|
395
|
-
const abColumnBase = {
|
|
396
|
-
columnId,
|
|
397
|
-
friendlyName,
|
|
398
|
-
dataType: datatype,
|
|
399
|
-
};
|
|
400
|
-
return this.adaptable.api.exportApi.isColumnExportable(abColumnBase);
|
|
401
|
-
}
|
|
402
|
-
isColumnHideable(colDef) {
|
|
403
|
-
if (!colDef) {
|
|
404
|
-
return false;
|
|
405
|
-
}
|
|
406
|
-
if (colDef.lockVisible != null && colDef.lockVisible == true) {
|
|
407
|
-
return false;
|
|
408
|
-
}
|
|
409
|
-
return true;
|
|
410
|
-
}
|
|
411
|
-
isColumnFilterable(colDef) {
|
|
412
|
-
// follow agGrid logic which is that ONLY filterable if explicitly set
|
|
413
|
-
if (this.adaptable.EntitlementService.getEntitlementAccessLevelForModule(ModuleConstants.ColumnFilterModuleId) == 'Hidden') {
|
|
414
|
-
return false;
|
|
415
|
-
}
|
|
416
|
-
return colDef != null && colDef.filter != null && colDef.filter != false;
|
|
417
|
-
}
|
|
418
|
-
getColumnPinnedPosition(colDef) {
|
|
419
|
-
return colDef.pinned
|
|
420
|
-
? colDef.pinned === 'left' || colDef.pinned === true
|
|
421
|
-
? 'left'
|
|
422
|
-
: 'right'
|
|
423
|
-
: false;
|
|
424
|
-
}
|
|
425
|
-
// used for AG Grid when the column is FixedPinned, meaning it should never be unpinned
|
|
426
|
-
isColumnFixed(colDef) {
|
|
427
|
-
if (!colDef) {
|
|
428
|
-
return false;
|
|
429
|
-
}
|
|
430
|
-
if (colDef.lockPosition != null && colDef.lockPosition == true) {
|
|
431
|
-
return true;
|
|
432
|
-
}
|
|
433
|
-
if (colDef.lockPinned != null && colDef.lockPinned == true) {
|
|
434
|
-
return true;
|
|
435
|
-
}
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
isColumnRowGrouped(colDef) {
|
|
439
|
-
if (!colDef) {
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
if (colDef.rowGroup != null && colDef.rowGroup == true) {
|
|
443
|
-
return true;
|
|
444
|
-
}
|
|
445
|
-
if (colDef.rowGroupIndex != null) {
|
|
446
|
-
return true;
|
|
447
|
-
}
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
isColumnSparkline(colDef) {
|
|
451
|
-
// see https://www.ag-grid.com/javascript-data-grid/sparklines-overview/#enabling-sparklines
|
|
452
|
-
return (colDef === null || colDef === void 0 ? void 0 : colDef.cellRenderer) === 'agSparklineCellRenderer';
|
|
453
|
-
}
|
|
454
|
-
getColumnDataType(column, logWarning = true) {
|
|
455
|
-
// Some columns can have no ID or Title. we return string as a consequence but it needs testing
|
|
456
|
-
if (!column) {
|
|
457
|
-
this.adaptable.logger.warn('column is undefined returning String for Type');
|
|
458
|
-
return 'String';
|
|
459
|
-
}
|
|
460
|
-
let dataType = 'Unknown';
|
|
461
|
-
// get the column type if already in store (and not unknown)
|
|
462
|
-
const existingColumn = this.adaptable.api.columnApi.getColumnWithColumnId(column.getId(), logWarning);
|
|
463
|
-
if (existingColumn && existingColumn.dataType != 'Unknown') {
|
|
464
|
-
return existingColumn.dataType;
|
|
465
|
-
}
|
|
466
|
-
// check for column type
|
|
467
|
-
const colType = column.getColDef().type;
|
|
468
|
-
if (colType) {
|
|
469
|
-
if (Array.isArray(colType)) {
|
|
470
|
-
colType.forEach((c) => {
|
|
471
|
-
if (dataType == 'Unknown') {
|
|
472
|
-
dataType = this.getAbColDefValue(c);
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
dataType = this.getAbColDefValue(colType);
|
|
478
|
-
}
|
|
479
|
-
if (dataType != 'Unknown') {
|
|
480
|
-
return dataType;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
const model = this.gridOptions.api.getModel();
|
|
484
|
-
if (model == null) {
|
|
485
|
-
this.adaptable.logger.warn(`No model so returning type "Unknown" for Column: "${column.getColId()}"`);
|
|
486
|
-
return 'Unknown';
|
|
487
|
-
}
|
|
488
|
-
let row = model.getRow(0);
|
|
489
|
-
if (row == null) {
|
|
490
|
-
// possible that there will be no data.
|
|
491
|
-
this.adaptable.logger.warn(`No data in grid so returning type "Unknown" for Column: "${column.getColId()}"`);
|
|
492
|
-
return 'Unknown';
|
|
493
|
-
}
|
|
494
|
-
// if it's a group we need the content of the group
|
|
495
|
-
if (row.group) {
|
|
496
|
-
const childNodes = row.childrenAfterGroup;
|
|
497
|
-
if (ArrayExtensions.IsNullOrEmpty(childNodes)) {
|
|
498
|
-
this.adaptable.logger.warn(`No data in grid so returning type "Unknown" for Column: "${column.getColId()}"`);
|
|
499
|
-
return 'Unknown';
|
|
500
|
-
}
|
|
501
|
-
row = childNodes[0];
|
|
502
|
-
}
|
|
503
|
-
const value = this.gridOptions.api.getValue(column, row);
|
|
504
|
-
if (value instanceof Date) {
|
|
505
|
-
dataType = 'Date';
|
|
506
|
-
}
|
|
507
|
-
else if (Array.isArray(value) && value.length && typeof value[0] === 'number') {
|
|
508
|
-
dataType = 'Unknown';
|
|
509
|
-
}
|
|
510
|
-
else {
|
|
511
|
-
switch (typeof value) {
|
|
512
|
-
case 'string':
|
|
513
|
-
dataType = 'String';
|
|
514
|
-
break;
|
|
515
|
-
case 'number':
|
|
516
|
-
dataType = 'Number';
|
|
517
|
-
break;
|
|
518
|
-
case 'boolean':
|
|
519
|
-
dataType = 'Boolean';
|
|
520
|
-
break;
|
|
521
|
-
case 'object':
|
|
522
|
-
dataType = 'Object';
|
|
523
|
-
break;
|
|
524
|
-
default:
|
|
525
|
-
break;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
this.adaptable.logger.warn(`No defined type for column '${column.getColId()}'. Defaulting to type of first value: ${dataType}`);
|
|
529
|
-
return dataType;
|
|
530
|
-
}
|
|
531
|
-
getAbColDefValue(colType) {
|
|
532
|
-
if (colType == 'numericColumn') {
|
|
533
|
-
return 'Number';
|
|
534
|
-
}
|
|
535
|
-
if (colType.startsWith('abColDef')) {
|
|
536
|
-
const abColType = colType;
|
|
537
|
-
switch (abColType) {
|
|
538
|
-
case 'abColDefNumber':
|
|
539
|
-
return 'Number';
|
|
540
|
-
case 'abColDefString':
|
|
541
|
-
return 'String';
|
|
542
|
-
case 'abColDefBoolean':
|
|
543
|
-
return 'Boolean';
|
|
544
|
-
case 'abColDefDate':
|
|
545
|
-
return 'Date';
|
|
546
|
-
case 'abColDefObject':
|
|
547
|
-
return 'Object';
|
|
548
|
-
case 'abColDefStringArray':
|
|
549
|
-
return 'StringArray';
|
|
550
|
-
case 'abColDefNumberArray':
|
|
551
|
-
return 'NumberArray';
|
|
552
|
-
case 'abColDefTupleNumberArray':
|
|
553
|
-
return 'TupleNumberArray';
|
|
554
|
-
case 'abColDefObjectNumberArray':
|
|
555
|
-
return 'ObjectNumberArray';
|
|
556
|
-
default:
|
|
557
|
-
return 'Unknown';
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
return 'Unknown';
|
|
561
|
-
}
|
|
562
|
-
getAgGridDataType(dataType) {
|
|
563
|
-
if (!dataType) {
|
|
564
|
-
return 'abColDefString';
|
|
565
|
-
}
|
|
566
|
-
switch (dataType) {
|
|
567
|
-
case 'Boolean':
|
|
568
|
-
return 'abColDefBoolean';
|
|
569
|
-
case 'Date':
|
|
570
|
-
return 'abColDefDate';
|
|
571
|
-
case 'Number':
|
|
572
|
-
return 'abColDefNumber';
|
|
573
|
-
case 'Object':
|
|
574
|
-
return 'abColDefObject';
|
|
575
|
-
case 'String':
|
|
576
|
-
return 'abColDefString';
|
|
577
|
-
case 'NumberArray':
|
|
578
|
-
return 'abColDefNumberArray';
|
|
579
|
-
case 'TupleNumberArray':
|
|
580
|
-
return 'abColDefTupleNumberArray';
|
|
581
|
-
case 'ObjectNumberArray':
|
|
582
|
-
return 'abColDefObjectNumberArray';
|
|
583
|
-
default:
|
|
584
|
-
return 'abColDefCustom';
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
checkShouldClearExistingFiltersOrSearches() {
|
|
588
|
-
// if they have selected to clear column filters on startup then do it
|
|
589
|
-
if (this.adaptable.adaptableOptions.columnFilterOptions.clearColumnFiltersOnStartUp) {
|
|
590
|
-
if (ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.columnFilterApi.getColumnFilters())) {
|
|
591
|
-
this.adaptable.logger.warn('Clearing existing Column Filters as "clearColumnFiltersOnStartUp" is true');
|
|
592
|
-
this.adaptable.api.columnFilterApi.clearColumnFilters();
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
// if they have selected to clear the Grid filter on startup then do it
|
|
596
|
-
if (this.adaptable.adaptableOptions.gridFilterOptions.clearGridFilterOnStartUp) {
|
|
597
|
-
if (StringExtensions.IsNotNullOrEmpty(this.adaptable.api.gridFilterApi.getCurrentGridFilterExpression())) {
|
|
598
|
-
this.adaptable.logger.warn('Clearing existing Grid Filter as "clearGridFilterOnStartUp" is true');
|
|
599
|
-
this.adaptable.api.gridFilterApi.setGridFilterExpression('');
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
// if they have selected to clear searches on startup then do it
|
|
603
|
-
if (this.adaptable.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
604
|
-
if (StringExtensions.IsNotNullOrEmpty(this.adaptable.api.quickSearchApi.getQuickSearchState().QuickSearchText)) {
|
|
605
|
-
this.adaptable.logger.warn('Clearing existing Searches as "clearQuickSearchOnStartUp" is true');
|
|
606
|
-
this.adaptable.api.quickSearchApi.clearQuickSearch();
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
runAdaptableGroupComparerFunction() {
|
|
611
|
-
const adaptable = this.adaptable;
|
|
612
|
-
return function compareItemsOfCustomSort(params) {
|
|
613
|
-
const { nodeA, nodeB } = params;
|
|
614
|
-
let firstGroupedColumn = adaptable.getFirstGroupedColumn();
|
|
615
|
-
if (firstGroupedColumn) {
|
|
616
|
-
const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortForColumn(firstGroupedColumn.columnId), adaptable.api.customSortApi.internalApi.getCustomSortComparer(firstGroupedColumn));
|
|
617
|
-
if (definedColumnComparator) {
|
|
618
|
-
return definedColumnComparator(nodeA.key, nodeB.key);
|
|
619
|
-
}
|
|
620
|
-
const sortOder = adaptable.api.layoutApi.getCurrentLayoutColumnSort(firstGroupedColumn.columnId);
|
|
621
|
-
if (sortOder === 'Desc') {
|
|
622
|
-
return nodeA.key > nodeB.key ? -1 : 1;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
// if no comparator available, just sort alphanumerically
|
|
626
|
-
if (nodeA.key == nodeB.key) {
|
|
627
|
-
return 0;
|
|
628
|
-
}
|
|
629
|
-
return nodeA.key < nodeB.key ? -1 : 1;
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
getCurrentIPPStyle() {
|
|
633
|
-
const headerFirstCol = document
|
|
634
|
-
.querySelectorAll('.ag-header-cell')
|
|
635
|
-
.item(0);
|
|
636
|
-
const header = document.querySelector('.ag-header');
|
|
637
|
-
const headerColStyle = header ? window.getComputedStyle(header, null) : null;
|
|
638
|
-
const firstRow = document.querySelector('.ag-row-even');
|
|
639
|
-
const firstRowStyle = firstRow ? window.getComputedStyle(firstRow, null) : null;
|
|
640
|
-
const secondRow = document.querySelector('.ag-row-odd');
|
|
641
|
-
const secondRowStyle = secondRow
|
|
642
|
-
? window.getComputedStyle(secondRow, null)
|
|
643
|
-
: {
|
|
644
|
-
backgroundColor: '#fff',
|
|
645
|
-
};
|
|
646
|
-
return {
|
|
647
|
-
Header: {
|
|
648
|
-
headerColor: tinycolor(headerColStyle.color).toHexString(),
|
|
649
|
-
headerBackColor: tinycolor(headerColStyle.backgroundColor).toHexString(),
|
|
650
|
-
headerFontFamily: headerColStyle.fontFamily,
|
|
651
|
-
headerFontSize: headerColStyle.fontSize,
|
|
652
|
-
headerFontStyle: headerColStyle.fontStyle,
|
|
653
|
-
headerFontWeight: headerColStyle.fontWeight,
|
|
654
|
-
height: Number(headerColStyle.height.replace('px', '')),
|
|
655
|
-
Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
|
|
656
|
-
const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
|
|
657
|
-
const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
|
|
658
|
-
return {
|
|
659
|
-
columnFriendlyName: col.friendlyName,
|
|
660
|
-
width: Number(headerColumnStyle.width.replace('px', '')),
|
|
661
|
-
textAlign: headerColumnStyle.textAlign,
|
|
662
|
-
};
|
|
663
|
-
}),
|
|
664
|
-
},
|
|
665
|
-
Row: {
|
|
666
|
-
color: tinycolor(firstRowStyle.color).toHexString(),
|
|
667
|
-
backColor: tinycolor(firstRowStyle.backgroundColor).toHexString(),
|
|
668
|
-
altBackColor: tinycolor(secondRowStyle.backgroundColor).toHexString(),
|
|
669
|
-
fontFamily: firstRowStyle.fontFamily,
|
|
670
|
-
fontSize: firstRowStyle.fontSize,
|
|
671
|
-
fontStyle: firstRowStyle.fontStyle,
|
|
672
|
-
fontWeight: firstRowStyle.fontWeight,
|
|
673
|
-
height: Number(firstRowStyle.height.replace('px', '')),
|
|
674
|
-
Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
|
|
675
|
-
const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
|
|
676
|
-
const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
|
|
677
|
-
return {
|
|
678
|
-
columnFriendlyName: col.friendlyName,
|
|
679
|
-
width: Number(headerColumnStyle.width.replace('px', '')),
|
|
680
|
-
textAlign: headerColumnStyle.textAlign,
|
|
681
|
-
};
|
|
682
|
-
}),
|
|
683
|
-
},
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
}
|