From 26f6a9e66f462cbf0ace879352e70b9452de4f38 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 26 Jul 2021 19:21:01 +0200 Subject: [PATCH] Refactoring/angular (#740) * References updated. * Styling fixes. * Style fixes. * Fix selector. --- .../pages/restore/restore-page.component.ts | 11 +- .../pages/users/user-page.component.ts | 22 ++-- .../app/features/apps/pages/app.component.ts | 2 +- .../apps/pages/apps-page.component.scss | 4 + .../apps/pages/news-dialog.component.ts | 2 +- .../assets/pages/asset-tags.component.ts | 2 +- frontend/app/features/content/declarations.ts | 12 +- frontend/app/features/content/module.ts | 14 +-- .../pages/content/content-event.component.ts | 2 +- .../pages/content/content-page.component.ts | 24 ++-- .../editor/content-editor.component.ts | 6 +- .../editor/content-field.component.html | 2 + .../content/editor/content-field.component.ts | 2 +- .../editor/content-section.component.ts | 2 +- .../editor/field-languages.component.html | 4 +- .../editor/field-languages.component.ts | 2 +- .../content-references.component.ts | 2 +- .../contents/contents-page.component.html | 20 +-- .../contents/custom-view-editor.component.ts | 2 +- .../shared/content-extension.component.ts | 2 +- .../shared/forms/array-editor.component.ts | 2 +- .../shared/forms/array-item.component.ts | 2 +- .../shared/forms/assets-editor.component.ts | 2 +- .../forms/component-section.component.ts | 4 +- .../shared/forms/component.component.ts | 2 +- .../shared/forms/field-editor.component.html | 4 +- .../shared/forms/field-editor.component.ts | 4 +- .../shared/forms/iframe-editor.component.ts | 4 +- .../forms/stock-photo-editor.component.ts | 2 +- .../content/shared/list/content.component.ts | 20 +-- .../shared/preview-button.component.ts | 2 +- .../references/content-creator.component.html | 2 +- .../references/content-creator.component.ts | 17 +-- .../references/reference-item.component.html | 2 +- .../references/reference-item.component.ts | 2 +- .../references/references-editor.component.ts | 23 ++-- .../pages/cards/api-calls-card.component.ts | 2 +- .../cards/api-calls-summary-card.component.ts | 2 +- .../pages/cards/api-card.component.ts | 2 +- .../cards/api-performance-card.component.ts | 2 +- .../pages/cards/api-traffic-card.component.ts | 2 +- .../api-traffic-summary-card.component.ts | 2 +- .../asset-uploads-count-card.component.ts | 2 +- .../asset-uploads-size-card.component.ts | 2 +- ...set-uploads-size-summary-card.component.ts | 2 +- .../cards/content-summary-card.component.ts | 12 +- .../pages/cards/github-card.component.ts | 2 +- .../pages/cards/history-card.component.ts | 2 +- .../pages/cards/iframe-card.component.ts | 8 +- .../pages/cards/schema-card.component.ts | 2 +- .../pages/cards/support-card.component.ts | 2 +- .../rules/pages/rules/rule.component.ts | 2 +- .../actions/formattable-input.component.ts | 2 +- .../actions/generic-action.component.ts | 2 +- .../rules/shared/rule-element.component.ts | 2 +- .../asset-changed-trigger.component.ts | 5 +- .../triggers/comment-trigger.component.ts | 5 +- .../content-changed-trigger.component.html | 14 ++- .../content-changed-trigger.component.ts | 2 +- .../schema-changed-trigger.component.ts | 5 +- .../triggers/usage-trigger.component.ts | 2 +- .../common/schema-edit-form.component.ts | 13 +- .../export/schema-export-form.component.ts | 13 +- .../schema/fields/field-wizard.component.ts | 62 +++++----- .../pages/schema/fields/field.component.ts | 13 +- .../forms/field-form-common.component.ts | 2 +- .../fields/forms/field-form-ui.component.ts | 2 +- .../forms/field-form-validation.component.ts | 2 +- .../fields/forms/field-form.component.ts | 2 +- .../schema/fields/schema-fields.component.ts | 2 +- .../types/array-validation.component.ts | 2 +- .../fields/types/assets-ui.component.ts | 2 +- .../types/assets-validation.component.ts | 2 +- .../fields/types/boolean-ui.component.ts | 6 +- .../types/boolean-validation.component.ts | 2 +- .../fields/types/component-ui.component.ts | 2 +- .../types/component-validation.component.ts | 2 +- .../fields/types/components-ui.component.ts | 2 +- .../types/components-validation.component.ts | 2 +- .../fields/types/date-time-ui.component.ts | 5 +- .../types/date-time-validation.component.ts | 2 +- .../fields/types/geolocation-ui.component.ts | 2 +- .../types/geolocation-validation.component.ts | 2 +- .../schema/fields/types/json-ui.component.ts | 2 +- .../fields/types/json-validation.component.ts | 2 +- .../fields/types/number-ui.component.ts | 5 +- .../types/number-validation.component.ts | 2 +- .../fields/types/references-ui.component.ts | 6 +- .../types/references-validation.component.ts | 2 +- .../fields/types/string-ui.component.ts | 6 +- .../types/string-validation.component.ts | 6 +- .../schema/fields/types/tags-ui.component.ts | 6 +- .../fields/types/tags-validation.component.ts | 2 +- .../schema-preview-urls-form.component.ts | 11 +- .../schema-field-rules-form.component.ts | 11 +- .../scripts/schema-scripts-form.component.ts | 11 +- .../pages/schemas/schema-form.component.ts | 11 +- .../pages/backups/backup.component.ts | 2 +- .../clients/client-add-form.component.ts | 11 +- .../clients/client-connect-form.component.ts | 15 ++- .../pages/clients/client.component.ts | 2 +- .../contributor-add-form.component.ts | 21 ++-- .../contributors/contributor.component.ts | 2 +- .../languages/language-add-form.component.ts | 11 +- .../pages/languages/language.component.ts | 13 +- .../pages/more/more-page.component.ts | 29 +++-- .../settings/pages/plans/plan.component.ts | 2 +- .../pages/roles/role-add-form.component.ts | 11 +- .../settings/pages/roles/role.component.ts | 13 +- .../pages/settings/settings-page.component.ts | 11 +- .../workflows/workflow-add-form.component.ts | 11 +- .../workflows/workflow-diagram.component.ts | 2 +- .../workflows/workflow-step.component.html | 4 +- .../workflows/workflow-step.component.scss | 6 +- .../workflows/workflow-step.component.ts | 2 +- .../workflow-transition.component.html | 2 +- .../workflow-transition.component.ts | 2 +- .../pages/workflows/workflow.component.ts | 2 +- .../workflows/workflows-page.component.html | 2 +- .../angular/forms/control-errors.component.ts | 4 +- .../angular/forms/editable-title.component.ts | 2 +- .../forms/editors/autocomplete.component.ts | 2 +- .../forms/editors/checkbox-group.component.ts | 2 +- .../forms/editors/code-editor.component.ts | 2 +- .../forms/editors/color-picker.component.ts | 2 +- .../editors/date-time-editor.component.ts | 2 +- .../forms/editors/dropdown.component.ts | 2 +- .../editors/localized-input.component.html | 6 +- .../editors/localized-input.component.ts | 2 +- .../angular/forms/editors/stars.component.ts | 2 +- .../forms/editors/tag-editor.component.scss | 2 + .../forms/editors/tag-editor.component.ts | 2 +- .../angular/forms/editors/toggle.component.ts | 2 +- .../angular/forms/form-error.component.ts | 2 +- .../angular/language-selector.component.html | 12 +- .../angular/language-selector.component.ts | 14 +-- .../angular/modals/tooltip.directive.ts | 6 +- .../app/framework/angular/pager.component.ts | 2 +- .../angular/status-icon.component.ts | 4 +- .../app/framework/angular/title.component.ts | 2 +- .../app/framework/services/dialog.service.ts | 2 +- .../assets/asset-dialog.component.ts | 45 ++++--- .../assets/asset-folder-dialog.component.ts | 22 ++-- .../assets/asset-folder-dropdown.component.ts | 2 +- .../components/assets/asset.component.ts | 55 ++++---- .../assets/assets-selector.component.html | 8 +- .../contents}/content-list-cell.directive.ts | 2 +- .../content-list-field.component.html | 0 .../content-list-field.component.scss | 0 .../contents}/content-list-field.component.ts | 4 +- .../content-list-header.component.html | 0 .../content-list-header.component.scss | 0 .../content-list-header.component.ts | 4 +- .../contents}/content-status.component.html | 0 .../contents}/content-status.component.scss | 0 .../contents}/content-status.component.ts | 2 +- .../content-value-editor.component.html | 0 .../content-value-editor.component.scss | 0 .../content-value-editor.component.ts | 4 +- .../contents}/content-value.component.html | 0 .../contents}/content-value.component.scss | 0 .../contents}/content-value.component.ts | 4 +- .../forms/geolocation-editor.component.ts | 2 +- .../forms/markdown-editor.component.ts | 21 ++-- .../components/forms/rich-editor.component.ts | 40 +++--- .../history/history-list.component.ts | 2 +- .../content-selector-item.component.html | 4 +- .../content-selector-item.component.scss | 0 .../content-selector-item.component.ts | 4 +- .../content-selector.component.html | 16 +-- .../content-selector.component.scss | 0 .../references/content-selector.component.ts | 13 +- .../reference-dropdown.component.html} | 0 .../reference-dropdown.component.scss} | 0 .../reference-dropdown.component.ts} | 58 ++++----- .../references/reference-input.component.html | 17 +++ .../reference-input.component.scss} | 0 .../references/reference-input.component.ts | 117 ++++++++++++++++++ .../references-checkboxes.component.html | 0 .../references-checkboxes.component.scss | 0 .../references-checkboxes.component.ts | 27 ++-- .../references-tag-converter.ts | 0 .../references-tags.component.html | 0 .../references-tags.component.scss | 0 .../references-tags.component.ts | 19 +-- .../queries/filter-comparison.component.html | 7 +- .../queries/filter-comparison.component.ts | 3 + .../queries/filter-logical.component.html | 1 + .../queries/filter-logical.component.ts | 3 + .../search/queries/filter-node.component.html | 19 ++- .../search/queries/filter-node.component.ts | 3 + .../search/queries/query.component.html | 7 +- .../search/queries/query.component.ts | 3 + .../search/search-form.component.html | 7 +- .../search/search-form.component.ts | 3 + frontend/app/shared/declarations.ts | 15 ++- frontend/app/shared/module.ts | 28 ++++- frontend/app/shared/state/query.ts | 2 +- frontend/app/shared/state/schemas.state.ts | 4 +- .../shell/pages/home/home-page.component.ts | 11 +- .../shell/pages/login/login-page.component.ts | 8 +- .../pages/logout/logout-page.component.ts | 8 +- frontend/app/theme/_bootstrap.scss | 4 + frontend/app/theme/icomoon/fonts/icomoon.eot | Bin 35964 -> 35832 bytes frontend/app/theme/icomoon/fonts/icomoon.svg | 4 +- frontend/app/theme/icomoon/fonts/icomoon.ttf | Bin 35800 -> 35668 bytes frontend/app/theme/icomoon/fonts/icomoon.woff | Bin 35876 -> 35744 bytes frontend/app/theme/icomoon/selection.json | 2 +- frontend/app/theme/icomoon/style.css | 10 +- 209 files changed, 879 insertions(+), 566 deletions(-) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-cell.directive.ts (98%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-field.component.html (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-field.component.scss (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-field.component.ts (95%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-header.component.html (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-header.component.scss (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-list-header.component.ts (95%) rename frontend/app/{features/content/shared => shared/components/contents}/content-status.component.html (100%) rename frontend/app/{features/content/shared => shared/components/contents}/content-status.component.scss (100%) rename frontend/app/{features/content/shared => shared/components/contents}/content-status.component.ts (95%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value-editor.component.html (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value-editor.component.scss (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value-editor.component.ts (83%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value.component.html (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value.component.scss (100%) rename frontend/app/{features/content/shared/list => shared/components/contents}/content-value.component.ts (84%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector-item.component.html (68%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector-item.component.scss (100%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector-item.component.ts (88%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector.component.html (87%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector.component.scss (100%) rename frontend/app/{features/content/shared => shared/components}/references/content-selector.component.ts (92%) rename frontend/app/shared/components/{forms/references-dropdown.component.html => references/reference-dropdown.component.html} (100%) rename frontend/app/shared/components/{forms/references-dropdown.component.scss => references/reference-dropdown.component.scss} (100%) rename frontend/app/shared/components/{forms/references-dropdown.component.ts => references/reference-dropdown.component.ts} (76%) create mode 100644 frontend/app/shared/components/references/reference-input.component.html rename frontend/app/shared/components/{forms/references-checkboxes.component.scss => references/reference-input.component.scss} (100%) create mode 100644 frontend/app/shared/components/references/reference-input.component.ts rename frontend/app/shared/components/{forms => references}/references-checkboxes.component.html (100%) create mode 100644 frontend/app/shared/components/references/references-checkboxes.component.scss rename frontend/app/shared/components/{forms => references}/references-checkboxes.component.ts (85%) rename frontend/app/shared/components/{forms => references}/references-tag-converter.ts (100%) rename frontend/app/shared/components/{forms => references}/references-tags.component.html (100%) rename frontend/app/shared/components/{forms => references}/references-tags.component.scss (100%) rename frontend/app/shared/components/{forms => references}/references-tags.component.ts (87%) diff --git a/frontend/app/features/administration/pages/restore/restore-page.component.ts b/frontend/app/features/administration/pages/restore/restore-page.component.ts index 0333ec034..d3900f351 100644 --- a/frontend/app/features/administration/pages/restore/restore-page.component.ts +++ b/frontend/app/features/administration/pages/restore/restore-page.component.ts @@ -36,10 +36,13 @@ export class RestorePageComponent { this.restoreForm.submitCompleted(); this.backupsService.postRestore(value) - .subscribe(() => { - this.dialogs.notifyInfo('i18n:backups.restoreStarted'); - }, error => { - this.dialogs.notifyError(error); + .subscribe({ + next: () => { + this.dialogs.notifyInfo('i18n:backups.restoreStarted'); + }, + error: error => { + this.dialogs.notifyError(error); + }, }); } } diff --git a/frontend/app/features/administration/pages/users/user-page.component.ts b/frontend/app/features/administration/pages/users/user-page.component.ts index 456d459bd..e54c5f101 100644 --- a/frontend/app/features/administration/pages/users/user-page.component.ts +++ b/frontend/app/features/administration/pages/users/user-page.component.ts @@ -56,17 +56,23 @@ export class UserPageComponent extends ResourceOwner implements OnInit { if (value) { if (this.user) { this.usersState.update(this.user, value) - .subscribe(user => { - this.userForm.submitCompleted({ newValue: user }); - }, error => { - this.userForm.submitFailed(error); + .subscribe({ + next: user => { + this.userForm.submitCompleted({ newValue: user }); + }, + error: error => { + this.userForm.submitFailed(error); + }, }); } else { this.usersState.create(value) - .subscribe(() => { - this.back(); - }, error => { - this.userForm.submitFailed(error); + .subscribe({ + next: () => { + this.back(); + }, + error: error => { + this.userForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/apps/pages/app.component.ts b/frontend/app/features/apps/pages/app.component.ts index 3c1badff3..f5efe63d8 100644 --- a/frontend/app/features/apps/pages/app.component.ts +++ b/frontend/app/features/apps/pages/app.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { AppDto, fadeAnimation, ModalModel } from '@app/shared'; @Component({ - selector: 'sqx-app', + selector: 'sqx-app[app]', styleUrls: ['./app.component.scss'], templateUrl: './app.component.html', animations: [ diff --git a/frontend/app/features/apps/pages/apps-page.component.scss b/frontend/app/features/apps/pages/apps-page.component.scss index 9ba7f6776..ebd2e3868 100644 --- a/frontend/app/features/apps/pages/apps-page.component.scss +++ b/frontend/app/features/apps/pages/apps-page.component.scss @@ -48,6 +48,10 @@ a { text-decoration: none; + + &:hover { + text-decoration: underline; + } } } diff --git a/frontend/app/features/apps/pages/news-dialog.component.ts b/frontend/app/features/apps/pages/news-dialog.component.ts index 43f8e2e8b..39e2a7cad 100644 --- a/frontend/app/features/apps/pages/news-dialog.component.ts +++ b/frontend/app/features/apps/pages/news-dialog.component.ts @@ -9,7 +9,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { FeatureDto } from '@app/shared'; @Component({ - selector: 'sqx-news-dialog', + selector: 'sqx-news-dialog[features]', styleUrls: ['./news-dialog.component.scss'], templateUrl: './news-dialog.component.html', }) diff --git a/frontend/app/features/assets/pages/asset-tags.component.ts b/frontend/app/features/assets/pages/asset-tags.component.ts index 34a5abf1b..ea3d7ca4e 100644 --- a/frontend/app/features/assets/pages/asset-tags.component.ts +++ b/frontend/app/features/assets/pages/asset-tags.component.ts @@ -11,7 +11,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { TagItem, TagsSelected } from '@app/shared'; @Component({ - selector: 'sqx-asset-tags', + selector: 'sqx-asset-tags[tags][tagsSelected]', styleUrls: ['./asset-tags.component.scss'], templateUrl: './asset-tags.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/content/declarations.ts b/frontend/app/features/content/declarations.ts index ed461421f..4f1fb6343 100644 --- a/frontend/app/features/content/declarations.ts +++ b/frontend/app/features/content/declarations.ts @@ -20,25 +20,17 @@ export * from './pages/contents/custom-view-editor.component'; export * from './pages/schemas/schemas-page.component'; export * from './pages/sidebar/sidebar-page.component'; export * from './shared/content-extension.component'; -export * from './shared/content-status.component'; export * from './shared/due-time-selector.component'; export * from './shared/forms/array-editor.component'; export * from './shared/forms/array-item.component'; -export * from './shared/forms/component.component'; -export * from './shared/forms/component-section.component'; export * from './shared/forms/assets-editor.component'; +export * from './shared/forms/component-section.component'; +export * from './shared/forms/component.component'; export * from './shared/forms/field-editor.component'; export * from './shared/forms/iframe-editor.component'; export * from './shared/forms/stock-photo-editor.component'; -export * from './shared/list/content-list-cell.directive'; -export * from './shared/list/content-list-field.component'; -export * from './shared/list/content-list-header.component'; -export * from './shared/list/content-value-editor.component'; -export * from './shared/list/content-value.component'; export * from './shared/list/content.component'; export * from './shared/preview-button.component'; export * from './shared/references/content-creator.component'; -export * from './shared/references/content-selector-item.component'; -export * from './shared/references/content-selector.component'; export * from './shared/references/reference-item.component'; export * from './shared/references/references-editor.component'; diff --git a/frontend/app/features/content/module.ts b/frontend/app/features/content/module.ts index ac668cab6..24a1c1587 100644 --- a/frontend/app/features/content/module.ts +++ b/frontend/app/features/content/module.ts @@ -10,7 +10,7 @@ import { RouterModule, Routes } from '@angular/router'; import { CanDeactivateGuard, ContentMustExistGuard, LoadLanguagesGuard, LoadSchemasGuard, SchemaMustExistPublishedGuard, SchemaMustNotBeSingletonGuard, SqxFrameworkModule, SqxSharedModule } from '@app/shared'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { ScrollingModule as ScrollingModuleExperimental } from '@angular/cdk-experimental/scrolling'; -import { ArrayEditorComponent, ArrayItemComponent, AssetsEditorComponent, CommentsPageComponent, ComponentComponent, ComponentSectionComponent, ContentComponent, ContentCreatorComponent, ContentEditorComponent, ContentEventComponent, ContentExtensionComponent, ContentFieldComponent, ContentHistoryPageComponent, ContentListCellDirective, ContentListFieldComponent, ContentListHeaderComponent, ContentListWidthPipe, ContentPageComponent, ContentReferencesComponent, ContentsColumnsPipe, ContentSectionComponent, ContentSelectorComponent, ContentSelectorItemComponent, ContentsFiltersPageComponent, ContentsPageComponent, ContentStatusComponent, ContentValueComponent, ContentValueEditorComponent, CustomViewEditorComponent, DueTimeSelectorComponent, FieldEditorComponent, FieldLanguagesComponent, IFrameEditorComponent, PreviewButtonComponent, ReferenceItemComponent, ReferencesEditorComponent, SchemasPageComponent, SidebarPageComponent, StockPhotoEditorComponent } from './declarations'; +import { ArrayEditorComponent, ArrayItemComponent, AssetsEditorComponent, CommentsPageComponent, ComponentComponent, ComponentSectionComponent, ContentComponent, ContentCreatorComponent, ContentEditorComponent, ContentEventComponent, ContentExtensionComponent, ContentFieldComponent, ContentHistoryPageComponent, ContentPageComponent, ContentReferencesComponent, ContentSectionComponent, ContentsFiltersPageComponent, ContentsPageComponent, CustomViewEditorComponent, DueTimeSelectorComponent, FieldEditorComponent, FieldLanguagesComponent, IFrameEditorComponent, PreviewButtonComponent, ReferenceItemComponent, ReferencesEditorComponent, SchemasPageComponent, SidebarPageComponent, StockPhotoEditorComponent } from './declarations'; const routes: Routes = [ { @@ -89,29 +89,19 @@ const routes: Routes = [ AssetsEditorComponent, CommentsPageComponent, ComponentComponent, + ContentCreatorComponent, ComponentSectionComponent, ContentComponent, - ContentCreatorComponent, ContentEditorComponent, ContentEventComponent, ContentExtensionComponent, ContentFieldComponent, ContentHistoryPageComponent, - ContentListCellDirective, - ContentListFieldComponent, - ContentListHeaderComponent, - ContentListWidthPipe, ContentPageComponent, ContentReferencesComponent, - ContentsColumnsPipe, ContentSectionComponent, - ContentSelectorComponent, - ContentSelectorItemComponent, ContentsFiltersPageComponent, ContentsPageComponent, - ContentStatusComponent, - ContentValueComponent, - ContentValueEditorComponent, CustomViewEditorComponent, DueTimeSelectorComponent, FieldEditorComponent, diff --git a/frontend/app/features/content/pages/content/content-event.component.ts b/frontend/app/features/content/pages/content/content-event.component.ts index bbd2be611..b483fc804 100644 --- a/frontend/app/features/content/pages/content/content-event.component.ts +++ b/frontend/app/features/content/pages/content/content-event.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Out import { ContentDto, HistoryEventDto } from '@app/shared'; @Component({ - selector: 'sqx-content-event', + selector: 'sqx-content-event[content][event]', styleUrls: ['./content-event.component.scss'], templateUrl: './content-event.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/content/pages/content/content-page.component.ts b/frontend/app/features/content/pages/content/content-page.component.ts index 9ed0631a5..66326867a 100644 --- a/frontend/app/features/content/pages/content/content-page.component.ts +++ b/frontend/app/features/content/pages/content/content-page.component.ts @@ -167,10 +167,13 @@ export class ContentPageComponent extends ResourceOwner implements CanComponentD } this.contentsState.update(this.content, value) - .subscribe(() => { - this.contentForm.submitCompleted({ noReset: true }); - }, error => { - this.contentForm.submitFailed(error); + .subscribe({ + next: () => { + this.contentForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.contentForm.submitFailed(error); + }, }); } else { if (!this.canCreate(publish)) { @@ -178,12 +181,13 @@ export class ContentPageComponent extends ResourceOwner implements CanComponentD } this.contentsState.create(value, publish) - .subscribe(() => { - this.contentForm.submitCompleted({ noReset: true }); - - this.back(); - }, error => { - this.contentForm.submitFailed(error); + .subscribe({ + next: () => { + this.contentForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.contentForm.submitFailed(error); + }, }); } } else { diff --git a/frontend/app/features/content/pages/content/editor/content-editor.component.ts b/frontend/app/features/content/pages/content/editor/content-editor.component.ts index 5abc99891..ffd570502 100644 --- a/frontend/app/features/content/pages/content/editor/content-editor.component.ts +++ b/frontend/app/features/content/pages/content/editor/content-editor.component.ts @@ -9,7 +9,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { AppLanguageDto, EditContentForm, FieldForm, FieldSection, RootFieldDto, SchemaDto, Version } from '@app/shared'; @Component({ - selector: 'sqx-content-editor', + selector: 'sqx-content-editor[contentForm][formContext][language][languages][schema]', styleUrls: ['./content-editor.component.scss'], templateUrl: './content-editor.component.html', }) @@ -36,10 +36,10 @@ export class ContentEditorComponent { public formContext: any; @Input() - public languages: ReadonlyArray; + public language: AppLanguageDto; @Input() - public language: AppLanguageDto; + public languages: ReadonlyArray; public trackBySection(_index: number, section: FieldSection) { return section.separator?.fieldId; diff --git a/frontend/app/features/content/pages/content/editor/content-field.component.html b/frontend/app/features/content/pages/content/editor/content-field.component.html index 42eb41a67..203b6a5c6 100644 --- a/frontend/app/features/content/pages/content/editor/content-field.component.html +++ b/frontend/app/features/content/pages/content/editor/content-field.component.html @@ -81,7 +81,9 @@ diff --git a/frontend/app/features/content/pages/content/editor/content-field.component.ts b/frontend/app/features/content/pages/content/editor/content-field.component.ts index fc229ad71..424879bf6 100644 --- a/frontend/app/features/content/pages/content/editor/content-field.component.ts +++ b/frontend/app/features/content/pages/content/editor/content-field.component.ts @@ -11,7 +11,7 @@ import { combineLatest, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ - selector: 'sqx-content-field', + selector: 'sqx-content-field[form][formContext][formModel][language][languages][schema]', styleUrls: ['./content-field.component.scss'], templateUrl: './content-field.component.html', }) diff --git a/frontend/app/features/content/pages/content/editor/content-section.component.ts b/frontend/app/features/content/pages/content/editor/content-section.component.ts index 4ef1eca30..037f77bcf 100644 --- a/frontend/app/features/content/pages/content/editor/content-section.component.ts +++ b/frontend/app/features/content/pages/content/editor/content-section.component.ts @@ -14,7 +14,7 @@ interface State { } @Component({ - selector: 'sqx-content-section', + selector: 'sqx-content-section[form][formContext][formSection][language][languages][schema]', styleUrls: ['./content-section.component.scss'], templateUrl: './content-section.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/content/pages/content/editor/field-languages.component.html b/frontend/app/features/content/pages/content/editor/field-languages.component.html index 2c089c627..c343194c7 100644 --- a/frontend/app/features/content/pages/content/editor/field-languages.component.html +++ b/frontend/app/features/content/pages/content/editor/field-languages.component.html @@ -12,8 +12,8 @@
diff --git a/frontend/app/features/content/pages/content/editor/field-languages.component.ts b/frontend/app/features/content/pages/content/editor/field-languages.component.ts index c7ec82554..c940f0ba3 100644 --- a/frontend/app/features/content/pages/content/editor/field-languages.component.ts +++ b/frontend/app/features/content/pages/content/editor/field-languages.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { AppLanguageDto, RootFieldDto } from '@app/shared'; @Component({ - selector: 'sqx-field-languages', + selector: 'sqx-field-languages[field][language][languages]', styleUrls: ['./field-languages.component.scss'], templateUrl: './field-languages.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/content/pages/content/references/content-references.component.ts b/frontend/app/features/content/pages/content/references/content-references.component.ts index dcadc8a18..22f27a3e9 100644 --- a/frontend/app/features/content/pages/content/references/content-references.component.ts +++ b/frontend/app/features/content/pages/content/references/content-references.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } f import { AppLanguageDto, ComponentContentsState, ContentDto, QuerySynchronizer, Router2State } from '@app/shared'; @Component({ - selector: 'sqx-content-references', + selector: 'sqx-content-references[content][language][languages]', styleUrls: ['./content-references.component.scss'], templateUrl: './content-references.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/content/pages/contents/contents-page.component.html b/frontend/app/features/content/pages/contents/contents-page.component.html index c29ea5791..7803c5e2f 100644 --- a/frontend/app/features/content/pages/contents/contents-page.component.html +++ b/frontend/app/features/content/pages/contents/contents-page.component.html @@ -13,16 +13,17 @@
+ [query]="contentsState.query | async" + [queryModel]="queryModel | async">
- +
+
+ +
diff --git a/frontend/app/features/rules/shared/triggers/content-changed-trigger.component.ts b/frontend/app/features/rules/shared/triggers/content-changed-trigger.component.ts index 12a5356cf..760564fe5 100644 --- a/frontend/app/features/rules/shared/triggers/content-changed-trigger.component.ts +++ b/frontend/app/features/rules/shared/triggers/content-changed-trigger.component.ts @@ -15,7 +15,7 @@ export interface TriggerSchemaForm { } @Component({ - selector: 'sqx-content-changed-trigger', + selector: 'sqx-content-changed-trigger[trigger][triggerForm]', styleUrls: ['./content-changed-trigger.component.scss'], templateUrl: './content-changed-trigger.component.html', }) diff --git a/frontend/app/features/rules/shared/triggers/schema-changed-trigger.component.ts b/frontend/app/features/rules/shared/triggers/schema-changed-trigger.component.ts index e31079a14..5d52ab6fa 100644 --- a/frontend/app/features/rules/shared/triggers/schema-changed-trigger.component.ts +++ b/frontend/app/features/rules/shared/triggers/schema-changed-trigger.component.ts @@ -9,14 +9,11 @@ import { Component, Input } from '@angular/core'; import { TriggerForm } from '@app/shared'; @Component({ - selector: 'sqx-schema-changed-trigger', + selector: 'sqx-schema-changed-trigger[triggerForm]', styleUrls: ['./schema-changed-trigger.component.scss'], templateUrl: './schema-changed-trigger.component.html', }) export class SchemaChangedTriggerComponent { - @Input() - public trigger: any; - @Input() public triggerForm: TriggerForm; } diff --git a/frontend/app/features/rules/shared/triggers/usage-trigger.component.ts b/frontend/app/features/rules/shared/triggers/usage-trigger.component.ts index b8ea7d20b..4ce7336e2 100644 --- a/frontend/app/features/rules/shared/triggers/usage-trigger.component.ts +++ b/frontend/app/features/rules/shared/triggers/usage-trigger.component.ts @@ -9,7 +9,7 @@ import { Component, Input } from '@angular/core'; import { TriggerForm } from '@app/shared'; @Component({ - selector: 'sqx-usage-trigger', + selector: 'sqx-usage-trigger[triggerForm]', styleUrls: ['./usage-trigger.component.scss'], templateUrl: './usage-trigger.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/common/schema-edit-form.component.ts b/frontend/app/features/schemas/pages/schema/common/schema-edit-form.component.ts index a488d4f5e..bea1f4b62 100644 --- a/frontend/app/features/schemas/pages/schema/common/schema-edit-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/common/schema-edit-form.component.ts @@ -10,7 +10,7 @@ import { FormBuilder } from '@angular/forms'; import { EditSchemaForm, SchemaDto, SchemasState } from '@app/shared'; @Component({ - selector: 'sqx-schema-edit-form', + selector: 'sqx-schema-edit-form[schema]', styleUrls: ['./schema-edit-form.component.scss'], templateUrl: './schema-edit-form.component.html', }) @@ -44,10 +44,13 @@ export class SchemaEditFormComponent implements OnChanges { if (value) { this.schemasState.update(this.schema, value) - .subscribe(() => { - this.fieldForm.submitCompleted({ noReset: true }); - }, error => { - this.fieldForm.submitFailed(error); + .subscribe({ + next: () => { + this.fieldForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.fieldForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/export/schema-export-form.component.ts b/frontend/app/features/schemas/pages/schema/export/schema-export-form.component.ts index 42847ee19..9a33af692 100644 --- a/frontend/app/features/schemas/pages/schema/export/schema-export-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/export/schema-export-form.component.ts @@ -10,7 +10,7 @@ import { FormBuilder } from '@angular/forms'; import { SchemaDto, SchemasState, SynchronizeSchemaForm } from '@app/shared'; @Component({ - selector: 'sqx-schema-export-form', + selector: 'sqx-schema-export-form[schema]', styleUrls: ['./schema-export-form.component.scss'], templateUrl: './schema-export-form.component.html', }) @@ -43,10 +43,13 @@ export class SchemaExportFormComponent implements OnChanges { if (value) { this.schemasState.synchronize(this.schema, value) - .subscribe(() => { - this.synchronizeForm.submitCompleted({ noReset: true }); - }, error => { - this.synchronizeForm.submitFailed(error); + .subscribe({ + next: () => { + this.synchronizeForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.synchronizeForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/fields/field-wizard.component.ts b/frontend/app/features/schemas/pages/schema/fields/field-wizard.component.ts index 827607d8c..8d3d8d837 100644 --- a/frontend/app/features/schemas/pages/schema/fields/field-wizard.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/field-wizard.component.ts @@ -12,7 +12,7 @@ import { AddFieldForm, AppSettingsDto, createProperties, EditFieldForm, FieldDto const DEFAULT_FIELD = { name: '', partitioning: 'invariant', properties: createProperties('String') }; @Component({ - selector: 'sqx-field-wizard', + selector: 'sqx-field-wizard[schema][settings]', styleUrls: ['./field-wizard.component.scss'], templateUrl: './field-wizard.component.html', }) @@ -27,7 +27,7 @@ export class FieldWizardComponent implements OnInit { public settings: AppSettingsDto; @Input() - public parent: RootFieldDto; + public parent: RootFieldDto | null | undefined; @Output() public complete = new EventEmitter(); @@ -65,23 +65,26 @@ export class FieldWizardComponent implements OnInit { if (value) { this.schemasState.addField(this.schema, value, this.parent) - .subscribe(dto => { - this.field = dto; - - this.addFieldForm.submitCompleted({ newValue: { ...DEFAULT_FIELD } }); - - if (addNew) { - if (Types.isFunction(this.nameInput.nativeElement.focus)) { - this.nameInput.nativeElement.focus(); + .subscribe({ + next: dto => { + this.field = dto; + + this.addFieldForm.submitCompleted({ newValue: { ...DEFAULT_FIELD } }); + + if (addNew) { + if (Types.isFunction(this.nameInput.nativeElement.focus)) { + this.nameInput.nativeElement.focus(); + } + } else if (edit) { + this.editForm = new EditFieldForm(this.formBuilder, this.field.properties); + this.editForm.load(this.field.properties); + } else { + this.emitComplete(); } - } else if (edit) { - this.editForm = new EditFieldForm(this.formBuilder, this.field.properties); - this.editForm.load(this.field.properties); - } else { - this.emitComplete(); - } - }, error => { - this.addFieldForm.submitFailed(error); + }, + error: error => { + this.addFieldForm.submitFailed(error); + }, }); } } @@ -97,16 +100,19 @@ export class FieldWizardComponent implements OnInit { const properties = createProperties(this.field.properties.fieldType, value); this.schemasState.updateField(this.schema, this.field as RootFieldDto, { properties }) - .subscribe(() => { - this.editForm!.submitCompleted(); - - if (addNew) { - this.editForm = undefined; - } else { - this.emitComplete(); - } - }, error => { - this.editForm!.submitFailed(error); + .subscribe({ + next: () => { + this.editForm!.submitCompleted(); + + if (addNew) { + this.editForm = undefined; + } else { + this.emitComplete(); + } + }, + error: error => { + this.editForm!.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/fields/field.component.ts b/frontend/app/features/schemas/pages/schema/fields/field.component.ts index 122935d0d..1c78f079c 100644 --- a/frontend/app/features/schemas/pages/schema/fields/field.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/field.component.ts @@ -11,7 +11,7 @@ import { FormBuilder } from '@angular/forms'; import { AppSettingsDto, createProperties, DialogModel, EditFieldForm, fadeAnimation, LanguageDto, ModalModel, NestedFieldDto, RootFieldDto, SchemaDto, SchemasState, sorted } from '@app/shared'; @Component({ - selector: 'sqx-field', + selector: 'sqx-field[field][languages][schema][settings]', styleUrls: ['./field.component.scss'], templateUrl: './field.component.html', animations: [ @@ -112,10 +112,13 @@ export class FieldComponent implements OnChanges { const properties = createProperties(this.field.properties.fieldType, value); this.schemasState.updateField(this.schema, this.field, { properties }) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-common.component.ts b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-common.component.ts index 652fa490f..95e307fe5 100644 --- a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-common.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-common.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto } from '@app/shared'; @Component({ - selector: 'sqx-field-form-common', + selector: 'sqx-field-form-common[field][fieldForm]', styleUrls: ['./field-form-common.component.scss'], templateUrl: './field-form-common.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-ui.component.ts index aa5a8fedf..0c97cae7d 100644 --- a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto } from '@app/shared'; @Component({ - selector: 'sqx-field-form-ui', + selector: 'sqx-field-form-ui[field][fieldForm]', styleUrls: ['./field-form-ui.component.scss'], templateUrl: './field-form-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.ts index 024c0d0a7..ed010d33e 100644 --- a/frontend/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { AppSettingsDto, FieldDto, LanguageDto } from '@app/shared'; @Component({ - selector: 'sqx-field-form-validation', + selector: 'sqx-field-form-validation[field][fieldForm][languages][settings]', styleUrls: ['./field-form-validation.component.scss'], templateUrl: './field-form-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/forms/field-form.component.ts b/frontend/app/features/schemas/pages/schema/fields/forms/field-form.component.ts index 7eb521b2a..989dff6fc 100644 --- a/frontend/app/features/schemas/pages/schema/fields/forms/field-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/forms/field-form.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { AppSettingsDto, FieldDto, LanguageDto } from '@app/shared'; @Component({ - selector: 'sqx-field-form', + selector: 'sqx-field-form[field][fieldForm][languages][settings]', styleUrls: ['./field-form.component.scss'], templateUrl: './field-form.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/schema-fields.component.ts b/frontend/app/features/schemas/pages/schema/fields/schema-fields.component.ts index 5af9e4fab..4274ddd45 100644 --- a/frontend/app/features/schemas/pages/schema/fields/schema-fields.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/schema-fields.component.ts @@ -10,7 +10,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { AppsState, DialogModel, FieldDto, fieldTypes, LanguagesState, SchemaDto, SchemasState, sorted } from '@app/shared'; @Component({ - selector: 'sqx-schema-fields', + selector: 'sqx-schema-fields[schema]', styleUrls: ['./schema-fields.component.scss'], templateUrl: './schema-fields.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/array-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/array-validation.component.ts index 6832b993e..668f47709 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/array-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/array-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { ArrayFieldPropertiesDto, FieldDto, SchemaTagSource } from '@app/shared'; @Component({ - selector: 'sqx-array-validation', + selector: 'sqx-array-validation[field][fieldForm][properties]', styleUrls: ['array-validation.component.scss'], templateUrl: 'array-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/assets-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/assets-ui.component.ts index 21158e4af..77c7eb9b1 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/assets-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/assets-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { AssetsFieldPropertiesDto, FieldDto } from '@app/shared'; @Component({ - selector: 'sqx-assets-ui', + selector: 'sqx-assets-ui[field][fieldForm][properties]', styleUrls: ['assets-ui.component.scss'], templateUrl: 'assets-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/assets-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/assets-validation.component.ts index efa248530..6a3ea33b1 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/assets-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/assets-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { AssetsFieldPropertiesDto, FieldDto, LanguageDto } from '@app/shared'; @Component({ - selector: 'sqx-assets-validation', + selector: 'sqx-assets-validation[field][fieldForm][properties]', styleUrls: ['assets-validation.component.scss'], templateUrl: 'assets-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/boolean-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/boolean-ui.component.ts index eac8ebcb2..be3e0fe92 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/boolean-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/boolean-ui.component.ts @@ -10,11 +10,13 @@ import { FormGroup } from '@angular/forms'; import { BooleanFieldPropertiesDto, BOOLEAN_FIELD_EDITORS, FieldDto } from '@app/shared'; @Component({ - selector: 'sqx-boolean-ui', + selector: 'sqx-boolean-ui[field][fieldForm][properties]', styleUrls: ['boolean-ui.component.scss'], templateUrl: 'boolean-ui.component.html', }) export class BooleanUIComponent { + public readonly editors = BOOLEAN_FIELD_EDITORS; + @Input() public fieldForm: FormGroup; @@ -23,6 +25,4 @@ export class BooleanUIComponent { @Input() public properties: BooleanFieldPropertiesDto; - - public editors = BOOLEAN_FIELD_EDITORS; } diff --git a/frontend/app/features/schemas/pages/schema/fields/types/boolean-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/boolean-validation.component.ts index 3c98d6b6f..a25c7d577 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/boolean-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/boolean-validation.component.ts @@ -11,7 +11,7 @@ import { BooleanFieldPropertiesDto, FieldDto, hasNoValue$, LanguageDto } from '@ import { Observable } from 'rxjs'; @Component({ - selector: 'sqx-boolean-validation', + selector: 'sqx-boolean-validation[field][fieldForm][properties]', styleUrls: ['boolean-validation.component.scss'], templateUrl: 'boolean-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/component-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/component-ui.component.ts index 3b8969d18..c29f57280 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/component-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/component-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, ReferencesFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-component-ui', + selector: 'sqx-component-ui[field][fieldForm][properties]', styleUrls: ['component-ui.component.scss'], templateUrl: 'component-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/component-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/component-validation.component.ts index f5dc27e3b..c9cd6b07d 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/component-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/component-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, ReferencesFieldPropertiesDto, SchemaTagSource } from '@app/shared'; @Component({ - selector: 'sqx-component-validation', + selector: 'sqx-component-validation[field][fieldForm][properties]', styleUrls: ['component-validation.component.scss'], templateUrl: 'component-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/components-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/components-ui.component.ts index f9e614204..369de8539 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/components-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/components-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, ReferencesFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-components-ui', + selector: 'sqx-components-ui[field][fieldForm][properties]', styleUrls: ['components-ui.component.scss'], templateUrl: 'components-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/components-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/components-validation.component.ts index 9a6b41db3..86ed7d9ce 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/components-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/components-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, ReferencesFieldPropertiesDto, SchemaTagSource } from '@app/shared'; @Component({ - selector: 'sqx-components-validation', + selector: 'sqx-components-validation[field][fieldForm][properties]', styleUrls: ['components-validation.component.scss'], templateUrl: 'components-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/date-time-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/date-time-ui.component.ts index d34ac3f78..54f9810a1 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/date-time-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/date-time-ui.component.ts @@ -10,12 +10,13 @@ import { FormGroup } from '@angular/forms'; import { DateTimeFieldPropertiesDto, DATETIME_FIELD_EDITORS, FieldDto, FloatConverter } from '@app/shared'; @Component({ - selector: 'sqx-date-time-ui', + selector: 'sqx-date-time-ui[field][fieldForm][properties]', styleUrls: ['date-time-ui.component.scss'], templateUrl: 'date-time-ui.component.html', }) export class DateTimeUIComponent { public readonly converter = FloatConverter.INSTANCE; + public readonly editors = DATETIME_FIELD_EDITORS; @Input() public fieldForm: FormGroup; @@ -25,6 +26,4 @@ export class DateTimeUIComponent { @Input() public properties: DateTimeFieldPropertiesDto; - - public editors = DATETIME_FIELD_EDITORS; } diff --git a/frontend/app/features/schemas/pages/schema/fields/types/date-time-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/date-time-validation.component.ts index 7b49f8657..3364aafb9 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/date-time-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/date-time-validation.component.ts @@ -13,7 +13,7 @@ import { Observable } from 'rxjs'; const CALCULATED_DEFAULT_VALUES: ReadonlyArray = ['Now', 'Today']; @Component({ - selector: 'sqx-date-time-validation', + selector: 'sqx-date-time-validation[field][fieldForm][properties]', styleUrls: ['date-time-validation.component.scss'], templateUrl: 'date-time-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/geolocation-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/geolocation-ui.component.ts index d198d78f4..5bfb92c4f 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/geolocation-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/geolocation-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, GeolocationFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-geolocation-ui', + selector: 'sqx-geolocation-ui[field][fieldForm][properties]', styleUrls: ['geolocation-ui.component.scss'], templateUrl: 'geolocation-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/geolocation-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/geolocation-validation.component.ts index 66b1cfec3..f44bed6a6 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/geolocation-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/geolocation-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, GeolocationFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-geolocation-validation', + selector: 'sqx-geolocation-validation[field][fieldForm][properties]', styleUrls: ['geolocation-validation.component.scss'], templateUrl: 'geolocation-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/json-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/json-ui.component.ts index e6912d90b..8eb62ae38 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/json-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/json-ui.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, JsonFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-json-ui', + selector: 'sqx-json-ui[field][fieldForm][properties]', styleUrls: ['json-ui.component.scss'], templateUrl: 'json-ui.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/json-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/json-validation.component.ts index 94d09d6b2..ece104155 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/json-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/json-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, JsonFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-json-validation', + selector: 'sqx-json-validation[field][fieldForm][properties]', styleUrls: ['json-validation.component.scss'], templateUrl: 'json-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/number-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/number-ui.component.ts index f5c438ace..ffd27743c 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/number-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/number-ui.component.ts @@ -12,12 +12,13 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ - selector: 'sqx-number-ui', + selector: 'sqx-number-ui[field][fieldForm][properties]', styleUrls: ['number-ui.component.scss'], templateUrl: 'number-ui.component.html', }) export class NumberUIComponent extends ResourceOwner implements OnChanges { public readonly converter = FloatConverter.INSTANCE; + public readonly editors = NUMBER_FIELD_EDITORS; @Input() public fieldForm: FormGroup; @@ -28,8 +29,6 @@ export class NumberUIComponent extends ResourceOwner implements OnChanges { @Input() public properties: NumberFieldPropertiesDto; - public editors = NUMBER_FIELD_EDITORS; - public hideAllowedValues: Observable; public hideInlineEditable: Observable; diff --git a/frontend/app/features/schemas/pages/schema/fields/types/number-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/number-validation.component.ts index b42fe1565..55ced02f6 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/number-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/number-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, LanguageDto, NumberFieldPropertiesDto, RootFieldDto, Types } from '@app/shared'; @Component({ - selector: 'sqx-number-validation', + selector: 'sqx-number-validation[field][fieldForm][properties]', styleUrls: ['number-validation.component.scss'], templateUrl: 'number-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/references-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/references-ui.component.ts index 75906fa81..f49e67b9f 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/references-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/references-ui.component.ts @@ -10,11 +10,13 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, ReferencesFieldPropertiesDto, REFERENCES_FIELD_EDITORS } from '@app/shared'; @Component({ - selector: 'sqx-references-ui', + selector: 'sqx-references-ui[field][fieldForm][properties]', styleUrls: ['references-ui.component.scss'], templateUrl: 'references-ui.component.html', }) export class ReferencesUIComponent { + public readonly editors = REFERENCES_FIELD_EDITORS; + @Input() public fieldForm: FormGroup; @@ -23,6 +25,4 @@ export class ReferencesUIComponent { @Input() public properties: ReferencesFieldPropertiesDto; - - public editors = REFERENCES_FIELD_EDITORS; } diff --git a/frontend/app/features/schemas/pages/schema/fields/types/references-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/references-validation.component.ts index 13ae33fd4..9c2c79513 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/references-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/references-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, LanguageDto, ReferencesFieldPropertiesDto, SchemaTagSource } from '@app/shared'; @Component({ - selector: 'sqx-references-validation', + selector: 'sqx-references-validation[field][fieldForm][properties]', styleUrls: ['references-validation.component.scss'], templateUrl: 'references-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/fields/types/string-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/string-ui.component.ts index f615128f2..de5545e24 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/string-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/string-ui.component.ts @@ -12,11 +12,13 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ - selector: 'sqx-string-ui', + selector: 'sqx-string-ui[field][fieldForm][properties]', styleUrls: ['string-ui.component.scss'], templateUrl: 'string-ui.component.html', }) export class StringUIComponent extends ResourceOwner implements OnChanges { + public readonly editors = STRING_FIELD_EDITORS; + @Input() public fieldForm: FormGroup; @@ -26,8 +28,6 @@ export class StringUIComponent extends ResourceOwner implements OnChanges { @Input() public properties: StringFieldPropertiesDto; - public editors = STRING_FIELD_EDITORS; - public hideAllowedValues: Observable; public hideInlineEditable: Observable; diff --git a/frontend/app/features/schemas/pages/schema/fields/types/string-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/string-validation.component.ts index cc4e9692f..eb34d2b80 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/string-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/string-validation.component.ts @@ -11,7 +11,7 @@ import { AppSettingsDto, fadeAnimation, FieldDto, hasNoValue$, hasValue$, Langua import { Observable } from 'rxjs'; @Component({ - selector: 'sqx-string-validation', + selector: 'sqx-string-validation[field][fieldForm][properties]', styleUrls: ['string-validation.component.scss'], templateUrl: 'string-validation.component.html', animations: [ @@ -19,6 +19,8 @@ import { Observable } from 'rxjs'; ], }) export class StringValidationComponent extends ResourceOwner implements OnChanges { + public readonly contentTypes = STRING_CONTENT_TYPES; + @Input() public fieldForm: FormGroup; @@ -37,8 +39,6 @@ export class StringValidationComponent extends ResourceOwner implements OnChange @Input() public isLocalizable?: boolean | null; - public contentTypes = STRING_CONTENT_TYPES; - public showPatternMessage: Observable; public showPatternSuggestions: Observable; diff --git a/frontend/app/features/schemas/pages/schema/fields/types/tags-ui.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/tags-ui.component.ts index 33e2f8432..c39e09af5 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/tags-ui.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/tags-ui.component.ts @@ -10,11 +10,13 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, TagsFieldPropertiesDto, TAGS_FIELD_EDITORS } from '@app/shared'; @Component({ - selector: 'sqx-tags-ui', + selector: 'sqx-tags-ui[field][fieldForm][properties]', styleUrls: ['tags-ui.component.scss'], templateUrl: 'tags-ui.component.html', }) export class TagsUIComponent { + public readonly editors = TAGS_FIELD_EDITORS; + @Input() public fieldForm: FormGroup; @@ -23,6 +25,4 @@ export class TagsUIComponent { @Input() public properties: TagsFieldPropertiesDto; - - public editors = TAGS_FIELD_EDITORS; } diff --git a/frontend/app/features/schemas/pages/schema/fields/types/tags-validation.component.ts b/frontend/app/features/schemas/pages/schema/fields/types/tags-validation.component.ts index 76108aebe..2e56da61d 100644 --- a/frontend/app/features/schemas/pages/schema/fields/types/tags-validation.component.ts +++ b/frontend/app/features/schemas/pages/schema/fields/types/tags-validation.component.ts @@ -10,7 +10,7 @@ import { FormGroup } from '@angular/forms'; import { FieldDto, LanguageDto, TagsFieldPropertiesDto } from '@app/shared'; @Component({ - selector: 'sqx-tags-validation', + selector: 'sqx-tags-validation[field][fieldForm][languages][properties]', styleUrls: ['tags-validation.component.scss'], templateUrl: 'tags-validation.component.html', }) diff --git a/frontend/app/features/schemas/pages/schema/preview/schema-preview-urls-form.component.ts b/frontend/app/features/schemas/pages/schema/preview/schema-preview-urls-form.component.ts index 22e1f718e..06e9e2100 100644 --- a/frontend/app/features/schemas/pages/schema/preview/schema-preview-urls-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/preview/schema-preview-urls-form.component.ts @@ -48,10 +48,13 @@ export class SchemaPreviewUrlsFormComponent implements OnChanges { if (value) { this.schemasState.configurePreviewUrls(this.schema, value) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts b/frontend/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts index e357d8e2e..93b2425b9 100644 --- a/frontend/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts @@ -67,10 +67,13 @@ export class SchemaFieldRulesFormComponent implements OnChanges { if (value) { this.schemasState.configureFieldRules(this.schema, value) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schema/scripts/schema-scripts-form.component.ts b/frontend/app/features/schemas/pages/schema/scripts/schema-scripts-form.component.ts index 1f1d9d473..4a6b5d2c6 100644 --- a/frontend/app/features/schemas/pages/schema/scripts/schema-scripts-form.component.ts +++ b/frontend/app/features/schemas/pages/schema/scripts/schema-scripts-form.component.ts @@ -56,10 +56,13 @@ export class SchemaScriptsFormComponent implements OnChanges { if (value) { this.schemasState.configureScripts(this.schema, value) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/schemas/pages/schemas/schema-form.component.ts b/frontend/app/features/schemas/pages/schemas/schema-form.component.ts index 3c7bcbaaa..cfc3eaae8 100644 --- a/frontend/app/features/schemas/pages/schemas/schema-form.component.ts +++ b/frontend/app/features/schemas/pages/schemas/schema-form.component.ts @@ -57,10 +57,13 @@ export class SchemaFormComponent implements OnInit { if (value) { this.schemasState.create(value) - .subscribe(dto => { - this.emitComplete(dto); - }, error => { - this.createForm.submitFailed(error); + .subscribe({ + next: dto => { + this.emitComplete(dto); + }, + error: error => { + this.createForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/backups/backup.component.ts b/frontend/app/features/settings/pages/backups/backup.component.ts index 9c43f18bc..afcb437ab 100644 --- a/frontend/app/features/settings/pages/backups/backup.component.ts +++ b/frontend/app/features/settings/pages/backups/backup.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ApiUrlConfig, BackupDto, BackupsState, Duration } from '@app/shared'; @Component({ - selector: 'sqx-backup', + selector: 'sqx-backup[backup]', styleUrls: ['./backup.component.scss'], templateUrl: './backup.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/settings/pages/clients/client-add-form.component.ts b/frontend/app/features/settings/pages/clients/client-add-form.component.ts index a317201e7..63602cb51 100644 --- a/frontend/app/features/settings/pages/clients/client-add-form.component.ts +++ b/frontend/app/features/settings/pages/clients/client-add-form.component.ts @@ -29,10 +29,13 @@ export class ClientAddFormComponent { if (value) { this.clientsState.attach(value) - .subscribe(() => { - this.addClientForm.submitCompleted(); - }, error => { - this.addClientForm.submitFailed(error); + .subscribe({ + next: () => { + this.addClientForm.submitCompleted(); + }, + error: error => { + this.addClientForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/clients/client-connect-form.component.ts b/frontend/app/features/settings/pages/clients/client-connect-form.component.ts index 4832e9e4d..fc4e30cfe 100644 --- a/frontend/app/features/settings/pages/clients/client-connect-form.component.ts +++ b/frontend/app/features/settings/pages/clients/client-connect-form.component.ts @@ -51,12 +51,15 @@ export class ClientConnectFormComponent implements OnInit { this.connectLibraryText = connectLibrary(this.apiUrl, this.appName, this.client); this.clientsService.createToken(this.appsState.appName, this.client) - .subscribe(dto => { - this.connectToken = dto; - - this.changeDetector.markForCheck(); - }, error => { - this.dialogs.notifyError(error); + .subscribe({ + next: dto => { + this.connectToken = dto; + + this.changeDetector.markForCheck(); + }, + error: error => { + this.dialogs.notifyError(error); + }, }); } diff --git a/frontend/app/features/settings/pages/clients/client.component.ts b/frontend/app/features/settings/pages/clients/client.component.ts index 42f08c747..c331fd122 100644 --- a/frontend/app/features/settings/pages/clients/client.component.ts +++ b/frontend/app/features/settings/pages/clients/client.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } f import { AppsState, ClientDto, ClientsState, DialogModel, RoleDto } from '@app/shared'; @Component({ - selector: 'sqx-client', + selector: 'sqx-client[client][clientRoles]', styleUrls: ['./client.component.scss'], templateUrl: './client.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/settings/pages/contributors/contributor-add-form.component.ts b/frontend/app/features/settings/pages/contributors/contributor-add-form.component.ts index b7decbb50..23ea48b20 100644 --- a/frontend/app/features/settings/pages/contributors/contributor-add-form.component.ts +++ b/frontend/app/features/settings/pages/contributors/contributor-add-form.component.ts @@ -71,16 +71,19 @@ export class ContributorAddFormComponent implements OnChanges { if (value) { this.contributorsState.assign(value) - .subscribe(isCreated => { - this.assignContributorForm.submitCompleted({ newValue: this.defaultValue }); + .subscribe({ + next: isCreated => { + this.assignContributorForm.submitCompleted({ newValue: this.defaultValue }); - if (isCreated) { - this.dialogs.notifyInfo('i18n:contributors.contributorAssigned'); - } else { - this.dialogs.notifyInfo('i18n:contributors.contributorAssignedOld'); - } - }, error => { - this.assignContributorForm.submitFailed(error); + if (isCreated) { + this.dialogs.notifyInfo('i18n:contributors.contributorAssigned'); + } else { + this.dialogs.notifyInfo('i18n:contributors.contributorAssignedOld'); + } + }, + error: error => { + this.assignContributorForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/contributors/contributor.component.ts b/frontend/app/features/settings/pages/contributors/contributor.component.ts index 942ba9ef6..4838cd609 100644 --- a/frontend/app/features/settings/pages/contributors/contributor.component.ts +++ b/frontend/app/features/settings/pages/contributors/contributor.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ContributorDto, ContributorsState, RoleDto } from '@app/shared'; @Component({ - selector: '[sqxContributor]', + selector: '[sqxContributor][roles]', styleUrls: ['./contributor.component.scss'], templateUrl: './contributor.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/settings/pages/languages/language-add-form.component.ts b/frontend/app/features/settings/pages/languages/language-add-form.component.ts index da7e5a4bb..61fc90f41 100644 --- a/frontend/app/features/settings/pages/languages/language-add-form.component.ts +++ b/frontend/app/features/settings/pages/languages/language-add-form.component.ts @@ -40,10 +40,13 @@ export class LanguageAddFormComponent implements OnChanges { if (value) { this.languagesState.add(value.language) - .subscribe(() => { - this.addLanguageForm.submitCompleted(); - }, error => { - this.addLanguageForm.submitFailed(error); + .subscribe({ + next: () => { + this.addLanguageForm.submitCompleted(); + }, + error: error => { + this.addLanguageForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/languages/language.component.ts b/frontend/app/features/settings/pages/languages/language.component.ts index c94e3b152..f3708d5f3 100644 --- a/frontend/app/features/settings/pages/languages/language.component.ts +++ b/frontend/app/features/settings/pages/languages/language.component.ts @@ -11,7 +11,7 @@ import { FormBuilder } from '@angular/forms'; import { AppLanguageDto, EditLanguageForm, LanguageDto, LanguagesState, sorted } from '@app/shared'; @Component({ - selector: 'sqx-language', + selector: 'sqx-language[language][fallbackLanguages][fallbackLanguagesNew]', styleUrls: ['./language.component.scss'], templateUrl: './language.component.html', }) @@ -70,10 +70,13 @@ export class LanguageComponent implements OnChanges { const request = { ...value, fallback: this.fallbackLanguages.map(x => x.iso2Code) }; this.languagesState.update(this.language, request) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/more/more-page.component.ts b/frontend/app/features/settings/pages/more/more-page.component.ts index d566a9dcb..4d90fd67c 100644 --- a/frontend/app/features/settings/pages/more/more-page.component.ts +++ b/frontend/app/features/settings/pages/more/more-page.component.ts @@ -61,10 +61,13 @@ export class MorePageComponent extends ResourceOwner implements OnInit { if (value) { this.appsState.update(this.app, value) - .subscribe(app => { - this.updateForm.submitCompleted({ newValue: app }); - }, error => { - this.updateForm.submitFailed(error); + .subscribe({ + next: app => { + this.updateForm.submitCompleted({ newValue: app }); + }, + error: error => { + this.updateForm.submitFailed(error); + }, }); } } @@ -78,14 +81,18 @@ export class MorePageComponent extends ResourceOwner implements OnInit { this.uploadProgress = 0; this.appsState.uploadImage(this.app, file[0]) - .subscribe(value => { + .subscribe({ + next: value => { if (Types.isNumber(value)) { - this.uploadProgress = value; - } - }, () => { - this.uploading = false; - }, () => { - this.uploading = false; + this.uploadProgress = value; + } + }, + error: () => { + this.uploading = false; + }, + complete: () => { + this.uploading = false; + }, }); } diff --git a/frontend/app/features/settings/pages/plans/plan.component.ts b/frontend/app/features/settings/pages/plans/plan.component.ts index 1e8752e42..be5518425 100644 --- a/frontend/app/features/settings/pages/plans/plan.component.ts +++ b/frontend/app/features/settings/pages/plans/plan.component.ts @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { PlanInfo, PlansState } from '@app/shared'; @Component({ - selector: 'sqx-plan', + selector: 'sqx-plan[planInfo]', styleUrls: ['./plan.component.scss'], templateUrl: './plan.component.html', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/frontend/app/features/settings/pages/roles/role-add-form.component.ts b/frontend/app/features/settings/pages/roles/role-add-form.component.ts index af8ba44b4..4f218803e 100644 --- a/frontend/app/features/settings/pages/roles/role-add-form.component.ts +++ b/frontend/app/features/settings/pages/roles/role-add-form.component.ts @@ -29,10 +29,13 @@ export class RoleAddFormComponent { if (value) { this.rolesState.add(value) - .subscribe(() => { - this.addRoleForm.submitCompleted(); - }, error => { - this.addRoleForm.submitFailed(error); + .subscribe({ + next: () => { + this.addRoleForm.submitCompleted(); + }, + error: error => { + this.addRoleForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/roles/role.component.ts b/frontend/app/features/settings/pages/roles/role.component.ts index e69016d28..b55f92fe9 100644 --- a/frontend/app/features/settings/pages/roles/role.component.ts +++ b/frontend/app/features/settings/pages/roles/role.component.ts @@ -33,7 +33,7 @@ const SIMPLE_PROPERTIES: ReadonlyArray = [{ }]; @Component({ - selector: 'sqx-role', + selector: 'sqx-role[allPermissions][role][schemas]', styleUrls: ['./role.component.scss'], templateUrl: './role.component.html', changeDetection: ChangeDetectionStrategy.OnPush, @@ -121,10 +121,13 @@ export class RoleComponent implements OnChanges { if (value) { this.rolesState.update(this.role, { ...value, properties: this.properties }) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/settings/settings-page.component.ts b/frontend/app/features/settings/pages/settings/settings-page.component.ts index f0ae60760..8bd2ae970 100644 --- a/frontend/app/features/settings/pages/settings/settings-page.component.ts +++ b/frontend/app/features/settings/pages/settings/settings-page.component.ts @@ -57,10 +57,13 @@ export class SettingsPageComponent extends ResourceOwner implements OnInit { if (value) { this.appsState.updateSettings(this.editingSettings, value) - .subscribe(() => { - this.editForm.submitCompleted({ noReset: true }); - }, error => { - this.editForm.submitFailed(error); + .subscribe({ + next: () => { + this.editForm.submitCompleted({ noReset: true }); + }, + error: error => { + this.editForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/workflows/workflow-add-form.component.ts b/frontend/app/features/settings/pages/workflows/workflow-add-form.component.ts index 79b1b7d7f..a31a81881 100644 --- a/frontend/app/features/settings/pages/workflows/workflow-add-form.component.ts +++ b/frontend/app/features/settings/pages/workflows/workflow-add-form.component.ts @@ -29,10 +29,13 @@ export class WorkflowAddFormComponent { if (value) { this.workflowsState.add(value.name) - .subscribe(() => { - this.addWorkflowForm.submitCompleted(); - }, error => { - this.addWorkflowForm.submitFailed(error); + .subscribe({ + next: () => { + this.addWorkflowForm.submitCompleted(); + }, + error: error => { + this.addWorkflowForm.submitFailed(error); + }, }); } } diff --git a/frontend/app/features/settings/pages/workflows/workflow-diagram.component.ts b/frontend/app/features/settings/pages/workflows/workflow-diagram.component.ts index 3aec67840..727ad164f 100644 --- a/frontend/app/features/settings/pages/workflows/workflow-diagram.component.ts +++ b/frontend/app/features/settings/pages/workflows/workflow-diagram.component.ts @@ -11,7 +11,7 @@ import { ResourceLoaderService, WorkflowDto } from '@app/shared'; declare const vis: any; @Component({ - selector: 'sqx-workflow-diagram', + selector: 'sqx-workflow-diagram[workflow]', styleUrls: ['./workflow-diagram.component.scss'], templateUrl: './workflow-diagram.component.html', }) diff --git a/frontend/app/features/settings/pages/workflows/workflow-step.component.html b/frontend/app/features/settings/pages/workflows/workflow-step.component.html index a672c028f..679c2935c 100644 --- a/frontend/app/features/settings/pages/workflows/workflow-step.component.html +++ b/frontend/app/features/settings/pages/workflows/workflow-step.component.html @@ -60,8 +60,8 @@
-
-
+
+
+
diff --git a/frontend/app/features/settings/pages/workflows/workflow-transition.component.ts b/frontend/app/features/settings/pages/workflows/workflow-transition.component.ts index f218cd732..35ce4d70d 100644 --- a/frontend/app/features/settings/pages/workflows/workflow-transition.component.ts +++ b/frontend/app/features/settings/pages/workflows/workflow-transition.component.ts @@ -9,7 +9,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { RoleDto, WorkflowTransitionValues, WorkflowTransitionView } from '@app/shared'; @Component({ - selector: 'sqx-workflow-transition', + selector: 'sqx-workflow-transition[roles][transition]', styleUrls: ['./workflow-transition.component.scss'], templateUrl: './workflow-transition.component.html', }) diff --git a/frontend/app/features/settings/pages/workflows/workflow.component.ts b/frontend/app/features/settings/pages/workflows/workflow.component.ts index cf5e11bf6..f84cda413 100644 --- a/frontend/app/features/settings/pages/workflows/workflow.component.ts +++ b/frontend/app/features/settings/pages/workflows/workflow.component.ts @@ -9,7 +9,7 @@ import { Component, Input, OnChanges } from '@angular/core'; import { ErrorDto, MathHelper, SchemaTagSource, WorkflowDto, WorkflowsState, WorkflowStep, WorkflowStepValues, WorkflowTransition, WorkflowTransitionValues } from '@app/shared'; @Component({ - selector: 'sqx-workflow', + selector: 'sqx-workflow[roles][schemasSource][workflow]', styleUrls: ['./workflow.component.scss'], templateUrl: './workflow.component.html', }) diff --git a/frontend/app/features/settings/pages/workflows/workflows-page.component.html b/frontend/app/features/settings/pages/workflows/workflows-page.component.html index 720e6f2a6..64ec85074 100644 --- a/frontend/app/features/settings/pages/workflows/workflows-page.component.html +++ b/frontend/app/features/settings/pages/workflows/workflows-page.component.html @@ -1,6 +1,6 @@ - +
-
+ [queryModel]="queryModel">
- +
@@ -47,7 +49,7 @@ (ngModelChange)="selectAll($event)"> - + - + @@ -92,8 +94,8 @@ {{ 'common.cancel' | sqxTranslate }} - \ No newline at end of file diff --git a/frontend/app/features/content/shared/references/content-selector.component.scss b/frontend/app/shared/components/references/content-selector.component.scss similarity index 100% rename from frontend/app/features/content/shared/references/content-selector.component.scss rename to frontend/app/shared/components/references/content-selector.component.scss diff --git a/frontend/app/features/content/shared/references/content-selector.component.ts b/frontend/app/shared/components/references/content-selector.component.ts similarity index 92% rename from frontend/app/features/content/shared/references/content-selector.component.ts rename to frontend/app/shared/components/references/content-selector.component.ts index 14a8ea92c..209e7255a 100644 --- a/frontend/app/features/content/shared/references/content-selector.component.ts +++ b/frontend/app/shared/components/references/content-selector.component.ts @@ -6,10 +6,10 @@ */ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { ApiUrlConfig, AppsState, ComponentContentsState, ContentDto, LanguageDto, Query, QueryModel, queryModelFromSchema, ResourceOwner, SchemaDto, SchemasState } from '@app/shared'; +import { ApiUrlConfig, AppsState, ComponentContentsState, ContentDto, LanguageDto, Query, QueryModel, queryModelFromSchema, ResourceOwner, SchemaDto, SchemasState } from '@app/shared/internal'; @Component({ - selector: 'sqx-content-selector', + selector: 'sqx-content-selector[language][languages]', styleUrls: ['./content-selector.component.scss'], templateUrl: './content-selector.component.html', providers: [ @@ -20,11 +20,14 @@ export class ContentSelectorComponent extends ResourceOwner implements OnInit { @Output() public select = new EventEmitter>(); + @Input() + public maxItems = Number.MAX_VALUE; + @Input() public schemaName?: string | null; @Input() - public schemaIds: ReadonlyArray; + public schemaIds?: ReadonlyArray; @Input() public language: LanguageDto; @@ -36,7 +39,7 @@ export class ContentSelectorComponent extends ResourceOwner implements OnInit { public allowDuplicates?: boolean | null; @Input() - public alreadySelected: ReadonlyArray; + public alreadySelected: ReadonlyArray | undefined | null; public schema: SchemaDto; public schemas: ReadonlyArray = []; @@ -66,7 +69,7 @@ export class ContentSelectorComponent extends ResourceOwner implements OnInit { this.schemas = this.schemasState.snapshot.schemas.filter(x => x.canReadContents); if (this.schemaIds && this.schemaIds.length > 0) { - this.schemas = this.schemas.filter(x => this.schemaIds.indexOf(x.id) >= 0); + this.schemas = this.schemas.filter(x => this.schemaIds!.indexOf(x.id) >= 0); } this.selectSchema(this.schemas[0]); diff --git a/frontend/app/shared/components/forms/references-dropdown.component.html b/frontend/app/shared/components/references/reference-dropdown.component.html similarity index 100% rename from frontend/app/shared/components/forms/references-dropdown.component.html rename to frontend/app/shared/components/references/reference-dropdown.component.html diff --git a/frontend/app/shared/components/forms/references-dropdown.component.scss b/frontend/app/shared/components/references/reference-dropdown.component.scss similarity index 100% rename from frontend/app/shared/components/forms/references-dropdown.component.scss rename to frontend/app/shared/components/references/reference-dropdown.component.scss diff --git a/frontend/app/shared/components/forms/references-dropdown.component.ts b/frontend/app/shared/components/references/reference-dropdown.component.ts similarity index 76% rename from frontend/app/shared/components/forms/references-dropdown.component.ts rename to frontend/app/shared/components/references/reference-dropdown.component.ts index 149981b58..a261ed5d3 100644 --- a/frontend/app/shared/components/forms/references-dropdown.component.ts +++ b/frontend/app/shared/components/references/reference-dropdown.component.ts @@ -9,8 +9,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, Inpu import { FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; import { AppsState, ContentDto, ContentsService, getContentValue, LanguageDto, LocalizerService, StatefulControlComponent, Types, UIOptions, value$ } from '@app/shared/internal'; -export const SQX_REFERENCES_DROPDOWN_CONTROL_VALUE_ACCESSOR: any = { - provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ReferencesDropdownComponent), multi: true, +export const SQX_REFERENCE_DROPDOWN_CONTROL_VALUE_ACCESSOR: any = { + provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ReferenceDropdownComponent), multi: true, }; interface State { @@ -29,42 +29,34 @@ type ContentName = { name: string; id?: string }; const NO_EMIT = { emitEvent: false }; @Component({ - selector: 'sqx-references-dropdown', - styleUrls: ['./references-dropdown.component.scss'], - templateUrl: './references-dropdown.component.html', + selector: 'sqx-reference-dropdown[schemaId]', + styleUrls: ['./reference-dropdown.component.scss'], + templateUrl: './reference-dropdown.component.html', providers: [ - SQX_REFERENCES_DROPDOWN_CONTROL_VALUE_ACCESSOR, + SQX_REFERENCE_DROPDOWN_CONTROL_VALUE_ACCESSOR, ], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class ReferencesDropdownComponent extends StatefulControlComponent | string> implements OnChanges { +export class ReferenceDropdownComponent extends StatefulControlComponent | string> implements OnChanges { private readonly itemCount: number; - private languageField: LanguageDto; private selectedId: string | undefined; @Input() - public schemaId: string; + public language: LanguageDto; @Input() - public mode: 'Array' | 'Single'; + public schemaId: string; @Input() - public set disabled(value: boolean | null | undefined) { - this.setDisabledState(value === true); - } + public mode: 'Array' | 'Single' = 'Single'; @Input() - public set language(value: LanguageDto) { - this.languageField = value; - - this.next(s => ({ - ...s, - contentNames: this.createContentNames(s.contents), - })); + public set disabled(value: boolean | undefined | null) { + this.setDisabledState(value === true); } public get isValid() { - return !!this.schemaId && !!this.languageField; + return !!this.schemaId && !!this.language; } public control = new FormControl(''); @@ -108,19 +100,29 @@ export class ReferencesDropdownComponent extends StatefulControlComponent { - const contentNames = this.createContentNames(contents); + .subscribe({ + next: ({ items: contents }) => { + const contentNames = this.createContentNames(contents); - this.next({ contents, contentNames }); + this.next({ contents, contentNames }); - this.selectContent(); - }, () => { - this.control.disable(NO_EMIT); + this.selectContent(); + }, + error: () => { + this.control.disable(NO_EMIT); + }, }); } else { this.control.disable(NO_EMIT); } } + + if (changes['language']) { + this.next(s => ({ + ...s, + contentNames: this.createContentNames(this.snapshot.contents), + })); + } } public onDisabled(isDisabled: boolean) { @@ -163,7 +165,7 @@ export class ReferencesDropdownComponent extends StatefulControlComponent { const name = content.referenceFields - .map(f => getContentValue(content, this.languageField, f, false)) + .map(f => getContentValue(content, this.language, f, false)) .map(v => v.formatted || this.localizer.getOrKey('common.noValue')) .filter(v => !!v) .join(', '); diff --git a/frontend/app/shared/components/references/reference-input.component.html b/frontend/app/shared/components/references/reference-input.component.html new file mode 100644 index 000000000..ebde93d3f --- /dev/null +++ b/frontend/app/shared/components/references/reference-input.component.html @@ -0,0 +1,17 @@ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/frontend/app/shared/components/forms/references-checkboxes.component.scss b/frontend/app/shared/components/references/reference-input.component.scss similarity index 100% rename from frontend/app/shared/components/forms/references-checkboxes.component.scss rename to frontend/app/shared/components/references/reference-input.component.scss diff --git a/frontend/app/shared/components/references/reference-input.component.ts b/frontend/app/shared/components/references/reference-input.component.ts new file mode 100644 index 000000000..1fedf9f29 --- /dev/null +++ b/frontend/app/shared/components/references/reference-input.component.ts @@ -0,0 +1,117 @@ +/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */ + +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { AppsState, ContentDto, ContentsService, DialogModel, getContentValue, LanguageDto, LocalizerService, StatefulControlComponent, Types } from '@app/shared/internal'; + +export const SQX_REFERENCE_INPUT_CONTROL_VALUE_ACCESSOR: any = { + provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ReferenceInputComponent), multi: true, +}; + +interface State { + // The referenced content item. + selectedContent?: ContentDto; + + // The name of the selected item. + selectedName?: string; +} + +@Component({ + selector: 'sqx-reference-input[language][languages]', + styleUrls: ['./reference-input.component.scss'], + templateUrl: './reference-input.component.html', + providers: [ + SQX_REFERENCE_INPUT_CONTROL_VALUE_ACCESSOR, + ], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ReferenceInputComponent extends StatefulControlComponent implements OnChanges { + @Input() + public schemaIds?: ReadonlyArray; + + @Input() + public language: LanguageDto; + + @Input() + public languages: ReadonlyArray; + + @Input() + public set disabled(value: boolean | undefined | null) { + this.setDisabledState(value === true); + } + + public contentSelectorDialog = new DialogModel(); + + constructor(changeDetector: ChangeDetectorRef, + private readonly appsState: AppsState, + private readonly contentsService: ContentsService, + private readonly localizer: LocalizerService, + ) { + super(changeDetector, {}); + } + + public ngOnChanges(changes: SimpleChanges) { + if (changes['language']) { + this.selectContent(this.snapshot.selectedContent); + } + } + + public writeValue(obj: any) { + if (Types.isString(obj)) { + this.contentsService.getContentsByIds(this.appsState.appName, [obj]) + .subscribe({ + next: contents => { + this.updateContent(contents.items[0]); + }, + error: () => { + this.updateContent(undefined); + }, + }); + } else { + this.updateContent(); + } + } + + public select(contents: ReadonlyArray) { + if (contents.length > 0) { + this.selectContent(contents[0]); + } + + this.contentSelectorDialog.hide(); + } + + public selectContent(selectedContent?: ContentDto) { + this.callChange(selectedContent?.id); + this.callTouched(); + + this.updateContent(selectedContent); + } + + private updateContent(selectedContent?: ContentDto) { + this.next(s => ({ + ...s, + selectedContent, + selectedName: this.createContentName(selectedContent), + })); + } + + private createContentName(content?: ContentDto) { + if (!content) { + return undefined; + } + + const name = + content.referenceFields + .map(f => getContentValue(content, this.language, f, false)) + .map(v => v.formatted || this.localizer.getOrKey('common.noValue')) + .filter(v => !!v) + .join(', '); + + return name; + } +} diff --git a/frontend/app/shared/components/forms/references-checkboxes.component.html b/frontend/app/shared/components/references/references-checkboxes.component.html similarity index 100% rename from frontend/app/shared/components/forms/references-checkboxes.component.html rename to frontend/app/shared/components/references/references-checkboxes.component.html diff --git a/frontend/app/shared/components/references/references-checkboxes.component.scss b/frontend/app/shared/components/references/references-checkboxes.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/frontend/app/shared/components/forms/references-checkboxes.component.ts b/frontend/app/shared/components/references/references-checkboxes.component.ts similarity index 85% rename from frontend/app/shared/components/forms/references-checkboxes.component.ts rename to frontend/app/shared/components/references/references-checkboxes.component.ts index 29790f9e1..84fda650f 100644 --- a/frontend/app/shared/components/forms/references-checkboxes.component.ts +++ b/frontend/app/shared/components/references/references-checkboxes.component.ts @@ -22,7 +22,7 @@ interface State { const NO_EMIT = { emitEvent: false }; @Component({ - selector: 'sqx-references-checkboxes', + selector: 'sqx-references-checkboxes[language][schemaId]', styleUrls: ['./references-checkboxes.component.scss'], templateUrl: './references-checkboxes.component.html', providers: [ @@ -35,13 +35,13 @@ export class ReferencesCheckboxesComponent extends StatefulControlComponent | null = null; @Input() - public schemaId: string; + public schemaId: string | undefined | null; @Input() public language: LanguageDto; @Input() - public set disabled(value: boolean | null | undefined) { + public set disabled(value: boolean | undefined | null) { this.setDisabledState(value === true); } @@ -80,15 +80,18 @@ export class ReferencesCheckboxesComponent extends StatefulControlComponent { - this.contentItems = contents.items; - - this.resetConverterState(); - }, () => { - this.contentItems = null; - - this.resetConverterState(); + this.contentsService.getContents(this.appsState.appName, this.schemaId!, { take: this.itemCount }) + .subscribe({ + next: contents => { + this.contentItems = contents.items; + + this.resetConverterState(); + }, + error: () => { + this.contentItems = null; + + this.resetConverterState(); + }, }); } else { this.contentItems = null; diff --git a/frontend/app/shared/components/forms/references-tag-converter.ts b/frontend/app/shared/components/references/references-tag-converter.ts similarity index 100% rename from frontend/app/shared/components/forms/references-tag-converter.ts rename to frontend/app/shared/components/references/references-tag-converter.ts diff --git a/frontend/app/shared/components/forms/references-tags.component.html b/frontend/app/shared/components/references/references-tags.component.html similarity index 100% rename from frontend/app/shared/components/forms/references-tags.component.html rename to frontend/app/shared/components/references/references-tags.component.html diff --git a/frontend/app/shared/components/forms/references-tags.component.scss b/frontend/app/shared/components/references/references-tags.component.scss similarity index 100% rename from frontend/app/shared/components/forms/references-tags.component.scss rename to frontend/app/shared/components/references/references-tags.component.scss diff --git a/frontend/app/shared/components/forms/references-tags.component.ts b/frontend/app/shared/components/references/references-tags.component.ts similarity index 87% rename from frontend/app/shared/components/forms/references-tags.component.ts rename to frontend/app/shared/components/references/references-tags.component.ts index 35dfbc7b5..215a2d0b3 100644 --- a/frontend/app/shared/components/forms/references-tags.component.ts +++ b/frontend/app/shared/components/references/references-tags.component.ts @@ -22,7 +22,7 @@ interface State { const NO_EMIT = { emitEvent: false }; @Component({ - selector: 'sqx-references-tags', + selector: 'sqx-references-tags[language][schemaId]', styleUrls: ['./references-tags.component.scss'], templateUrl: './references-tags.component.html', providers: [ @@ -41,7 +41,7 @@ export class ReferencesTagsComponent extends StatefulControlComponent { - this.contentItems = contents.items; + .subscribe({ + next: contents => { + this.contentItems = contents.items; - this.resetConverterState(); - }, () => { - this.contentItems = null; + this.resetConverterState(); + }, + error: () => { + this.contentItems = null; - this.resetConverterState(); + this.resetConverterState(); + }, }); } else { this.contentItems = null; diff --git a/frontend/app/shared/components/search/queries/filter-comparison.component.html b/frontend/app/shared/components/search/queries/filter-comparison.component.html index 906a271f5..f835a48e9 100644 --- a/frontend/app/shared/components/search/queries/filter-comparison.component.html +++ b/frontend/app/shared/components/search/queries/filter-comparison.component.html @@ -39,12 +39,13 @@ (ngModelChange)="changeValue($event)" /> - - + [language]="language" + [languages]="languages"> + ; + @Input() public model: QueryModel; diff --git a/frontend/app/shared/components/search/queries/filter-logical.component.html b/frontend/app/shared/components/search/queries/filter-logical.component.html index 477b478e4..c3b1786a4 100644 --- a/frontend/app/shared/components/search/queries/filter-logical.component.html +++ b/frontend/app/shared/components/search/queries/filter-logical.component.html @@ -28,6 +28,7 @@ diff --git a/frontend/app/shared/components/search/queries/filter-logical.component.ts b/frontend/app/shared/components/search/queries/filter-logical.component.ts index 04ddc152f..d63bd843f 100644 --- a/frontend/app/shared/components/search/queries/filter-logical.component.ts +++ b/frontend/app/shared/components/search/queries/filter-logical.component.ts @@ -26,6 +26,9 @@ export class FilterLogicalComponent { @Input() public language: LanguageDto; + @Input() + public languages: ReadonlyArray; + @Input() public level = 0; diff --git a/frontend/app/shared/components/search/queries/filter-node.component.html b/frontend/app/shared/components/search/queries/filter-node.component.html index 78a3332be..b4d0b2039 100644 --- a/frontend/app/shared/components/search/queries/filter-node.component.html +++ b/frontend/app/shared/components/search/queries/filter-node.component.html @@ -1,11 +1,22 @@ - + - + \ No newline at end of file diff --git a/frontend/app/shared/components/search/queries/filter-node.component.ts b/frontend/app/shared/components/search/queries/filter-node.component.ts index b4fbc6f51..4d7bbddce 100644 --- a/frontend/app/shared/components/search/queries/filter-node.component.ts +++ b/frontend/app/shared/components/search/queries/filter-node.component.ts @@ -26,6 +26,9 @@ export class FilterNodeComponent { @Input() public language: LanguageDto; + @Input() + public languages: ReadonlyArray; + @Input() public level: number; diff --git a/frontend/app/shared/components/search/queries/query.component.html b/frontend/app/shared/components/search/queries/query.component.html index c3e74d498..2cf39b235 100644 --- a/frontend/app/shared/components/search/queries/query.component.html +++ b/frontend/app/shared/components/search/queries/query.component.html @@ -1,4 +1,9 @@ - diff --git a/frontend/app/shared/components/search/queries/query.component.ts b/frontend/app/shared/components/search/queries/query.component.ts index 73c36b9c6..10441976a 100644 --- a/frontend/app/shared/components/search/queries/query.component.ts +++ b/frontend/app/shared/components/search/queries/query.component.ts @@ -21,6 +21,9 @@ export class QueryComponent { @Input() public language: LanguageDto; + @Input() + public languages: ReadonlyArray; + @Input() public model: QueryModel; diff --git a/frontend/app/shared/components/search/search-form.component.html b/frontend/app/shared/components/search/search-form.component.html index 05c9f8059..555d1c412 100644 --- a/frontend/app/shared/components/search/search-form.component.html +++ b/frontend/app/shared/components/search/search-form.component.html @@ -31,8 +31,8 @@ {{ 'search.advancedTour' | sqxTranslate }} -
@@ -77,7 +77,8 @@ + [language]="language" + [languages]="languages"> diff --git a/frontend/app/shared/components/search/search-form.component.ts b/frontend/app/shared/components/search/search-form.component.ts index 2d942dca0..76441bdaf 100644 --- a/frontend/app/shared/components/search/search-form.component.ts +++ b/frontend/app/shared/components/search/search-form.component.ts @@ -28,6 +28,9 @@ export class SearchFormComponent implements OnChanges { @Input() public language: LanguageDto; + @Input() + public languages: ReadonlyArray = []; + @Input() public queryModel?: QueryModel | null; diff --git a/frontend/app/shared/declarations.ts b/frontend/app/shared/declarations.ts index 80e644ebc..4a63a8c6b 100644 --- a/frontend/app/shared/declarations.ts +++ b/frontend/app/shared/declarations.ts @@ -22,11 +22,14 @@ export * from './components/assets/image-focus-point.component'; export * from './components/assets/pipes'; export * from './components/comments/comment.component'; export * from './components/comments/comments.component'; +export * from './components/contents/content-list-cell.directive'; +export * from './components/contents/content-list-field.component'; +export * from './components/contents/content-list-header.component'; +export * from './components/contents/content-status.component'; +export * from './components/contents/content-value-editor.component'; +export * from './components/contents/content-value.component'; export * from './components/forms/geolocation-editor.component'; export * from './components/forms/markdown-editor.component'; -export * from './components/forms/references-checkboxes.component'; -export * from './components/forms/references-dropdown.component'; -export * from './components/forms/references-tags.component'; export * from './components/forms/rich-editor.component'; export * from './components/help/help-markdown.pipe'; export * from './components/help/help.component'; @@ -35,6 +38,12 @@ export * from './components/history/history.component'; export * from './components/history/pipes'; export * from './components/notifo.component'; export * from './components/pipes'; +export * from './components/references/content-selector-item.component'; +export * from './components/references/content-selector.component'; +export * from './components/references/reference-dropdown.component'; +export * from './components/references/reference-input.component'; +export * from './components/references/references-checkboxes.component'; +export * from './components/references/references-tags.component'; export * from './components/schema-category.component'; export * from './components/search/queries/filter-comparison.component'; export * from './components/search/queries/filter-logical.component'; diff --git a/frontend/app/shared/module.ts b/frontend/app/shared/module.ts index c7037c01c..39158fc7c 100644 --- a/frontend/app/shared/module.ts +++ b/frontend/app/shared/module.ts @@ -12,7 +12,7 @@ import { RouterModule } from '@angular/router'; import { SqxFrameworkModule } from '@app/framework'; import { MentionModule } from 'angular-mentions'; import { NgxDocViewerModule } from 'ngx-doc-viewer'; -import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, AppsState, AssetComponent, AssetDialogComponent, AssetFolderComponent, AssetFolderDialogComponent, AssetFolderDropdownComponent, AssetHistoryComponent, AssetPathComponent, AssetPreviewUrlPipe, AssetsListComponent, AssetsSelectorComponent, AssetsService, AssetsState, AssetTextEditorComponent, AssetUploaderComponent, AssetUploaderState, AssetUrlPipe, AuthInterceptor, AuthService, AutoSaveService, BackupsService, BackupsState, ClientsService, ClientsState, CommentComponent, CommentsComponent, CommentsService, ContentMustExistGuard, ContentsService, ContentsState, ContributorsService, ContributorsState, FileIconPipe, FilterComparisonComponent, FilterLogicalComponent, FilterNodeComponent, GeolocationEditorComponent, GraphQlService, HelpComponent, HelpMarkdownPipe, HelpService, HistoryComponent, HistoryListComponent, HistoryMessagePipe, HistoryService, ImageCropperComponent, ImageFocusPointComponent, LanguagesService, LanguagesState, LoadAppsGuard, LoadLanguagesGuard, LoadSchemasGuard, MarkdownEditorComponent, MustBeAuthenticatedGuard, MustBeNotAuthenticatedGuard, NewsService, NotifoComponent, PlansService, PlansState, PreviewableType, QueryComponent, QueryListComponent, QueryPathComponent, ReferencesCheckboxesComponent, ReferencesDropdownComponent, ReferencesTagsComponent, RichEditorComponent, RolesService, RolesState, RuleEventsState, RuleMustExistGuard, RuleSimulatorState, RulesService, RulesState, SavedQueriesComponent, SchemaCategoryComponent, SchemaMustExistGuard, SchemaMustExistPublishedGuard, SchemaMustNotBeSingletonGuard, SchemasService, SchemasState, SchemaTagSource, SearchFormComponent, SearchService, SortingComponent, StockPhotoService, TableHeaderComponent, TranslationsService, UIService, UIState, UnsetAppGuard, UsagesService, UserDtoPicture, UserIdPicturePipe, UserNamePipe, UserNameRefPipe, UserPicturePipe, UserPictureRefPipe, UsersProviderService, UsersService, WorkflowsService, WorkflowsState } from './declarations'; +import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, AppsState, AssetComponent, AssetDialogComponent, AssetFolderComponent, AssetFolderDialogComponent, AssetFolderDropdownComponent, AssetHistoryComponent, AssetPathComponent, AssetPreviewUrlPipe, AssetsListComponent, AssetsSelectorComponent, AssetsService, AssetsState, AssetTextEditorComponent, AssetUploaderComponent, AssetUploaderState, AssetUrlPipe, AuthInterceptor, AuthService, AutoSaveService, BackupsService, BackupsState, ClientsService, ClientsState, CommentComponent, CommentsComponent, CommentsService, ContentListCellDirective, ContentListFieldComponent, ContentListHeaderComponent, ContentListWidthPipe, ContentMustExistGuard, ContentsColumnsPipe, ContentSelectorComponent, ContentSelectorItemComponent, ContentsService, ContentsState, ContentStatusComponent, ContentValueComponent, ContentValueEditorComponent, ContributorsService, ContributorsState, FileIconPipe, FilterComparisonComponent, FilterLogicalComponent, FilterNodeComponent, GeolocationEditorComponent, GraphQlService, HelpComponent, HelpMarkdownPipe, HelpService, HistoryComponent, HistoryListComponent, HistoryMessagePipe, HistoryService, ImageCropperComponent, ImageFocusPointComponent, LanguagesService, LanguagesState, LoadAppsGuard, LoadLanguagesGuard, LoadSchemasGuard, MarkdownEditorComponent, MustBeAuthenticatedGuard, MustBeNotAuthenticatedGuard, NewsService, NotifoComponent, PlansService, PlansState, PreviewableType, QueryComponent, QueryListComponent, QueryPathComponent, ReferenceDropdownComponent, ReferenceInputComponent, ReferencesCheckboxesComponent, ReferencesTagsComponent, RichEditorComponent, RolesService, RolesState, RuleEventsState, RuleMustExistGuard, RuleSimulatorState, RulesService, RulesState, SavedQueriesComponent, SchemaCategoryComponent, SchemaMustExistGuard, SchemaMustExistPublishedGuard, SchemaMustNotBeSingletonGuard, SchemasService, SchemasState, SchemaTagSource, SearchFormComponent, SearchService, SortingComponent, StockPhotoService, TableHeaderComponent, TranslationsService, UIService, UIState, UnsetAppGuard, UsagesService, UserDtoPicture, UserIdPicturePipe, UserNamePipe, UserNameRefPipe, UserPicturePipe, UserPictureRefPipe, UsersProviderService, UsersService, WorkflowsService, WorkflowsState } from './declarations'; @NgModule({ imports: [ @@ -39,6 +39,16 @@ import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, AssetUrlPipe, CommentComponent, CommentsComponent, + ContentListCellDirective, + ContentListFieldComponent, + ContentListHeaderComponent, + ContentListWidthPipe, + ContentsColumnsPipe, + ContentSelectorComponent, + ContentSelectorItemComponent, + ContentStatusComponent, + ContentValueComponent, + ContentValueEditorComponent, FileIconPipe, FilterComparisonComponent, FilterLogicalComponent, @@ -57,8 +67,9 @@ import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, QueryComponent, QueryListComponent, QueryPathComponent, + ReferenceDropdownComponent, + ReferenceInputComponent, ReferencesCheckboxesComponent, - ReferencesDropdownComponent, ReferencesTagsComponent, RichEditorComponent, SavedQueriesComponent, @@ -88,6 +99,16 @@ import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, AssetUrlPipe, CommentComponent, CommentsComponent, + ContentListCellDirective, + ContentListFieldComponent, + ContentListHeaderComponent, + ContentListWidthPipe, + ContentsColumnsPipe, + ContentSelectorComponent, + ContentSelectorItemComponent, + ContentStatusComponent, + ContentValueComponent, + ContentValueEditorComponent, DragDropModule, FileIconPipe, GeolocationEditorComponent, @@ -100,8 +121,9 @@ import { AppFormComponent, AppLanguagesService, AppMustExistGuard, AppsService, NotifoComponent, PreviewableType, QueryListComponent, + ReferenceDropdownComponent, + ReferenceInputComponent, ReferencesCheckboxesComponent, - ReferencesDropdownComponent, ReferencesTagsComponent, RichEditorComponent, RouterModule, diff --git a/frontend/app/shared/state/query.ts b/frontend/app/shared/state/query.ts index ffc0a4d26..c227e425e 100644 --- a/frontend/app/shared/state/query.ts +++ b/frontend/app/shared/state/query.ts @@ -349,7 +349,7 @@ export function queryModelFromSchema(schema: SchemaDto, languages: ReadonlyArray } else if (field.properties.fieldType === 'DateTime') { type = TypeDateTime; } else if (field.properties.fieldType === 'References') { - const extra = field.rawProperties.singleId; + const extra = field.rawProperties.schemaIds; type = { ...TypeReference, extra }; } diff --git a/frontend/app/shared/state/schemas.state.ts b/frontend/app/shared/state/schemas.state.ts index c937c9b43..f9ca82a83 100644 --- a/frontend/app/shared/state/schemas.state.ts +++ b/frontend/app/shared/state/schemas.state.ts @@ -251,7 +251,7 @@ export class SchemasState extends State { shareSubscribed(this.dialogs)); } - public addField(schema: SchemaDto, request: AddFieldDto, parent?: RootFieldDto): Observable { + public addField(schema: SchemaDto, request: AddFieldDto, parent?: RootFieldDto | null): Observable { return this.schemasService.postField(this.appName, parent || schema, request, schema.version).pipe( tap(updated => { this.replaceSchema(updated); @@ -359,7 +359,7 @@ export class SchemasState extends State { } } -function getField(x: SchemaDto, request: AddFieldDto, parent?: RootFieldDto): FieldDto { +function getField(x: SchemaDto, request: AddFieldDto, parent?: RootFieldDto | null): FieldDto { if (parent) { return x.fields.find(f => f.fieldId === parent.fieldId)!.nested.find(f => f.name === request.name)!; } else { diff --git a/frontend/app/shell/pages/home/home-page.component.ts b/frontend/app/shell/pages/home/home-page.component.ts index 1f4267404..0159e29c7 100644 --- a/frontend/app/shell/pages/home/home-page.component.ts +++ b/frontend/app/shell/pages/home/home-page.component.ts @@ -28,10 +28,13 @@ export class HomePageComponent { this.authService.loginRedirect(); } else { this.authService.loginPopup() - .subscribe(() => { - this.router.navigate(['/app']); - }, () => { - this.showLoginError = true; + .subscribe({ + next: () => { + this.router.navigate(['/app']); + }, + error: () => { + this.showLoginError = true; + }, }); } } diff --git a/frontend/app/shell/pages/login/login-page.component.ts b/frontend/app/shell/pages/login/login-page.component.ts index f8d5729a9..81149e8e2 100644 --- a/frontend/app/shell/pages/login/login-page.component.ts +++ b/frontend/app/shell/pages/login/login-page.component.ts @@ -22,13 +22,13 @@ export class LoginPageComponent implements OnInit { public ngOnInit() { this.authService.loginRedirectComplete() - .subscribe( - () => { + .subscribe({ + next: () => { this.router.navigate(['/app'], { replaceUrl: true }); }, - () => { + error: () => { this.router.navigate(['/'], { replaceUrl: true }); }, - ); + }); } } diff --git a/frontend/app/shell/pages/logout/logout-page.component.ts b/frontend/app/shell/pages/logout/logout-page.component.ts index a9e78f8f7..bdb7fa7c9 100644 --- a/frontend/app/shell/pages/logout/logout-page.component.ts +++ b/frontend/app/shell/pages/logout/logout-page.component.ts @@ -22,13 +22,13 @@ export class LogoutPageComponent implements OnInit { public ngOnInit() { this.authService.logoutRedirectComplete() - .subscribe( - () => { + .subscribe({ + next: () => { this.router.navigate(['/'], { replaceUrl: true }); }, - () => { + error: () => { this.router.navigate(['/'], { replaceUrl: true }); }, - ); + }); } } diff --git a/frontend/app/theme/_bootstrap.scss b/frontend/app/theme/_bootstrap.scss index 77ccffd3d..3d13479ee 100644 --- a/frontend/app/theme/_bootstrap.scss +++ b/frontend/app/theme/_bootstrap.scss @@ -641,4 +641,8 @@ $icon-size: 4.5rem; tbody + tbody { border: 0; } + + .form-control { + border-bottom-width: 1px; + } } diff --git a/frontend/app/theme/icomoon/fonts/icomoon.eot b/frontend/app/theme/icomoon/fonts/icomoon.eot index d90c67254060fb8cc1f0b70a7cc116fb9a4634e3..437f0cc2ad074fc0ad54613a5e08b25fc3bc0f7a 100644 GIT binary patch delta 721 zcmew}gXza~Ce|O_3=AO?S|cS1>Rzm}LM3IGI?d1Njete3gvck_zKDsyPe{Z7d87Oc6Qx$%)$qCtqS<=!gND zp_iLjQNXa4F_M9yvj?bNAulmEb*2~RZyKU}k1Kzd41G zSG=ByL7Rb<`80DV12=;@0|O@`AET(Cx~YkpI-{zh5}T-qm^h=Lh?qR1n3=g9qp2XH znVPyDqcXGqzh|thVXUnGo-zIUvr15sm6g$(mwT0f5(g6#qc;yT9~&P#GsC~lYua@ z5@8c*5V<0%AsQfBAv#a=m{^$DKCvrekHi(kmx$kx;FEYFH9`82%q*E5vL>>9vUlYC z@pSP?S>qqSU7nrSePFNp+d(5!E+p7HS*RW7PMkztM2g*ryqz*{AtH zE1_QNp0{T%7tt@#KW89fkYljL;E!R3VT0ib z!%s#XMvIKQjNh3oGPzrX+y<{9 delta 881 zcmYLGO>7%Q6n?Y6w&Qi|jlHvpoQ=D#?KE+B*FU@K+9q+MDu>dfRT4^wP$6nsS*U3u zs33=cb3kbn3L;HQQ>$vF9*{+VLyS>gxWreT?p^hxQSp7_@H#n^@wT*h8~3Yq`JLes5s6mm2q;7biQ|#a zzuR9}jp|54rjKl-!PLH_glUyw9F1+ai{TkwV3%38vF%_OMs!m@Hi<0laY>HGZ;es6 z$RLX4F0&pUNvPE!xm<$aB2$D_;OXP^OW+3#(4vu7xayO0Z?p!Vk6nHET66wSXkvC} z20yzW|MH(-o}OPtE#;>w@SC&l)EBiJ!76H&7tNK&G)=Vy=!7tT=5_A z-wlX?vw@ESUk84Y80m^s$082lQ}|a|l8?2jZ4ZJF+z38vf3v-&v?-T5jEqH7}d@ zEY&(`&00_G*X^(DXPIo~z0CKStwWEpC$qoj9_7!!Fx12JeA!zoR1OdJx%vi)Ac(9_ M(92LgwD>Lh7ymcg - + @@ -127,7 +127,7 @@ - + diff --git a/frontend/app/theme/icomoon/fonts/icomoon.ttf b/frontend/app/theme/icomoon/fonts/icomoon.ttf index bb90c097e8a639894d091c1e6e4d70394e6daf96..03e32b38b748dfc031ca52139c308d347a303886 100644 GIT binary patch delta 722 zcmcaHo$1OnCJ_ck1_lOhh6V;^1_S?KeItG$-a`{bbn5*>^Nbl77$-0=v`A#6CZ@oF=b`~Q2!${NPX`tKRjuRp5rM&D3LK@L8)e-;0J@`$pAa&QZkM$JNPgL;hm9`!dGP8$0(V>J6TA7~}i zYu(fK&@R!wqT{2Jr87%spKh3LmhKHb4ZS?QbNV9sCHm(KL=18awix^|%rI;)JYo3B zsKaQHahLHslSL+1Oyx`iOzTV^n2DHKnXNIGGcPjVV*bOz#-hVwk>w;S5vz69lWcTs i1#A!5<=A&Qq&f09o^av;1_&tePGbyb*euz#pAi7gk-WhG delta 855 zcmYLITWAwm7(QpNNt(%JOy*2WI*k*P)HcpcCYec0VjGL}L2Z>*G%KQ8ypRWLi;9~E zchd!}^@>_AHHd-_OIR;pBjUce-IpRu)_v(i!Bwi13i}`;C|*kHX+iuS&N<)zedj;t z{|;yB3Nd|^@Bjz^r~^ZQ1lp!vRd@2-Ul%-);?Fzh765?f0XTL&zqfCXR3H)n3`elq z%;SWWps!-Q2jdm_{=#bif)-XRjIB@7NJ|D;FM~gflN%-{s1c!D=-`i z$gBghjMpO|4M`9QQFp@75^XSH8k%VY^`#_YmQ(?GX;0W(;$w6aI$$GYjd&t+}W9zB$`&#;((%FQ`JFLwbX{XGU+V{F$_Xm(wVOAOuAP@G>ydG zbfz0_s7=#!jHYMfC%QI{#Ab;L4I&EIa0HOpU~#bR*|BW<0*L*SZ7*fBkY~HBR*~bZ zR*n;`IKHpX)^0N{OWFO0#bsq+(zR@vtM;Ul6MyQ>V~8uoN%pojq@pf%(Kq(*votOdCz$tdjAtB;gT?qc;rVr(JN69 zH`dDyPkq2Q?fcMpu(2vNNN1X~rb5#Vzv9pNCzt1BU9PSe3nqg@!PyWIY6%?)y$P4X zpPO5nhnnYCmR43v)8ZoQjkq(~m?~ mx9O?Ofi*pCRNKAwYPP(#yTjJejSX4+L08~5P`P~aPxuv{K+_`t diff --git a/frontend/app/theme/icomoon/fonts/icomoon.woff b/frontend/app/theme/icomoon/fonts/icomoon.woff index fab6fbd53dc6ca8304f329647166aeaf709824b5..0e13fba465e3883c981f42f318a48cd7697e3c7b 100644 GIT binary patch delta 761 zcmZ27gK5EZCXsS~H#Y`G1|aBOz`zZrLnaIM2v1h%VVS5c!gy$+gK@nC14E01e`ua@ zMrvXT14HWn!rKKWU&>9aC}3ddyaCjw0LE(>Bl8k-Q-NYXfNI)6c&3*W=kJ32;u4?} z8{i6=fh=a`^P71XdBy9Q7_=E!nNKr^0)3#)z`)7K$0#bOZfc^Y&Zw%W#3m{tCeA1* zA|}r$W@c{3Xe!8PrlzjPsLbsD?-?s=7%S_)XH38TtP+%DWo7i{QL|9npdO>X zNBxb4lg2*H7|lM-2U-dBTKBX)v`e(F==kVl>CDpEryHi5rF%n9LoZM7oW6*DiT*hQ z5rZ6qEe3xKGYlIHPZ)kO>M&Yl+-3aEWRb}gQ#sQB(>l`!W+G-*W^2sl%!|yonE$Y_ yvFNZ^WI4%7#A==OBpV%D0oy}%Ird!+X^uROC!BbI0Rl?j(-^}UHm7#&X9NHej>6Rd delta 886 zcmZ25ooUGoCXsS~H#Y`G1|aBBVc-VQ-8UwRXfqz1=wMtwhk>DGPHo(?{~4)?DGUs4 z6+me-5SFW8GS2`C0>w4}`6?jH$;3K6Bew*ortJy?15*SD8w;v#&dE;(s_WEYU|`e( z;bYv3&g3Rm6fiJ!#Q^mwfbm+!$h^edRG?T5P)!>M&-9Yw{9TY=Tmp0&3tS;Hkj2b= zZZi)fuXsHR!>s@Jm}fByGN>{*F}N^90`-}w>oKaUDJ!w_F|xCXiin9Dh|4jGix~=< zn;MwgF`Ap18km`?8i57H*}$rlmB4z`&A{@;tcHwyjIxaErY36Y%yNvzMrP&~jE2n2 zv*hJ6+}!*F+}twc1{&$0w)tHs_iAlS!PlxdnrioG#;>uh=pe!yS#lgpJ?=Zu`{y&59SqJ-B z4i1b$?7p0w61=>eoV>geoIrqJ_x@YWCcv>ma3_ZVCmW-MfUvN@zZ096NR$U>0KM@!M0tui8jTMc=#F>>?SUCPYUR3yTmB(`{}cR%SjfF^+%F|3&Z!u`n{RvQ1*;V`mg&l;jZO;^O7y+FYH}C@J$Z zYU=rTew(ih+@RQDV7SY3?;(tyEYY@_an|M|Z8eN6KnF2TcIlX3zlev4X9cenUliXf zeg*yj{sRJD0-J=agl34ii0l&;5=|5B6Wu0yM~p>mir61b-! z7-Vk9e3LDbJtHS2*CTHrUm-tFK~Et<;h18Cl9AFGl^LoQstu}7)R@$?)XLP}sn1gX zrJ<$Kpz%j@mgX5PIjwp1+A`X0+M9HQbh>m_=-klxqdP@+g`SvRn%)|H9{nKwO$Iy$ zK?bV~J{ejWE;HO`#Aak*bj;|1@d*