From 55b8a74d888485dc57eb8c38c1e2738fdfbbf28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 16 Jul 2024 16:20:33 +0200 Subject: [PATCH] MOBILE-4616 chore: Make deprecated components standalone --- src/core/components/components.module.ts | 5 ----- src/core/components/style/style.ts | 7 ++++++- .../features/course/components/components.module.ts | 10 ---------- .../module-description/module-description.ts | 5 +++++ .../module-manual-completion.ts | 5 +++++ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/core/components/components.module.ts b/src/core/components/components.module.ts index 23b32cf00..dcc352b09 100644 --- a/src/core/components/components.module.ts +++ b/src/core/components/components.module.ts @@ -48,7 +48,6 @@ import { CoreSendMessageFormComponent } from './send-message-form/send-message-f import { CoreShowPasswordComponent } from './show-password/show-password'; import { CoreSitePickerComponent } from './site-picker/site-picker'; import { CoreSplitViewComponent } from './split-view/split-view'; -import { CoreStyleComponent } from './style/style'; import { CoreTabComponent } from './tabs/tab'; import { CoreTabsComponent } from './tabs/tabs'; import { CoreTabsOutletComponent } from './tabs-outlet/tabs-outlet'; @@ -100,8 +99,6 @@ import { CoreSitesListComponent } from './sites-list/sites-list'; CoreShowPasswordComponent, // eslint-disable-line deprecation/deprecation CoreSitePickerComponent, CoreSplitViewComponent, - // eslint-disable-next-line deprecation/deprecation - CoreStyleComponent, CoreSwipeSlidesComponent, CoreTabComponent, CoreTabsComponent, @@ -156,8 +153,6 @@ import { CoreSitesListComponent } from './sites-list/sites-list'; CoreShowPasswordComponent, // eslint-disable-line deprecation/deprecation CoreSitePickerComponent, CoreSplitViewComponent, - // eslint-disable-next-line deprecation/deprecation - CoreStyleComponent, CoreSwipeSlidesComponent, CoreTabComponent, CoreTabsComponent, diff --git a/src/core/components/style/style.ts b/src/core/components/style/style.ts index f06a1450f..b49ab3cea 100644 --- a/src/core/components/style/style.ts +++ b/src/core/components/style/style.ts @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CoreSharedModule } from '@/core/shared.module'; import { Component, ElementRef, Input, OnChanges } from '@angular/core'; import { CoreDom } from '@singletons/dom'; @@ -24,11 +25,15 @@ import { CoreDom } from '@singletons/dom'; * Example: * * - * @deprecated since 4.5.0. Not needed anymore, core-compile-html accepts now CSS code. + * @deprecated since 4.5. Not needed anymore, core-compile-html accepts now CSS code. */ @Component({ selector: 'core-style', template: '', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class CoreStyleComponent implements OnChanges { diff --git a/src/core/features/course/components/components.module.ts b/src/core/features/course/components/components.module.ts index b94aeef38..a9d757fa5 100644 --- a/src/core/features/course/components/components.module.ts +++ b/src/core/features/course/components/components.module.ts @@ -19,13 +19,11 @@ import { CoreBlockComponentsModule } from '@features/block/components/components import { CoreCourseFormatComponent } from './course-format/course-format'; import { CoreCourseModuleComponent } from './module/module'; import { CoreCourseModuleCompletionComponent } from './module-completion/module-completion'; -import { CoreCourseModuleDescriptionComponent } from './module-description/module-description'; import { CoreCourseCourseIndexComponent } from './course-index/course-index'; import { CoreCourseTagAreaComponent } from './tag-area/tag-area'; import { CoreCourseUnsupportedModuleComponent } from './unsupported-module/unsupported-module'; import { CoreCourseModuleCompletionLegacyComponent } from './module-completion-legacy/module-completion-legacy'; import { CoreCourseModuleInfoComponent } from './module-info/module-info'; -import { CoreCourseModuleManualCompletionComponent } from './module-manual-completion/module-manual-completion'; import { CoreCourseModuleNavigationComponent } from './module-navigation/module-navigation'; import { CoreCourseModuleSummaryComponent } from './module-summary/module-summary'; import { CoreCourseCourseIndexTourComponent } from './course-index-tour/course-index-tour'; @@ -38,11 +36,7 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion- CoreCourseModuleComponent, CoreCourseModuleCompletionComponent, CoreCourseModuleCompletionLegacyComponent, - // eslint-disable-next-line deprecation/deprecation - CoreCourseModuleDescriptionComponent, CoreCourseModuleInfoComponent, - // eslint-disable-next-line deprecation/deprecation - CoreCourseModuleManualCompletionComponent, CoreCourseCourseIndexComponent, CoreCourseCourseIndexTourComponent, CoreCourseTagAreaComponent, @@ -61,11 +55,7 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion- CoreCourseModuleComponent, CoreCourseModuleCompletionComponent, CoreCourseModuleCompletionLegacyComponent, - // eslint-disable-next-line deprecation/deprecation - CoreCourseModuleDescriptionComponent, CoreCourseModuleInfoComponent, - // eslint-disable-next-line deprecation/deprecation - CoreCourseModuleManualCompletionComponent, CoreCourseCourseIndexComponent, CoreCourseCourseIndexTourComponent, CoreCourseTagAreaComponent, diff --git a/src/core/features/course/components/module-description/module-description.ts b/src/core/features/course/components/module-description/module-description.ts index 738e89f9d..f55b42cb8 100644 --- a/src/core/features/course/components/module-description/module-description.ts +++ b/src/core/features/course/components/module-description/module-description.ts @@ -13,6 +13,7 @@ // limitations under the License. import { ContextLevel } from '@/core/constants'; +import { CoreSharedModule } from '@/core/shared.module'; import { Component, HostBinding, Input } from '@angular/core'; /** @@ -37,6 +38,10 @@ import { Component, HostBinding, Input } from '@angular/core'; @Component({ selector: 'core-course-module-description', templateUrl: 'core-course-module-description.html', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class CoreCourseModuleDescriptionComponent { diff --git a/src/core/features/course/components/module-manual-completion/module-manual-completion.ts b/src/core/features/course/components/module-manual-completion/module-manual-completion.ts index c59624f9a..857ac368a 100644 --- a/src/core/features/course/components/module-manual-completion/module-manual-completion.ts +++ b/src/core/features/course/components/module-manual-completion/module-manual-completion.ts @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CoreSharedModule } from '@/core/shared.module'; import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChange } from '@angular/core'; import { CoreCourseHelper, CoreCourseModuleCompletionData } from '@features/course/services/course-helper'; import { CoreUser } from '@features/user/services/user'; @@ -26,6 +27,10 @@ import { CoreEventObserver, CoreEvents } from '@singletons/events'; @Component({ selector: 'core-course-module-manual-completion', templateUrl: 'core-course-module-manual-completion.html', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class CoreCourseModuleManualCompletionComponent implements OnInit, OnChanges, OnDestroy {