MOBILE-3947 chore: Decouple services from our compiler
parent
a6a31f8e79
commit
3bdb936d58
|
@ -23,11 +23,19 @@ import { AddonBadgesUserHandler } from './services/handlers/user';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
||||||
import { AddonBadgesPushClickHandler } from './services/handlers/push-click';
|
import { AddonBadgesPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonBadgesProvider } from './services/badges';
|
|
||||||
|
|
||||||
export const ADDON_BADGES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get badges services.
|
||||||
|
*
|
||||||
|
* @returns Returns badges services.
|
||||||
|
*/
|
||||||
|
export async function getBadgesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonBadgesProvider } = await import('@addons/badges/services/badges');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonBadgesProvider,
|
AddonBadgesProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuRoutes: Routes = [
|
const mainMenuRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,18 +27,27 @@ import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { CALENDAR_SITE_SCHEMA } from './services/database/calendar';
|
import { CALENDAR_SITE_SCHEMA } from './services/database/calendar';
|
||||||
import { CALENDAR_OFFLINE_SITE_SCHEMA } from './services/database/calendar-offline';
|
import { CALENDAR_OFFLINE_SITE_SCHEMA } from './services/database/calendar-offline';
|
||||||
import { AddonCalendarComponentsModule } from './components/components.module';
|
import { AddonCalendarComponentsModule } from './components/components.module';
|
||||||
import { AddonCalendar, AddonCalendarProvider } from './services/calendar';
|
import { AddonCalendar } from './services/calendar';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { AddonCalendarOfflineProvider } from './services/calendar-offline';
|
|
||||||
import { AddonCalendarHelperProvider } from './services/calendar-helper';
|
|
||||||
import { AddonCalendarSyncProvider } from './services/calendar-sync';
|
|
||||||
|
|
||||||
export const ADDON_CALENDAR_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get calendar services.
|
||||||
|
*
|
||||||
|
* @returns Returns calendar services.
|
||||||
|
*/
|
||||||
|
export async function getCalendarServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonCalendarProvider } = await import('@addons/calendar/services/calendar');
|
||||||
|
const { AddonCalendarOfflineProvider } = await import('@addons/calendar/services/calendar-offline');
|
||||||
|
const { AddonCalendarHelperProvider } = await import('@addons/calendar/services/calendar-helper');
|
||||||
|
const { AddonCalendarSyncProvider } = await import('@addons/calendar/services/calendar-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonCalendarProvider,
|
AddonCalendarProvider,
|
||||||
AddonCalendarOfflineProvider,
|
AddonCalendarOfflineProvider,
|
||||||
AddonCalendarHelperProvider,
|
AddonCalendarHelperProvider,
|
||||||
AddonCalendarSyncProvider,
|
AddonCalendarSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuChildrenRoutes: Routes = [
|
const mainMenuChildrenRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,11 +15,19 @@
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { AddonMessageOutputAirnotifierModule } from './airnotifier/airnotifier.module';
|
import { AddonMessageOutputAirnotifierModule } from './airnotifier/airnotifier.module';
|
||||||
import { AddonMessageOutputDelegateService } from './services/messageoutput-delegate';
|
|
||||||
|
|
||||||
export const ADDON_MESSAGEOUTPUT_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get message output services.
|
||||||
|
*
|
||||||
|
* @returns Returns message output services.
|
||||||
|
*/
|
||||||
|
export async function getMessageOutputServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonMessageOutputDelegateService } = await import('@addons/messageoutput/services/messageoutput-delegate');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonMessageOutputDelegateService,
|
AddonMessageOutputDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -34,17 +34,26 @@ import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
||||||
import { AddonMessagesSendMessageUserHandler } from './services/handlers/user-send-message';
|
import { AddonMessagesSendMessageUserHandler } from './services/handlers/user-send-message';
|
||||||
import { NgZone } from '@singletons';
|
import { NgZone } from '@singletons';
|
||||||
import { CoreNetwork } from '@services/network';
|
import { CoreNetwork } from '@services/network';
|
||||||
import { AddonMessagesSync, AddonMessagesSyncProvider } from './services/messages-sync';
|
import { AddonMessagesSync } from './services/messages-sync';
|
||||||
import { AddonMessagesSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonMessagesSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { CoreSitePreferencesRoutingModule } from '@features/settings/settings-site-routing.module';
|
import { CoreSitePreferencesRoutingModule } from '@features/settings/settings-site-routing.module';
|
||||||
import { AddonMessagesProvider } from './services/messages';
|
|
||||||
import { AddonMessagesOfflineProvider } from './services/messages-offline';
|
|
||||||
|
|
||||||
export const ADDON_MESSAGES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get messages services.
|
||||||
|
*
|
||||||
|
* @returns Returns messages services.
|
||||||
|
*/
|
||||||
|
export async function getMessagesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonMessagesProvider } = await import('@addons/messages/services/messages');
|
||||||
|
const { AddonMessagesOfflineProvider } = await import('@addons/messages/services/messages-offline');
|
||||||
|
const { AddonMessagesSyncProvider } = await import('@addons/messages/services/messages-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonMessagesProvider,
|
AddonMessagesProvider,
|
||||||
AddonMessagesOfflineProvider,
|
AddonMessagesOfflineProvider,
|
||||||
AddonMessagesSyncProvider,
|
AddonMessagesSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuChildrenRoutes: Routes = [
|
const mainMenuChildrenRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,28 +25,37 @@ import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModAssignComponentsModule } from './components/components.module';
|
import { AddonModAssignComponentsModule } from './components/components.module';
|
||||||
import { AddonModAssignFeedbackModule } from './feedback/feedback.module';
|
import { AddonModAssignFeedbackModule } from './feedback/feedback.module';
|
||||||
import { AddonModAssignProvider } from './services/assign';
|
import { AddonModAssignProvider } from './services/assign';
|
||||||
import { AddonModAssignHelperProvider } from './services/assign-helper';
|
|
||||||
import { AddonModAssignOfflineProvider } from './services/assign-offline';
|
|
||||||
import { AddonModAssignSyncProvider } from './services/assign-sync';
|
|
||||||
import { OFFLINE_SITE_SCHEMA } from './services/database/assign';
|
import { OFFLINE_SITE_SCHEMA } from './services/database/assign';
|
||||||
import { AddonModAssignFeedbackDelegateService } from './services/feedback-delegate';
|
|
||||||
import { AddonModAssignIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModAssignIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModAssignListLinkHandler } from './services/handlers/list-link';
|
import { AddonModAssignListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModAssignModuleHandler, AddonModAssignModuleHandlerService } from './services/handlers/module';
|
import { AddonModAssignModuleHandler, AddonModAssignModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModAssignPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModAssignPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModAssignPushClickHandler } from './services/handlers/push-click';
|
import { AddonModAssignPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonModAssignSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModAssignSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModAssignSubmissionDelegateService } from './services/submission-delegate';
|
|
||||||
import { AddonModAssignSubmissionModule } from './submission/submission.module';
|
import { AddonModAssignSubmissionModule } from './submission/submission.module';
|
||||||
|
|
||||||
export const ADDON_MOD_ASSIGN_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod assign services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod assign services.
|
||||||
|
*/
|
||||||
|
export async function getModAssignServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModAssignProvider } = await import('@addons/mod/assign/services/assign');
|
||||||
|
const { AddonModAssignOfflineProvider } = await import('@addons/mod/assign/services/assign-offline');
|
||||||
|
const { AddonModAssignSyncProvider } = await import('@addons/mod/assign/services/assign-sync');
|
||||||
|
const { AddonModAssignHelperProvider } = await import('@addons/mod/assign/services/assign-helper');
|
||||||
|
const { AddonModAssignFeedbackDelegateService } = await import('@addons/mod/assign/services/feedback-delegate');
|
||||||
|
const { AddonModAssignSubmissionDelegateService } = await import('@addons/mod/assign/services/submission-delegate');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModAssignProvider,
|
AddonModAssignProvider,
|
||||||
AddonModAssignOfflineProvider,
|
AddonModAssignOfflineProvider,
|
||||||
AddonModAssignSyncProvider,
|
AddonModAssignSyncProvider,
|
||||||
AddonModAssignHelperProvider,
|
AddonModAssignHelperProvider,
|
||||||
AddonModAssignFeedbackDelegateService,
|
AddonModAssignFeedbackDelegateService,
|
||||||
AddonModAssignSubmissionDelegateService,
|
AddonModAssignSubmissionDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,14 +18,22 @@ import { CoreContentLinksDelegate } from '@features/contentlinks/services/conten
|
||||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
|
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { AddonModBBBComponentsModule } from './components/components.module';
|
import { AddonModBBBComponentsModule } from './components/components.module';
|
||||||
import { AddonModBBBService } from './services/bigbluebuttonbn';
|
|
||||||
import { AddonModBBBIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModBBBIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModBBBListLinkHandler } from './services/handlers/list-link';
|
import { AddonModBBBListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModBBBModuleHandler, ADDON_MOD_BBB_MAIN_MENU_PAGE_NAME } from './services/handlers/module';
|
import { AddonModBBBModuleHandler, ADDON_MOD_BBB_MAIN_MENU_PAGE_NAME } from './services/handlers/module';
|
||||||
|
|
||||||
export const ADDON_MOD_BBB_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod BBB services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod BBB services.
|
||||||
|
*/
|
||||||
|
export async function getModBBBServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModBBBService } = await import('@addons/mod/bigbluebuttonbn/services/bigbluebuttonbn');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModBBBService,
|
AddonModBBBService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,13 +25,21 @@ import { AddonModBookIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModBookListLinkHandler } from './services/handlers/list-link';
|
import { AddonModBookListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModBookPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModBookPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModBookTagAreaHandler } from './services/handlers/tag-area';
|
import { AddonModBookTagAreaHandler } from './services/handlers/tag-area';
|
||||||
import { AddonModBookProvider } from './services/book';
|
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { BOOK_SITE_SCHEMA } from './services/database/book';
|
import { BOOK_SITE_SCHEMA } from './services/database/book';
|
||||||
|
|
||||||
export const ADDON_MOD_BOOK_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod book services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod book services.
|
||||||
|
*/
|
||||||
|
export async function getModBookServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModBookProvider } = await import('@addons/mod/book/services/book');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModBookProvider,
|
AddonModBookProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,16 +21,25 @@ import { CoreCourseModulePrefetchDelegate } from '@features/course/services/modu
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { AddonModChatComponentsModule } from './components/components.module';
|
import { AddonModChatComponentsModule } from './components/components.module';
|
||||||
import { AddonModChatProvider } from './services/chat';
|
import { AddonModChatProvider } from './services/chat';
|
||||||
import { AddonModChatHelperProvider } from './services/chat-helper';
|
|
||||||
import { AddonModChatIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModChatIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModChatListLinkHandler } from './services/handlers/list-link';
|
import { AddonModChatListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModChatModuleHandler, AddonModChatModuleHandlerService } from './services/handlers/module';
|
import { AddonModChatModuleHandler, AddonModChatModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModChatPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModChatPrefetchHandler } from './services/handlers/prefetch';
|
||||||
|
|
||||||
export const ADDON_MOD_CHAT_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod chat services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod chat services.
|
||||||
|
*/
|
||||||
|
export async function getModChatServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModChatProvider } = await import('@addons/mod/chat/services/chat');
|
||||||
|
const { AddonModChatHelperProvider } = await import('@addons/mod/chat/services/chat-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModChatProvider,
|
AddonModChatProvider,
|
||||||
AddonModChatHelperProvider,
|
AddonModChatHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,8 +24,6 @@ import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModChoiceComponentsModule } from './components/components.module';
|
import { AddonModChoiceComponentsModule } from './components/components.module';
|
||||||
import { AddonModChoiceProvider } from './services/choice';
|
import { AddonModChoiceProvider } from './services/choice';
|
||||||
import { AddonModChoiceOfflineProvider } from './services/choice-offline';
|
|
||||||
import { AddonModChoiceSyncProvider } from './services/choice-sync';
|
|
||||||
import { OFFLINE_SITE_SCHEMA } from './services/database/choice';
|
import { OFFLINE_SITE_SCHEMA } from './services/database/choice';
|
||||||
import { AddonModChoiceIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModChoiceIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModChoiceListLinkHandler } from './services/handlers/list-link';
|
import { AddonModChoiceListLinkHandler } from './services/handlers/list-link';
|
||||||
|
@ -33,11 +31,22 @@ import { AddonModChoiceModuleHandler, AddonModChoiceModuleHandlerService } from
|
||||||
import { AddonModChoicePrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModChoicePrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModChoiceSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModChoiceSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
|
|
||||||
export const ADDON_MOD_CHOICE_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod choice services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod choice services.
|
||||||
|
*/
|
||||||
|
export async function getModChoiceServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModChoiceProvider } = await import('@addons/mod/choice/services/choice');
|
||||||
|
const { AddonModChoiceOfflineProvider } = await import('@addons/mod/choice/services/choice-offline');
|
||||||
|
const { AddonModChoiceSyncProvider } = await import('@addons/mod/choice/services/choice-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModChoiceProvider,
|
AddonModChoiceProvider,
|
||||||
AddonModChoiceOfflineProvider,
|
AddonModChoiceOfflineProvider,
|
||||||
AddonModChoiceSyncProvider,
|
AddonModChoiceSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,10 +22,6 @@ import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate';
|
||||||
import { CoreCronDelegate } from '@services/cron';
|
import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModDataProvider } from './services/data';
|
import { AddonModDataProvider } from './services/data';
|
||||||
import { AddonModDataFieldsDelegateService } from './services/data-fields-delegate';
|
|
||||||
import { AddonModDataHelperProvider } from './services/data-helper';
|
|
||||||
import { AddonModDataOfflineProvider } from './services/data-offline';
|
|
||||||
import { AddonModDataSyncProvider } from './services/data-sync';
|
|
||||||
import { ADDON_MOD_DATA_OFFLINE_SITE_SCHEMA } from './services/database/data';
|
import { ADDON_MOD_DATA_OFFLINE_SITE_SCHEMA } from './services/database/data';
|
||||||
import { AddonModDataApproveLinkHandler } from './services/handlers/approve-link';
|
import { AddonModDataApproveLinkHandler } from './services/handlers/approve-link';
|
||||||
import { AddonModDataDeleteLinkHandler } from './services/handlers/delete-link';
|
import { AddonModDataDeleteLinkHandler } from './services/handlers/delete-link';
|
||||||
|
@ -41,14 +37,26 @@ import { AddonModDataFieldModule } from './fields/field.module';
|
||||||
import { AddonModDataComponentsModule } from './components/components.module';
|
import { AddonModDataComponentsModule } from './components/components.module';
|
||||||
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const ADDON_MOD_DATA_SERVICES: Type<unknown>[] = [
|
* Get mod data services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod data services.
|
||||||
|
*/
|
||||||
|
export async function getModDataServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModDataProvider } = await import('@addons/mod/data/services/data');
|
||||||
|
const { AddonModDataOfflineProvider } = await import('@addons/mod/data/services/data-offline');
|
||||||
|
const { AddonModDataSyncProvider } = await import('@addons/mod/data/services/data-sync');
|
||||||
|
const { AddonModDataHelperProvider } = await import('@addons/mod/data/services/data-helper');
|
||||||
|
const { AddonModDataFieldsDelegateService } = await import('@addons/mod/data/services/data-fields-delegate');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModDataProvider,
|
AddonModDataProvider,
|
||||||
AddonModDataHelperProvider,
|
AddonModDataHelperProvider,
|
||||||
AddonModDataSyncProvider,
|
AddonModDataSyncProvider,
|
||||||
AddonModDataOfflineProvider,
|
AddonModDataOfflineProvider,
|
||||||
AddonModDataFieldsDelegateService,
|
AddonModDataFieldsDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,9 +25,6 @@ import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModFeedbackComponentsModule } from './components/components.module';
|
import { AddonModFeedbackComponentsModule } from './components/components.module';
|
||||||
import { OFFLINE_SITE_SCHEMA } from './services/database/feedback';
|
import { OFFLINE_SITE_SCHEMA } from './services/database/feedback';
|
||||||
import { AddonModFeedbackProvider } from './services/feedback';
|
import { AddonModFeedbackProvider } from './services/feedback';
|
||||||
import { AddonModFeedbackHelperProvider } from './services/feedback-helper';
|
|
||||||
import { AddonModFeedbackOfflineProvider } from './services/feedback-offline';
|
|
||||||
import { AddonModFeedbackSyncProvider } from './services/feedback-sync';
|
|
||||||
import { AddonModFeedbackAnalysisLinkHandler } from './services/handlers/analysis-link';
|
import { AddonModFeedbackAnalysisLinkHandler } from './services/handlers/analysis-link';
|
||||||
import { AddonModFeedbackCompleteLinkHandler } from './services/handlers/complete-link';
|
import { AddonModFeedbackCompleteLinkHandler } from './services/handlers/complete-link';
|
||||||
import { AddonModFeedbackIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModFeedbackIndexLinkHandler } from './services/handlers/index-link';
|
||||||
|
@ -40,12 +37,24 @@ import { AddonModFeedbackShowEntriesLinkHandler } from './services/handlers/show
|
||||||
import { AddonModFeedbackShowNonRespondentsLinkHandler } from './services/handlers/show-non-respondents-link';
|
import { AddonModFeedbackShowNonRespondentsLinkHandler } from './services/handlers/show-non-respondents-link';
|
||||||
import { AddonModFeedbackSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModFeedbackSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
|
|
||||||
export const ADDON_MOD_FEEDBACK_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Feedback services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Feedback services.
|
||||||
|
*/
|
||||||
|
export async function getModFeedbackServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModFeedbackProvider } = await import('@addons/mod/feedback/services/feedback');
|
||||||
|
const { AddonModFeedbackOfflineProvider } = await import('@addons/mod/feedback/services/feedback-offline');
|
||||||
|
const { AddonModFeedbackHelperProvider } = await import('@addons/mod/feedback/services/feedback-helper');
|
||||||
|
const { AddonModFeedbackSyncProvider } = await import('@addons/mod/feedback/services/feedback-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModFeedbackProvider,
|
AddonModFeedbackProvider,
|
||||||
AddonModFeedbackOfflineProvider,
|
AddonModFeedbackOfflineProvider,
|
||||||
AddonModFeedbackHelperProvider,
|
AddonModFeedbackHelperProvider,
|
||||||
AddonModFeedbackSyncProvider,
|
AddonModFeedbackSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,18 +20,26 @@ import { CoreCourseModulePrefetchDelegate } from '@features/course/services/modu
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CorePluginFileDelegate } from '@services/plugin-file-delegate';
|
import { CorePluginFileDelegate } from '@services/plugin-file-delegate';
|
||||||
import { AddonModFolderComponentsModule } from './components/components.module';
|
import { AddonModFolderComponentsModule } from './components/components.module';
|
||||||
import { AddonModFolderProvider } from './services/folder';
|
|
||||||
import { AddonModFolderHelperProvider } from './services/folder-helper';
|
|
||||||
import { AddonModFolderIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModFolderIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModFolderListLinkHandler } from './services/handlers/list-link';
|
import { AddonModFolderListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModFolderModuleHandler, AddonModFolderModuleHandlerService } from './services/handlers/module';
|
import { AddonModFolderModuleHandler, AddonModFolderModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModFolderPluginFileHandler } from './services/handlers/pluginfile';
|
import { AddonModFolderPluginFileHandler } from './services/handlers/pluginfile';
|
||||||
import { AddonModFolderPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModFolderPrefetchHandler } from './services/handlers/prefetch';
|
||||||
|
|
||||||
export const ADDON_MOD_FOLDER_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Folder services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Folder services.
|
||||||
|
*/
|
||||||
|
export async function getModFolderServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModFolderProvider } = await import('@addons/mod/folder/services/folder');
|
||||||
|
const { AddonModFolderHelperProvider } = await import('@addons/mod/folder/services/folder-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModFolderProvider,
|
AddonModFolderProvider,
|
||||||
AddonModFolderHelperProvider,
|
AddonModFolderHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,18 +39,27 @@ import { AddonModForumTagAreaHandler } from './services/handlers/tag-area';
|
||||||
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate';
|
||||||
import { AddonModForumPushClickHandler } from './services/handlers/push-click';
|
import { AddonModForumPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonModForumProvider } from './services/forum';
|
import { AddonModForumProvider } from './services/forum';
|
||||||
import { AddonModForumOfflineProvider } from './services/forum-offline';
|
|
||||||
import { AddonModForumHelperProvider } from './services/forum-helper';
|
|
||||||
import { AddonModForumSyncProvider } from './services/forum-sync';
|
|
||||||
import { COURSE_CONTENTS_PATH } from '@features/course/course.module';
|
import { COURSE_CONTENTS_PATH } from '@features/course/course.module';
|
||||||
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
||||||
|
|
||||||
export const ADDON_MOD_FORUM_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Forum services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Forum services.
|
||||||
|
*/
|
||||||
|
export async function getModForumServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModForumProvider } = await import('@addons/mod/forum/services/forum');
|
||||||
|
const { AddonModForumOfflineProvider } = await import('@addons/mod/forum/services/forum-offline');
|
||||||
|
const { AddonModForumHelperProvider } = await import('@addons/mod/forum/services/forum-helper');
|
||||||
|
const { AddonModForumSyncProvider } = await import('@addons/mod/forum/services/forum-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModForumProvider,
|
AddonModForumProvider,
|
||||||
AddonModForumOfflineProvider,
|
AddonModForumOfflineProvider,
|
||||||
AddonModForumHelperProvider,
|
AddonModForumHelperProvider,
|
||||||
AddonModForumSyncProvider,
|
AddonModForumSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export const FORUM_SEARCH_PAGE_NAME = 'forum/search';
|
export const FORUM_SEARCH_PAGE_NAME = 'forum/search';
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@ import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModGlossaryComponentsModule } from './components/components.module';
|
import { AddonModGlossaryComponentsModule } from './components/components.module';
|
||||||
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/glossary';
|
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/glossary';
|
||||||
import { AddonModGlossaryProvider } from './services/glossary';
|
import { AddonModGlossaryProvider } from './services/glossary';
|
||||||
import { AddonModGlossaryHelperProvider } from './services/glossary-helper';
|
|
||||||
import { AddonModGlossaryOfflineProvider } from './services/glossary-offline';
|
|
||||||
import { AddonModGlossarySyncProvider } from './services/glossary-sync';
|
|
||||||
import { AddonModGlossaryEditLinkHandler } from './services/handlers/edit-link';
|
import { AddonModGlossaryEditLinkHandler } from './services/handlers/edit-link';
|
||||||
import { AddonModGlossaryEntryLinkHandler } from './services/handlers/entry-link';
|
import { AddonModGlossaryEntryLinkHandler } from './services/handlers/entry-link';
|
||||||
import { AddonModGlossaryIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModGlossaryIndexLinkHandler } from './services/handlers/index-link';
|
||||||
|
@ -41,12 +38,24 @@ import { AddonModGlossaryPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModGlossarySyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModGlossarySyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModGlossaryTagAreaHandler } from './services/handlers/tag-area';
|
import { AddonModGlossaryTagAreaHandler } from './services/handlers/tag-area';
|
||||||
|
|
||||||
export const ADDON_MOD_GLOSSARY_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Glossary services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Glossary services.
|
||||||
|
*/
|
||||||
|
export async function getModGlossaryServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModGlossaryProvider } = await import('@addons/mod/glossary/services/glossary');
|
||||||
|
const { AddonModGlossaryOfflineProvider } = await import('@addons/mod/glossary/services/glossary-offline');
|
||||||
|
const { AddonModGlossarySyncProvider } = await import('@addons/mod/glossary/services/glossary-sync');
|
||||||
|
const { AddonModGlossaryHelperProvider } = await import('@addons/mod/glossary/services/glossary-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModGlossaryProvider,
|
AddonModGlossaryProvider,
|
||||||
AddonModGlossaryOfflineProvider,
|
AddonModGlossaryOfflineProvider,
|
||||||
AddonModGlossarySyncProvider,
|
AddonModGlossarySyncProvider,
|
||||||
AddonModGlossaryHelperProvider,
|
AddonModGlossaryHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuRoutes: Routes = [
|
const mainMenuRoutes: Routes = [
|
||||||
// Link handlers navigation.
|
// Link handlers navigation.
|
||||||
|
|
|
@ -20,19 +20,26 @@ import { CoreCourseModulePrefetchDelegate } from '@features/course/services/modu
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CoreCronDelegate } from '@services/cron';
|
import { CoreCronDelegate } from '@services/cron';
|
||||||
import { AddonModH5PActivityComponentsModule } from './components/components.module';
|
import { AddonModH5PActivityComponentsModule } from './components/components.module';
|
||||||
import { AddonModH5PActivityProvider } from './services/h5pactivity';
|
|
||||||
import { AddonModH5PActivitySyncProvider } from './services/h5pactivity-sync';
|
|
||||||
import { AddonModH5PActivityIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModH5PActivityIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModH5PActivityModuleHandler, AddonModH5PActivityModuleHandlerService } from './services/handlers/module';
|
import { AddonModH5PActivityModuleHandler, AddonModH5PActivityModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModH5PActivityPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModH5PActivityPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModH5PActivityReportLinkHandler } from './services/handlers/report-link';
|
import { AddonModH5PActivityReportLinkHandler } from './services/handlers/report-link';
|
||||||
import { AddonModH5PActivitySyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModH5PActivitySyncCronHandler } from './services/handlers/sync-cron';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const ADDON_MOD_H5P_ACTIVITY_SERVICES: Type<unknown>[] = [
|
* Get mod H5P activity services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod H5P activity services.
|
||||||
|
*/
|
||||||
|
export async function getModH5PActivityServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModH5PActivityProvider } = await import('@addons/mod/h5pactivity/services/h5pactivity');
|
||||||
|
const { AddonModH5PActivitySyncProvider } = await import('@addons/mod/h5pactivity/services/h5pactivity-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModH5PActivityProvider,
|
AddonModH5PActivityProvider,
|
||||||
AddonModH5PActivitySyncProvider,
|
AddonModH5PActivitySyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,11 +25,19 @@ import { AddonModImscpListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModImscpModuleHandler, AddonModImscpModuleHandlerService } from './services/handlers/module';
|
import { AddonModImscpModuleHandler, AddonModImscpModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModImscpPluginFileHandler } from './services/handlers/pluginfile';
|
import { AddonModImscpPluginFileHandler } from './services/handlers/pluginfile';
|
||||||
import { AddonModImscpPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModImscpPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModImscpProvider } from './services/imscp';
|
|
||||||
|
|
||||||
export const ADDON_MOD_IMSCP_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Imscp services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Imscp services.
|
||||||
|
*/
|
||||||
|
export async function getModImscpServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModImscpProvider } = await import('@addons/mod/imscp/services/imscp');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModImscpProvider,
|
AddonModImscpProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,16 +34,25 @@ import { AddonModLessonPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonModLessonReportLinkHandler } from './services/handlers/report-link';
|
import { AddonModLessonReportLinkHandler } from './services/handlers/report-link';
|
||||||
import { AddonModLessonSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModLessonSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModLessonProvider } from './services/lesson';
|
import { AddonModLessonProvider } from './services/lesson';
|
||||||
import { AddonModLessonHelperProvider } from './services/lesson-helper';
|
|
||||||
import { AddonModLessonOfflineProvider } from './services/lesson-offline';
|
|
||||||
import { AddonModLessonSyncProvider } from './services/lesson-sync';
|
|
||||||
|
|
||||||
export const ADDON_MOD_LESSON_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Lesson services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Lesson services.
|
||||||
|
*/
|
||||||
|
export async function getModLessonServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModLessonProvider } = await import('@addons/mod/lesson/services/lesson');
|
||||||
|
const { AddonModLessonOfflineProvider } = await import('@addons/mod/lesson/services/lesson-offline');
|
||||||
|
const { AddonModLessonSyncProvider } = await import('@addons/mod/lesson/services/lesson-sync');
|
||||||
|
const { AddonModLessonHelperProvider } = await import('@addons/mod/lesson/services/lesson-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModLessonProvider,
|
AddonModLessonProvider,
|
||||||
AddonModLessonOfflineProvider,
|
AddonModLessonOfflineProvider,
|
||||||
AddonModLessonSyncProvider,
|
AddonModLessonSyncProvider,
|
||||||
AddonModLessonHelperProvider,
|
AddonModLessonHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,22 @@ import { AddonModLtiIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModLtiListLinkHandler } from './services/handlers/list-link';
|
import { AddonModLtiListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModLtiModuleHandler, AddonModLtiModuleHandlerService } from './services/handlers/module';
|
import { AddonModLtiModuleHandler, AddonModLtiModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModLtiPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModLtiPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModLtiProvider } from './services/lti';
|
import { AddonModLtiHelper } from './services/lti-helper';
|
||||||
import { AddonModLtiHelper, AddonModLtiHelperProvider } from './services/lti-helper';
|
|
||||||
|
|
||||||
export const ADDON_MOD_LTI_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Lti services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Lti services.
|
||||||
|
*/
|
||||||
|
export async function getModLtiServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModLtiProvider } = await import('@addons/mod/lti/services/lti');
|
||||||
|
const { AddonModLtiHelperProvider } = await import('@addons/mod/lti/services/lti-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModLtiProvider,
|
AddonModLtiProvider,
|
||||||
AddonModLtiHelperProvider,
|
AddonModLtiHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,13 +25,21 @@ import { AddonModPageListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModPageModuleHandler, AddonModPageModuleHandlerService } from './services/handlers/module';
|
import { AddonModPageModuleHandler, AddonModPageModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModPagePluginFileHandler } from './services/handlers/pluginfile';
|
import { AddonModPagePluginFileHandler } from './services/handlers/pluginfile';
|
||||||
import { AddonModPagePrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModPagePrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModPageProvider } from './services/page';
|
|
||||||
import { AddonModPageHelperProvider } from './services/page-helper';
|
|
||||||
|
|
||||||
export const ADDON_MOD_PAGE_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Page services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Page services.
|
||||||
|
*/
|
||||||
|
export async function getModPageServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModPageProvider } = await import('@addons/mod/page/services/page');
|
||||||
|
const { AddonModPageHelperProvider } = await import('@addons/mod/page/services/page-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModPageProvider,
|
AddonModPageProvider,
|
||||||
AddonModPageHelperProvider,
|
AddonModPageHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,6 @@ import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { AddonModQuizAccessRulesModule } from './accessrules/accessrules.module';
|
import { AddonModQuizAccessRulesModule } from './accessrules/accessrules.module';
|
||||||
import { AddonModQuizComponentsModule } from './components/components.module';
|
import { AddonModQuizComponentsModule } from './components/components.module';
|
||||||
import { AddonModQuizAccessRuleDelegateService } from './services/access-rules-delegate';
|
|
||||||
import { SITE_SCHEMA } from './services/database/quiz';
|
import { SITE_SCHEMA } from './services/database/quiz';
|
||||||
import { AddonModQuizGradeLinkHandler } from './services/handlers/grade-link';
|
import { AddonModQuizGradeLinkHandler } from './services/handlers/grade-link';
|
||||||
import { AddonModQuizIndexLinkHandler } from './services/handlers/index-link';
|
import { AddonModQuizIndexLinkHandler } from './services/handlers/index-link';
|
||||||
|
@ -36,17 +35,27 @@ import { AddonModQuizPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonModQuizReviewLinkHandler } from './services/handlers/review-link';
|
import { AddonModQuizReviewLinkHandler } from './services/handlers/review-link';
|
||||||
import { AddonModQuizSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModQuizSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModQuizProvider } from './services/quiz';
|
import { AddonModQuizProvider } from './services/quiz';
|
||||||
import { AddonModQuizHelperProvider } from './services/quiz-helper';
|
|
||||||
import { AddonModQuizOfflineProvider } from './services/quiz-offline';
|
|
||||||
import { AddonModQuizSyncProvider } from './services/quiz-sync';
|
|
||||||
|
|
||||||
export const ADDON_MOD_QUIZ_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Quiz services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Quiz services.
|
||||||
|
*/
|
||||||
|
export async function getModQuizServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModQuizProvider } = await import('@addons/mod/quiz/services/quiz');
|
||||||
|
const { AddonModQuizOfflineProvider } = await import('@addons/mod/quiz/services/quiz-offline');
|
||||||
|
const { AddonModQuizHelperProvider } = await import('@addons/mod/quiz/services/quiz-helper');
|
||||||
|
const { AddonModQuizSyncProvider } = await import('@addons/mod/quiz/services/quiz-sync');
|
||||||
|
const { AddonModQuizAccessRuleDelegateService } = await import('@addons/mod/quiz/services/access-rules-delegate');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModQuizAccessRuleDelegateService,
|
AddonModQuizAccessRuleDelegateService,
|
||||||
AddonModQuizProvider,
|
AddonModQuizProvider,
|
||||||
AddonModQuizOfflineProvider,
|
AddonModQuizOfflineProvider,
|
||||||
AddonModQuizHelperProvider,
|
AddonModQuizHelperProvider,
|
||||||
AddonModQuizSyncProvider,
|
AddonModQuizSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,11 +25,19 @@ import { AddonModResourceListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModResourceModuleHandlerService, AddonModResourceModuleHandler } from './services/handlers/module';
|
import { AddonModResourceModuleHandlerService, AddonModResourceModuleHandler } from './services/handlers/module';
|
||||||
import { AddonModResourcePluginFileHandler } from './services/handlers/pluginfile';
|
import { AddonModResourcePluginFileHandler } from './services/handlers/pluginfile';
|
||||||
import { AddonModResourcePrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModResourcePrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModResourceProvider } from './services/resource';
|
|
||||||
|
|
||||||
export const ADDON_MOD_RESOURCE_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Resource services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Resource services.
|
||||||
|
*/
|
||||||
|
export async function getModResourceServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModResourceProvider } = await import('@addons/mod/resource/services/resource');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModResourceProvider,
|
AddonModResourceProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,16 +33,25 @@ import { AddonModScormPluginFileHandler } from './services/handlers/pluginfile';
|
||||||
import { AddonModScormPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModScormPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModScormSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModScormSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModScormProvider } from './services/scorm';
|
import { AddonModScormProvider } from './services/scorm';
|
||||||
import { AddonModScormHelperProvider } from './services/scorm-helper';
|
|
||||||
import { AddonModScormOfflineProvider } from './services/scorm-offline';
|
|
||||||
import { AddonModScormSyncProvider } from './services/scorm-sync';
|
|
||||||
|
|
||||||
export const ADDON_MOD_SCORM_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Scorm services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Scorm services.
|
||||||
|
*/
|
||||||
|
export async function getModScormServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModScormProvider } = await import('@addons/mod/scorm/services/scorm');
|
||||||
|
const { AddonModScormOfflineProvider } = await import('@addons/mod/scorm/services/scorm-offline');
|
||||||
|
const { AddonModScormHelperProvider } = await import('@addons/mod/scorm/services/scorm-helper');
|
||||||
|
const { AddonModScormSyncProvider } = await import('@addons/mod/scorm/services/scorm-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModScormProvider,
|
AddonModScormProvider,
|
||||||
AddonModScormOfflineProvider,
|
AddonModScormOfflineProvider,
|
||||||
AddonModScormHelperProvider,
|
AddonModScormHelperProvider,
|
||||||
AddonModScormSyncProvider,
|
AddonModScormSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,18 +27,25 @@ import { AddonModSurveyListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModSurveyModuleHandler, AddonModSurveyModuleHandlerService } from './services/handlers/module';
|
import { AddonModSurveyModuleHandler, AddonModSurveyModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModSurveyPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModSurveyPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModSurveySyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModSurveySyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModSurveyProvider } from './services/survey';
|
|
||||||
import { AddonModSurveyHelperProvider } from './services/survey-helper';
|
|
||||||
import { AddonModSurveyOfflineProvider } from './services/survey-offline';
|
|
||||||
import { AddonModSurveySyncProvider } from './services/survey-sync';
|
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const ADDON_MOD_SURVEY_SERVICES: Type<unknown>[] = [
|
* Get mod Survey services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Survey services.
|
||||||
|
*/
|
||||||
|
export async function getModSurveyServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModSurveyProvider } = await import('@addons/mod/survey/services/survey');
|
||||||
|
const { AddonModSurveyOfflineProvider } = await import('@addons/mod/survey/services/survey-offline');
|
||||||
|
const { AddonModSurveySyncProvider } = await import('@addons/mod/survey/services/survey-sync');
|
||||||
|
const { AddonModSurveyHelperProvider } = await import('@addons/mod/survey/services/survey-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModSurveyProvider,
|
AddonModSurveyProvider,
|
||||||
AddonModSurveyHelperProvider,
|
AddonModSurveyHelperProvider,
|
||||||
AddonModSurveySyncProvider,
|
AddonModSurveySyncProvider,
|
||||||
AddonModSurveyOfflineProvider,
|
AddonModSurveyOfflineProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,21 @@ import { AddonModUrlIndexLinkHandler } from './services/handlers/index-link';
|
||||||
import { AddonModUrlListLinkHandler } from './services/handlers/list-link';
|
import { AddonModUrlListLinkHandler } from './services/handlers/list-link';
|
||||||
import { AddonModUrlModuleHandler, AddonModUrlModuleHandlerService } from './services/handlers/module';
|
import { AddonModUrlModuleHandler, AddonModUrlModuleHandlerService } from './services/handlers/module';
|
||||||
import { AddonModUrlPrefetchHandler } from './services/handlers/prefetch';
|
import { AddonModUrlPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModUrlProvider } from './services/url';
|
|
||||||
import { AddonModUrlHelperProvider } from './services/url-helper';
|
|
||||||
|
|
||||||
export const ADDON_MOD_URL_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Url services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Url services.
|
||||||
|
*/
|
||||||
|
export async function getModUrlServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModUrlProvider } = await import('@addons/mod/url/services/url');
|
||||||
|
const { AddonModUrlHelperProvider } = await import('@addons/mod/url/services/url-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModUrlProvider,
|
AddonModUrlProvider,
|
||||||
AddonModUrlHelperProvider,
|
AddonModUrlHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,14 +34,23 @@ import { AddonModWikiPrefetchHandler } from './services/handlers/prefetch';
|
||||||
import { AddonModWikiSyncCronHandler } from './services/handlers/sync-cron';
|
import { AddonModWikiSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { AddonModWikiTagAreaHandler } from './services/handlers/tag-area';
|
import { AddonModWikiTagAreaHandler } from './services/handlers/tag-area';
|
||||||
import { AddonModWikiProvider } from './services/wiki';
|
import { AddonModWikiProvider } from './services/wiki';
|
||||||
import { AddonModWikiOfflineProvider } from './services/wiki-offline';
|
|
||||||
import { AddonModWikiSyncProvider } from './services/wiki-sync';
|
|
||||||
|
|
||||||
export const ADDON_MOD_WIKI_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get mod Wiki services.
|
||||||
|
*
|
||||||
|
* @returns Returns mod Wiki services.
|
||||||
|
*/
|
||||||
|
export async function getModWikiServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonModWikiProvider } = await import('@addons/mod/wiki/services/wiki');
|
||||||
|
const { AddonModWikiOfflineProvider } = await import('@addons/mod/wiki/services/wiki-offline');
|
||||||
|
const { AddonModWikiSyncProvider } = await import('@addons/mod/wiki/services/wiki-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonModWikiProvider,
|
AddonModWikiProvider,
|
||||||
AddonModWikiOfflineProvider,
|
AddonModWikiOfflineProvider,
|
||||||
AddonModWikiSyncProvider,
|
AddonModWikiSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,11 +31,11 @@ import { getPrefetchHandlerInstance } from '@addons/mod/workshop/services/handle
|
||||||
import { getCronHandlerInstance } from '@addons/mod/workshop/services/handlers/sync-cron';
|
import { getCronHandlerInstance } from '@addons/mod/workshop/services/handlers/sync-cron';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get workshop services.
|
* Get modworkshop services.
|
||||||
*
|
*
|
||||||
* @returns Workshop services.
|
* @returns modWorkshop services.
|
||||||
*/
|
*/
|
||||||
export async function getWorkshopServices(): Promise<Type<unknown>[]> {
|
export async function getModWorkshopServices(): Promise<Type<unknown>[]> {
|
||||||
const { AddonModWorkshopProvider } = await import('@addons/mod/workshop/services/workshop');
|
const { AddonModWorkshopProvider } = await import('@addons/mod/workshop/services/workshop');
|
||||||
const { AddonModWorkshopOfflineProvider } = await import('@addons/mod/workshop/services/workshop-offline');
|
const { AddonModWorkshopOfflineProvider } = await import('@addons/mod/workshop/services/workshop-offline');
|
||||||
const { AddonModWorkshopSyncProvider } = await import('@addons/mod/workshop/services/workshop-sync');
|
const { AddonModWorkshopSyncProvider } = await import('@addons/mod/workshop/services/workshop-sync');
|
||||||
|
@ -57,7 +57,7 @@ export async function getWorkshopServices(): Promise<Type<unknown>[]> {
|
||||||
*
|
*
|
||||||
* @returns Workshop component modules.
|
* @returns Workshop component modules.
|
||||||
*/
|
*/
|
||||||
export async function getWorkshopComponentModules(): Promise<unknown[]> {
|
export async function getModWorkshopComponentModules(): Promise<unknown[]> {
|
||||||
const { AddonModWorkshopComponentsModule } = await import('@addons/mod/workshop/components/components.module');
|
const { AddonModWorkshopComponentsModule } = await import('@addons/mod/workshop/components/components.module');
|
||||||
|
|
||||||
return [AddonModWorkshopComponentsModule];
|
return [AddonModWorkshopComponentsModule];
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
||||||
import { AddonNotesProvider } from './services/notes';
|
|
||||||
import { AddonNotesOfflineProvider } from './services/notes-offline';
|
|
||||||
import { AddonNotesSyncProvider } from './services/notes-sync';
|
|
||||||
import { CoreCronDelegate } from '@services/cron';
|
import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
||||||
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
||||||
|
@ -29,12 +26,22 @@ import { Routes } from '@angular/router';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const ADDON_NOTES_SERVICES: Type<unknown>[] = [
|
* Get notes services.
|
||||||
|
*
|
||||||
|
* @returns Returns notes services.
|
||||||
|
*/
|
||||||
|
export async function getNotesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonNotesProvider } = await import('@addons/notes/services/notes');
|
||||||
|
const { AddonNotesOfflineProvider } = await import('@addons/notes/services/notes-offline');
|
||||||
|
const { AddonNotesSyncProvider } = await import('@addons/notes/services/notes-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonNotesProvider,
|
AddonNotesProvider,
|
||||||
AddonNotesOfflineProvider,
|
AddonNotesOfflineProvider,
|
||||||
AddonNotesSyncProvider,
|
AddonNotesSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,16 +26,24 @@ import { AddonNotificationsCronHandler } from './services/handlers/cron';
|
||||||
import { AddonNotificationsPushClickHandler } from './services/handlers/push-click';
|
import { AddonNotificationsPushClickHandler } from './services/handlers/push-click';
|
||||||
import { AddonNotificationsSettingsHandler, AddonNotificationsSettingsHandlerService } from './services/handlers/settings';
|
import { AddonNotificationsSettingsHandler, AddonNotificationsSettingsHandlerService } from './services/handlers/settings';
|
||||||
import { CoreSitePreferencesRoutingModule } from '@features/settings/settings-site-routing.module';
|
import { CoreSitePreferencesRoutingModule } from '@features/settings/settings-site-routing.module';
|
||||||
import { AddonNotificationsProvider } from './services/notifications';
|
|
||||||
import { AddonNotificationsHelperProvider } from './services/notifications-helper';
|
|
||||||
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
||||||
import { AddonNotificationsPreferencesLinkHandler } from './services/handlers/preferences-link';
|
import { AddonNotificationsPreferencesLinkHandler } from './services/handlers/preferences-link';
|
||||||
import { AddonNotificationsLinkHandler } from './services/handlers/notifications-link';
|
import { AddonNotificationsLinkHandler } from './services/handlers/notifications-link';
|
||||||
|
|
||||||
export const ADDON_NOTIFICATIONS_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get notifications services.
|
||||||
|
*
|
||||||
|
* @returns Returns notifications services.
|
||||||
|
*/
|
||||||
|
export async function getNotificationsServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonNotificationsProvider } = await import('@addons/notifications/services/notifications');
|
||||||
|
const { AddonNotificationsHelperProvider } = await import('@addons/notifications/services/notifications-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonNotificationsProvider,
|
AddonNotificationsProvider,
|
||||||
AddonNotificationsHelperProvider,
|
AddonNotificationsHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,15 +17,23 @@ import { Routes } from '@angular/router';
|
||||||
|
|
||||||
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
|
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { AddonPrivateFilesProvider } from './services/privatefiles';
|
|
||||||
import { AddonPrivateFilesHelperProvider } from './services/privatefiles-helper';
|
|
||||||
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
||||||
import { AddonPrivateFilesUserHandler, AddonPrivateFilesUserHandlerService } from './services/handlers/user';
|
import { AddonPrivateFilesUserHandler, AddonPrivateFilesUserHandlerService } from './services/handlers/user';
|
||||||
|
|
||||||
export const ADDON_PRIVATEFILES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get private files services.
|
||||||
|
*
|
||||||
|
* @returns Returns private files services.
|
||||||
|
*/
|
||||||
|
export async function getPrivateFilesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { AddonPrivateFilesProvider } = await import('@addons/privatefiles/services/privatefiles');
|
||||||
|
const { AddonPrivateFilesHelperProvider } = await import('@addons/privatefiles/services/privatefiles-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
AddonPrivateFilesProvider,
|
AddonPrivateFilesProvider,
|
||||||
AddonPrivateFilesHelperProvider,
|
AddonPrivateFilesHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,36 +21,43 @@ import { CoreInterceptor } from './classes/interceptor';
|
||||||
import { getDatabaseProviders } from './services/database';
|
import { getDatabaseProviders } from './services/database';
|
||||||
import { getInitializerProviders } from './initializers';
|
import { getInitializerProviders } from './initializers';
|
||||||
|
|
||||||
import { CoreAppProvider } from '@services/app';
|
/**
|
||||||
import { CoreConfigProvider } from '@services/config';
|
* Get core services.
|
||||||
import { CoreCronDelegateService } from '@services/cron';
|
*
|
||||||
import { CoreCustomURLSchemesProvider } from '@services/urlschemes';
|
* @returns Core services.
|
||||||
import { CoreDbProvider } from '@services/db';
|
*/
|
||||||
import { CoreDomUtilsProvider } from '@services/utils/dom';
|
export async function getCoreServices(): Promise<Type<unknown>[]> {
|
||||||
import { CoreFileHelperProvider } from '@services/file-helper';
|
|
||||||
import { CoreFilepoolProvider } from '@services/filepool';
|
|
||||||
import { CoreFileProvider } from '@services/file';
|
|
||||||
import { CoreFileSessionProvider } from '@services/file-session';
|
|
||||||
import { CoreGeolocationProvider } from '@services/geolocation';
|
|
||||||
import { CoreGroupsProvider } from '@services/groups';
|
|
||||||
import { CoreIframeUtilsProvider } from '@services/utils/iframe';
|
|
||||||
import { CoreLangProvider } from '@services/lang';
|
|
||||||
import { CoreLocalNotificationsProvider } from '@services/local-notifications';
|
|
||||||
import { CoreMimetypeUtilsProvider } from '@services/utils/mimetype';
|
|
||||||
import { CoreNavigatorService } from '@services/navigator';
|
|
||||||
import { CorePluginFileDelegateService } from '@services/plugin-file-delegate';
|
|
||||||
import { CoreScreenService } from '@services/screen';
|
|
||||||
import { CoreSitesProvider } from '@services/sites';
|
|
||||||
import { CoreSyncProvider } from '@services/sync';
|
|
||||||
import { CoreTextUtilsProvider } from '@services/utils/text';
|
|
||||||
import { CoreTimeUtilsProvider } from '@services/utils/time';
|
|
||||||
import { CoreUpdateManagerProvider } from '@services/update-manager';
|
|
||||||
import { CoreUrlUtilsProvider } from '@services/utils/url';
|
|
||||||
import { CoreUtilsProvider } from '@services/utils/utils';
|
|
||||||
import { CoreWSProvider } from '@services/ws';
|
|
||||||
import { CorePlatformService } from '@services/platform';
|
|
||||||
|
|
||||||
export const CORE_SERVICES: Type<unknown>[] = [
|
const { CoreAppProvider } = await import('@services/app');
|
||||||
|
const { CoreConfigProvider } = await import('@services/config');
|
||||||
|
const { CoreCronDelegateService } = await import('@services/cron');
|
||||||
|
const { CoreCustomURLSchemesProvider } = await import('@services/urlschemes');
|
||||||
|
const { CoreDbProvider } = await import('@services/db');
|
||||||
|
const { CoreDomUtilsProvider } = await import('@services/utils/dom');
|
||||||
|
const { CoreFileHelperProvider } = await import('@services/file-helper');
|
||||||
|
const { CoreFilepoolProvider } = await import('@services/filepool');
|
||||||
|
const { CoreFileProvider } = await import('@services/file');
|
||||||
|
const { CoreFileSessionProvider } = await import('@services/file-session');
|
||||||
|
const { CoreGeolocationProvider } = await import('@services/geolocation');
|
||||||
|
const { CoreGroupsProvider } = await import('@services/groups');
|
||||||
|
const { CoreIframeUtilsProvider } = await import('@services/utils/iframe');
|
||||||
|
const { CoreLangProvider } = await import('@services/lang');
|
||||||
|
const { CoreLocalNotificationsProvider } = await import('@services/local-notifications');
|
||||||
|
const { CoreMimetypeUtilsProvider } = await import('@services/utils/mimetype');
|
||||||
|
const { CoreNavigatorService } = await import('@services/navigator');
|
||||||
|
const { CorePluginFileDelegateService } = await import('@services/plugin-file-delegate');
|
||||||
|
const { CoreScreenService } = await import('@services/screen');
|
||||||
|
const { CoreSitesProvider } = await import('@services/sites');
|
||||||
|
const { CoreSyncProvider } = await import('@services/sync');
|
||||||
|
const { CoreTextUtilsProvider } = await import('@services/utils/text');
|
||||||
|
const { CoreTimeUtilsProvider } = await import('@services/utils/time');
|
||||||
|
const { CoreUpdateManagerProvider } = await import('@services/update-manager');
|
||||||
|
const { CoreUrlUtilsProvider } = await import('@services/utils/url');
|
||||||
|
const { CoreUtilsProvider } = await import('@services/utils/utils');
|
||||||
|
const { CoreWSProvider } = await import('@services/ws');
|
||||||
|
const { CorePlatformService } = await import('@services/platform');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreAppProvider,
|
CoreAppProvider,
|
||||||
CoreConfigProvider,
|
CoreConfigProvider,
|
||||||
CoreCronDelegateService,
|
CoreCronDelegateService,
|
||||||
|
@ -79,7 +86,8 @@ export const CORE_SERVICES: Type<unknown>[] = [
|
||||||
CoreUrlUtilsProvider,
|
CoreUrlUtilsProvider,
|
||||||
CoreUtilsProvider,
|
CoreUtilsProvider,
|
||||||
CoreWSProvider,
|
CoreWSProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -14,13 +14,20 @@
|
||||||
|
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { CoreBlockDelegateService } from './services/block-delegate';
|
/**
|
||||||
import { CoreBlockHelperProvider } from './services/block-helper';
|
* Get block services.
|
||||||
|
*
|
||||||
|
* @returns Block services.
|
||||||
|
*/
|
||||||
|
export async function getBlockServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreBlockDelegateService } = await import('@features/block/services/block-delegate');
|
||||||
|
const { CoreBlockHelperProvider } = await import('@features/block/services/block-helper');
|
||||||
|
|
||||||
export const CORE_BLOCK_SERVICES: Type<unknown>[] = [
|
return [
|
||||||
CoreBlockDelegateService,
|
CoreBlockDelegateService,
|
||||||
CoreBlockHelperProvider,
|
CoreBlockHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({})
|
@NgModule({})
|
||||||
export class CoreBlockModule {}
|
export class CoreBlockModule {}
|
||||||
|
|
|
@ -40,33 +40,32 @@ import { CoreEvents } from '@singletons/events';
|
||||||
import { makeSingleton } from '@singletons';
|
import { makeSingleton } from '@singletons';
|
||||||
|
|
||||||
// Import core services.
|
// Import core services.
|
||||||
import { CORE_SERVICES } from '@/core/core.module';
|
import { getCoreServices } from '@/core/core.module';
|
||||||
import { CORE_BLOCK_SERVICES } from '@features/block/block.module';
|
import { getBlockServices } from '@features/block/block.module';
|
||||||
import { getCommentsServices } from '@features/comments/comments.module';
|
import { getCommentsServices } from '@features/comments/comments.module';
|
||||||
import { CORE_CONTENTLINKS_SERVICES } from '@features/contentlinks/contentlinks.module';
|
import { getContentLinksServices } from '@features/contentlinks/contentlinks.module';
|
||||||
import { CORE_COURSE_SERVICES } from '@features/course/course.module';
|
import { getCourseServices } from '@features/course/course.module';
|
||||||
import { CORE_COURSES_SERVICES } from '@features/courses/courses.module';
|
import { getCoursesServices } from '@features/courses/courses.module';
|
||||||
import { CORE_EDITOR_SERVICES } from '@features/editor/editor.module';
|
import { getEditorServices } from '@features/editor/editor.module';
|
||||||
import { CORE_ENROL_SERVICES } from '@features/enrol/enrol.module';
|
import { getEnrolServices } from '@features/enrol/enrol.module';
|
||||||
import { CORE_NATIVE_SERVICES } from '@features/native/native.module';
|
import { getFileUploadedServices } from '@features/fileuploader/fileuploader.module';
|
||||||
import { CORE_FILEUPLOADER_SERVICES } from '@features/fileuploader/fileuploader.module';
|
import { getFilterServices } from '@features/filter/filter.module';
|
||||||
import { CORE_FILTER_SERVICES } from '@features/filter/filter.module';
|
import { getGradesServices } from '@features/grades/grades.module';
|
||||||
import { CORE_GRADES_SERVICES } from '@features/grades/grades.module';
|
import { getH5PServices } from '@features/h5p/h5p.module';
|
||||||
import { CORE_H5P_SERVICES } from '@features/h5p/h5p.module';
|
import { getLoginServices } from '@features/login/login.module';
|
||||||
import { CORE_LOGIN_SERVICES } from '@features/login/login.module';
|
import { getMainMenuServices } from '@features/mainmenu/mainmenu.module';
|
||||||
import { CORE_MAINMENU_SERVICES } from '@features/mainmenu/mainmenu.module';
|
import { getNativeServices } from '@features/native/native.module';
|
||||||
import { CORE_PUSHNOTIFICATIONS_SERVICES } from '@features/pushnotifications/pushnotifications.module';
|
import { getPushNotificationsServices } from '@features/pushnotifications/pushnotifications.module';
|
||||||
import { CORE_QUESTION_SERVICES } from '@features/question/question.module';
|
import { getQuestionServices } from '@features/question/question.module';
|
||||||
import { CORE_SHAREDFILES_SERVICES } from '@features/sharedfiles/sharedfiles.module';
|
import { getRatingServices } from '@features/rating/rating.module';
|
||||||
import { CORE_RATING_SERVICES } from '@features/rating/rating.module';
|
import { getSearchServices } from '@features/search/search.module';
|
||||||
import { CORE_SEARCH_SERVICES } from '@features/search/search.module';
|
import { getSettingsServices } from '@features/settings/settings.module';
|
||||||
import { CORE_SETTINGS_SERVICES } from '@features/settings/settings.module';
|
import { getSharedFilesServices } from '@features/sharedfiles/sharedfiles.module';
|
||||||
import { CORE_SITEHOME_SERVICES } from '@features/sitehome/sitehome.module';
|
import { getSiteHomeServices } from '@features/sitehome/sitehome.module';
|
||||||
|
import { getStyleServices } from '@features/styles/styles.module';
|
||||||
import { getTagServices } from '@features/tag/tag.module';
|
import { getTagServices } from '@features/tag/tag.module';
|
||||||
import { CORE_STYLE_SERVICES } from '@features/styles/styles.module';
|
import { getUsersServices } from '@features/user/user.module';
|
||||||
import { CORE_USER_SERVICES } from '@features/user/user.module';
|
import { getXAPIServices } from '@features/xapi/xapi.module';
|
||||||
import { CORE_XAPI_SERVICES } from '@features/xapi/xapi.module';
|
|
||||||
import { CoreSitePluginsProvider } from '@features/siteplugins/services/siteplugins';
|
|
||||||
|
|
||||||
// Import other libraries and providers.
|
// Import other libraries and providers.
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
@ -124,41 +123,43 @@ import { CoreSitePluginsAssignFeedbackComponent } from '@features/siteplugins/co
|
||||||
import { CoreSitePluginsAssignSubmissionComponent } from '@features/siteplugins/components/assign-submission/assign-submission';
|
import { CoreSitePluginsAssignSubmissionComponent } from '@features/siteplugins/components/assign-submission/assign-submission';
|
||||||
|
|
||||||
// Import addon providers. Do not import database module because it causes circular dependencies.
|
// Import addon providers. Do not import database module because it causes circular dependencies.
|
||||||
import { ADDON_BADGES_SERVICES } from '@addons/badges/badges.module';
|
import { getBadgesServices } from '@addons/badges/badges.module';
|
||||||
import { ADDON_CALENDAR_SERVICES } from '@addons/calendar/calendar.module';
|
import { getCalendarServices } from '@addons/calendar/calendar.module';
|
||||||
import { getCourseCompletionServices } from '@addons/coursecompletion/coursecompletion.module';
|
|
||||||
import { getCompetencyServices } from '@addons/competency/competency.module';
|
import { getCompetencyServices } from '@addons/competency/competency.module';
|
||||||
import { ADDON_MESSAGEOUTPUT_SERVICES } from '@addons/messageoutput/messageoutput.module';
|
import { getCourseCompletionServices } from '@addons/coursecompletion/coursecompletion.module';
|
||||||
import { ADDON_MESSAGES_SERVICES } from '@addons/messages/messages.module';
|
import { getMessageOutputServices } from '@addons/messageoutput/messageoutput.module';
|
||||||
import { ADDON_MOD_ASSIGN_SERVICES } from '@addons/mod/assign/assign.module';
|
import { getMessagesServices } from '@addons/messages/messages.module';
|
||||||
import { ADDON_MOD_BOOK_SERVICES } from '@addons/mod/book/book.module';
|
import { getModAssignServices } from '@addons/mod/assign/assign.module';
|
||||||
import { ADDON_MOD_CHAT_SERVICES } from '@addons/mod/chat/chat.module';
|
import { getModBookServices } from '@addons/mod/book/book.module';
|
||||||
import { ADDON_MOD_CHOICE_SERVICES } from '@addons/mod/choice/choice.module';
|
import { getModChatServices } from '@addons/mod/chat/chat.module';
|
||||||
import { ADDON_MOD_FEEDBACK_SERVICES } from '@addons/mod/feedback/feedback.module';
|
import { getModChoiceServices } from '@addons/mod/choice/choice.module';
|
||||||
import { ADDON_MOD_FOLDER_SERVICES } from '@addons/mod/folder/folder.module';
|
import { getModFeedbackServices } from '@addons/mod/feedback/feedback.module';
|
||||||
import { ADDON_MOD_FORUM_SERVICES } from '@addons/mod/forum/forum.module';
|
import { getModFolderServices } from '@addons/mod/folder/folder.module';
|
||||||
import { ADDON_MOD_GLOSSARY_SERVICES } from '@addons/mod/glossary/glossary.module';
|
import { getModForumServices } from '@addons/mod/forum/forum.module';
|
||||||
import { ADDON_MOD_H5P_ACTIVITY_SERVICES } from '@addons/mod/h5pactivity/h5pactivity.module';
|
import { getModGlossaryServices } from '@addons/mod/glossary/glossary.module';
|
||||||
import { ADDON_MOD_IMSCP_SERVICES } from '@addons/mod/imscp/imscp.module';
|
import { getModH5PActivityServices } from '@addons/mod/h5pactivity/h5pactivity.module';
|
||||||
import { ADDON_MOD_LESSON_SERVICES } from '@addons/mod/lesson/lesson.module';
|
import { getModImscpServices } from '@addons/mod/imscp/imscp.module';
|
||||||
import { ADDON_MOD_LTI_SERVICES } from '@addons/mod/lti/lti.module';
|
import { getModLessonServices } from '@addons/mod/lesson/lesson.module';
|
||||||
import { ADDON_MOD_PAGE_SERVICES } from '@addons/mod/page/page.module';
|
import { getModLtiServices } from '@addons/mod/lti/lti.module';
|
||||||
import { ADDON_MOD_QUIZ_SERVICES } from '@addons/mod/quiz/quiz.module';
|
import { getModPageServices } from '@addons/mod/page/page.module';
|
||||||
import { ADDON_MOD_RESOURCE_SERVICES } from '@addons/mod/resource/resource.module';
|
import { getModQuizServices } from '@addons/mod/quiz/quiz.module';
|
||||||
import { ADDON_MOD_SCORM_SERVICES } from '@addons/mod/scorm/scorm.module';
|
import { getModResourceServices } from '@addons/mod/resource/resource.module';
|
||||||
import { ADDON_MOD_SURVEY_SERVICES } from '@addons/mod/survey/survey.module';
|
import { getModScormServices } from '@addons/mod/scorm/scorm.module';
|
||||||
import { ADDON_MOD_URL_SERVICES } from '@addons/mod/url/url.module';
|
import { getModSurveyServices } from '@addons/mod/survey/survey.module';
|
||||||
import { ADDON_MOD_WIKI_SERVICES } from '@addons/mod/wiki/wiki.module';
|
import { getModUrlServices } from '@addons/mod/url/url.module';
|
||||||
import { getWorkshopComponentModules, getWorkshopServices } from '@addons/mod/workshop/workshop.module';
|
import { getModWikiServices } from '@addons/mod/wiki/wiki.module';
|
||||||
import { ADDON_NOTES_SERVICES } from '@addons/notes/notes.module';
|
import { getModWorkshopComponentModules, getModWorkshopServices } from '@addons/mod/workshop/workshop.module';
|
||||||
import { ADDON_NOTIFICATIONS_SERVICES } from '@addons/notifications/notifications.module';
|
import { getNotesServices } from '@addons/notes/notes.module';
|
||||||
import { ADDON_PRIVATEFILES_SERVICES } from '@addons/privatefiles/privatefiles.module';
|
import { getNotificationsServices } from '@addons/notifications/notifications.module';
|
||||||
|
import { getPrivateFilesServices } from '@addons/privatefiles/privatefiles.module';
|
||||||
|
|
||||||
// Import some addon modules that define components, directives and pipes. Only import the important ones.
|
// Import some addon modules that define components, directives and pipes. Only import the important ones.
|
||||||
import { AddonModAssignComponentsModule } from '@addons/mod/assign/components/components.module';
|
import { AddonModAssignComponentsModule } from '@addons/mod/assign/components/components.module';
|
||||||
import { CorePromisedValue } from '@classes/promised-value';
|
import { CorePromisedValue } from '@classes/promised-value';
|
||||||
import { CorePlatform } from '@services/platform';
|
import { CorePlatform } from '@services/platform';
|
||||||
|
|
||||||
import { CoreAutoLogoutService } from '@features/autologout/services/autologout';
|
import { CoreAutoLogoutService } from '@features/autologout/services/autologout';
|
||||||
|
import { CoreSitePluginsProvider } from '@features/siteplugins/services/siteplugins';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service to provide functionalities regarding compiling dynamic HTML and Javascript.
|
* Service to provide functionalities regarding compiling dynamic HTML and Javascript.
|
||||||
|
@ -182,7 +183,7 @@ export class CoreCompileProvider {
|
||||||
];
|
];
|
||||||
|
|
||||||
protected readonly LAZY_IMPORTS = [
|
protected readonly LAZY_IMPORTS = [
|
||||||
getWorkshopComponentModules,
|
getModWorkshopComponentModules,
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(protected injector: Injector) {
|
constructor(protected injector: Injector) {
|
||||||
|
@ -277,60 +278,10 @@ export class CoreCompileProvider {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
injectLibraries(instance: any, extraProviders: Type<unknown>[] = []): void {
|
injectLibraries(instance: any, extraProviders: Type<unknown>[] = []): void {
|
||||||
const providers = [
|
const providers = [
|
||||||
...CORE_SERVICES,
|
|
||||||
CoreAutoLogoutService,
|
|
||||||
...CORE_BLOCK_SERVICES,
|
|
||||||
...CORE_CONTENTLINKS_SERVICES,
|
|
||||||
...CORE_COURSE_SERVICES,
|
|
||||||
...CORE_COURSES_SERVICES,
|
|
||||||
...CORE_EDITOR_SERVICES,
|
|
||||||
...CORE_ENROL_SERVICES,
|
|
||||||
...CORE_FILEUPLOADER_SERVICES,
|
|
||||||
...CORE_FILTER_SERVICES,
|
|
||||||
...CORE_GRADES_SERVICES,
|
|
||||||
...CORE_H5P_SERVICES,
|
|
||||||
...CORE_MAINMENU_SERVICES,
|
|
||||||
...CORE_LOGIN_SERVICES,
|
|
||||||
...CORE_QUESTION_SERVICES,
|
|
||||||
...CORE_PUSHNOTIFICATIONS_SERVICES,
|
|
||||||
...CORE_RATING_SERVICES,
|
|
||||||
...CORE_SEARCH_SERVICES,
|
|
||||||
...CORE_SETTINGS_SERVICES,
|
|
||||||
...CORE_SHAREDFILES_SERVICES,
|
|
||||||
...CORE_SITEHOME_SERVICES,
|
|
||||||
CoreSitePluginsProvider,
|
|
||||||
...CORE_STYLE_SERVICES,
|
|
||||||
...CORE_USER_SERVICES,
|
|
||||||
...CORE_XAPI_SERVICES,
|
|
||||||
...CORE_NATIVE_SERVICES,
|
|
||||||
...this.OTHER_SERVICES,
|
|
||||||
...extraProviders,
|
...extraProviders,
|
||||||
...ADDON_BADGES_SERVICES,
|
CoreAutoLogoutService,
|
||||||
...ADDON_CALENDAR_SERVICES,
|
CoreSitePluginsProvider,
|
||||||
...ADDON_MESSAGEOUTPUT_SERVICES,
|
...this.OTHER_SERVICES,
|
||||||
...ADDON_MESSAGES_SERVICES,
|
|
||||||
...ADDON_MOD_ASSIGN_SERVICES,
|
|
||||||
...ADDON_MOD_BOOK_SERVICES,
|
|
||||||
...ADDON_MOD_CHAT_SERVICES,
|
|
||||||
...ADDON_MOD_CHOICE_SERVICES,
|
|
||||||
...ADDON_MOD_FEEDBACK_SERVICES,
|
|
||||||
...ADDON_MOD_FOLDER_SERVICES,
|
|
||||||
...ADDON_MOD_FORUM_SERVICES,
|
|
||||||
...ADDON_MOD_GLOSSARY_SERVICES,
|
|
||||||
...ADDON_MOD_H5P_ACTIVITY_SERVICES,
|
|
||||||
...ADDON_MOD_IMSCP_SERVICES,
|
|
||||||
...ADDON_MOD_LESSON_SERVICES,
|
|
||||||
...ADDON_MOD_LTI_SERVICES,
|
|
||||||
...ADDON_MOD_PAGE_SERVICES,
|
|
||||||
...ADDON_MOD_QUIZ_SERVICES,
|
|
||||||
...ADDON_MOD_RESOURCE_SERVICES,
|
|
||||||
...ADDON_MOD_SCORM_SERVICES,
|
|
||||||
...ADDON_MOD_SURVEY_SERVICES,
|
|
||||||
...ADDON_MOD_URL_SERVICES,
|
|
||||||
...ADDON_MOD_WIKI_SERVICES,
|
|
||||||
...ADDON_NOTES_SERVICES,
|
|
||||||
...ADDON_NOTIFICATIONS_SERVICES,
|
|
||||||
...ADDON_PRIVATEFILES_SERVICES,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// We cannot inject anything to this constructor. Use the Injector to inject all the providers into the instance.
|
// We cannot inject anything to this constructor. Use the Injector to inject all the providers into the instance.
|
||||||
|
@ -405,20 +356,66 @@ export class CoreCompileProvider {
|
||||||
* @returns Lazy libraries.
|
* @returns Lazy libraries.
|
||||||
*/
|
*/
|
||||||
async getLazyLibraries(): Promise<Type<unknown>[]> {
|
async getLazyLibraries(): Promise<Type<unknown>[]> {
|
||||||
const ADDON_MOD_WORKSHOP_SERVICES = await getWorkshopServices();
|
const services = await Promise.all([
|
||||||
const ADDON_COMPETENCY_SERVICES = await getCompetencyServices();
|
getCoreServices(),
|
||||||
const ADDON_COURSECOMPLETION_SERVICES = await getCourseCompletionServices();
|
getBlockServices(),
|
||||||
|
getCommentsServices(),
|
||||||
|
getContentLinksServices(),
|
||||||
|
getCourseServices(),
|
||||||
|
getCoursesServices(),
|
||||||
|
getEditorServices(),
|
||||||
|
getEnrolServices(),
|
||||||
|
getFileUploadedServices(),
|
||||||
|
getFilterServices(),
|
||||||
|
getGradesServices(),
|
||||||
|
getH5PServices(),
|
||||||
|
getLoginServices(),
|
||||||
|
getMainMenuServices(),
|
||||||
|
getNativeServices(),
|
||||||
|
getPushNotificationsServices(),
|
||||||
|
getQuestionServices(),
|
||||||
|
getRatingServices(),
|
||||||
|
getSearchServices(),
|
||||||
|
getSettingsServices(),
|
||||||
|
getSharedFilesServices(),
|
||||||
|
getSiteHomeServices(),
|
||||||
|
getStyleServices(),
|
||||||
|
getTagServices(),
|
||||||
|
getUsersServices(),
|
||||||
|
getXAPIServices(),
|
||||||
|
|
||||||
const CORE_COMMENTS_SERVICES = await getCommentsServices();
|
getBadgesServices(),
|
||||||
const CORE_TAG_SERVICES = await getTagServices();
|
getCalendarServices(),
|
||||||
|
getCompetencyServices(),
|
||||||
|
getCourseCompletionServices(),
|
||||||
|
getMessageOutputServices(),
|
||||||
|
getMessagesServices(),
|
||||||
|
getModAssignServices(),
|
||||||
|
getModBookServices(),
|
||||||
|
getModChatServices(),
|
||||||
|
getModChoiceServices(),
|
||||||
|
getModFeedbackServices(),
|
||||||
|
getModFolderServices(),
|
||||||
|
getModForumServices(),
|
||||||
|
getModGlossaryServices(),
|
||||||
|
getModH5PActivityServices(),
|
||||||
|
getModImscpServices(),
|
||||||
|
getModLessonServices(),
|
||||||
|
getModLtiServices(),
|
||||||
|
getModPageServices(),
|
||||||
|
getModQuizServices(),
|
||||||
|
getModResourceServices(),
|
||||||
|
getModScormServices(),
|
||||||
|
getModSurveyServices(),
|
||||||
|
getModUrlServices(),
|
||||||
|
getModWikiServices(),
|
||||||
|
getModWorkshopServices(),
|
||||||
|
getNotesServices(),
|
||||||
|
getNotificationsServices(),
|
||||||
|
getPrivateFilesServices(),
|
||||||
|
]);
|
||||||
|
|
||||||
return [
|
return services.flat();
|
||||||
...ADDON_MOD_WORKSHOP_SERVICES,
|
|
||||||
...ADDON_COMPETENCY_SERVICES,
|
|
||||||
...ADDON_COURSECOMPLETION_SERVICES,
|
|
||||||
...CORE_COMMENTS_SERVICES,
|
|
||||||
...CORE_TAG_SERVICES,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,21 @@
|
||||||
|
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
import { CoreContentLinksComponentsModule } from './components/components.module';
|
import { CoreContentLinksComponentsModule } from './components/components.module';
|
||||||
import { CoreContentLinksDelegateService } from './services/contentlinks-delegate';
|
|
||||||
import { CoreContentLinksHelperProvider } from './services/contentlinks-helper';
|
|
||||||
|
|
||||||
export const CORE_CONTENTLINKS_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get content links services.
|
||||||
|
*
|
||||||
|
* @returns Content links services.
|
||||||
|
*/
|
||||||
|
export async function getContentLinksServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreContentLinksDelegateService } = await import('@features/contentlinks/services/contentlinks-delegate');
|
||||||
|
const { CoreContentLinksHelperProvider } = await import('@features/contentlinks/services/contentlinks-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreContentLinksDelegateService,
|
CoreContentLinksDelegateService,
|
||||||
CoreContentLinksHelperProvider,
|
CoreContentLinksHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -21,26 +21,35 @@ import { CoreCourseFormatModule } from '@features/course/format/formats.module';
|
||||||
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/course';
|
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/course';
|
||||||
import { SITE_SCHEMA as LOG_SITE_SCHEMA } from './services/database/log';
|
import { SITE_SCHEMA as LOG_SITE_SCHEMA } from './services/database/log';
|
||||||
import { SITE_SCHEMA as PREFETCH_SITE_SCHEMA } from './services/database/module-prefetch';
|
import { SITE_SCHEMA as PREFETCH_SITE_SCHEMA } from './services/database/module-prefetch';
|
||||||
import { CoreCourseModulePrefetchDelegate, CoreCourseModulePrefetchDelegateService } from './services/module-prefetch-delegate';
|
import { CoreCourseModulePrefetchDelegate } from './services/module-prefetch-delegate';
|
||||||
import { CoreCronDelegate } from '@services/cron';
|
import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CoreCourseLogCronHandler } from './services/handlers/log-cron';
|
import { CoreCourseLogCronHandler } from './services/handlers/log-cron';
|
||||||
import { CoreCourseSyncCronHandler } from './services/handlers/sync-cron';
|
import { CoreCourseSyncCronHandler } from './services/handlers/sync-cron';
|
||||||
import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate';
|
import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate';
|
||||||
import { CoreCourseTagAreaHandler } from './services/handlers/course-tag-area';
|
import { CoreCourseTagAreaHandler } from './services/handlers/course-tag-area';
|
||||||
import { CoreCourseModulesTagAreaHandler } from './services/handlers/modules-tag-area';
|
import { CoreCourseModulesTagAreaHandler } from './services/handlers/modules-tag-area';
|
||||||
import { CoreCourse, CoreCourseProvider } from './services/course';
|
import { CoreCourse } from './services/course';
|
||||||
import { CoreCourseHelperProvider } from './services/course-helper';
|
|
||||||
import { CoreCourseLogHelperProvider } from './services/log-helper';
|
|
||||||
import { CoreCourseFormatDelegateService } from './services/format-delegate';
|
|
||||||
import { CoreCourseModuleDelegateService } from './services/module-delegate';
|
|
||||||
import { CoreCourseOptionsDelegateService } from './services/course-options-delegate';
|
|
||||||
import { CoreCourseOfflineProvider } from './services/course-offline';
|
|
||||||
import { CoreCourseSyncProvider } from './services/sync';
|
|
||||||
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
||||||
import { buildRegExpUrlMatcher } from '@/app/app-routing.module';
|
import { buildRegExpUrlMatcher } from '@/app/app-routing.module';
|
||||||
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
||||||
|
|
||||||
export const CORE_COURSE_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get course services.
|
||||||
|
*
|
||||||
|
* @returns Course services.
|
||||||
|
*/
|
||||||
|
export async function getCourseServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreCourseProvider } = await import('@features/course/services/course');
|
||||||
|
const { CoreCourseHelperProvider } = await import('@features/course/services/course-helper');
|
||||||
|
const { CoreCourseLogHelperProvider } = await import('@features/course/services/log-helper');
|
||||||
|
const { CoreCourseFormatDelegateService } = await import('@features/course/services/format-delegate');
|
||||||
|
const { CoreCourseModuleDelegateService } = await import('@features/course/services/module-delegate');
|
||||||
|
const { CoreCourseModulePrefetchDelegateService } = await import('@features/course/services/module-prefetch-delegate');
|
||||||
|
const { CoreCourseOptionsDelegateService } = await import('@features/course/services/course-options-delegate');
|
||||||
|
const { CoreCourseOfflineProvider } = await import('@features/course/services/course-offline');
|
||||||
|
const { CoreCourseSyncProvider } = await import('@features/course/services/sync');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreCourseProvider,
|
CoreCourseProvider,
|
||||||
CoreCourseHelperProvider,
|
CoreCourseHelperProvider,
|
||||||
CoreCourseLogHelperProvider,
|
CoreCourseLogHelperProvider,
|
||||||
|
@ -50,7 +59,8 @@ export const CORE_COURSE_SERVICES: Type<unknown>[] = [
|
||||||
CoreCourseOptionsDelegateService,
|
CoreCourseOptionsDelegateService,
|
||||||
CoreCourseOfflineProvider,
|
CoreCourseOfflineProvider,
|
||||||
CoreCourseSyncProvider,
|
CoreCourseSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export const COURSE_PAGE_NAME = 'course';
|
export const COURSE_PAGE_NAME = 'course';
|
||||||
export const CONTENTS_PAGE_NAME = 'contents';
|
export const CONTENTS_PAGE_NAME = 'contents';
|
||||||
|
|
|
@ -26,9 +26,6 @@ import { CorePushNotificationsDelegate } from '@features/pushnotifications/servi
|
||||||
import { CoreRemindersPushNotificationData } from '@features/reminders/services/reminders';
|
import { CoreRemindersPushNotificationData } from '@features/reminders/services/reminders';
|
||||||
import { CoreLocalNotifications } from '@services/local-notifications';
|
import { CoreLocalNotifications } from '@services/local-notifications';
|
||||||
import { ApplicationInit } from '@singletons';
|
import { ApplicationInit } from '@singletons';
|
||||||
import { CoreCoursesProvider } from './services/courses';
|
|
||||||
import { CoreCoursesHelperProvider } from './services/courses-helper';
|
|
||||||
import { CoreCoursesDashboardProvider } from './services/dashboard';
|
|
||||||
import { CoreCoursesCourseLinkHandler } from './services/handlers/course-link';
|
import { CoreCoursesCourseLinkHandler } from './services/handlers/course-link';
|
||||||
import { CoreCoursesIndexLinkHandler } from './services/handlers/courses-index-link';
|
import { CoreCoursesIndexLinkHandler } from './services/handlers/courses-index-link';
|
||||||
|
|
||||||
|
@ -42,11 +39,22 @@ import {
|
||||||
import { CoreCoursesRequestPushClickHandler } from './services/handlers/request-push-click';
|
import { CoreCoursesRequestPushClickHandler } from './services/handlers/request-push-click';
|
||||||
import { CoreCoursesMyCoursesLinkHandler } from './services/handlers/my-courses-link';
|
import { CoreCoursesMyCoursesLinkHandler } from './services/handlers/my-courses-link';
|
||||||
|
|
||||||
export const CORE_COURSES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get courses services.
|
||||||
|
*
|
||||||
|
* @returns Returns courses services.
|
||||||
|
*/
|
||||||
|
export async function getCoursesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreCoursesProvider } = await import('@features/courses/services/courses');
|
||||||
|
const { CoreCoursesDashboardProvider } = await import('@features/courses/services/dashboard');
|
||||||
|
const { CoreCoursesHelperProvider } = await import('@features/courses/services/courses-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreCoursesProvider,
|
CoreCoursesProvider,
|
||||||
CoreCoursesDashboardProvider,
|
CoreCoursesDashboardProvider,
|
||||||
CoreCoursesHelperProvider,
|
CoreCoursesHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuHomeChildrenRoutes: Routes = [
|
const mainMenuHomeChildrenRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,11 +17,19 @@ import { NgModule, Type } from '@angular/core';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { CoreEditorComponentsModule } from './components/components.module';
|
import { CoreEditorComponentsModule } from './components/components.module';
|
||||||
import { SITE_SCHEMA } from './services/database/editor';
|
import { SITE_SCHEMA } from './services/database/editor';
|
||||||
import { CoreEditorOfflineProvider } from './services/editor-offline';
|
|
||||||
|
|
||||||
export const CORE_EDITOR_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get editor services.
|
||||||
|
*
|
||||||
|
* @returns Returns editor services.
|
||||||
|
*/
|
||||||
|
export async function getEditorServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreEditorOfflineProvider } = await import('@features/editor/services/editor-offline');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreEditorOfflineProvider,
|
CoreEditorOfflineProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -14,15 +14,22 @@
|
||||||
|
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { CoreEnrolDelegateService } from './services/enrol-delegate';
|
/**
|
||||||
import { CoreEnrolService } from './services/enrol';
|
* Get enrol services.
|
||||||
import { CoreEnrolHelperService } from './services/enrol-helper';
|
*
|
||||||
|
* @returns Returns enrol services.
|
||||||
|
*/
|
||||||
|
export async function getEnrolServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreEnrolDelegateService } = await import('@features/enrol/services/enrol-delegate');
|
||||||
|
const { CoreEnrolService } = await import('@features/enrol/services/enrol');
|
||||||
|
const { CoreEnrolHelperService } = await import('@features/enrol/services/enrol-helper');
|
||||||
|
|
||||||
export const CORE_ENROL_SERVICES: Type<unknown>[] = [
|
return [
|
||||||
CoreEnrolService,
|
CoreEnrolService,
|
||||||
CoreEnrolHelperService,
|
CoreEnrolHelperService,
|
||||||
CoreEnrolDelegateService,
|
CoreEnrolDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({})
|
@NgModule({})
|
||||||
export class CoreEnrolModule {}
|
export class CoreEnrolModule {}
|
||||||
|
|
|
@ -14,20 +14,29 @@
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { CoreFileUploaderProvider } from './services/fileuploader';
|
import { CoreFileUploaderDelegate } from './services/fileuploader-delegate';
|
||||||
import { CoreFileUploaderDelegate, CoreFileUploaderDelegateService } from './services/fileuploader-delegate';
|
|
||||||
import { CoreFileUploaderHelperProvider } from './services/fileuploader-helper';
|
|
||||||
import { CoreFileUploaderAlbumHandler } from './services/handlers/album';
|
import { CoreFileUploaderAlbumHandler } from './services/handlers/album';
|
||||||
import { CoreFileUploaderAudioHandler } from './services/handlers/audio';
|
import { CoreFileUploaderAudioHandler } from './services/handlers/audio';
|
||||||
import { CoreFileUploaderCameraHandler } from './services/handlers/camera';
|
import { CoreFileUploaderCameraHandler } from './services/handlers/camera';
|
||||||
import { CoreFileUploaderFileHandler } from './services/handlers/file';
|
import { CoreFileUploaderFileHandler } from './services/handlers/file';
|
||||||
import { CoreFileUploaderVideoHandler } from './services/handlers/video';
|
import { CoreFileUploaderVideoHandler } from './services/handlers/video';
|
||||||
|
|
||||||
export const CORE_FILEUPLOADER_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get file uploaded services.
|
||||||
|
*
|
||||||
|
* @returns Returns file uploaded services.
|
||||||
|
*/
|
||||||
|
export async function getFileUploadedServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreFileUploaderProvider } = await import('@features/fileuploader/services/fileuploader');
|
||||||
|
const { CoreFileUploaderDelegateService } = await import('@features/fileuploader/services/fileuploader-delegate');
|
||||||
|
const { CoreFileUploaderHelperProvider } = await import('@features/fileuploader/services/fileuploader-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreFileUploaderProvider,
|
CoreFileUploaderProvider,
|
||||||
CoreFileUploaderHelperProvider,
|
CoreFileUploaderHelperProvider,
|
||||||
CoreFileUploaderDelegateService,
|
CoreFileUploaderDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
|
@ -13,15 +13,23 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
import { CoreFilterProvider } from './services/filter';
|
|
||||||
import { CoreFilterDelegateService } from './services/filter-delegate';
|
|
||||||
import { CoreFilterHelperProvider } from './services/filter-helper';
|
|
||||||
|
|
||||||
export const CORE_FILTER_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get filter services.
|
||||||
|
*
|
||||||
|
* @returns Returns filter services.
|
||||||
|
*/
|
||||||
|
export async function getFilterServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreFilterProvider } = await import('@features/filter/services/filter');
|
||||||
|
const { CoreFilterDelegateService } = await import('@features/filter/services/filter-delegate');
|
||||||
|
const { CoreFilterHelperProvider } = await import('@features/filter/services/filter-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreFilterProvider,
|
CoreFilterProvider,
|
||||||
CoreFilterDelegateService,
|
CoreFilterDelegateService,
|
||||||
CoreFilterHelperProvider,
|
CoreFilterHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({})
|
@NgModule({})
|
||||||
export class CoreFilterModule {}
|
export class CoreFilterModule {}
|
||||||
|
|
|
@ -21,8 +21,7 @@ import { CoreCourseOptionsDelegate } from '@features/course/services/course-opti
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
import { CoreUserDelegate } from '@features/user/services/user-delegate';
|
||||||
import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module';
|
import { PARTICIPANTS_PAGE_NAME } from '@features/user/user.module';
|
||||||
import { CoreGradesProvider } from './services/grades';
|
import { GRADES_PAGE_NAME, GRADES_PARTICIPANTS_PAGE_NAME } from './services/grades-helper';
|
||||||
import { CoreGradesHelperProvider, GRADES_PAGE_NAME, GRADES_PARTICIPANTS_PAGE_NAME } from './services/grades-helper';
|
|
||||||
import { CoreGradesCourseOptionHandler } from './services/handlers/course-option';
|
import { CoreGradesCourseOptionHandler } from './services/handlers/course-option';
|
||||||
import { CoreGradesOverviewLinkHandler } from './services/handlers/overview-link';
|
import { CoreGradesOverviewLinkHandler } from './services/handlers/overview-link';
|
||||||
import { CoreGradesUserHandler } from './services/handlers/user';
|
import { CoreGradesUserHandler } from './services/handlers/user';
|
||||||
|
@ -33,10 +32,20 @@ import { conditionalRoutes } from '@/app/app-routing.module';
|
||||||
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
||||||
import { CoreScreen } from '@services/screen';
|
import { CoreScreen } from '@services/screen';
|
||||||
|
|
||||||
export const CORE_GRADES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get grades services.
|
||||||
|
*
|
||||||
|
* @returns Returns grades services.
|
||||||
|
*/
|
||||||
|
export async function getGradesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreGradesProvider } = await import('@features/grades/services/grades');
|
||||||
|
const { CoreGradesHelperProvider } = await import('@features/grades/services/grades-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreGradesProvider,
|
CoreGradesProvider,
|
||||||
CoreGradesHelperProvider,
|
CoreGradesHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuChildrenRoutes: Routes = [
|
const mainMenuChildrenRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,12 +18,20 @@ import { CorePluginFileDelegate } from '@services/plugin-file-delegate';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { CoreH5PComponentsModule } from './components/components.module';
|
import { CoreH5PComponentsModule } from './components/components.module';
|
||||||
import { SITE_SCHEMA } from './services/database/h5p';
|
import { SITE_SCHEMA } from './services/database/h5p';
|
||||||
import { CoreH5PProvider } from './services/h5p';
|
|
||||||
import { CoreH5PPluginFileHandler } from './services/handlers/pluginfile';
|
import { CoreH5PPluginFileHandler } from './services/handlers/pluginfile';
|
||||||
|
|
||||||
export const CORE_H5P_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get H5P services.
|
||||||
|
*
|
||||||
|
* @returns Returns H5P services.
|
||||||
|
*/
|
||||||
|
export async function getH5PServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreH5PProvider } = await import('@features/h5p/services/h5p');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreH5PProvider,
|
CoreH5PProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -12,19 +12,28 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AppRoutingModule } from '@/app/app-routing.module';
|
import { AppRoutingModule } from '@/app/app-routing.module';
|
||||||
import { CoreLoginHelper, CoreLoginHelperProvider } from './services/login-helper';
|
import { CoreLoginHelper } from './services/login-helper';
|
||||||
import { redirectGuard } from '@guards/redirect';
|
import { redirectGuard } from '@guards/redirect';
|
||||||
import { CoreLoginCronHandler } from './services/handlers/cron';
|
import { CoreLoginCronHandler } from './services/handlers/cron';
|
||||||
import { CoreCronDelegate } from '@services/cron';
|
import { CoreCronDelegate } from '@services/cron';
|
||||||
import { CoreEvents } from '@singletons/events';
|
import { CoreEvents } from '@singletons/events';
|
||||||
|
|
||||||
export const CORE_LOGIN_SERVICES = [
|
/**
|
||||||
|
* Get login services.
|
||||||
|
*
|
||||||
|
* @returns Returns login services.
|
||||||
|
*/
|
||||||
|
export async function getLoginServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreLoginHelperProvider } = await import('@features/login/services/login-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreLoginHelperProvider,
|
CoreLoginHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,22 +12,31 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { authGuard } from '@features/mainmenu/guards/auth';
|
import { authGuard } from '@features/mainmenu/guards/auth';
|
||||||
|
|
||||||
import { AppRoutingModule } from '@/app/app-routing.module';
|
import { AppRoutingModule } from '@/app/app-routing.module';
|
||||||
|
|
||||||
import { CoreMainMenuDelegate, CoreMainMenuDelegateService } from './services/mainmenu-delegate';
|
import { CoreMainMenuDelegate } from './services/mainmenu-delegate';
|
||||||
import { CoreMainMenuHomeHandler } from './services/handlers/mainmenu';
|
import { CoreMainMenuHomeHandler } from './services/handlers/mainmenu';
|
||||||
import { CoreMainMenuProvider } from './services/mainmenu';
|
|
||||||
import { CoreMainMenuHomeDelegateService } from './services/home-delegate';
|
|
||||||
|
|
||||||
export const CORE_MAINMENU_SERVICES = [
|
/**
|
||||||
|
* Get main menu services.
|
||||||
|
*
|
||||||
|
* @returns Returns main menu services.
|
||||||
|
*/
|
||||||
|
export async function getMainMenuServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreMainMenuHomeDelegateService } = await import('@features/mainmenu/services/home-delegate');
|
||||||
|
const { CoreMainMenuDelegateService } = await import('@features/mainmenu/services/mainmenu-delegate');
|
||||||
|
const { CoreMainMenuProvider } = await import('@features/mainmenu/services/mainmenu');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreMainMenuHomeDelegateService,
|
CoreMainMenuHomeDelegateService,
|
||||||
CoreMainMenuDelegateService,
|
CoreMainMenuDelegateService,
|
||||||
CoreMainMenuProvider,
|
CoreMainMenuProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { Badge } from '@awesome-cordova-plugins/badge/ngx';
|
import { Badge } from '@awesome-cordova-plugins/badge/ngx';
|
||||||
import { Camera } from '@awesome-cordova-plugins/camera/ngx';
|
import { Camera } from '@awesome-cordova-plugins/camera/ngx';
|
||||||
|
@ -24,7 +24,6 @@ import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||||
import { Geolocation } from '@awesome-cordova-plugins/geolocation/ngx';
|
import { Geolocation } from '@awesome-cordova-plugins/geolocation/ngx';
|
||||||
import { HTTP } from '@awesome-cordova-plugins/http/ngx';
|
import { HTTP } from '@awesome-cordova-plugins/http/ngx';
|
||||||
import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx';
|
import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx';
|
||||||
import { WebView } from '@awesome-cordova-plugins/ionic-webview/ngx';
|
|
||||||
import { Keyboard } from '@awesome-cordova-plugins/keyboard/ngx';
|
import { Keyboard } from '@awesome-cordova-plugins/keyboard/ngx';
|
||||||
import { LocalNotifications } from '@awesome-cordova-plugins/local-notifications/ngx';
|
import { LocalNotifications } from '@awesome-cordova-plugins/local-notifications/ngx';
|
||||||
import { MediaCapture } from '@awesome-cordova-plugins/media-capture/ngx';
|
import { MediaCapture } from '@awesome-cordova-plugins/media-capture/ngx';
|
||||||
|
@ -34,9 +33,16 @@ import { SplashScreen } from '@awesome-cordova-plugins/splash-screen/ngx';
|
||||||
import { SQLite } from '@awesome-cordova-plugins/sqlite/ngx';
|
import { SQLite } from '@awesome-cordova-plugins/sqlite/ngx';
|
||||||
import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
||||||
import { WebIntent } from '@awesome-cordova-plugins/web-intent/ngx';
|
import { WebIntent } from '@awesome-cordova-plugins/web-intent/ngx';
|
||||||
|
import { WebView } from '@awesome-cordova-plugins/ionic-webview/ngx';
|
||||||
import { Zip } from '@features/native/plugins/zip';
|
import { Zip } from '@features/native/plugins/zip';
|
||||||
|
|
||||||
export const CORE_NATIVE_SERVICES = [
|
/**
|
||||||
|
* Get native services.
|
||||||
|
*
|
||||||
|
* @returns Returns native services.
|
||||||
|
*/
|
||||||
|
export async function getNativeServices(): Promise<Type<unknown>[]> {
|
||||||
|
return [
|
||||||
Badge,
|
Badge,
|
||||||
Camera,
|
Camera,
|
||||||
Chooser,
|
Chooser,
|
||||||
|
@ -53,17 +59,19 @@ export const CORE_NATIVE_SERVICES = [
|
||||||
Push,
|
Push,
|
||||||
QRScanner,
|
QRScanner,
|
||||||
SplashScreen,
|
SplashScreen,
|
||||||
StatusBar,
|
|
||||||
SQLite,
|
SQLite,
|
||||||
|
StatusBar,
|
||||||
WebIntent,
|
WebIntent,
|
||||||
WebView,
|
WebView,
|
||||||
Zip,
|
Zip,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
Badge,
|
Badge,
|
||||||
Camera,
|
Camera,
|
||||||
|
Chooser,
|
||||||
Clipboard,
|
Clipboard,
|
||||||
Device,
|
Device,
|
||||||
File,
|
File,
|
||||||
|
@ -74,11 +82,14 @@ export const CORE_NATIVE_SERVICES = [
|
||||||
Keyboard,
|
Keyboard,
|
||||||
LocalNotifications,
|
LocalNotifications,
|
||||||
MediaCapture,
|
MediaCapture,
|
||||||
|
Push,
|
||||||
|
QRScanner,
|
||||||
SplashScreen,
|
SplashScreen,
|
||||||
SQLite,
|
SQLite,
|
||||||
StatusBar,
|
StatusBar,
|
||||||
WebIntent,
|
WebIntent,
|
||||||
WebView,
|
WebView,
|
||||||
|
Zip,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class CoreNativeModule {}
|
export class CoreNativeModule {}
|
||||||
|
|
|
@ -19,13 +19,22 @@ import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { SITE_SCHEMA } from './services/database/pushnotifications';
|
import { SITE_SCHEMA } from './services/database/pushnotifications';
|
||||||
import { CorePushNotificationsRegisterCronHandler } from './services/handlers/register-cron';
|
import { CorePushNotificationsRegisterCronHandler } from './services/handlers/register-cron';
|
||||||
import { CorePushNotificationsUnregisterCronHandler } from './services/handlers/unregister-cron';
|
import { CorePushNotificationsUnregisterCronHandler } from './services/handlers/unregister-cron';
|
||||||
import { CorePushNotificationsDelegateService } from './services/push-delegate';
|
import { CorePushNotifications } from './services/pushnotifications';
|
||||||
import { CorePushNotifications, CorePushNotificationsProvider } from './services/pushnotifications';
|
|
||||||
|
|
||||||
export const CORE_PUSHNOTIFICATIONS_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get push notifications services.
|
||||||
|
*
|
||||||
|
* @returns Returns push notifications services.
|
||||||
|
*/
|
||||||
|
export async function getPushNotificationsServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CorePushNotificationsProvider } = await import('@features/pushnotifications/services/pushnotifications');
|
||||||
|
const { CorePushNotificationsDelegateService } = await import('@features/pushnotifications/services/push-delegate');
|
||||||
|
|
||||||
|
return [
|
||||||
CorePushNotificationsProvider,
|
CorePushNotificationsProvider,
|
||||||
CorePushNotificationsDelegateService,
|
CorePushNotificationsDelegateService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|
|
@ -14,18 +14,26 @@
|
||||||
|
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { CoreQuestionBehaviourDelegateService } from './services/behaviour-delegate';
|
|
||||||
import { QUESTION_SITE_SCHEMA } from './services/database/question';
|
import { QUESTION_SITE_SCHEMA } from './services/database/question';
|
||||||
import { CoreQuestionProvider } from './services/question';
|
|
||||||
import { CoreQuestionDelegateService } from './services/question-delegate';
|
|
||||||
import { CoreQuestionHelperProvider } from './services/question-helper';
|
|
||||||
|
|
||||||
export const CORE_QUESTION_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get question services.
|
||||||
|
*
|
||||||
|
* @returns Returns question services.
|
||||||
|
*/
|
||||||
|
export async function getQuestionServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreQuestionProvider } = await import('@features/question/services/question');
|
||||||
|
const { CoreQuestionDelegateService } = await import('@features/question/services/question-delegate');
|
||||||
|
const { CoreQuestionBehaviourDelegateService } = await import('@features/question/services/behaviour-delegate');
|
||||||
|
const { CoreQuestionHelperProvider } = await import('@features/question/services/question-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreQuestionProvider,
|
CoreQuestionProvider,
|
||||||
CoreQuestionDelegateService,
|
CoreQuestionDelegateService,
|
||||||
CoreQuestionBehaviourDelegateService,
|
CoreQuestionBehaviourDelegateService,
|
||||||
CoreQuestionHelperProvider,
|
CoreQuestionHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
|
@ -15,15 +15,23 @@
|
||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { RATINGS_SITE_SCHEMA } from './services/database/rating';
|
import { RATINGS_SITE_SCHEMA } from './services/database/rating';
|
||||||
import { CoreRatingProvider } from './services/rating';
|
|
||||||
import { CoreRatingOfflineProvider } from './services/rating-offline';
|
|
||||||
import { CoreRatingSyncProvider } from './services/rating-sync';
|
|
||||||
|
|
||||||
export const CORE_RATING_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get rating services.
|
||||||
|
*
|
||||||
|
* @returns Returns rating services.
|
||||||
|
*/
|
||||||
|
export async function getRatingServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreRatingProvider } = await import('@features/rating/services/rating');
|
||||||
|
const { CoreRatingOfflineProvider } = await import('@features/rating/services/rating-offline');
|
||||||
|
const { CoreRatingSyncProvider } = await import('@features/rating/services/rating-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreRatingProvider,
|
CoreRatingProvider,
|
||||||
CoreRatingSyncProvider,
|
CoreRatingSyncProvider,
|
||||||
CoreRatingOfflineProvider,
|
CoreRatingOfflineProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
|
@ -12,15 +12,11 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { CoreRemindersComponentsModule } from './components/components.module';
|
import { CoreRemindersComponentsModule } from './components/components.module';
|
||||||
import { REMINDERS_SITE_SCHEMA } from './services/database/reminders';
|
import { REMINDERS_SITE_SCHEMA } from './services/database/reminders';
|
||||||
import { CoreReminders, CoreRemindersService } from './services/reminders';
|
import { CoreReminders } from './services/reminders';
|
||||||
|
|
||||||
export const CORE_REMINDERS_SERVICES: Type<unknown>[] = [
|
|
||||||
CoreRemindersService,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -17,21 +17,29 @@ import { Routes } from '@angular/router';
|
||||||
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
|
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CoreMainMenuDelegate } from '@features/mainmenu/services/mainmenu-delegate';
|
import { CoreMainMenuDelegate } from '@features/mainmenu/services/mainmenu-delegate';
|
||||||
import { CoreSearchGlobalSearchService } from '@features/search/services/global-search';
|
|
||||||
import { CoreSearchMainMenuHandler, CORE_SEARCH_PAGE_NAME } from '@features/search/services/handlers/mainmenu';
|
import { CoreSearchMainMenuHandler, CORE_SEARCH_PAGE_NAME } from '@features/search/services/handlers/mainmenu';
|
||||||
|
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
|
|
||||||
import { CoreSearchComponentsModule } from './components/components.module';
|
import { CoreSearchComponentsModule } from './components/components.module';
|
||||||
import { SITE_SCHEMA } from './services/search-history-db';
|
import { SITE_SCHEMA } from './services/search-history-db';
|
||||||
import { CoreSearchHistoryProvider } from './services/search-history.service';
|
|
||||||
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
||||||
import { CoreSearchGlobalSearchLinkHandler } from '@features/search/services/handlers/global-search-link';
|
import { CoreSearchGlobalSearchLinkHandler } from '@features/search/services/handlers/global-search-link';
|
||||||
|
|
||||||
export const CORE_SEARCH_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get search services.
|
||||||
|
*
|
||||||
|
* @returns Returns search services.
|
||||||
|
*/
|
||||||
|
export async function getSearchServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreSearchHistoryProvider } = await import('@features/search/services/search-history.service');
|
||||||
|
const { CoreSearchGlobalSearchService } = await import('@features/search/services/global-search');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreSearchHistoryProvider,
|
CoreSearchHistoryProvider,
|
||||||
CoreSearchGlobalSearchService,
|
CoreSearchGlobalSearchService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuChildrenRoutes: Routes = [
|
const mainMenuChildrenRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,13 +17,22 @@ import { Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AppRoutingModule } from '@/app/app-routing.module';
|
import { AppRoutingModule } from '@/app/app-routing.module';
|
||||||
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||||
import { CoreSettingsHelper, CoreSettingsHelperProvider } from './services/settings-helper';
|
import { CoreSettingsHelper } from './services/settings-helper';
|
||||||
import { CoreSettingsDelegateService } from './services/settings-delegate';
|
|
||||||
|
|
||||||
export const CORE_SETTINGS_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get settings services.
|
||||||
|
*
|
||||||
|
* @returns Returns settings services.
|
||||||
|
*/
|
||||||
|
export async function getSettingsServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreSettingsDelegateService } = await import('@features/settings/services/settings-delegate');
|
||||||
|
const { CoreSettingsHelperProvider } = await import('@features/settings/services/settings-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreSettingsDelegateService,
|
CoreSettingsDelegateService,
|
||||||
CoreSettingsHelperProvider,
|
CoreSettingsHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,23 @@ import { CoreSettingsDelegate } from '@features/settings/services/settings-deleg
|
||||||
import { CoreSharedFilesComponentsModule } from './components/components.module';
|
import { CoreSharedFilesComponentsModule } from './components/components.module';
|
||||||
import { CoreSharedFilesSettingsHandler } from './services/handlers/settings';
|
import { CoreSharedFilesSettingsHandler } from './services/handlers/settings';
|
||||||
import { CoreSharedFilesUploadHandler } from './services/handlers/upload';
|
import { CoreSharedFilesUploadHandler } from './services/handlers/upload';
|
||||||
import { CoreSharedFiles, CoreSharedFilesProvider } from './services/sharedfiles';
|
import { CoreSharedFiles } from './services/sharedfiles';
|
||||||
import { CoreSharedFilesHelper, CoreSharedFilesHelperProvider } from './services/sharedfiles-helper';
|
import { CoreSharedFilesHelper } from './services/sharedfiles-helper';
|
||||||
|
|
||||||
export const CORE_SHAREDFILES_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get shared files services.
|
||||||
|
*
|
||||||
|
* @returns Returns shared files services.
|
||||||
|
*/
|
||||||
|
export async function getSharedFilesServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreSharedFilesProvider } = await import('@features/sharedfiles/services/sharedfiles');
|
||||||
|
const { CoreSharedFilesHelperProvider } = await import('@features/sharedfiles/services/sharedfiles-helper');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreSharedFilesProvider,
|
CoreSharedFilesProvider,
|
||||||
CoreSharedFilesHelperProvider,
|
CoreSharedFilesHelperProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export const SHAREDFILES_PAGE_NAME = 'sharedfiles';
|
export const SHAREDFILES_PAGE_NAME = 'sharedfiles';
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,19 @@ import { CoreContentLinksDelegate } from '@features/contentlinks/services/conten
|
||||||
import { CoreSiteHomeHomeHandler, CoreSiteHomeHomeHandlerService } from './services/handlers/sitehome-home';
|
import { CoreSiteHomeHomeHandler, CoreSiteHomeHomeHandlerService } from './services/handlers/sitehome-home';
|
||||||
import { CoreMainMenuHomeDelegate } from '@features/mainmenu/services/home-delegate';
|
import { CoreMainMenuHomeDelegate } from '@features/mainmenu/services/home-delegate';
|
||||||
import { CoreMainMenuHomeRoutingModule } from '@features/mainmenu/mainmenu-home-routing.module';
|
import { CoreMainMenuHomeRoutingModule } from '@features/mainmenu/mainmenu-home-routing.module';
|
||||||
import { CoreSiteHomeProvider } from './services/sitehome';
|
|
||||||
|
|
||||||
export const CORE_SITEHOME_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get site home services.
|
||||||
|
*
|
||||||
|
* @returns Returns site home services.
|
||||||
|
*/
|
||||||
|
export async function getSiteHomeServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreSiteHomeProvider } = await import('@features/sitehome/services/sitehome');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreSiteHomeProvider,
|
CoreSiteHomeProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
const mainMenuHomeRoutes: Routes = [
|
const mainMenuHomeRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,12 +13,20 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
import { APP_INITIALIZER, NgModule, Type } from '@angular/core';
|
||||||
import { CoreStyles, CoreStylesService } from './services/styles';
|
import { CoreStyles } from './services/styles';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
/**
|
||||||
export const CORE_STYLE_SERVICES: Type<unknown>[] = [
|
* Get style services.
|
||||||
|
*
|
||||||
|
* @returns Returns style services.
|
||||||
|
*/
|
||||||
|
export async function getStyleServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreStylesService } = await import('@features/styles/services/styles');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreStylesService,
|
CoreStylesService,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-ro
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/user';
|
import { SITE_SCHEMA, OFFLINE_SITE_SCHEMA } from './services/database/user';
|
||||||
import { CoreUserComponentsModule } from './components/components.module';
|
import { CoreUserComponentsModule } from './components/components.module';
|
||||||
import { CoreUserDelegate, CoreUserDelegateService } from './services/user-delegate';
|
import { CoreUserDelegate } from './services/user-delegate';
|
||||||
import { CoreUserProfileMailHandler } from './services/handlers/profile-mail';
|
import { CoreUserProfileMailHandler } from './services/handlers/profile-mail';
|
||||||
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
import { CoreContentLinksDelegate } from '@features/contentlinks/services/contentlinks-delegate';
|
||||||
import { CoreUserProfileLinkHandler } from './services/handlers/profile-link';
|
import { CoreUserProfileLinkHandler } from './services/handlers/profile-link';
|
||||||
|
@ -30,25 +30,35 @@ import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate';
|
||||||
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
import { CoreCourseIndexRoutingModule } from '@features/course/course-routing.module';
|
||||||
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
|
||||||
import { CoreUserCourseOptionHandler } from './services/handlers/course-option';
|
import { CoreUserCourseOptionHandler } from './services/handlers/course-option';
|
||||||
import { CoreUserProfileFieldDelegateService } from './services/user-profile-field-delegate';
|
import { CoreUserHelper } from './services/user-helper';
|
||||||
import { CoreUserProvider } from './services/user';
|
|
||||||
import { CoreUserHelper, CoreUserHelperProvider } from './services/user-helper';
|
|
||||||
import { CoreUserOfflineProvider } from './services/user-offline';
|
|
||||||
import { CoreUserSyncProvider } from './services/user-sync';
|
|
||||||
import { AppRoutingModule, conditionalRoutes } from '@/app/app-routing.module';
|
import { AppRoutingModule, conditionalRoutes } from '@/app/app-routing.module';
|
||||||
import { CoreScreen } from '@services/screen';
|
import { CoreScreen } from '@services/screen';
|
||||||
import { COURSE_PAGE_NAME } from '@features/course/course.module';
|
import { COURSE_PAGE_NAME } from '@features/course/course.module';
|
||||||
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
import { COURSE_INDEX_PATH } from '@features/course/course-lazy.module';
|
||||||
import { CoreEvents } from '@singletons/events';
|
import { CoreEvents } from '@singletons/events';
|
||||||
|
|
||||||
export const CORE_USER_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
CoreUserDelegateService,
|
* Get user services.
|
||||||
CoreUserProfileFieldDelegateService,
|
*
|
||||||
|
* @returns Returns user services.
|
||||||
|
*/
|
||||||
|
export async function getUsersServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreUserProvider } = await import('@features/user/services/user');
|
||||||
|
const { CoreUserHelperProvider } = await import('@features/user/services/user-helper');
|
||||||
|
const { CoreUserDelegateService } = await import('@features/user/services/user-delegate');
|
||||||
|
const { CoreUserProfileFieldDelegateService } = await import('@features/user/services/user-profile-field-delegate');
|
||||||
|
const { CoreUserOfflineProvider } = await import('@features/user/services/user-offline');
|
||||||
|
const { CoreUserSyncProvider } = await import('@features/user/services/user-sync');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreUserProvider,
|
CoreUserProvider,
|
||||||
CoreUserHelperProvider,
|
CoreUserHelperProvider,
|
||||||
|
CoreUserDelegateService,
|
||||||
|
CoreUserProfileFieldDelegateService,
|
||||||
CoreUserOfflineProvider,
|
CoreUserOfflineProvider,
|
||||||
CoreUserSyncProvider,
|
CoreUserSyncProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export const PARTICIPANTS_PAGE_NAME = 'participants';
|
export const PARTICIPANTS_PAGE_NAME = 'participants';
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,21 @@ import { NgModule, Type } from '@angular/core';
|
||||||
|
|
||||||
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
import { CORE_SITE_SCHEMAS } from '@services/sites';
|
||||||
import { SITE_SCHEMA } from './services/database/xapi';
|
import { SITE_SCHEMA } from './services/database/xapi';
|
||||||
import { CoreXAPIOfflineProvider } from './services/offline';
|
|
||||||
import { CoreXAPIProvider } from './services/xapi';
|
|
||||||
|
|
||||||
export const CORE_XAPI_SERVICES: Type<unknown>[] = [
|
/**
|
||||||
|
* Get XAPI services.
|
||||||
|
*
|
||||||
|
* @returns Returns XAPI services.
|
||||||
|
*/
|
||||||
|
export async function getXAPIServices(): Promise<Type<unknown>[]> {
|
||||||
|
const { CoreXAPIProvider } = await import('@features/xapi/services/xapi');
|
||||||
|
const { CoreXAPIOfflineProvider } = await import('@features/xapi/services/offline');
|
||||||
|
|
||||||
|
return [
|
||||||
CoreXAPIProvider,
|
CoreXAPIProvider,
|
||||||
CoreXAPIOfflineProvider,
|
CoreXAPIOfflineProvider,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
Loading…
Reference in New Issue