Permalink
Browse files

fix: fix cyclic deps (#588)

* fix: fix cyclic deps

* refactor: update store exports

* chore(package): update deps

* refactor: refactor shared module

* fix: fix remaining cyclic deps
  • Loading branch information...
Burak Tasci
Burak Tasci committed Nov 30, 2018
1 parent 59a2774 commit 632e79dd05128644cf63f35d04fbe3fa2a7947bf
Showing with 178 additions and 176 deletions.
  1. +14 −14 package.json
  2. +1 −1 src/app/+about/about-apple-pear.component.ts
  3. +1 −1 src/app/+about/about-banana.component.ts
  4. +1 −1 src/app/+about/about-us.component.ts
  5. +1 −1 src/app/+about/about.component.ts
  6. +1 −2 src/app/+air-universal/airline/airline-detail/airline-detail-container.component.ts
  7. +1 −2 src/app/+air-universal/airline/airline.component.ts
  8. +1 −1 src/app/+home/home.component.ts
  9. +1 −1 src/app/+secure/secure.component.ts
  10. +2 −2 src/app/framework/analytics/analytics.service.ts
  11. +2 −2 src/app/framework/analytics/index.ts
  12. +1 −1 src/app/framework/auth/testing/index.ts
  13. +4 −2 src/app/framework/core/base-container.component.ts
  14. +7 −7 src/app/framework/core/index.ts
  15. +1 −1 src/app/framework/core/testing/index.ts
  16. +1 −1 src/app/framework/http/index.ts
  17. +1 −1 src/app/framework/http/testing/index.ts
  18. +2 −2 src/app/framework/i18n/change-language.component.ts
  19. +1 −1 src/app/framework/i18n/i18n.service.ts
  20. +2 −4 src/app/framework/i18n/index.ts
  21. +0 −11 src/app/framework/i18n/models/language.ts
  22. +1 −1 src/app/framework/i18n/testing/index.ts
  23. +1 −1 src/app/framework/material/index.ts
  24. +1 −3 src/app/framework/ngrx/base-entity.service.ts
  25. +2 −0 src/app/framework/ngrx/constants.ts
  26. +5 −4 src/app/framework/ngrx/index.ts
  27. +4 −3 src/app/framework/ngrx/testing/index.ts
  28. +1 −0 src/app/framework/ngrx/testing/mocks/resource.mock.ts
  29. +1 −1 src/app/framework/router/testing/index.ts
  30. +3 −3 src/app/framework/store/i18n/index.ts
  31. +1 −1 src/app/framework/store/i18n/language/language.effects.spec.ts
  32. +11 −1 src/app/framework/store/i18n/language/language.model.ts
  33. +1 −1 src/app/framework/store/i18n/language/language.selectors.spec.ts
  34. +1 −4 src/app/framework/store/i18n/language/language.state.ts
  35. +1 −1 src/app/framework/store/i18n/language/testing/common.ts
  36. +1 −1 src/app/framework/store/index.ts
  37. +1 −1 src/app/framework/store/state.ts
  38. +2 −2 src/app/framework/store/store.module.ts
  39. +2 −2 src/app/framework/testing/index.ts
  40. +1 −2 src/app/layout/header.component.ts
  41. +1 −1 src/app/login/login.component.ts
  42. 0 src/app/{app.animations.ts → shared/animations.ts}
  43. +0 −3 src/app/shared/constants.ts
  44. +4 −5 src/app/shared/data-table/index.ts
  45. +10 −8 src/app/shared/index.ts
  46. +2 −2 src/app/store/air-universal/airline/testing/index.ts
  47. +2 −2 src/app/store/air-universal/index.ts
  48. +2 −2 src/app/store/index.ts
  49. +4 −1 src/app/store/state.ts
  50. +2 −2 src/app/store/store.module.ts
  51. +8 −3 tsconfig.spec.json
  52. +56 −56 yarn.lock
@@ -44,15 +44,15 @@
"express": "~4.16.4",
"debug": "~4.1.0",
"compression": "~1.7.3",
"@angular/animations": "~7.1.0",
"@angular/common": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/http": "~7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/platform-server": "~7.1.0",
"@angular/router": "~7.1.0",
"@angular/animations": "~7.1.1",
"@angular/common": "~7.1.1",
"@angular/core": "~7.1.1",
"@angular/forms": "~7.1.1",
"@angular/http": "~7.1.1",
"@angular/platform-browser": "~7.1.1",
"@angular/platform-browser-dynamic": "~7.1.1",
"@angular/platform-server": "~7.1.1",
"@angular/router": "~7.1.1",
"@angular/cdk": "~7.1.0",
"@angular/material": "~7.1.0",
"@angular/flex-layout": "7.0.0-beta.19",
@@ -81,14 +81,14 @@
"@ngx-translate/http-loader": "~4.0.0",
"@ngx-meta/core": "~6.0.0",
"unionize": "~2.1.2",
"angulartics2": "~7.2.0",
"angulartics2": "~7.2.1",
"ngx-perfect-scrollbar": "~7.1.0"
},
"devDependencies": {
"@angular/cli": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/compiler-cli": "~7.1.0",
"@angular/language-service": "~7.1.0",
"@angular/compiler": "~7.1.1",
"@angular/compiler-cli": "~7.1.1",
"@angular/language-service": "~7.1.1",
"@angular-devkit/build-angular": "~0.11.0",
"@angular-devkit/core": "~7.1.0",
"@angular-devkit/schematics": "~7.1.0",
@@ -99,7 +99,7 @@
"@ngrx/store-devtools": "~6.1.2",
"@types/compression": "~0.0.36",
"@types/express": "~4.16.0",
"@types/jest": "~23.3.9",
"@types/jest": "~23.3.10",
"@types/lodash": "~4.14.118",
"@types/nightmare": "~2.10.4",
"@types/node": "~10.12.10",
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './about-apple-pear.component.html',
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './about-banana.component.html',
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './about-us.component.html',
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './about.component.html',
@@ -13,9 +13,8 @@ import { MetaService } from '@ngx-meta/core';
// app
import { BaseContainerComponent } from '~/app/framework/core';
import { UniqueId } from '~/app/framework/ngrx';
import { RenderFlag } from '~/app/shared';
import { RenderFlag, routeAnimation } from '~/app/shared';
import { Airline, airlineActions, AirlineSelectors, State } from '~/app/store';
import { routeAnimation } from '~/app/app.animations';

@Component({
templateUrl: './airline-detail-container.component.html',
@@ -9,9 +9,8 @@ import { select, Store } from '@ngrx/store';
// app
import { BaseContainerComponent } from '~/app/framework/core';
import { createColumn, createOptions, createRouteButton, DataTable } from '~/app/shared/data-table';
import { Scrollable } from '~/app/shared';
import { routeAnimation, Scrollable } from '~/app/shared';
import { Airline, airlineActions, AirlineSelectors, State } from '~/app/store';
import { routeAnimation } from '~/app/app.animations';

@Component({
templateUrl: './airline.component.html',
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './home.component.html',
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

// app
import { BaseComponent } from '~/app/framework/core';
import { routeAnimation } from '~/app/app.animations';
import { routeAnimation } from '~/app/shared';

@Component({
templateUrl: './secure.component.html',
@@ -5,13 +5,13 @@ import { Inject, Injectable } from '@angular/core';
import { extend } from 'lodash/fp';
import { Angulartics2 } from 'angulartics2';

export interface AnalyticsProperties {
interface AnalyticsProperties {
category?: string;
label?: string;
value?: number;
}

export interface IAnalytics {
interface IAnalytics {
track(action: string, properties: AnalyticsProperties): void;
}

@@ -1,2 +1,2 @@
export { Analytics, AnalyticsService } from './analytics.service';
export { ANALYTICS_PROVIDERS, AnalyticsModule } from './analytics.module';
export * from './analytics.service';
export * from './analytics.module';
@@ -1 +1 @@
export { AuthTestingModule } from './auth-testing.module';
export * from './auth-testing.module';
@@ -5,9 +5,11 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Observable } from 'rxjs';
import { Store } from '@ngrx/store';

// app
import { FrameworkState } from '~/app/framework/store';

// module
import { BaseComponent } from './base.component';
import { State } from '~/app/store';

@Component({
template: '',
@@ -17,7 +19,7 @@ export class BaseContainerComponent extends BaseComponent {
error$: Observable<string>;
isProcessing$: Observable<boolean>;

constructor(protected readonly store$: Store<State>) {
constructor(protected readonly store$: Store<FrameworkState>) {
super();
}
}
@@ -1,7 +1,7 @@
export { BaseComponent } from './base.component';
export { BaseContainerComponent } from './base-container.component';
export { ConsoleService } from './console.service';
export { LogService } from './log.service';
export { WindowService } from './window.service';
export { CoreModule, configFactory, metaFactory } from './core.module';
export { APP_LAYOUT_CONFIG, SharedModule } from './shared.module';
export * from './base.component';
export * from './base-container.component';
export * from './console.service';
export * from './log.service';
export * from './window.service';
export * from './core.module';
export * from './shared.module';
@@ -1,2 +1,2 @@
export { MockWindowFrench, MockWindowNoLanguage } from './mocks/window.mock';
export { CoreTestingModule } from './core-testing.module';
export * from './core-testing.module';
@@ -1 +1 @@
export { HttpInterceptorModule } from './http-interceptor.module';
export * from './http-interceptor.module';
@@ -1 +1 @@
export { MockService } from './mocks/service.mock';
export * from './mocks/service.mock';
@@ -8,15 +8,15 @@ import { Store } from '@ngrx/store';

// app
import { BaseComponent } from '~/app/framework/core';
import { languageActions, State } from '~/app/framework/store';
import { FrameworkState, languageActions } from '~/app/framework/store';

@Component({
selector: 'i18n-change-language',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ChangeLanguageComponent extends BaseComponent implements OnInit {
constructor(private readonly store$: Store<State>,
constructor(private readonly store$: Store<FrameworkState>,
private readonly route: ActivatedRoute,
private readonly router: Router) {
super();
@@ -8,10 +8,10 @@ import { isEmpty } from 'lodash/fp';
// app
import { Analytics, AnalyticsService } from '~/app/framework/analytics';
import { WindowService } from '~/app/framework/core';
import { Language } from '~/app/framework/store';

// module
import { CATEGORY } from './models/category';
import { Language } from './models/language';

@Injectable()
export class I18NService extends Analytics {
@@ -1,4 +1,2 @@
export { initialLanguage, Language } from './models/language';
export { ChangeLanguageComponent } from './change-language.component';
export { I18NService } from './i18n.service';
export { I18NModule, translateFactory } from './i18n.module';
export * from './change-language.component';
export * from './i18n.module';

This file was deleted.

Oops, something went wrong.
@@ -1 +1 @@
export { I18NTestingModule } from './i18n-testing.module';
export * from './i18n-testing.module';
@@ -1 +1 @@
export { MaterialModule } from './material.module';
export * from './material.module';
@@ -7,11 +7,9 @@ import { retry } from 'rxjs/operators';
import { flow } from 'lodash/fp';
import { ConfigService } from '@ngx-config/core';

// app
import { HTTP_CLIENT__MAX_RETRIES } from '~/app/shared';

// module
import { BaseDocument, UniqueId } from './models/base-document';
import { HTTP_CLIENT__MAX_RETRIES } from './constants';

export abstract class BaseEntityService<T extends BaseDocument> {
protected constructor(protected readonly config: ConfigService,
@@ -0,0 +1,2 @@
// HTTP client
export const HTTP_CLIENT__MAX_RETRIES = 3;
@@ -1,4 +1,5 @@
export { BaseDocument, EMPTY_UNIQUE_ID, UniqueId } from './models/base-document';
export { BaseEntityService } from './base-entity.service';
export { entityErrorFn, entityReducer, entityStartProcessingFn, entityStopProcessingFn, entityResetFn } from './entity-reducer.util';
export { errorFn, startProcessingFn, stopProcessingFn } from './reducer.util';
export * from './models/base-document';
export * from './base-entity.service';
export * from './constants';
export * from './entity-reducer.util';
export * from './reducer.util';
@@ -1,3 +1,4 @@
export { MockEntityService } from './mocks/entity-service.mock';
export { NgrxTestingModule } from './ngrx-testing.module';
export { getState } from './state.util';
export * from './mocks/entity-service.mock';
export * from './mocks/resource.mock';
export * from './ngrx-testing.module';
export * from './state.util';
@@ -0,0 +1 @@
export type MockResource = any;
@@ -1 +1 @@
export { RouterTestingModule } from './router-testing.module';
export * from './router-testing.module';
@@ -2,8 +2,8 @@
import * as LanguageSelectors from './language/language.selectors';

export { languageActions } from './language/language.actions';
export { Language } from './language/language.model';
export * from './language/language.model';
export { LanguageSelectors };

export { I18NModule } from './i18n.module';
export { State } from './i18n.state';
export { I18NModule as I18NStoreModule } from './i18n.module';
export { State as I18NState } from './i18n.state';
@@ -15,10 +15,10 @@ import { t } from '~/app/framework/testing';

// app
import { AnalyticsModule } from '~/app/framework/analytics';
import { I18NService } from '~/app/framework/i18n';
import { languageActions } from '~/app/framework/store';

// module
import { I18NService } from '../../../i18n/i18n.service';
import { LanguageEffects } from './language.effects';

const testModuleConfig = () => {
@@ -1 +1,11 @@
export { Language } from '~/app/framework/i18n';
export interface Language {
code: string;
name: string;
culture: string;
}

export const initialLanguage: Language = {
code: '',
name: '',
culture: ''
};
@@ -3,7 +3,7 @@ import { t } from '~/app/framework/testing';
import { MOCK_LANGUAGE } from './testing';

// app
import { initialLanguage } from '~/app/framework/i18n';
import { initialLanguage } from '~/app/framework/store';

// module
import { getError, getIsProcessing, getWorkingLanguage } from './language.selectors';
@@ -1,8 +1,5 @@
// app
import { initialLanguage } from '~/app/framework/i18n';

// module
import { Language } from './language.model';
import { initialLanguage, Language } from './language.model';

export const LANGUAGE = 'i18n--language';

@@ -1,4 +1,4 @@
// app
import { initialLanguage } from '~/app/framework/i18n';
import { initialLanguage } from '~/app/framework/store';

export const MOCK_LANGUAGE = initialLanguage;
@@ -1,3 +1,3 @@
export * from './i18n';
export { State } from './state';
export { State as FrameworkState } from './state';
export { StoreModule as StoreFrameworkModule } from './store.module';
@@ -1,5 +1,5 @@
// module
import { State as I18NState } from './i18n';
import { I18NState } from './i18n';

export interface State {
i18n: I18NState;
@@ -3,12 +3,12 @@ import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core
import { CommonModule } from '@angular/common';

// module
import { I18NModule } from './i18n';
import { I18NStoreModule } from './i18n';

@NgModule({
imports: [
CommonModule,
I18NModule
I18NStoreModule
]
})
export class StoreModule {
@@ -3,5 +3,5 @@ import { ngJest } from './shorthand/ng-jest';

export const t = ngJest;

export { MockComponent } from './mocks/component.mock';
export { TestingModule } from './testing.module';
export * from './mocks/component.mock';
export * from './testing.module';
Oops, something went wrong.

0 comments on commit 632e79d

Please sign in to comment.