From 9decf1d5ac7e33c4442ae2d1279425c3679d6eb0 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Thu, 7 Sep 2023 14:05:33 +0200 Subject: [PATCH] chore: standalone migration --- .../taiga/__mocks__/pretty-bytes.js} | 6 +- .../apps/taiga/src/app/app.component.ts | 2 - javascript/apps/taiga/src/app/app.module.ts | 6 +- .../auth-forest/auth-forest.component.ts | 2 + .../social-login/social-login.component.ts | 5 +- .../auth-feature-login.component.ts | 18 ++++- .../auth-feature-login.module.ts | 12 +--- .../components/login/login.component.ts | 26 ++++++- .../auth-feature-reset-password.component.ts | 31 +++++++- .../auth-feature-reset-password.module.ts | 16 +---- .../components/new-password.component.ts | 23 +++++- .../auth-feature-sign-up.component.ts | 28 ++++++++ .../auth-feature-sign-up.module.ts | 18 +---- .../components/signup/signup.component.ts | 29 ++++---- .../verify-email/verify-email.component.ts | 6 +- .../modules/errors/403/error-403.component.ts | 7 +- .../modules/errors/403/error-403.module.ts | 5 +- .../modules/errors/404/error-404.component.ts | 7 +- .../modules/errors/404/error-404.module.ts | 5 +- .../modules/errors/500/error-500.component.ts | 7 +- .../modules/errors/500/error-500.module.ts | 5 +- .../init-step/init-step.component.ts | 38 +++++++++- .../new-project/new-project.component.spec.ts | 4 +- .../new-project/new-project.component.ts | 10 +++ .../template-step/template-step.component.ts | 37 +++++++++- .../feature-new-project.module.ts | 17 ++--- .../components/account/account.component.ts | 5 +- .../deleting-account-modal.component.ts | 15 ++-- .../edit-profile/edit-profile.component.ts | 3 + .../preferences/preferences.component.spec.ts | 3 +- .../preferences/preferences.component.ts | 25 ++++++- .../feature-user-settings.component.ts | 20 +++++- .../feature-user-settings.module.ts | 11 ++- .../assign-user/assign-user.component.ts | 17 +++-- .../field-conflict.component.ts | 10 ++- .../leave-project-dropdown.component.ts | 4 +- .../kanban-create-status.component.ts | 13 ++++ .../kanban-create-story-inline.component.ts | 17 ++++- .../delete-status/delete-status.component.ts | 13 ++-- .../edit-status/edit-status.component.ts | 25 ++++++- .../empty/kanban-empty.component.ts | 10 +-- .../status/kanban-status.component.html | 1 + .../status/kanban-status.component.ts | 70 ++++++++++++++++++- .../story/kanban-story-a11y-drag.directive.ts | 1 + .../story/kanban-story.component.ts | 52 ++++++++++---- .../workflow/kanban-workflow.component.ts | 38 +++++++++- .../kanban-scroll-strategy.ts | 1 + .../+state/effects/kanban.effects.spec.ts | 1 - ...an-status-keyboard-navigation.directive.ts | 3 +- ...ban-story-keyboard-navigation.directive.ts | 3 +- .../scroll-dynamic-height.directive.ts | 12 +--- .../project-feature-kanban.component.ts | 20 +++++- .../project-feature-kanban.module.ts | 40 ++++------- .../project-navigation-menu.component.spec.ts | 1 - .../project-navigation-menu.component.ts | 11 +-- ...ject-navigation-settings.component.spec.ts | 1 - .../project-navigation-settings.component.ts | 20 ++++-- .../project-feature-navigation.component.html | 1 + ...oject-feature-navigation.component.spec.ts | 14 +++- .../project-feature-navigation.component.ts | 9 +++ .../project-feature-navigation.module.ts | 33 --------- .../delete-project.component.ts | 10 +-- .../edit-project/edit-project.component.ts | 15 ++-- .../project-members-list.component.ts | 30 +++----- .../project-members-modal.component.ts | 24 +++---- .../project-members.component.ts | 31 ++++---- .../project-feature-overview.component.ts | 47 ++++++++++++- .../project-feature-overview.module.ts | 21 +----- .../project-feature-shell.component.ts | 19 ++++- .../project-feature-shell.module.ts | 12 +--- ...ature-story-wrapper-full-view.component.ts | 13 ++++ ...-feature-story-wrapper-full-view.module.ts | 5 +- ...ture-story-wrapper-modal-view.component.ts | 14 ++++ ...feature-story-wrapper-modal-view.module.ts | 5 +- ...ature-story-wrapper-side-view.component.ts | 18 ++++- ...-feature-story-wrapper-side-view.module.ts | 5 +- ...ct-feature-story-wrapper-side-view.spec.ts | 17 ++++- .../project-feature-view-setter.component.ts | 5 +- .../members-list/members-list.component.ts | 24 +++++++ .../pending-members-list.component.ts | 24 +++++++ .../remove-member/remove-member.component.ts | 25 +++++++ .../revoke-invitation.component.ts | 21 +++++- .../role-select/role-select.component.ts | 31 +++++++- .../feature-members.component.ts | 23 ++++++ .../feature-members/feature-members.module.ts | 27 ++----- .../modal-permission-entity-row.component.ts | 5 ++ .../modal-permission-comparison.component.ts | 11 +++ .../modal-permission-comparison.module.ts | 12 ++-- .../role-advance-row.component.spec.ts | 3 +- .../role-advance-row.component.ts | 32 ++++++++- .../role-advance-row.module.ts | 9 +-- .../role-customize.component.ts | 14 +++- .../role-customize/role-customize.module.ts | 7 +- .../role-permission-row.component.ts | 30 +++++++- .../role-permission-row.module.ts | 7 +- .../feature-roles-permissions.component.ts | 24 ++++++- .../feature-roles-permissions.module.ts | 11 +-- .../feature-settings.component.ts | 5 +- .../feature-settings.module.ts | 7 +- .../story-detail-assign.component.ts | 27 ++++++- .../story-detail-description.component.ts | 34 ++++++++- .../story-detail-status.component.ts | 23 +++++- .../story-detail-title.component.ts | 36 +++++++++- .../story-detail/story-detail.component.ts | 61 ++++++++++++++-- .../story-detail/story-detail.module.ts | 13 +--- .../workspace-delete-modal.component.ts | 10 +-- .../workspace-detail-edit-modal.component.ts | 26 ++++++- ...-detail-people-members-remove.component.ts | 17 +++++ ...rkspace-detail-people-members.component.ts | 26 +++++++ ...ace-detail-people-non-members.component.ts | 19 +++++ ...rkspace-detail-people-pending.component.ts | 15 ++++ .../workspace-detail-people.component.ts | 20 ++++++ .../workspace-detail-projects.component.ts | 19 +++++ .../workspace-detail-skeleton.component.ts | 4 ++ .../workspace-detail.component.ts | 47 ++++++++++++- .../workspace-feature-detail.module.ts | 44 ++++-------- .../workspace-create.component.ts | 26 ++++++- .../workspace-item.component.spec.ts | 13 +++- .../workspace-item.component.ts | 21 ++++++ .../workspace-skeleton.component.ts | 5 ++ .../workspace/workspace.component.spec.ts | 15 +++- .../workspace/workspace.component.ts | 33 ++++++++- .../workspace-feature-list.module.ts | 32 ++------- .../apps/taiga/src/app/services/ws/index.ts | 2 - .../taiga/src/app/services/ws/ws.module.ts | 11 --- .../attachments/attachments.component.ts | 5 +- .../attachment/attachment.component.ts | 13 ++-- .../attachments-list.component.ts | 9 +-- .../src/app/shared/banner/banner.component.ts | 4 +- .../app/shared/comments/comments.component.ts | 4 +- .../comment-detail.component.ts | 4 +- .../comment-single.component.ts | 6 +- .../comment-user-input.component.ts | 9 ++- .../src/app/shared/common-template.module.ts | 19 ----- .../button-loading.directive.spec.ts | 4 +- .../button-loading.directive.ts | 7 +- .../button-loading/button-loading.module.ts | 19 ----- .../external-link/external-link.directive.ts | 7 +- .../external-link/external-link.module.ts | 16 ----- .../internal-link/internal-link.directive.ts | 7 +- .../internal-link/internal-link.module.ts | 18 ----- .../discard-changes-modal.component.ts | 9 +-- .../components/user-to-invite.component.html | 1 - .../components/user-to-invite.component.ts | 46 ++++++------ .../invite-user-modal.component.ts | 56 +++++++++++++-- .../invite-user-modal.module.ts | 16 +---- .../navigation-projects.component.ts | 14 ++++ .../navigation-user-dropdown.component.ts | 16 +++++ .../shared/navigation/navigation.component.ts | 21 ++++++ .../shared/navigation/navigation.module.ts | 7 +- .../shared/pagination/pagination.component.ts | 6 +- .../capitalize/capitalize.pipe.module.ts | 19 ----- .../pipes/capitalize/capitalize.pipe.ts | 5 +- .../pipes/get-url/get-url.pipe.module.ts | 19 ----- .../app/shared/pipes/get-url/get-url.pipe.ts | 5 +- .../project-card/project-card.component.ts | 32 ++++++--- .../project-summary-card.component.ts | 5 +- .../projects-dropdown.component.ts | 5 +- .../src/app/shared/undo/undo.component.ts | 5 +- .../user-avatar/user-avatar.component.ts | 5 +- javascript/apps/taiga/src/test-setup.ts | 3 + javascript/libs/api/src/index.ts | 2 - javascript/libs/api/src/lib/api.module.ts | 12 ---- .../ui/src/lib/avatar/avatar.component.ts | 3 + .../libs/ui/src/lib/avatar/avatar.module.ts | 19 ----- javascript/libs/ui/src/lib/avatar/index.ts | 9 --- .../libs/ui/src/lib/badge/badge.component.ts | 5 +- .../libs/ui/src/lib/badge/badge.module.ts | 21 ------ .../context-notification.component.ts | 4 ++ .../context-notification.module.ts | 20 ------ javascript/libs/ui/src/lib/drag/README.md | 14 ++-- .../components/drag-in-progress.component.ts | 1 + .../drag/directives/drag-handle.directive.ts | 1 + .../drag/directives/draggable.directive.ts | 1 + .../drag/directives/drop-zone.directive.ts | 1 + .../libs/ui/src/lib/drag/drag.module.ts | 28 -------- javascript/libs/ui/src/lib/drag/index.ts | 1 - .../components/cell/table-cell.component.ts | 1 + .../header/table-header.component.ts | 1 + .../components/row/table-row.component.ts | 1 + .../components/table/table.component.ts | 1 + .../lib/dynamic-table/dynamic-table.module.ts | 4 +- .../lib/inputs/checkbox/checkbox.component.ts | 4 ++ .../src/lib/inputs/error/error.component.ts | 4 ++ .../ui/src/lib/inputs/error/error.module.ts | 19 ----- .../ui/src/lib/inputs/form/form.directive.ts | 1 + .../image-upload.component.spec.ts | 23 ++++-- .../image-upload/image-upload.component.ts | 14 +++- .../image-upload/image-upload.module.ts | 28 -------- .../ui/src/lib/inputs/input-ref.directive.ts | 1 + .../lib/inputs/input/input.component.spec.ts | 1 - .../src/lib/inputs/input/input.component.ts | 5 ++ .../libs/ui/src/lib/inputs/inputs.module.ts | 15 ++-- .../password-strength.component.ts | 15 +++- .../password-strength.module.ts | 21 ------ .../src/lib/inputs/radio/radio.component.ts | 5 +- .../src/lib/inputs/select/select.component.ts | 3 + .../lib/inputs/textarea/textarea.component.ts | 3 + .../modal/components/modal/modal.component.ts | 13 +++- .../wrapper/modal-wrapper.component.ts | 7 +- .../libs/ui/src/lib/modal/modal.module.ts | 29 -------- .../card-skeleton/card-skeleton.component.ts | 1 + .../ui/src/lib/skeletons/skeletons.module.ts | 20 ------ .../user-skeleton/user-skeleton.component.ts | 1 + javascript/libs/ui/src/lib/tooltip/index.ts | 2 +- .../ui/src/lib/tooltip/tooltip.component.ts | 1 + javascript/libs/ui/src/lib/tooltip/tooltip.md | 4 +- .../libs/ui/src/lib/tooltip/tooltip.module.ts | 18 ----- javascript/libs/ui/src/test-setup.ts | 2 + 209 files changed, 1982 insertions(+), 1009 deletions(-) rename javascript/{libs/ui/src/lib/modal/index.ts => apps/taiga/__mocks__/pretty-bytes.js} (77%) delete mode 100644 javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.module.ts delete mode 100644 javascript/apps/taiga/src/app/services/ws/ws.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/common-template.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/directives/external-link/external-link.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.module.ts delete mode 100644 javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.module.ts delete mode 100644 javascript/libs/api/src/lib/api.module.ts delete mode 100644 javascript/libs/ui/src/lib/avatar/avatar.module.ts delete mode 100644 javascript/libs/ui/src/lib/avatar/index.ts delete mode 100644 javascript/libs/ui/src/lib/badge/badge.module.ts delete mode 100644 javascript/libs/ui/src/lib/context-notification/context-notification.module.ts delete mode 100644 javascript/libs/ui/src/lib/drag/drag.module.ts delete mode 100644 javascript/libs/ui/src/lib/inputs/error/error.module.ts delete mode 100644 javascript/libs/ui/src/lib/inputs/image-upload/image-upload.module.ts delete mode 100644 javascript/libs/ui/src/lib/inputs/password-strength/password-strength.module.ts delete mode 100644 javascript/libs/ui/src/lib/modal/modal.module.ts delete mode 100644 javascript/libs/ui/src/lib/skeletons/skeletons.module.ts delete mode 100644 javascript/libs/ui/src/lib/tooltip/tooltip.module.ts diff --git a/javascript/libs/ui/src/lib/modal/index.ts b/javascript/apps/taiga/__mocks__/pretty-bytes.js similarity index 77% rename from javascript/libs/ui/src/lib/modal/index.ts rename to javascript/apps/taiga/__mocks__/pretty-bytes.js index 1535e60c8..f609c79b4 100644 --- a/javascript/libs/ui/src/lib/modal/index.ts +++ b/javascript/apps/taiga/__mocks__/pretty-bytes.js @@ -6,4 +6,8 @@ * Copyright (c) 2023-present Kaleidos INC */ -export * from './modal.module'; +function prettyBytes() { + return '1kb'; +} + +module.exports = prettyBytes; diff --git a/javascript/apps/taiga/src/app/app.component.ts b/javascript/apps/taiga/src/app/app.component.ts index 30ee65a78..5a27a3989 100644 --- a/javascript/apps/taiga/src/app/app.component.ts +++ b/javascript/apps/taiga/src/app/app.component.ts @@ -21,7 +21,6 @@ import { selectUser } from './modules/auth/data-access/+state/selectors/auth.sel import { AuthService } from './modules/auth/services/auth.service'; import { LocalStorageService } from './shared/local-storage/local-storage.service'; import { RouteHistoryService } from './shared/route-history/route-history.service'; -import { NavigationService } from './shared/navigation/navigation.service'; import { InputModalityDetector } from '@angular/cdk/a11y'; import { LanguageService } from './services/language/language.service'; import { ConfigService } from '@taiga/core'; @@ -45,7 +44,6 @@ export class AppComponent { private store: Store, private routeHistoryService: RouteHistoryService, private translocoService: TranslocoService, - private navigationService: NavigationService, private inputModalityDetector: InputModalityDetector, private localStorageService: LocalStorageService, private languageService: LanguageService, diff --git a/javascript/apps/taiga/src/app/app.module.ts b/javascript/apps/taiga/src/app/app.module.ts index 078a1469e..317b3f41b 100644 --- a/javascript/apps/taiga/src/app/app.module.ts +++ b/javascript/apps/taiga/src/app/app.module.ts @@ -28,12 +28,12 @@ import { } from '@taiga-ui/core'; import { TUI_LANGUAGE } from '@taiga-ui/i18n'; import { tuiToggleOptionsProvider } from '@taiga-ui/kit'; -import { ApiModule, SystemApiService } from '@taiga/api'; +import { SystemApiService } from '@taiga/api'; import { ConfigService, CoreModule, coreActions } from '@taiga/core'; import { PROMPT_PROVIDER } from '@taiga/ui/modal/services/modal.service'; import { paramCase } from 'change-case'; import { DataAccessAuthModule } from '~/app/modules/auth/data-access/auth.module'; -import { WsModule } from '~/app/services/ws'; + import { environment } from '../environments/environment'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -72,8 +72,6 @@ export function prefersReducedMotion(): boolean { imports: [ DataAccessAuthModule, ErrorsModule, - ApiModule, - WsModule, CoreModule, HttpClientModule, ApiRestInterceptorModule, diff --git a/javascript/apps/taiga/src/app/modules/auth/components/auth-forest/auth-forest.component.ts b/javascript/apps/taiga/src/app/modules/auth/components/auth-forest/auth-forest.component.ts index 9b5e45ad0..f7ea2270f 100644 --- a/javascript/apps/taiga/src/app/modules/auth/components/auth-forest/auth-forest.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/components/auth-forest/auth-forest.component.ts @@ -6,6 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; @Component({ @@ -13,5 +14,6 @@ import { Component } from '@angular/core'; standalone: true, templateUrl: './auth-forest.component.html', styleUrls: ['./auth-forest.component.css'], + imports: [CommonModule], }) export class AuthForestComponent {} diff --git a/javascript/apps/taiga/src/app/modules/auth/components/social-login/social-login.component.ts b/javascript/apps/taiga/src/app/modules/auth/components/social-login/social-login.component.ts index 9106b33c2..8cc800349 100644 --- a/javascript/apps/taiga/src/app/modules/auth/components/social-login/social-login.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/components/social-login/social-login.component.ts @@ -11,8 +11,9 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { ConfigService } from '@taiga/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; + import { SocialLoginButtonComponent } from '../social-login-button/social-login-button.component'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; @Component({ selector: 'tg-social-login', @@ -22,8 +23,8 @@ import { SocialLoginButtonComponent } from '../social-login-button/social-login- imports: [ CommonModule, TranslocoModule, - ContextNotificationModule, SocialLoginButtonComponent, + ContextNotificationComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.component.ts index 312806e1a..c350bd4c8 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.component.ts @@ -7,16 +7,32 @@ */ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { UntilDestroy } from '@ngneat/until-destroy'; import { fadeIntOutAnimation } from '~/app/shared/utils/animations'; import { AuthService } from '../services/auth.service'; +import { LoginComponent } from './components/login/login.component'; +import { SocialLoginComponent } from '../components/social-login/social-login.component'; +import { CommonModule } from '@angular/common'; +import { AuthForestComponent } from '../components/auth-forest/auth-forest.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { TitleComponent } from '~/app/shared/title/title.component'; @UntilDestroy() @Component({ selector: 'tg-auth-feature-login', templateUrl: './auth-feature-login.component.html', styleUrls: ['./auth-feature-login.component.css'], animations: [fadeIntOutAnimation], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + AuthForestComponent, + SocialLoginComponent, + LoginComponent, + RouterLink, + ], }) export class AuthFeatureLoginComponent implements OnInit { public queryParams$!: typeof this.route.queryParams; diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.module.ts b/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.module.ts index 5dddfc348..248ad5594 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.module.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-login/auth-feature-login.module.ts @@ -11,10 +11,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiLinkModule } from '@taiga-ui/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module'; + import { TitleComponent } from '~/app/shared/title/title.component'; import { AuthForestComponent } from '../components/auth-forest/auth-forest.component'; import { SocialLoginComponent } from '../components/social-login/social-login.component'; @@ -24,7 +21,6 @@ import { LoginComponent } from './components/login/login.component'; const routes: Routes = [{ path: '', component: AuthFeatureLoginComponent }]; @NgModule({ - declarations: [AuthFeatureLoginComponent, LoginComponent], providers: [ { provide: TRANSLOCO_SCOPE, @@ -35,16 +31,14 @@ const routes: Routes = [{ path: '', component: AuthFeatureLoginComponent }]; }, ], imports: [ - CommonTemplateModule, ReactiveFormsModule, RouterModule.forChild(routes), - InputsModule, TuiLinkModule, - ContextNotificationModule, - ButtonLoadingModule, AuthForestComponent, SocialLoginComponent, TitleComponent, + AuthFeatureLoginComponent, + LoginComponent, ], }) export class AuthFeatureLoginModule {} diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-login/components/login/login.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-login/components/login/login.component.ts index 9109b1aaf..89a36cc44 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-login/components/login/login.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-login/components/login/login.component.ts @@ -7,7 +7,12 @@ */ import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { + FormBuilder, + FormGroup, + Validators, + ReactiveFormsModule, +} from '@angular/forms'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { @@ -19,6 +24,13 @@ import { import { selectLoginError } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors'; import { fadeIntOutAnimation } from '~/app/shared/utils/animations'; import { filterNil } from '~/app/shared/utils/operators'; +import { RouterLink } from '@angular/router'; +import { TuiLinkModule, TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive'; interface Login { username: string; @@ -31,6 +43,18 @@ interface Login { styleUrls: ['./login.component.css'], providers: [RxState], animations: [fadeIntOutAnimation], + standalone: true, + imports: [ + TranslocoDirective, + CommonModule, + InputsModule, + ReactiveFormsModule, + TuiLinkModule, + RouterLink, + ContextNotificationComponent, + ButtonLoadingDirective, + TuiButtonModule, + ], }) export class LoginComponent implements OnInit { @Input() public projectInvitationToken = ''; diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.component.ts index 0bbeb71a2..552d3f7d5 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.component.ts @@ -12,19 +12,48 @@ import { FormControl, FormGroup, Validators, + ReactiveFormsModule, } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Store } from '@ngrx/store'; import { initResetPasswordPage, requestResetPassword, } from '../data-access/+state/actions/auth.actions'; import { selectShowResetPasswordConfirmation } from '../data-access/+state/selectors/auth.selectors'; +import { AuthForestComponent } from '../components/auth-forest/auth-forest.component'; +import { CommonModule } from '@angular/common'; + +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; + +import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive'; +import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive'; +import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe'; +import { TitleComponent } from '~/app/shared/title/title.component'; @Component({ selector: 'tg-auth-feature-reset-password', templateUrl: './auth-feature-reset-password.component.html', styleUrls: ['./auth-feature-reset-password.component.css'], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + InputsModule, + TitleComponent, + AuthForestComponent, + ContextNotificationComponent, + ReactiveFormsModule, + InputsModule, + ButtonLoadingDirective, + TuiButtonModule, + InternalLinkDirective, + RouterLink, + getUrlPipe, + ], }) export class AuthFeatureResetPasswordComponent implements OnInit { public resetPasswordForm!: FormGroup; diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.module.ts b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.module.ts index 7961f2e14..c4e896d45 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.module.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/auth-feature-reset-password.module.ts @@ -11,12 +11,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiLinkModule } from '@taiga-ui/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module'; -import { InternalLinkModule } from '~/app/shared/directives/internal-link/internal-link.module'; -import { GetUrlPipeModule } from '~/app/shared/pipes/get-url/get-url.pipe.module'; + import { TitleComponent } from '~/app/shared/title/title.component'; import { AuthForestComponent } from '../components/auth-forest/auth-forest.component'; import { AuthFeatureResetPasswordComponent } from './auth-feature-reset-password.component'; @@ -36,19 +31,14 @@ const routes: Routes = [ ]; @NgModule({ - declarations: [AuthFeatureResetPasswordComponent, NewPasswordComponent], imports: [ - CommonTemplateModule, ReactiveFormsModule, - InputsModule, - GetUrlPipeModule, - InternalLinkModule, - ButtonLoadingModule, TuiLinkModule, RouterModule.forChild(routes), - ContextNotificationModule, AuthForestComponent, TitleComponent, + AuthFeatureResetPasswordComponent, + NewPasswordComponent, ], exports: [], providers: [ diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/components/new-password.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/components/new-password.component.ts index e43c0cff5..5c3ff3a0d 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/components/new-password.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-reset-password/components/new-password.component.ts @@ -14,16 +14,37 @@ import { ValidationErrors, ValidatorFn, Validators, + ReactiveFormsModule, } from '@angular/forms'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { Store } from '@ngrx/store'; import { PasswordStrengthComponent } from '@taiga/ui/inputs/password-strength/password-strength.component'; import { newPassword } from '~/app/modules/auth/data-access/+state/actions/auth.actions'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive'; +import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive'; +import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe'; @Component({ selector: 'tg-new-password', templateUrl: './new-password.component.html', styleUrls: ['./new-password.component.css'], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + InputsModule, + PasswordStrengthComponent, + ButtonLoadingDirective, + TuiButtonModule, + InternalLinkDirective, + RouterLink, + getUrlPipe, + ], }) export class NewPasswordComponent implements OnInit { @HostBinding('class.waves') public waves = true; diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.component.ts index 99e8e6336..b50f66924 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.component.ts @@ -19,6 +19,19 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { InvitationParams } from '@taiga/data'; import { AuthService } from '../services/auth.service'; import { SignUp } from './models/sign-up.model'; +import { AuthFeatureVerifyEmailComponent } from './components/verify-email/verify-email.component'; +import { SignupComponent } from './components/signup/signup.component'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { SocialLoginComponent } from '../components/social-login/social-login.component'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { InlineNotificationComponent } from '@taiga/ui/inline-notification'; +import { ExternalLinkDirective } from '~/app/shared/directives/external-link/external-link.directive'; +import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive'; +import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe'; +import { TitleComponent } from '~/app/shared/title/title.component'; + @UntilDestroy() @Component({ selector: 'tg-sign-up', @@ -28,6 +41,21 @@ import { SignUp } from './models/sign-up.model'; './styles/sign-up.shared.css', ], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + TranslocoDirective, + TitleComponent, + CommonModule, + ContextNotificationComponent, + InlineNotificationComponent, + SocialLoginComponent, + TuiButtonModule, + ExternalLinkDirective, + SignupComponent, + InternalLinkDirective, + AuthFeatureVerifyEmailComponent, + getUrlPipe, + ], }) export class AuthFeatureSignUpComponent implements OnInit { @HostBinding('class.verify-email') public displayVerifyEmail = false; diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.module.ts b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.module.ts index a39901c34..459358c43 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.module.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/auth-feature-sign-up.module.ts @@ -11,13 +11,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiLinkModule } from '@taiga-ui/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module'; -import { ExternalLinkModule } from '~/app/shared/directives/external-link/external-link.module'; -import { InternalLinkModule } from '~/app/shared/directives/internal-link/internal-link.module'; -import { GetUrlPipeModule } from '~/app/shared/pipes/get-url/get-url.pipe.module'; + import { TitleComponent } from '~/app/shared/title/title.component'; import { SocialLoginComponent } from '../components/social-login/social-login.component'; import { SocialSignupGuard } from '../guards/social-signup.guard'; @@ -59,22 +53,16 @@ const routes: Routes = [ ]; @NgModule({ - declarations: [AuthFeatureSignUpComponent, AuthFeatureVerifyEmailComponent], imports: [ RouterModule.forChild(routes), ReactiveFormsModule, - InputsModule, TuiLinkModule, - ContextNotificationModule, - ExternalLinkModule, - GetUrlPipeModule, - InternalLinkModule, - ButtonLoadingModule, SocialLoginComponent, SignupComponent, - CommonTemplateModule, TitleComponent, InlineNotificationComponent, + AuthFeatureSignUpComponent, + AuthFeatureVerifyEmailComponent, ], exports: [], providers: [ diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/signup/signup.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/signup/signup.component.ts index ac2a4c99c..6dc8b6aab 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/signup/signup.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/signup/signup.component.ts @@ -6,6 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -26,14 +27,15 @@ import { ReactiveFormsModule, Validators, } from '@angular/forms'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; -import { TuiLinkModule } from '@taiga-ui/core'; +import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; import { InvitationParams, SignUpError } from '@taiga/data'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { InputsModule } from '@taiga/ui/inputs'; + import { PasswordStrengthComponent } from '@taiga/ui/inputs/password-strength/password-strength.component'; import { signup, @@ -41,10 +43,8 @@ import { signUpSuccess, } from '~/app/modules/auth/data-access/+state/actions/auth.actions'; import { SignUp } from '~/app/modules/auth/feature-sign-up/models/sign-up.model'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module'; -import { ExternalLinkModule } from '~/app/shared/directives/external-link/external-link.module'; -import { GetUrlPipeModule } from '~/app/shared/pipes/get-url/get-url.pipe.module'; +import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive'; +import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe'; @UntilDestroy() @Component({ @@ -54,14 +54,15 @@ import { GetUrlPipeModule } from '~/app/shared/pipes/get-url/get-url.pipe.module styleUrls: ['./signup.component.css', '../../styles/sign-up.shared.css'], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ - CommonTemplateModule, + CommonModule, ReactiveFormsModule, - InputsModule, - GetUrlPipeModule, - ButtonLoadingModule, TuiLinkModule, - ExternalLinkModule, - ContextNotificationModule, + InputsModule, + ButtonLoadingDirective, + getUrlPipe, + ContextNotificationComponent, + TranslocoDirective, + TuiButtonModule, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/verify-email/verify-email.component.ts b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/verify-email/verify-email.component.ts index 08c239297..67f8bf767 100644 --- a/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/verify-email/verify-email.component.ts +++ b/javascript/apps/taiga/src/app/modules/auth/feature-sign-up/components/verify-email/verify-email.component.ts @@ -18,13 +18,15 @@ import { import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; -import { TuiNotification } from '@taiga-ui/core'; +import { TuiNotification, TuiLinkModule } from '@taiga-ui/core'; import { resendSuccess, signup, } from '~/app/modules/auth/data-access/+state/actions/auth.actions'; import { SignUp } from '~/app/modules/auth/feature-sign-up/models/sign-up.model'; import { AppService } from '~/app/services/app.service'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @UntilDestroy() @Component({ @@ -32,6 +34,8 @@ import { AppService } from '~/app/services/app.service'; templateUrl: './verify-email.component.html', styleUrls: ['./verify-email.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CommonModule, TranslocoDirective, TuiLinkModule], }) export class AuthFeatureVerifyEmailComponent implements OnInit { @Input() diff --git a/javascript/apps/taiga/src/app/modules/errors/403/error-403.component.ts b/javascript/apps/taiga/src/app/modules/errors/403/error-403.component.ts index 66499fdbf..13e70b52c 100644 --- a/javascript/apps/taiga/src/app/modules/errors/403/error-403.component.ts +++ b/javascript/apps/taiga/src/app/modules/errors/403/error-403.component.ts @@ -7,13 +7,18 @@ */ import { Component } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { ConfigService } from '@taiga/core'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-error-403', templateUrl: './error-403.component.html', styleUrls: ['./error-403.component.css'], + standalone: true, + imports: [CommonModule, TranslocoDirective, RouterLink, TuiButtonModule], }) export class Error403Component { constructor(private router: Router, public config: ConfigService) {} diff --git a/javascript/apps/taiga/src/app/modules/errors/403/error-403.module.ts b/javascript/apps/taiga/src/app/modules/errors/403/error-403.module.ts index ea097a731..355f5f240 100644 --- a/javascript/apps/taiga/src/app/modules/errors/403/error-403.module.ts +++ b/javascript/apps/taiga/src/app/modules/errors/403/error-403.module.ts @@ -9,7 +9,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { Error403Component } from './error-403.component'; const routes: Routes = [ @@ -22,8 +22,7 @@ const routes: Routes = [ }, ]; @NgModule({ - declarations: [Error403Component], - imports: [RouterModule.forChild(routes), CommonTemplateModule], + imports: [RouterModule.forChild(routes), Error403Component], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/errors/404/error-404.component.ts b/javascript/apps/taiga/src/app/modules/errors/404/error-404.component.ts index 9df290eb4..37c3cc615 100644 --- a/javascript/apps/taiga/src/app/modules/errors/404/error-404.component.ts +++ b/javascript/apps/taiga/src/app/modules/errors/404/error-404.component.ts @@ -7,13 +7,18 @@ */ import { Component } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { ConfigService } from '@taiga/core'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-error-404', templateUrl: './error-404.component.html', styleUrls: ['./error-404.component.css'], + standalone: true, + imports: [CommonModule, TranslocoDirective, RouterLink, TuiButtonModule], }) export class Error404Component { constructor(private router: Router, public config: ConfigService) {} diff --git a/javascript/apps/taiga/src/app/modules/errors/404/error-404.module.ts b/javascript/apps/taiga/src/app/modules/errors/404/error-404.module.ts index 5058a65be..b48b7ec6a 100644 --- a/javascript/apps/taiga/src/app/modules/errors/404/error-404.module.ts +++ b/javascript/apps/taiga/src/app/modules/errors/404/error-404.module.ts @@ -9,7 +9,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { Error404Component } from './error-404.component'; const routes: Routes = [ @@ -22,8 +22,7 @@ const routes: Routes = [ }, ]; @NgModule({ - declarations: [Error404Component], - imports: [RouterModule.forChild(routes), CommonTemplateModule], + imports: [RouterModule.forChild(routes), Error404Component], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/errors/500/error-500.component.ts b/javascript/apps/taiga/src/app/modules/errors/500/error-500.component.ts index 0ee885f37..a33c38096 100644 --- a/javascript/apps/taiga/src/app/modules/errors/500/error-500.component.ts +++ b/javascript/apps/taiga/src/app/modules/errors/500/error-500.component.ts @@ -8,12 +8,17 @@ import { Component } from '@angular/core'; import { ConfigService } from '@taiga/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-error-500', templateUrl: './error-500.component.html', styleUrls: ['./error-500.component.css'], + standalone: true, + imports: [CommonModule, TranslocoDirective, RouterLink, TuiButtonModule], }) export class Error500Component { constructor(private router: Router, public config: ConfigService) {} diff --git a/javascript/apps/taiga/src/app/modules/errors/500/error-500.module.ts b/javascript/apps/taiga/src/app/modules/errors/500/error-500.module.ts index 42d6f20fd..194f18aee 100644 --- a/javascript/apps/taiga/src/app/modules/errors/500/error-500.module.ts +++ b/javascript/apps/taiga/src/app/modules/errors/500/error-500.module.ts @@ -9,7 +9,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { Error500Component } from './error-500.component'; const routes: Routes = [ @@ -22,8 +22,7 @@ const routes: Routes = [ }, ]; @NgModule({ - declarations: [Error500Component], - imports: [RouterModule.forChild(routes), CommonTemplateModule], + imports: [RouterModule.forChild(routes), Error500Component], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/feature-new-project/components/init-step/init-step.component.ts b/javascript/apps/taiga/src/app/modules/feature-new-project/components/init-step/init-step.component.ts index 145ba584d..d820ca354 100644 --- a/javascript/apps/taiga/src/app/modules/feature-new-project/components/init-step/init-step.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-new-project/components/init-step/init-step.component.ts @@ -21,11 +21,19 @@ import { FormControl, FormGroup, Validators, + ReactiveFormsModule, + FormsModule, } from '@angular/forms'; -import { Router } from '@angular/router'; -import { TranslocoService } from '@ngneat/transloco'; +import { Router, RouterLink } from '@angular/router'; +import { TranslocoService, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TuiNotification } from '@taiga-ui/core'; +import { + TuiNotification, + TuiButtonModule, + TuiTextfieldControllerModule, + TuiDataListModule, + TuiSvgModule, +} from '@taiga-ui/core'; import { ProjectCreation, Workspace, WorkspaceMembership } from '@taiga/data'; import { Step, @@ -34,12 +42,36 @@ import { import { AppService } from '~/app/services/app.service'; import { WsService } from '~/app/services/ws'; import { RouteHistoryService } from '~/app/shared/route-history/route-history.service'; +import { TuiDataListWrapperModule } from '@taiga-ui/kit/components/data-list-wrapper'; +import { TuiSelectModule } from '@taiga-ui/kit'; +import { CommonModule } from '@angular/common'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { TitleDirective } from '~/app/shared/title/title.directive'; +import { InputsModule } from '@taiga/ui/inputs'; + @UntilDestroy() @Component({ selector: 'tg-init-step', templateUrl: './init-step.component.html', styleUrls: ['../../styles/project.shared.css', './init-step.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + FormsModule, + TranslocoDirective, + TuiButtonModule, + RouterLink, + TitleDirective, + ReactiveFormsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + TuiDataListModule, + TuiDataListWrapperModule, + TuiSvgModule, + AvatarComponent, + InputsModule, + ], }) export class InitStepComponent implements OnInit, OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.spec.ts b/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.spec.ts index 4e515fe6a..30f325a1c 100644 --- a/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.spec.ts @@ -5,7 +5,6 @@ * * Copyright (c) 2023-present Kaleidos INC */ - import { RouterTestingModule } from '@angular/router/testing'; import { randUuid } from '@ngneat/falso'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; @@ -15,6 +14,7 @@ import { MockStore, provideMockStore } from '@ngrx/store/testing'; import { Observable } from 'rxjs'; import { fetchWorkspaceList } from '~/app/modules/workspace/feature-list/+state/actions/workspace.actions'; import { NewProjectComponent } from './new-project.component'; +import { getTranslocoModule } from '~/app/transloco/transloco-testing.module'; describe('NewProjectComponent', () => { let spectator: Spectator; @@ -29,7 +29,7 @@ describe('NewProjectComponent', () => { provideMockStore({ initialState }), provideMockActions(() => actions$), ], - imports: [RouterTestingModule], + imports: [RouterTestingModule, getTranslocoModule()], declareComponent: false, mocks: [], }); diff --git a/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.ts b/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.ts index e03c9b4fd..6af13283b 100644 --- a/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-new-project/components/new-project/new-project.component.ts @@ -26,12 +26,22 @@ import { TemplateProjectForm, TemplateStepComponent, } from '../template-step/template-step.component'; +import { InitStepComponent } from '../init-step/init-step.component'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; @UntilDestroy() @Component({ selector: 'tg-new-project', templateUrl: './new-project.component.html', styleUrls: ['../../styles/project.shared.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + InitStepComponent, + TemplateStepComponent, + ], }) export class NewProjectComponent implements OnInit { @ViewChild(TemplateStepComponent) diff --git a/javascript/apps/taiga/src/app/modules/feature-new-project/components/template-step/template-step.component.ts b/javascript/apps/taiga/src/app/modules/feature-new-project/components/template-step/template-step.component.ts index c8a60c8df..d3c27f5c7 100644 --- a/javascript/apps/taiga/src/app/modules/feature-new-project/components/template-step/template-step.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-new-project/components/template-step/template-step.component.ts @@ -22,10 +22,17 @@ import { FormControl, FormGroup, Validators, + ReactiveFormsModule, + FormsModule, } from '@angular/forms'; import { Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TuiNotification } from '@taiga-ui/core'; +import { + TuiNotification, + TuiButtonModule, + TuiTextfieldControllerModule, + TuiDataListModule, +} from '@taiga-ui/core'; import { ProjectCreation, Workspace, WorkspaceMembership } from '@taiga/data'; import { ModalComponent } from '@taiga/ui/modal/components'; import { RandomColorService } from '@taiga/ui/services/random-color/random-color.service'; @@ -33,6 +40,15 @@ import { Subject } from 'rxjs'; import { AppService } from '~/app/services/app.service'; import { WsService } from '~/app/services/ws'; import { RouteHistoryService } from '~/app/shared/route-history/route-history.service'; +import { TuiAutoFocusModule } from '@taiga-ui/cdk'; +import { TuiDataListWrapperModule } from '@taiga-ui/kit/components/data-list-wrapper'; +import { TuiSelectModule, TuiTextAreaModule } from '@taiga-ui/kit'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { ImageUploadComponent } from '@taiga/ui/inputs/image-upload/image-upload.component'; +import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive'; +import { InputsModule } from '@taiga/ui/inputs'; export type TemplateProjectForm = Pick< ProjectCreation, @@ -48,6 +64,25 @@ export type TemplateProjectForm = Pick< './template-step.component.css', ], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + FormsModule, + TranslocoDirective, + TuiButtonModule, + ReactiveFormsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + TuiDataListModule, + TuiDataListWrapperModule, + AvatarComponent, + TuiAutoFocusModule, + TuiTextAreaModule, + ImageUploadComponent, + ButtonLoadingDirective, + ModalComponent, + InputsModule, + ], }) export class TemplateStepComponent implements OnInit { @Input() diff --git a/javascript/apps/taiga/src/app/modules/feature-new-project/feature-new-project.module.ts b/javascript/apps/taiga/src/app/modules/feature-new-project/feature-new-project.module.ts index 0ca6b921f..e3ffe9dcb 100644 --- a/javascript/apps/taiga/src/app/modules/feature-new-project/feature-new-project.module.ts +++ b/javascript/apps/taiga/src/app/modules/feature-new-project/feature-new-project.module.ts @@ -14,12 +14,7 @@ import { EffectsModule } from '@ngrx/effects'; import { TuiAutoFocusModule } from '@taiga-ui/cdk'; import { TuiSvgModule } from '@taiga-ui/core'; import { TuiDataListWrapperModule, TuiSelectModule } from '@taiga-ui/kit'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { ModalModule } from '@taiga/ui/modal'; -import { ImageUploadModule } from 'libs/ui/src/lib/inputs/image-upload/image-upload.module'; -import { InputsModule } from 'libs/ui/src/lib/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module'; + import { TitleDirective } from '~/app/shared/title/title.directive'; import { NewProjectEffects } from './+state/effects/new-project.effects'; import { InitStepComponent } from './components/init-step/init-step.component'; @@ -28,7 +23,6 @@ import { TemplateStepComponent } from './components/template-step/template-step. import { FeatureNewProjectRoutingModule } from './feature-new-project-routing.module'; @NgModule({ - declarations: [NewProjectComponent, InitStepComponent, TemplateStepComponent], imports: [ FormsModule, ReactiveFormsModule, @@ -37,15 +31,12 @@ import { FeatureNewProjectRoutingModule } from './feature-new-project-routing.mo TuiSelectModule, TuiDataListWrapperModule, TuiAutoFocusModule, - AvatarModule, RouterModule, - CommonTemplateModule, - InputsModule, - ImageUploadModule, - ModalModule, FeatureNewProjectRoutingModule, - ButtonLoadingModule, TitleDirective, + NewProjectComponent, + InitStepComponent, + TemplateStepComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/account/account.component.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/account/account.component.ts index bef657b72..e3e5fa241 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/account/account.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/account/account.component.ts @@ -18,11 +18,12 @@ import { filterNil } from '~/app/shared/utils/operators'; import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; import { WatchElementDirective } from '~/app/shared/directives/watch-element/watch-element.directive'; import { TuiButtonModule, TuiSvgModule } from '@taiga-ui/core'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; + import { FormControl, FormGroup, Validators } from '@angular/forms'; import { DeletingAccountModalComponent } from '../deleting-account-modal/deleting-account-modal.component'; import { userSettingsFeature } from '~/app/modules/feature-user-settings/data-access/+state/reducers/user-settings.reducer'; import { userSettingsActions } from '~/app/modules/feature-user-settings/data-access/+state/actions/user-settings.actions'; +import { InputsModule } from '@taiga/ui/inputs'; interface ComponentModel { user: User; @@ -40,8 +41,8 @@ interface ComponentModel { WatchElementDirective, TuiSvgModule, TuiButtonModule, - InputsModule, DeletingAccountModalComponent, + InputsModule, ], templateUrl: './account.component.html', styleUrls: ['../../styles/user-settings.css', './account.component.css'], diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/deleting-account-modal/deleting-account-modal.component.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/deleting-account-modal/deleting-account-modal.component.ts index d975b2c14..5120e0eee 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/deleting-account-modal/deleting-account-modal.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/deleting-account-modal/deleting-account-modal.component.ts @@ -15,7 +15,7 @@ import { inject, } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { ModalModule } from '@taiga/ui/modal'; + import { TranslocoModule } from '@ngneat/transloco'; import { TuiButtonModule, @@ -23,7 +23,7 @@ import { TuiScrollbarModule, TuiSvgModule, } from '@taiga-ui/core'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; + import { FormControl, FormGroup, Validators } from '@angular/forms'; import { SafeHtmlPipe } from '~/app/shared/pipes/safe-html/safe-html.pipe'; import { RxState } from '@rx-angular/state'; @@ -33,10 +33,13 @@ import { } from '~/app/modules/feature-user-settings/data-access/+state/reducers/user-settings.reducer'; import { Store } from '@ngrx/store'; import { ProjectSummaryCardComponent } from '~/app/shared/project-summary-card/project-summary-card.component'; -import { AvatarModule } from '@taiga/ui/avatar'; + import { ProjectsDropdownComponent } from '~/app/shared/projects-dropdown/projects-dropdown.component'; import { InlineNotificationComponent } from '@taiga/ui/inline-notification'; import { userSettingsActions } from '~/app/modules/feature-user-settings/data-access/+state/actions/user-settings.actions'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { InputsModule } from '@taiga/ui/inputs'; interface ComponentModel { accountInfo: UserSettingsState['deleteUserInfo']; @@ -47,18 +50,18 @@ interface ComponentModel { standalone: true, imports: [ CommonModule, - ModalModule, TranslocoModule, TuiButtonModule, TuiLinkModule, TuiSvgModule, - InputsModule, SafeHtmlPipe, ProjectSummaryCardComponent, TuiScrollbarModule, - AvatarModule, ProjectsDropdownComponent, InlineNotificationComponent, + ModalComponent, + AvatarComponent, + InputsModule, ], templateUrl: './deleting-account-modal.component.html', styleUrls: ['./deleting-account-modal.component.css'], diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/edit-profile/edit-profile.component.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/edit-profile/edit-profile.component.ts index 6966180ff..291ce7b71 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/edit-profile/edit-profile.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/edit-profile/edit-profile.component.ts @@ -6,11 +6,14 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; @Component({ selector: 'tg-edit-profile', templateUrl: './edit-profile.component.html', styleUrls: ['./edit-profile.component.css'], + standalone: true, + imports: [CommonModule], }) export class EditProfileComponent {} diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.spec.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.spec.ts index 612c568fd..194115965 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.spec.ts @@ -20,6 +20,7 @@ import { userSettingsActions } from '~/app/modules/feature-user-settings/data-ac import { PreferencesComponent } from './preferences.component'; import { LanguageService } from '~/app/services/language/language.service'; +import { getTranslocoModule } from '~/app/transloco/transloco-testing.module'; describe('PreferencesComponent', () => { let spectator: Spectator; @@ -29,7 +30,7 @@ describe('PreferencesComponent', () => { const createComponent = createComponentFactory({ component: PreferencesComponent, - imports: [], + imports: [getTranslocoModule()], schemas: [NO_ERRORS_SCHEMA], providers: [ provideMockActions(() => actions$), diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.ts index 04d16968f..30089f3d1 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/components/preferences/preferences.component.ts @@ -7,7 +7,7 @@ */ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { FormControl } from '@angular/forms'; +import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms'; import { concatLatestFrom } from '@ngrx/effects'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; @@ -18,6 +18,16 @@ import { userSettingsActions } from '~/app/modules/feature-user-settings/data-ac import { selectLanguages } from '~/app/modules/feature-user-settings/data-access/+state/selectors/user-settings.selectors'; import { LanguageService } from '~/app/services/language/language.service'; import { filterNil } from '~/app/shared/utils/operators'; +import { + TuiTextfieldControllerModule, + TuiDataListModule, +} from '@taiga-ui/core'; +import { TuiSelectModule } from '@taiga-ui/kit'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { WatchElementDirective } from '~/app/shared/directives/watch-element/watch-element.directive'; +import { TitleComponent } from '~/app/shared/title/title.component'; @Component({ selector: 'tg-preferences', @@ -25,6 +35,19 @@ import { filterNil } from '~/app/shared/utils/operators'; styleUrls: ['../../styles/user-settings.css', './preferences.component.css'], providers: [RxState], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + InputsModule, + TranslocoDirective, + TitleComponent, + WatchElementDirective, + ReactiveFormsModule, + FormsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + TuiDataListModule, + ], }) export class PreferencesComponent implements OnInit { public readonly model$ = this.state.select(); diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.component.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.component.ts index 84f686d5a..bd420fab2 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.component.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.component.ts @@ -7,13 +7,22 @@ */ import { Component, ElementRef } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { + ActivatedRoute, + Router, + RouterLink, + RouterLinkActive, + RouterOutlet, +} from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { RxState } from '@rx-angular/state'; import { auditTime, fromEvent, take, withLatestFrom } from 'rxjs'; import { WatchElementService } from '~/app/shared/directives/watch-element/watch-element.service'; import { inViewport } from '~/app/shared/utils/in-viewport'; import { filterNil } from '~/app/shared/utils/operators'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { TitleComponent } from '~/app/shared/title/title.component'; @UntilDestroy() @Component({ @@ -21,6 +30,15 @@ import { filterNil } from '~/app/shared/utils/operators'; templateUrl: './feature-user-settings.component.html', styleUrls: ['./feature-user-settings.component.css'], providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + RouterLink, + RouterLinkActive, + RouterOutlet, + ], }) export class FeatureUserSettingsComponent { public readonly model$ = this.state.select(); diff --git a/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.module.ts b/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.module.ts index 2e1f6885d..c6ee7ec97 100644 --- a/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.module.ts +++ b/javascript/apps/taiga/src/app/modules/feature-user-settings/feature-user-settings.module.ts @@ -10,7 +10,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { TRANSLOCO_SCOPE, TranslocoModule } from '@ngneat/transloco'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; + import { WatchElementDirective } from '~/app/shared/directives/watch-element/watch-element.directive'; import { TitleComponent } from '~/app/shared/title/title.component'; import { EditProfileComponent } from './components/edit-profile/edit-profile.component'; @@ -20,11 +20,6 @@ import { FeatureUserSettingsRoutingModule } from './feature-user-settings-routin import { FeatureUserSettingsComponent } from './feature-user-settings.component'; @NgModule({ - declarations: [ - FeatureUserSettingsComponent, - EditProfileComponent, - PreferencesComponent, - ], imports: [ ReactiveFormsModule, FormsModule, @@ -33,8 +28,10 @@ import { FeatureUserSettingsComponent } from './feature-user-settings.component' TranslocoModule, WatchElementDirective, DataAccessUserSettingsModule, - InputsModule, TitleComponent, + FeatureUserSettingsComponent, + EditProfileComponent, + PreferencesComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/project/components/assign-user/assign-user.component.ts b/javascript/apps/taiga/src/app/modules/project/components/assign-user/assign-user.component.ts index b6b6b877b..b2de38b14 100644 --- a/javascript/apps/taiga/src/app/modules/project/components/assign-user/assign-user.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/components/assign-user/assign-user.component.ts @@ -10,6 +10,7 @@ import { InputModalityDetector, LiveAnnouncer, } from '@angular/cdk/a11y'; +import { CommonModule } from '@angular/common'; import { Component, ElementRef, @@ -26,7 +27,7 @@ import { FormsModule, ReactiveFormsModule, } from '@angular/forms'; -import { TranslocoService } from '@ngneat/transloco'; +import { TranslocoDirective, TranslocoService } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; @@ -39,18 +40,19 @@ import { import { TuiToggleModule } from '@taiga-ui/kit'; import { ShortcutsService } from '@taiga/core'; import { Membership, Permissions, Story, User } from '@taiga/data'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; +import { InputsModule } from '@taiga/ui/inputs'; +import { TooltipDirective } from '@taiga/ui/tooltip'; + import { Subject, map } from 'rxjs'; import { selectUser } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors'; import { initAssignUser } from '~/app/modules/project/data-access/+state/actions/project.actions'; import { selectMembers } from '~/app/modules/project/data-access/+state/selectors/project.selectors'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; import { filterNil } from '~/app/shared/utils/operators'; import { UtilsService } from '~/app/shared/utils/utils-service.service'; -import { ToolTipModule } from '@taiga/ui/tooltip'; interface AssignComponentState { members: Membership['user'][]; @@ -64,7 +66,7 @@ interface AssignComponentState { selector: 'tg-assign-user', standalone: true, imports: [ - CommonTemplateModule, + CommonModule, UserAvatarComponent, AutoFocusDirective, TuiFocusTrapModule, @@ -74,10 +76,11 @@ interface AssignComponentState { TuiScrollbarModule, TuiToggleModule, TuiSvgModule, - ToolTipModule, UserCardComponent, - InputsModule, A11yModule, + InputsModule, + TooltipDirective, + TranslocoDirective, ], templateUrl: './assign-user.component.html', styleUrls: ['./assign-user.component.css'], diff --git a/javascript/apps/taiga/src/app/modules/project/components/field-conflict/field-conflict.component.ts b/javascript/apps/taiga/src/app/modules/project/components/field-conflict/field-conflict.component.ts index 10a95e7ba..9bf3d2a9d 100644 --- a/javascript/apps/taiga/src/app/modules/project/components/field-conflict/field-conflict.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/components/field-conflict/field-conflict.component.ts @@ -13,23 +13,27 @@ import { Input, Output, } from '@angular/core'; -import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; +import { TuiButtonModule, TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; + import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; import { OutsideClickDirective } from '~/app/shared/directives/outside-click/outside-click.directive'; import { ShortcutDirective } from '~/app/shared/directives/shorcut/shorcut.directive'; import copy from 'copy-to-clipboard'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-field-conflict', standalone: true, imports: [ - CommonTemplateModule, + CommonModule, TuiSvgModule, ShortcutDirective, AutoFocusDirective, OutsideClickDirective, TuiLinkModule, + TuiButtonModule, + TranslocoDirective, ], templateUrl: './field-conflict.component.html', styleUrls: ['./field-conflict.component.css'], diff --git a/javascript/apps/taiga/src/app/modules/project/components/leave-project-dropdown/leave-project-dropdown.component.ts b/javascript/apps/taiga/src/app/modules/project/components/leave-project-dropdown/leave-project-dropdown.component.ts index bee7a3f8e..e2181135c 100644 --- a/javascript/apps/taiga/src/app/modules/project/components/leave-project-dropdown/leave-project-dropdown.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/components/leave-project-dropdown/leave-project-dropdown.component.ts @@ -22,7 +22,7 @@ import { A11yModule } from '@angular/cdk/a11y'; import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; -import { ToolTipModule } from '@taiga/ui/tooltip'; +import { TooltipDirective } from '@taiga/ui/tooltip'; @Component({ selector: 'tg-leave-project-dropdown', @@ -33,11 +33,11 @@ import { ToolTipModule } from '@taiga/ui/tooltip'; TranslocoModule, TuiButtonModule, TuiLinkModule, - ToolTipModule, A11yModule, RestoreFocusTargetDirective, RestoreFocusDirective, AutoFocusDirective, + TooltipDirective, ], templateUrl: './leave-project-dropdown.component.html', styleUrls: ['./leave-project-dropdown.component.css'], diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-status/kanban-create-status.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-status/kanban-create-status.component.ts index 057119c07..51ad1d2a2 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-status/kanban-create-status.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-status/kanban-create-status.component.ts @@ -19,12 +19,25 @@ import { Store } from '@ngrx/store'; import { KanbanActions } from '~/app/modules/project/feature-kanban/data-access/+state/actions/kanban.actions'; import { selectCurrentWorkflow } from '~/app/modules/project/feature-kanban/data-access/+state/selectors/kanban.selectors'; import { EditStatus } from '~/app/modules/project/feature-kanban/models/edit-status.model'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { EditStatusComponent } from '../edit-status/edit-status.component'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; @Component({ selector: 'tg-kanban-create-status', templateUrl: './kanban-create-status.component.html', styleUrls: ['./kanban-create-status.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + EditStatusComponent, + TuiButtonModule, + RestoreFocusTargetDirective, + ], }) export class KanbanCreateStatusComponent implements OnInit { @Input({ required: true }) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-story-inline/kanban-create-story-inline.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-story-inline/kanban-create-story-inline.component.ts index e4dc1e3c5..864aa8a7b 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-story-inline/kanban-create-story-inline.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/create-story-inline/kanban-create-story-inline.component.ts @@ -18,8 +18,8 @@ import { Output, ViewChild, } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { TranslocoService } from '@ngneat/transloco'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { TranslocoService, TranslocoDirective } from '@ngneat/transloco'; import { Store } from '@ngrx/store'; import { Status, Workflow } from '@taiga/data'; import { v4 } from 'uuid'; @@ -28,12 +28,25 @@ import { StoryTitleMaxLength, StoryTitleValidation, } from '~/app/shared/story/title-validation'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TuiActiveZoneModule } from '@taiga-ui/cdk'; +import { InputsModule } from '@taiga/ui/inputs'; @Component({ selector: 'tg-create-story-inline', templateUrl: './kanban-create-story-inline.component.html', styleUrls: ['./kanban-create-story-inline.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + InputsModule, + TranslocoDirective, + ReactiveFormsModule, + TuiActiveZoneModule, + TuiButtonModule, + ], }) export class KanbanCreateStoryInlineComponent implements AfterViewInit { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/delete-status/delete-status.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/delete-status/delete-status.component.ts index d96e4ab59..dee9f7a51 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/delete-status/delete-status.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/delete-status/delete-status.component.ts @@ -23,13 +23,14 @@ import { TranslocoModule } from '@ngneat/transloco'; import { TuiAutoFocusModule } from '@taiga-ui/cdk'; import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; import { Status } from '@taiga/data'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { ModalModule } from '@taiga/ui/modal'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; + import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { CommonModule } from '@angular/common'; import { Observable, map } from 'rxjs'; import { toSignal } from '@angular/core/rxjs-interop'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ModalComponent } from '@taiga/ui/modal/components'; @Component({ selector: 'tg-delete-status', @@ -41,11 +42,11 @@ import { toSignal } from '@angular/core/rxjs-interop'; TranslocoModule, TuiButtonModule, TuiLinkModule, - ModalModule, TuiAutoFocusModule, - ContextNotificationModule, - InputsModule, CommonModule, + ContextNotificationComponent, + InputsModule, + ModalComponent, ], }) export class DeleteStatusComponent implements OnInit { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/edit-status/edit-status.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/edit-status/edit-status.component.ts index 2af2fc63d..1a5b2f2ea 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/edit-status/edit-status.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/edit-status/edit-status.component.ts @@ -17,18 +17,41 @@ import { Output, ViewChild, } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { + FormBuilder, + FormGroup, + Validators, + ReactiveFormsModule, +} from '@angular/forms'; import { Store } from '@ngrx/store'; import { Status } from '@taiga/data'; import { selectCurrentWorkflow } from '~/app/modules/project/feature-kanban/data-access/+state/selectors/kanban.selectors'; import { EditStatus } from '~/app/modules/project/feature-kanban/models/edit-status.model'; import { UtilsService } from '~/app/shared/utils/utils-service.service'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; +import { OutsideClickDirective } from '~/app/shared/directives/outside-click/outside-click.directive'; +import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; @Component({ selector: 'tg-edit-status', templateUrl: './edit-status.component.html', styleUrls: ['./edit-status.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + RestoreFocusDirective, + OutsideClickDirective, + AutoFocusDirective, + InputsModule, + TuiButtonModule, + ], }) export class EditStatusComponent implements OnInit { @ViewChild('statusInput') diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/empty/kanban-empty.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/empty/kanban-empty.component.ts index a5185e671..0c4bc9f45 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/empty/kanban-empty.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/empty/kanban-empty.component.ts @@ -15,7 +15,7 @@ import { } from '@angular/core'; import { TranslocoModule } from '@ngneat/transloco'; import { TuiButtonModule } from '@taiga-ui/core'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; + import { CommonModule } from '@angular/common'; import { NgOptimizedImage } from '@angular/common'; @@ -25,13 +25,7 @@ import { NgOptimizedImage } from '@angular/common'; styleUrls: ['./kanban-empty.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [ - TranslocoModule, - TuiButtonModule, - InputsModule, - CommonModule, - NgOptimizedImage, - ], + imports: [TranslocoModule, TuiButtonModule, CommonModule, NgOptimizedImage], }) export class KanbanEmptyComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/status/kanban-status.component.html b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/status/kanban-status.component.html index fd6fff0c7..cbc034d9a 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/status/kanban-status.component.html +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/status/kanban-status.component.html @@ -74,6 +74,7 @@ trackBy: trackByRef "> { + this.cdkScrollable?.checkViewportSize(); + }); } private fillColor() { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story-a11y-drag.directive.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story-a11y-drag.directive.ts index 856942026..e168e2c6f 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story-a11y-drag.directive.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story-a11y-drag.directive.ts @@ -17,6 +17,7 @@ import { KanbanStoryComponent } from './kanban-story.component'; @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: 'tg-kanban-story', + standalone: true, }) export class A11yDragStoryDirective { @HostListener('keydown.space.prevent', ['$event']) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story.component.ts index ffb297116..ad3fa4e5a 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/story/kanban-story.component.ts @@ -6,19 +6,17 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { Location } from '@angular/common'; +import { Location, SlicePipe, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, - ChangeDetectorRef, Component, ElementRef, HostBinding, - Inject, Input, OnChanges, OnInit, - Optional, SimpleChanges, + forwardRef, } from '@angular/core'; import { UntilDestroy } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; @@ -33,6 +31,16 @@ import { KanbanStory } from '~/app/modules/project/feature-kanban/kanban.model'; import { PermissionsService } from '~/app/services/permissions.service'; import { filterNil } from '~/app/shared/utils/operators'; import { KanbanStatusComponent } from '../status/kanban-status.component'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; + +import { TuiSvgModule } from '@taiga-ui/core'; +import { RouterLink } from '@angular/router'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; +import { OutsideClickDirective } from '~/app/shared/directives/outside-click/outside-click.directive'; +import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; +import { AssignUserComponent } from '~/app/modules/project/components/assign-user/assign-user.component'; export interface StoryState { isA11yDragInProgress: boolean; @@ -50,6 +58,21 @@ export interface StoryState { styleUrls: ['./kanban-story.component.css'], providers: [RxState], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + RouterLink, + TuiSvgModule, + HasPermissionDirective, + TuiDropdownModule, + TooltipDirective, + UserAvatarComponent, + AssignUserComponent, + OutsideClickDirective, + SlicePipe, + forwardRef(() => KanbanStatusComponent), + ], }) export class KanbanStoryComponent implements OnChanges, OnInit { @Input() @@ -62,6 +85,9 @@ export class KanbanStoryComponent implements OnChanges, OnInit { @Input() public total = 0; + @Input() + public kanbanStatus?: KanbanStatusComponent; + @HostBinding('attr.data-test') public dataTest = 'kanban-story'; @@ -91,11 +117,7 @@ export class KanbanStoryComponent implements OnChanges, OnInit { private location: Location, private store: Store, private el: ElementRef, - @Optional() - @Inject(KanbanStatusComponent) - private kabanStatus: KanbanStatusComponent, - private permissionService: PermissionsService, - private cd: ChangeDetectorRef + private permissionService: PermissionsService ) { this.state.set({ assignees: [], @@ -241,18 +263,22 @@ export class KanbanStoryComponent implements OnChanges, OnInit { } private scrollToDragStoryIfNotVisible() { + const kanbanStatus = this.kanbanStatus; + + if (!kanbanStatus) { + return; + } + const statusScrollBottom = - this.kabanStatus.kanbanVirtualScroll?.scrollStrategy.viewport?.elementRef.nativeElement.getBoundingClientRect() + kanbanStatus.kanbanVirtualScroll?.scrollStrategy.viewport?.elementRef.nativeElement.getBoundingClientRect() .bottom; - if (statusScrollBottom) { const newTop = this.nativeElement.getBoundingClientRect().bottom - statusScrollBottom + 1; - if (newTop > 0) { - this.kabanStatus.kanbanVirtualScroll?.scrollStrategy.scrollTo({ + kanbanStatus.kanbanVirtualScroll?.scrollStrategy.scrollTo({ top: newTop, }); } diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component.ts index 8740c5fa8..7013aa2e5 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component.ts @@ -6,7 +6,11 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; +import { + CdkVirtualScrollViewport, + CdkFixedSizeVirtualScroll, + CdkVirtualForOf, +} from '@angular/cdk/scrolling'; import { AfterViewInit, ChangeDetectionStrategy, @@ -20,12 +24,16 @@ import { SimpleChanges, ViewChild, ViewChildren, + forwardRef, inject, } from '@angular/core'; import { RxState } from '@rx-angular/state'; import { Workflow } from '@taiga/data'; import { KanbanScrollManagerService } from '~/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-manager.service'; -import { KanbanStatusKeyboardNavigation } from '~/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive'; +import { + KanbanStatusKeyboardNavigation, + KanbanStatusKeyboardNavigationDirective, +} from '~/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive'; import { KanbanStory } from '~/app/modules/project/feature-kanban/kanban.model'; import { AutoScrollService } from '@taiga/ui/drag'; import { KineticScrollService } from '~/app/shared/scroll/kinetic-scroll.service'; @@ -40,6 +48,15 @@ import { import { Store } from '@ngrx/store'; import { kanbanFeature } from '~/app/modules/project/feature-kanban/data-access/+state/reducers/kanban.reducer'; import { animate, style, transition, trigger } from '@angular/animations'; +import { KanbanEmptyComponent } from '../empty/kanban-empty.component'; +import { A11yDragStoryDirective } from '../story/kanban-story-a11y-drag.directive'; +import { KanbanStoryComponent } from '../story/kanban-story.component'; +import { KanbanCreateStatusComponent } from '../create-status/kanban-create-status.component'; +import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar'; +import { CommonModule } from '@angular/common'; +import { DropZoneDirective } from '@taiga/ui/drag/directives/drop-zone.directive'; +import { DraggableDirective } from '@taiga/ui/drag/directives/draggable.directive'; +import { DragInProgressComponent } from '@taiga/ui/drag/components/drag-in-progress.component'; @Component({ selector: 'tg-kanban-workflow', @@ -53,6 +70,23 @@ import { animate, style, transition, trigger } from '@angular/animations'; transition(':leave', [animate('50ms', style({}))]), ]), ], + standalone: true, + imports: [ + CommonModule, + TuiScrollbarModule, + DropZoneDirective, + CdkVirtualScrollViewport, + CdkFixedSizeVirtualScroll, + CdkVirtualForOf, + forwardRef(() => KanbanStatusComponent), + KanbanStatusKeyboardNavigationDirective, + DraggableDirective, + KanbanCreateStatusComponent, + DragInProgressComponent, + KanbanStoryComponent, + A11yDragStoryDirective, + KanbanEmptyComponent, + ], }) export class KanbanWorkflowComponent implements diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy.ts index aa0bb8b48..bed382101 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy.ts @@ -244,6 +244,7 @@ export class KanbanVirtualScrollStrategy implements VirtualScrollStrategy { deps: [forwardRef(() => KanbanVirtualScrollDirective)], }, ], + standalone: true, }) export class KanbanVirtualScrollDirective implements OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/data-access/+state/effects/kanban.effects.spec.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/data-access/+state/effects/kanban.effects.spec.ts index da05bc244..e3623ecf7 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/data-access/+state/effects/kanban.effects.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/data-access/+state/effects/kanban.effects.spec.ts @@ -5,7 +5,6 @@ * * Copyright (c) 2023-present Kaleidos INC */ - import { randFirstName, randNumber, randUserName } from '@ngneat/falso'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { provideMockActions } from '@ngrx/effects/testing'; diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive.ts index 217f93d38..deb5eee6e 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive.ts @@ -18,7 +18,7 @@ import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { Status, Workflow } from '@taiga/data'; import { Observable } from 'rxjs'; -import { KanbanStatusComponent } from '~/app/modules/project/feature-kanban/components/status/kanban-status.component'; +import { type KanbanStatusComponent } from '~/app/modules/project/feature-kanban/components/status/kanban-status.component'; import { KanbanWorkflowComponent } from '~/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component'; import { KanbanVirtualScrollDirective } from '~/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy'; import { @@ -45,6 +45,7 @@ export interface KanbanKeyboardNavigation { @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: '[tgKanbanStatusKeyboardNavigation]', + standalone: true, }) export class KanbanStatusKeyboardNavigationDirective implements OnInit { @ViewChild(KanbanVirtualScrollDirective) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-story-keyboard-navigation/kanban-story-keyboard-navigation.directive.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-story-keyboard-navigation/kanban-story-keyboard-navigation.directive.ts index 9c9e14538..88d723c8a 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-story-keyboard-navigation/kanban-story-keyboard-navigation.directive.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/kanban-story-keyboard-navigation/kanban-story-keyboard-navigation.directive.ts @@ -19,7 +19,7 @@ import { TranslocoService } from '@ngneat/transloco'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { Status, Workflow } from '@taiga/data'; -import { KanbanStatusComponent } from '~/app/modules/project/feature-kanban/components/status/kanban-status.component'; +import { type KanbanStatusComponent } from '~/app/modules/project/feature-kanban/components/status/kanban-status.component'; import { KanbanWorkflowComponent } from '~/app/modules/project/feature-kanban/components/workflow/kanban-workflow.component'; import { KanbanVirtualScrollDirective } from '~/app/modules/project/feature-kanban/custom-scroll-strategy/kanban-scroll-strategy'; import { KanbanActions } from '~/app/modules/project/feature-kanban/data-access/+state/actions/kanban.actions'; @@ -54,6 +54,7 @@ export interface KanbanKeyboardNavigation { @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: '[tgKanbanStoryKeyboardNavigation]', + standalone: true, }) export class KanbanStoryKeyboardNavigationDirective implements OnInit { @ViewChild(KanbanVirtualScrollDirective) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/status-scroll-dynamic-height/scroll-dynamic-height.directive.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/status-scroll-dynamic-height/scroll-dynamic-height.directive.ts index 6eb041f45..c77cb4795 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/status-scroll-dynamic-height/scroll-dynamic-height.directive.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/directives/status-scroll-dynamic-height/scroll-dynamic-height.directive.ts @@ -17,17 +17,15 @@ import { OnDestroy, Output, } from '@angular/core'; -import { UntilDestroy } from '@ngneat/until-destroy'; -import { KanbanStatusComponent } from '~/app/modules/project/feature-kanban/components/status/kanban-status.component'; export interface StatusScrollDynamicHeight { cdkScrollable?: CdkVirtualScrollViewport; } -@UntilDestroy() @Directive({ selector: '[tgScrollDynamicHeight]', exportAs: 'tgScrollDynamicHeight', + standalone: true, }) export class StatusScrollDynamicHeightDirective implements AfterViewInit, OnDestroy @@ -77,10 +75,7 @@ export class StatusScrollDynamicHeightDirective return this._virtualScrollViewPort; } - constructor( - private el: ElementRef, - private kanbanStatusComponent: KanbanStatusComponent - ) {} + constructor(private el: ElementRef) {} public calculateHeight() { const maxHeight = this.getMaxHeight(); @@ -160,9 +155,6 @@ export class StatusScrollDynamicHeightDirective if (Math.round(this.currentBlockSize) !== Math.round(blockSize)) { this.currentBlockSize = blockSize; this.virtualScrollViewPort.style.blockSize = `${blockSize}px`; - requestAnimationFrame(() => { - this.kanbanStatusComponent.cdkScrollable?.checkViewportSize(); - }); } } diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts index 38389feea..c3b108648 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts @@ -6,7 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { Location } from '@angular/common'; +import { Location, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, ViewChild } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { Router } from '@angular/router'; @@ -69,6 +69,12 @@ import { selectWorkflows, } from './data-access/+state/selectors/kanban.selectors'; import { KanbanReorderEvent } from './kanban.model'; +import { KanbanWorkflowComponent } from './components/workflow/kanban-workflow.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { InviteUserModalComponent } from '~/app/shared/invite-user-modal/invite-user-modal.component'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; +import { TitleComponent } from '~/app/shared/title/title.component'; interface ComponentState { loadingWorkflows: KanbanState['loadingWorkflows']; @@ -89,6 +95,18 @@ interface ComponentState { styleUrls: ['./project-feature-kanban.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + ResizedDirective, + KanbanWorkflowComponent, + ProjectFeatureStoryWrapperSideViewComponent, + ModalComponent, + ProjectFeatureStoryWrapperModalViewComponent, + InviteUserModalComponent, + ], }) export class ProjectFeatureKanbanComponent { @ViewChild(ProjectFeatureStoryWrapperModalViewComponent) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.module.ts index 64221bc33..ccbc392c7 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.module.ts @@ -17,19 +17,18 @@ import { TuiScrollbarModule, TuiSvgModule, } from '@taiga-ui/core'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { ModalModule } from 'libs/ui/src/lib/modal/modal.module'; + import { ProjectFeatureStoryWrapperModalViewModule } from '~/app/modules/project//feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.module'; import { StatusScrollDynamicHeightDirective } from '~/app/modules/project/feature-kanban/directives/status-scroll-dynamic-height/scroll-dynamic-height.directive'; import { ProjectFeatureStoryWrapperSideViewModule } from '~/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; import { InViewportDirective } from '~/app/shared/directives/in-viewport.directive'; import { OutsideClickDirective } from '~/app/shared/directives/outside-click/outside-click.directive'; import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; -import { DragModule } from '@taiga/ui/drag'; + import { DropdownModule } from '~/app/shared/dropdown/dropdown.module'; import { InviteUserModalModule } from '~/app/shared/invite-user-modal/invite-user-modal.module'; import { ResizedDirective } from '~/app/shared/resize/resize.directive'; @@ -50,44 +49,23 @@ import { DataAccessKanbanModule } from './data-access/kanban-data-access.module' import { KanbanStatusKeyboardNavigationDirective } from './directives/kanban-status-keyboard-navigation/kanban-status-keyboard-navigation.directive'; import { KanbanStoryKeyboardNavigationDirective } from './directives/kanban-story-keyboard-navigation/kanban-story-keyboard-navigation.directive'; import { ProjectFeatureKanbanComponent } from './project-feature-kanban.component'; -import { ToolTipModule } from '@taiga/ui/tooltip'; @NgModule({ - declarations: [ - ProjectFeatureKanbanComponent, - KanbanStatusComponent, - KanbanCreateStatusComponent, - KanbanWorkflowComponent, - KanbanStoryKeyboardNavigationDirective, - KanbanStatusKeyboardNavigationDirective, - KanbanStoryComponent, - KanbanCreateStoryInlineComponent, - StatusScrollDynamicHeightDirective, - KanbanVirtualScrollDirective, - A11yDragStoryDirective, - EditStatusComponent, - ], exports: [ProjectFeatureKanbanComponent], - imports: [ UserAvatarComponent, TuiAutoFocusModule, TuiLinkModule, - ToolTipModule, HasPermissionDirective, TitleComponent, - CommonTemplateModule, TuiSvgModule, - ModalModule, InviteUserModalModule, DataAccessKanbanModule, ScrollingModule, TuiScrollbarModule, InViewportDirective, A11yModule, - InputsModule, TuiActiveZoneModule, - DragModule, ProjectFeatureStoryWrapperSideViewModule, ProjectFeatureStoryWrapperModalViewModule, ResizedDirective, @@ -100,6 +78,18 @@ import { ToolTipModule } from '@taiga/ui/tooltip'; AutoFocusDirective, DeleteStatusComponent, KanbanEmptyComponent, + ProjectFeatureKanbanComponent, + KanbanStatusComponent, + KanbanCreateStatusComponent, + KanbanWorkflowComponent, + KanbanStoryKeyboardNavigationDirective, + KanbanStatusKeyboardNavigationDirective, + KanbanStoryComponent, + KanbanCreateStoryInlineComponent, + StatusScrollDynamicHeightDirective, + KanbanVirtualScrollDirective, + A11yDragStoryDirective, + EditStatusComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.spec.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.spec.ts index f9de911a5..a9852c3b7 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.spec.ts @@ -8,7 +8,6 @@ import { CommonModule } from '@angular/common'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import '@ng-web-apis/universal/mocks'; import { randWord } from '@ngneat/falso'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { provideMockActions } from '@ngrx/effects/testing'; diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.ts index e14dabd12..507c60311 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-menu/project-navigation-menu.component.ts @@ -7,6 +7,7 @@ */ import { animate, style, transition, trigger } from '@angular/animations'; +import { CommonModule } from '@angular/common'; import { ChangeDetectorRef, Component, @@ -17,12 +18,13 @@ import { ViewChild, } from '@angular/core'; import { RouterModule } from '@angular/router'; +import { TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { TuiSvgModule } from '@taiga-ui/core'; import { Project } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; + import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; interface ProjectMenuDialog { @@ -50,10 +52,11 @@ const cssValue = getComputedStyle(document.documentElement); styleUrls: ['./project-navigation-menu.component.css'], imports: [ TuiSvgModule, - CommonTemplateModule, - AvatarModule, RouterModule, HasPermissionDirective, + AvatarComponent, + TranslocoDirective, + CommonModule, ], animations: [ trigger('blockInitialRenderAnimation', [transition(':enter', [])]), diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.spec.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.spec.ts index 551b18a96..b70da56ac 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.spec.ts @@ -8,7 +8,6 @@ import { ActivatedRoute } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import '@ng-web-apis/universal/mocks'; import { randDomainSuffix, randUuid, randWord } from '@ngneat/falso'; import { createComponentFactory, diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.ts index d7bd1667e..f658068ad 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/components/project-navigation-settings/project-navigation-settings.component.ts @@ -7,6 +7,7 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -19,14 +20,15 @@ import { ViewChild, } from '@angular/core'; import { ActivatedRoute, Router, RouterModule } from '@angular/router'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { TuiSvgModule } from '@taiga-ui/core'; import { Project } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; + import { filter, take } from 'rxjs/operators'; import { ProjectNavigationComponent } from '~/app/modules/project/feature-navigation/project-feature-navigation.component'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { RouteHistoryService } from '~/app/shared/route-history/route-history.service'; @UntilDestroy() @@ -36,7 +38,13 @@ import { RouteHistoryService } from '~/app/shared/route-history/route-history.se templateUrl: './project-navigation-settings.component.html', styleUrls: ['./project-navigation-settings.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [TuiSvgModule, CommonTemplateModule, AvatarModule, RouterModule], + imports: [ + CommonModule, + TuiSvgModule, + RouterModule, + AvatarComponent, + TranslocoDirective, + ], providers: [ { provide: TRANSLOCO_SCOPE, @@ -51,6 +59,9 @@ export class ProjectNavigationSettingsComponent implements OnInit { @Input() public project!: Project; + @Input({ required: true }) + public projectNavigationComponent!: ProjectNavigationComponent; + @Output() public closeMenu = new EventEmitter(); @@ -78,7 +89,6 @@ export class ProjectNavigationSettingsComponent implements OnInit { private router: Router, private route: ActivatedRoute, private cd: ChangeDetectorRef, - private projectNavigationComponent: ProjectNavigationComponent, private routeHistory: RouteHistoryService ) {} diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.html b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.html index 990761349..e3c6b5f32 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.html +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.html @@ -25,6 +25,7 @@ data-test="project-navigation-settings" *ngIf="showProjectSettings || settingsAnimationInProgress" [project]="project" + [projectNavigationComponent]="this" (closeMenu)="closeMenu()"> diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.spec.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.spec.ts index 4fd9333d4..208e79fb2 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.spec.ts @@ -7,7 +7,7 @@ */ import { CommonModule } from '@angular/common'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; import { Router } from '@angular/router'; import { createComponentFactory, @@ -34,6 +34,18 @@ describe('ProjectNavigationComponent', () => { url: '/settings', }), ], + shallow: true, + overrideComponents: [ + [ + ProjectNavigationComponent, + { + set: { + imports: [CommonModule], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }, + }, + ], + ], }); beforeEach(() => { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.ts index 45f0821f7..94d60208e 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.component.ts @@ -31,6 +31,9 @@ import { RxState } from '@rx-angular/state'; import { Project } from '@taiga/data'; import { Subject } from 'rxjs'; import { LocalStorageService } from '~/app/shared/local-storage/local-storage.service'; +import { ProjectNavigationSettingsComponent } from './components/project-navigation-settings/project-navigation-settings.component'; +import { CommonModule } from '@angular/common'; +import { ProjectNavigationMenuComponent } from './components/project-navigation-menu/project-navigation-menu.component'; const collapseMenuAnimation = '200ms ease-out'; const openMenuAnimation = '200ms ease-in'; @@ -138,6 +141,12 @@ const translateMenuSelector = '.main-nav-container-inner'; ), ]), ], + standalone: true, + imports: [ + CommonModule, + ProjectNavigationMenuComponent, + ProjectNavigationSettingsComponent, + ], }) export class ProjectNavigationComponent implements OnInit, AfterViewInit { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.module.ts deleted file mode 100644 index 16f13cb1d..000000000 --- a/javascript/apps/taiga/src/app/modules/project/feature-navigation/project-feature-navigation.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { A11yModule } from '@angular/cdk/a11y'; -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { TuiSvgModule } from '@taiga-ui/core'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { ProjectNavigationMenuComponent } from './components/project-navigation-menu/project-navigation-menu.component'; -import { ProjectNavigationSettingsComponent } from './components/project-navigation-settings/project-navigation-settings.component'; -import { ProjectNavigationComponent } from './project-feature-navigation.component'; - -@NgModule({ - imports: [ - TuiSvgModule, - CommonTemplateModule, - A11yModule, - RouterModule, - AvatarModule, - ProjectNavigationSettingsComponent, - ProjectNavigationMenuComponent, - ], - providers: [], - declarations: [ProjectNavigationComponent], - exports: [ProjectNavigationComponent], -}) -export class ProjectFeatureNavigationModule {} diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/delete-project/delete-project.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/delete-project/delete-project.component.ts index f299d6ae5..954d49977 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/delete-project/delete-project.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/delete-project/delete-project.component.ts @@ -6,6 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -17,8 +18,8 @@ import { TranslocoModule } from '@ngneat/transloco'; import { TuiAutoFocusModule } from '@taiga-ui/cdk'; import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; import { Project } from '@taiga/data'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { ModalModule } from '@taiga/ui/modal'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { ModalComponent } from '@taiga/ui/modal/components'; @Component({ selector: 'tg-delete-project', @@ -27,12 +28,13 @@ import { ModalModule } from '@taiga/ui/modal'; changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ + CommonModule, TranslocoModule, TuiButtonModule, TuiLinkModule, - ModalModule, TuiAutoFocusModule, - ContextNotificationModule, + ModalComponent, + ContextNotificationComponent, ], }) export class DeleteProjectComponent { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/edit-project/edit-project.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/edit-project/edit-project.component.ts index 0ee439a3f..266c876b1 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/edit-project/edit-project.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/edit-project/edit-project.component.ts @@ -30,11 +30,13 @@ import { TuiNotification, } from '@taiga-ui/core'; import { EditProject, Project } from '@taiga/data'; -import { ImageUploadModule } from '@taiga/ui/inputs/image-upload/image-upload.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { ModalModule } from '@taiga/ui/modal'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { InputsModule } from '@taiga/ui/inputs'; + import { AppService } from '~/app/services/app.service'; import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; +import { ImageUploadComponent } from '@taiga/ui/inputs/image-upload/image-upload.component'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-edit-project', @@ -43,16 +45,17 @@ import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ + CommonModule, ReactiveFormsModule, - InputsModule, - ImageUploadModule, FormsModule, TranslocoModule, TuiButtonModule, TuiLinkModule, - ModalModule, TuiAutoFocusModule, DiscardChangesModalComponent, + ModalComponent, + InputsModule, + ImageUploadComponent, ], }) export class EditProjectComponent implements OnInit { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-list/project-members-list.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-list/project-members-list.component.ts index de3664461..ead8c8d42 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-list/project-members-list.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-list/project-members-list.component.ts @@ -22,7 +22,7 @@ import { SimpleChanges, ViewChild, } from '@angular/core'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TranslocoDirective } from '@ngneat/transloco'; import { Store } from '@ngrx/store'; import { TuiLinkModule, @@ -30,19 +30,19 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { Invitation, Membership, User } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { BadgeModule } from '@taiga/ui/badge/badge.module'; -import { SkeletonsModule } from '@taiga/ui/skeletons/skeletons.module'; + import { of } from 'rxjs'; import { delay, take, tap } from 'rxjs/operators'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { CapitalizePipeModule } from '~/app/shared/pipes/capitalize/capitalize.pipe.module'; + import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; import { fadeIntOutAnimation } from '~/app/shared/utils/animations'; import { LeaveProjectDropdownComponent } from '~/app/modules/project/components/leave-project-dropdown/leave-project-dropdown.component'; import { selectCurrentProject } from '~/app/modules/project/data-access/+state/selectors/project.selectors'; import { filterNil } from '~/app/shared/utils/operators'; import { leaveProject } from '~/app/modules/project/data-access/+state/actions/project.actions'; +import { capitalizePipe } from '~/app/shared/pipes/capitalize/capitalize.pipe'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-project-members-list', @@ -51,26 +51,16 @@ import { leaveProject } from '~/app/modules/project/data-access/+state/actions/p styleUrls: ['./project-members-list.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ - SkeletonsModule, + CommonModule, TuiScrollbarModule, TuiSvgModule, - AvatarModule, - CommonTemplateModule, TuiLinkModule, UserCardComponent, ScrollingModule, - BadgeModule, - CapitalizePipeModule, LeaveProjectDropdownComponent, - ], - providers: [ - { - provide: TRANSLOCO_SCOPE, - useValue: { - scope: 'project_overview', - alias: 'project_overview', - }, - }, + capitalizePipe, + BadgeComponent, + TranslocoDirective, ], animations: [ fadeIntOutAnimation, diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-modal/project-members-modal.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-modal/project-members-modal.component.ts index 95c242201..60d8fe660 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-modal/project-members-modal.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members-modal/project-members-modal.component.ts @@ -13,11 +13,16 @@ import { Input, Output, } from '@angular/core'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { TuiScrollbarModule, TuiSvgModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { + TuiButtonModule, + TuiScrollbarModule, + TuiSvgModule, +} from '@taiga-ui/core'; import { Invitation, Membership, User } from '@taiga/data'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { ProjectMembersListComponent } from '../project-members-list/project-members-list.component'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-project-members-modal', @@ -26,19 +31,12 @@ import { ProjectMembersListComponent } from '../project-members-list/project-mem styleUrls: ['./project-members-modal.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ + CommonModule, TuiSvgModule, - CommonTemplateModule, TuiScrollbarModule, ProjectMembersListComponent, - ], - providers: [ - { - provide: TRANSLOCO_SCOPE, - useValue: { - scope: 'project_overview', - alias: 'project_overview', - }, - }, + TranslocoDirective, + TuiButtonModule, ], }) export class ProjectMembersModalComponent { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members/project-members.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members/project-members.component.ts index 81772a8c2..fde2fb49c 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members/project-members.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/components/project-members/project-members.component.ts @@ -7,15 +7,14 @@ */ import { ChangeDetectionStrategy, Component, ViewChild } from '@angular/core'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; -import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; +import { TuiButtonModule, TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { Invitation, Membership, Project, User } from '@taiga/data'; -import { ModalModule } from '@taiga/ui/modal'; -import { SkeletonsModule } from '@taiga/ui/skeletons/skeletons.module'; + import { Subject, merge } from 'rxjs'; import { delay, distinctUntilChanged, map, take } from 'rxjs/operators'; import { selectUser } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors'; @@ -39,12 +38,15 @@ import { import { MEMBERS_PAGE_SIZE } from '~/app/modules/project/feature-overview/feature-overview.constants'; import { WaitingForToastNotification } from '~/app/modules/project/feature-overview/project-feature-overview.animation-timing'; import { WsService } from '~/app/services/ws'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { invitationProjectActions } from '~/app/shared/invite-user-modal/data-access/+state/actions/invitation.action'; import { InviteUserModalModule } from '~/app/shared/invite-user-modal/invite-user-modal.module'; import { filterNil } from '~/app/shared/utils/operators'; import { ProjectMembersListComponent } from '../project-members-list/project-members-list.component'; import { ProjectMembersModalComponent } from '../project-members-modal/project-members-modal.component'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { CommonModule } from '@angular/common'; @UntilDestroy() @Component({ @@ -53,25 +55,18 @@ import { ProjectMembersModalComponent } from '../project-members-modal/project-m templateUrl: './project-members.component.html', styleUrls: ['./project-members.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ - RxState, - { - provide: TRANSLOCO_SCOPE, - useValue: { - scope: 'project_overview', - alias: 'project_overview', - }, - }, - ], + providers: [RxState], imports: [ + CommonModule, TuiSvgModule, - CommonTemplateModule, TuiLinkModule, - ModalModule, + TuiButtonModule, ProjectMembersModalComponent, - SkeletonsModule, ProjectMembersListComponent, InviteUserModalModule, + UserSkeletonComponent, + ModalComponent, + TranslocoDirective, ], }) export class ProjectMembersComponent { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.component.ts index 91e85d766..ad8aad10b 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.component.ts @@ -34,13 +34,40 @@ import { resetOverview, } from './data-access/+state/actions/project-overview.actions'; import { selectInvitations } from './data-access/+state/selectors/project-overview.selectors'; +import { DeleteProjectComponent } from './components/delete-project/delete-project.component'; +import { EditProjectComponent } from './components/edit-project/edit-project.component'; +import { ProjectMembersComponent } from './components/project-members/project-members.component'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { + TuiHostedDropdownModule, + TuiButtonModule, + TuiLinkModule, + TuiDataListModule, + TuiSvgModule, +} from '@taiga-ui/core'; + +import { CommonModule } from '@angular/common'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; +import { TitleComponent } from '~/app/shared/title/title.component'; @UntilDestroy() @Component({ selector: 'tg-project-feature-overview', templateUrl: './project-feature-overview.component.html', styleUrls: ['./project-feature-overview.component.css'], - providers: [RxState], + providers: [ + RxState, + { + provide: TRANSLOCO_SCOPE, + useValue: { + scope: 'project_overview', + alias: 'project_overview', + }, + }, + ], animations: [ trigger('slideOut', [ transition(':leave', [ @@ -54,6 +81,24 @@ import { selectInvitations } from './data-access/+state/selectors/project-overvi ]), ]), ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + AvatarComponent, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiButtonModule, + TooltipDirective, + TuiLinkModule, + ProjectMembersComponent, + EditProjectComponent, + DeleteProjectComponent, + TuiDataListModule, + AutoFocusDirective, + TuiSvgModule, + ], }) export class ProjectFeatureOverviewComponent implements AfterViewChecked, OnDestroy diff --git a/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.module.ts index 532d961ec..7c3ba1ef8 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-overview/project-feature-overview.module.ts @@ -7,11 +7,8 @@ */ import { NgModule } from '@angular/core'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiDataListModule, TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { ModalModule } from '@taiga/ui/modal'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; import { DropdownModule } from '~/app/shared/dropdown/dropdown.module'; import { TitleComponent } from '~/app/shared/title/title.component'; @@ -23,13 +20,10 @@ import { ProjectMembersComponent } from './components/project-members/project-me import { DataAccessProjectOverviewModule } from './data-access/project-overview-data-access.module'; import { ProjectOverviewRoutingModule } from './project-feature-overview-routing.module'; import { ProjectFeatureOverviewComponent } from './project-feature-overview.component'; -import { ToolTipModule } from '@taiga/ui/tooltip'; @NgModule({ imports: [ TuiSvgModule, - AvatarModule, - CommonTemplateModule, ProjectOverviewRoutingModule, TuiLinkModule, DataAccessProjectOverviewModule, @@ -38,22 +32,11 @@ import { ToolTipModule } from '@taiga/ui/tooltip'; ProjectMembersModalComponent, ProjectMembersComponent, EditProjectComponent, - ModalModule, DropdownModule, - ToolTipModule, TuiDataListModule, DeleteProjectComponent, AutoFocusDirective, - ], - declarations: [ProjectFeatureOverviewComponent], - providers: [ - { - provide: TRANSLOCO_SCOPE, - useValue: { - scope: 'project_overview', - alias: 'project_overview', - }, - }, + ProjectFeatureOverviewComponent, ], }) export class ProjectFeatureOverviewModule {} diff --git a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts index 22c62cc7a..adc4524b2 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts @@ -7,18 +7,18 @@ */ import { animate, style, transition, trigger } from '@angular/animations'; -import { Location } from '@angular/common'; +import { Location, CommonModule } from '@angular/common'; import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterOutlet } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; -import { TuiNotification } from '@taiga-ui/core'; +import { TuiNotification, TuiButtonModule } from '@taiga-ui/core'; import { Attachment, Membership, @@ -49,6 +49,10 @@ import { } from '../data-access/+state/actions/project.actions'; import { setNotificationClosed } from '../feature-overview/data-access/+state/actions/project-overview.actions'; +import { ProjectNavigationComponent } from '../feature-navigation/project-feature-navigation.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; + @UntilDestroy() @Component({ selector: 'tg-project-feature-shell', @@ -85,6 +89,15 @@ import { setNotificationClosed } from '../feature-overview/data-access/+state/ac ]), ]), ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ProjectNavigationComponent, + ContextNotificationComponent, + TuiButtonModule, + RouterOutlet, + ], }) export class ProjectFeatureShellComponent implements OnDestroy, AfterViewInit { public model$ = this.state.select(); diff --git a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.module.ts index 17cdf8c5c..c93caa3e2 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.module.ts @@ -8,23 +8,17 @@ import { NgModule } from '@angular/core'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; + import { ProjectDataAccessModule } from '~/app/modules/project/data-access/project.module'; -import { ProjectFeatureNavigationModule } from '~/app/modules/project/feature-navigation/project-feature-navigation.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { ProjectFeatureShellRoutingModule } from './project-feature-shell-routing.module'; import { ProjectFeatureShellComponent } from './project-feature-shell.component'; @NgModule({ - declarations: [ProjectFeatureShellComponent], imports: [ ProjectFeatureShellRoutingModule, - ProjectFeatureNavigationModule, ProjectDataAccessModule, - AvatarModule, - ContextNotificationModule, - CommonTemplateModule, + ProjectFeatureShellComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.component.ts index ff4d46075..eecc30cd2 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.component.ts @@ -10,6 +10,11 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { selectLoadingStory } from '../story-detail/data-access/+state/selectors/story-detail.selectors'; +import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; +import { StoryDetailComponent } from '../story-detail/story-detail.component'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; export interface StoryState { loadingStory: boolean; @@ -20,6 +25,14 @@ export interface StoryState { styleUrls: ['./project-feature-story-wrapper-full-view.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ResizedDirective, + StoryDetailComponent, + StoryDetailSkeletonComponent, + ], }) export class ProjectFeatureStoryWrapperFullViewComponent { public readonly model$ = this.state.select(); diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module.ts index abb4dace7..963905a5d 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module.ts @@ -8,7 +8,7 @@ import { NgModule } from '@angular/core'; import { TuiSvgModule } from '@taiga-ui/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; import { StoryDetailModule } from '../story-detail/story-detail.module'; import { ProjectFeatureStoryWrapperFullViewComponent } from './project-feature-story-wrapper-full-view.component'; @@ -16,11 +16,10 @@ import { ProjectFeatureStoryWrapperFullViewComponent } from './project-feature-s @NgModule({ imports: [ TuiSvgModule, - CommonTemplateModule, StoryDetailModule, StoryDetailSkeletonComponent, + ProjectFeatureStoryWrapperFullViewComponent, ], - declarations: [ProjectFeatureStoryWrapperFullViewComponent], providers: [], exports: [ProjectFeatureStoryWrapperFullViewComponent], }) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.component.ts index a541c6c2e..b884247bf 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.component.ts @@ -17,6 +17,11 @@ import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { selectLoadingStory } from '../story-detail/data-access/+state/selectors/story-detail.selectors'; import { StoryDetailComponent } from '../story-detail/story-detail.component'; +import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; +import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; export interface StoryState { loadingStory: boolean; @@ -27,6 +32,15 @@ export interface StoryState { styleUrls: ['./project-feature-story-wrapper-modal-view.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiScrollbarModule, + ResizedDirective, + StoryDetailComponent, + StoryDetailSkeletonComponent, + ], }) export class ProjectFeatureStoryWrapperModalViewComponent { @ViewChild(StoryDetailComponent) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.module.ts index 3e8763a75..72065a722 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-modal-view/project-feature-story-wrapper-modal-view.module.ts @@ -8,7 +8,7 @@ import { NgModule } from '@angular/core'; import { TuiScrollbarModule, TuiSvgModule } from '@taiga-ui/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; import { StoryDetailModule } from '../story-detail/story-detail.module'; import { ProjectFeatureStoryWrapperModalViewComponent } from './project-feature-story-wrapper-modal-view.component'; @@ -16,12 +16,11 @@ import { ProjectFeatureStoryWrapperModalViewComponent } from './project-feature- @NgModule({ imports: [ TuiSvgModule, - CommonTemplateModule, StoryDetailModule, TuiScrollbarModule, StoryDetailSkeletonComponent, + ProjectFeatureStoryWrapperModalViewComponent, ], - declarations: [ProjectFeatureStoryWrapperModalViewComponent], providers: [], exports: [ProjectFeatureStoryWrapperModalViewComponent], }) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.component.ts index 8f861bbc9..2f4e06cac 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.component.ts @@ -8,7 +8,6 @@ import { ChangeDetectionStrategy, - ChangeDetectorRef, Component, ElementRef, Input, @@ -25,6 +24,12 @@ import { selectStoryView, } from '../story-detail/data-access/+state/selectors/story-detail.selectors'; import { StoryDetailComponent } from '../story-detail/story-detail.component'; +import { StoryWrapperSideViewDirective } from './story-wrapper-side-view-resize.directive'; +import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; +import { A11yModule } from '@angular/cdk/a11y'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; interface WrapperSideViewState { selectedStoryView: StoryView; loadingStory: boolean; @@ -36,6 +41,16 @@ interface WrapperSideViewState { styleUrls: ['./project-feature-story-wrapper-side-view.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ResizedDirective, + StoryDetailComponent, + A11yModule, + StoryDetailSkeletonComponent, + StoryWrapperSideViewDirective, + ], }) export class ProjectFeatureStoryWrapperSideViewComponent implements OnChanges { @ViewChild(StoryDetailComponent) @@ -61,7 +76,6 @@ export class ProjectFeatureStoryWrapperSideViewComponent implements OnChanges { constructor( private store: Store, - private cd: ChangeDetectorRef, private state: RxState, private localStorage: LocalStorageService ) { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.module.ts index 3e1ad63e1..fc0dfcdea 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.module.ts @@ -9,7 +9,7 @@ import { A11yModule } from '@angular/cdk/a11y'; import { NgModule } from '@angular/core'; import { TuiSvgModule } from '@taiga-ui/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { StoryDetailSkeletonComponent } from '../story-detail-skeleton/story-detail-skeleton.component'; import { StoryDetailModule } from '../story-detail/story-detail.module'; import { ProjectFeatureStoryWrapperSideViewComponent } from './project-feature-story-wrapper-side-view.component'; @@ -18,13 +18,12 @@ import { StoryWrapperSideViewDirective } from './story-wrapper-side-view-resize. @NgModule({ imports: [ TuiSvgModule, - CommonTemplateModule, StoryDetailModule, StoryDetailSkeletonComponent, A11yModule, StoryWrapperSideViewDirective, + ProjectFeatureStoryWrapperSideViewComponent, ], - declarations: [ProjectFeatureStoryWrapperSideViewComponent], providers: [], exports: [ProjectFeatureStoryWrapperSideViewComponent], }) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.spec.ts b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.spec.ts index fe85c5e27..42965e0e6 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-story-wrapper-side-view/project-feature-story-wrapper-side-view.spec.ts @@ -11,6 +11,9 @@ import { MockStore, provideMockStore } from '@ngrx/store/testing'; import { LocalStorageService } from '~/app/shared/local-storage/local-storage.service'; import { selectStoryView } from '../story-detail/data-access/+state/selectors/story-detail.selectors'; import { ProjectFeatureStoryWrapperSideViewComponent } from './project-feature-story-wrapper-side-view.component'; +import { getTranslocoModule } from '~/app/transloco/transloco-testing.module'; +import { CommonModule } from '@angular/common'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; describe('ButtonComponent', () => { let spectator: Spectator; @@ -24,9 +27,21 @@ describe('ButtonComponent', () => { const createComponent = createComponentFactory({ component: ProjectFeatureStoryWrapperSideViewComponent, - imports: [], + imports: [getTranslocoModule()], providers: [provideMockStore({ initialState })], mocks: [LocalStorageService], + overrideComponents: [ + [ + ProjectFeatureStoryWrapperSideViewComponent, + { + set: { + imports: [CommonModule], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }, + }, + ], + ], + shallow: true, }); beforeEach(() => { diff --git a/javascript/apps/taiga/src/app/modules/project/feature-view-setter/project-feature-view-setter.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-view-setter/project-feature-view-setter.component.ts index fb52e290a..6d0dbdd00 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-view-setter/project-feature-view-setter.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-view-setter/project-feature-view-setter.component.ts @@ -24,12 +24,13 @@ import { selectStory, selectStoryView, } from '../story-detail/data-access/+state/selectors/story-detail.selectors'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { ProjectFeatureStoryWrapperFullViewModule } from '../feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module'; import { filterFalsy, filterNil } from '~/app/shared/utils/operators'; import { Router } from '@angular/router'; import { RxState } from '@rx-angular/state'; import { StoryDetail, StoryView } from '@taiga/data'; +import { CommonModule } from '@angular/common'; interface ProjectFeatureViewSetterComponentState { storyView: StoryView; @@ -46,7 +47,7 @@ interface ProjectFeatureViewSetterComponentState { styleUrls: ['./project-feature-view-setter.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [CommonTemplateModule, ProjectFeatureStoryWrapperFullViewModule], + imports: [CommonModule, ProjectFeatureStoryWrapperFullViewModule], providers: [RxState], }) export class ProjectFeatureViewSetterComponent implements OnDestroy { diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/members-list/members-list.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/members-list/members-list.component.ts index 76de9f763..bf588b378 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/members-list/members-list.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/members-list/members-list.component.ts @@ -40,6 +40,16 @@ import { conSlideInOut, } from '~/app/shared/utils/animations'; import { filterNil } from '~/app/shared/utils/operators'; +import { TuiLinkModule, TuiButtonModule } from '@taiga-ui/core'; +import { RemoveMemberComponent } from '../remove-member/remove-member.component'; +import { RoleSelectComponent } from '../role-select/role-select.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; +import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; interface MemberData { data: Membership; @@ -55,6 +65,20 @@ interface MemberData { changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], animations: [removeCell, showUndo, undoDone, conSlideInOut], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + DynamicTableModule, + UserCardComponent, + RoleSelectComponent, + RemoveMemberComponent, + ContextNotificationComponent, + TuiLinkModule, + TuiButtonModule, + UserSkeletonComponent, + PaginationComponent, + ], }) export class MembersListComponent { @ViewChild('undoButton', { read: ElementRef, static: false }) diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/pending-members-list/pending-members-list.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/pending-members-list/pending-members-list.component.ts index 498b4eb72..274f99c3d 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/pending-members-list/pending-members-list.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/pending-members-list/pending-members-list.component.ts @@ -43,6 +43,16 @@ import { MEMBERS_PAGE_SIZE } from '~/app/modules/project/settings/feature-member import { selectMemberRolesOrdered } from '~/app/shared/invite-user-modal/data-access/+state/selectors/invitation.selectors'; import { filterNil } from '~/app/shared/utils/operators'; import { removeCell, showUndo, undoDone } from '~/app/shared/utils/animations'; +import { RevokeInvitationComponent } from '../revoke-invitation/revoke-invitation.component'; +import { TuiLinkModule, TuiButtonModule } from '@taiga-ui/core'; +import { RoleSelectComponent } from '../role-select/role-select.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; +import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; const cssValue = getComputedStyle(document.documentElement); interface InvitationData { @@ -127,6 +137,20 @@ interface InvitationData { ), ]), ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + DynamicTableModule, + UserCardComponent, + RoleSelectComponent, + TuiLinkModule, + RevokeInvitationComponent, + ContextNotificationComponent, + TuiButtonModule, + UserSkeletonComponent, + PaginationComponent, + ], }) export class PendingMembersListComponent { @ViewChild('undoButton', { read: ElementRef, static: false }) diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/remove-member/remove-member.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/remove-member/remove-member.component.ts index 0ad59d86a..14572aa78 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/remove-member/remove-member.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/remove-member/remove-member.component.ts @@ -20,6 +20,18 @@ import { Store } from '@ngrx/store'; import { ShortcutsService } from '@taiga/core'; import { Membership, Project, Role, User } from '@taiga/data'; import { finalize } from 'rxjs'; +import { A11yModule } from '@angular/cdk/a11y'; +import { TuiActiveZoneModule } from '@taiga-ui/cdk'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { + TuiHostedDropdownModule, + TuiLinkModule, + TuiButtonModule, +} from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; +import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; @UntilDestroy() @Component({ @@ -27,6 +39,19 @@ import { finalize } from 'rxjs'; templateUrl: './remove-member.component.html', styleUrls: ['./remove-member.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiActiveZoneModule, + TuiLinkModule, + RestoreFocusTargetDirective, + A11yModule, + RestoreFocusDirective, + TuiButtonModule, + ], }) export class RemoveMemberComponent implements OnChanges { @Input() public project!: Project; diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/revoke-invitation/revoke-invitation.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/revoke-invitation/revoke-invitation.component.ts index 284639863..155f43f1b 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/revoke-invitation/revoke-invitation.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/revoke-invitation/revoke-invitation.component.ts @@ -14,14 +14,33 @@ import { Output, ViewChild, } from '@angular/core'; -import { TuiLinkComponent } from '@taiga-ui/core'; +import { + TuiLinkComponent, + TuiHostedDropdownModule, + TuiLinkModule, + TuiButtonModule, +} from '@taiga-ui/core'; import { Invitation } from '@taiga/data'; +import { A11yModule } from '@angular/cdk/a11y'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-revoke-invitation', templateUrl: './revoke-invitation.component.html', styleUrls: ['./revoke-invitation.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiLinkModule, + A11yModule, + TuiButtonModule, + ], }) export class RevokeInvitationComponent { @ViewChild('cancel') diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/role-select/role-select.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/role-select/role-select.component.ts index 35f878655..fb107330b 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/role-select/role-select.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/components/role-select/role-select.component.ts @@ -7,18 +7,47 @@ */ import { Component, Input, OnChanges } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; +import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; import { Invitation, Membership, Role } from '@taiga/data'; import { membersActions } from '~/app/modules/project/settings/feature-members/+state/actions/members.actions'; +import { TuiAutoFocusModule } from '@taiga-ui/cdk'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { + TuiTextfieldControllerModule, + TuiDataListModule, + TuiHostedDropdownModule, + TuiButtonModule, +} from '@taiga-ui/core'; +import { TuiSelectModule } from '@taiga-ui/kit'; + +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; @UntilDestroy() @Component({ selector: 'tg-members-role-select', templateUrl: './role-select.component.html', styleUrls: ['./role-select.component.css'], + standalone: true, + imports: [ + CommonModule, + InputsModule, + TranslocoDirective, + ReactiveFormsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + TuiDropdownModule, + TuiDataListModule, + ContextNotificationComponent, + TuiHostedDropdownModule, + TuiButtonModule, + TuiAutoFocusModule, + ], }) export class RoleSelectComponent implements OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.component.ts index 1765eb5f3..86fee6335 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.component.ts @@ -19,6 +19,15 @@ import { selectTotalInvitations, selectTotalMemberships, } from './+state/selectors/members.selectors'; +import { RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; +import { TuiTabsModule } from '@taiga-ui/kit'; +import { TuiButtonModule, TuiSvgModule } from '@taiga-ui/core'; + +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { InviteUserModalComponent } from '~/app/shared/invite-user-modal/invite-user-modal.component'; +import { TitleComponent } from '~/app/shared/title/title.component'; interface ComponentState { project: Project; @@ -36,6 +45,20 @@ interface ComponentState { ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + TuiButtonModule, + TuiTabsModule, + RouterLinkActive, + RouterLink, + TuiSvgModule, + RouterOutlet, + ModalComponent, + InviteUserModalComponent, + ], }) export class ProjectsSettingsFeatureMembersComponent { public model$ = this.state.select(); diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.module.ts index 03eb20fc4..19ef10e75 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-members/feature-members.module.ts @@ -22,12 +22,7 @@ import { TuiSelectModule, TuiTabsModule, } from '@taiga-ui/kit'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; -import { SkeletonsModule } from '@taiga/ui/skeletons/skeletons.module'; -import { InputsModule } from 'libs/ui/src/lib/inputs/inputs.module'; -import { ModalModule } from 'libs/ui/src/lib/modal/modal.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { DropdownModule } from '~/app/shared/dropdown/dropdown.module'; import { InviteUserModalModule } from '~/app/shared/invite-user-modal/invite-user-modal.module'; import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; @@ -43,14 +38,6 @@ import { RoleSelectComponent } from './components/role-select/role-select.compon import { ProjectsSettingsFeatureMembersComponent } from './feature-members.component'; @NgModule({ - declarations: [ - ProjectsSettingsFeatureMembersComponent, - MembersListComponent, - PendingMembersListComponent, - RevokeInvitationComponent, - RoleSelectComponent, - RemoveMemberComponent, - ], providers: [ { provide: TRANSLOCO_SCOPE, @@ -64,22 +51,16 @@ import { ProjectsSettingsFeatureMembersComponent } from './feature-members.compo DropdownModule, FormsModule, ReactiveFormsModule, - SkeletonsModule, TuiTabsModule, TuiSelectModule, TuiDataListWrapperModule, - InputsModule, TuiLinkModule, UserCardComponent, TuiSvgModule, TuiAutoFocusModule, A11yModule, TuiActiveZoneModule, - ContextNotificationModule, TuiDataListModule, - CommonTemplateModule, - DynamicTableModule, - ModalModule, InviteUserModalModule, RestoreFocusTargetDirective, RestoreFocusDirective, @@ -103,6 +84,12 @@ import { ProjectsSettingsFeatureMembersComponent } from './feature-members.compo }, ]), TitleComponent, + ProjectsSettingsFeatureMembersComponent, + MembersListComponent, + PendingMembersListComponent, + RevokeInvitationComponent, + RoleSelectComponent, + RemoveMemberComponent, ], }) export class ProjectsSettingsFeatureMembersModule {} diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/components/modal-permission-entity-row/modal-permission-entity-row.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/components/modal-permission-entity-row/modal-permission-entity-row.component.ts index 763f44d7b..59b633fc8 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/components/modal-permission-entity-row/modal-permission-entity-row.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/components/modal-permission-entity-row/modal-permission-entity-row.component.ts @@ -9,6 +9,9 @@ import { Component, Input } from '@angular/core'; import { Conflict } from '~/app/modules/project/settings/feature-roles-permissions/models/modal-permission.model'; import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; +import { TuiSvgModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; let nextId = 0; @@ -20,6 +23,8 @@ let nextId = 0; './modal-permission-entity-row.component.css', '../../modal-permission-comparison-common.css', ], + standalone: true, + imports: [CommonModule, TranslocoDirective, TuiSvgModule], }) export class ModalPermissionEntityRowComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.component.ts index 4590ef766..ce720e4a4 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.component.ts @@ -9,6 +9,10 @@ import { Component, Input, EventEmitter, Output } from '@angular/core'; import { EntityConflictPermission } from '~/app/modules/project/settings/feature-roles-permissions/models/modal-permission.model'; import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { ModalPermissionEntityRowComponent } from './components/modal-permission-entity-row/modal-permission-entity-row.component'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; @Component({ selector: 'tg-modal-permission-comparison', @@ -17,6 +21,13 @@ import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/pr './modal-permission-comparison.component.css', './modal-permission-comparison-common.css', ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ModalPermissionEntityRowComponent, + TuiButtonModule, + ], }) export class ModalPermissionComparisonComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.module.ts index 051f9ab62..93d762bfe 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/modal-permission-comparison/modal-permission-comparison.module.ts @@ -9,12 +9,16 @@ import { NgModule } from '@angular/core'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiSvgModule } from '@taiga-ui/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { ModalPermissionEntityRowComponent } from './components/modal-permission-entity-row/modal-permission-entity-row.component'; import { ModalPermissionComparisonComponent } from './modal-permission-comparison.component'; @NgModule({ - imports: [CommonTemplateModule, TuiSvgModule], + imports: [ + TuiSvgModule, + ModalPermissionComparisonComponent, + ModalPermissionEntityRowComponent, + ], providers: [ { provide: TRANSLOCO_SCOPE, @@ -24,10 +28,6 @@ import { ModalPermissionComparisonComponent } from './modal-permission-compariso }, }, ], - declarations: [ - ModalPermissionComparisonComponent, - ModalPermissionEntityRowComponent, - ], exports: [ModalPermissionComparisonComponent], }) export class ModalPermissionComparisonModule {} diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.spec.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.spec.ts index 24d3825a2..7a82a1081 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.spec.ts @@ -18,6 +18,7 @@ import { SettingsPermission } from '~/app/modules/project/settings/feature-roles import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; import { RoleAdvanceRowComponent } from './role-advance-row.component'; +import { getTranslocoModule } from '~/app/transloco/transloco-testing.module'; describe('RoleAdvanceRowComponent', () => { let spectator: Spectator; @@ -25,7 +26,7 @@ describe('RoleAdvanceRowComponent', () => { const createComponent = createComponentFactory({ component: RoleAdvanceRowComponent, - imports: [], + imports: [getTranslocoModule()], schemas: [NO_ERRORS_SCHEMA], providers: [], mocks: [ProjectsSettingsFeatureRolesPermissionsService], diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.ts index 5f6585c30..5199e2e34 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.component.ts @@ -6,7 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { KeyValue } from '@angular/common'; +import { KeyValue, KeyValuePipe, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -16,11 +16,23 @@ import { OnInit, SimpleChanges, } from '@angular/core'; -import { FormGroup } from '@angular/forms'; +import { FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Entity } from '@taiga/data'; import { SettingsPermission } from '~/app/modules/project/settings/feature-roles-permissions/models/settings-permission.model'; import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; +import { RoleCustomizeComponent } from '../role-customize/role-customize.component'; + +import { + TuiTextfieldControllerModule, + TuiDataListModule, + TuiButtonModule, +} from '@taiga-ui/core'; +import { TuiSelectModule, TuiToggleModule } from '@taiga-ui/kit'; + +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { TooltipDirective } from '@taiga/ui/tooltip'; let nextId = 0; @UntilDestroy() @@ -29,6 +41,22 @@ let nextId = 0; templateUrl: './role-advance-row.component.html', styleUrls: ['./role-advance-row.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + InputsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + FormsModule, + TuiDataListModule, + TuiButtonModule, + TooltipDirective, + RoleCustomizeComponent, + TuiToggleModule, + KeyValuePipe, + ], }) export class RoleAdvanceRowComponent implements OnInit, OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.module.ts index ccd08cccb..323cccfba 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-advance-row/role-advance-row.module.ts @@ -11,24 +11,19 @@ import { FormsModule } from '@angular/forms'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { TuiToggleModule } from '@taiga-ui/kit'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { RoleCustomizeModule } from '../role-customize/role-customize.module'; import { RoleAdvanceRowComponent } from './role-advance-row.component'; -import { ToolTipModule } from '@taiga/ui/tooltip'; @NgModule({ imports: [ TuiLinkModule, TuiSvgModule, - CommonTemplateModule, TuiToggleModule, RoleCustomizeModule, - InputsModule, - ToolTipModule, FormsModule, + RoleAdvanceRowComponent, ], - declarations: [RoleAdvanceRowComponent], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.component.ts index 088949ff8..670298f0e 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.component.ts @@ -6,16 +6,26 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { KeyValue } from '@angular/common'; +import { KeyValue, KeyValuePipe, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { FormGroup } from '@angular/forms'; +import { FormGroup, ReactiveFormsModule } from '@angular/forms'; import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; +import { TuiToggleModule } from '@taiga-ui/kit'; +import { TranslocoDirective } from '@ngneat/transloco'; @Component({ selector: 'tg-role-customize', templateUrl: './role-customize.component.html', styleUrls: ['./role-customize.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + TuiToggleModule, + KeyValuePipe, + ], }) export class RoleCustomizeComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.module.ts index f6a9683f9..f2cb13959 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-customize/role-customize.module.ts @@ -10,19 +10,16 @@ import { NgModule } from '@angular/core'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { TuiToggleModule } from '@taiga-ui/kit'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { RoleCustomizeComponent } from './role-customize.component'; @NgModule({ imports: [ TuiLinkModule, TuiSvgModule, - CommonTemplateModule, TuiToggleModule, - InputsModule, + RoleCustomizeComponent, ], - declarations: [RoleCustomizeComponent], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.component.ts index 150a0a3c9..b35fb4582 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.component.ts @@ -6,7 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ -import { KeyValue } from '@angular/common'; +import { KeyValue, KeyValuePipe, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -15,11 +15,22 @@ import { OnChanges, SimpleChanges, } from '@angular/core'; -import { FormGroup } from '@angular/forms'; +import { FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Entity } from '@taiga/data'; import { SettingsPermission } from '~/app/modules/project/settings/feature-roles-permissions/models/settings-permission.model'; import { ProjectsSettingsFeatureRolesPermissionsService } from '~/app/modules/project/settings/feature-roles-permissions/services/feature-roles-permissions.service'; +import { RoleAdvanceRowComponent } from '../role-advance-row/role-advance-row.component'; +import { TuiSelectModule } from '@taiga-ui/kit'; + +import { + TuiLinkModule, + TuiTextfieldControllerModule, + TuiDataListModule, + TuiButtonModule, +} from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; let nextId = 0; @UntilDestroy() @@ -28,6 +39,21 @@ let nextId = 0; templateUrl: './role-permission-row.component.html', styleUrls: ['./role-permission-row.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + TuiLinkModule, + InputsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + FormsModule, + TuiDataListModule, + TuiButtonModule, + RoleAdvanceRowComponent, + KeyValuePipe, + ], }) export class RolePermissionRowComponent implements OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.module.ts index ad509402c..c880a0abc 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/components/role-permission-row/role-permission-row.module.ts @@ -11,8 +11,7 @@ import { FormsModule } from '@angular/forms'; import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { TuiDataListModule, TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { TuiToggleModule } from '@taiga-ui/kit'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { RoleAdvanceRowModule } from '../role-advance-row/role-advance-row.module'; import { RoleCustomizeModule } from '../role-customize/role-customize.module'; import { RolePermissionRowComponent } from './role-permission-row.component'; @@ -20,16 +19,14 @@ import { RolePermissionRowComponent } from './role-permission-row.component'; @NgModule({ imports: [ FormsModule, - CommonTemplateModule, TuiLinkModule, TuiSvgModule, TuiToggleModule, RoleCustomizeModule, RoleAdvanceRowModule, - InputsModule, TuiDataListModule, + RolePermissionRowComponent, ], - declarations: [RolePermissionRowComponent], providers: [ { provide: TRANSLOCO_SCOPE, diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.component.ts index 15ffd5816..e32956eba 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.component.ts @@ -18,7 +18,7 @@ import { QueryList, ViewChildren, } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; +import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; @@ -54,6 +54,15 @@ import { } from './+state/selectors/roles-permissions.selectors'; import { EntityConflictPermission } from './models/modal-permission.model'; import { ProjectsSettingsFeatureRolesPermissionsService } from './services/feature-roles-permissions.service'; +import { ModalPermissionComparisonComponent } from './components/modal-permission-comparison/modal-permission-comparison.component'; +import { RolePermissionRowComponent } from './components/role-permission-row/role-permission-row.component'; +import { TuiLinkModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { TitleComponent } from '~/app/shared/title/title.component'; @UntilDestroy() @Component({ @@ -65,6 +74,19 @@ import { ProjectsSettingsFeatureRolesPermissionsService } from './services/featu ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + TuiLinkModule, + InputsModule, + ReactiveFormsModule, + RolePermissionRowComponent, + ContextNotificationComponent, + ModalComponent, + ModalPermissionComparisonComponent, + ], }) export class ProjectSettingsFeatureRolesPermissionsComponent implements AfterViewInit, OnInit, OnDestroy diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.module.ts index f4e6cfc69..c93c6e332 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-roles-permissions/feature-roles-permissions.module.ts @@ -13,10 +13,7 @@ import { EffectsModule } from '@ngrx/effects'; import { StoreModule } from '@ngrx/store'; import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { TuiToggleModule } from '@taiga-ui/kit'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { ModalModule } from 'libs/ui/src/lib/modal/modal.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { TitleComponent } from '~/app/shared/title/title.component'; import { RolesPermissionsEffects } from './+state/effects/roles-permissions.effects'; import { rolesPermissionsFeature } from './+state/reducers/roles-permissions.reducer'; @@ -27,14 +24,10 @@ import { RolePermissionRowModule } from './components/role-permission-row/role-p import { ProjectSettingsFeatureRolesPermissionsComponent } from './feature-roles-permissions.component'; @NgModule({ - declarations: [ProjectSettingsFeatureRolesPermissionsComponent], imports: [ TuiLinkModule, TuiSvgModule, - CommonTemplateModule, TuiToggleModule, - ContextNotificationModule, - ModalModule, RolePermissionRowModule, RoleCustomizeModule, RoleAdvanceRowModule, @@ -45,10 +38,10 @@ import { ProjectSettingsFeatureRolesPermissionsComponent } from './feature-roles component: ProjectSettingsFeatureRolesPermissionsComponent, }, ]), - InputsModule, StoreModule.forFeature(rolesPermissionsFeature), EffectsModule.forFeature([RolesPermissionsEffects]), TitleComponent, + ProjectSettingsFeatureRolesPermissionsComponent, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.component.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.component.ts index 841a82e73..fb5c16eb5 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.component.ts @@ -6,8 +6,9 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterOutlet } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; @@ -29,6 +30,8 @@ import { filterNil } from '~/app/shared/utils/operators'; templateUrl: './feature-settings.component.html', styleUrls: ['./feature-settings.component.css'], providers: [RxState], + standalone: true, + imports: [CommonModule, RouterOutlet], }) export class ProjectsSettingsFeatureSettingsComponent { public user$ = this.store.select(selectUser); diff --git a/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.module.ts b/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.module.ts index c3f1480bb..c902688b0 100644 --- a/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/settings/feature-settings/feature-settings.module.ts @@ -12,7 +12,10 @@ import { ProjectSettingsFeatureSettingsRoutingModule } from './feature-settings- import { ProjectsSettingsFeatureSettingsComponent } from './feature-settings.component'; @NgModule({ - declarations: [ProjectsSettingsFeatureSettingsComponent], - imports: [CommonModule, ProjectSettingsFeatureSettingsRoutingModule], + imports: [ + CommonModule, + ProjectSettingsFeatureSettingsRoutingModule, + ProjectsSettingsFeatureSettingsComponent, + ], }) export class ProjectSettingsFeatureSettingsModule {} diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-assign/story-detail-assign.component.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-assign/story-detail-assign.component.ts index 8afde8d2e..7c4aaf5f0 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-assign/story-detail-assign.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-assign/story-detail-assign.component.ts @@ -20,7 +20,7 @@ import { ViewContainerRef, } from '@angular/core'; import { FormGroup } from '@angular/forms'; -import { TranslocoService } from '@ngneat/transloco'; +import { TranslocoService, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; @@ -44,6 +44,17 @@ import { PermissionsService } from '~/app/services/permissions.service'; import { WsService } from '~/app/services/ws'; import { ResizedEvent } from '~/app/shared/resize/resize.model'; import { filterNil } from '~/app/shared/utils/operators'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar'; +import { TuiActiveZoneModule } from '@taiga-ui/cdk'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; + +import { CommonModule } from '@angular/common'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; +import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; +import { AssignUserComponent } from '~/app/modules/project/components/assign-user/assign-user.component'; export interface StoryState { isA11yDragInProgress: boolean; @@ -60,6 +71,20 @@ export interface StoryState { templateUrl: './story-detail-assign.component.html', styleUrls: ['./story-detail-assign.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + HasPermissionDirective, + ResizedDirective, + TuiDropdownModule, + TuiActiveZoneModule, + TuiScrollbarModule, + UserAvatarComponent, + TooltipDirective, + TuiButtonModule, + AssignUserComponent, + ], }) export class StoryDetailAssignComponent implements OnChanges { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-description/story-detail-description.component.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-description/story-detail-description.component.ts index a271f0bd6..e9a38a004 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-description/story-detail-description.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-description/story-detail-description.component.ts @@ -19,7 +19,7 @@ import { SimpleChanges, ViewChild, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { Project, StoryDetail } from '@taiga/data'; @@ -31,6 +31,20 @@ import { PermissionsService } from '~/app/services/permissions.service'; import { LocalStorageService } from '~/app/shared/local-storage/local-storage.service'; import { filterNil } from '~/app/shared/utils/operators'; import { ProjectApiService } from '@taiga/api'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { StoryDetailDescriptionStickyDirective } from './story-detail-description-sticky.directive'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { ClickActionAreaDirective } from '~/app/shared/directives/click-action-area/click-action-area.directive'; +import { CodeHightlightDirective } from '~/app/shared/directives/code-highlight/code-highlight.directive'; +import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; +import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; +import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; +import { SafeHtmlPipe } from '~/app/shared/pipes/safe-html/safe-html.pipe'; +import { FieldConflictComponent } from '~/app/modules/project/components/field-conflict/field-conflict.component'; +import { EditorComponent } from '~/app/shared/editor/editor.component'; export interface StoryDetailDescriptionState { projectId: Project['id']; @@ -52,6 +66,24 @@ export interface StoryDetailDescriptionState { styleUrls: ['./story-detail-description.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + RestoreFocusDirective, + InputsModule, + ReactiveFormsModule, + EditorComponent, + StoryDetailDescriptionStickyDirective, + TuiButtonModule, + FieldConflictComponent, + CodeHightlightDirective, + ClickActionAreaDirective, + RestoreFocusTargetDirective, + TooltipDirective, + DiscardChangesModalComponent, + SafeHtmlPipe, + ], }) export class StoryDetailDescriptionComponent implements OnChanges, OnDestroy { @ViewChild('descriptionContent') diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-status/story-detail-status.component.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-status/story-detail-status.component.ts index c86c37f3e..b39347f15 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-status/story-detail-status.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-status/story-detail-status.component.ts @@ -7,19 +7,40 @@ */ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { FormGroup } from '@angular/forms'; +import { FormGroup, ReactiveFormsModule } from '@angular/forms'; import { RxState } from '@rx-angular/state'; import { Status } from '@taiga/data'; import { StoryDetailForm, StoryDetailState, } from '~/app/modules/project/story-detail/story-detail.component'; +import { + TuiTextfieldControllerModule, + TuiDataListModule, +} from '@taiga-ui/core'; +import { TuiSelectModule } from '@taiga-ui/kit'; + +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { InputsModule } from '@taiga/ui/inputs'; +import { StatusColorPipe } from '~/app/shared/pipes/status-color/status-color.pipe'; @Component({ selector: 'tg-story-detail-status', templateUrl: './story-detail-status.component.html', styleUrls: ['./story-detail-status.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + ReactiveFormsModule, + InputsModule, + TuiSelectModule, + TuiTextfieldControllerModule, + TuiDataListModule, + StatusColorPipe, + ], }) export class StoryDetailStatusComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-title/story-detail-title.component.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-title/story-detail-title.component.ts index 58227a668..ad9852c37 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-title/story-detail-title.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/components/story-detail-title/story-detail-title.component.ts @@ -18,7 +18,12 @@ import { Output, SimpleChanges, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { RxState } from '@rx-angular/state'; import { ShortcutsService } from '@taiga/core'; @@ -34,6 +39,18 @@ import { LocalStorageService } from '~/app/shared/local-storage/local-storage.se import { selectCurrentProject } from '~/app/modules/project/data-access/+state/selectors/project.selectors'; import { Store } from '@ngrx/store'; import { filterNil } from '~/app/shared/utils/operators'; +import { TuiTextAreaModule } from '@taiga-ui/kit'; + +import { TuiButtonModule, TuiTextfieldControllerModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { FieldConflictComponent } from '~/app/modules/project/components/field-conflict/field-conflict.component'; +import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; +import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; +import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; +import { InputsModule } from '@taiga/ui/inputs'; export interface StoryDetailTitleState { projectId: Project['id']; @@ -51,6 +68,23 @@ export interface StoryDetailTitleState { styleUrls: ['./story-detail-title.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + FormsModule, + InputsModule, + TranslocoDirective, + TuiButtonModule, + RestoreFocusTargetDirective, + TooltipDirective, + RestoreFocusDirective, + FieldConflictComponent, + ReactiveFormsModule, + TuiTextAreaModule, + AutoFocusDirective, + TuiTextfieldControllerModule, + DiscardChangesModalComponent, + ], }) export class StoryDetailTitleComponent implements OnChanges, OnDestroy { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.ts index a5305b776..21a5c0fab 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.ts @@ -7,7 +7,7 @@ */ import { Clipboard } from '@angular/cdk/clipboard'; -import { Location } from '@angular/common'; +import { Location, DatePipe, CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -19,9 +19,9 @@ import { Output, ViewChild, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; @@ -29,6 +29,10 @@ import { TuiButtonComponent, TuiNotification, TuiScrollbarComponent, + TuiSvgModule, + TuiButtonModule, + TuiHostedDropdownModule, + TuiDataListModule, } from '@taiga-ui/core'; import { Attachment, @@ -53,7 +57,10 @@ import { selectCurrentProject } from '~/app/modules/project/data-access/+state/s import { AppService } from '~/app/services/app.service'; import { PermissionsService } from '~/app/services/permissions.service'; import { WsService } from '~/app/services/ws'; -import { OrderComments } from '~/app/shared/comments/comments.component'; +import { + CommentsComponent, + OrderComments, +} from '~/app/shared/comments/comments.component'; import { EditorImageUploadService } from '~/app/shared/editor/editor-image-upload.service'; import { PermissionUpdateNotificationService } from '~/app/shared/permission-update-notification/permission-update-notification.service'; import { ResizedDirective } from '~/app/shared/resize/resize.directive'; @@ -70,6 +77,23 @@ import { selectWorkflow, } from './data-access/+state/selectors/story-detail.selectors'; import { StoryDetaiImageUploadService } from './story-detail-image-upload.service'; +import { StoryDetailDescriptionComponent } from './components/story-detail-description/story-detail-description.component'; +import { StoryDetailAssignComponent } from './components/story-detail-assign/story-detail-assign.component'; +import { StoryDetailStatusComponent } from './components/story-detail-status/story-detail-status.component'; +import { StoryDetailTitleComponent } from './components/story-detail-title/story-detail-title.component'; +import { StoryCommentsPaginationDirective } from './directives/story-comments-pagination.directive'; +import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { InputsModule } from '@taiga/ui/inputs'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { AttachmentsComponent } from '~/app/shared/attachments/attachments.component'; +import { CommentsAutoScrollDirective } from '~/app/shared/comments/directives/comments-auto-scroll.directive'; +import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; +import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; +import { NouserAvatarComponent } from '~/app/shared/nouser-avatar/nouser-avatar.component'; +import { DateDistancePipe } from '~/app/shared/pipes/date-distance/date-distance.pipe'; +import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; export interface StoryDetailState { project: Project; @@ -122,6 +146,35 @@ export interface StoryDetailForm { directive: ResizedDirective, }, ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + InputsModule, + ReactiveFormsModule, + TuiSvgModule, + TuiButtonModule, + TooltipDirective, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiDataListModule, + HasPermissionDirective, + TuiScrollbarModule, + CommentsAutoScrollDirective, + StoryCommentsPaginationDirective, + StoryDetailTitleComponent, + UserAvatarComponent, + NouserAvatarComponent, + StoryDetailStatusComponent, + StoryDetailAssignComponent, + StoryDetailDescriptionComponent, + AttachmentsComponent, + CommentsComponent, + ModalComponent, + DiscardChangesModalComponent, + DatePipe, + DateDistancePipe, + ], }) export class StoryDetailComponent { @Input() diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.module.ts b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.module.ts index 105323ad2..7df9127a8 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.module.ts @@ -17,10 +17,9 @@ import { TuiScrollbarModule, TuiSvgModule, } from '@taiga-ui/core'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { ModalModule } from '@taiga/ui/modal'; + import { EditorModule, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; import { ClickActionAreaDirective } from '~/app/shared/directives/click-action-area/click-action-area.directive'; import { CodeHightlightDirective } from '~/app/shared/directives/code-highlight/code-highlight.directive'; @@ -47,15 +46,13 @@ import { StoryDetailDescriptionStickyDirective } from './components/story-detail import { CommentsComponent } from '~/app/shared/comments/comments.component'; import { StoryCommentsPaginationDirective } from './directives/story-comments-pagination.directive'; import { CommentsAutoScrollDirective } from '~/app/shared/comments/directives/comments-auto-scroll.directive'; -import { ToolTipModule } from '@taiga/ui/tooltip'; + import { NouserAvatarComponent } from '~/app/shared/nouser-avatar/nouser-avatar.component'; import { AttachmentsComponent } from '~/app/shared/attachments/attachments.component'; @NgModule({ imports: [ RouterModule, - CommonTemplateModule, - ToolTipModule, TuiLinkModule, TuiScrollbarModule, DropdownModule, @@ -64,7 +61,6 @@ import { AttachmentsComponent } from '~/app/shared/attachments/attachments.compo UserAvatarComponent, A11yModule, DateDistancePipe, - InputsModule, FormsModule, ReactiveFormsModule, DataAccessStoryDetailModule, @@ -73,7 +69,6 @@ import { AttachmentsComponent } from '~/app/shared/attachments/attachments.compo TuiActiveZoneModule, ResizedDirective, HasPermissionDirective, - ModalModule, AutoFocusDirective, RestoreFocusDirective, RestoreFocusTargetDirective, @@ -90,8 +85,6 @@ import { AttachmentsComponent } from '~/app/shared/attachments/attachments.compo CommentsAutoScrollDirective, NouserAvatarComponent, AttachmentsComponent, - ], - declarations: [ StoryDetailComponent, StoryDetailStatusComponent, StoryDetailAssignComponent, diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-delete-modal/workspace-delete-modal.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-delete-modal/workspace-delete-modal.component.ts index 97812a581..fdc7c042c 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-delete-modal/workspace-delete-modal.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-delete-modal/workspace-delete-modal.component.ts @@ -6,11 +6,12 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { Component, EventEmitter, Input, Output } from '@angular/core'; import { TranslocoModule } from '@ngneat/transloco'; import { TuiButtonModule } from '@taiga-ui/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { ModalModule } from '@taiga/ui/modal'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { ModalComponent } from '@taiga/ui/modal/components'; @Component({ selector: 'tg-delete-workspace', @@ -18,10 +19,11 @@ import { ModalModule } from '@taiga/ui/modal'; styleUrls: ['./workspace-delete-modal.component.css'], standalone: true, imports: [ + CommonModule, TranslocoModule, TuiButtonModule, - ModalModule, - ContextNotificationModule, + ModalComponent, + ContextNotificationComponent, ], }) export class DeleteWorkspaceComponent { diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-edit-modal/workspace-detail-edit-modal.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-edit-modal/workspace-detail-edit-modal.component.ts index b7e34e511..809641bd2 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-edit-modal/workspace-detail-edit-modal.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-edit-modal/workspace-detail-edit-modal.component.ts @@ -15,7 +15,12 @@ import { OnInit, Output, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Workspace } from '@taiga/data'; import { @@ -23,12 +28,31 @@ import { WorkspaceNameValidation, } from '~/app/shared/workspace/workspace-name-validation'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; + +import { TranslocoDirective } from '@ngneat/transloco'; +import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { InputsModule } from '@taiga/ui/inputs'; + @UntilDestroy() @Component({ selector: 'tg-workspace-detail-edit-modal', templateUrl: './workspace-detail-edit-modal.component.html', styleUrls: ['./workspace-detail-edit-modal.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + FormsModule, + InputsModule, + TranslocoDirective, + ModalComponent, + ReactiveFormsModule, + TuiButtonModule, + DiscardChangesModalComponent, + ], }) export class WorkspaceDetailEditModalComponent implements OnInit { @Input() diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/components/workspace-detail-people-members-remove/workspace-detail-people-members-remove.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/components/workspace-detail-people-members-remove/workspace-detail-people-members-remove.component.ts index ccbc6749e..77492fc50 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/components/workspace-detail-people-members-remove/workspace-detail-people-members-remove.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/components/workspace-detail-people-members-remove/workspace-detail-people-members-remove.component.ts @@ -15,6 +15,14 @@ import { } from '@angular/core'; import { RxState } from '@rx-angular/state'; import { WorkspaceMembership } from '@taiga/data'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { + TuiHostedDropdownModule, + TuiLinkModule, + TuiButtonModule, +} from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-workspace-detail-people-members-remove', @@ -22,6 +30,15 @@ import { WorkspaceMembership } from '@taiga/data'; styleUrls: ['./workspace-detail-people-members-remove.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiLinkModule, + TuiButtonModule, + ], }) export class WorkspaceDetailPeopleMembersRemoveComponent { @Input() public member!: WorkspaceMembership; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/workspace-detail-people-members.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/workspace-detail-people-members.component.ts index 7f5667a09..9dfa956ee 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/workspace-detail-people-members.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-members/workspace-detail-people-members.component.ts @@ -38,6 +38,18 @@ import { undoDone, conSlideInOut, } from '~/app/shared/utils/animations'; +import { TuiLinkModule } from '@taiga-ui/core'; + +import { LeaveWorkspaceDropdownComponent } from '../leave-workspace-dropdown/leave-workspace-dropdown.component'; +import { WorkspaceDetailPeopleMembersRemoveComponent } from './components/workspace-detail-people-members-remove/workspace-detail-people-members-remove.component'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; +import { ProjectsDropdownComponent } from '~/app/shared/projects-dropdown/projects-dropdown.component'; +import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; @Component({ selector: 'tg-workspace-detail-people-members', @@ -46,6 +58,20 @@ import { changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], animations: [removeCell, showUndo, undoDone, conSlideInOut], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + DynamicTableModule, + UserCardComponent, + ProjectsDropdownComponent, + WorkspaceDetailPeopleMembersRemoveComponent, + LeaveWorkspaceDropdownComponent, + ContextNotificationComponent, + TuiLinkModule, + UserSkeletonComponent, + PaginationComponent, + ], }) export class WorkspaceDetailPeopleMembersComponent implements OnInit { @HostListener('window:beforeunload') diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-non-members/workspace-detail-people-non-members.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-non-members/workspace-detail-people-non-members.component.ts index 03b6d91a3..5f4715950 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-non-members/workspace-detail-people-non-members.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-non-members/workspace-detail-people-non-members.component.ts @@ -29,6 +29,14 @@ import { map } from 'rxjs/operators'; import { workspaceDetailApiActions } from '~/app/modules/workspace/feature-detail/+state/actions/workspace-detail.actions'; import { invitationWorkspaceActions } from '~/app/shared/invite-user-modal/data-access/+state/actions/invitation.action'; import { conSlideInOut } from '~/app/shared/utils/animations'; +import { TuiLinkModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; +import { ProjectsDropdownComponent } from '~/app/shared/projects-dropdown/projects-dropdown.component'; +import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; @Component({ selector: 'tg-workspace-detail-people-non-members', @@ -37,6 +45,17 @@ import { conSlideInOut } from '~/app/shared/utils/animations'; changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], animations: [conSlideInOut], + standalone: true, + imports: [ + CommonModule, + DynamicTableModule, + TranslocoDirective, + UserCardComponent, + ProjectsDropdownComponent, + TuiLinkModule, + UserSkeletonComponent, + PaginationComponent, + ], }) export class WorkspaceDetailPeopleNonMembersComponent implements OnInit { public cd = inject(ChangeDetectorRef); diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-pending/workspace-detail-people-pending.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-pending/workspace-detail-people-pending.component.ts index 45d877a06..465a0a982 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-pending/workspace-detail-people-pending.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people-pending/workspace-detail-people-pending.component.ts @@ -28,6 +28,12 @@ import { } from '~/app/modules/workspace/feature-detail/+state/selectors/workspace-detail.selectors'; import { workspaceDetailApiActions } from '~/app/modules/workspace/feature-detail/+state/actions/workspace-detail.actions'; import { conSlideInOut } from '~/app/shared/utils/animations'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { UserSkeletonComponent } from '@taiga/ui/skeletons/user-skeleton/user-skeleton.component'; +import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; +import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; @Component({ selector: 'tg-workspace-detail-people-pending', @@ -36,6 +42,15 @@ import { conSlideInOut } from '~/app/shared/utils/animations'; changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], animations: [conSlideInOut], + standalone: true, + imports: [ + CommonModule, + DynamicTableModule, + TranslocoDirective, + UserCardComponent, + UserSkeletonComponent, + PaginationComponent, + ], }) export class WorkspaceDetailPeoplePendingComponent implements OnInit { public cd = inject(ChangeDetectorRef); diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people/workspace-detail-people.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people/workspace-detail-people.component.ts index 92593fda6..1976eaa1d 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people/workspace-detail-people.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-people/workspace-detail-people.component.ts @@ -34,6 +34,14 @@ import { WsService } from '~/app/services/ws'; import { filterNil } from '~/app/shared/utils/operators'; import { invitationWorkspaceActions } from '~/app/shared/invite-user-modal/data-access/+state/actions/invitation.action'; +import { RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; +import { TuiTabsModule } from '@taiga-ui/kit'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { InviteUserModalComponent } from '~/app/shared/invite-user-modal/invite-user-modal.component'; + @UntilDestroy() @Component({ selector: 'tg-workspace-detail-people', @@ -41,6 +49,18 @@ import { invitationWorkspaceActions } from '~/app/shared/invite-user-modal/data- styleUrls: ['./workspace-detail-people.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiButtonModule, + TuiTabsModule, + RouterLinkActive, + RouterLink, + RouterOutlet, + ModalComponent, + InviteUserModalComponent, + ], }) export class WorkspaceDetailPeopleComponent implements OnInit { @Input() public id!: Workspace['id']; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-projects/workspace-detail-projects.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-projects/workspace-detail-projects.component.ts index 56a8ab4fd..8edc8fc4c 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-projects/workspace-detail-projects.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-projects/workspace-detail-projects.component.ts @@ -38,6 +38,14 @@ import { selectProjectAcceptedInvite } from '~/app/shared/invite-user-modal/data import { ResizedEvent } from '~/app/shared/resize/resize.model'; import { UserStorageService } from '~/app/shared/user-storage/user-storage.service'; import { filterNil } from '~/app/shared/utils/operators'; +import { RouterLink } from '@angular/router'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { CardSkeletonComponent } from '@taiga/ui/skeletons/card-skeleton/card-skeleton.component'; +import { DeleteProjectComponent } from '~/app/modules/project/feature-overview/components/delete-project/delete-project.component'; +import { ProjectCardComponent } from '~/app/shared/project-card/project-card.component'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; interface ViewDetailModel { projects: WorkspaceProject[]; @@ -122,6 +130,17 @@ export interface WorkspaceDetailState { ]), ], providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiButtonModule, + RouterLink, + ResizedDirective, + ProjectCardComponent, + CardSkeletonComponent, + DeleteProjectComponent, + ], }) export class WorkspaceDetailProjectsComponent implements OnInit { public loading$ = this.store.select(selectLoading); diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-skeleton/workspace-detail-skeleton.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-skeleton/workspace-detail-skeleton.component.ts index 30fe93368..f174e851a 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-skeleton/workspace-detail-skeleton.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail-skeleton/workspace-detail-skeleton.component.ts @@ -6,18 +6,22 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, HostBinding, Input, } from '@angular/core'; +import { CardSkeletonComponent } from '@taiga/ui/skeletons/card-skeleton/card-skeleton.component'; @Component({ selector: 'tg-workspace-detail-skeleton', templateUrl: './workspace-detail-skeleton.component.html', styleUrls: ['../../../styles/workspace-skeleton.shared.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CommonModule, CardSkeletonComponent], }) export class WorkspaceDetailSkeletonComponent { @HostBinding('class.static') @Input() public static = false; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail/workspace-detail.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail/workspace-detail.component.ts index a5335e6b7..f56ef2c4f 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail/workspace-detail.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/components/workspace-detail/workspace-detail.component.ts @@ -13,12 +13,23 @@ import { OnDestroy, OnInit, } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { TranslocoService } from '@ngneat/transloco'; +import { + ActivatedRoute, + Router, + RouterLink, + RouterOutlet, +} from '@angular/router'; +import { TranslocoService, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; -import { TuiNotification } from '@taiga-ui/core'; +import { + TuiNotification, + TuiHostedDropdownModule, + TuiButtonModule, + TuiDataListModule, + TuiSvgModule, +} from '@taiga-ui/core'; import { Workspace, WorkspaceProject } from '@taiga/data'; import { Observable } from 'rxjs'; import { distinctUntilChanged, map, take } from 'rxjs/operators'; @@ -30,6 +41,16 @@ import { import { AppService } from '~/app/services/app.service'; import { WsService } from '~/app/services/ws'; import { filterNil } from '~/app/shared/utils/operators'; +import { capitalizePipe } from '~/app/shared/pipes/capitalize/capitalize.pipe'; +import { DeleteWorkspaceComponent } from '../workspace-delete-modal/workspace-delete-modal.component'; +import { WorkspaceDetailEditModalComponent } from '../workspace-detail-edit-modal/workspace-detail-edit-modal.component'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { WorkspaceDetailSkeletonComponent } from '../workspace-detail-skeleton/workspace-detail-skeleton.component'; +import { CommonModule } from '@angular/common'; +import { TitleComponent } from '~/app/shared/title/title.component'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { TooltipDirective } from '@taiga/ui/tooltip'; interface ViewDetailModel { projects: WorkspaceProject[]; workspace: Workspace | null; @@ -49,6 +70,26 @@ export interface WorkspaceDetailState { styleUrls: ['./workspace-detail.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + WorkspaceDetailSkeletonComponent, + TitleComponent, + AvatarComponent, + BadgeComponent, + TuiHostedDropdownModule, + TuiDropdownModule, + TuiButtonModule, + TooltipDirective, + RouterLink, + TuiDataListModule, + TuiSvgModule, + RouterOutlet, + WorkspaceDetailEditModalComponent, + DeleteWorkspaceComponent, + capitalizePipe, + ], }) export class WorkspaceDetailComponent implements OnInit, OnDestroy { public model$!: Observable; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/workspace-feature-detail.module.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/workspace-feature-detail.module.ts index f89e17be3..458f30aa3 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-detail/workspace-feature-detail.module.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-detail/workspace-feature-detail.module.ts @@ -19,21 +19,15 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { TuiTabsModule } from '@taiga-ui/kit'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; -import { InputsModule } from '@taiga/ui/inputs/inputs.module'; -import { ModalModule } from '@taiga/ui/modal'; -import { SkeletonsModule } from '@taiga/ui/skeletons/skeletons.module'; -import { BadgeModule } from 'libs/ui/src/lib/badge/badge.module'; + import { DeleteProjectComponent } from '~/app/modules/project/feature-overview/components/delete-project/delete-project.component'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { HasPermissionDirective } from '~/app/shared/directives/has-permissions/has-permission.directive'; import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; import { DropdownModule } from '~/app/shared/dropdown/dropdown.module'; import { InviteUserModalModule } from '~/app/shared/invite-user-modal/invite-user-modal.module'; import { PaginationComponent } from '~/app/shared/pagination/pagination.component'; -import { CapitalizePipeModule } from '~/app/shared/pipes/capitalize/capitalize.pipe.module'; + import { ProjectCardComponent } from '~/app/shared/project-card/project-card.component'; import { ResizedDirective } from '~/app/shared/resize/resize.directive'; import { TitleComponent } from '~/app/shared/title/title.component'; @@ -52,29 +46,15 @@ import { WorkspaceDetailSkeletonComponent } from './components/workspace-detail- import { WorkspaceDetailComponent } from './components/workspace-detail/workspace-detail.component'; import { WorkspacePageRoutingModule } from './workspace-feature-detail-routing.module'; import { LeaveWorkspaceDropdownComponent } from './components/leave-workspace-dropdown/leave-workspace-dropdown.component'; -import { ToolTipModule } from '@taiga/ui/tooltip'; + import { WorkspaceDetailPeopleEffects } from './+state/effects/workspace-detail-people.effects'; import { ProjectsDropdownComponent } from '~/app/shared/projects-dropdown/projects-dropdown.component'; @NgModule({ - declarations: [ - WorkspaceDetailComponent, - WorkspaceDetailSkeletonComponent, - WorkspaceDetailEditModalComponent, - WorkspaceDetailProjectsComponent, - WorkspaceDetailPeopleComponent, - WorkspaceDetailPeopleMembersComponent, - WorkspaceDetailPeoplePendingComponent, - WorkspaceDetailPeopleNonMembersComponent, - WorkspaceDetailPeopleMembersRemoveComponent, - ], imports: [ TuiLinkModule, RouterModule, - AvatarModule, TuiTabsModule, - CommonTemplateModule, - BadgeModule, DropdownModule, TuiDataListModule, TuiSvgModule, @@ -87,26 +67,28 @@ import { ProjectsDropdownComponent } from '~/app/shared/projects-dropdown/projec DeleteWorkspaceComponent, ResizedDirective, WorkspacePageRoutingModule, - SkeletonsModule, - CapitalizePipeModule, TuiDataListModule, TuiSvgModule, HasPermissionDirective, - ModalModule, ReactiveFormsModule, - InputsModule, DiscardChangesModalComponent, DeleteProjectComponent, - ToolTipModule, - DynamicTableModule, UserCardComponent, PaginationComponent, TitleComponent, TuiScrollbarModule, InviteUserModalModule, - ContextNotificationModule, LeaveWorkspaceDropdownComponent, ProjectsDropdownComponent, + WorkspaceDetailComponent, + WorkspaceDetailSkeletonComponent, + WorkspaceDetailEditModalComponent, + WorkspaceDetailProjectsComponent, + WorkspaceDetailPeopleComponent, + WorkspaceDetailPeopleMembersComponent, + WorkspaceDetailPeoplePendingComponent, + WorkspaceDetailPeopleNonMembersComponent, + WorkspaceDetailPeopleMembersRemoveComponent, ], providers: [{ provide: TRANSLOCO_SCOPE, useValue: 'workspace' }], }) diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-create/workspace-create.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-create/workspace-create.component.ts index f14de42e3..eea42c5b0 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-create/workspace-create.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-create/workspace-create.component.ts @@ -15,7 +15,12 @@ import { Output, ViewChild, } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { + FormBuilder, + FormGroup, + Validators, + ReactiveFormsModule, +} from '@angular/forms'; import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { RandomColorService } from '@taiga/ui/services/random-color/random-color.service'; @@ -23,6 +28,13 @@ import { createFormHasError, createWorkspace, } from '~/app/modules/workspace/feature-list/+state/actions/workspace.actions'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { TuiAutoFocusModule } from '@taiga-ui/cdk'; +import { TranslocoDirective, TranslocoPipe } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { InputsModule } from '@taiga/ui/inputs'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { FormDirective } from '@taiga/ui/inputs/form/form.directive'; @Component({ selector: 'tg-workspace-create', @@ -30,6 +42,18 @@ import { styleUrls: ['./workspace-create.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + InputsModule, + ReactiveFormsModule, + FormDirective, + AvatarComponent, + TuiAutoFocusModule, + TuiButtonModule, + TranslocoPipe, + ], }) export class WorkspaceCreateComponent implements OnInit { @Output() diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.spec.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.spec.ts index 010f28c09..0571f3332 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.spec.ts @@ -31,6 +31,8 @@ import { WorkspaceItemComponent, WorkspaceItemState, } from './workspace-item.component'; +import { CommonModule } from '@angular/common'; + describe('WorkspaceItem', () => { let mockState: RxState = new RxState(); @@ -64,6 +66,7 @@ describe('WorkspaceItem', () => { const createComponent = createComponentFactory({ component: WorkspaceItemComponent, imports: [], + mocks: [UserStorageService, WsService], providers: [ provideMockStore({ initialState }), { @@ -71,7 +74,15 @@ describe('WorkspaceItem', () => { useValue: mockState, }, ], - mocks: [UserStorageService, WsService], + overrideComponents: [ + [ + WorkspaceItemComponent, + { + set: { imports: [CommonModule] }, + }, + ], + ], + shallow: true, }); let store: MockStore; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.ts index 30c8e419e..941ad71b6 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-item/workspace-item.component.ts @@ -54,6 +54,15 @@ import { WsService } from '~/app/services/ws'; import { invitationProjectActions } from '~/app/shared/invite-user-modal/data-access/+state/actions/invitation.action'; import { selectProjectAcceptedInvite } from '~/app/shared/invite-user-modal/data-access/+state/selectors/invitation.selectors'; import { UserStorageService } from '~/app/shared/user-storage/user-storage.service'; +import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; +import { RouterLink } from '@angular/router'; + +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { CardSkeletonComponent } from '@taiga/ui/skeletons/card-skeleton/card-skeleton.component'; +import { ProjectCardComponent } from '~/app/shared/project-card/project-card.component'; interface ViewModel { projectsToShow: number; @@ -151,6 +160,18 @@ export interface WorkspaceItemState { ]), ]), ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + AvatarComponent, + RouterLink, + BadgeComponent, + TuiButtonModule, + ProjectCardComponent, + CardSkeletonComponent, + TuiLinkModule, + ], }) export class WorkspaceItemComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-skeleton/workspace-skeleton.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-skeleton/workspace-skeleton.component.ts index df5b77d28..d97bbcb91 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-skeleton/workspace-skeleton.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace-skeleton/workspace-skeleton.component.ts @@ -13,11 +13,16 @@ import { Input, } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { CardSkeletonComponent } from '@taiga/ui/skeletons/card-skeleton/card-skeleton.component'; + @Component({ selector: 'tg-workspace-skeleton', templateUrl: './workspace-skeleton.component.html', styleUrls: ['../../../styles/workspace-skeleton.shared.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CommonModule, CardSkeletonComponent], }) export class WorkspaceSkeletonComponent { @HostBinding('class.static') @Input() public static = false; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.spec.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.spec.ts index 99a8a4b8c..d47af4dfb 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.spec.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.spec.ts @@ -6,7 +6,6 @@ * Copyright (c) 2023-present Kaleidos INC */ -import '@ng-web-apis/universal/mocks'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { provideMockActions } from '@ngrx/effects/testing'; import { Action, MemoizedSelector } from '@ngrx/store'; @@ -16,6 +15,8 @@ import { Observable } from 'rxjs'; import { WorkspaceState } from '~/app/modules/workspace/feature-list/+state/reducers/workspace.reducer'; import { selectRejectedInvites } from '~/app/modules/workspace/feature-list/+state/selectors/workspace.selectors'; import { WorkspaceComponent } from './workspace.component'; +import { CommonModule } from '@angular/common'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; describe('Workspace List', () => { let actions$: Observable; @@ -39,6 +40,18 @@ describe('Workspace List', () => { provideMockStore({ initialState }), provideMockActions(() => actions$), ], + shallow: true, + overrideComponents: [ + [ + WorkspaceComponent, + { + set: { + imports: [CommonModule], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }, + }, + ], + ], }); let store: MockStore; diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.ts index 9843ef3ea..4fd67bfc7 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/components/workspace/workspace.component.ts @@ -47,6 +47,17 @@ import { slideIn, slideInOut, } from '~/app/shared/utils/animations'; +import { WorkspaceItemComponent } from '../workspace-item/workspace-item.component'; +import { WorkspaceSkeletonComponent } from '../workspace-skeleton/workspace-skeleton.component'; +import { A11yModule } from '@angular/cdk/a11y'; +import { WorkspaceCreateComponent } from '../workspace-create/workspace-create.component'; + +import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { TooltipDirective } from '@taiga/ui/tooltip'; +import { ResizedDirective } from '~/app/shared/resize/resize.directive'; +import { TitleComponent } from '~/app/shared/title/title.component'; @UntilDestroy() @Component({ @@ -54,7 +65,13 @@ import { templateUrl: './workspace.component.html', styleUrls: ['./workspace.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, - providers: [RxState], + providers: [ + RxState, + { + provide: TRANSLOCO_SCOPE, + useValue: 'workspace', + }, + ], animations: [ slideInOut, fadeIntOutAnimation, @@ -102,6 +119,20 @@ import { ]), ]), ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TitleComponent, + TuiButtonModule, + TooltipDirective, + WorkspaceCreateComponent, + A11yModule, + WorkspaceSkeletonComponent, + TuiLinkModule, + ResizedDirective, + WorkspaceItemComponent, + ], }) export class WorkspaceComponent implements OnDestroy, OnInit, AfterViewInit { public eventsSubject: Subject<{ diff --git a/javascript/apps/taiga/src/app/modules/workspace/feature-list/workspace-feature-list.module.ts b/javascript/apps/taiga/src/app/modules/workspace/feature-list/workspace-feature-list.module.ts index 07a514042..ade3c7f38 100644 --- a/javascript/apps/taiga/src/app/modules/workspace/feature-list/workspace-feature-list.module.ts +++ b/javascript/apps/taiga/src/app/modules/workspace/feature-list/workspace-feature-list.module.ts @@ -10,18 +10,12 @@ import { A11yModule } from '@angular/cdk/a11y'; import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; import { EffectsModule } from '@ngrx/effects'; import { StoreModule } from '@ngrx/store'; import { TuiAutoFocusModule } from '@taiga-ui/cdk'; import { TuiLinkModule, TuiSvgModule, TuiTooltipModule } from '@taiga-ui/core'; import { TuiAvatarModule } from '@taiga-ui/kit'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { BadgeModule } from 'libs/ui/src/lib/badge/badge.module'; -import { InputsModule } from 'libs/ui/src/lib/inputs/inputs.module'; -import { SkeletonsModule } from 'libs/ui/src/lib/skeletons/skeletons.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { CapitalizePipeModule } from '~/app/shared/pipes/capitalize/capitalize.pipe.module'; + import { ProjectCardComponent } from '~/app/shared/project-card/project-card.component'; import { ResizedDirective } from '~/app/shared/resize/resize.directive'; import { TitleComponent } from '~/app/shared/title/title.component'; @@ -32,43 +26,27 @@ import { WorkspaceItemComponent } from './components/workspace-item/workspace-it import { WorkspaceSkeletonComponent } from './components/workspace-skeleton/workspace-skeleton.component'; import { WorkspaceComponent } from './components/workspace/workspace.component'; import { WorkspaceFeatureListRoutingModule } from './workspace-feature-list-routing.module'; -import { ToolTipModule } from '@taiga/ui/tooltip'; @NgModule({ - declarations: [ - WorkspaceComponent, - WorkspaceCreateComponent, - WorkspaceItemComponent, - WorkspaceSkeletonComponent, - ], imports: [ ReactiveFormsModule, TuiSvgModule, - CommonTemplateModule, TuiLinkModule, - InputsModule, TuiAvatarModule, - AvatarModule, - SkeletonsModule, - BadgeModule, RouterModule, StoreModule.forFeature(workspaceFeature), EffectsModule.forFeature([WorkspaceEffects]), TuiAutoFocusModule, A11yModule, TuiTooltipModule, - ToolTipModule, ResizedDirective, ProjectCardComponent, WorkspaceFeatureListRoutingModule, - CapitalizePipeModule, TitleComponent, - ], - providers: [ - { - provide: TRANSLOCO_SCOPE, - useValue: 'workspace', - }, + WorkspaceComponent, + WorkspaceCreateComponent, + WorkspaceItemComponent, + WorkspaceSkeletonComponent, ], }) export class WorkspaceFeatureListModule {} diff --git a/javascript/apps/taiga/src/app/services/ws/index.ts b/javascript/apps/taiga/src/app/services/ws/index.ts index b4a0f55a1..9756b0ef3 100644 --- a/javascript/apps/taiga/src/app/services/ws/index.ts +++ b/javascript/apps/taiga/src/app/services/ws/index.ts @@ -6,8 +6,6 @@ * Copyright (c) 2023-present Kaleidos INC */ -export * from './ws.module'; - export { WsService } from './services/ws.service'; export { WsServiceMock } from './services/ws.service.mock'; export * from './ws.actions'; diff --git a/javascript/apps/taiga/src/app/services/ws/ws.module.ts b/javascript/apps/taiga/src/app/services/ws/ws.module.ts deleted file mode 100644 index 3da1d3c4b..000000000 --- a/javascript/apps/taiga/src/app/services/ws/ws.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; -@NgModule({}) -export class WsModule {} diff --git a/javascript/apps/taiga/src/app/shared/attachments/attachments.component.ts b/javascript/apps/taiga/src/app/shared/attachments/attachments.component.ts index a79485765..a6087771e 100644 --- a/javascript/apps/taiga/src/app/shared/attachments/attachments.component.ts +++ b/javascript/apps/taiga/src/app/shared/attachments/attachments.component.ts @@ -25,8 +25,9 @@ import { AttachmentsState } from './attachments.state'; import { toSignal } from '@angular/core/rxjs-interop'; import { map } from 'rxjs'; import { ConfigService } from '@taiga/core'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; + import { trackByValue } from '../utils/track-by-value'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; @Component({ selector: 'tg-attachments', @@ -36,7 +37,7 @@ import { trackByValue } from '../utils/track-by-value'; TranslocoModule, TuiButtonModule, AttachmentsListComponent, - ContextNotificationModule, + ContextNotificationComponent, ], templateUrl: './attachments.component.html', styleUrls: ['./attachments.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/attachments/components/attachment/attachment.component.ts b/javascript/apps/taiga/src/app/shared/attachments/components/attachment/attachment.component.ts index 25dfd3f1f..8e64f8509 100644 --- a/javascript/apps/taiga/src/app/shared/attachments/components/attachment/attachment.component.ts +++ b/javascript/apps/taiga/src/app/shared/attachments/components/attachment/attachment.component.ts @@ -18,34 +18,35 @@ import { CommonModule } from '@angular/common'; import { TranslocoModule } from '@ngneat/transloco'; import { TuiButtonModule, TuiSvgModule } from '@taiga-ui/core'; import { Attachment, LoadingAttachment } from '@taiga/data'; -import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; + import { ProgressBarComponent } from '@taiga/ui/progress-bar'; -import { ToolTipModule } from '@taiga/ui/tooltip'; + import { DateDistancePipe } from '~/app/shared/pipes/date-distance/date-distance.pipe'; import { TransformSizePipe } from '~/app/shared/pipes/transform-size/transform-size.pipe'; import { RealTimeDateDistanceComponent } from '~/app/shared/real-time-date-distance/real-time-date-distance.component'; import { AttachmentsState } from '~/app/shared/attachments/attachments.state'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; + import { showUndo, undoDone } from '~/app/shared/utils/animations'; import { UndoComponent } from '~/app/shared/undo/undo.component'; import { Subject } from 'rxjs'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; @Component({ selector: 'tg-attachment', standalone: true, imports: [ CommonModule, - DynamicTableModule, TuiButtonModule, - ToolTipModule, TranslocoModule, TransformSizePipe, DateDistancePipe, TuiSvgModule, ProgressBarComponent, RealTimeDateDistanceComponent, - ContextNotificationModule, UndoComponent, + DynamicTableModule, + TooltipDirective, ], templateUrl: './attachment.component.html', styleUrls: ['./attachment.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/attachments/components/attachments-list/attachments-list.component.ts b/javascript/apps/taiga/src/app/shared/attachments/components/attachments-list/attachments-list.component.ts index bc08573f7..c0ef1e823 100644 --- a/javascript/apps/taiga/src/app/shared/attachments/components/attachments-list/attachments-list.component.ts +++ b/javascript/apps/taiga/src/app/shared/attachments/components/attachments-list/attachments-list.component.ts @@ -19,10 +19,11 @@ import { AttachmentsState } from '~/app/shared/attachments/attachments.state'; import { AttachmentComponent } from '../attachment/attachment.component'; import { Attachment, LoadingAttachment } from '@taiga/data'; import { trackByProp } from '~/app/shared/utils/track-by-prop'; -import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; -import { ToolTipModule } from '@taiga/ui/tooltip'; + import { TuiButtonModule } from '@taiga-ui/core'; import { NumberedPaginationComponent } from '@taiga/ui/numbered-pagination'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; +import { DynamicTableModule } from '@taiga/ui/dynamic-table/dynamic-table.module'; @Component({ selector: 'tg-attachments-list', @@ -31,10 +32,10 @@ import { NumberedPaginationComponent } from '@taiga/ui/numbered-pagination'; CommonModule, TranslocoModule, AttachmentComponent, - DynamicTableModule, - ToolTipModule, TuiButtonModule, NumberedPaginationComponent, + TooltipDirective, + DynamicTableModule, ], templateUrl: './attachments-list.component.html', styleUrls: ['./attachments-list.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/banner/banner.component.ts b/javascript/apps/taiga/src/app/shared/banner/banner.component.ts index bd9d41b1f..2eafdbe8f 100644 --- a/javascript/apps/taiga/src/app/shared/banner/banner.component.ts +++ b/javascript/apps/taiga/src/app/shared/banner/banner.component.ts @@ -6,8 +6,8 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; @Component({ selector: 'tg-banner', @@ -15,7 +15,7 @@ import { CommonTemplateModule } from '~/app/shared/common-template.module'; templateUrl: './banner.component.html', styleUrls: ['./banner.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CommonTemplateModule], + imports: [CommonModule], }) export class BannerComponent { @Input({ required: true }) diff --git a/javascript/apps/taiga/src/app/shared/comments/comments.component.ts b/javascript/apps/taiga/src/app/shared/comments/comments.component.ts index 514479d49..7d531578e 100644 --- a/javascript/apps/taiga/src/app/shared/comments/comments.component.ts +++ b/javascript/apps/taiga/src/app/shared/comments/comments.component.ts @@ -32,7 +32,7 @@ import { CommentSingleComponent } from './components/comment-single/comment-sing import { CommentUserInputComponent } from './components/comment-user-input/comment-user-input.component'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { StoryDetailApiActions } from '~/app/modules/project/story-detail/data-access/+state/actions/story-detail.actions'; -import { ToolTipModule } from '@taiga/ui/tooltip'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; export type OrderComments = '-createdAt' | 'createdAt'; @@ -54,11 +54,11 @@ export interface CommentsComponentState { CodeHightlightDirective, TranslocoModule, TuiButtonModule, - ToolTipModule, CommentUserInputComponent, CommentSkeletonComponent, RealTimeDateDistanceComponent, CommentSingleComponent, + TooltipDirective, ], providers: [ RxState, diff --git a/javascript/apps/taiga/src/app/shared/comments/components/comment-detail/comment-detail.component.ts b/javascript/apps/taiga/src/app/shared/comments/components/comment-detail/comment-detail.component.ts index 8f4d199a2..7aaeedcd0 100644 --- a/javascript/apps/taiga/src/app/shared/comments/components/comment-detail/comment-detail.component.ts +++ b/javascript/apps/taiga/src/app/shared/comments/components/comment-detail/comment-detail.component.ts @@ -26,10 +26,10 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { StoryView, User, UserComment } from '@taiga/data'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; import { selectCurrentProject } from '~/app/modules/project/data-access/+state/selectors/project.selectors'; import { selectStoryView } from '~/app/modules/project/story-detail/data-access/+state/selectors/story-detail.selectors'; import { DropdownModule } from '~/app/shared/dropdown/dropdown.module'; -import { ToolTipModule } from '@taiga/ui/tooltip'; @Component({ selector: 'tg-comment-detail', @@ -45,7 +45,7 @@ import { ToolTipModule } from '@taiga/ui/tooltip'; TuiDataListModule, TuiButtonModule, TuiAutoFocusModule, - ToolTipModule, + TooltipDirective, ], providers: [ { diff --git a/javascript/apps/taiga/src/app/shared/comments/components/comment-single/comment-single.component.ts b/javascript/apps/taiga/src/app/shared/comments/components/comment-single/comment-single.component.ts index f41389293..bd583e6df 100644 --- a/javascript/apps/taiga/src/app/shared/comments/components/comment-single/comment-single.component.ts +++ b/javascript/apps/taiga/src/app/shared/comments/components/comment-single/comment-single.component.ts @@ -27,7 +27,7 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { UserComment } from '@taiga/data'; -import { BadgeModule } from '@taiga/ui/badge/badge.module'; + import { Subject, of, take } from 'rxjs'; import { StoryDetaiImageUploadService } from '~/app/modules/project/story-detail/story-detail-image-upload.service'; import { CanDeactivateService } from '~/app/shared/can-deactivate/can-deactivate.service'; @@ -44,6 +44,7 @@ import { fadeIntOutAnimation } from '~/app/shared/utils/animations'; import { DeletedCommentComponent } from '../deleted-comment/deleted-comment.component'; import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; import { NouserAvatarComponent } from '~/app/shared/nouser-avatar/nouser-avatar.component'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; @Component({ selector: 'tg-comment', @@ -63,13 +64,14 @@ import { NouserAvatarComponent } from '~/app/shared/nouser-avatar/nouser-avatar. EditorComponent, DiscardChangesModalComponent, TuiButtonModule, - BadgeModule, DateDistancePipe, TooltipDirective, TuiHostedDropdownModule, DeletedCommentComponent, TuiSvgModule, NouserAvatarComponent, + BadgeComponent, + TooltipDirective, ], animations: [fadeIntOutAnimation], providers: [ diff --git a/javascript/apps/taiga/src/app/shared/comments/components/comment-user-input/comment-user-input.component.ts b/javascript/apps/taiga/src/app/shared/comments/components/comment-user-input/comment-user-input.component.ts index 9a0006068..97e16d02c 100644 --- a/javascript/apps/taiga/src/app/shared/comments/components/comment-user-input/comment-user-input.component.ts +++ b/javascript/apps/taiga/src/app/shared/comments/components/comment-user-input/comment-user-input.component.ts @@ -23,7 +23,7 @@ import { filterFalsy, filterNil } from '~/app/shared/utils/operators'; import { RxState } from '@rx-angular/state'; import { User } from '@taiga/data'; import { EditorComponent } from '~/app/shared/editor/editor.component'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; + import { DiscardChangesModalComponent } from '~/app/shared/discard-changes-modal/discard-changes-modal.component'; import { ComponentCanDeactivate } from '~/app/shared/can-deactivate/can-deactivate.guard'; import { CanDeactivateService } from '~/app/shared/can-deactivate/can-deactivate.service'; @@ -33,6 +33,9 @@ import { OrderComments } from '~/app/shared/comments/comments.component'; import { ResizedDirective } from '~/app/shared/resize/resize.directive'; import { RestoreFocusDirective } from '~/app/shared/directives/restore-focus/restore-focus.directive'; import { RestoreFocusTargetDirective } from '~/app/shared/directives/restore-focus/restore-focus-target.directive'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { TuiButtonModule } from '@taiga-ui/core'; interface CommentUserInputComponentState { user: User; @@ -46,13 +49,15 @@ interface CommentUserInputComponentState { selector: 'tg-comment-user-input', standalone: true, imports: [ - CommonTemplateModule, + CommonModule, UserAvatarComponent, EditorComponent, DiscardChangesModalComponent, ResizedDirective, RestoreFocusDirective, RestoreFocusTargetDirective, + TranslocoDirective, + TuiButtonModule, ], templateUrl: './comment-user-input.component.html', styleUrls: ['./comment-user-input.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/common-template.module.ts b/javascript/apps/taiga/src/app/shared/common-template.module.ts deleted file mode 100644 index 5efd070a4..000000000 --- a/javascript/apps/taiga/src/app/shared/common-template.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TranslocoModule } from '@ngneat/transloco'; -import { TuiButtonModule } from '@taiga-ui/core'; -@NgModule({ - declarations: [], - imports: [CommonModule, TranslocoModule, TuiButtonModule], - exports: [CommonModule, TranslocoModule, TuiButtonModule], - providers: [], -}) -export class CommonTemplateModule {} diff --git a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.spec.ts b/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.spec.ts index bef73c25e..de1cb7d32 100644 --- a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.spec.ts +++ b/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.spec.ts @@ -10,7 +10,6 @@ import { By } from '@angular/platform-browser'; import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator'; import { TuiButtonComponent, TuiButtonModule } from '@taiga-ui/core'; import { ButtonLoadingDirective } from './button-loading.directive'; -import { ButtonLoadingModule } from './button-loading.module'; import { ButtonLoadingService } from './button-loading.service'; describe('ButtonLoadingDirective', () => { @@ -18,8 +17,7 @@ describe('ButtonLoadingDirective', () => { const createDirective = createDirectiveFactory({ directive: ButtonLoadingDirective, - imports: [ButtonLoadingModule, TuiButtonModule], - declareDirective: false, + imports: [TuiButtonModule], }); beforeEach(() => { diff --git a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.ts b/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.ts index 68d5fb679..46bfe07f0 100644 --- a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.ts +++ b/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.directive.ts @@ -17,8 +17,11 @@ import { import { TuiButtonComponent } from '@taiga-ui/core'; import { ButtonLoadingService } from './button-loading.service'; -// eslint-disable-next-line @angular-eslint/directive-selector -@Directive({ selector: 'button[loading]' }) +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: 'button[loading]', + standalone: true, +}) export class ButtonLoadingDirective implements AfterViewInit { @Input() public loadingSuccess = ''; diff --git a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.module.ts b/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.module.ts deleted file mode 100644 index 37815656d..000000000 --- a/javascript/apps/taiga/src/app/shared/directives/button-loading/button-loading.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ButtonLoadingDirective } from './button-loading.directive'; - -@NgModule({ - providers: [], - declarations: [ButtonLoadingDirective], - imports: [CommonModule], - exports: [ButtonLoadingDirective], -}) -export class ButtonLoadingModule {} diff --git a/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.directive.ts b/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.directive.ts index e2c220f32..0748186fd 100644 --- a/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.directive.ts +++ b/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.directive.ts @@ -20,8 +20,11 @@ import { TranslocoService } from '@ngneat/transloco'; import { UntilDestroy } from '@ngneat/until-destroy'; @UntilDestroy() -// eslint-disable-next-line @angular-eslint/directive-selector -@Directive({ selector: '[withExternalLink]' }) +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[withExternalLink]', + standalone: true, +}) export class ExternalLinkDirective implements AfterViewInit, OnDestroy { public observer!: MutationObserver; diff --git a/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.module.ts b/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.module.ts deleted file mode 100644 index c9a6a3ed3..000000000 --- a/javascript/apps/taiga/src/app/shared/directives/external-link/external-link.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; -import { ExternalLinkDirective } from './external-link.directive'; - -@NgModule({ - declarations: [ExternalLinkDirective], - exports: [ExternalLinkDirective], -}) -export class ExternalLinkModule {} diff --git a/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.directive.ts b/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.directive.ts index ede718ff8..37ad9f6d1 100644 --- a/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.directive.ts +++ b/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.directive.ts @@ -16,8 +16,11 @@ import { } from '@angular/core'; import { Router } from '@angular/router'; -// eslint-disable-next-line @angular-eslint/directive-selector -@Directive({ selector: '[withInternalLink]' }) +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[withInternalLink]', + standalone: true, +}) export class InternalLinkDirective implements AfterViewInit, OnDestroy { public observer!: MutationObserver; diff --git a/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.module.ts b/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.module.ts deleted file mode 100644 index d99172922..000000000 --- a/javascript/apps/taiga/src/app/shared/directives/internal-link/internal-link.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { InternalLinkDirective } from './internal-link.directive'; - -@NgModule({ - imports: [RouterModule], - declarations: [InternalLinkDirective], - exports: [InternalLinkDirective], -}) -export class InternalLinkModule {} diff --git a/javascript/apps/taiga/src/app/shared/discard-changes-modal/discard-changes-modal.component.ts b/javascript/apps/taiga/src/app/shared/discard-changes-modal/discard-changes-modal.component.ts index 90921c110..fd99a5f18 100644 --- a/javascript/apps/taiga/src/app/shared/discard-changes-modal/discard-changes-modal.component.ts +++ b/javascript/apps/taiga/src/app/shared/discard-changes-modal/discard-changes-modal.component.ts @@ -14,20 +14,21 @@ import { Output, } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { ModalModule } from '@taiga/ui/modal'; -import { CommonTemplateModule } from '../common-template.module'; + import { TuiLinkModule } from '@taiga-ui/core'; import { RestoreFocusDirective } from '../directives/restore-focus/restore-focus.directive'; +import { ModalComponent } from '@taiga/ui/modal/components'; +import { TranslocoDirective } from '@ngneat/transloco'; @Component({ selector: 'tg-discard-changes-modal', standalone: true, imports: [ CommonModule, - ModalModule, - CommonTemplateModule, TuiLinkModule, RestoreFocusDirective, + ModalComponent, + TranslocoDirective, ], templateUrl: './discard-changes-modal.component.html', styleUrls: ['./discard-changes-modal.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.html b/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.html index eb7c01f51..6e0235590 100644 --- a/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.html +++ b/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.html @@ -5,7 +5,6 @@ Copyright (c) 2023-present Kaleidos INC --> - diff --git a/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.ts b/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.ts index 1fb0dc829..366877611 100644 --- a/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.ts +++ b/javascript/apps/taiga/src/app/shared/invite-user-modal/components/user-to-invite.component.ts @@ -8,15 +8,22 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { TranslocoService, TRANSLOCO_SCOPE } from '@ngneat/transloco'; -import { TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { + TuiButtonModule, + TuiDataListModule, + TuiLinkModule, + TuiSvgModule, +} from '@taiga-ui/core'; +import { TuiSelectModule } from '@taiga-ui/kit'; import { Role, User } from '@taiga/data'; -import { BadgeModule } from '@taiga/ui/badge/badge.module'; -import { ToolTipModule } from '@taiga/ui/tooltip'; -import { InputsModule } from 'libs/ui/src/lib/inputs/inputs.module'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; -import { CapitalizePipeModule } from '~/app/shared/pipes/capitalize/capitalize.pipe.module'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { SelectComponent } from '@taiga/ui/inputs/select/select.component'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; + import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; +import { capitalizePipe } from '~/app/shared/pipes/capitalize/capitalize.pipe'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'tg-user-to-invite', @@ -27,30 +34,23 @@ import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; './user-to-invite.component.css', ], imports: [ + CommonModule, FormsModule, ReactiveFormsModule, TuiLinkModule, - InputsModule, TuiSvgModule, - ToolTipModule, - CommonTemplateModule, UserCardComponent, - BadgeModule, - CapitalizePipeModule, - ], - providers: [ - { - provide: TRANSLOCO_SCOPE, - useValue: { - scope: 'invitation_modal', - alias: 'invitation_modal', - }, - }, + TooltipDirective, + BadgeComponent, + SelectComponent, + TuiSelectModule, + TuiDataListModule, + capitalizePipe, + TranslocoDirective, + TuiButtonModule, ], }) export class UserToInviteComponent { - constructor(private translocoService: TranslocoService) {} - @Output() public delete = new EventEmitter(); diff --git a/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.component.ts b/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.component.ts index 2be7523ff..7d28a851e 100644 --- a/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.component.ts +++ b/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.component.ts @@ -19,13 +19,26 @@ import { SimpleChanges, ViewChild, } from '@angular/core'; -import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { + FormArray, + FormBuilder, + FormGroup, + ReactiveFormsModule, + FormsModule, +} from '@angular/forms'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, concatLatestFrom, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; -import { TuiScrollbarComponent } from '@taiga-ui/core'; -import { TuiTextAreaComponent } from '@taiga-ui/kit'; +import { + TuiScrollbarComponent, + TuiSvgModule, + TuiTextfieldControllerModule, + TuiDataListModule, + TuiButtonModule, + TuiLinkModule, +} from '@taiga-ui/core'; +import { TuiTextAreaComponent, TuiTextAreaModule } from '@taiga-ui/kit'; import { Contact, InvitationRequest, @@ -59,6 +72,17 @@ import { selectWorkspace } from '~/app/modules/workspace/feature-detail/+state/s import { selectCurrentProject } from '~/app/modules/project/data-access/+state/selectors/project.selectors'; import { RxState } from '@rx-angular/state'; import { filterNil } from '~/app/shared/utils/operators'; +import { capitalizePipe } from '../pipes/capitalize/capitalize.pipe'; +import { ButtonLoadingDirective } from '../directives/button-loading/button-loading.directive'; +import { UserToInviteComponent } from './components/user-to-invite.component'; +import { UserCardComponent } from '../user-card/user-card.component'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { TuiAutoFocusModule, TuiActiveZoneModule } from '@taiga-ui/cdk'; +import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar'; +import { CommonModule } from '@angular/common'; +import { InputsModule } from '@taiga/ui/inputs'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; interface InvitationForm { fullName: string; @@ -94,6 +118,30 @@ interface InviteUserState { }, }, ], + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + InputsModule, + ReactiveFormsModule, + TuiScrollbarModule, + TuiSvgModule, + TuiTextAreaModule, + TuiAutoFocusModule, + TuiTextfieldControllerModule, + FormsModule, + TuiDropdownModule, + TuiActiveZoneModule, + TuiDataListModule, + UserCardComponent, + BadgeComponent, + TuiButtonModule, + UserToInviteComponent, + ContextNotificationComponent, + TuiLinkModule, + ButtonLoadingDirective, + capitalizePipe, + ], }) export class InviteUserModalComponent implements OnInit, OnChanges { @ViewChild(TuiScrollbarComponent, { read: ElementRef }) diff --git a/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.module.ts b/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.module.ts index d1021f064..5e3a2dcd6 100644 --- a/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.module.ts +++ b/javascript/apps/taiga/src/app/shared/invite-user-modal/invite-user-modal.module.ts @@ -19,18 +19,14 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { TuiComboBoxModule, TuiDataListWrapperModule } from '@taiga-ui/kit'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; -import { BadgeModule } from 'libs/ui/src/lib/badge/badge.module'; -import { InputsModule } from 'libs/ui/src/lib/inputs/inputs.module'; + import { RolesPermissionsEffects } from '~/app/modules/project/settings/feature-roles-permissions/+state/effects/roles-permissions.effects'; import { rolesPermissionsFeature } from '~/app/modules/project/settings/feature-roles-permissions/+state/reducers/roles-permissions.reducer'; import { InvitationEffects } from '~/app/shared/invite-user-modal/data-access/+state/effects/invitation.effects'; import { invitationFeature } from '~/app/shared/invite-user-modal/data-access/+state/reducers/invitation.reducers'; import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; import { UserCardComponent } from '~/app/shared/user-card/user-card.component'; -import { CommonTemplateModule } from '../common-template.module'; -import { ButtonLoadingModule } from '../directives/button-loading/button-loading.module'; -import { CapitalizePipeModule } from '../pipes/capitalize/capitalize.pipe.module'; + import { UserToInviteComponent } from './components/user-to-invite.component'; import { InviteUserModalComponent } from './invite-user-modal.component'; @@ -40,10 +36,7 @@ import { InviteUserModalComponent } from './invite-user-modal.component'; ReactiveFormsModule, UserAvatarComponent, TuiLinkModule, - InputsModule, - BadgeModule, TuiSvgModule, - CommonTemplateModule, TuiDataListModule, TuiScrollbarModule, TuiDropdownModule, @@ -51,16 +44,13 @@ import { InviteUserModalComponent } from './invite-user-modal.component'; TuiComboBoxModule, TuiDataListWrapperModule, UserToInviteComponent, - ContextNotificationModule, StoreModule.forFeature(rolesPermissionsFeature), StoreModule.forFeature(invitationFeature), EffectsModule.forFeature([RolesPermissionsEffects, InvitationEffects]), TuiAutoFocusModule, - ButtonLoadingModule, UserCardComponent, - CapitalizePipeModule, + InviteUserModalComponent, ], - declarations: [InviteUserModalComponent], exports: [InviteUserModalComponent], }) export class InviteUserModalModule {} diff --git a/javascript/apps/taiga/src/app/shared/navigation/navigation-projects/navigation-projects.component.ts b/javascript/apps/taiga/src/app/shared/navigation/navigation-projects/navigation-projects.component.ts index 72d582726..5e2d178a0 100644 --- a/javascript/apps/taiga/src/app/shared/navigation/navigation-projects/navigation-projects.component.ts +++ b/javascript/apps/taiga/src/app/shared/navigation/navigation-projects/navigation-projects.component.ts @@ -9,12 +9,26 @@ import { Component, ChangeDetectionStrategy } from '@angular/core'; import { Project } from '@taiga/data'; import { NavigationService } from '~/app/shared/navigation/navigation.service'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { RouterLink } from '@angular/router'; +import { TuiDataListModule, TuiButtonModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; @Component({ selector: 'tg-navigation-projects', templateUrl: './navigation-projects.component.html', styleUrls: ['./navigation-projects.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiDataListModule, + RouterLink, + AvatarComponent, + TuiButtonModule, + ], }) export class NavigationProjectsComponent { constructor(public navigationService: NavigationService) {} diff --git a/javascript/apps/taiga/src/app/shared/navigation/navigation-user-dropdown/navigation-user-dropdown.component.ts b/javascript/apps/taiga/src/app/shared/navigation/navigation-user-dropdown/navigation-user-dropdown.component.ts index 08895d0c9..5cf8d4560 100644 --- a/javascript/apps/taiga/src/app/shared/navigation/navigation-user-dropdown/navigation-user-dropdown.component.ts +++ b/javascript/apps/taiga/src/app/shared/navigation/navigation-user-dropdown/navigation-user-dropdown.component.ts @@ -13,12 +13,28 @@ import { Output, } from '@angular/core'; import { User } from '@taiga/data'; +import { RouterLink } from '@angular/router'; + +import { TuiDataListModule } from '@taiga-ui/core'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { CommonModule } from '@angular/common'; +import { AutoFocusDirective } from '~/app/shared/directives/auto-focus/auto-focus.directive'; +import { UserAvatarComponent } from '~/app/shared/user-avatar/user-avatar.component'; @Component({ selector: 'tg-navigation-user-dropdown', templateUrl: './navigation-user-dropdown.component.html', styleUrls: ['./navigation-user-dropdown.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CommonModule, + TranslocoDirective, + TuiDataListModule, + AutoFocusDirective, + UserAvatarComponent, + RouterLink, + ], }) export class NavigationUserDropdownComponent { @Input() diff --git a/javascript/apps/taiga/src/app/shared/navigation/navigation.component.ts b/javascript/apps/taiga/src/app/shared/navigation/navigation.component.ts index af210ed46..48be690f5 100644 --- a/javascript/apps/taiga/src/app/shared/navigation/navigation.component.ts +++ b/javascript/apps/taiga/src/app/shared/navigation/navigation.component.ts @@ -12,11 +12,32 @@ import { map } from 'rxjs'; import { selectUser } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors'; import { AuthService } from '~/app/modules/auth/services/auth.service'; import { NavigationService } from './navigation.service'; +import { NavigationProjectsComponent } from './navigation-projects/navigation-projects.component'; +import { NavigationUserDropdownComponent } from './navigation-user-dropdown/navigation-user-dropdown.component'; +import { UserAvatarComponent } from '../user-avatar/user-avatar.component'; +import { TuiDropdownModule } from '@taiga-ui/core/directives/dropdown'; +import { RouterLink } from '@angular/router'; +import { TuiButtonModule, TuiHostedDropdownModule } from '@taiga-ui/core'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective, TranslocoPipe } from '@ngneat/transloco'; @Component({ selector: 'tg-navigation', templateUrl: './navigation.component.html', styleUrls: ['./navigation.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + TranslocoDirective, + CommonModule, + TuiButtonModule, + RouterLink, + TuiHostedDropdownModule, + TuiDropdownModule, + UserAvatarComponent, + NavigationUserDropdownComponent, + NavigationProjectsComponent, + TranslocoPipe, + ], }) export class NavigationComponent { public openProjectsDropdown = false; diff --git a/javascript/apps/taiga/src/app/shared/navigation/navigation.module.ts b/javascript/apps/taiga/src/app/shared/navigation/navigation.module.ts index 7285368cf..b527e9dcc 100644 --- a/javascript/apps/taiga/src/app/shared/navigation/navigation.module.ts +++ b/javascript/apps/taiga/src/app/shared/navigation/navigation.module.ts @@ -11,8 +11,7 @@ import { RouterModule } from '@angular/router'; import { TuiAutoFocusModule } from '@taiga-ui/cdk'; import { TuiDataListModule, TuiLinkModule, TuiSvgModule } from '@taiga-ui/core'; import { TuiAvatarModule, TuiBadgedContentModule } from '@taiga-ui/kit'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { CommonTemplateModule } from '../common-template.module'; + import { AutoFocusDirective } from '../directives/auto-focus/auto-focus.directive'; import { DropdownModule } from '../dropdown/dropdown.module'; import { UserAvatarComponent } from '../user-avatar/user-avatar.component'; @@ -26,16 +25,12 @@ import { NavigationComponent } from './navigation.component'; TuiLinkModule, TuiSvgModule, TuiDataListModule, - CommonTemplateModule, UserAvatarComponent, TuiAutoFocusModule, RouterModule, - AvatarModule, DropdownModule, TuiBadgedContentModule, AutoFocusDirective, - ], - declarations: [ NavigationComponent, NavigationUserDropdownComponent, NavigationProjectsComponent, diff --git a/javascript/apps/taiga/src/app/shared/pagination/pagination.component.ts b/javascript/apps/taiga/src/app/shared/pagination/pagination.component.ts index 9d449c035..03ac34a93 100644 --- a/javascript/apps/taiga/src/app/shared/pagination/pagination.component.ts +++ b/javascript/apps/taiga/src/app/shared/pagination/pagination.component.ts @@ -6,6 +6,7 @@ * Copyright (c) 2023-present Kaleidos INC */ +import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -13,7 +14,8 @@ import { Input, Output, } from '@angular/core'; -import { CommonTemplateModule } from '~/app/shared/common-template.module'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { TuiButtonModule } from '@taiga-ui/core'; @Component({ selector: 'tg-members-pagination', @@ -21,7 +23,7 @@ import { CommonTemplateModule } from '~/app/shared/common-template.module'; templateUrl: './pagination.component.html', styleUrls: ['./pagination.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CommonTemplateModule], + imports: [TranslocoDirective, CommonModule, TuiButtonModule], }) export class PaginationComponent { @Input() diff --git a/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.module.ts b/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.module.ts deleted file mode 100644 index 446348f06..000000000 --- a/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { capitalizePipe } from './capitalize.pipe'; - -@NgModule({ - imports: [CommonModule], - declarations: [capitalizePipe], - providers: [], - exports: [capitalizePipe], -}) -export class CapitalizePipeModule {} diff --git a/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.ts b/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.ts index e229147cd..41620c5ae 100644 --- a/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.ts +++ b/javascript/apps/taiga/src/app/shared/pipes/capitalize/capitalize.pipe.ts @@ -8,7 +8,10 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'capitalize' }) +@Pipe({ + name: 'capitalize', + standalone: true, +}) export class capitalizePipe implements PipeTransform { public transform(str: string) { return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); diff --git a/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.module.ts b/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.module.ts deleted file mode 100644 index 3d9cd3c30..000000000 --- a/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { getUrlPipe } from './get-url.pipe'; - -@NgModule({ - imports: [CommonModule], - declarations: [getUrlPipe], - providers: [], - exports: [getUrlPipe], -}) -export class GetUrlPipeModule {} diff --git a/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.ts b/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.ts index e5118b78d..96a6a5a50 100644 --- a/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.ts +++ b/javascript/apps/taiga/src/app/shared/pipes/get-url/get-url.pipe.ts @@ -9,7 +9,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { UtilsService } from '~/app/shared/utils/utils-service.service'; -@Pipe({ name: 'getUrl' }) +@Pipe({ + name: 'getUrl', + standalone: true, +}) export class getUrlPipe implements PipeTransform { constructor(private utilsService: UtilsService) {} public transform(commands: number[] | string[] | string) { diff --git a/javascript/apps/taiga/src/app/shared/project-card/project-card.component.ts b/javascript/apps/taiga/src/app/shared/project-card/project-card.component.ts index bb647e969..8823f4f07 100644 --- a/javascript/apps/taiga/src/app/shared/project-card/project-card.component.ts +++ b/javascript/apps/taiga/src/app/shared/project-card/project-card.component.ts @@ -29,18 +29,26 @@ import { import { RouterModule } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TuiDataListModule, TuiSvgModule } from '@taiga-ui/core'; +import { + TuiButtonModule, + TuiDataListModule, + TuiSvgModule, +} from '@taiga-ui/core'; import { Project, Workspace } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { BadgeModule } from '@taiga/ui/badge/badge.module'; + import { distinctUntilChanged, map, skip } from 'rxjs/operators'; import { selectProjectAcceptedInvite } from '~/app/shared/invite-user-modal/data-access/+state/selectors/invitation.selectors'; -import { CommonTemplateModule } from '../common-template.module'; + import { DropdownModule } from '../dropdown/dropdown.module'; import { DataAccessInviteUserModalModule } from '../invite-user-modal/data-access/+state/invite-user-modal-data-access.module'; import { InviteUserModalModule } from '../invite-user-modal/invite-user-modal.module'; -import { CapitalizePipeModule } from '../pipes/capitalize/capitalize.pipe.module'; -import { ToolTipModule } from '@taiga/ui/tooltip'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { BadgeComponent } from '@taiga/ui/badge/badge.component'; +import { capitalizePipe } from '../pipes/capitalize/capitalize.pipe'; +import { CommonModule } from '@angular/common'; +import { TooltipDirective } from '@taiga/ui/tooltip/tooltip.directive'; +import { TranslocoDirective } from '@ngneat/transloco'; + const cssValue = getComputedStyle(document.documentElement); type CardVariant = 'project' | 'placeholder' | 'invitation'; @@ -54,15 +62,17 @@ type CardVariant = 'project' | 'placeholder' | 'invitation'; imports: [ RouterModule, TuiSvgModule, - CommonTemplateModule, - AvatarModule, InviteUserModalModule, DataAccessInviteUserModalModule, - BadgeModule, - CapitalizePipeModule, TuiDataListModule, DropdownModule, - ToolTipModule, + AvatarComponent, + TooltipDirective, + BadgeComponent, + capitalizePipe, + CommonModule, + TranslocoDirective, + TuiButtonModule, ], animations: [ trigger('invitationAccepted', [ diff --git a/javascript/apps/taiga/src/app/shared/project-summary-card/project-summary-card.component.ts b/javascript/apps/taiga/src/app/shared/project-summary-card/project-summary-card.component.ts index 35b6fccfb..0d9dc9976 100644 --- a/javascript/apps/taiga/src/app/shared/project-summary-card/project-summary-card.component.ts +++ b/javascript/apps/taiga/src/app/shared/project-summary-card/project-summary-card.component.ts @@ -9,15 +9,16 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { CommonModule } from '@angular/common'; import { type Project } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; + import { TranslocoModule } from '@ngneat/transloco'; import { RouterModule } from '@angular/router'; import { booleanAttribute } from '@angular/core'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; @Component({ selector: 'tg-project-summary-card', standalone: true, - imports: [CommonModule, AvatarModule, TranslocoModule, RouterModule], + imports: [CommonModule, TranslocoModule, RouterModule, AvatarComponent], templateUrl: './project-summary-card.component.html', styleUrls: ['./project-summary-card.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/javascript/apps/taiga/src/app/shared/projects-dropdown/projects-dropdown.component.ts b/javascript/apps/taiga/src/app/shared/projects-dropdown/projects-dropdown.component.ts index abc3290cc..d627ea3eb 100644 --- a/javascript/apps/taiga/src/app/shared/projects-dropdown/projects-dropdown.component.ts +++ b/javascript/apps/taiga/src/app/shared/projects-dropdown/projects-dropdown.component.ts @@ -11,9 +11,10 @@ import { CommonModule } from '@angular/common'; import { Project } from '@taiga/data'; import { DropdownModule } from '../dropdown/dropdown.module'; import { TuiDataListModule, TuiScrollbarModule } from '@taiga-ui/core'; -import { AvatarModule } from '@taiga/ui/avatar'; + import { RouterModule } from '@angular/router'; import { TranslocoModule } from '@ngneat/transloco'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; @Component({ selector: 'tg-projects-dropdown', @@ -23,9 +24,9 @@ import { TranslocoModule } from '@ngneat/transloco'; DropdownModule, TuiDataListModule, TuiScrollbarModule, - AvatarModule, RouterModule, TranslocoModule, + AvatarComponent, ], templateUrl: './projects-dropdown.component.html', styleUrls: ['./projects-dropdown.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/undo/undo.component.ts b/javascript/apps/taiga/src/app/shared/undo/undo.component.ts index d4440a9b0..38987f276 100644 --- a/javascript/apps/taiga/src/app/shared/undo/undo.component.ts +++ b/javascript/apps/taiga/src/app/shared/undo/undo.component.ts @@ -22,7 +22,7 @@ import { import { CommonModule } from '@angular/common'; import { Observable } from 'rxjs'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; -import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module'; + import { animate, state, @@ -32,15 +32,16 @@ import { } from '@angular/animations'; import { TuiButtonModule, TuiLinkModule } from '@taiga-ui/core'; import { TranslocoService } from '@ngneat/transloco'; +import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component'; @Component({ selector: 'tg-undo', standalone: true, imports: [ CommonModule, - ContextNotificationModule, TuiLinkModule, TuiButtonModule, + ContextNotificationComponent, ], templateUrl: './undo.component.html', styleUrls: ['./undo.component.css'], diff --git a/javascript/apps/taiga/src/app/shared/user-avatar/user-avatar.component.ts b/javascript/apps/taiga/src/app/shared/user-avatar/user-avatar.component.ts index 9bd9efd08..067d4f240 100644 --- a/javascript/apps/taiga/src/app/shared/user-avatar/user-avatar.component.ts +++ b/javascript/apps/taiga/src/app/shared/user-avatar/user-avatar.component.ts @@ -16,7 +16,8 @@ import { Store } from '@ngrx/store'; import { RxState } from '@rx-angular/state'; import { TuiSizeXS, TuiSizeXXL } from '@taiga-ui/core'; import { User } from '@taiga/data'; -import { AvatarModule } from '@taiga/ui/avatar'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; + import { filter } from 'rxjs/operators'; import { selectUser } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors'; @@ -31,7 +32,7 @@ interface State { styleUrls: ['./user-avatar.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [RxState], - imports: [CommonModule, AvatarModule], + imports: [CommonModule, AvatarComponent], }) export class UserAvatarComponent implements OnInit { @Input() diff --git a/javascript/apps/taiga/src/test-setup.ts b/javascript/apps/taiga/src/test-setup.ts index 3de16f388..102dde5fa 100644 --- a/javascript/apps/taiga/src/test-setup.ts +++ b/javascript/apps/taiga/src/test-setup.ts @@ -6,8 +6,11 @@ * Copyright (c) 2023-present Kaleidos INC */ +jest.mock('pretty-bytes'); + import 'jest-preset-angular/setup-jest'; import '@testing-library/jest-dom'; +import '@ng-web-apis/universal/mocks'; import { getTestBed } from '@angular/core/testing'; import { diff --git a/javascript/libs/api/src/index.ts b/javascript/libs/api/src/index.ts index a8269920b..6456ca958 100644 --- a/javascript/libs/api/src/index.ts +++ b/javascript/libs/api/src/index.ts @@ -6,8 +6,6 @@ * Copyright (c) 2023-present Kaleidos INC */ -export * from './lib/api.module'; - export * from './lib/shared/api-utils/api-utils.service'; export * from './lib/auth/auth-api.service'; export * from './lib/project/project-api.service'; diff --git a/javascript/libs/api/src/lib/api.module.ts b/javascript/libs/api/src/lib/api.module.ts deleted file mode 100644 index 75e9348a2..000000000 --- a/javascript/libs/api/src/lib/api.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; - -@NgModule({}) -export class ApiModule {} diff --git a/javascript/libs/ui/src/lib/avatar/avatar.component.ts b/javascript/libs/ui/src/lib/avatar/avatar.component.ts index 3bd2adc21..eb122d0ad 100644 --- a/javascript/libs/ui/src/lib/avatar/avatar.component.ts +++ b/javascript/libs/ui/src/lib/avatar/avatar.component.ts @@ -9,12 +9,15 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { TuiSizeXS, TuiSizeXXL } from '@taiga-ui/core'; import { RandomColorService } from '../services/random-color/random-color.service'; +import { TuiAvatarModule } from '@taiga-ui/kit'; @Component({ selector: 'tg-ui-avatar', templateUrl: './avatar.component.html', styleUrls: ['./avatar.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [TuiAvatarModule], }) export class AvatarComponent { @Input() diff --git a/javascript/libs/ui/src/lib/avatar/avatar.module.ts b/javascript/libs/ui/src/lib/avatar/avatar.module.ts deleted file mode 100644 index f1329110f..000000000 --- a/javascript/libs/ui/src/lib/avatar/avatar.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TuiAvatarModule } from '@taiga-ui/kit'; -import { AvatarComponent } from './avatar.component'; - -@NgModule({ - imports: [CommonModule, TuiAvatarModule], - declarations: [AvatarComponent], - exports: [AvatarComponent], -}) -export class AvatarModule {} diff --git a/javascript/libs/ui/src/lib/avatar/index.ts b/javascript/libs/ui/src/lib/avatar/index.ts deleted file mode 100644 index 68a61e1f1..000000000 --- a/javascript/libs/ui/src/lib/avatar/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -export * from './avatar.module'; diff --git a/javascript/libs/ui/src/lib/badge/badge.component.ts b/javascript/libs/ui/src/lib/badge/badge.component.ts index c0563ab73..3d0f2ece3 100644 --- a/javascript/libs/ui/src/lib/badge/badge.component.ts +++ b/javascript/libs/ui/src/lib/badge/badge.component.ts @@ -13,7 +13,8 @@ import { Input, OnInit, } from '@angular/core'; -import { TuiSizeL, TuiSizeM, TuiSizeS } from '@taiga-ui/core'; +import { TuiSizeL, TuiSizeM, TuiSizeS, TuiSvgModule } from '@taiga-ui/core'; +import { NgIf } from '@angular/common'; export type Swatches = | 'primary' @@ -34,6 +35,8 @@ export type Swatches = templateUrl: './badge.component.html', styleUrls: ['./badge.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [NgIf, TuiSvgModule], }) export class BadgeComponent implements OnInit { @Input() diff --git a/javascript/libs/ui/src/lib/badge/badge.module.ts b/javascript/libs/ui/src/lib/badge/badge.module.ts deleted file mode 100644 index f699ba91c..000000000 --- a/javascript/libs/ui/src/lib/badge/badge.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TuiSvgModule } from '@taiga-ui/core'; -import { TuiBadgeModule } from '@taiga-ui/kit'; -import { BadgeComponent } from './badge.component'; - -@NgModule({ - imports: [CommonModule, TuiBadgeModule, TuiSvgModule], - declarations: [BadgeComponent], - providers: [], - exports: [BadgeComponent], -}) -export class BadgeModule {} diff --git a/javascript/libs/ui/src/lib/context-notification/context-notification.component.ts b/javascript/libs/ui/src/lib/context-notification/context-notification.component.ts index 4e1631fc9..80315d5a0 100644 --- a/javascript/libs/ui/src/lib/context-notification/context-notification.component.ts +++ b/javascript/libs/ui/src/lib/context-notification/context-notification.component.ts @@ -21,6 +21,8 @@ import { Input, Output, } from '@angular/core'; +import { TuiSvgModule, TuiButtonModule } from '@taiga-ui/core'; +import { NgIf } from '@angular/common'; type NotificationStatus = 'info' | 'notice' | 'error' | 'success' | 'warning'; type AlertLevel = 'none' | 'polite' | 'important'; @@ -59,6 +61,8 @@ type AlertLevel = 'none' | 'polite' | 'important'; ]), ], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [NgIf, TuiSvgModule, TuiButtonModule], }) export class ContextNotificationComponent { @Input() diff --git a/javascript/libs/ui/src/lib/context-notification/context-notification.module.ts b/javascript/libs/ui/src/lib/context-notification/context-notification.module.ts deleted file mode 100644 index 9cc4a6855..000000000 --- a/javascript/libs/ui/src/lib/context-notification/context-notification.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TuiButtonModule, TuiSvgModule } from '@taiga-ui/core'; -import { ContextNotificationComponent } from './context-notification.component'; - -@NgModule({ - imports: [CommonModule, TuiSvgModule, TuiButtonModule], - declarations: [ContextNotificationComponent], - providers: [], - exports: [ContextNotificationComponent], -}) -export class ContextNotificationModule {} diff --git a/javascript/libs/ui/src/lib/drag/README.md b/javascript/libs/ui/src/lib/drag/README.md index 4abdcb893..86c2c5ea2 100644 --- a/javascript/libs/ui/src/lib/drag/README.md +++ b/javascript/libs/ui/src/lib/drag/README.md @@ -2,14 +2,20 @@ # Usage -Add the module. +Add to the component ```ts -import { DragModule } from '@taiga/ui/drag'; +import { DropZoneDirective } from '@taiga/ui/drag/directives/drop-zone.directive'; +import { DraggableDirective } from '@taiga/ui/drag/directives/draggable.directive'; +import { DragInProgressComponent } from '@taiga/ui/drag/components/drag-in-progress.component'; -@NgModule({ +@Component({ imports: [ - DragModule + DropZoneDirective, + DraggableDirective, + DragInProgressComponent + ] +}) ``` Define where is valid to drop an element. An ID is required to identify different drop zones. diff --git a/javascript/libs/ui/src/lib/drag/components/drag-in-progress.component.ts b/javascript/libs/ui/src/lib/drag/components/drag-in-progress.component.ts index b452427c0..54db2a407 100644 --- a/javascript/libs/ui/src/lib/drag/components/drag-in-progress.component.ts +++ b/javascript/libs/ui/src/lib/drag/components/drag-in-progress.component.ts @@ -16,6 +16,7 @@ import { filter } from 'rxjs'; selector: 'tg-ui-drag-in-progress', templateUrl: './drag-in-progress.component.html', styleUrls: ['./drag-in-progress.component.css'], + standalone: true, }) export class DragInProgressComponent { public get nativeElement() { diff --git a/javascript/libs/ui/src/lib/drag/directives/drag-handle.directive.ts b/javascript/libs/ui/src/lib/drag/directives/drag-handle.directive.ts index 4ed5d0f03..9c84fd4bf 100644 --- a/javascript/libs/ui/src/lib/drag/directives/drag-handle.directive.ts +++ b/javascript/libs/ui/src/lib/drag/directives/drag-handle.directive.ts @@ -11,6 +11,7 @@ import { DraggableDirective } from './draggable.directive'; @Directive({ selector: '[tgUiDragHandle]', + standalone: true, }) export class DragHandleDirective { @HostListener('mousedown.prevent', ['$event']) diff --git a/javascript/libs/ui/src/lib/drag/directives/draggable.directive.ts b/javascript/libs/ui/src/lib/drag/directives/draggable.directive.ts index c97107ded..9306a8e68 100644 --- a/javascript/libs/ui/src/lib/drag/directives/draggable.directive.ts +++ b/javascript/libs/ui/src/lib/drag/directives/draggable.directive.ts @@ -21,6 +21,7 @@ import { DragHandleDirective } from './drag-handle.directive'; @Directive({ selector: '[tgUiDraggable]', + standalone: true, }) export class DraggableDirective implements OnDestroy, Draggable { @Input() diff --git a/javascript/libs/ui/src/lib/drag/directives/drop-zone.directive.ts b/javascript/libs/ui/src/lib/drag/directives/drop-zone.directive.ts index 0949db119..22c47e2b3 100644 --- a/javascript/libs/ui/src/lib/drag/directives/drop-zone.directive.ts +++ b/javascript/libs/ui/src/lib/drag/directives/drop-zone.directive.ts @@ -12,6 +12,7 @@ import { Draggable, DropZone } from '../drag.model'; @Directive({ selector: '[tgUiDropZone]', + standalone: true, }) export class DropZoneDirective implements OnDestroy, DropZone { @Input() diff --git a/javascript/libs/ui/src/lib/drag/drag.module.ts b/javascript/libs/ui/src/lib/drag/drag.module.ts deleted file mode 100644 index 541de73f2..000000000 --- a/javascript/libs/ui/src/lib/drag/drag.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; -import { DragInProgressComponent } from './components/drag-in-progress.component'; -import { DraggableDirective } from './directives/draggable.directive'; -import { DropZoneDirective } from './directives/drop-zone.directive'; -import { DragHandleDirective } from './directives/drag-handle.directive'; -@NgModule({ - declarations: [ - DraggableDirective, - DragInProgressComponent, - DropZoneDirective, - DragHandleDirective, - ], - exports: [ - DraggableDirective, - DragInProgressComponent, - DropZoneDirective, - DragHandleDirective, - ], -}) -export class DragModule {} diff --git a/javascript/libs/ui/src/lib/drag/index.ts b/javascript/libs/ui/src/lib/drag/index.ts index 75d718330..3e131f196 100644 --- a/javascript/libs/ui/src/lib/drag/index.ts +++ b/javascript/libs/ui/src/lib/drag/index.ts @@ -6,7 +6,6 @@ * Copyright (c) 2023-present Kaleidos INC */ -export * from './drag.module'; export * from './services/drag.service'; export * from './services/autoscroll.service'; export * from './drag.model'; diff --git a/javascript/libs/ui/src/lib/dynamic-table/components/cell/table-cell.component.ts b/javascript/libs/ui/src/lib/dynamic-table/components/cell/table-cell.component.ts index 57b74ab52..2c0b238c0 100644 --- a/javascript/libs/ui/src/lib/dynamic-table/components/cell/table-cell.component.ts +++ b/javascript/libs/ui/src/lib/dynamic-table/components/cell/table-cell.component.ts @@ -12,6 +12,7 @@ import { Component, HostBinding } from '@angular/core'; selector: 'tg-ui-dtable-cell', templateUrl: './table-cell.component.html', styleUrls: ['table-cell.component.css'], + standalone: true, }) export class TableCellComponent { @HostBinding('attr.role') public role = 'cell'; diff --git a/javascript/libs/ui/src/lib/dynamic-table/components/header/table-header.component.ts b/javascript/libs/ui/src/lib/dynamic-table/components/header/table-header.component.ts index a9e02b629..6558b0061 100644 --- a/javascript/libs/ui/src/lib/dynamic-table/components/header/table-header.component.ts +++ b/javascript/libs/ui/src/lib/dynamic-table/components/header/table-header.component.ts @@ -12,6 +12,7 @@ import { Component, HostBinding } from '@angular/core'; selector: 'tg-ui-dtable-header', templateUrl: './table-header.component.html', styleUrls: ['table-header.component.css'], + standalone: true, }) export class TableHeaderComponent { @HostBinding('attr.role') public role = 'columnheader'; diff --git a/javascript/libs/ui/src/lib/dynamic-table/components/row/table-row.component.ts b/javascript/libs/ui/src/lib/dynamic-table/components/row/table-row.component.ts index ebd8e3076..32e8b75f1 100644 --- a/javascript/libs/ui/src/lib/dynamic-table/components/row/table-row.component.ts +++ b/javascript/libs/ui/src/lib/dynamic-table/components/row/table-row.component.ts @@ -12,6 +12,7 @@ import { Component, HostBinding } from '@angular/core'; selector: 'tg-ui-dtable-row', templateUrl: './table-row.component.html', styleUrls: ['table-row.component.css'], + standalone: true, }) export class TableRowComponent { @HostBinding('attr.role') public role = 'row'; diff --git a/javascript/libs/ui/src/lib/dynamic-table/components/table/table.component.ts b/javascript/libs/ui/src/lib/dynamic-table/components/table/table.component.ts index 4aef76bd2..df3833859 100644 --- a/javascript/libs/ui/src/lib/dynamic-table/components/table/table.component.ts +++ b/javascript/libs/ui/src/lib/dynamic-table/components/table/table.component.ts @@ -12,6 +12,7 @@ import { Component, HostBinding } from '@angular/core'; selector: 'tg-ui-dtable', templateUrl: './table.component.html', styleUrls: ['./table.component.css'], + standalone: true, }) export class TableComponent { @HostBinding('attr.role') public role = 'table'; diff --git a/javascript/libs/ui/src/lib/dynamic-table/dynamic-table.module.ts b/javascript/libs/ui/src/lib/dynamic-table/dynamic-table.module.ts index 59252d8ed..a132e4399 100644 --- a/javascript/libs/ui/src/lib/dynamic-table/dynamic-table.module.ts +++ b/javascript/libs/ui/src/lib/dynamic-table/dynamic-table.module.ts @@ -14,8 +14,8 @@ import { TableHeaderComponent } from './components/header/table-header.component import { TableRowComponent } from './components/row/table-row.component'; @NgModule({ - imports: [CommonModule], - declarations: [ + imports: [ + CommonModule, TableComponent, TableCellComponent, TableHeaderComponent, diff --git a/javascript/libs/ui/src/lib/inputs/checkbox/checkbox.component.ts b/javascript/libs/ui/src/lib/inputs/checkbox/checkbox.component.ts index 65324fa74..c056e49ec 100644 --- a/javascript/libs/ui/src/lib/inputs/checkbox/checkbox.component.ts +++ b/javascript/libs/ui/src/lib/inputs/checkbox/checkbox.component.ts @@ -18,9 +18,11 @@ import { FormControl, FormGroupDirective, NG_VALUE_ACCESSOR, + ReactiveFormsModule, } from '@angular/forms'; import { FieldService } from '../services/field.service'; import { FormDirective } from '../form/form.directive'; +import { NgIf } from '@angular/common'; let nextId = 0; @@ -37,6 +39,8 @@ let nextId = 0; }, ], exportAs: 'tgCheckbox', + standalone: true, + imports: [ReactiveFormsModule, NgIf], }) export class CheckboxComponent implements AfterContentInit { private fieldService = inject(FieldService); diff --git a/javascript/libs/ui/src/lib/inputs/error/error.component.ts b/javascript/libs/ui/src/lib/inputs/error/error.component.ts index 56dc60341..587127807 100644 --- a/javascript/libs/ui/src/lib/inputs/error/error.component.ts +++ b/javascript/libs/ui/src/lib/inputs/error/error.component.ts @@ -9,11 +9,15 @@ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; import { FieldService } from '../services/field.service'; import { FormDirective } from '../form/form.directive'; +import { TuiSvgModule } from '@taiga-ui/core'; +import { NgIf } from '@angular/common'; @Component({ selector: 'tg-ui-error', templateUrl: './error.component.html', styleUrls: ['./error.component.css'], + standalone: true, + imports: [NgIf, TuiSvgModule], }) export class ErrorComponent implements OnChanges { @Input() diff --git a/javascript/libs/ui/src/lib/inputs/error/error.module.ts b/javascript/libs/ui/src/lib/inputs/error/error.module.ts deleted file mode 100644 index 568880099..000000000 --- a/javascript/libs/ui/src/lib/inputs/error/error.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TuiSvgModule } from '@taiga-ui/core'; -import { ErrorComponent } from './error.component'; - -@NgModule({ - imports: [CommonModule, TuiSvgModule], - declarations: [ErrorComponent], - exports: [ErrorComponent], -}) -export class UiErrorModule {} diff --git a/javascript/libs/ui/src/lib/inputs/form/form.directive.ts b/javascript/libs/ui/src/lib/inputs/form/form.directive.ts index 4a3ae967a..dd77ea8af 100644 --- a/javascript/libs/ui/src/lib/inputs/form/form.directive.ts +++ b/javascript/libs/ui/src/lib/inputs/form/form.directive.ts @@ -11,6 +11,7 @@ import { Directive, ElementRef, HostListener, Input } from '@angular/core'; @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: 'form', + standalone: true, }) export class FormDirective { @Input() diff --git a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.spec.ts b/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.spec.ts index 3f5e3c586..b76b0b836 100644 --- a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.spec.ts +++ b/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.spec.ts @@ -5,7 +5,6 @@ * * Copyright (c) 2023-present Kaleidos INC */ -import '@ng-web-apis/universal/mocks'; import { Spectator, createComponentFactory } from '@ngneat/spectator/jest'; import { ImageUploadComponent } from './image-upload.component'; import { randSentence, randNumber, randWord } from '@ngneat/falso'; @@ -15,7 +14,10 @@ import { FormControl, FormGroupDirective, } from '@angular/forms'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { ErrorComponent } from '../error/error.component'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; +import { TuiButtonComponent } from '@taiga-ui/core'; describe('ImageUploadComponent', () => { let spectator: Spectator; @@ -23,8 +25,19 @@ describe('ImageUploadComponent', () => { const createComponent = createComponentFactory({ component: ImageUploadComponent, imports: [getTranslocoModule()], - schemas: [NO_ERRORS_SCHEMA], - providers: [{ provide: ControlContainer, useValue: fgd }], + overrideComponents: [ + [ + ImageUploadComponent, + { + remove: { + imports: [ErrorComponent, AvatarComponent, TuiButtonComponent], + }, + add: { + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }, + }, + ], + ], }); beforeEach(() => { @@ -35,7 +48,7 @@ describe('ImageUploadComponent', () => { title: randSentence(), color: randNumber(), }, - providers: [], + providers: [{ provide: ControlContainer, useValue: fgd }], detectChanges: false, }); }); diff --git a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.ts b/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.ts index 065d880c6..f4dd19bb2 100644 --- a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.ts +++ b/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.component.ts @@ -23,9 +23,13 @@ import { FormGroupDirective, } from '@angular/forms'; import { DomSanitizer } from '@angular/platform-browser'; -import { TRANSLOCO_SCOPE } from '@ngneat/transloco'; +import { TRANSLOCO_SCOPE, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { FieldService } from '../services/field.service'; +import { ErrorComponent } from '../error/error.component'; +import { CommonModule } from '@angular/common'; +import { TuiButtonModule } from '@taiga-ui/core'; +import { AvatarComponent } from '@taiga/ui/avatar/avatar.component'; let nextId = 0; @@ -44,6 +48,14 @@ let nextId = 0; }, FieldService, ], + standalone: true, + imports: [ + TranslocoDirective, + AvatarComponent, + TuiButtonModule, + CommonModule, + ErrorComponent, + ], }) export class ImageUploadComponent implements OnChanges { @Input() public label = ''; diff --git a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.module.ts b/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.module.ts deleted file mode 100644 index 1559a22ce..000000000 --- a/javascript/libs/ui/src/lib/inputs/image-upload/image-upload.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TranslocoModule } from '@ngneat/transloco'; -import { TuiButtonModule } from '@taiga-ui/core'; -import { AvatarModule } from '@taiga/ui/avatar'; -import { UiErrorModule } from '../error/error.module'; -import { ImageUploadComponent } from './image-upload.component'; - -@NgModule({ - imports: [ - CommonModule, - TranslocoModule, - AvatarModule, - TuiButtonModule, - UiErrorModule, - ], - declarations: [ImageUploadComponent], - exports: [ImageUploadComponent], -}) -export class ImageUploadModule {} diff --git a/javascript/libs/ui/src/lib/inputs/input-ref.directive.ts b/javascript/libs/ui/src/lib/inputs/input-ref.directive.ts index 51f479671..06639a8e7 100644 --- a/javascript/libs/ui/src/lib/inputs/input-ref.directive.ts +++ b/javascript/libs/ui/src/lib/inputs/input-ref.directive.ts @@ -12,6 +12,7 @@ import { NgControl, Validators } from '@angular/forms'; @Directive({ // eslint-disable-next-line @angular-eslint/directive-selector selector: '[inputRef]', + standalone: true, }) export class InputRefDirective { constructor( diff --git a/javascript/libs/ui/src/lib/inputs/input/input.component.spec.ts b/javascript/libs/ui/src/lib/inputs/input/input.component.spec.ts index e4ae9fe8f..55677f46e 100644 --- a/javascript/libs/ui/src/lib/inputs/input/input.component.spec.ts +++ b/javascript/libs/ui/src/lib/inputs/input/input.component.spec.ts @@ -6,7 +6,6 @@ * Copyright (c) 2023-present Kaleidos INC */ -import '@ng-web-apis/universal/mocks'; import { createHostFactory } from '@ngneat/spectator/jest'; import { InputComponent } from './input.component'; import { InputsModule } from '../inputs.module'; diff --git a/javascript/libs/ui/src/lib/inputs/input/input.component.ts b/javascript/libs/ui/src/lib/inputs/input/input.component.ts index 11e3e6b4e..ca7b5616d 100644 --- a/javascript/libs/ui/src/lib/inputs/input/input.component.ts +++ b/javascript/libs/ui/src/lib/inputs/input/input.component.ts @@ -21,6 +21,9 @@ import { import { FormDirective } from '../form/form.directive'; import { InputRefDirective } from '../input-ref.directive'; import { FieldService } from '../services/field.service'; +import { TranslocoPipe } from '@ngneat/transloco'; +import { TuiSvgModule, TuiLinkModule } from '@taiga-ui/core'; +import { NgIf } from '@angular/common'; let nextId = 0; @@ -30,6 +33,8 @@ let nextId = 0; styleUrls: ['../inputs.css', './input.component.css'], exportAs: 'tgInput', providers: [FieldService], + standalone: true, + imports: [NgIf, TuiSvgModule, TuiLinkModule, TranslocoPipe], }) export class InputComponent implements AfterContentInit { @Input() diff --git a/javascript/libs/ui/src/lib/inputs/inputs.module.ts b/javascript/libs/ui/src/lib/inputs/inputs.module.ts index c1b6f66fc..96b5c5532 100644 --- a/javascript/libs/ui/src/lib/inputs/inputs.module.ts +++ b/javascript/libs/ui/src/lib/inputs/inputs.module.ts @@ -22,15 +22,16 @@ import { TuiSelectModule, TuiTextAreaModule, } from '@taiga-ui/kit'; -import { UiErrorModule } from './error/error.module'; + import { FormDirective } from './form/form.directive'; import { InputRefDirective } from './input-ref.directive'; import { InputComponent } from './input/input.component'; -import { UiPasswordStrengthModule } from './password-strength/password-strength.module'; import { SelectComponent } from './select/select.component'; import { TextareaComponent } from './textarea/textarea.component'; import { RadioComponent } from './radio/radio.component'; import { CheckboxComponent } from './checkbox/checkbox.component'; +import { ErrorComponent } from './error/error.component'; +import { PasswordStrengthComponent } from './password-strength/password-strength.component'; @NgModule({ imports: [ CommonModule, @@ -43,11 +44,9 @@ import { CheckboxComponent } from './checkbox/checkbox.component'; TuiDataListWrapperModule, TuiTextfieldControllerModule, TuiTextAreaModule, - UiErrorModule, - UiPasswordStrengthModule, + ErrorComponent, + PasswordStrengthComponent, TuiLinkModule, - ], - declarations: [ FormDirective, InputRefDirective, InputComponent, @@ -70,8 +69,8 @@ import { CheckboxComponent } from './checkbox/checkbox.component'; TuiDataListWrapperModule, TuiTextfieldControllerModule, TuiTextAreaModule, - UiErrorModule, - UiPasswordStrengthModule, + ErrorComponent, + PasswordStrengthComponent, CheckboxComponent, ], }) diff --git a/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.component.ts b/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.component.ts index 8a26a1554..72322778d 100644 --- a/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.component.ts +++ b/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.component.ts @@ -22,8 +22,11 @@ import { } from 'check-password-strength'; import { Observable, map, startWith } from 'rxjs'; import { AbstractControl, ValidationErrors } from '@angular/forms'; -import { TranslocoService } from '@ngneat/transloco'; +import { TranslocoService, TranslocoDirective } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { RxLet } from '@rx-angular/template/let'; +import { TuiSvgModule } from '@taiga-ui/core'; +import { NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common'; @UntilDestroy() @Component({ @@ -31,6 +34,16 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; templateUrl: './password-strength.component.html', styleUrls: ['./password-strength.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + TranslocoDirective, + NgIf, + TuiSvgModule, + RxLet, + NgSwitch, + NgSwitchCase, + NgSwitchDefault, + ], }) export class PasswordStrengthComponent implements AfterViewInit { public static symbols = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'; diff --git a/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.module.ts b/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.module.ts deleted file mode 100644 index ffa1a046f..000000000 --- a/javascript/libs/ui/src/lib/inputs/password-strength/password-strength.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { PasswordStrengthComponent } from './password-strength.component'; -import { RxLet } from '@rx-angular/template/let'; -import { TranslocoModule } from '@ngneat/transloco'; -import { TuiSvgModule } from '@taiga-ui/core'; - -@NgModule({ - imports: [CommonModule, RxLet, TranslocoModule, TuiSvgModule], - declarations: [PasswordStrengthComponent], - exports: [PasswordStrengthComponent], -}) -export class UiPasswordStrengthModule {} diff --git a/javascript/libs/ui/src/lib/inputs/radio/radio.component.ts b/javascript/libs/ui/src/lib/inputs/radio/radio.component.ts index 9d0886b0b..33d176845 100644 --- a/javascript/libs/ui/src/lib/inputs/radio/radio.component.ts +++ b/javascript/libs/ui/src/lib/inputs/radio/radio.component.ts @@ -7,12 +7,15 @@ */ import { Component, Input } from '@angular/core'; -import { FormControl } from '@angular/forms'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { NgIf } from '@angular/common'; @Component({ selector: 'tg-ui-radio', templateUrl: './radio.component.html', styleUrls: ['../inputs.css', './radio.component.css'], + standalone: true, + imports: [ReactiveFormsModule, NgIf], }) export class RadioComponent { @Input({ required: true }) diff --git a/javascript/libs/ui/src/lib/inputs/select/select.component.ts b/javascript/libs/ui/src/lib/inputs/select/select.component.ts index 9d4c2dbbd..f5c634454 100644 --- a/javascript/libs/ui/src/lib/inputs/select/select.component.ts +++ b/javascript/libs/ui/src/lib/inputs/select/select.component.ts @@ -25,6 +25,7 @@ import { import { TuiSelectComponent } from '@taiga-ui/kit'; import { FormDirective } from '../form/form.directive'; import { FieldService } from '../services/field.service'; +import { NgIf, NgClass } from '@angular/common'; let nextId = 0; @@ -51,6 +52,8 @@ let nextId = 0; }, }, ], + standalone: true, + imports: [NgIf, NgClass], }) export class SelectComponent implements AfterContentInit { @Input() diff --git a/javascript/libs/ui/src/lib/inputs/textarea/textarea.component.ts b/javascript/libs/ui/src/lib/inputs/textarea/textarea.component.ts index 746838c84..35330bcff 100644 --- a/javascript/libs/ui/src/lib/inputs/textarea/textarea.component.ts +++ b/javascript/libs/ui/src/lib/inputs/textarea/textarea.component.ts @@ -23,6 +23,7 @@ import { TUI_TEXTFIELD_LABEL_OUTSIDE } from '@taiga-ui/core'; import { TuiTextAreaComponent } from '@taiga-ui/kit'; import { FormDirective } from '../form/form.directive'; import { FieldService } from '../services/field.service'; +import { NgIf } from '@angular/common'; let nextId = 0; @@ -39,6 +40,8 @@ let nextId = 0; }, }, ], + standalone: true, + imports: [NgIf], }) export class TextareaComponent implements AfterContentInit { @Input() diff --git a/javascript/libs/ui/src/lib/modal/components/modal/modal.component.ts b/javascript/libs/ui/src/lib/modal/components/modal/modal.component.ts index 045300e96..1fa1646ef 100644 --- a/javascript/libs/ui/src/lib/modal/components/modal/modal.component.ts +++ b/javascript/libs/ui/src/lib/modal/components/modal/modal.component.ts @@ -19,7 +19,7 @@ import { ViewChild, } from '@angular/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TuiDialogService } from '@taiga-ui/core'; +import { TuiDialogService, TuiButtonModule } from '@taiga-ui/core'; import { ShortcutsService } from '@taiga/core'; import { ModalService } from '@taiga/ui/modal/services/modal.service'; import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus'; @@ -27,6 +27,10 @@ import { BehaviorSubject, Subscription } from 'rxjs'; import { pairwise, startWith } from 'rxjs/operators'; import { v4 } from 'uuid'; +import { CommonModule } from '@angular/common'; +import { TranslocoDirective } from '@ngneat/transloco'; +import { TooltipDirective } from '@taiga/ui/tooltip'; + /* Usage example: (false); diff --git a/javascript/libs/ui/src/lib/modal/components/wrapper/modal-wrapper.component.ts b/javascript/libs/ui/src/lib/modal/components/wrapper/modal-wrapper.component.ts index 2192f2afb..e93c104de 100644 --- a/javascript/libs/ui/src/lib/modal/components/wrapper/modal-wrapper.component.ts +++ b/javascript/libs/ui/src/lib/modal/components/wrapper/modal-wrapper.component.ts @@ -9,7 +9,10 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; import { TuiDialog } from '@taiga-ui/cdk'; import { ModalService } from '@taiga/ui/modal/services/modal.service'; -import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus'; +import { + POLYMORPHEUS_CONTEXT, + PolymorpheusModule, +} from '@tinkoff/ng-polymorpheus'; @Component({ selector: 'tg-ui-modal-wrapper', @@ -19,6 +22,8 @@ import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus'; `, styleUrls: ['./modal-wrapper.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [PolymorpheusModule], }) export class ModalWrapperComponent { constructor( diff --git a/javascript/libs/ui/src/lib/modal/modal.module.ts b/javascript/libs/ui/src/lib/modal/modal.module.ts deleted file mode 100644 index d8c42408b..000000000 --- a/javascript/libs/ui/src/lib/modal/modal.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TranslocoModule } from '@ngneat/transloco'; -import { TuiButtonModule } from '@taiga-ui/core'; -import { ToolTipModule } from '@taiga/ui/tooltip'; -import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus'; -import { ModalComponent } from './components/modal/modal.component'; -import { ModalWrapperComponent } from './components/wrapper/modal-wrapper.component'; - -@NgModule({ - imports: [ - CommonModule, - TuiButtonModule, - ToolTipModule, - TranslocoModule, - PolymorpheusModule, - ], - declarations: [ModalComponent, ModalWrapperComponent], - exports: [ModalComponent, ModalWrapperComponent], -}) -export class ModalModule {} diff --git a/javascript/libs/ui/src/lib/skeletons/card-skeleton/card-skeleton.component.ts b/javascript/libs/ui/src/lib/skeletons/card-skeleton/card-skeleton.component.ts index 4984c9c83..5c3e21b3c 100644 --- a/javascript/libs/ui/src/lib/skeletons/card-skeleton/card-skeleton.component.ts +++ b/javascript/libs/ui/src/lib/skeletons/card-skeleton/card-skeleton.component.ts @@ -13,5 +13,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; templateUrl: './card-skeleton.component.html', styleUrls: ['./card-skeleton.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, }) export class CardSkeletonComponent {} diff --git a/javascript/libs/ui/src/lib/skeletons/skeletons.module.ts b/javascript/libs/ui/src/lib/skeletons/skeletons.module.ts deleted file mode 100644 index 0f5491ef3..000000000 --- a/javascript/libs/ui/src/lib/skeletons/skeletons.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { OverlayModule } from '@angular/cdk/overlay'; -import { CardSkeletonComponent } from './card-skeleton/card-skeleton.component'; -import { UserSkeletonComponent } from './user-skeleton/user-skeleton.component'; - -@NgModule({ - imports: [CommonModule, OverlayModule], - declarations: [CardSkeletonComponent, UserSkeletonComponent], - exports: [CardSkeletonComponent, UserSkeletonComponent], -}) -export class SkeletonsModule {} diff --git a/javascript/libs/ui/src/lib/skeletons/user-skeleton/user-skeleton.component.ts b/javascript/libs/ui/src/lib/skeletons/user-skeleton/user-skeleton.component.ts index 1d4c1a860..818101171 100644 --- a/javascript/libs/ui/src/lib/skeletons/user-skeleton/user-skeleton.component.ts +++ b/javascript/libs/ui/src/lib/skeletons/user-skeleton/user-skeleton.component.ts @@ -13,5 +13,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; templateUrl: './user-skeleton.component.html', styleUrls: ['./user-skeleton.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, }) export class UserSkeletonComponent {} diff --git a/javascript/libs/ui/src/lib/tooltip/index.ts b/javascript/libs/ui/src/lib/tooltip/index.ts index aa593f445..2ce1cb72e 100644 --- a/javascript/libs/ui/src/lib/tooltip/index.ts +++ b/javascript/libs/ui/src/lib/tooltip/index.ts @@ -6,4 +6,4 @@ * Copyright (c) 2023-present Kaleidos INC */ -export { TooltipModule as ToolTipModule } from './tooltip.module'; +export { TooltipDirective } from './tooltip.directive'; diff --git a/javascript/libs/ui/src/lib/tooltip/tooltip.component.ts b/javascript/libs/ui/src/lib/tooltip/tooltip.component.ts index a01f90f5b..e75a0b85e 100644 --- a/javascript/libs/ui/src/lib/tooltip/tooltip.component.ts +++ b/javascript/libs/ui/src/lib/tooltip/tooltip.component.ts @@ -17,6 +17,7 @@ import { TemplateRef, } from '@angular/core'; import { TooltipPosition } from './tooltip-position.model'; + @Component({ selector: 'tg-ui-tooltip', template: ` diff --git a/javascript/libs/ui/src/lib/tooltip/tooltip.md b/javascript/libs/ui/src/lib/tooltip/tooltip.md index c546a5e04..a06e59d4a 100644 --- a/javascript/libs/ui/src/lib/tooltip/tooltip.md +++ b/javascript/libs/ui/src/lib/tooltip/tooltip.md @@ -12,10 +12,10 @@ ## Installation -To use the `tgUiTooltip` module, you need to import it into your module/component: +To use the `tgUiTooltip`, you need to import it into your module/component: ```javascript -import { ToolTipModule } from '@taiga/ui/tooltip'; +import { TooltipDirective } from '@taiga/ui/tooltip'; ``` ## Usage diff --git a/javascript/libs/ui/src/lib/tooltip/tooltip.module.ts b/javascript/libs/ui/src/lib/tooltip/tooltip.module.ts deleted file mode 100644 index a88e2db7b..000000000 --- a/javascript/libs/ui/src/lib/tooltip/tooltip.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright (c) 2023-present Kaleidos INC - */ - -import { OverlayModule } from '@angular/cdk/overlay'; -import { TooltipDirective } from './tooltip.directive'; -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@NgModule({ - imports: [CommonModule, TooltipDirective, OverlayModule], - exports: [TooltipDirective], -}) -export class TooltipModule {} diff --git a/javascript/libs/ui/src/test-setup.ts b/javascript/libs/ui/src/test-setup.ts index 7acef5356..086066065 100644 --- a/javascript/libs/ui/src/test-setup.ts +++ b/javascript/libs/ui/src/test-setup.ts @@ -14,6 +14,8 @@ import { platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; +import '@ng-web-apis/universal/mocks'; + getTestBed().resetTestEnvironment(); getTestBed().initTestEnvironment( BrowserDynamicTestingModule,