@adaptabletools/adaptable 23.0.4 → 23.0.5-canary.1
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.js +0 -31
- package/index.css +0 -64
- package/index.js +0 -31
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
- package/src/AdaptableState/Aggregations/only.js +0 -11
- package/src/AdaptableState/Aggregations/weightedAverage.d.ts +0 -1
- package/src/AdaptableState/Aggregations/weightedAverage.js +1 -27
- package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
- package/src/AdaptableState/Common/AdaptableForm.js +0 -49
- package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
- package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
- package/src/AdaptableState/Common/AggregationColumns.js +0 -10
- package/src/AdaptableState/Common/Enums.js +0 -3
- package/src/AdaptableState/Common/Menu.js +1 -7
- package/src/AdaptableState/Common/MenuItem.js +0 -2
- package/src/AdaptableState/Common/Types.js +2 -5
- package/src/AdaptableState/StatusBarState.js +0 -3
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
- package/src/AdaptableState/Uuid.js +0 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
- package/src/Api/Implementation/AlertApiImpl.js +0 -21
- package/src/Api/Implementation/ApiBase.js +0 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -3
- package/src/Api/Implementation/ColumnApiImpl.js +1 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
- package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
- package/src/Api/Implementation/DashboardApiImpl.js +0 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
- package/src/Api/Implementation/GridApiImpl.js +1 -22
- package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -18
- package/src/Api/Implementation/LayoutHelpers.js +0 -16
- package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
- package/src/Api/Implementation/PredicateApiImpl.js +0 -5
- package/src/Api/Implementation/RowFormApiImpl.js +0 -2
- package/src/Api/Implementation/StateApiImpl.js +0 -7
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +1 -39
- package/src/Api/Internal/AlertInternalApi.js +1 -102
- package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
- package/src/Api/Internal/ChartingInternalApi.js +0 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
- package/src/Api/Internal/ColumnInternalApi.js +0 -32
- package/src/Api/Internal/CustomSortInternalApi.js +0 -5
- package/src/Api/Internal/DashboardInternalApi.js +0 -23
- package/src/Api/Internal/DataImportInternalApi.js +0 -1
- package/src/Api/Internal/EventInternalApi.js +0 -2
- package/src/Api/Internal/ExportInternalApi.js +1 -16
- package/src/Api/Internal/ExpressionInternalApi.js +0 -23
- package/src/Api/Internal/Fdc3InternalApi.js +0 -9
- package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
- package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
- package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
- package/src/Api/Internal/GridFilterInternalApi.js +0 -3
- package/src/Api/Internal/GridInternalApi.js +0 -37
- package/src/Api/Internal/LayoutInternalApi.js +0 -18
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
- package/src/Api/Internal/PredicateInternalApi.js +0 -23
- package/src/Api/Internal/RowFormInternalApi.js +0 -18
- package/src/Api/Internal/StateInternalApi.js +0 -25
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
- package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
- package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
- package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
- package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
- package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
- package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
- package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
- package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
- package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
- package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
- package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
- package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
- package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
- package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
- package/src/Redux/ActionsReducers/utils.js +0 -6
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
- package/src/Redux/Store/AdaptableStore.js +5 -301
- package/src/Strategy/AdaptableModuleBase.js +0 -35
- package/src/Strategy/AlertModule.js +0 -9
- package/src/Strategy/CellSummaryModule.js +0 -12
- package/src/Strategy/ChartingModule.js +0 -1
- package/src/Strategy/ColumnFilterModule.js +1 -11
- package/src/Strategy/CommentModule.js +0 -2
- package/src/Strategy/DashboardModule.js +0 -4
- package/src/Strategy/ExportModule.js +0 -1
- package/src/Strategy/FlashingCellModule.js +0 -8
- package/src/Strategy/FormatColumnModule.js +0 -3
- package/src/Strategy/FreeTextColumnModule.js +0 -3
- package/src/Strategy/LayoutModule.js +0 -26
- package/src/Strategy/NoteModule.js +0 -3
- package/src/Strategy/PlusMinusModule.js +0 -3
- package/src/Strategy/SettingsPanelModule.js +0 -1
- package/src/Strategy/ShortcutModule.js +0 -1
- package/src/Strategy/SmartEditModule.js +0 -5
- package/src/Strategy/StatusBarModule.js +0 -7
- package/src/Strategy/StyledColumnModule.js +1 -16
- package/src/Strategy/TeamSharingModule.js +0 -9
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
- package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
- package/src/Utilities/Constants/GeneralConstants.js +0 -10
- package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
- package/src/Utilities/Constants/ReduxConstants.js +4 -8
- package/src/Utilities/Emitter.js +0 -9
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
- package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
- package/src/Utilities/Extensions/NumberExtensions.js +0 -27
- package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
- package/src/Utilities/Extensions/StringExtensions.js +0 -27
- package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
- package/src/Utilities/Helpers/DateHelper.js +0 -10
- package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
- package/src/Utilities/Helpers/Helper.js +3 -9
- package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
- package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
- package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
- package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
- package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
- package/src/Utilities/Helpers/StyleHelper.js +0 -56
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
- package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
- package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
- package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
- package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
- package/src/Utilities/Helpers/TimingHelper.js +0 -13
- package/src/Utilities/ObjectFactory.js +2 -4
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
- package/src/Utilities/Services/AlertService.js +0 -1
- package/src/Utilities/Services/AnnotationsService.js +0 -22
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
- package/src/Utilities/Services/ChartingService.js +0 -9
- package/src/Utilities/Services/DataService.js +0 -11
- package/src/Utilities/Services/Fdc3Service.js +0 -3
- package/src/Utilities/Services/FlashingCellService.js +0 -6
- package/src/Utilities/Services/ModuleService.js +0 -8
- package/src/Utilities/Services/QueryLanguageService.js +2 -25
- package/src/Utilities/Services/RowFormService.js +0 -1
- package/src/Utilities/Services/RowSummaryService.js +1 -20
- package/src/Utilities/Services/TeamSharingService.js +0 -15
- package/src/Utilities/Services/ThemeService.js +0 -7
- package/src/Utilities/Services/ValidationService.js +0 -21
- package/src/Utilities/createAgStatusPanelComponent.js +0 -3
- package/src/Utilities/getExpressionViewItems.js +0 -2
- package/src/Utilities/getObjectTagsViewItems.js +0 -1
- package/src/Utilities/getScrollbarSize.js +0 -1
- package/src/Utilities/logDeprecation.js +0 -3
- package/src/Utilities/resolveContainerElement.js +0 -21
- package/src/Utilities/runIfNotResolvedIn.js +0 -7
- package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
- package/src/Utilities/waitForTimeout.js +0 -1
- package/src/Utilities/wizardSelection.js +0 -2
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableView.js +1 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
- package/src/View/AdaptableWizardView/Wizard.js +0 -12
- package/src/View/AdaptableWizardView/helper.js +0 -11
- package/src/View/Alert/ActiveAlertsPanel.js +0 -2
- package/src/View/Alert/AlertStatusSubPanel.js +0 -8
- package/src/View/Alert/Utilities/getAlertType.js +0 -7
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
- package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
- package/src/View/Alert/Wizard/AlertWizard.js +0 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +0 -3
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
- package/src/View/Charting/EditChartButton.js +1 -4
- package/src/View/Charting/ShowChartButton.js +0 -3
- package/src/View/Charting/useAgChartState.js +0 -5
- package/src/View/Charting/useChartingElements.js +0 -4
- package/src/View/Charting/useExternalChartState.js +0 -6
- package/src/View/ColumnInfo/ColumnInfo.js +7 -17
- package/src/View/Comments/CommentsEditor.js +1 -16
- package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
- package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
- package/src/View/Components/AdaptableDateInput/index.js +2 -9
- package/src/View/Components/AdaptableIconComponent/index.js +0 -4
- package/src/View/Components/AdaptableIconSelector/index.js +0 -3
- package/src/View/Components/AdaptableInput/index.js +0 -2
- package/src/View/Components/Badge/index.js +0 -8
- package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
- package/src/View/Components/CellPopup/index.js +1 -2
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
- package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
- package/src/View/Components/ColumnFilter/utils.js +2 -9
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -11
- package/src/View/Components/ExternalRenderer.js +1 -3
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
- package/src/View/Components/ModuleValueSelector/index.js +0 -2
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Panels/PanelWithRow.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
- package/src/View/Components/Popups/AdaptableToaster.js +0 -2
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
- package/src/View/Components/RangesComponent.js +0 -57
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Components/ValueSelector/index.js +0 -4
- package/src/View/Components/wizardColumnListStyles.js +0 -5
- package/src/View/Dashboard/CustomToolbar.js +1 -25
- package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
- package/src/View/DataImport/systemFileHandlers.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
- package/src/View/GridFilter/GridFilterPopup.js +0 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
- package/src/View/Layout/LayoutViewPanel.js +0 -2
- package/src/View/Layout/PivotDetailsPopoup.js +0 -2
- package/src/View/Layout/TransposedPopup.js +0 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
- package/src/View/Note/NotePopup.js +0 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
- package/src/View/StatusBar/StatusBarPanel.js +0 -8
- package/src/View/StatusBar/StatusBarPopup.js +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
- package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
- package/src/View/Theme/ThemeSelector.js +0 -1
- package/src/View/UIHelper.js +0 -6
- package/src/View/UIInterfaces.js +0 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
- package/src/View/Wizard/OnePageWizards.js +2 -9
- package/src/View/Wizard/SummaryColorTag.js +0 -1
- package/src/View/Wizard/useKeyboardNavigation.js +1 -3
- package/src/agGrid/Adaptable.js +0 -12
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +3 -482
- package/src/agGrid/AdaptableFilterHandler.js +0 -5
- package/src/agGrid/AdaptableLogger.js +0 -6
- package/src/agGrid/AgGridAdapter.js +3 -90
- package/src/agGrid/AgGridColumnAdapter.js +6 -168
- package/src/agGrid/AgGridExportAdapter.js +4 -106
- package/src/agGrid/AgGridFilterAdapter.js +0 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
- package/src/agGrid/AgGridMenuAdapter.js +0 -143
- package/src/agGrid/AgGridModulesAdapter.js +0 -2
- package/src/agGrid/AgGridOptionsService.js +0 -2
- package/src/agGrid/AgGridThemeAdapter.js +0 -7
- package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
- package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
- package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
- package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
- package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
- package/src/agGrid/index.js +1 -9
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
- package/src/components/CodeBlock/index.d.ts +0 -1
- package/src/components/CodeBlock/index.js +1 -2
- package/src/components/ColorPicker/ColorPicker.js +0 -6
- package/src/components/Combobox/VirtualizedList.js +0 -5
- package/src/components/Combobox/index.js +5 -63
- package/src/components/Dashboard/Dashboard.js +1 -4
- package/src/components/Datepicker/index.js +2 -97
- package/src/components/DragAndDropContext/TabList.js +2 -6
- package/src/components/Drawer/index.js +0 -7
- package/src/components/Dropdown/index.js +0 -1
- package/src/components/DropdownButton/index.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
- package/src/components/ExpressionEditor/EditorButton.js +0 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -7
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
- package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
- package/src/components/ExpressionEditor/index.js +5 -14
- package/src/components/Icon/index.js +0 -2
- package/src/components/Input/NumberInput.js +0 -10
- package/src/components/Modal/Backdrop.js +0 -1
- package/src/components/OverlayTrigger/Overlay.js +0 -1
- package/src/components/OverlayTrigger/index.js +3 -15
- package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
- package/src/components/ResizeObserver/index.js +0 -7
- package/src/components/SimpleButton/index.js +2 -16
- package/src/components/Tabs/index.js +0 -3
- package/src/components/Tag/Tag.js +0 -1
- package/src/components/Tag/columnScopeTagHelpers.js +0 -2
- package/src/components/Textarea/index.js +1 -8
- package/src/components/Toggle/Toggle.js +1 -5
- package/src/components/Toggle/ToggleGroup.js +1 -3
- package/src/components/ToggleButton/index.js +1 -3
- package/src/components/Tree/TreeDropdown/index.js +2 -130
- package/src/components/Tree/treeUtils.js +0 -4
- package/src/components/WindowModal/WindowModal.js +1 -14
- package/src/components/WindowModal/useStacking.js +0 -7
- package/src/components/icons/bullet-chart.js +0 -4
- package/src/components/icons/icon-style.js +0 -4
- package/src/components/icons/index.js +26 -36
- package/src/components/icons/range-bar.js +0 -5
- package/src/components/icons/star.js +0 -1
- package/src/components/twUtils.js +3 -12
- package/src/components/ui/calendar.js +1 -9
- package/src/components/ui/combobox.js +0 -4
- package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
- package/src/components/utils/useDraggable.js +0 -4
- package/src/components/utils/useProperty.js +0 -18
- package/src/devTools/index.js +0 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +0 -5
- package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
- package/src/layout-manager/src/index.js +2 -182
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
- package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
- package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
- package/src/lib/utils.js +0 -1
- package/src/migration/AdaptableUpgradeHelper.js +0 -2
- package/src/migration/VersionUpgrade17.js +0 -33
- package/src/migration/VersionUpgrade20.js +1 -21
- package/src/migration/VersionUpgrade21.js +0 -3
- package/src/migration/VersionUpgrade22.js +0 -11
- package/src/migration/VersionUpgrade23.js +0 -73
- package/src/parser/src/evaluator.js +0 -1
- package/src/parser/src/index.js +0 -1
- package/src/parser/src/parser.js +4 -103
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
- package/src/parser/src/tokenizer.js +0 -2
- package/src/parser/src/utils.js +0 -1
- package/src/renderReactRoot.js +0 -12
- package/src/setupDevTools.js +0 -6
- package/src/twMerge.js +0 -1
- package/src/types.d.ts +1 -1
- package/src/types.js +0 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/NamedObject.d.ts +0 -10
- package/src/AdaptableState/Common/NamedObject.js +0 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +0 -35
- package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -100
- package/src/Utilities/Interface/AdaptableToolPanelContext.d.ts +0 -4
- package/src/Utilities/Interface/AdaptableToolPanelContext.js +0 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
- package/src/Utilities/Services/Interface/IMetamodelService.js +0 -1
- package/src/Utilities/Services/MetamodelService.d.ts +0 -17
- package/src/Utilities/Services/MetamodelService.js +0 -162
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -99
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +0 -38
- package/src/View/Components/Buttons/EntityListActionButtons.js +0 -42
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +0 -12
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -67
- package/src/View/Components/EntityRowItem.d.ts +0 -7
- package/src/View/Components/EntityRowItem.js +0 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +0 -3
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +0 -5
- package/src/View/Components/ModuleProfile.d.ts +0 -8
- package/src/View/Components/ModuleProfile.js +0 -10
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +0 -23
- package/src/View/Components/ModuleSummary/ModuleDetail.js +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.d.ts +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.js +0 -15
- package/src/View/Components/ModuleSummary/SummaryRowItem.d.ts +0 -7
- package/src/View/Components/ModuleSummary/SummaryRowItem.js +0 -12
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +0 -9
- package/src/View/Components/SharedProps/ModuleSummaryProps.js +0 -1
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.d.ts +0 -13
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.js +0 -1
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.d.ts +0 -14
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.js +0 -1
- package/src/View/Components/StyleVisualItem.d.ts +0 -9
- package/src/View/Components/StyleVisualItem.js +0 -40
- package/src/View/Components/WizardSummaryPage.d.ts +0 -7
- package/src/View/Components/WizardSummaryPage.js +0 -17
- package/src/components/Accordion.d.ts +0 -7
- package/src/components/Accordion.js +0 -33
- package/src/components/FlexWithFooter.d.ts +0 -9
- package/src/components/FlexWithFooter.js +0 -13
- package/src/components/NotifyResize/index.d.ts +0 -9
- package/src/components/NotifyResize/index.js +0 -35
- package/src/components/PopupWithFooter.d.ts +0 -14
- package/src/components/PopupWithFooter.js +0 -11
- package/src/components/SelectableList/index.d.ts +0 -15
- package/src/components/SelectableList/index.js +0 -95
- package/src/components/SizedContainer/index.d.ts +0 -17
- package/src/components/SizedContainer/index.js +0 -20
- package/src/components/Table/index.d.ts +0 -4
- package/src/components/Table/index.js +0 -6
- package/src/components/WizardPanel/index.d.ts +0 -9
- package/src/components/WizardPanel/index.js +0 -7
- package/src/components/icons/align-justify.d.ts +0 -3
- package/src/components/icons/align-justify.js +0 -3
- package/src/components/icons/column-info.d.ts +0 -3
- package/src/components/icons/column-info.js +0 -3
- package/src/components/icons/gradient-column.d.ts +0 -3
- package/src/components/icons/gradient-column.js +0 -3
- package/src/components/icons/invalid.d.ts +0 -3
- package/src/components/icons/invalid.js +0 -3
- package/src/components/icons/logout copy.d.ts +0 -3
- package/src/components/icons/logout copy.js +0 -3
- package/src/components/icons/smart-edit.d.ts +0 -3
- package/src/components/icons/smart-edit.js +0 -3
- package/src/components/icons/team-share.d.ts +0 -3
- package/src/components/icons/team-share.js +0 -3
- package/src/components/icons/unchecked.d.ts +0 -3
- package/src/components/icons/unchecked.js +0 -3
- package/src/components/icons/user-filter.d.ts +0 -3
- package/src/components/icons/user-filter.js +0 -3
- package/src/components/utils/useContainerScrollObserver/index.d.ts +0 -6
- package/src/components/utils/useContainerScrollObserver/index.js +0 -79
- package/src/components/utils/useGlobalEvent.d.ts +0 -1
- package/src/components/utils/useGlobalEvent.js +0 -7
- package/src/components/utils/useLatest.d.ts +0 -1
- package/src/components/utils/useLatest.js +0 -6
- package/src/components/utils/usePropState.d.ts +0 -2
- package/src/components/utils/usePropState.js +0 -8
- package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
- package/src/metamodel/adaptable-metamodel-model.js +0 -1
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
- package/src/metamodel/adaptable.metamodel.js +0 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
|
|
2
2
|
import ArrayExtensions from '../Extensions/ArrayExtensions';
|
|
3
|
-
/**
|
|
4
|
-
* This service controls the interaction between Notes & Comments
|
|
5
|
-
* If there are active Notes or Comments it listens to Cell Selection and Mouse Enter events
|
|
6
|
-
*/
|
|
7
3
|
export class AnnotationsService {
|
|
8
4
|
api;
|
|
9
5
|
adaptable;
|
|
@@ -28,7 +24,6 @@ export class AnnotationsService {
|
|
|
28
24
|
if (a?.ColumnId === b?.ColumnId && a?.PrimaryKeyValue === b?.PrimaryKeyValue) {
|
|
29
25
|
return true;
|
|
30
26
|
}
|
|
31
|
-
// Primary keys retrieved from the grid dom are always strings, so we must also consider them strings
|
|
32
27
|
if ((typeof a.PrimaryKeyValue === 'number' && typeof b.PrimaryKeyValue === 'string') ||
|
|
33
28
|
(typeof b.PrimaryKeyValue === 'string' && typeof a.PrimaryKeyValue === 'number')) {
|
|
34
29
|
return (a.PrimaryKeyValue.toString() === b.PrimaryKeyValue.toString() && a.ColumnId === b.ColumnId);
|
|
@@ -42,7 +37,6 @@ export class AnnotationsService {
|
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
39
|
shouldListenToEvents() {
|
|
45
|
-
// Listen to events if we either have Notes in state or if Comments have been set up
|
|
46
40
|
return (ArrayExtensions.IsNotNullOrEmpty(this.api.noteApi.getAllNotes()) ||
|
|
47
41
|
this.api.internalApi.getModuleService().isAdapTableModulePresent('Comment'));
|
|
48
42
|
}
|
|
@@ -81,28 +75,19 @@ export class AnnotationsService {
|
|
|
81
75
|
handleMouseEnter(event) {
|
|
82
76
|
const editMode = this.getEditMode();
|
|
83
77
|
if (editMode) {
|
|
84
|
-
// ignore
|
|
85
78
|
return;
|
|
86
79
|
}
|
|
87
80
|
const cellPosition = this.getCellPositionFromEvent(event);
|
|
88
81
|
const openCellAddress = this.getOpenCellAddress();
|
|
89
|
-
// Hovering over something that is not a cell and there is no open note
|
|
90
82
|
if (!cellPosition && openCellAddress) {
|
|
91
|
-
// need to close if the new cell does not have a note
|
|
92
83
|
this.hidePopup();
|
|
93
84
|
return;
|
|
94
85
|
}
|
|
95
|
-
// call only if cell address is different
|
|
96
86
|
if (AnnotationsService.isSameAddress(openCellAddress, cellPosition)) {
|
|
97
87
|
return;
|
|
98
88
|
}
|
|
99
89
|
const cellNote = this.api.noteApi.getNoteForCell(cellPosition);
|
|
100
90
|
const cellComments = this.api.commentApi.getCommentThreadForCell(cellPosition);
|
|
101
|
-
// Notes / Comments only open on hover when explicitly opted in via
|
|
102
|
-
// `noteOptions.openNote = 'hover'` / `commentOptions.showComment =
|
|
103
|
-
// 'hover'` (the defaults). When either is set to 'menu' the popup is
|
|
104
|
-
// only opened via the Cell Menu, so we ignore that side of the
|
|
105
|
-
// annotation when deciding whether to show the popup here.
|
|
106
91
|
const openNoteMode = this.api.optionsApi.getNoteOptions()?.showNoteAction ?? 'hover';
|
|
107
92
|
const showCommentMode = this.api.optionsApi.getCommentOptions()?.showCommentAction ?? 'hover';
|
|
108
93
|
const shouldOpenForNote = !!cellNote && openNoteMode === 'hover';
|
|
@@ -113,26 +98,19 @@ export class AnnotationsService {
|
|
|
113
98
|
this.showPopup(cellPosition, false);
|
|
114
99
|
}
|
|
115
100
|
handleCellSelected(cellAddress) {
|
|
116
|
-
// if already opened - do nothing
|
|
117
101
|
const openCellAddress = this.getOpenCellAddress();
|
|
118
102
|
if (AnnotationsService.isSameAddress(openCellAddress, cellAddress)) {
|
|
119
103
|
return;
|
|
120
104
|
}
|
|
121
|
-
// if open but this has no note, close
|
|
122
105
|
const cellNote = this.api.noteApi.getNoteForCell(cellAddress);
|
|
123
106
|
const cellComments = this.api.commentApi.getCommentThreadForCell(cellAddress);
|
|
124
107
|
const hasNotesOrComments = cellNote || cellComments;
|
|
125
108
|
if (openCellAddress && !hasNotesOrComments) {
|
|
126
|
-
// hide only if in edit mode
|
|
127
|
-
// because if you select a cell and move the mouse fast over another cell
|
|
128
|
-
// with a note, you do not want to close that note
|
|
129
|
-
// the selection is debounced, so the moment goes over the new cell this event is triggered
|
|
130
109
|
if (this.getEditMode()) {
|
|
131
110
|
this.hidePopup();
|
|
132
111
|
}
|
|
133
112
|
return;
|
|
134
113
|
}
|
|
135
|
-
// if open but the new selection has a note open that one in edit mode (because of click)
|
|
136
114
|
if (openCellAddress && hasNotesOrComments) {
|
|
137
115
|
this.showPopup(cellAddress, true);
|
|
138
116
|
return;
|
|
@@ -47,9 +47,6 @@ export class CalculatedColumnExpressionService {
|
|
|
47
47
|
getCalculatedColumnDataType(calculatedColumnQuery) {
|
|
48
48
|
try {
|
|
49
49
|
if (calculatedColumnQuery.AggregatedScalarExpression) {
|
|
50
|
-
// currently AggregatedScalarExpression support only numerical values
|
|
51
|
-
// TODO AFL try to derive the type from the aggregatedColumn?
|
|
52
|
-
// we definitely don't want to aggregate everything only to get the data type
|
|
53
50
|
return 'number';
|
|
54
51
|
}
|
|
55
52
|
let firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
|
|
@@ -80,7 +77,6 @@ export class CalculatedColumnExpressionService {
|
|
|
80
77
|
isCalculatedColumnQueryValid(calculatedColumnQuery) {
|
|
81
78
|
if (calculatedColumnQuery.ScalarExpression) {
|
|
82
79
|
try {
|
|
83
|
-
// TODO AFL add a cached validation for ScalarExpression, just like for all the other types
|
|
84
80
|
let firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
|
|
85
81
|
this.adaptableApi.internalApi
|
|
86
82
|
.getQueryLanguageService()
|
|
@@ -88,7 +84,6 @@ export class CalculatedColumnExpressionService {
|
|
|
88
84
|
return true;
|
|
89
85
|
}
|
|
90
86
|
catch (e) {
|
|
91
|
-
// no logging as this method is used only in the UI
|
|
92
87
|
return false;
|
|
93
88
|
}
|
|
94
89
|
}
|
|
@@ -96,7 +91,6 @@ export class CalculatedColumnExpressionService {
|
|
|
96
91
|
const validationResult = this.adaptableApi.expressionApi.isValidAggregatedScalarExpression(calculatedColumnQuery.AggregatedScalarExpression, CalculatedColumnModuleId);
|
|
97
92
|
return validationResult;
|
|
98
93
|
}
|
|
99
|
-
// if query has neither a ScalarExpression nor an AggregatedScalarExpression => it can only be false
|
|
100
94
|
return false;
|
|
101
95
|
}
|
|
102
96
|
evaluateCalculatedColumnQuery(calculatedColumn, rowNode) {
|
|
@@ -104,7 +98,6 @@ export class CalculatedColumnExpressionService {
|
|
|
104
98
|
if (this.adaptableApi.gridApi.isGroupRowNode(rowNode)) {
|
|
105
99
|
return undefined;
|
|
106
100
|
}
|
|
107
|
-
// no validation here, this function has to be as performant as possible
|
|
108
101
|
if (calculatedColumn?.Query?.ScalarExpression) {
|
|
109
102
|
return this.adaptableApi.internalApi
|
|
110
103
|
.getQueryLanguageService()
|
|
@@ -122,7 +115,6 @@ export class CalculatedColumnExpressionService {
|
|
|
122
115
|
}
|
|
123
116
|
}
|
|
124
117
|
createAggregatedScalarLiveValue(calculatedColumn) {
|
|
125
|
-
// if there is already an aggregated scalar, delete it (possible when editing)
|
|
126
118
|
this.destroyAggregatedScalarLiveValue(calculatedColumn);
|
|
127
119
|
if (calculatedColumn.Query?.AggregatedScalarExpression) {
|
|
128
120
|
try {
|
|
@@ -13,7 +13,6 @@ export class ChartingService {
|
|
|
13
13
|
case 'chartCreated':
|
|
14
14
|
const createParams = params;
|
|
15
15
|
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model?.chartId === createParams.chartId)) {
|
|
16
|
-
// chart already exists
|
|
17
16
|
}
|
|
18
17
|
else {
|
|
19
18
|
const chartModel = models.find((model) => model?.chartId === createParams.chartId);
|
|
@@ -23,7 +22,6 @@ export class ChartingService {
|
|
|
23
22
|
case 'chartOptionsChanged':
|
|
24
23
|
case 'chartRangeSelectionChanged':
|
|
25
24
|
if (!currentChartDefinition) {
|
|
26
|
-
// editing a non-saved chart
|
|
27
25
|
break;
|
|
28
26
|
}
|
|
29
27
|
const updatedChartDefinition = {
|
|
@@ -36,13 +34,6 @@ export class ChartingService {
|
|
|
36
34
|
this.api.internalApi.dispatchReduxAction(InternalRedux.ChartingSetCurrentChartModels(models));
|
|
37
35
|
this.emitAdaptableChartDefinitonChange();
|
|
38
36
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Emit events only for adaptable charting definition changes
|
|
41
|
-
* - an adaptable chart opens
|
|
42
|
-
* - an adaptable chart closes
|
|
43
|
-
* - an adaptable chart is created
|
|
44
|
-
* - an adaptable chart is deleted
|
|
45
|
-
*/
|
|
46
37
|
emitAdaptableChartDefinitonChange() {
|
|
47
38
|
const chartingOpenState = this.api.chartingApi.getChartingOpenState();
|
|
48
39
|
const chartChangedInfo = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Emitter from '../../Utilities/Emitter';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import Helper from '../Helpers/Helper';
|
|
4
|
-
// ~ 8 hours
|
|
5
4
|
const MAX_TIMEFRAME_SIZE = 86400000;
|
|
6
5
|
export class DataService {
|
|
7
6
|
adaptable;
|
|
@@ -58,16 +57,10 @@ export class DataService {
|
|
|
58
57
|
this.adaptable.api.eventApi.internalApi.fireRowChangedEvent(rowDataChangedInfo);
|
|
59
58
|
this.rowDataChangeLogSubject$.next(rowDataChangedInfo);
|
|
60
59
|
}
|
|
61
|
-
// we need this temporary "shared memory" because the value change and the AG Grid cellChanged event are asynchronous
|
|
62
|
-
// in the first phase we keep the undone change
|
|
63
60
|
logUndoChange(change) {
|
|
64
61
|
const { primaryKeyValue, column, oldValue, newValue } = change;
|
|
65
62
|
const undoChangeKey = this.getUndoChangeKey(primaryKeyValue, column.columnId, oldValue, newValue);
|
|
66
63
|
this.undoChangeLog.set(undoChangeKey, change);
|
|
67
|
-
// normally the extractUndoChange() should be executed right after this method
|
|
68
|
-
// just to be sure that no 'zombie' undo change remains here (if something goes wrong with the undo value change)
|
|
69
|
-
// we manually extract the change after a 2 seconds
|
|
70
|
-
// why 2 and not 3 or 1? no good reason, only seems like a reasonable waiting time :)
|
|
71
64
|
const UNDO_WAIT = 2000;
|
|
72
65
|
const timeoutId = setTimeout(() => {
|
|
73
66
|
this.adaptable.logger.warn(`Undo change was not handled within timeout: column="${change.column}", primaryKey="${change.primaryKeyValue}", from=${change.newValue} to=${change.oldValue}.`);
|
|
@@ -75,10 +68,8 @@ export class DataService {
|
|
|
75
68
|
}, UNDO_WAIT);
|
|
76
69
|
this.undoChangeTimers.set(undoChangeKey, timeoutId);
|
|
77
70
|
}
|
|
78
|
-
// in the second phase, when AG-Grid triggers the cellChange event, we check if it corresponds to an undone change
|
|
79
71
|
extractUndoChange(change) {
|
|
80
72
|
const { primaryKeyValue, column, oldValue, newValue } = change;
|
|
81
|
-
// this is post-undo, so we have to swap the new & old values
|
|
82
73
|
const undoChangeKey = this.getUndoChangeKey(primaryKeyValue, column.columnId, newValue, oldValue);
|
|
83
74
|
const result = this.undoChangeLog.get(undoChangeKey);
|
|
84
75
|
this.undoChangeLog.delete(undoChangeKey);
|
|
@@ -97,11 +88,9 @@ export class DataService {
|
|
|
97
88
|
});
|
|
98
89
|
}
|
|
99
90
|
extractDataChangeLogEntry(cellDataChangedInfo) {
|
|
100
|
-
// create rowData snapshot
|
|
101
91
|
const rowData = cellDataChangedInfo.rowData
|
|
102
92
|
? Helper.cloneObject(cellDataChangedInfo.rowData)
|
|
103
93
|
: null;
|
|
104
|
-
// strip down rowNode properties as it is pretty "heavy" on the memory
|
|
105
94
|
const rowNode = rowData ? { data: rowData } : null;
|
|
106
95
|
return {
|
|
107
96
|
...cellDataChangedInfo,
|
|
@@ -8,7 +8,6 @@ export class Fdc3Service {
|
|
|
8
8
|
uiControlsDefaultConfiguration;
|
|
9
9
|
constructor(adaptableApi) {
|
|
10
10
|
this.adaptableApi = adaptableApi;
|
|
11
|
-
// 1. Subscribe to FDC3 events
|
|
12
11
|
const adaptableHandleIntentFn = this.getFdc3Options().intents?.handleIntent;
|
|
13
12
|
const listenForIntents = this.getFdc3Options().intents?.listensFor ?? [];
|
|
14
13
|
if (listenForIntents.length) {
|
|
@@ -69,7 +68,6 @@ export class Fdc3Service {
|
|
|
69
68
|
.then((listener) => this.contextHandlerSubscriptions.push(listener));
|
|
70
69
|
});
|
|
71
70
|
}
|
|
72
|
-
// 2. Init UI Controls default configuration
|
|
73
71
|
this.uiControlsDefaultConfiguration = this.buildUiControlsDefaultConfiguration();
|
|
74
72
|
}
|
|
75
73
|
getUiControlsDefaultConfiguration() {
|
|
@@ -190,7 +188,6 @@ export class Fdc3Service {
|
|
|
190
188
|
};
|
|
191
189
|
return intentsMapping;
|
|
192
190
|
}, {});
|
|
193
|
-
// merge adaptable defaults with (optional) user provided configuration
|
|
194
191
|
return {
|
|
195
192
|
contexts: {
|
|
196
193
|
...adaptableDefaultContextIcons,
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
export const FLASHING_CELL_ROW_KEY = '__ROW';
|
|
2
|
-
/**
|
|
3
|
-
* This service manages Flashing Cells
|
|
4
|
-
*/
|
|
5
2
|
export class FlashingCellService {
|
|
6
3
|
api;
|
|
7
|
-
// map of rowPrimaryKey -> ColIdOrRowId -> FlashingCellUuid
|
|
8
4
|
gridCellsCurrentlyFlashing;
|
|
9
|
-
// map of FlashingCellUuid -> FlashingCell
|
|
10
5
|
flashingCellsMapping;
|
|
11
6
|
constructor(api) {
|
|
12
7
|
this.api = api;
|
|
@@ -37,7 +32,6 @@ export class FlashingCellService {
|
|
|
37
32
|
if (flashingCell.flashTarget === 'row' || flashingCell.flashTarget.includes('row')) {
|
|
38
33
|
columnIds.push(FLASHING_CELL_ROW_KEY);
|
|
39
34
|
}
|
|
40
|
-
// for high frequency rates, we might have multiple flashes for the same cell
|
|
41
35
|
if (this.gridCellsCurrentlyFlashing[rowPrimaryKey]) {
|
|
42
36
|
columnIds.forEach((colId) => {
|
|
43
37
|
if (this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId] === flashingCell.Uuid) {
|
|
@@ -21,11 +21,8 @@ export class ModuleService {
|
|
|
21
21
|
return module.isModuleEditable();
|
|
22
22
|
}
|
|
23
23
|
logMissingAgGridDepsInfos() {
|
|
24
|
-
// log missing core (required) AG Grid dependencies
|
|
25
24
|
const agGridModulesAdapter = this.adaptableApi.internalApi.getAgGridModulesAdapter();
|
|
26
25
|
if (agGridModulesAdapter.isAgGridModuleRegistered('AllEnterpriseModule')) {
|
|
27
|
-
// no need to check further if AllEnterprise is registered
|
|
28
|
-
// it may even trigger false positives (e.g. when using SSRM)
|
|
29
26
|
return;
|
|
30
27
|
}
|
|
31
28
|
const mandatoryAgGridModuleNames = agGridModulesAdapter.getMandatoryAgGridModuleNames();
|
|
@@ -34,7 +31,6 @@ export class ModuleService {
|
|
|
34
31
|
if (missingAgGridModuleNames.length) {
|
|
35
32
|
this.adaptableApi.consoleError(`Adaptable requires these AG Grid modules: ${missingAgGridModuleNames.join(', ')}. Please register them. See: ${AgGridRequiredModulesDocsLink}`);
|
|
36
33
|
}
|
|
37
|
-
// log optional missing AG Grid dependencies for all modules
|
|
38
34
|
this.getModuleCollection().forEach((adaptableModule) => {
|
|
39
35
|
adaptableModule.logMissingAgGridDepsInfos();
|
|
40
36
|
});
|
|
@@ -56,7 +52,6 @@ export class ModuleService {
|
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
54
|
});
|
|
59
|
-
// store Settings Panel items in Internal State as they never change and we often re-use
|
|
60
55
|
this.adaptableApi.internalApi.setSettingsPanelItems(settingsPanelItems);
|
|
61
56
|
}
|
|
62
57
|
createModuleButtonsForDashboardAndToolPanel() {
|
|
@@ -69,7 +64,6 @@ export class ModuleService {
|
|
|
69
64
|
}
|
|
70
65
|
}
|
|
71
66
|
});
|
|
72
|
-
// store Dashboard Buttons in Internal State as they never change l
|
|
73
67
|
this.adaptableApi.internalApi.setDashboardModuleButtons(moduleButtons);
|
|
74
68
|
}
|
|
75
69
|
getTeamSharingAction(adaptableModule) {
|
|
@@ -80,7 +74,6 @@ export class ModuleService {
|
|
|
80
74
|
return module.getTeamSharingAction();
|
|
81
75
|
}
|
|
82
76
|
getModuleById(adaptableModule) {
|
|
83
|
-
// @ts-ignore TODO: make modules generic
|
|
84
77
|
return this.getModuleCollection().get(adaptableModule);
|
|
85
78
|
}
|
|
86
79
|
getModuleInfoByModule(adaptableModule) {
|
|
@@ -184,6 +177,5 @@ export class ModuleService {
|
|
|
184
177
|
}
|
|
185
178
|
}
|
|
186
179
|
destroy() {
|
|
187
|
-
// TO DO
|
|
188
180
|
}
|
|
189
181
|
}
|
|
@@ -20,7 +20,6 @@ export class QueryLanguageService {
|
|
|
20
20
|
}
|
|
21
21
|
evaluateBooleanExpression(expression, module, rowNode, evalContext) {
|
|
22
22
|
if (expression == undefined) {
|
|
23
|
-
// should never happen, but just in case
|
|
24
23
|
this.adaptableApi.logError('QueryLanguageService.evaluateBooleanExpression was called with an undefined expression');
|
|
25
24
|
return false;
|
|
26
25
|
}
|
|
@@ -37,13 +36,12 @@ export class QueryLanguageService {
|
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
evaluateScalarExpression(expression, module, rowNode) {
|
|
40
|
-
// currently scalar and boolean expressions are evaluated the same
|
|
41
39
|
return this.evaluateBooleanExpression(expression, module, rowNode);
|
|
42
40
|
}
|
|
43
41
|
evaluateAggregatedScalarExpression(expression, module, getRowNodes) {
|
|
44
42
|
const aggregatedScalarFunctions = this.getModuleExpressionFunctionsMap(module).aggregatedScalarFunctions;
|
|
45
43
|
return parser.evaluate(expression, {
|
|
46
|
-
node: null,
|
|
44
|
+
node: null,
|
|
47
45
|
functions: aggregatedScalarFunctions,
|
|
48
46
|
evaluateCustomQueryVariable: this.evaluateCustomQueryVariable,
|
|
49
47
|
getRowNodes,
|
|
@@ -90,7 +88,6 @@ export class QueryLanguageService {
|
|
|
90
88
|
return result;
|
|
91
89
|
}
|
|
92
90
|
const force = config?.force ?? false;
|
|
93
|
-
// see if validation should be performed
|
|
94
91
|
if (!this.adaptableApi.optionsApi.getExpressionOptions().performExpressionValidation &&
|
|
95
92
|
!force) {
|
|
96
93
|
const result = { isValid: true, errorMessage: '' };
|
|
@@ -192,7 +189,6 @@ export class QueryLanguageService {
|
|
|
192
189
|
this.cacheAggregatedBooleanValidation.set(cacheKey, result);
|
|
193
190
|
return result;
|
|
194
191
|
}
|
|
195
|
-
// no exception,so everything seems to be fine
|
|
196
192
|
const result = { isValid: true, errorMessage: '' };
|
|
197
193
|
this.cacheAggregatedBooleanValidation.set(cacheKey, result);
|
|
198
194
|
return result;
|
|
@@ -230,7 +226,6 @@ export class QueryLanguageService {
|
|
|
230
226
|
this.cacheAggregatedScalarValidation.set(cacheKey, result);
|
|
231
227
|
return result;
|
|
232
228
|
}
|
|
233
|
-
// no exception,so everything seems to be fine
|
|
234
229
|
const result = { isValid: true, errorMessage: '' };
|
|
235
230
|
this.cacheAggregatedScalarValidation.set(cacheKey, result);
|
|
236
231
|
return result;
|
|
@@ -268,12 +263,9 @@ export class QueryLanguageService {
|
|
|
268
263
|
const columnFriendlyName = this.adaptableApi.columnApi.getFriendlyNameForColumnId(columnId);
|
|
269
264
|
result = result.split(columnId).join(columnFriendlyName);
|
|
270
265
|
});
|
|
271
|
-
// replace $SCOPE() with friendly name as well
|
|
272
266
|
result = result.split(`$SCOPE()`).join(`$Column_Scope`);
|
|
273
267
|
return result;
|
|
274
268
|
}
|
|
275
|
-
// Returns the ExpressionFunctions available for the given Module as specified in the `QueryLanguageOptions.moduleExpressionFunctions`
|
|
276
|
-
// if there are no specific functions defined, it falls back to the default values
|
|
277
269
|
getModuleExpressionFunctionsMap(module) {
|
|
278
270
|
const expressionOptions = this.adaptableApi.optionsApi.getExpressionOptions();
|
|
279
271
|
if (module) {
|
|
@@ -285,10 +277,7 @@ export class QueryLanguageService {
|
|
|
285
277
|
const generalBooleanExpressionFunctions = this.extractMappedExpressionFunctions(booleanExpressionFunctions, expressionOptions.systemBooleanFunctions, expressionOptions.customBooleanFunctions);
|
|
286
278
|
const generalScalarExpressionFunctions = this.extractMappedExpressionFunctions(scalarExpressionFunctions, expressionOptions.systemScalarFunctions, expressionOptions.customScalarFunctions);
|
|
287
279
|
const generalObservableExpressionFunctions = this.extractMappedExpressionFunctions(observableExpressionFunctions, expressionOptions.systemObservableFunctions);
|
|
288
|
-
const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions,
|
|
289
|
-
// right now the custom aggregated scalar functions are used in the aggregated boolean functions as well
|
|
290
|
-
// hopefully we'll simplify this in the future
|
|
291
|
-
this.getCustomAggregatedScalarFunctions());
|
|
280
|
+
const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions, this.getCustomAggregatedScalarFunctions());
|
|
292
281
|
const generalAggregatedScalarExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedScalarExpressionFunctions, expressionOptions.systemAggregatedScalarFunctions, this.getCustomAggregatedScalarFunctions());
|
|
293
282
|
if (!module) {
|
|
294
283
|
this.adaptableApi.logWarn(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
|
|
@@ -354,11 +343,9 @@ export class QueryLanguageService {
|
|
|
354
343
|
const groupByColumnIds = groupByParameter?.value;
|
|
355
344
|
const contextArgs = args.filter((arg) => {
|
|
356
345
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
357
|
-
// filter out aggregation column
|
|
358
346
|
return arg.value !== aggColumnId;
|
|
359
347
|
}
|
|
360
348
|
if (typeof arg === 'object' && arg.name === 'GROUP_BY') {
|
|
361
|
-
// filter out groupBy column
|
|
362
349
|
return false;
|
|
363
350
|
}
|
|
364
351
|
return true;
|
|
@@ -377,7 +364,6 @@ export class QueryLanguageService {
|
|
|
377
364
|
index: dataIndex,
|
|
378
365
|
rowNode,
|
|
379
366
|
args: contextArgs.map((arg) => {
|
|
380
|
-
// if col, replace with value
|
|
381
367
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
382
368
|
return getValueForColId(arg.value, rowNode);
|
|
383
369
|
}
|
|
@@ -414,7 +400,6 @@ export class QueryLanguageService {
|
|
|
414
400
|
aggregatedValue: aggregationValue,
|
|
415
401
|
...this.adaptableApi.internalApi.buildBaseContext(),
|
|
416
402
|
args: contextArgs.map((arg) => {
|
|
417
|
-
// if col, replace with value
|
|
418
403
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
419
404
|
return getValueForColId(arg.value, rowNode);
|
|
420
405
|
}
|
|
@@ -434,7 +419,6 @@ export class QueryLanguageService {
|
|
|
434
419
|
rowNode,
|
|
435
420
|
...this.adaptableApi.internalApi.buildBaseContext(),
|
|
436
421
|
args: contextArgs.map((arg) => {
|
|
437
|
-
// if col, replace with value
|
|
438
422
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
439
423
|
return getValueForColId(arg.value, rowNode);
|
|
440
424
|
}
|
|
@@ -473,16 +457,13 @@ export class QueryLanguageService {
|
|
|
473
457
|
})
|
|
474
458
|
: systemFunctions;
|
|
475
459
|
let generalExpressionFunctions = {};
|
|
476
|
-
// add system functions
|
|
477
460
|
if (Array.isArray(systemFunctionNames)) {
|
|
478
|
-
// add only system functions specified by user
|
|
479
461
|
systemFunctionNames.forEach((systemFunctionName) => {
|
|
480
462
|
generalExpressionFunctions[systemFunctionName] =
|
|
481
463
|
availableExpressionFunctions[systemFunctionName];
|
|
482
464
|
});
|
|
483
465
|
}
|
|
484
466
|
else {
|
|
485
|
-
// add ALL system functions
|
|
486
467
|
generalExpressionFunctions = { ...availableExpressionFunctions };
|
|
487
468
|
}
|
|
488
469
|
const customFunctionDefinitions = typeof customFunctions === 'function'
|
|
@@ -518,7 +499,6 @@ export class QueryLanguageService {
|
|
|
518
499
|
getNodesFromExpression(input, nodeType) {
|
|
519
500
|
try {
|
|
520
501
|
const resultSet = new Set();
|
|
521
|
-
// @ts-ignore
|
|
522
502
|
const walk = (node) => {
|
|
523
503
|
if (typeof node !== 'object') {
|
|
524
504
|
return false;
|
|
@@ -547,9 +527,6 @@ export class QueryLanguageService {
|
|
|
547
527
|
if (!queryNodes.length) {
|
|
548
528
|
return;
|
|
549
529
|
}
|
|
550
|
-
// circular QUERY references can only be detected by actually evaluating the expression
|
|
551
|
-
// we just evaluate against the first row, as we don't care about the result, just about
|
|
552
|
-
// whether an exception is thrown
|
|
553
530
|
const firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
|
|
554
531
|
queryNodes.forEach((queryNode) => {
|
|
555
532
|
this.evaluateBooleanExpression(`QUERY("${queryNode}")`, module, firstRowNode);
|
|
@@ -6,9 +6,6 @@ import { AggregatedScalarLiveValue } from './AggregatedScalarLiveValue';
|
|
|
6
6
|
import { isObjectEmpty } from '../Extensions/ObjectExtensions';
|
|
7
7
|
import { throttle } from '../Helpers/TimingHelper';
|
|
8
8
|
import { isEqual } from '../Extensions/ObjectExtensions';
|
|
9
|
-
/**
|
|
10
|
-
* The logic is extracted here to make it easier to follow
|
|
11
|
-
*/
|
|
12
9
|
export class RowSummaryService {
|
|
13
10
|
api;
|
|
14
11
|
cachedCellSummary = new Map();
|
|
@@ -21,11 +18,9 @@ export class RowSummaryService {
|
|
|
21
18
|
this.rowSummariesSubscriptions();
|
|
22
19
|
}
|
|
23
20
|
rowSummariesSubscriptions() {
|
|
24
|
-
// return;
|
|
25
21
|
if (this.api.isDestroyed()) {
|
|
26
22
|
return;
|
|
27
23
|
}
|
|
28
|
-
// Currently not available for serverside model
|
|
29
24
|
if (!this.api.layoutApi.internalApi.getLayoutSupportedFeatures().RowSummaries) {
|
|
30
25
|
return;
|
|
31
26
|
}
|
|
@@ -45,18 +40,15 @@ export class RowSummaryService {
|
|
|
45
40
|
});
|
|
46
41
|
});
|
|
47
42
|
this.api.eventApi.on('LayoutChanged', (event) => {
|
|
48
|
-
// exclude filter events, those are handled in another event
|
|
49
43
|
if (event.actionName.includes('FILTER')) {
|
|
50
44
|
return;
|
|
51
45
|
}
|
|
52
46
|
setTimeout(() => {
|
|
53
|
-
// the timeout is added so the grid has time to repond to the layout changed
|
|
54
47
|
this.throttledEvaluateRowSummary();
|
|
55
48
|
}, 16);
|
|
56
49
|
});
|
|
57
50
|
const adaptable = this.api.internalApi.getAdaptableInstance();
|
|
58
51
|
adaptable._on('AdapTableFiltersApplied', () => {
|
|
59
|
-
// we need to use this instead of layout changed so the rows have time to update
|
|
60
52
|
this.throttledEvaluateRowSummary();
|
|
61
53
|
});
|
|
62
54
|
adaptable._on('FirstDataRendered', () => {
|
|
@@ -70,10 +62,6 @@ export class RowSummaryService {
|
|
|
70
62
|
}
|
|
71
63
|
this._throttledEvaluateRowSummary(reason);
|
|
72
64
|
}
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @param colId optional to evaluate only one column
|
|
76
|
-
*/
|
|
77
65
|
_throttledEvaluateRowSummary = throttle(this.evaluateRowSummary, 300);
|
|
78
66
|
evaluateRowSummary(reason) {
|
|
79
67
|
if (this._throttleAcumulatedColumnsThatChanged.size > 0) {
|
|
@@ -88,11 +76,7 @@ export class RowSummaryService {
|
|
|
88
76
|
}
|
|
89
77
|
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
90
78
|
let previousLayout = this.previousLayout;
|
|
91
|
-
// it is added here to be sure it is saved
|
|
92
79
|
this.previousLayout = currentLayout;
|
|
93
|
-
/**
|
|
94
|
-
* If the previous & current layout does not have row summaries, it is safe to exit
|
|
95
|
-
*/
|
|
96
80
|
if (isObjectEmpty(currentLayout?.RowSummaries) && isObjectEmpty(previousLayout?.RowSummaries)) {
|
|
97
81
|
return;
|
|
98
82
|
}
|
|
@@ -104,9 +88,7 @@ export class RowSummaryService {
|
|
|
104
88
|
const rowSummariesResults = rowSummaries
|
|
105
89
|
.filter((rowSummary) => !rowSummary.IsSuspended)
|
|
106
90
|
.map((rowSummary, index) => {
|
|
107
|
-
const { ColumnsMap, Position,
|
|
108
|
-
// it defaults to true
|
|
109
|
-
IncludeOnlyFilteredRows = true, } = rowSummary;
|
|
91
|
+
const { ColumnsMap, Position, IncludeOnlyFilteredRows = true, } = rowSummary;
|
|
110
92
|
return {
|
|
111
93
|
Position,
|
|
112
94
|
RowData: Object.entries(ColumnsMap ?? {}).reduce((acc, [columnId, expression]) => {
|
|
@@ -117,7 +99,6 @@ export class RowSummaryService {
|
|
|
117
99
|
let expressionLiveValue = this.cachedCellSummary.get(key);
|
|
118
100
|
if (expressionLiveValue) {
|
|
119
101
|
if (!reason) {
|
|
120
|
-
// refresh all of them
|
|
121
102
|
expressionLiveValue.refresh();
|
|
122
103
|
}
|
|
123
104
|
else if ('columnIds' in reason && reason.columnIds.includes(columnId)) {
|
|
@@ -8,7 +8,6 @@ export class TeamSharingService {
|
|
|
8
8
|
this.adaptableApi = adaptableApi;
|
|
9
9
|
const teamSharingOptions = adaptableApi.optionsApi.getTeamSharingOptions();
|
|
10
10
|
if (teamSharingOptions.updateInterval > 0) {
|
|
11
|
-
// convert minutes to millis
|
|
12
11
|
const updateInterval = teamSharingOptions.updateInterval * 60000;
|
|
13
12
|
this.updateCheckTimerId = setInterval(() => {
|
|
14
13
|
this.adaptableApi.teamSharingApi.checkForUpdates();
|
|
@@ -44,7 +43,6 @@ export class TeamSharingService {
|
|
|
44
43
|
updateActiveSharedEntity(changedAdaptableObject, userName, sharedEntities) {
|
|
45
44
|
let activeSharedEntity = sharedEntities.find((sharedEntity) => sharedEntity.Type === 'Active' && sharedEntity.Entity.Uuid === changedAdaptableObject.Uuid);
|
|
46
45
|
if (!activeSharedEntity) {
|
|
47
|
-
// shared entity may have been removed in the meantime
|
|
48
46
|
return [sharedEntities, []];
|
|
49
47
|
}
|
|
50
48
|
activeSharedEntity = {
|
|
@@ -54,16 +52,13 @@ export class TeamSharingService {
|
|
|
54
52
|
ChangedBy: userName,
|
|
55
53
|
Revision: activeSharedEntity.Revision + 1,
|
|
56
54
|
};
|
|
57
|
-
// update EntityDependencyIds (references may have been removed or new ones added)
|
|
58
55
|
const updatedEntityDependencyIds = [];
|
|
59
56
|
const currentEntityDependencies = this.getSharedEntityDependencies(activeSharedEntity, sharedEntities);
|
|
60
57
|
const newTeamSharingReferences = this.getTeamSharingReferences(changedAdaptableObject, activeSharedEntity.Module);
|
|
61
58
|
const newReferenceAdaptableObjectIds = newTeamSharingReferences.map((reference) => reference.Reference.Uuid);
|
|
62
|
-
// 1. add all the existing dependencies which are still referenced
|
|
63
59
|
updatedEntityDependencyIds.push(...currentEntityDependencies
|
|
64
60
|
.filter((entityDependency) => newReferenceAdaptableObjectIds.includes(entityDependency.Entity.Uuid))
|
|
65
61
|
.map((entity) => entity.Uuid));
|
|
66
|
-
// 2. check if there are new references which are not yet shared
|
|
67
62
|
const freshReferences = newTeamSharingReferences.filter((reference) => !currentEntityDependencies
|
|
68
63
|
.map((entityDependency) => entityDependency.Entity.Uuid)
|
|
69
64
|
.includes(reference.Reference.Uuid));
|
|
@@ -83,7 +78,6 @@ export class TeamSharingService {
|
|
|
83
78
|
}
|
|
84
79
|
buildSharedEntityImportActions(importedSharedEntity) {
|
|
85
80
|
let configOverwriteNeedsConfirmation = false;
|
|
86
|
-
// either ADD or EDIT(in which case the user will need to confirm the overwrite)
|
|
87
81
|
const getSharedEntityImportAction = (sharedEntity) => {
|
|
88
82
|
const { Module, Entity } = sharedEntity;
|
|
89
83
|
const importInfo = this.adaptableApi.internalApi
|
|
@@ -209,7 +203,6 @@ export class TeamSharingService {
|
|
|
209
203
|
clearTimeout(this.updateCheckTimerId);
|
|
210
204
|
}
|
|
211
205
|
createSharedEntity(adaptableObject, module, configuration, sharingUserName, sharingTimestamp, createdSharedEntities) {
|
|
212
|
-
// create main shared entity
|
|
213
206
|
const mainSharedEntity = {
|
|
214
207
|
EntityType: 'adaptableEntity',
|
|
215
208
|
Uuid: createUuid(),
|
|
@@ -224,29 +217,21 @@ export class TeamSharingService {
|
|
|
224
217
|
Revision: 1,
|
|
225
218
|
Type: configuration.type,
|
|
226
219
|
};
|
|
227
|
-
// load all dependencies (special cols, shared queries etc)
|
|
228
220
|
const teamSharingDependencies = this.getTeamSharingReferences(adaptableObject, module);
|
|
229
|
-
// for every dependency, create recursively the corresponding shared entities
|
|
230
221
|
teamSharingDependencies.forEach((teamSharingDependency) => {
|
|
231
222
|
const sharedEntityDependency = this.createSharedEntity(teamSharingDependency.Reference, teamSharingDependency.Module, configuration, sharingUserName, sharingTimestamp, createdSharedEntities);
|
|
232
|
-
// update dependency IDs for the main shared entity
|
|
233
223
|
mainSharedEntity.EntityDependencyIds.push(sharedEntityDependency.Uuid);
|
|
234
224
|
});
|
|
235
|
-
// add main shared entity to the accumulator
|
|
236
225
|
createdSharedEntities.push(mainSharedEntity);
|
|
237
226
|
return mainSharedEntity;
|
|
238
227
|
}
|
|
239
|
-
// returns the given rootSharedEntity with all its unique dependencies in their dependency order
|
|
240
228
|
getSharedEntityDependencyTree(rootSharedEntity, allSharedEntities) {
|
|
241
|
-
// using a map to handle the case where a SharedEntity occurs multiple times in the dependency tree
|
|
242
229
|
const result = new Map();
|
|
243
230
|
result.set(rootSharedEntity.Uuid, rootSharedEntity);
|
|
244
231
|
rootSharedEntity.EntityDependencyIds.forEach((dependencyId) => {
|
|
245
232
|
const dependencySharedEntity = allSharedEntities.find((sharedEntity) => sharedEntity.Uuid === dependencyId);
|
|
246
|
-
// check for zombie dependencies (possible if state is inconsistent due to dirty reads)
|
|
247
233
|
if (dependencySharedEntity) {
|
|
248
234
|
this.getSharedEntityDependencyTree(dependencySharedEntity, allSharedEntities).forEach((childDependency) => {
|
|
249
|
-
// check if this dependency is not already present in the dependency tree
|
|
250
235
|
if (!result.has(childDependency.Uuid)) {
|
|
251
236
|
result.set(childDependency.Uuid, childDependency);
|
|
252
237
|
}
|
|
@@ -7,7 +7,6 @@ export class ThemeService {
|
|
|
7
7
|
this.subscribe();
|
|
8
8
|
if (!this.styleSheetObject) {
|
|
9
9
|
this.styleSheetObject = new CSSStyleSheet();
|
|
10
|
-
// ts does not know about adoptedStyleSheets
|
|
11
10
|
document.adoptedStyleSheets = [
|
|
12
11
|
...(document.adoptedStyleSheets ?? []),
|
|
13
12
|
this.styleSheetObject,
|
|
@@ -31,8 +30,6 @@ export class ThemeService {
|
|
|
31
30
|
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
32
31
|
currentTheme = this.mapOsTheme(currentTheme);
|
|
33
32
|
this.applyNewThemeVariables(currentTheme);
|
|
34
|
-
// this needs to be called after variables are set
|
|
35
|
-
// as it may show the warning for a custom/runtime theme
|
|
36
33
|
this.showMissingThemeFiles(currentTheme);
|
|
37
34
|
};
|
|
38
35
|
applyNewThemeVariables(theme) {
|
|
@@ -52,8 +49,6 @@ export class ThemeService {
|
|
|
52
49
|
this.styleSheetObject.replaceSync(str);
|
|
53
50
|
}
|
|
54
51
|
showMissingThemeFiles(theme) {
|
|
55
|
-
// run time defined theme
|
|
56
|
-
// because it may be an empty theme
|
|
57
52
|
if (theme.Source === 'User') {
|
|
58
53
|
return;
|
|
59
54
|
}
|
|
@@ -77,7 +72,6 @@ export class ThemeService {
|
|
|
77
72
|
logger.consoleWarn(`Theme "${themeName}" does not appear to be loaded. Ensure the CSS file is imported, e.g.: import "@adaptabletools/adaptable/themes/${themeName}.css".`);
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
|
-
// prefers-color-scheme
|
|
81
75
|
getDOMPrefferedColorScheme() {
|
|
82
76
|
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
83
77
|
}
|
|
@@ -91,7 +85,6 @@ export class ThemeService {
|
|
|
91
85
|
}
|
|
92
86
|
attachPrefferedColorSchemeListener() {
|
|
93
87
|
const handlePrefferedColorSchemeChange = () => {
|
|
94
|
-
// we need to reapply the theme
|
|
95
88
|
const currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
96
89
|
if (currentTheme.Name === 'os') {
|
|
97
90
|
this.api.themeApi.applyCurrentTheme();
|