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