Browse Source

Comments for states.

pull/353/head
Sebastian Stehle 8 years ago
parent
commit
0b02d961a6
  1. 2
      src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs
  2. 2
      src/Squidex/app/features/administration/state/event-consumers.state.ts
  3. 9
      src/Squidex/app/features/administration/state/users.state.ts
  4. 2
      src/Squidex/app/shared/state/apps.state.ts
  5. 9
      src/Squidex/app/shared/state/assets.state.ts
  6. 2
      src/Squidex/app/shared/state/backups.state.ts
  7. 3
      src/Squidex/app/shared/state/clients.state.ts
  8. 3
      src/Squidex/app/shared/state/comments.state.ts
  9. 9
      src/Squidex/app/shared/state/contents.state.ts
  10. 8
      src/Squidex/app/shared/state/contributors.state.ts
  11. 21
      src/Squidex/app/shared/state/filter.state.ts
  12. 15
      src/Squidex/app/shared/state/languages.state.ts
  13. 7
      src/Squidex/app/shared/state/patterns.state.ts
  14. 10
      src/Squidex/app/shared/state/plans.state.ts
  15. 3
      src/Squidex/app/shared/state/roles.state.ts
  16. 4
      src/Squidex/app/shared/state/rule-events.state.ts
  17. 2
      src/Squidex/app/shared/state/rules.state.ts
  18. 4
      src/Squidex/app/shared/state/schemas.state.ts
  19. 5
      src/Squidex/app/shared/state/ui.state.ts

2
src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs

@ -29,7 +29,7 @@ namespace Squidex.Areas.Api.Controllers.Languages
/// Get supported languages.
/// </summary>
/// <remarks>
/// Provide a list of supported langauges code, following the ISO2Code standard.
/// Provide a list of supported language codes, following the ISO2Code standard.
/// </remarks>
/// <returns>
/// 200 => Supported language codes returned.

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

@ -19,8 +19,10 @@ import {
import { EventConsumerDto, EventConsumersService } from './../services/event-consumers.service';
interface Snapshot {
// The list of event consumers.
eventConsumers: ImmutableArray<EventConsumerDto>;
// Indicates if event consumers are loaded.
isLoaded?: boolean;
}

9
src/Squidex/app/features/administration/state/users.state.ts

@ -86,18 +86,27 @@ export class UserForm extends Form<FormGroup> {
}
interface SnapshotUser {
// The user.
user: UserDto;
// Indicates if the user is the current user.
isCurrentUser: boolean;
}
interface Snapshot {
// The current users.
users: ImmutableArray<SnapshotUser>;
// The pagination information.
usersPager: Pager;
// The query to filter users.
usersQuery?: string;
// Indicates if the users are loaded.
isLoaded?: boolean;
// The selected user.
selectedUser?: SnapshotUser | null;
}

2
src/Squidex/app/shared/state/apps.state.ts

@ -23,8 +23,10 @@ import {
} from './../services/apps.service';
interface Snapshot {
// All apps, loaded once.
apps: ImmutableArray<AppDto>;
// The selected app.
selectedApp: AppDto | null;
}

9
src/Squidex/app/shared/state/assets.state.ts

@ -21,13 +21,22 @@ import { AssetDto, AssetsService} from './../services/assets.service';
import { AppsState } from './apps.state';
interface Snapshot {
// All assets tags.
tags: { [name: string]: number };
// The selected asset tags.
tagsSelected: { [name: string]: boolean };
// The current assets.
assets: ImmutableArray<AssetDto>;
// The pagination information.
assetsPager: Pager;
// The query to filter assets.
assetsQuery?: string;
// Indicates if the assets are loaded.
isLoaded?: boolean;
}

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

@ -21,8 +21,10 @@ import { AppsState } from './apps.state';
import { BackupDto, BackupsService } from './../services/backups.service';
interface Snapshot {
// The current backups.
backups: ImmutableArray<BackupDto>;
// Indicates if the backups are loaded.
isLoaded?: boolean;
}

3
src/Squidex/app/shared/state/clients.state.ts

@ -27,10 +27,13 @@ import {
} from './../services/app-clients.service';
interface Snapshot {
// The current clients.
clients: ImmutableArray<AppClientDto>;
// The app version.
version: Version;
// Indicates if the clients are loaded.
isLoaded?: boolean;
}

3
src/Squidex/app/shared/state/comments.state.ts

@ -26,10 +26,13 @@ import {
import { AppsState } from './apps.state';
interface Snapshot {
// The current comments.
comments: ImmutableArray<CommentDto>;
// The version of the comments state.
version: Version;
// Indicates if the comments are loaded.
isLoaded?: boolean;
}

9
src/Squidex/app/shared/state/contents.state.ts

@ -29,13 +29,22 @@ import { SchemasState } from './schemas.state';
import { ContentDto, ContentsService, ScheduleDto } from './../services/contents.service';
interface Snapshot {
// The current comments.
contents: ImmutableArray<ContentDto>;
// The pagination information.
contentsPager: Pager;
// The query to filter and sort contents.
contentsQuery?: string;
// Indicates if the contents are loaded.
isLoaded?: boolean;
// Indicates if the archive is shown.
isArchive?: boolean;
// The selected content.
selectedContent?: ContentDto | null;
}

8
src/Squidex/app/shared/state/contributors.state.ts

@ -29,19 +29,27 @@ import { AuthService } from './../services/auth.service';
import { AppsState } from './apps.state';
interface SnapshotContributor {
// The contributor.
contributor: AppContributorDto;
// Indicates if the contributor is the ucrrent user.
isCurrentUser: boolean;
}
interface Snapshot {
// All loaded contributors.
contributors: ImmutableArray<SnapshotContributor>;
// Indicates if the maximum number of contributors are reached.
isMaxReached?: boolean;
// Indicates if the contributors are loaded.
isLoaded?: boolean;
// The maximum allowed users.
maxContributors: number;
// The app version.
version: Version;
}

21
src/Squidex/app/shared/state/filter.state.ts

@ -19,12 +19,25 @@ import { LanguageDto } from '../services/languages.service';
import { RootFieldDto } from '../services/schemas.service';
interface Snapshot {
// The current language.
language?: LanguageDto;
// The order statement.
order?: string;
// The order field.
orderField?: string;
orderType?: string;
// The order direction.
orderDirection?: string;
// The final query.
query?: string;
// The odata filter statement.
filter?: string;
// The odata full text statement.
fullText?: string;
}
@ -100,9 +113,9 @@ function sortMode(snapshot: Snapshot, field: RootFieldDto | string): Sorting {
let path = getFieldPath(snapshot, field);
if (snapshot.orderField === path) {
if (snapshot.orderType === 'asc') {
if (snapshot.orderDirection === 'asc') {
return 'Ascending';
} else if (snapshot.orderType === 'desc') {
} else if (snapshot.orderDirection === 'desc') {
return 'Descending';
}
}
@ -196,7 +209,7 @@ function enrichOrderField(snapshot: Snapshot) {
if (orderParts.length === 2) {
snapshot.orderField = orderParts[0];
snapshot.orderType = orderParts[1];
snapshot.orderDirection = orderParts[1];
}
}

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

@ -22,23 +22,34 @@ import { LanguageDto, LanguagesService } from './../services/languages.service';
import { AppsState } from './apps.state';
interface SnapshotLanguage {
// The language.
language: AppLanguageDto;
// All configured fallback languages.
fallbackLanguages: ImmutableArray<LanguageDto>;
// The fallback languages that have not been added yet.
fallbackLanguagesNew: ImmutableArray<LanguageDto>;
}
interface Snapshot {
// the configured languages as plan format.
plainLanguages: ImmutableArray<AppLanguageDto>;
// All supported languages.
allLanguages: ImmutableArray<LanguageDto>;
// The languages that have not been added yet.
allLanguagesNew: ImmutableArray<LanguageDto>;
// The configured languages with extra information.
languages: ImmutableArray<SnapshotLanguage>;
isLoaded?: boolean;
// The app version.
version: Version;
// Indicates if the languages are loaded.
isLoaded?: boolean;
}
@Injectable()

7
src/Squidex/app/shared/state/patterns.state.ts

@ -26,11 +26,14 @@ import {
} from './../services/app-patterns.service';
interface Snapshot {
// The current patterns.
patterns: ImmutableArray<AppPatternDto>;
isLoaded?: boolean;
// The app version.
version: Version;
// Indicates if the patterns are loaded.
isLoaded?: boolean;
}
@Injectable()

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

@ -27,20 +27,30 @@ import {
} from './../services/plans.service';
interface PlanInfo {
// The plan.
plan: PlanDto;
// Indicates if the yearly subscription is selected.
isYearlySelected?: boolean;
// Indicates if the monthly subscription is selected.
isSelected?: boolean;
}
interface Snapshot {
// The current plans.
plans: ImmutableArray<PlanInfo>;
// Indicates if the user is the plan owner.
isOwner?: boolean;
// Indicates if the plans are loaded.
isLoaded?: boolean;
// Indicates if there is a billing portal for the current Squidex instance.
hasPortal?: boolean;
// The app version.
version: Version;
}

3
src/Squidex/app/shared/state/roles.state.ts

@ -27,10 +27,13 @@ import {
} from './../services/app-roles.service';
interface Snapshot {
// The current roles.
roles: ImmutableArray<AppRoleDto>;
// The app version.
version: Version;
// Indicates if the roles are loaded.
isLoaded?: boolean;
}

4
src/Squidex/app/shared/state/rule-events.state.ts

@ -22,9 +22,13 @@ import { AppsState } from './apps.state';
import { RuleEventDto, RulesService } from './../services/rules.service';
interface Snapshot {
// The current rule events.
ruleEvents: ImmutableArray<RuleEventDto>;
// The pagination information.
ruleEventsPager: Pager;
// Indicates if the rule events are loaded.
isLoaded?: boolean;
}

2
src/Squidex/app/shared/state/rules.state.ts

@ -29,8 +29,10 @@ import {
} from './../services/rules.service';
interface Snapshot {
// The current rules.
rules: ImmutableArray<RuleDto>;
// Indicates if the rules are loaded.
isLoaded?: boolean;
}

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

@ -42,12 +42,16 @@ import { FieldPropertiesDto } from './../services/schemas.types';
type AnyFieldDto = NestedFieldDto | RootFieldDto;
interface Snapshot {
// The schema categories.
categories: { [name: string]: boolean };
// The current schemas.
schemas: ImmutableArray<SchemaDto>;
// Indicates if the schemas are loaded.
isLoaded?: boolean;
// The selected schema.
selectedSchema?: SchemaDetailsDto | null;
}

5
src/Squidex/app/shared/state/ui.state.ts

@ -15,8 +15,13 @@ import { AppsState } from './apps.state';
import { UIService, UISettingsDto } from './../services/ui.service';
interface Snapshot {
// All common settings.
settingsCommon: object & any;
// All app settings.
settingsApp: object & any;
// The merged settings of app and common settings.
settings: object & any;
}

Loading…
Cancel
Save