Browse Source

Imports fixed.

pull/282/head
Sebastian Stehle 8 years ago
parent
commit
0408fbacca
  1. 3
      src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
  2. 5
      src/Squidex/app/features/administration/pages/users/users-page.component.ts
  3. 2
      src/Squidex/app/features/administration/services/event-consumers.service.ts
  4. 4
      src/Squidex/app/features/administration/services/users.service.spec.ts
  5. 2
      src/Squidex/app/features/administration/services/users.service.ts
  6. 9
      src/Squidex/app/features/administration/state/event-consumers.state.ts
  7. 2
      src/Squidex/app/features/administration/state/users.state.spec.ts
  8. 4
      src/Squidex/app/framework/services/dialog.service.spec.ts
  9. 2
      src/Squidex/app/shared/guards/app-must-exist.guard.spec.ts
  10. 2
      src/Squidex/app/shared/guards/load-apps.guard.spec.ts
  11. 2
      src/Squidex/app/shared/guards/must-be-authenticated.guard.spec.ts
  12. 2
      src/Squidex/app/shared/guards/must-be-not-authenticated.guard.spec.ts
  13. 2
      src/Squidex/app/shared/guards/unset-app.guard.spec.ts
  14. 6
      src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts
  15. 4
      src/Squidex/app/shared/services/app-contributors.service.spec.ts
  16. 2
      src/Squidex/app/shared/services/assets.service.spec.ts
  17. 2
      src/Squidex/app/shared/services/plans.service.spec.ts
  18. 6
      src/Squidex/app/shared/services/rules.service.spec.ts
  19. 2
      src/Squidex/app/shared/services/schemas.service.spec.ts
  20. 2
      src/Squidex/app/shared/state/assets.state.spec.ts
  21. 4
      src/Squidex/app/shared/state/backups.state.spec.ts
  22. 2
      src/Squidex/app/shared/state/clients.state.spec.ts
  23. 2
      src/Squidex/app/shared/state/contributors.state.spec.ts
  24. 6
      src/Squidex/app/shared/state/patterns.state.spec.ts
  25. 15
      src/Squidex/app/shared/state/plans.state.ts
  26. 8
      src/Squidex/app/shared/state/rules.state.spec.ts
  27. 4
      src/Squidex/app/shared/state/schemas.state.spec.ts
  28. 3
      src/Squidex/package.json

3
src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts

@ -8,7 +8,7 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import { ImmutableArray, ModalView } from '@app/shared';
import { ModalView } from '@app/shared';
import { EventConsumersState } from '@appfeatures/administration/declarations';
import { EventConsumerDto } from './../../services/event-consumers.service';
@ -23,7 +23,6 @@ export class EventConsumersPageComponent implements OnDestroy, OnInit {
public eventConsumerErrorDialog = new ModalView();
public eventConsumerError = '';
public eventConsumers = ImmutableArray.empty<EventConsumerDto>();
constructor(
public readonly eventConsumersState: EventConsumersState

5
src/Squidex/app/features/administration/pages/users/users-page.component.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { UserDto } from './../../services/users.service';
@ -14,8 +14,7 @@ import { UsersState } from './../../state/users.state';
@Component({
selector: 'sqx-users-page',
styleUrls: ['./users-page.component.scss'],
templateUrl: './users-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
templateUrl: './users-page.component.html'
})
export class UsersPageComponent implements OnInit {
public usersFilter = new FormControl();

2
src/Squidex/app/features/administration/services/event-consumers.service.ts

@ -11,7 +11,7 @@ import { Observable } from 'rxjs';
import '@app/framework/angular/http/http-extensions';
import { ApiUrlConfig, HTTP } from '@app/framework';
import { ApiUrlConfig, HTTP } from '@app/shared';
export class EventConsumerDto {
constructor(

4
src/Squidex/app/features/administration/services/users.service.spec.ts

@ -14,8 +14,8 @@ import {
CreateUserDto,
UpdateUserDto,
UserDto,
UsersService,
UsersDto
UsersDto,
UsersService
} from './users.service';
describe('UsersService', () => {

2
src/Squidex/app/features/administration/services/users.service.ts

@ -11,7 +11,7 @@ import { Observable } from 'rxjs';
import '@app/framework/angular/http/http-extensions';
import { ApiUrlConfig, HTTP } from '@app/framework';
import { ApiUrlConfig, HTTP } from '@app/shared';
export class UsersDto {
constructor(

9
src/Squidex/app/features/administration/state/event-consumers.state.ts

@ -66,7 +66,7 @@ export class EventConsumersState extends State<Snapshot> {
public start(es: EventConsumerDto): Observable<any> {
return this.eventConsumersService.putStart(es.name)
.do(() => {
this.replaceEventConsumer(start(es));
this.replaceEventConsumer(setStopped(es, false));
})
.notify(this.dialogs);
}
@ -74,7 +74,7 @@ export class EventConsumersState extends State<Snapshot> {
public stop(es: EventConsumerDto): Observable<any> {
return this.eventConsumersService.putStop(es.name)
.do(() => {
this.replaceEventConsumer(stop(es));
this.replaceEventConsumer(setStopped(es, true));
})
.notify(this.dialogs);
}
@ -96,11 +96,8 @@ export class EventConsumersState extends State<Snapshot> {
}
}
const start = (es: EventConsumerDto) =>
const setStopped = (es: EventConsumerDto, isStoped: boolean) =>
new EventConsumerDto(es.name, false, false, es.error, es.position);
const stop = (es: EventConsumerDto) =>
new EventConsumerDto(es.name, true, false, es.error, es.position);
const reset = (es: EventConsumerDto) =>
new EventConsumerDto(es.name, es.isStopped, true, es.error, es.position);

2
src/Squidex/app/features/administration/state/users.state.spec.ts

@ -14,8 +14,8 @@ import { UsersState } from './users.state';
import {
CreateUserDto,
UserDto,
UpdateUserDto,
UserDto,
UsersDto,
UsersService
} from './../services/users.service';

4
src/Squidex/app/framework/services/dialog.service.spec.ts

@ -6,10 +6,10 @@
*/
import {
Notification,
DialogRequest,
DialogService,
DialogServiceFactory
DialogServiceFactory,
Notification
} from './dialog.service';
describe('DialogService', () => {

2
src/Squidex/app/shared/guards/app-must-exist.guard.spec.ts

@ -6,8 +6,8 @@
*/
import { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared';

2
src/Squidex/app/shared/guards/load-apps.guard.spec.ts

@ -5,8 +5,8 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared';

2
src/Squidex/app/shared/guards/must-be-authenticated.guard.spec.ts

@ -6,8 +6,8 @@
*/
import { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AuthService } from '@app/shared';

2
src/Squidex/app/shared/guards/must-be-not-authenticated.guard.spec.ts

@ -6,8 +6,8 @@
*/
import { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AuthService } from '@app/shared';

2
src/Squidex/app/shared/guards/unset-app.guard.spec.ts

@ -5,8 +5,8 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared';

6
src/Squidex/app/shared/interceptors/auth.interceptor.spec.ts

@ -5,16 +5,16 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { HTTP_INTERCEPTORS, HttpClient, HttpHeaders } from '@angular/common/http';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { HttpClient, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
import { inject, TestBed } from '@angular/core/testing';
import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import {
ApiUrlConfig,
AuthService,
AuthInterceptor
AuthInterceptor,
AuthService
} from './../';
describe('AuthInterceptor', () => {

4
src/Squidex/app/shared/services/app-contributors.service.spec.ts

@ -14,8 +14,8 @@ import {
AppContributorDto,
AppContributorsDto,
AppContributorsService,
Version,
ContributorAssignedDto
ContributorAssignedDto,
Version
} from './../';
describe('AppContributorsService', () => {

2
src/Squidex/app/shared/services/assets.service.spec.ts

@ -11,9 +11,9 @@ import { inject, TestBed } from '@angular/core/testing';
import {
AnalyticsService,
ApiUrlConfig,
AssetsDto,
AssetDto,
AssetReplacedDto,
AssetsDto,
AssetsService,
DateTime,
UpdateAssetDto,

2
src/Squidex/app/shared/services/plans.service.spec.ts

@ -10,8 +10,8 @@ import { inject, TestBed } from '@angular/core/testing';
import {
AnalyticsService,
AppPlansDto,
ApiUrlConfig,
AppPlansDto,
ChangePlanDto,
PlanChangedDto,
PlanDto,

6
src/Squidex/app/shared/services/rules.service.spec.ts

@ -14,12 +14,12 @@ import {
ApiUrlConfig,
CreateRuleDto,
DateTime,
UpdateRuleDto,
Version,
RuleDto,
RuleEventDto,
RuleEventsDto,
RulesService
RulesService,
UpdateRuleDto,
Version
} from './../';
describe('RuleDto', () => {

2
src/Squidex/app/shared/services/schemas.service.spec.ts

@ -12,8 +12,8 @@ import {
AddFieldDto,
AnalyticsService,
ApiUrlConfig,
CreateSchemaDto,
createProperties,
CreateSchemaDto,
DateTime,
FieldDto,
SchemaDetailsDto,

2
src/Squidex/app/shared/state/assets.state.spec.ts

@ -14,8 +14,8 @@ import {
AssetsDto,
AssetsService,
AssetsState,
DialogService,
DateTime,
DialogService,
Version,
Versioned
} from '@app/shared';

4
src/Squidex/app/shared/state/backups.state.spec.ts

@ -11,11 +11,11 @@ import { IMock, It, Mock, Times } from 'typemoq';
import {
AppsState,
BackupDto,
BackupsState,
BackupsService,
BackupsState,
DateTime,
DialogService
} from '@app/shared';
} from '@app/shared';
describe('BackupsState', () => {
const app = 'my-app';

2
src/Squidex/app/shared/state/clients.state.spec.ts

@ -9,10 +9,10 @@ import { Observable } from 'rxjs';
import { IMock, It, Mock, Times } from 'typemoq';
import {
AppsState,
AppClientDto,
AppClientsDto,
AppClientsService,
AppsState,
ClientsState,
CreateAppClientDto,
DialogService,

2
src/Squidex/app/shared/state/contributors.state.spec.ts

@ -9,10 +9,10 @@ import { Observable } from 'rxjs';
import { IMock, It, Mock, Times } from 'typemoq';
import {
AppsState,
AppContributorDto,
AppContributorsDto,
AppContributorsService,
AppsState,
AuthService,
ContributorsState,
DialogService,

6
src/Squidex/app/shared/state/patterns.state.spec.ts

@ -9,16 +9,16 @@ import { Observable } from 'rxjs';
import { IMock, It, Mock, Times } from 'typemoq';
import {
AppsState,
AppPatternDto,
AppPatternsDto,
AppPatternsService,
PatternsState,
AppsState,
DialogService,
EditAppPatternDto,
PatternsState,
Version,
Versioned
} from '@app/shared';
} from '@app/shared';
describe('PatternsState', () => {
const app = 'my-app';

15
src/Squidex/app/shared/state/plans.state.ts

@ -38,7 +38,6 @@ interface Snapshot {
isOwner?: boolean;
isLoaded?: boolean;
isDisabled?: boolean;
hasPortal?: boolean;
@ -60,7 +59,7 @@ export class PlansState extends State<Snapshot> {
.distinctUntilChanged();
public isDisabled =
this.changes.map(x => !!x.isDisabled || !x.isOwner)
this.changes.map(x => !x.isOwner)
.distinctUntilChanged();
public hasPortal =
@ -93,7 +92,6 @@ export class PlansState extends State<Snapshot> {
plans: ImmutableArray.of(dto.plans.map(x => this.createPlan(x, planId))),
isOwner: !dto.planOwner || dto.planOwner === this.userId,
isLoaded: true,
isDisabled: false,
hasPortal: dto.hasPortal
};
});
@ -102,20 +100,15 @@ export class PlansState extends State<Snapshot> {
}
public change(planId: string): Observable<any> {
this.next(s => ({ ...s, isDisabled: true }));
return this.plansService.putPlan(this.appName, new ChangePlanDto(planId), this.version)
.do(dto => {
if (dto.payload.redirectUri && dto.payload.redirectUri.length > 0) {
this.window.location.href = dto.payload.redirectUri;
} else {
this.next(s => {
return {
...s,
plans: s.plans.map(x => this.createPlan(x.plan, planId)),
isOwner: true,
isDisabled: false
};
const plans = s.plans.map(x => this.createPlan(x.plan, planId));
return { ...s, plans };
});
}
})

8
src/Squidex/app/shared/state/rules.state.spec.ts

@ -13,14 +13,14 @@ import { RulesState } from './rules.state';
import {
AppsState,
AuthService,
DialogService,
CreateRuleDto,
DateTime,
DialogService,
RuleDto,
RulesService,
UpdateRuleDto,
Version,
Versioned,
CreateRuleDto,
UpdateRuleDto
Versioned
} from '@app/shared';
describe('RulesState', () => {

4
src/Squidex/app/shared/state/schemas.state.spec.ts

@ -16,8 +16,8 @@ import {
AuthService,
createProperties,
CreateSchemaDto,
DialogService,
DateTime,
DialogService,
FieldDto,
SchemaDetailsDto,
SchemaDto,
@ -27,7 +27,7 @@ import {
UpdateSchemaScriptsDto,
Version,
Versioned
} from '@app/shared';
} from '@app/shared';
describe('SchemasState', () => {
const app = 'my-app';

3
src/Squidex/package.json

@ -12,7 +12,8 @@
"build": "webpack --config app-config/webpack.run.prod.js --display-error-details --bail --display-optimization-bailout",
"build:nobail": "webpack --config app-config/webpack.run.prod.js --display-error-details",
"build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/",
"build:clean": "rimraf wwwroot/build"
"build:clean": "rimraf wwwroot/build",
"tslint": "tslint app/**/*.ts"
},
"dependencies": {
"@angular/animations": "5.2.1",

Loading…
Cancel
Save