From beb90472fc5ce20208a86ff4a4d089088fb28dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 18 Jul 2024 12:08:08 +0200 Subject: [PATCH] MOBILE-4616 chore: Migrate to standalone the ones with unused modules --- .../activitymodules/activitymodules.ts | 7 +++- .../components/components.module.ts | 29 ---------------- .../activityresults/activityresults.ts | 7 +++- .../components/components.module.ts | 28 ---------------- .../block/badges/components/badges/badges.ts | 7 +++- .../badges/components/components.module.ts | 28 ---------------- .../blogmenu/components/blogmenu/blogmenu.ts | 7 +++- .../blogmenu/components/components.module.ts | 28 ---------------- .../components/blogrecent/blogrecent.ts | 7 +++- .../components/components.module.ts | 28 ---------------- .../blogtags/components/blogtags/blogtags.ts | 7 +++- .../blogtags/components/components.module.ts | 28 ---------------- .../components/components.module.ts | 30 ----------------- .../components/myoverview/myoverview.ts | 9 ++++- .../newsitems/components/components.module.ts | 28 ---------------- .../components/newsitems/newsitems.ts | 7 +++- .../components/components.module.ts | 28 ---------------- .../components/onlineusers/onlineusers.ts | 7 +++- .../components/components.module.ts | 28 ---------------- .../recentactivity/recentactivity.ts | 7 +++- .../components/components.module.ts | 31 ----------------- .../recentlyaccessedcourses.ts | 7 ++++ .../components/components.module.ts | 31 ----------------- .../recentlyaccesseditems.ts | 7 +++- .../rssclient/components/components.module.ts | 28 ---------------- .../components/rssclient/rssclient.ts | 7 +++- .../components/components.module.ts | 31 ----------------- .../components/sitemainmenu/sitemainmenu.ts | 7 ++++ .../components/components.module.ts | 31 ----------------- .../starredcourses/starredcourses.ts | 7 ++++ .../tags/components/components.module.ts | 28 ---------------- src/addons/block/tags/components/tags/tags.ts | 7 +++- .../timeline/components/components.module.ts | 33 ------------------- .../timeline/components/events/events.ts | 7 +++- .../timeline/components/timeline/timeline.ts | 11 ++++++- 35 files changed, 117 insertions(+), 511 deletions(-) delete mode 100644 src/addons/block/activitymodules/components/components.module.ts delete mode 100644 src/addons/block/activityresults/components/components.module.ts delete mode 100644 src/addons/block/badges/components/components.module.ts delete mode 100644 src/addons/block/blogmenu/components/components.module.ts delete mode 100644 src/addons/block/blogrecent/components/components.module.ts delete mode 100644 src/addons/block/blogtags/components/components.module.ts delete mode 100644 src/addons/block/myoverview/components/components.module.ts delete mode 100644 src/addons/block/newsitems/components/components.module.ts delete mode 100644 src/addons/block/onlineusers/components/components.module.ts delete mode 100644 src/addons/block/recentactivity/components/components.module.ts delete mode 100644 src/addons/block/recentlyaccessedcourses/components/components.module.ts delete mode 100644 src/addons/block/recentlyaccesseditems/components/components.module.ts delete mode 100644 src/addons/block/rssclient/components/components.module.ts delete mode 100644 src/addons/block/sitemainmenu/components/components.module.ts delete mode 100644 src/addons/block/starredcourses/components/components.module.ts delete mode 100644 src/addons/block/tags/components/components.module.ts delete mode 100644 src/addons/block/timeline/components/components.module.ts diff --git a/src/addons/block/activitymodules/components/activitymodules/activitymodules.ts b/src/addons/block/activitymodules/components/activitymodules/activitymodules.ts index 009851c5b..6bd07f093 100644 --- a/src/addons/block/activitymodules/components/activitymodules/activitymodules.ts +++ b/src/addons/block/activitymodules/components/activitymodules/activitymodules.ts @@ -23,6 +23,7 @@ import { CoreUtils } from '@services/utils/utils'; import { CoreNavigator } from '@services/navigator'; import { CoreCourseHelper } from '@features/course/services/course-helper'; import { CoreUrlUtils } from '@services/utils/url'; +import { CoreSharedModule } from '@/core/shared.module'; /** * Component to render an "activity modules" block. @@ -30,7 +31,11 @@ import { CoreUrlUtils } from '@services/utils/url'; @Component({ selector: 'addon-block-activitymodules', templateUrl: 'addon-block-activitymodules.html', - styleUrls: ['activitymodules.scss'], + styleUrl: 'activitymodules.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockActivityModulesComponent extends CoreBlockBaseComponent implements OnInit { diff --git a/src/addons/block/activitymodules/components/components.module.ts b/src/addons/block/activitymodules/components/components.module.ts deleted file mode 100644 index 5f9ba9269..000000000 --- a/src/addons/block/activitymodules/components/components.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; - -import { AddonBlockActivityModulesComponent } from './activitymodules/activitymodules'; - -@NgModule({ - declarations: [ - AddonBlockActivityModulesComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockActivityModulesComponentsModule {} diff --git a/src/addons/block/activityresults/components/activityresults/activityresults.ts b/src/addons/block/activityresults/components/activityresults/activityresults.ts index aaa609e3f..47e8f100a 100644 --- a/src/addons/block/activityresults/components/activityresults/activityresults.ts +++ b/src/addons/block/activityresults/components/activityresults/activityresults.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-activity-results', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['activityresults.scss'], + styleUrl: 'activityresults.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockActivityResultsComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/activityresults/components/components.module.ts b/src/addons/block/activityresults/components/components.module.ts deleted file mode 100644 index d088bd579..000000000 --- a/src/addons/block/activityresults/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockActivityResultsComponent } from './activityresults/activityresults'; - -@NgModule({ - declarations: [ - AddonBlockActivityResultsComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockActivityResultsComponentsModule {} diff --git a/src/addons/block/badges/components/badges/badges.ts b/src/addons/block/badges/components/badges/badges.ts index 5f7f64a30..3c6b47eac 100644 --- a/src/addons/block/badges/components/badges/badges.ts +++ b/src/addons/block/badges/components/badges/badges.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-badges', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['badges.scss'], + styleUrl: 'badges.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockBadgesComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/badges/components/components.module.ts b/src/addons/block/badges/components/components.module.ts deleted file mode 100644 index 0db4364c0..000000000 --- a/src/addons/block/badges/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockBadgesComponent } from './badges/badges'; - -@NgModule({ - declarations: [ - AddonBlockBadgesComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockBadgesComponentsModule {} diff --git a/src/addons/block/blogmenu/components/blogmenu/blogmenu.ts b/src/addons/block/blogmenu/components/blogmenu/blogmenu.ts index 415c09e87..7aa6ef6b1 100644 --- a/src/addons/block/blogmenu/components/blogmenu/blogmenu.ts +++ b/src/addons/block/blogmenu/components/blogmenu/blogmenu.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-blog-menu', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['blogmenu.scss'], + styleUrl: 'blogmenu.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockBlogMenuComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/blogmenu/components/components.module.ts b/src/addons/block/blogmenu/components/components.module.ts deleted file mode 100644 index f2f48abe3..000000000 --- a/src/addons/block/blogmenu/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockBlogMenuComponent } from './blogmenu/blogmenu'; - -@NgModule({ - declarations: [ - AddonBlockBlogMenuComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockBlogMenuComponentsModule {} diff --git a/src/addons/block/blogrecent/components/blogrecent/blogrecent.ts b/src/addons/block/blogrecent/components/blogrecent/blogrecent.ts index 94715c86a..5316f8d5c 100644 --- a/src/addons/block/blogrecent/components/blogrecent/blogrecent.ts +++ b/src/addons/block/blogrecent/components/blogrecent/blogrecent.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-blog-recent', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['blogrecent.scss'], + styleUrl: 'blogrecent.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockBlogRecentComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/blogrecent/components/components.module.ts b/src/addons/block/blogrecent/components/components.module.ts deleted file mode 100644 index e961e8dde..000000000 --- a/src/addons/block/blogrecent/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockBlogRecentComponent } from './blogrecent/blogrecent'; - -@NgModule({ - declarations: [ - AddonBlockBlogRecentComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockBlogRecentComponentsModule {} diff --git a/src/addons/block/blogtags/components/blogtags/blogtags.ts b/src/addons/block/blogtags/components/blogtags/blogtags.ts index df38a4007..8bbfb00cb 100644 --- a/src/addons/block/blogtags/components/blogtags/blogtags.ts +++ b/src/addons/block/blogtags/components/blogtags/blogtags.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-blog-tags', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['blogtags.scss'], + styleUrl: 'blogtags.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockBlogTagsComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/blogtags/components/components.module.ts b/src/addons/block/blogtags/components/components.module.ts deleted file mode 100644 index f63845b81..000000000 --- a/src/addons/block/blogtags/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockBlogTagsComponent } from './blogtags/blogtags'; - -@NgModule({ - declarations: [ - AddonBlockBlogTagsComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockBlogTagsComponentsModule {} diff --git a/src/addons/block/myoverview/components/components.module.ts b/src/addons/block/myoverview/components/components.module.ts deleted file mode 100644 index 7bfa03f39..000000000 --- a/src/addons/block/myoverview/components/components.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; -import { AddonBlockMyOverviewComponent } from './myoverview/myoverview'; - -@NgModule({ - declarations: [ - AddonBlockMyOverviewComponent, - ], - imports: [ - CoreSharedModule, - CoreCoursesComponentsModule, - ], -}) -export class AddonBlockMyOverviewComponentsModule {} diff --git a/src/addons/block/myoverview/components/myoverview/myoverview.ts b/src/addons/block/myoverview/components/myoverview/myoverview.ts index 53120bdfd..f8fbc1614 100644 --- a/src/addons/block/myoverview/components/myoverview/myoverview.ts +++ b/src/addons/block/myoverview/components/myoverview/myoverview.ts @@ -36,6 +36,8 @@ import { CoreNavigator } from '@services/navigator'; import { PageLoadWatcher } from '@classes/page-load-watcher'; import { PageLoadsManager } from '@classes/page-loads-manager'; import { DownloadStatus } from '@/core/constants'; +import { CoreSharedModule } from '@/core/shared.module'; +import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; const FILTER_PRIORITY: AddonBlockMyOverviewTimeFilters[] = ['all', 'inprogress', 'future', 'past', 'favourite', 'allincludinghidden', 'hidden']; @@ -46,7 +48,12 @@ const FILTER_PRIORITY: AddonBlockMyOverviewTimeFilters[] = @Component({ selector: 'addon-block-myoverview', templateUrl: 'addon-block-myoverview.html', - styleUrls: ['myoverview.scss'], + styleUrl: 'myoverview.scss', + standalone: true, + imports: [ + CoreSharedModule, + CoreCoursesComponentsModule, + ], }) export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy, OnChanges { diff --git a/src/addons/block/newsitems/components/components.module.ts b/src/addons/block/newsitems/components/components.module.ts deleted file mode 100644 index 1a4db480b..000000000 --- a/src/addons/block/newsitems/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockNewsItemsComponent } from './newsitems/newsitems'; - -@NgModule({ - declarations: [ - AddonBlockNewsItemsComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockNewsItemsComponentsModule {} diff --git a/src/addons/block/newsitems/components/newsitems/newsitems.ts b/src/addons/block/newsitems/components/newsitems/newsitems.ts index 749868338..c3fb0d331 100644 --- a/src/addons/block/newsitems/components/newsitems/newsitems.ts +++ b/src/addons/block/newsitems/components/newsitems/newsitems.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-news-items', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['newsitems.scss'], + styleUrl: 'newsitems.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockNewsItemsComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/onlineusers/components/components.module.ts b/src/addons/block/onlineusers/components/components.module.ts deleted file mode 100644 index 92d9a5861..000000000 --- a/src/addons/block/onlineusers/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockOnlineUsersComponent } from './onlineusers/onlineusers'; - -@NgModule({ - declarations: [ - AddonBlockOnlineUsersComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockOnlineUsersComponentsModule {} diff --git a/src/addons/block/onlineusers/components/onlineusers/onlineusers.ts b/src/addons/block/onlineusers/components/onlineusers/onlineusers.ts index 38880fbfd..c39ce8f6b 100644 --- a/src/addons/block/onlineusers/components/onlineusers/onlineusers.ts +++ b/src/addons/block/onlineusers/components/onlineusers/onlineusers.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-online-users', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['onlineusers.scss'], + styleUrl: 'onlineusers.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockOnlineUsersComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/recentactivity/components/components.module.ts b/src/addons/block/recentactivity/components/components.module.ts deleted file mode 100644 index fb37f28c0..000000000 --- a/src/addons/block/recentactivity/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockRecentActivityComponent } from './recentactivity/recentactivity'; - -@NgModule({ - declarations: [ - AddonBlockRecentActivityComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockRecentActivityComponentsModule {} diff --git a/src/addons/block/recentactivity/components/recentactivity/recentactivity.ts b/src/addons/block/recentactivity/components/recentactivity/recentactivity.ts index e13e693dc..22346c981 100644 --- a/src/addons/block/recentactivity/components/recentactivity/recentactivity.ts +++ b/src/addons/block/recentactivity/components/recentactivity/recentactivity.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-recent-activity', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['recentactivity.scss'], + styleUrl: 'recentactivity.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockRecentActivityComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/recentlyaccessedcourses/components/components.module.ts b/src/addons/block/recentlyaccessedcourses/components/components.module.ts deleted file mode 100644 index f2476ec05..000000000 --- a/src/addons/block/recentlyaccessedcourses/components/components.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; - -import { AddonBlockRecentlyAccessedCoursesComponent } from './recentlyaccessedcourses/recentlyaccessedcourses'; - -@NgModule({ - declarations: [ - AddonBlockRecentlyAccessedCoursesComponent, - ], - imports: [ - CoreSharedModule, - CoreCoursesComponentsModule, - ], -}) -export class AddonBlockRecentlyAccessedCoursesComponentsModule {} diff --git a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/recentlyaccessedcourses.ts b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/recentlyaccessedcourses.ts index e45b1b6fe..ff4e94259 100644 --- a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/recentlyaccessedcourses.ts +++ b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/recentlyaccessedcourses.ts @@ -31,6 +31,8 @@ import { AddonCourseCompletion } from '@addons/coursecompletion/services/coursec import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component'; import { CoreUtils } from '@services/utils/utils'; import { CoreSite } from '@classes/sites/site'; +import { CoreSharedModule } from '@/core/shared.module'; +import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; /** * Component to render a recent courses block. @@ -38,6 +40,11 @@ import { CoreSite } from '@classes/sites/site'; @Component({ selector: 'addon-block-recentlyaccessedcourses', templateUrl: 'addon-block-recentlyaccessedcourses.html', + standalone: true, + imports: [ + CoreSharedModule, + CoreCoursesComponentsModule, + ], }) export class AddonBlockRecentlyAccessedCoursesComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy { diff --git a/src/addons/block/recentlyaccesseditems/components/components.module.ts b/src/addons/block/recentlyaccesseditems/components/components.module.ts deleted file mode 100644 index d61f5726e..000000000 --- a/src/addons/block/recentlyaccesseditems/components/components.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; - -import { AddonBlockRecentlyAccessedItemsComponent } from './recentlyaccesseditems/recentlyaccesseditems'; - -@NgModule({ - declarations: [ - AddonBlockRecentlyAccessedItemsComponent, - ], - imports: [ - CoreSharedModule, - CoreCoursesComponentsModule, - ], -}) -export class AddonBlockRecentlyAccessedItemsComponentsModule {} diff --git a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts index 90eb98e6d..8db3fa4a8 100644 --- a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts +++ b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts @@ -22,6 +22,7 @@ import { import { CoreTextUtils } from '@services/utils/text'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; +import { CoreSharedModule } from '@/core/shared.module'; /** * Component to render a recently accessed items block. @@ -29,7 +30,11 @@ import { CoreUtils } from '@services/utils/utils'; @Component({ selector: 'addon-block-recentlyaccesseditems', templateUrl: 'addon-block-recentlyaccesseditems.html', - styleUrls: ['recentlyaccesseditems.scss'], + styleUrl: 'recentlyaccesseditems.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockRecentlyAccessedItemsComponent extends CoreBlockBaseComponent implements OnInit { diff --git a/src/addons/block/rssclient/components/components.module.ts b/src/addons/block/rssclient/components/components.module.ts deleted file mode 100644 index 3482a995b..000000000 --- a/src/addons/block/rssclient/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockRssClientComponent } from './rssclient/rssclient'; - -@NgModule({ - declarations: [ - AddonBlockRssClientComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockRssClientComponentsModule {} diff --git a/src/addons/block/rssclient/components/rssclient/rssclient.ts b/src/addons/block/rssclient/components/rssclient/rssclient.ts index c80610358..86ecae773 100644 --- a/src/addons/block/rssclient/components/rssclient/rssclient.ts +++ b/src/addons/block/rssclient/components/rssclient/rssclient.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-rss-client', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['rssclient.scss'], + styleUrl: 'rssclient.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockRssClientComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/sitemainmenu/components/components.module.ts b/src/addons/block/sitemainmenu/components/components.module.ts deleted file mode 100644 index 6b3371beb..000000000 --- a/src/addons/block/sitemainmenu/components/components.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { CoreCourseComponentsModule } from '@features/course/components/components.module'; - -import { AddonBlockSiteMainMenuComponent } from './sitemainmenu/sitemainmenu'; - -@NgModule({ - declarations: [ - AddonBlockSiteMainMenuComponent, - ], - imports: [ - CoreSharedModule, - CoreCourseComponentsModule, - ], -}) -export class AddonBlockSiteMainMenuComponentsModule {} diff --git a/src/addons/block/sitemainmenu/components/sitemainmenu/sitemainmenu.ts b/src/addons/block/sitemainmenu/components/sitemainmenu/sitemainmenu.ts index 486875273..41569c651 100644 --- a/src/addons/block/sitemainmenu/components/sitemainmenu/sitemainmenu.ts +++ b/src/addons/block/sitemainmenu/components/sitemainmenu/sitemainmenu.ts @@ -19,6 +19,8 @@ import { CoreCourseHelper, CoreCourseSection } from '@features/course/services/c import { CoreSiteHome, FrontPageItemNames } from '@features/sitehome/services/sitehome'; import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate'; import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component'; +import { CoreSharedModule } from '@/core/shared.module'; +import { CoreCourseComponentsModule } from '@features/course/components/components.module'; /** * Component to render a site main menu block. @@ -26,6 +28,11 @@ import { CoreBlockBaseComponent } from '@features/block/classes/base-block-compo @Component({ selector: 'addon-block-sitemainmenu', templateUrl: 'addon-block-sitemainmenu.html', + standalone: true, + imports: [ + CoreSharedModule, + CoreCourseComponentsModule, + ], }) export class AddonBlockSiteMainMenuComponent extends CoreBlockBaseComponent implements OnInit { diff --git a/src/addons/block/starredcourses/components/components.module.ts b/src/addons/block/starredcourses/components/components.module.ts deleted file mode 100644 index 143335439..000000000 --- a/src/addons/block/starredcourses/components/components.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; - -import { AddonBlockStarredCoursesComponent } from './starredcourses/starredcourses'; - -@NgModule({ - declarations: [ - AddonBlockStarredCoursesComponent, - ], - imports: [ - CoreSharedModule, - CoreCoursesComponentsModule, - ], -}) -export class AddonBlockStarredCoursesComponentsModule {} diff --git a/src/addons/block/starredcourses/components/starredcourses/starredcourses.ts b/src/addons/block/starredcourses/components/starredcourses/starredcourses.ts index f33825325..8aab432b1 100644 --- a/src/addons/block/starredcourses/components/starredcourses/starredcourses.ts +++ b/src/addons/block/starredcourses/components/starredcourses/starredcourses.ts @@ -26,6 +26,8 @@ import { CoreBlockBaseComponent } from '@features/block/classes/base-block-compo import { CoreUtils } from '@services/utils/utils'; import { CoreSite } from '@classes/sites/site'; import { AddonBlockStarredCourse, AddonBlockStarredCourses } from '../../services/starredcourses'; +import { CoreSharedModule } from '@/core/shared.module'; +import { CoreCoursesComponentsModule } from '@features/courses/components/components.module'; /** * Component to render a starred courses block. @@ -33,6 +35,11 @@ import { AddonBlockStarredCourse, AddonBlockStarredCourses } from '../../service @Component({ selector: 'addon-block-starredcourses', templateUrl: 'addon-block-starredcourses.html', + standalone: true, + imports: [ + CoreSharedModule, + CoreCoursesComponentsModule, + ], }) export class AddonBlockStarredCoursesComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy { diff --git a/src/addons/block/tags/components/components.module.ts b/src/addons/block/tags/components/components.module.ts deleted file mode 100644 index 74384dffe..000000000 --- a/src/addons/block/tags/components/components.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; -import { AddonBlockTagsComponent } from './tags/tags'; - -@NgModule({ - declarations: [ - AddonBlockTagsComponent, - ], - imports: [ - CoreSharedModule, - ], -}) -export class AddonBlockTagsComponentsModule {} diff --git a/src/addons/block/tags/components/tags/tags.ts b/src/addons/block/tags/components/tags/tags.ts index 9ae0e6c2c..61798e394 100644 --- a/src/addons/block/tags/components/tags/tags.ts +++ b/src/addons/block/tags/components/tags/tags.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 } from '@angular/core'; import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block'; @@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re @Component({ selector: 'addon-block-tags', templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html', - styleUrls: ['tags.scss'], + styleUrl: 'tags.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockTagsComponent extends CoreBlockPreRenderedComponent {} diff --git a/src/addons/block/timeline/components/components.module.ts b/src/addons/block/timeline/components/components.module.ts deleted file mode 100644 index 6a951de0a..000000000 --- a/src/addons/block/timeline/components/components.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -// (C) Copyright 2015 Moodle Pty Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { NgModule } from '@angular/core'; - -import { CoreSharedModule } from '@/core/shared.module'; - -import { AddonBlockTimelineComponent } from './timeline/timeline'; -import { AddonBlockTimelineEventsComponent } from './events/events'; -import { CoreSearchComponentsModule } from '@features/search/components/components.module'; - -@NgModule({ - declarations: [ - AddonBlockTimelineComponent, - AddonBlockTimelineEventsComponent, - ], - imports: [ - CoreSharedModule, - CoreSearchComponentsModule, - ], -}) -export class AddonBlockTimelineComponentsModule {} diff --git a/src/addons/block/timeline/components/events/events.ts b/src/addons/block/timeline/components/events/events.ts index b3bc10d9a..041c22755 100644 --- a/src/addons/block/timeline/components/events/events.ts +++ b/src/addons/block/timeline/components/events/events.ts @@ -18,6 +18,7 @@ import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { CoreEnrolledCourseDataWithOptions } from '@features/courses/services/courses-helper'; import { AddonBlockTimelineDayEvents } from '@addons/block/timeline/classes/section'; +import { CoreSharedModule } from '@/core/shared.module'; /** * Directive to render a list of events in course overview. @@ -25,7 +26,11 @@ import { AddonBlockTimelineDayEvents } from '@addons/block/timeline/classes/sect @Component({ selector: 'addon-block-timeline-events', templateUrl: 'addon-block-timeline-events.html', - styleUrls: ['events.scss'], + styleUrl: 'events.scss', + standalone: true, + imports: [ + CoreSharedModule, + ], }) export class AddonBlockTimelineEventsComponent implements OnInit { diff --git a/src/addons/block/timeline/components/timeline/timeline.ts b/src/addons/block/timeline/components/timeline/timeline.ts index 76e7881c2..9a814c0e3 100644 --- a/src/addons/block/timeline/components/timeline/timeline.ts +++ b/src/addons/block/timeline/components/timeline/timeline.ts @@ -27,6 +27,9 @@ import { AddonBlockTimelineDateRange, AddonBlockTimelineSection } from '@addons/ import { FormControl } from '@angular/forms'; import { formControlValue, resolved } from '@/core/utils/rxjs'; import { CoreLogger } from '@singletons/logger'; +import { CoreSharedModule } from '@/core/shared.module'; +import { CoreSearchComponentsModule } from '@features/search/components/components.module'; +import { AddonBlockTimelineEventsComponent } from '../events/events'; /** * Component to render a timeline block. @@ -34,8 +37,14 @@ import { CoreLogger } from '@singletons/logger'; @Component({ selector: 'addon-block-timeline', templateUrl: 'addon-block-timeline.html', - styleUrls: ['timeline.scss'], + styleUrl: 'timeline.scss', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CoreSharedModule, + CoreSearchComponentsModule, + AddonBlockTimelineEventsComponent, + ], }) export class AddonBlockTimelineComponent implements OnInit, ICoreBlockComponent {