diff --git a/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs b/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs index 85f5c5133..e87b8c68c 100644 --- a/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs +++ b/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs @@ -29,7 +29,7 @@ namespace Squidex.Areas.Api.Controllers.Languages /// Get supported languages. /// /// - /// Provide a list of supported langauges code, following the ISO2Code standard. + /// Provide a list of supported language codes, following the ISO2Code standard. /// /// /// 200 => Supported language codes returned. diff --git a/src/Squidex/app/features/administration/state/event-consumers.state.ts b/src/Squidex/app/features/administration/state/event-consumers.state.ts index ae16e1f21..b333fa44a 100644 --- a/src/Squidex/app/features/administration/state/event-consumers.state.ts +++ b/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; + // Indicates if event consumers are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/features/administration/state/users.state.ts b/src/Squidex/app/features/administration/state/users.state.ts index 05482ff9a..bb34bc5f8 100644 --- a/src/Squidex/app/features/administration/state/users.state.ts +++ b/src/Squidex/app/features/administration/state/users.state.ts @@ -86,18 +86,27 @@ export class UserForm extends Form { } interface SnapshotUser { + // The user. user: UserDto; + // Indicates if the user is the current user. isCurrentUser: boolean; } interface Snapshot { + // The current users. users: ImmutableArray; + + // 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; } diff --git a/src/Squidex/app/shared/state/apps.state.ts b/src/Squidex/app/shared/state/apps.state.ts index 03a261594..388825ab6 100644 --- a/src/Squidex/app/shared/state/apps.state.ts +++ b/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; + // The selected app. selectedApp: AppDto | null; } diff --git a/src/Squidex/app/shared/state/assets.state.ts b/src/Squidex/app/shared/state/assets.state.ts index 072fc170b..5c6fb58cd 100644 --- a/src/Squidex/app/shared/state/assets.state.ts +++ b/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; + + // The pagination information. assetsPager: Pager; + + // The query to filter assets. assetsQuery?: string; + // Indicates if the assets are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/backups.state.ts b/src/Squidex/app/shared/state/backups.state.ts index 975c2b107..02f885354 100644 --- a/src/Squidex/app/shared/state/backups.state.ts +++ b/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; + // Indicates if the backups are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/clients.state.ts b/src/Squidex/app/shared/state/clients.state.ts index 22765adea..bc3ef18b5 100644 --- a/src/Squidex/app/shared/state/clients.state.ts +++ b/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; + // The app version. version: Version; + // Indicates if the clients are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/comments.state.ts b/src/Squidex/app/shared/state/comments.state.ts index 966fd8673..a330ac9ec 100644 --- a/src/Squidex/app/shared/state/comments.state.ts +++ b/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; + // The version of the comments state. version: Version; + // Indicates if the comments are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/contents.state.ts b/src/Squidex/app/shared/state/contents.state.ts index 265ec104f..f93e04e9a 100644 --- a/src/Squidex/app/shared/state/contents.state.ts +++ b/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; + + // 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; } diff --git a/src/Squidex/app/shared/state/contributors.state.ts b/src/Squidex/app/shared/state/contributors.state.ts index 1975dcac0..1531598e6 100644 --- a/src/Squidex/app/shared/state/contributors.state.ts +++ b/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; + // 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; } diff --git a/src/Squidex/app/shared/state/filter.state.ts b/src/Squidex/app/shared/state/filter.state.ts index 9a3f317f8..973d29d3d 100644 --- a/src/Squidex/app/shared/state/filter.state.ts +++ b/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]; } } diff --git a/src/Squidex/app/shared/state/languages.state.ts b/src/Squidex/app/shared/state/languages.state.ts index c0c61e9a1..43659f094 100644 --- a/src/Squidex/app/shared/state/languages.state.ts +++ b/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; + + // The fallback languages that have not been added yet. fallbackLanguagesNew: ImmutableArray; } interface Snapshot { + // the configured languages as plan format. plainLanguages: ImmutableArray; + // All supported languages. allLanguages: ImmutableArray; + + // The languages that have not been added yet. allLanguagesNew: ImmutableArray; + // The configured languages with extra information. languages: ImmutableArray; - isLoaded?: boolean; - + // The app version. version: Version; + + // Indicates if the languages are loaded. + isLoaded?: boolean; } @Injectable() diff --git a/src/Squidex/app/shared/state/patterns.state.ts b/src/Squidex/app/shared/state/patterns.state.ts index ad038005b..649308978 100644 --- a/src/Squidex/app/shared/state/patterns.state.ts +++ b/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; - isLoaded?: boolean; - + // The app version. version: Version; + + // Indicates if the patterns are loaded. + isLoaded?: boolean; } @Injectable() diff --git a/src/Squidex/app/shared/state/plans.state.ts b/src/Squidex/app/shared/state/plans.state.ts index 4687f0fbd..b4ae83ae3 100644 --- a/src/Squidex/app/shared/state/plans.state.ts +++ b/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; + // 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; } diff --git a/src/Squidex/app/shared/state/roles.state.ts b/src/Squidex/app/shared/state/roles.state.ts index 12a6b12e9..b2f6b631b 100644 --- a/src/Squidex/app/shared/state/roles.state.ts +++ b/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; + // The app version. version: Version; + // Indicates if the roles are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/rule-events.state.ts b/src/Squidex/app/shared/state/rule-events.state.ts index 228141ab0..e9fb3a7ec 100644 --- a/src/Squidex/app/shared/state/rule-events.state.ts +++ b/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; + + // The pagination information. ruleEventsPager: Pager; + // Indicates if the rule events are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/rules.state.ts b/src/Squidex/app/shared/state/rules.state.ts index 9005be892..a8cc1dffb 100644 --- a/src/Squidex/app/shared/state/rules.state.ts +++ b/src/Squidex/app/shared/state/rules.state.ts @@ -29,8 +29,10 @@ import { } from './../services/rules.service'; interface Snapshot { + // The current rules. rules: ImmutableArray; + // Indicates if the rules are loaded. isLoaded?: boolean; } diff --git a/src/Squidex/app/shared/state/schemas.state.ts b/src/Squidex/app/shared/state/schemas.state.ts index d878e3704..2a995b8ee 100644 --- a/src/Squidex/app/shared/state/schemas.state.ts +++ b/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; + // Indicates if the schemas are loaded. isLoaded?: boolean; + // The selected schema. selectedSchema?: SchemaDetailsDto | null; } diff --git a/src/Squidex/app/shared/state/ui.state.ts b/src/Squidex/app/shared/state/ui.state.ts index e50535d88..27c7ed597 100644 --- a/src/Squidex/app/shared/state/ui.state.ts +++ b/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; }