All files / app app.config.ts

0% Statements 0/27
100% Branches 0/0
0% Functions 0/2
0% Lines 0/26

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61                                                                                                                         
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http"
import { ApplicationConfig, APP_INITIALIZER } from "@angular/core"
import { provideStore } from "@ngrx/store"
import { provideEffects } from "@ngrx/effects"
import { appReducers, setStateMiddleware } from "app/codeCharta/state/store/state.manager"
import { UnfocusNodesEffect } from "app/codeCharta/state/effects/unfocusNodes/unfocusNodes.effect"
import { AddBlacklistItemsIfNotResultsInEmptyMapEffect } from "app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/addBlacklistItemsIfNotResultsInEmptyMap.effect"
import { VersionService } from "app/codeCharta/services/version/version.service"
import { provideAnimationsAsync } from "@angular/platform-browser/animations/async"
import { AutoFitCodeMapEffect } from "app/codeCharta/state/effects/autoFitCodeMapChange/autoFitCodeMap.effect"
import { LinkColorMetricToHeightMetricEffect } from "app/codeCharta/state/effects/linkColorMetricToHeightMetric/linkColorMetricToHeightMetric.effect"
import { OpenNodeContextMenuEffect } from "app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect"
import { RenderCodeMapEffect } from "app/codeCharta/state/effects/renderCodeMapEffect/renderCodeMap.effect"
import { ResetChosenMetricsEffect } from "app/codeCharta/state/effects/resetChosenMetrics/resetChosenMetrics.effect"
import { ResetSelectedEdgeMetricWhenItDoesntExistAnymoreEffect } from "app/codeCharta/state/effects/resetSelectedEdgeMetricWhenItDoesntExistAnymore/resetSelectedEdgeMetricWhenItDoesntExistAnymore.effect"
import { SaveCcStateEffect } from "app/codeCharta/state/effects/saveCcState/saveCcState.effect"
import { SetLoadingIndicatorEffect } from "app/codeCharta/state/effects/setLoadingIndicator/setLoadingIndicator.effect"
import { UpdateEdgePreviewsEffect } from "app/codeCharta/state/effects/updateEdgePreviews/updateEdgePreviews.effect"
import { UpdateFileSettingsEffect } from "app/codeCharta/state/effects/updateFileSettings/updateFileSettings.effect"
import { UpdateMapColorsEffect } from "app/codeCharta/state/effects/updateMapColors/updateMapColors.effect"
import { UpdateQueryParametersEffect } from "app/codeCharta/state/effects/updateQueryParameters/updateQueryParameters.effect"
import { UpdateVisibleTopLabelsEffect } from "app/codeCharta/state/effects/updateVisibleTopLabels/updateVisibleTopLabels.effect"
import { ResetColorRangeEffect } from "app/codeCharta/state/store/dynamicSettings/colorRange/resetColorRange.effect"
import { BlacklistSearchPatternEffect } from "app/codeCharta/ui/ribbonBar/searchPanel/searchBar/blacklistSearchPattern.effect"
 
export const appConfig: ApplicationConfig = {
    providers: [
        provideAnimationsAsync(),
        provideHttpClient(withInterceptorsFromDi()),
 
        provideStore(appReducers, { metaReducers: [setStateMiddleware] }),
 
        provideEffects([
            UnfocusNodesEffect,
            AddBlacklistItemsIfNotResultsInEmptyMapEffect,
            OpenNodeContextMenuEffect,
            BlacklistSearchPatternEffect,
            ResetColorRangeEffect,
            ResetChosenMetricsEffect,
            UpdateEdgePreviewsEffect,
            RenderCodeMapEffect,
            AutoFitCodeMapEffect,
            UpdateVisibleTopLabelsEffect,
            LinkColorMetricToHeightMetricEffect,
            ResetSelectedEdgeMetricWhenItDoesntExistAnymoreEffect,
            UpdateFileSettingsEffect,
            SetLoadingIndicatorEffect,
            SaveCcStateEffect,
            UpdateQueryParametersEffect,
            UpdateMapColorsEffect
        ]),
 
        {
            provide: APP_INITIALIZER,
            useFactory: (versionService: VersionService) => () => versionService.synchronizeLocalCodeChartaVersion(),
            deps: [VersionService],
            multi: true
        }
    ]
}