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. 2
      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. 4
      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. 2
      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 { Component, OnDestroy, OnInit } from '@angular/core';
import { Observable, Subscription } from 'rxjs'; import { Observable, Subscription } from 'rxjs';
import { ImmutableArray, ModalView } from '@app/shared'; import { ModalView } from '@app/shared';
import { EventConsumersState } from '@appfeatures/administration/declarations'; import { EventConsumersState } from '@appfeatures/administration/declarations';
import { EventConsumerDto } from './../../services/event-consumers.service'; import { EventConsumerDto } from './../../services/event-consumers.service';
@ -23,7 +23,6 @@ export class EventConsumersPageComponent implements OnDestroy, OnInit {
public eventConsumerErrorDialog = new ModalView(); public eventConsumerErrorDialog = new ModalView();
public eventConsumerError = ''; public eventConsumerError = '';
public eventConsumers = ImmutableArray.empty<EventConsumerDto>();
constructor( constructor(
public readonly eventConsumersState: EventConsumersState 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. * 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 { FormControl } from '@angular/forms';
import { UserDto } from './../../services/users.service'; import { UserDto } from './../../services/users.service';
@ -14,8 +14,7 @@ import { UsersState } from './../../state/users.state';
@Component({ @Component({
selector: 'sqx-users-page', selector: 'sqx-users-page',
styleUrls: ['./users-page.component.scss'], styleUrls: ['./users-page.component.scss'],
templateUrl: './users-page.component.html', templateUrl: './users-page.component.html'
changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class UsersPageComponent implements OnInit { export class UsersPageComponent implements OnInit {
public usersFilter = new FormControl(); 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 '@app/framework/angular/http/http-extensions';
import { ApiUrlConfig, HTTP } from '@app/framework'; import { ApiUrlConfig, HTTP } from '@app/shared';
export class EventConsumerDto { export class EventConsumerDto {
constructor( constructor(

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

@ -14,8 +14,8 @@ import {
CreateUserDto, CreateUserDto,
UpdateUserDto, UpdateUserDto,
UserDto, UserDto,
UsersService, UsersDto,
UsersDto UsersService
} from './users.service'; } from './users.service';
describe('UsersService', () => { 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 '@app/framework/angular/http/http-extensions';
import { ApiUrlConfig, HTTP } from '@app/framework'; import { ApiUrlConfig, HTTP } from '@app/shared';
export class UsersDto { export class UsersDto {
constructor( 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> { public start(es: EventConsumerDto): Observable<any> {
return this.eventConsumersService.putStart(es.name) return this.eventConsumersService.putStart(es.name)
.do(() => { .do(() => {
this.replaceEventConsumer(start(es)); this.replaceEventConsumer(setStopped(es, false));
}) })
.notify(this.dialogs); .notify(this.dialogs);
} }
@ -74,7 +74,7 @@ export class EventConsumersState extends State<Snapshot> {
public stop(es: EventConsumerDto): Observable<any> { public stop(es: EventConsumerDto): Observable<any> {
return this.eventConsumersService.putStop(es.name) return this.eventConsumersService.putStop(es.name)
.do(() => { .do(() => {
this.replaceEventConsumer(stop(es)); this.replaceEventConsumer(setStopped(es, true));
}) })
.notify(this.dialogs); .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); 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) => const reset = (es: EventConsumerDto) =>
new EventConsumerDto(es.name, es.isStopped, true, es.error, es.position); 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 { import {
CreateUserDto, CreateUserDto,
UserDto,
UpdateUserDto, UpdateUserDto,
UserDto,
UsersDto, UsersDto,
UsersService UsersService
} from './../services/users.service'; } from './../services/users.service';

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

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

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

@ -6,8 +6,8 @@
*/ */
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared'; 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. * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/ */
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared'; 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 { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AuthService } from '@app/shared'; 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 { Router } from '@angular/router';
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AuthService } from '@app/shared'; 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. * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/ */
import { IMock, Mock, Times } from 'typemoq';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq';
import { AppsState } from '@app/shared'; 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. * 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 { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { HttpClient, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
import { inject, TestBed } from '@angular/core/testing'; import { inject, TestBed } from '@angular/core/testing';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IMock, Mock, Times } from 'typemoq'; import { IMock, Mock, Times } from 'typemoq';
import { import {
ApiUrlConfig, ApiUrlConfig,
AuthService, AuthInterceptor,
AuthInterceptor AuthService
} from './../'; } from './../';
describe('AuthInterceptor', () => { describe('AuthInterceptor', () => {

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -11,8 +11,8 @@ import { IMock, It, Mock, Times } from 'typemoq';
import { import {
AppsState, AppsState,
BackupDto, BackupDto,
BackupsState,
BackupsService, BackupsService,
BackupsState,
DateTime, DateTime,
DialogService DialogService
} from '@app/shared'; } from '@app/shared';

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 { IMock, It, Mock, Times } from 'typemoq';
import { import {
AppsState,
AppClientDto, AppClientDto,
AppClientsDto, AppClientsDto,
AppClientsService, AppClientsService,
AppsState,
ClientsState, ClientsState,
CreateAppClientDto, CreateAppClientDto,
DialogService, 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 { IMock, It, Mock, Times } from 'typemoq';
import { import {
AppsState,
AppContributorDto, AppContributorDto,
AppContributorsDto, AppContributorsDto,
AppContributorsService, AppContributorsService,
AppsState,
AuthService, AuthService,
ContributorsState, ContributorsState,
DialogService, DialogService,

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

@ -9,13 +9,13 @@ import { Observable } from 'rxjs';
import { IMock, It, Mock, Times } from 'typemoq'; import { IMock, It, Mock, Times } from 'typemoq';
import { import {
AppsState,
AppPatternDto, AppPatternDto,
AppPatternsDto, AppPatternsDto,
AppPatternsService, AppPatternsService,
PatternsState, AppsState,
DialogService, DialogService,
EditAppPatternDto, EditAppPatternDto,
PatternsState,
Version, Version,
Versioned Versioned
} from '@app/shared'; } from '@app/shared';

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

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

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

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

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

@ -16,8 +16,8 @@ import {
AuthService, AuthService,
createProperties, createProperties,
CreateSchemaDto, CreateSchemaDto,
DialogService,
DateTime, DateTime,
DialogService,
FieldDto, FieldDto,
SchemaDetailsDto, SchemaDetailsDto,
SchemaDto, SchemaDto,

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": "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: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: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": { "dependencies": {
"@angular/animations": "5.2.1", "@angular/animations": "5.2.1",

Loading…
Cancel
Save