From 1c02122130061f8306cd9aae13c2bebc99f37546 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 4 May 2019 12:15:19 +0200 Subject: [PATCH] Imports improved. --- src/Squidex/app-config/webpack.config.js | 10 +++++++++- src/Squidex/app-config/webpack.run.base.js | 1 + .../features/administration/declarations.ts | 7 +------ .../guards/unset-user.guard.spec.ts | 3 ++- .../administration/guards/unset-user.guard.ts | 2 +- .../guards/user-must-exist.guard.spec.ts | 3 ++- .../guards/user-must-exist.guard.ts | 2 +- .../app/features/administration/internal.ts | 13 +++++++++++++ .../event-consumers-page.component.ts | 2 +- .../pages/users/user-page.component.ts | 2 +- .../pages/users/users-page.component.ts | 2 +- .../state/event-consumers.state.spec.ts | 4 ++-- .../administration/state/users.state.spec.ts | 6 +++--- .../angular/forms/error-formatting.ts | 2 +- .../angular/forms/file-drop.directive.ts | 2 +- .../framework/angular/forms/forms-helper.ts | 2 +- .../framework/angular/forms/validators.spec.ts | 2 +- .../angular/http/caching.interceptor.ts | 2 +- .../framework/angular/http/http-extensions.ts | 9 ++++++--- .../modals/dialog-renderer.component.ts | 4 ++-- .../angular/modals/modal-target.directive.ts | 3 +-- .../angular/modals/tooltip.directive.ts | 3 +-- .../angular/pipes/date-time.pipes.spec.ts | 2 +- .../framework/angular/pipes/money.pipe.spec.ts | 2 +- .../angular/shortcut.component.spec.ts | 2 +- .../framework/angular/stateful.component.ts | 2 +- .../framework/services/analytics.service.ts | 2 +- src/Squidex/app/framework/state.ts | 1 + .../app/shared/components/asset.component.ts | 2 +- src/Squidex/app/shared/declarations.ts | 12 ++++++++++++ .../guards/content-must-exist.guard.spec.ts | 3 +-- .../schema-must-exist-published.guard.spec.ts | 3 +-- .../guards/schema-must-exist.guard.spec.ts | 3 +-- .../schema-must-not-be-singleton.guard.spec.ts | 3 +-- .../app/shared/guards/unset-app.guard.spec.ts | 2 +- .../shared/guards/unset-content.guard.spec.ts | 2 +- .../interceptors/auth.interceptor.spec.ts | 7 ++----- src/Squidex/app/shared/internal.ts | 12 ------------ .../services/app-languages.service.spec.ts | 2 +- .../app/shared/services/apps.service.spec.ts | 2 +- .../app/shared/services/assets.service.spec.ts | 2 +- .../shared/services/backups.service.spec.ts | 2 +- .../shared/services/clients.service.spec.ts | 2 +- .../shared/services/comments.service.spec.ts | 2 +- .../shared/services/contents.service.spec.ts | 2 +- .../services/contributors.service.spec.ts | 2 +- .../shared/services/graphql.service.spec.ts | 2 +- .../app/shared/services/help.service.spec.ts | 2 +- .../shared/services/history.service.spec.ts | 5 ++--- .../shared/services/languages.service.spec.ts | 2 +- .../app/shared/services/news.service.spec.ts | 2 +- .../shared/services/patterns.service.spec.ts | 2 +- .../app/shared/services/plans.service.spec.ts | 2 +- .../app/shared/services/roles.service.spec.ts | 2 +- .../app/shared/services/rules.service.spec.ts | 2 +- .../shared/services/schemas.service.spec.ts | 2 +- .../services/translations.service.spec.ts | 2 +- .../app/shared/services/ui.service.spec.ts | 2 +- .../app/shared/services/usages.service.spec.ts | 2 +- .../services/users-provider.service.spec.ts | 2 +- .../app/shared/services/users.service.spec.ts | 2 +- .../app/shared/state/apps.state.spec.ts | 2 +- .../shared/state/asset-uploader.state.spec.ts | 6 ++++-- .../app/shared/state/asset-uploader.state.ts | 2 +- .../app/shared/state/assets.state.spec.ts | 2 +- .../app/shared/state/backups.state.spec.ts | 2 +- .../app/shared/state/clients.state.spec.ts | 2 +- .../app/shared/state/comments.state.spec.ts | 2 +- .../app/shared/state/contents.forms.spec.ts | 5 ++--- .../shared/state/contributors.state.spec.ts | 2 +- .../app/shared/state/filter.state.spec.ts | 2 +- src/Squidex/app/shared/state/filter.state.ts | 4 ++-- .../app/shared/state/languages.forms.ts | 2 +- .../app/shared/state/languages.state.spec.ts | 2 +- .../app/shared/state/patterns.state.spec.ts | 2 +- .../app/shared/state/plans.state.spec.ts | 2 +- src/Squidex/app/shared/state/queries.spec.ts | 2 +- .../app/shared/state/roles.state.spec.ts | 2 +- .../app/shared/state/rule-events.state.spec.ts | 2 +- .../app/shared/state/rules.state.spec.ts | 2 +- src/Squidex/app/shared/state/schemas.forms.ts | 2 +- .../app/shared/state/schemas.state.spec.ts | 2 +- src/Squidex/app/shared/state/ui.state.spec.ts | 2 +- src/Squidex/package-lock.json | 18 ++++++++++++------ src/Squidex/package.json | 1 + 85 files changed, 144 insertions(+), 123 deletions(-) create mode 100644 src/Squidex/app/features/administration/internal.ts diff --git a/src/Squidex/app-config/webpack.config.js b/src/Squidex/app-config/webpack.config.js index 588d04e85..5ff10d725 100644 --- a/src/Squidex/app-config/webpack.config.js +++ b/src/Squidex/app-config/webpack.config.js @@ -6,7 +6,9 @@ const plugins = { // https://github.com/webpack-contrib/mini-css-extract-plugin MiniCssExtractPlugin: require('mini-css-extract-plugin'), // https://github.com/dividab/tsconfig-paths-webpack-plugin - TsconfigPathsPlugin: require('tsconfig-paths-webpack-plugin') + TsconfigPathsPlugin: require('tsconfig-paths-webpack-plugin'), + // https://github.com/aackerman/circular-dependency-plugin + CircularDependencyPlugin: require('circular-dependency-plugin') }; const isDevServer = path.basename(require.main.filename) === 'webpack-dev-server.js'; @@ -140,6 +142,12 @@ module.exports = { context: '/' } }), + + new plugins.CircularDependencyPlugin({ + exclude: /([\\\/]node_modules[\\\/])|(ngfactory\.js$)/, + // Add errors to webpack instead of warnings + failOnError: true + }), new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) ] diff --git a/src/Squidex/app-config/webpack.run.base.js b/src/Squidex/app-config/webpack.run.base.js index 3fd8ea67c..06012fa60 100644 --- a/src/Squidex/app-config/webpack.run.base.js +++ b/src/Squidex/app-config/webpack.run.base.js @@ -5,6 +5,7 @@ commonConfig = require('./webpack.config.js'); const plugins = { + // https://github.com/jantimon/html-webpack-plugin HtmlWebpackPlugin: require('html-webpack-plugin') }; diff --git a/src/Squidex/app/features/administration/declarations.ts b/src/Squidex/app/features/administration/declarations.ts index 2a3b2198d..5c8cac3a6 100644 --- a/src/Squidex/app/features/administration/declarations.ts +++ b/src/Squidex/app/features/administration/declarations.ts @@ -15,9 +15,4 @@ export * from './pages/restore/restore-page.component'; export * from './pages/users/user-page.component'; export * from './pages/users/users-page.component'; -export * from './services/event-consumers.service'; -export * from './services/users.service'; - -export * from './state/event-consumers.state'; -export * from './state/users.forms'; -export * from './state/users.state'; \ No newline at end of file +export * from './internal'; \ No newline at end of file diff --git a/src/Squidex/app/features/administration/guards/unset-user.guard.spec.ts b/src/Squidex/app/features/administration/guards/unset-user.guard.spec.ts index 15414e732..d4dad973f 100644 --- a/src/Squidex/app/features/administration/guards/unset-user.guard.spec.ts +++ b/src/Squidex/app/features/administration/guards/unset-user.guard.spec.ts @@ -8,7 +8,8 @@ import { of } from 'rxjs'; import { IMock, Mock, Times } from 'typemoq'; -import { UsersState } from './../state/users.state'; +import { UsersState } from '@app/features/administration/internal'; + import { UnsetUserGuard } from './unset-user.guard'; describe('UnsetUserGuard', () => { diff --git a/src/Squidex/app/features/administration/guards/unset-user.guard.ts b/src/Squidex/app/features/administration/guards/unset-user.guard.ts index 1a8d42be2..bec813ee2 100644 --- a/src/Squidex/app/features/administration/guards/unset-user.guard.ts +++ b/src/Squidex/app/features/administration/guards/unset-user.guard.ts @@ -10,7 +10,7 @@ import { CanActivate } from '@angular/router'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; -import { UsersState } from './../state/users.state'; +import { UsersState } from '@app/features/administration/internal'; @Injectable() export class UnsetUserGuard implements CanActivate { diff --git a/src/Squidex/app/features/administration/guards/user-must-exist.guard.spec.ts b/src/Squidex/app/features/administration/guards/user-must-exist.guard.spec.ts index 8070a5f30..a5c03338f 100644 --- a/src/Squidex/app/features/administration/guards/user-must-exist.guard.spec.ts +++ b/src/Squidex/app/features/administration/guards/user-must-exist.guard.spec.ts @@ -9,7 +9,8 @@ import { Router } from '@angular/router'; import { of } from 'rxjs'; import { IMock, Mock, Times } from 'typemoq'; -import { SnapshotUser, UsersState } from './../state/users.state'; +import { SnapshotUser, UsersState } from '@app/features/administration/internal'; + import { UserMustExistGuard } from './user-must-exist.guard'; describe('UserMustExistGuard', () => { diff --git a/src/Squidex/app/features/administration/guards/user-must-exist.guard.ts b/src/Squidex/app/features/administration/guards/user-must-exist.guard.ts index 63fc2bba1..22b120ff3 100644 --- a/src/Squidex/app/features/administration/guards/user-must-exist.guard.ts +++ b/src/Squidex/app/features/administration/guards/user-must-exist.guard.ts @@ -12,7 +12,7 @@ import { map, tap } from 'rxjs/operators'; import { allParams } from '@app/framework'; -import { UsersState } from './../state/users.state'; +import { UsersState } from '@app/features/administration/internal'; @Injectable() export class UserMustExistGuard implements CanActivate { diff --git a/src/Squidex/app/features/administration/internal.ts b/src/Squidex/app/features/administration/internal.ts new file mode 100644 index 000000000..5a182a4dc --- /dev/null +++ b/src/Squidex/app/features/administration/internal.ts @@ -0,0 +1,13 @@ +/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */ + +export * from './services/event-consumers.service'; +export * from './services/users.service'; + +export * from './state/event-consumers.state'; +export * from './state/users.forms'; +export * from './state/users.state'; \ No newline at end of file diff --git a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts index da06f82c7..f4b0b97fd 100644 --- a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts +++ b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts @@ -11,7 +11,7 @@ import { onErrorResumeNext, switchMap } from 'rxjs/operators'; import { DialogModel, ResourceOwner } from '@app/shared'; -import { EventConsumerDto, EventConsumersState } from '../../declarations'; +import { EventConsumerDto, EventConsumersState } from '@app/features/administration/internal'; @Component({ selector: 'sqx-event-consumers-page', diff --git a/src/Squidex/app/features/administration/pages/users/user-page.component.ts b/src/Squidex/app/features/administration/pages/users/user-page.component.ts index fa4f43c82..0c7e1efc2 100644 --- a/src/Squidex/app/features/administration/pages/users/user-page.component.ts +++ b/src/Squidex/app/features/administration/pages/users/user-page.component.ts @@ -16,7 +16,7 @@ import { UserDto, UserForm, UsersState -} from '../../declarations'; +} from '@app/features/administration/internal'; @Component({ selector: 'sqx-user-page', diff --git a/src/Squidex/app/features/administration/pages/users/users-page.component.ts b/src/Squidex/app/features/administration/pages/users/users-page.component.ts index b0137f171..065b20858 100644 --- a/src/Squidex/app/features/administration/pages/users/users-page.component.ts +++ b/src/Squidex/app/features/administration/pages/users/users-page.component.ts @@ -8,7 +8,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { UserDto, UsersState } from '../../declarations'; +import { UserDto, UsersState } from '@app/features/administration/internal'; @Component({ selector: 'sqx-users-page', diff --git a/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts b/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts index 9020ad510..4a69ffbeb 100644 --- a/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts +++ b/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts @@ -9,9 +9,9 @@ import { of, throwError } from 'rxjs'; import { onErrorResumeNext } from 'rxjs/operators'; import { IMock, It, Mock, Times } from 'typemoq'; -import { DialogService } from '@app/shared'; +import { DialogService } from '@app/framework'; -import { EventConsumerDto, EventConsumersService } from './../services/event-consumers.service'; +import { EventConsumerDto, EventConsumersService } from '@app/features/administration/internal'; import { EventConsumersState } from './event-consumers.state'; describe('EventConsumersState', () => { diff --git a/src/Squidex/app/features/administration/state/users.state.spec.ts b/src/Squidex/app/features/administration/state/users.state.spec.ts index 235108d73..c2a912ecd 100644 --- a/src/Squidex/app/features/administration/state/users.state.spec.ts +++ b/src/Squidex/app/features/administration/state/users.state.spec.ts @@ -10,13 +10,13 @@ import { IMock, It, Mock, Times } from 'typemoq'; import { AuthService, DialogService } from '@app/shared'; -import { SnapshotUser, UsersState } from './users.state'; - import { UserDto, UsersDto, UsersService -} from './../services/users.service'; +} from '@app/features/administration/internal'; + +import { SnapshotUser, UsersState } from './users.state'; describe('UsersState', () => { const oldUsers = [ diff --git a/src/Squidex/app/framework/angular/forms/error-formatting.ts b/src/Squidex/app/framework/angular/forms/error-formatting.ts index a54d23941..abdff3007 100644 --- a/src/Squidex/app/framework/angular/forms/error-formatting.ts +++ b/src/Squidex/app/framework/angular/forms/error-formatting.ts @@ -5,7 +5,7 @@ * Copyright (c) Sebastian Stehle. All rights r vbeserved */ -import { Types } from './../../utils/types'; +import { Types } from '@app/framework/internal'; const DEFAULT_ERRORS: { [key: string]: string } = { between: '{field} must be between \'{min}\' and \'{max}\'.', diff --git a/src/Squidex/app/framework/angular/forms/file-drop.directive.ts b/src/Squidex/app/framework/angular/forms/file-drop.directive.ts index 7b572d106..027413c90 100644 --- a/src/Squidex/app/framework/angular/forms/file-drop.directive.ts +++ b/src/Squidex/app/framework/angular/forms/file-drop.directive.ts @@ -9,7 +9,7 @@ import { Directive, ElementRef, EventEmitter, HostListener, Input, Output, Renderer2 } from '@angular/core'; -import { Types } from './../../utils/types'; +import { Types } from '@app/framework/internal'; const ImageTypes = [ 'image/jpeg', diff --git a/src/Squidex/app/framework/angular/forms/forms-helper.ts b/src/Squidex/app/framework/angular/forms/forms-helper.ts index 91b4100b3..0f4b23d27 100644 --- a/src/Squidex/app/framework/angular/forms/forms-helper.ts +++ b/src/Squidex/app/framework/angular/forms/forms-helper.ts @@ -9,7 +9,7 @@ import { Observable } from 'rxjs'; import { map, startWith } from 'rxjs/operators'; -import { Types } from '@app/framework/internal'; +import { Types } from './../../utils/types'; export function formControls(form: AbstractControl): AbstractControl[] { if (Types.is(form, FormGroup)) { diff --git a/src/Squidex/app/framework/angular/forms/validators.spec.ts b/src/Squidex/app/framework/angular/forms/validators.spec.ts index 1e0911720..cbc5173d3 100644 --- a/src/Squidex/app/framework/angular/forms/validators.spec.ts +++ b/src/Squidex/app/framework/angular/forms/validators.spec.ts @@ -7,7 +7,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { DateTime } from './../../utils/date-time'; +import { DateTime } from '@app/framework/internal'; import { ValidatorsEx } from './validators'; diff --git a/src/Squidex/app/framework/angular/http/caching.interceptor.ts b/src/Squidex/app/framework/angular/http/caching.interceptor.ts index 111bc2aad..3058f13cd 100644 --- a/src/Squidex/app/framework/angular/http/caching.interceptor.ts +++ b/src/Squidex/app/framework/angular/http/caching.interceptor.ts @@ -10,7 +10,7 @@ import { Injectable} from '@angular/core'; import { Observable, of, throwError } from 'rxjs'; import { catchError, tap } from 'rxjs/operators'; -import { Types } from '@app/shared/internal'; +import { Types } from '@app/framework/internal'; @Injectable() export class CachingInterceptor implements HttpInterceptor { diff --git a/src/Squidex/app/framework/angular/http/http-extensions.ts b/src/Squidex/app/framework/angular/http/http-extensions.ts index 3566c63a3..0745c8227 100644 --- a/src/Squidex/app/framework/angular/http/http-extensions.ts +++ b/src/Squidex/app/framework/angular/http/http-extensions.ts @@ -9,9 +9,12 @@ import { HttpClient, HttpErrorResponse, HttpHeaders, HttpResponse } from '@angul import { Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { ErrorDto } from './../../utils/error'; -import { Types} from './../../utils/types'; -import { Version, Versioned } from './../../utils/version'; +import { + ErrorDto, + Types, + Version, + Versioned +} from '@app/framework/internal'; export module HTTP { export function getVersioned(http: HttpClient, url: string, version?: Version): Observable>> { diff --git a/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts b/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts index 873f4ced7..a1ff94145 100644 --- a/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts +++ b/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts @@ -14,9 +14,9 @@ import { DialogService, fadeAnimation, Notification, - StatefulComponent + StatefulComponent, + Tooltip } from '@app/framework/internal'; -import { Tooltip } from '@app/shared'; interface State { dialogRequest?: DialogRequest | null; diff --git a/src/Squidex/app/framework/angular/modals/modal-target.directive.ts b/src/Squidex/app/framework/angular/modals/modal-target.directive.ts index 65692dd30..2b1431a8d 100644 --- a/src/Squidex/app/framework/angular/modals/modal-target.directive.ts +++ b/src/Squidex/app/framework/angular/modals/modal-target.directive.ts @@ -8,8 +8,7 @@ import { AfterViewInit, Directive, ElementRef, Input, OnDestroy, Renderer2 } from '@angular/core'; import { timer } from 'rxjs'; -import { ResourceOwner } from '@app/framework/internal'; -import { positionModal } from '@app/shared'; +import { positionModal, ResourceOwner } from '@app/framework/internal'; @Directive({ selector: '[sqxModalTarget]' diff --git a/src/Squidex/app/framework/angular/modals/tooltip.directive.ts b/src/Squidex/app/framework/angular/modals/tooltip.directive.ts index c6c5afc73..6e835cee2 100644 --- a/src/Squidex/app/framework/angular/modals/tooltip.directive.ts +++ b/src/Squidex/app/framework/angular/modals/tooltip.directive.ts @@ -9,8 +9,7 @@ import { Directive, ElementRef, HostListener, Input, Renderer2 } from '@angular/core'; -import { DialogService } from '@app/framework/internal'; -import { Tooltip } from '@app/shared'; +import { DialogService, Tooltip } from '@app/framework/internal'; @Directive({ selector: '[title]' diff --git a/src/Squidex/app/framework/angular/pipes/date-time.pipes.spec.ts b/src/Squidex/app/framework/angular/pipes/date-time.pipes.spec.ts index 00da0249c..d5dc34f54 100644 --- a/src/Squidex/app/framework/angular/pipes/date-time.pipes.spec.ts +++ b/src/Squidex/app/framework/angular/pipes/date-time.pipes.spec.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { DateTime, Duration } from './../../'; +import { DateTime, Duration } from '@app/framework/internal'; import { DatePipe, diff --git a/src/Squidex/app/framework/angular/pipes/money.pipe.spec.ts b/src/Squidex/app/framework/angular/pipes/money.pipe.spec.ts index 80f1b6cc8..5b760fd49 100644 --- a/src/Squidex/app/framework/angular/pipes/money.pipe.spec.ts +++ b/src/Squidex/app/framework/angular/pipes/money.pipe.spec.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { CurrencyConfig, DecimalSeparatorConfig } from './../../'; +import { CurrencyConfig, DecimalSeparatorConfig } from '@app/framework/internal'; import { MoneyPipe } from './money.pipe'; diff --git a/src/Squidex/app/framework/angular/shortcut.component.spec.ts b/src/Squidex/app/framework/angular/shortcut.component.spec.ts index 50009a2cb..a5a28fe32 100644 --- a/src/Squidex/app/framework/angular/shortcut.component.spec.ts +++ b/src/Squidex/app/framework/angular/shortcut.component.spec.ts @@ -7,7 +7,7 @@ import { NgZone } from '@angular/core'; -import { ShortcutService } from './../'; +import { ShortcutService } from '@app/framework/internal'; import { ShortcutComponent } from './shortcut.component'; describe('ShortcutComponent', () => { diff --git a/src/Squidex/app/framework/angular/stateful.component.ts b/src/Squidex/app/framework/angular/stateful.component.ts index b3ba9f3c7..ec261fcfa 100644 --- a/src/Squidex/app/framework/angular/stateful.component.ts +++ b/src/Squidex/app/framework/angular/stateful.component.ts @@ -12,7 +12,7 @@ import { onErrorResumeNext, skip } from 'rxjs/operators'; import { Types } from './../utils/types'; -import { State } from '../state'; +import { State } from './../state'; declare type UnsubscribeFunction = () => void; diff --git a/src/Squidex/app/framework/services/analytics.service.ts b/src/Squidex/app/framework/services/analytics.service.ts index 4b94c2279..9bf3183c1 100644 --- a/src/Squidex/app/framework/services/analytics.service.ts +++ b/src/Squidex/app/framework/services/analytics.service.ts @@ -9,7 +9,7 @@ import { Injectable } from '@angular/core'; import { NavigationEnd, Router } from '@angular/router'; import { filter } from 'rxjs/operators'; -import { AnalyticsIdConfig } from '../configurations'; +import { AnalyticsIdConfig } from './../configurations'; import { Types } from './../utils/types'; import { ResourceLoaderService } from './resource-loader.service'; diff --git a/src/Squidex/app/framework/state.ts b/src/Squidex/app/framework/state.ts index c788a7700..9d15cbb32 100644 --- a/src/Squidex/app/framework/state.ts +++ b/src/Squidex/app/framework/state.ts @@ -10,6 +10,7 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { ErrorDto } from './utils/error'; + import { Types } from './utils/types'; import { fullValue} from './angular/forms/forms-helper'; diff --git a/src/Squidex/app/shared/components/asset.component.ts b/src/Squidex/app/shared/components/asset.component.ts index 253d111a8..b330cc647 100644 --- a/src/Squidex/app/shared/components/asset.component.ts +++ b/src/Squidex/app/shared/components/asset.component.ts @@ -15,7 +15,7 @@ import { StatefulComponent, Types } from '@app/shared/internal'; -import { AssetUploaderState, UploadCanceled } from '../state/asset-uploader.state'; +import { AssetUploaderState, UploadCanceled } from './../state/asset-uploader.state'; interface State { progress: number; diff --git a/src/Squidex/app/shared/declarations.ts b/src/Squidex/app/shared/declarations.ts index f69259f8a..7d5d57367 100644 --- a/src/Squidex/app/shared/declarations.ts +++ b/src/Squidex/app/shared/declarations.ts @@ -27,4 +27,16 @@ export * from './components/schema-category.component'; export * from './components/search-form.component'; export * from './components/table-header.component'; +export * from './guards/app-must-exist.guard'; +export * from './guards/content-must-exist.guard'; +export * from './guards/load-apps.guard'; +export * from './guards/load-languages.guard'; +export * from './guards/must-be-authenticated.guard'; +export * from './guards/must-be-not-authenticated.guard'; +export * from './guards/schema-must-exist-published.guard'; +export * from './guards/schema-must-exist.guard'; +export * from './guards/schema-must-not-be-singleton.guard'; +export * from './guards/unset-app.guard'; +export * from './guards/unset-content.guard'; + export * from './internal'; \ No newline at end of file diff --git a/src/Squidex/app/shared/guards/content-must-exist.guard.spec.ts b/src/Squidex/app/shared/guards/content-must-exist.guard.spec.ts index 96f0727b6..b54ee76fd 100644 --- a/src/Squidex/app/shared/guards/content-must-exist.guard.spec.ts +++ b/src/Squidex/app/shared/guards/content-must-exist.guard.spec.ts @@ -9,8 +9,7 @@ import { Router } from '@angular/router'; import { of } from 'rxjs'; import { IMock, It, Mock, Times } from 'typemoq'; -import { ContentDto } from './../services/contents.service'; -import { ContentsState } from './../state/contents.state'; +import { ContentDto, ContentsState } from '@app/shared/internal'; import { ContentMustExistGuard } from './content-must-exist.guard'; describe('ContentMustExistGuard', () => { diff --git a/src/Squidex/app/shared/guards/schema-must-exist-published.guard.spec.ts b/src/Squidex/app/shared/guards/schema-must-exist-published.guard.spec.ts index 560ff9a86..89028ec95 100644 --- a/src/Squidex/app/shared/guards/schema-must-exist-published.guard.spec.ts +++ b/src/Squidex/app/shared/guards/schema-must-exist-published.guard.spec.ts @@ -9,8 +9,7 @@ import { Router } from '@angular/router'; import { of } from 'rxjs'; import { IMock, It, Mock, Times } from 'typemoq'; -import { SchemaDetailsDto } from './../services/schemas.service'; -import { SchemasState } from './../state/schemas.state'; +import { SchemaDetailsDto, SchemasState } from '@app/shared/internal'; import { SchemaMustExistPublishedGuard } from './schema-must-exist-published.guard'; describe('SchemaMustExistPublishedGuard', () => { diff --git a/src/Squidex/app/shared/guards/schema-must-exist.guard.spec.ts b/src/Squidex/app/shared/guards/schema-must-exist.guard.spec.ts index 2c517be7b..f5c4e3475 100644 --- a/src/Squidex/app/shared/guards/schema-must-exist.guard.spec.ts +++ b/src/Squidex/app/shared/guards/schema-must-exist.guard.spec.ts @@ -9,8 +9,7 @@ import { Router } from '@angular/router'; import { of } from 'rxjs'; import { IMock, Mock, Times } from 'typemoq'; -import { SchemaDetailsDto } from './../services/schemas.service'; -import { SchemasState } from './../state/schemas.state'; +import { SchemaDetailsDto, SchemasState } from '@app/shared/internal'; import { SchemaMustExistGuard } from './schema-must-exist.guard'; describe('SchemaMustExistGuard', () => { diff --git a/src/Squidex/app/shared/guards/schema-must-not-be-singleton.guard.spec.ts b/src/Squidex/app/shared/guards/schema-must-not-be-singleton.guard.spec.ts index 2de66fc8b..ccc3b32ec 100644 --- a/src/Squidex/app/shared/guards/schema-must-not-be-singleton.guard.spec.ts +++ b/src/Squidex/app/shared/guards/schema-must-not-be-singleton.guard.spec.ts @@ -9,8 +9,7 @@ import { Router, RouterStateSnapshot, UrlSegment } from '@angular/router'; import { of } from 'rxjs'; import { IMock, It, Mock, Times } from 'typemoq'; -import { SchemaDetailsDto } from './../services/schemas.service'; -import { SchemasState } from './../state/schemas.state'; +import { SchemaDetailsDto, SchemasState } from '@app/shared/internal'; import { SchemaMustNotBeSingletonGuard } from './schema-must-not-be-singleton.guard'; describe('SchemaMustNotBeSingletonGuard', () => { diff --git a/src/Squidex/app/shared/guards/unset-app.guard.spec.ts b/src/Squidex/app/shared/guards/unset-app.guard.spec.ts index 14ed0f21d..f04d5acb0 100644 --- a/src/Squidex/app/shared/guards/unset-app.guard.spec.ts +++ b/src/Squidex/app/shared/guards/unset-app.guard.spec.ts @@ -8,7 +8,7 @@ import { of } from 'rxjs'; import { IMock, Mock, Times } from 'typemoq'; -import { AppsState } from '@app/shared'; +import { AppsState } from '@app/shared/internal'; import { UnsetAppGuard } from './unset-app.guard'; diff --git a/src/Squidex/app/shared/guards/unset-content.guard.spec.ts b/src/Squidex/app/shared/guards/unset-content.guard.spec.ts index 8c0e6905f..9aba68f66 100644 --- a/src/Squidex/app/shared/guards/unset-content.guard.spec.ts +++ b/src/Squidex/app/shared/guards/unset-content.guard.spec.ts @@ -8,7 +8,7 @@ import { of } from 'rxjs'; import { IMock, Mock, Times } from 'typemoq'; -import { ContentsState } from './../state/contents.state'; +import { ContentsState } from '@app/shared/internal'; import { UnsetContentGuard } from './unset-content.guard'; describe('UnsetContentGuard', () => { diff --git a/src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts b/src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts index 11b66ab1a..a7206035c 100644 --- a/src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts +++ b/src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts @@ -12,11 +12,8 @@ import { of } from 'rxjs'; import { onErrorResumeNext } from 'rxjs/operators'; import { IMock, Mock, Times } from 'typemoq'; -import { - ApiUrlConfig, - AuthInterceptor, - AuthService -} from './../'; +import { ApiUrlConfig, AuthService } from '@app/shared/internal'; +import { AuthInterceptor } from './auth.interceptor'; describe('AuthInterceptor', () => { let authService: IMock; diff --git a/src/Squidex/app/shared/internal.ts b/src/Squidex/app/shared/internal.ts index 665d17c84..f467a7636 100644 --- a/src/Squidex/app/shared/internal.ts +++ b/src/Squidex/app/shared/internal.ts @@ -5,18 +5,6 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -export * from './guards/app-must-exist.guard'; -export * from './guards/content-must-exist.guard'; -export * from './guards/load-apps.guard'; -export * from './guards/load-languages.guard'; -export * from './guards/must-be-authenticated.guard'; -export * from './guards/must-be-not-authenticated.guard'; -export * from './guards/schema-must-exist-published.guard'; -export * from './guards/schema-must-exist.guard'; -export * from './guards/schema-must-not-be-singleton.guard'; -export * from './guards/unset-app.guard'; -export * from './guards/unset-content.guard'; - export * from './interceptors/auth.interceptor'; export * from './services/app-languages.service'; diff --git a/src/Squidex/app/shared/services/app-languages.service.spec.ts b/src/Squidex/app/shared/services/app-languages.service.spec.ts index 4c41624de..e9c57425a 100644 --- a/src/Squidex/app/shared/services/app-languages.service.spec.ts +++ b/src/Squidex/app/shared/services/app-languages.service.spec.ts @@ -15,7 +15,7 @@ import { AppLanguagesDto, AppLanguagesService, Version -} from './../'; +} from '@app/shared/internal'; describe('AppLanguagesService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/apps.service.spec.ts b/src/Squidex/app/shared/services/apps.service.spec.ts index 361d80a2d..75f064593 100644 --- a/src/Squidex/app/shared/services/apps.service.spec.ts +++ b/src/Squidex/app/shared/services/apps.service.spec.ts @@ -15,7 +15,7 @@ import { AppsService, DateTime, Permission -} from './../'; +} from '@app/shared/internal'; describe('AppsService', () => { const now = DateTime.now(); diff --git a/src/Squidex/app/shared/services/assets.service.spec.ts b/src/Squidex/app/shared/services/assets.service.spec.ts index 6c32b85d4..4bca45ca4 100644 --- a/src/Squidex/app/shared/services/assets.service.spec.ts +++ b/src/Squidex/app/shared/services/assets.service.spec.ts @@ -19,7 +19,7 @@ import { ErrorDto, Version, Versioned -} from './../'; +} from '@app/shared/internal'; describe('AssetDto', () => { const creation = DateTime.today(); diff --git a/src/Squidex/app/shared/services/backups.service.spec.ts b/src/Squidex/app/shared/services/backups.service.spec.ts index 3f2c971a2..f4f51683b 100644 --- a/src/Squidex/app/shared/services/backups.service.spec.ts +++ b/src/Squidex/app/shared/services/backups.service.spec.ts @@ -15,7 +15,7 @@ import { BackupsService, DateTime, RestoreDto -} from './../'; +} from '@app/shared/internal'; describe('BackupsService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/clients.service.spec.ts b/src/Squidex/app/shared/services/clients.service.spec.ts index 25c9c9e97..02afa3486 100644 --- a/src/Squidex/app/shared/services/clients.service.spec.ts +++ b/src/Squidex/app/shared/services/clients.service.spec.ts @@ -16,7 +16,7 @@ import { ClientsDto, ClientsService, Version -} from './../'; +} from '@app/shared/internal'; describe('ClientsService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/comments.service.spec.ts b/src/Squidex/app/shared/services/comments.service.spec.ts index 03be1dcc6..c86ad3ea9 100644 --- a/src/Squidex/app/shared/services/comments.service.spec.ts +++ b/src/Squidex/app/shared/services/comments.service.spec.ts @@ -15,7 +15,7 @@ import { CommentsService, DateTime, Version -} from './../'; +} from '@app/shared/internal'; describe('CommentsService', () => { const user = 'me'; diff --git a/src/Squidex/app/shared/services/contents.service.spec.ts b/src/Squidex/app/shared/services/contents.service.spec.ts index 87fc4112e..4ff9e0c0b 100644 --- a/src/Squidex/app/shared/services/contents.service.spec.ts +++ b/src/Squidex/app/shared/services/contents.service.spec.ts @@ -18,7 +18,7 @@ import { ScheduleDto, Version, Versioned -} from './../'; +} from '@app/shared/internal'; describe('ContentsService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/contributors.service.spec.ts b/src/Squidex/app/shared/services/contributors.service.spec.ts index 55a92e447..930f1b9c0 100644 --- a/src/Squidex/app/shared/services/contributors.service.spec.ts +++ b/src/Squidex/app/shared/services/contributors.service.spec.ts @@ -16,7 +16,7 @@ import { ContributorsDto, ContributorsService, Version -} from './../'; +} from '@app/shared/internal'; describe('ContributorsService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/graphql.service.spec.ts b/src/Squidex/app/shared/services/graphql.service.spec.ts index 97146d2f4..4221f51a9 100644 --- a/src/Squidex/app/shared/services/graphql.service.spec.ts +++ b/src/Squidex/app/shared/services/graphql.service.spec.ts @@ -8,7 +8,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; -import { ApiUrlConfig, GraphQlService } from './../'; +import { ApiUrlConfig, GraphQlService } from '@app/shared/internal'; describe('GraphQlService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/help.service.spec.ts b/src/Squidex/app/shared/services/help.service.spec.ts index 29891a4a3..83d85a4d9 100644 --- a/src/Squidex/app/shared/services/help.service.spec.ts +++ b/src/Squidex/app/shared/services/help.service.spec.ts @@ -8,7 +8,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; -import { HelpService } from './../'; +import { HelpService } from '@app/shared/internal'; describe('ClientsService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/history.service.spec.ts b/src/Squidex/app/shared/services/history.service.spec.ts index a8662865f..26ffd00a0 100644 --- a/src/Squidex/app/shared/services/history.service.spec.ts +++ b/src/Squidex/app/shared/services/history.service.spec.ts @@ -8,13 +8,12 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; -import { DateTime } from '@app/framework'; - import { ApiUrlConfig, + DateTime, HistoryEventDto, HistoryService -} from './../'; +} from '@app/shared/internal'; describe('HistoryService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/languages.service.spec.ts b/src/Squidex/app/shared/services/languages.service.spec.ts index ee55ea9f1..b7ddce678 100644 --- a/src/Squidex/app/shared/services/languages.service.spec.ts +++ b/src/Squidex/app/shared/services/languages.service.spec.ts @@ -12,7 +12,7 @@ import { ApiUrlConfig, LanguageDto, LanguagesService -} from './../'; +} from '@app/shared/internal'; describe('LanguageService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/news.service.spec.ts b/src/Squidex/app/shared/services/news.service.spec.ts index ccba7d3c9..fc81c675b 100644 --- a/src/Squidex/app/shared/services/news.service.spec.ts +++ b/src/Squidex/app/shared/services/news.service.spec.ts @@ -13,7 +13,7 @@ import { FeatureDto, FeaturesDto, NewsService -} from './../'; +} from '@app/shared/internal'; describe('NewsService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/patterns.service.spec.ts b/src/Squidex/app/shared/services/patterns.service.spec.ts index 3c6800391..8454db9da 100644 --- a/src/Squidex/app/shared/services/patterns.service.spec.ts +++ b/src/Squidex/app/shared/services/patterns.service.spec.ts @@ -15,7 +15,7 @@ import { PatternsDto, PatternsService, Version -} from './../'; +} from '@app/shared/internal'; describe('PatternsService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/plans.service.spec.ts b/src/Squidex/app/shared/services/plans.service.spec.ts index 3369a6425..4c4cd4792 100644 --- a/src/Squidex/app/shared/services/plans.service.spec.ts +++ b/src/Squidex/app/shared/services/plans.service.spec.ts @@ -16,7 +16,7 @@ import { PlansDto, PlansService, Version -} from './../'; +} from '@app/shared/internal'; describe('PlansService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/roles.service.spec.ts b/src/Squidex/app/shared/services/roles.service.spec.ts index 91cd3c879..687e9e305 100644 --- a/src/Squidex/app/shared/services/roles.service.spec.ts +++ b/src/Squidex/app/shared/services/roles.service.spec.ts @@ -15,7 +15,7 @@ import { RolesDto, RolesService, Version -} from './../'; +} from '@app/shared/internal'; describe('RolesService', () => { const version = new Version('1'); diff --git a/src/Squidex/app/shared/services/rules.service.spec.ts b/src/Squidex/app/shared/services/rules.service.spec.ts index 5a46294ff..955954bb4 100644 --- a/src/Squidex/app/shared/services/rules.service.spec.ts +++ b/src/Squidex/app/shared/services/rules.service.spec.ts @@ -20,7 +20,7 @@ import { RuleEventsDto, RulesService, Version -} from './../'; +} from '@app/shared/internal'; describe('RulesService', () => { const now = DateTime.now(); diff --git a/src/Squidex/app/shared/services/schemas.service.spec.ts b/src/Squidex/app/shared/services/schemas.service.spec.ts index 0a9bed879..c0405c407 100644 --- a/src/Squidex/app/shared/services/schemas.service.spec.ts +++ b/src/Squidex/app/shared/services/schemas.service.spec.ts @@ -23,7 +23,7 @@ import { SchemaPropertiesDto, SchemasService, Version -} from './../'; +} from '@app/shared/internal'; describe('SchemasService', () => { const now = DateTime.now(); diff --git a/src/Squidex/app/shared/services/translations.service.spec.ts b/src/Squidex/app/shared/services/translations.service.spec.ts index 864fab019..3ac0c22d1 100644 --- a/src/Squidex/app/shared/services/translations.service.spec.ts +++ b/src/Squidex/app/shared/services/translations.service.spec.ts @@ -12,7 +12,7 @@ import { ApiUrlConfig, TranslationDto, TranslationsService -} from './../'; +} from '@app/shared/internal'; describe('TranslationsService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/ui.service.spec.ts b/src/Squidex/app/shared/services/ui.service.spec.ts index 0331a9c21..537ea44e0 100644 --- a/src/Squidex/app/shared/services/ui.service.spec.ts +++ b/src/Squidex/app/shared/services/ui.service.spec.ts @@ -12,7 +12,7 @@ import { ApiUrlConfig, UIService, UISettingsDto -} from './../'; +} from '@app/shared/internal'; describe('UIService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/usages.service.spec.ts b/src/Squidex/app/shared/services/usages.service.spec.ts index f44ea471d..3faaff8c4 100644 --- a/src/Squidex/app/shared/services/usages.service.spec.ts +++ b/src/Squidex/app/shared/services/usages.service.spec.ts @@ -16,7 +16,7 @@ import { DateTime, StorageUsageDto, UsagesService -} from './../'; +} from '@app/shared/internal'; describe('UsagesService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/services/users-provider.service.spec.ts b/src/Squidex/app/shared/services/users-provider.service.spec.ts index 81a87740b..d31a57901 100644 --- a/src/Squidex/app/shared/services/users-provider.service.spec.ts +++ b/src/Squidex/app/shared/services/users-provider.service.spec.ts @@ -14,7 +14,7 @@ import { UserDto, UsersProviderService, UsersService -} from './../'; +} from '@app/shared/internal'; describe('UsersProviderService', () => { let authService: IMock; diff --git a/src/Squidex/app/shared/services/users.service.spec.ts b/src/Squidex/app/shared/services/users.service.spec.ts index 8f454b8f0..f3881dd7a 100644 --- a/src/Squidex/app/shared/services/users.service.spec.ts +++ b/src/Squidex/app/shared/services/users.service.spec.ts @@ -12,7 +12,7 @@ import { ApiUrlConfig, UserDto, UsersService -} from './../'; +} from '@app/shared/internal'; describe('UsersService', () => { beforeEach(() => { diff --git a/src/Squidex/app/shared/state/apps.state.spec.ts b/src/Squidex/app/shared/state/apps.state.spec.ts index 67d7009ed..c963063cc 100644 --- a/src/Squidex/app/shared/state/apps.state.spec.ts +++ b/src/Squidex/app/shared/state/apps.state.spec.ts @@ -15,7 +15,7 @@ import { DateTime, DialogService, Permission -} from './../'; +} from '@app/shared/internal'; describe('AppsState', () => { const now = DateTime.now(); diff --git a/src/Squidex/app/shared/state/asset-uploader.state.spec.ts b/src/Squidex/app/shared/state/asset-uploader.state.spec.ts index b24c45891..28215cf43 100644 --- a/src/Squidex/app/shared/state/asset-uploader.state.spec.ts +++ b/src/Squidex/app/shared/state/asset-uploader.state.spec.ts @@ -10,15 +10,17 @@ import { onErrorResumeNext } from 'rxjs/operators'; import { IMock, Mock } from 'typemoq'; import { + AssetDto, + AssetReplacedDto, + AssetsService, AssetUploaderState, DialogService, ofForever, Types, Version, versioned -} from './../'; +} from '@app/shared/internal'; -import { AssetDto, AssetReplacedDto, AssetsService } from '../services/assets.service'; import { TestValues } from './_test-helpers'; describe('AssetsState', () => { diff --git a/src/Squidex/app/shared/state/asset-uploader.state.ts b/src/Squidex/app/shared/state/asset-uploader.state.ts index 58c8ac741..bbc8af196 100644 --- a/src/Squidex/app/shared/state/asset-uploader.state.ts +++ b/src/Squidex/app/shared/state/asset-uploader.state.ts @@ -18,8 +18,8 @@ import { Types } from '@app/framework'; -import { AuthService } from '../services/auth.service'; import { AssetDto, AssetsService } from './../services/assets.service'; +import { AuthService } from './../services/auth.service'; import { AppsState } from './apps.state'; import { AssetsState } from './assets.state'; diff --git a/src/Squidex/app/shared/state/assets.state.spec.ts b/src/Squidex/app/shared/state/assets.state.spec.ts index 0cfd5a8ab..17f604219 100644 --- a/src/Squidex/app/shared/state/assets.state.spec.ts +++ b/src/Squidex/app/shared/state/assets.state.spec.ts @@ -15,7 +15,7 @@ import { AssetsState, DialogService, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/backups.state.spec.ts b/src/Squidex/app/shared/state/backups.state.spec.ts index e5f597be0..db6bcfccd 100644 --- a/src/Squidex/app/shared/state/backups.state.spec.ts +++ b/src/Squidex/app/shared/state/backups.state.spec.ts @@ -15,7 +15,7 @@ import { BackupsState, DateTime, DialogService -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/clients.state.spec.ts b/src/Squidex/app/shared/state/clients.state.spec.ts index 30325bdfb..3199673cb 100644 --- a/src/Squidex/app/shared/state/clients.state.spec.ts +++ b/src/Squidex/app/shared/state/clients.state.spec.ts @@ -14,7 +14,7 @@ import { ClientsState, DialogService, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/comments.state.spec.ts b/src/Squidex/app/shared/state/comments.state.spec.ts index a26d15d56..54fdf9e3e 100644 --- a/src/Squidex/app/shared/state/comments.state.spec.ts +++ b/src/Squidex/app/shared/state/comments.state.spec.ts @@ -16,7 +16,7 @@ import { DialogService, ImmutableArray, Version -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/contents.forms.spec.ts b/src/Squidex/app/shared/state/contents.forms.spec.ts index 7f7d11b04..5190bee57 100644 --- a/src/Squidex/app/shared/state/contents.forms.spec.ts +++ b/src/Squidex/app/shared/state/contents.forms.spec.ts @@ -5,12 +5,11 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { DateTime } from '@app/framework'; - import { ArrayFieldPropertiesDto, AssetsFieldPropertiesDto, BooleanFieldPropertiesDto, + DateTime, DateTimeFieldPropertiesDto, FieldDefaultValue, FieldFormatter, @@ -25,7 +24,7 @@ import { SchemaPropertiesDto, StringFieldPropertiesDto, TagsFieldPropertiesDto -} from './../'; +} from '@app/shared/internal'; describe('SchemaDetailsDto', () => { it('should return label as display name', () => { diff --git a/src/Squidex/app/shared/state/contributors.state.spec.ts b/src/Squidex/app/shared/state/contributors.state.spec.ts index 8883ea1b2..d7e85a301 100644 --- a/src/Squidex/app/shared/state/contributors.state.spec.ts +++ b/src/Squidex/app/shared/state/contributors.state.spec.ts @@ -14,7 +14,7 @@ import { ContributorsState, DialogService, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/filter.state.spec.ts b/src/Squidex/app/shared/state/filter.state.spec.ts index 24840bdaf..c5b3190bb 100644 --- a/src/Squidex/app/shared/state/filter.state.spec.ts +++ b/src/Squidex/app/shared/state/filter.state.spec.ts @@ -9,7 +9,7 @@ import { FilterState, LanguageDto, Sorting -} from './../'; +} from '@app/shared/internal'; describe('FilterState', () => { let query: string | undefined; diff --git a/src/Squidex/app/shared/state/filter.state.ts b/src/Squidex/app/shared/state/filter.state.ts index a326ff01d..769b5d882 100644 --- a/src/Squidex/app/shared/state/filter.state.ts +++ b/src/Squidex/app/shared/state/filter.state.ts @@ -10,9 +10,9 @@ import { distinctUntilChanged, map } from 'rxjs/internal/operators'; import { State, Types } from '@app/framework'; -import { LanguageDto } from '../services/languages.service'; +import { LanguageDto } from './../services/languages.service'; -import { RootFieldDto } from '../services/schemas.service'; +import { RootFieldDto } from './../services/schemas.service'; interface Snapshot { // The current language. diff --git a/src/Squidex/app/shared/state/languages.forms.ts b/src/Squidex/app/shared/state/languages.forms.ts index 776ea1724..1840c123c 100644 --- a/src/Squidex/app/shared/state/languages.forms.ts +++ b/src/Squidex/app/shared/state/languages.forms.ts @@ -9,7 +9,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Form } from '@app/framework'; -import { LanguageDto } from '../services/languages.service'; +import { LanguageDto } from './../services/languages.service'; export class EditLanguageForm extends Form { constructor(formBuilder: FormBuilder) { diff --git a/src/Squidex/app/shared/state/languages.state.spec.ts b/src/Squidex/app/shared/state/languages.state.spec.ts index a4ab191cd..3a4f6dc50 100644 --- a/src/Squidex/app/shared/state/languages.state.spec.ts +++ b/src/Squidex/app/shared/state/languages.state.spec.ts @@ -17,7 +17,7 @@ import { LanguagesService, LanguagesState, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/patterns.state.spec.ts b/src/Squidex/app/shared/state/patterns.state.spec.ts index eb4179837..b0de52e42 100644 --- a/src/Squidex/app/shared/state/patterns.state.spec.ts +++ b/src/Squidex/app/shared/state/patterns.state.spec.ts @@ -14,7 +14,7 @@ import { PatternsService, PatternsState, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/plans.state.spec.ts b/src/Squidex/app/shared/state/plans.state.spec.ts index 152511812..100a5be6f 100644 --- a/src/Squidex/app/shared/state/plans.state.spec.ts +++ b/src/Squidex/app/shared/state/plans.state.spec.ts @@ -15,7 +15,7 @@ import { PlansService, PlansState, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/queries.spec.ts b/src/Squidex/app/shared/state/queries.spec.ts index fa174c260..7a469b9b1 100644 --- a/src/Squidex/app/shared/state/queries.spec.ts +++ b/src/Squidex/app/shared/state/queries.spec.ts @@ -12,7 +12,7 @@ import { Queries, Query, UIState -} from './../'; +} from '@app/shared/internal'; describe('Queries', () => { const prefix = 'schemas.my-schema'; diff --git a/src/Squidex/app/shared/state/roles.state.spec.ts b/src/Squidex/app/shared/state/roles.state.spec.ts index 91680effb..d3326a6f5 100644 --- a/src/Squidex/app/shared/state/roles.state.spec.ts +++ b/src/Squidex/app/shared/state/roles.state.spec.ts @@ -14,7 +14,7 @@ import { RolesService, RolesState, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/rule-events.state.spec.ts b/src/Squidex/app/shared/state/rule-events.state.spec.ts index 50ca944f0..764654588 100644 --- a/src/Squidex/app/shared/state/rule-events.state.spec.ts +++ b/src/Squidex/app/shared/state/rule-events.state.spec.ts @@ -15,7 +15,7 @@ import { RuleEventsDto, RuleEventsState, RulesService -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/rules.state.spec.ts b/src/Squidex/app/shared/state/rules.state.spec.ts index 2f0a13dcf..c296c968b 100644 --- a/src/Squidex/app/shared/state/rules.state.spec.ts +++ b/src/Squidex/app/shared/state/rules.state.spec.ts @@ -15,7 +15,7 @@ import { RuleDto, RulesService, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/schemas.forms.ts b/src/Squidex/app/shared/state/schemas.forms.ts index a7aebd973..23846fbf7 100644 --- a/src/Squidex/app/shared/state/schemas.forms.ts +++ b/src/Squidex/app/shared/state/schemas.forms.ts @@ -14,7 +14,7 @@ import { value$ } from '@app/framework'; -import { AddFieldDto } from '../services/schemas.service'; +import { AddFieldDto } from './../services/schemas.service'; import { createProperties } from './../services/schemas.types'; diff --git a/src/Squidex/app/shared/state/schemas.state.spec.ts b/src/Squidex/app/shared/state/schemas.state.spec.ts index ece6fddae..7d5229824 100644 --- a/src/Squidex/app/shared/state/schemas.state.spec.ts +++ b/src/Squidex/app/shared/state/schemas.state.spec.ts @@ -22,7 +22,7 @@ import { SchemasService, UpdateSchemaCategoryDto, versioned -} from './../'; +} from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/app/shared/state/ui.state.spec.ts b/src/Squidex/app/shared/state/ui.state.spec.ts index 8ca7da532..3502b656a 100644 --- a/src/Squidex/app/shared/state/ui.state.spec.ts +++ b/src/Squidex/app/shared/state/ui.state.spec.ts @@ -8,7 +8,7 @@ import { of } from 'rxjs'; import { IMock, It, Mock, Times } from 'typemoq'; -import { UIService, UIState } from './../'; +import { UIService, UIState } from '@app/shared/internal'; import { TestValues } from './_test-helpers'; diff --git a/src/Squidex/package-lock.json b/src/Squidex/package-lock.json index 47045544d..d1e634ee7 100644 --- a/src/Squidex/package-lock.json +++ b/src/Squidex/package-lock.json @@ -2741,7 +2741,7 @@ "dependencies": { "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -3546,6 +3546,12 @@ "safe-buffer": "^5.0.1" } }, + "circular-dependency-plugin": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", + "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", + "dev": true + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -4178,7 +4184,7 @@ }, "json5": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { @@ -10663,7 +10669,7 @@ }, "node-fetch": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" }, "node-forge": { @@ -11080,7 +11086,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -15320,7 +15326,7 @@ "dependencies": { "json5": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { @@ -18603,7 +18609,7 @@ }, "whatwg-fetch": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" }, "which": { diff --git a/src/Squidex/package.json b/src/Squidex/package.json index baf455083..539bdd9da 100644 --- a/src/Squidex/package.json +++ b/src/Squidex/package.json @@ -62,6 +62,7 @@ "angular2-template-loader": "0.6.2", "awesome-typescript-loader": "5.2.1", "babel-core": "6.26.3", + "circular-dependency-plugin": "5.0.2", "codelyzer": "5.0.1", "cpx": "1.5.0", "css-loader": "2.1.1",