MOBILE-4616 chore: Import side modals during runtime
parent
3f9ea653f9
commit
48259062fd
|
@ -18,13 +18,11 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
|
||||
import { AddonCalendarCalendarComponent } from './calendar/calendar';
|
||||
import { AddonCalendarUpcomingEventsComponent } from './upcoming-events/upcoming-events';
|
||||
import { AddonCalendarFilterComponent } from './filter/filter';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonCalendarCalendarComponent,
|
||||
AddonCalendarUpcomingEventsComponent,
|
||||
AddonCalendarFilterComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -32,7 +30,6 @@ import { AddonCalendarFilterComponent } from './filter/filter';
|
|||
exports: [
|
||||
AddonCalendarCalendarComponent,
|
||||
AddonCalendarUpcomingEventsComponent,
|
||||
AddonCalendarFilterComponent,
|
||||
],
|
||||
})
|
||||
export class AddonCalendarComponentsModule {}
|
||||
|
|
|
@ -20,6 +20,7 @@ import { CoreEvents } from '@singletons/events';
|
|||
import { AddonCalendarEventType, AddonCalendarProvider } from '../../services/calendar';
|
||||
import { AddonCalendarFilter, AddonCalendarEventIcons } from '../../services/calendar-helper';
|
||||
import { ALL_COURSES_ID } from '@features/courses/services/courses-helper';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to display the events filter that includes events types and a list of courses.
|
||||
|
@ -28,6 +29,10 @@ import { ALL_COURSES_ID } from '@features/courses/services/courses-helper';
|
|||
selector: 'addon-calendar-filter',
|
||||
templateUrl: 'filter.html',
|
||||
styleUrls: ['../../calendar-common.scss', 'filter.scss'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonCalendarFilterComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import { AddonCalendarFilter, AddonCalendarHelper } from '../../services/calenda
|
|||
import { AddonCalendarSync, AddonCalendarSyncProvider } from '../../services/calendar-sync';
|
||||
import { CoreCategoryData, CoreCourses, CoreEnrolledCourseData } from '@features/courses/services/courses';
|
||||
import { CoreCoursesHelper } from '@features/courses/services/courses-helper';
|
||||
import { AddonCalendarFilterComponent } from '../../components/filter/filter';
|
||||
import moment from 'moment-timezone';
|
||||
import { NgZone, Translate } from '@singletons';
|
||||
import { CoreNavigator } from '@services/navigator';
|
||||
|
@ -376,6 +375,8 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy {
|
|||
* Show the filter menu.
|
||||
*/
|
||||
async openFilter(): Promise<void> {
|
||||
const { AddonCalendarFilterComponent } = await import('../../components/filter/filter');
|
||||
|
||||
await CoreModals.openSideModal({
|
||||
component: AddonCalendarFilterComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -28,7 +28,6 @@ import { CoreEnrolledCourseData } from '@features/courses/services/courses';
|
|||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { AddonCalendarCalendarComponent } from '../../components/calendar/calendar';
|
||||
import { AddonCalendarUpcomingEventsComponent } from '../../components/upcoming-events/upcoming-events';
|
||||
import { AddonCalendarFilterComponent } from '../../components/filter/filter';
|
||||
import { CoreNavigator } from '@services/navigator';
|
||||
import { CoreConstants } from '@/core/constants';
|
||||
import { CoreMainMenuDeepLinkManager } from '@features/mainmenu/classes/deep-link-manager';
|
||||
|
@ -331,6 +330,8 @@ export class AddonCalendarIndexPage implements OnInit, OnDestroy {
|
|||
* Show the filter menu.
|
||||
*/
|
||||
async openFilter(): Promise<void> {
|
||||
const { AddonCalendarFilterComponent } = await import('../../components/filter/filter');
|
||||
|
||||
await CoreModals.openSideModal({
|
||||
component: AddonCalendarFilterComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -25,8 +25,6 @@ import { CoreCourseComponentsModule } from '@features/course/components/componen
|
|||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModBBBIndexComponent,
|
||||
],
|
||||
|
|
|
@ -18,12 +18,10 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
import { AddonModBookIndexComponent } from './index/index';
|
||||
import { AddonModBookTocComponent } from './toc/toc';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModBookIndexComponent,
|
||||
AddonModBookTocComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -31,7 +29,6 @@ import { AddonModBookTocComponent } from './toc/toc';
|
|||
],
|
||||
exports: [
|
||||
AddonModBookIndexComponent,
|
||||
AddonModBookTocComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModBookComponentsModule {}
|
||||
|
|
|
@ -16,6 +16,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
|||
import { ModalController } from '@singletons';
|
||||
import { AddonModBookTocChapter, AddonModBookBookWSData } from '../../services/book';
|
||||
import { AddonModBookNumbering } from '../../constants';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal to display the TOC of a book.
|
||||
|
@ -23,7 +24,11 @@ import { AddonModBookNumbering } from '../../constants';
|
|||
@Component({
|
||||
selector: 'addon-mod-book-toc',
|
||||
templateUrl: 'toc.html',
|
||||
styleUrls: ['toc.scss'],
|
||||
styleUrl: 'toc.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModBookTocComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import { CoreDomUtils } from '@services/utils/dom';
|
|||
import { CoreTextUtils } from '@services/utils/text';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { Translate } from '@singletons';
|
||||
import { AddonModBookTocComponent } from '../../components/toc/toc';
|
||||
import {
|
||||
AddonModBook,
|
||||
AddonModBookBookWSData,
|
||||
|
@ -251,6 +250,8 @@ export class AddonModBookContentsPage implements OnInit, OnDestroy {
|
|||
// Create the toc modal.
|
||||
const visibleChapter = this.manager?.getSelectedItem();
|
||||
|
||||
const { AddonModBookTocComponent } = await import('../../components/toc/toc');
|
||||
|
||||
const modalData = await CoreModals.openSideModal<number>({
|
||||
component: AddonModBookTocComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -16,12 +16,10 @@ import { NgModule } from '@angular/core';
|
|||
import { AddonModChatIndexComponent } from './index/index';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { AddonModChatUsersModalComponent } from './users-modal/users-modal';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModChatIndexComponent,
|
||||
AddonModChatUsersModalComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -29,7 +27,6 @@ import { AddonModChatUsersModalComponent } from './users-modal/users-modal';
|
|||
],
|
||||
exports: [
|
||||
AddonModChatIndexComponent,
|
||||
AddonModChatUsersModalComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModChatComponentsModule {}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { CoreNetwork } from '@services/network';
|
||||
import { CoreSites } from '@services/sites';
|
||||
|
@ -19,6 +18,7 @@ import { CoreDomUtils } from '@services/utils/dom';
|
|||
import { ModalController, NgZone } from '@singletons';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { AddonModChat, AddonModChatUser } from '../../services/chat';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* MMdal that displays the chat session users.
|
||||
|
@ -26,6 +26,10 @@ import { AddonModChat, AddonModChatUser } from '../../services/chat';
|
|||
@Component({
|
||||
selector: 'addon-mod-chat-users-modal',
|
||||
templateUrl: 'users-modal.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModChatUsersModalComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { NgZone, Translate } from '@singletons';
|
||||
import { CoreEvents } from '@singletons/events';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { AddonModChatUsersModalComponent, AddonModChatUsersModalResult } from '../../components/users-modal/users-modal';
|
||||
import { AddonModChatUsersModalResult } from '../../components/users-modal/users-modal';
|
||||
import { AddonModChat, AddonModChatUser } from '../../services/chat';
|
||||
import { AddonModChatFormattedMessage, AddonModChatHelper } from '../../services/chat-helper';
|
||||
import { CoreTime } from '@singletons/time';
|
||||
|
@ -187,6 +187,8 @@ export class AddonModChatChatPage implements OnInit, OnDestroy, CanLeave {
|
|||
* Display the chat users modal.
|
||||
*/
|
||||
async showChatUsers(): Promise<void> {
|
||||
const { AddonModChatUsersModalComponent } = await import('../../components/users-modal/users-modal');
|
||||
|
||||
// Create the toc modal.
|
||||
const modalData = await CoreModals.openSideModal<AddonModChatUsersModalResult>({
|
||||
component: AddonModChatUsersModalComponent,
|
||||
|
|
|
@ -25,8 +25,6 @@ import { AddonModChoiceIndexComponent } from './index/index';
|
|||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModChoiceIndexComponent,
|
||||
],
|
||||
|
|
|
@ -25,8 +25,6 @@ import { AddonModFeedbackIndexComponent } from './index/index';
|
|||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModFeedbackIndexComponent,
|
||||
],
|
||||
|
|
|
@ -29,8 +29,6 @@ import { CoreSearchComponentsModule } from '@features/search/components/componen
|
|||
CoreCourseComponentsModule,
|
||||
CoreSearchComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModGlossaryIndexComponent,
|
||||
AddonModGlossaryModePickerPopoverComponent,
|
||||
|
|
|
@ -28,8 +28,6 @@ import { CoreH5PComponentsModule } from '@features/h5p/components/components.mod
|
|||
CoreCourseComponentsModule,
|
||||
CoreH5PComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModH5PActivityIndexComponent,
|
||||
],
|
||||
|
|
|
@ -18,12 +18,10 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
import { AddonModImscpIndexComponent } from './index';
|
||||
import { AddonModImscpTocComponent } from './toc/toc';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModImscpIndexComponent,
|
||||
AddonModImscpTocComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -31,7 +29,6 @@ import { AddonModImscpTocComponent } from './toc/toc';
|
|||
],
|
||||
exports: [
|
||||
AddonModImscpIndexComponent,
|
||||
AddonModImscpTocComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModImscpComponentsModule {}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import { ModalController } from '@singletons';
|
||||
import { AddonModImscpTocItem } from '../../services/imscp';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal to display the TOC of a imscp.
|
||||
|
@ -22,6 +23,10 @@ import { AddonModImscpTocItem } from '../../services/imscp';
|
|||
@Component({
|
||||
selector: 'addon-mod-imscp-toc',
|
||||
templateUrl: 'toc.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModImscpTocComponent {
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import { CoreDomUtils } from '@services/utils/dom';
|
|||
import { CoreTextUtils } from '@services/utils/text';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { Translate } from '@singletons';
|
||||
import { AddonModImscpTocComponent } from '../../components/toc/toc';
|
||||
import { AddonModImscp, AddonModImscpImscp, AddonModImscpTocItem } from '../../services/imscp';
|
||||
import { CoreModals } from '@services/modals';
|
||||
|
||||
|
@ -273,6 +272,8 @@ export class AddonModImscpViewPage implements OnInit {
|
|||
* Show the TOC.
|
||||
*/
|
||||
async showToc(): Promise<void> {
|
||||
const { AddonModImscpTocComponent } = await import('../../components/toc/toc');
|
||||
|
||||
// Create the toc modal.
|
||||
const itemHref = await CoreModals.openSideModal<string>({
|
||||
component: AddonModImscpTocComponent,
|
||||
|
|
|
@ -17,22 +17,17 @@ import { NgModule } from '@angular/core';
|
|||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { AddonModLessonIndexComponent } from './index/index';
|
||||
import { AddonModLessonMenuModalPage } from './menu-modal/menu-modal';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModLessonIndexComponent,
|
||||
AddonModLessonMenuModalPage,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModLessonIndexComponent,
|
||||
AddonModLessonMenuModalPage,
|
||||
],
|
||||
})
|
||||
export class AddonModLessonComponentsModule {}
|
||||
|
|
|
@ -16,6 +16,7 @@ import { Component, Input } from '@angular/core';
|
|||
|
||||
import { ModalController } from '@singletons';
|
||||
import { AddonModLessonPlayerPage } from '../../pages/player/player';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal that renders the lesson menu and media file.
|
||||
|
@ -23,6 +24,10 @@ import { AddonModLessonPlayerPage } from '../../pages/player/player';
|
|||
@Component({
|
||||
selector: 'page-addon-mod-lesson-menu-modal',
|
||||
templateUrl: 'menu-modal.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModLessonMenuModalPage {
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { CoreWSExternalFile } from '@services/ws';
|
||||
import { ModalController, Translate } from '@singletons';
|
||||
import { CoreEvents } from '@singletons/events';
|
||||
import { AddonModLessonMenuModalPage } from '../../components/menu-modal/menu-modal';
|
||||
import {
|
||||
AddonModLesson,
|
||||
AddonModLessonEOLPageDataEntry,
|
||||
|
@ -830,6 +829,8 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy, CanLeave {
|
|||
async showMenu(): Promise<void> {
|
||||
this.menuShown = true;
|
||||
|
||||
const { AddonModLessonMenuModalPage } = await import('../../components/menu-modal/menu-modal');
|
||||
|
||||
await CoreModals.openSideModal({
|
||||
component: AddonModLessonMenuModalPage,
|
||||
componentProps: {
|
||||
|
|
|
@ -18,7 +18,6 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { AddonModQuizConnectionErrorComponent } from './connection-error/connection-error';
|
||||
import { AddonModQuizIndexComponent } from './index/index';
|
||||
import { AddonModQuizNavigationModalComponent } from './navigation-modal/navigation-modal';
|
||||
import { AddonModQuizAttemptInfoComponent } from './attempt-info/attempt-info';
|
||||
import { AddonModQuizAttemptStateComponent } from './attempt-state/attempt-state';
|
||||
import { AddonModQuizQuestionCardComponent } from './question-card/question-card';
|
||||
|
@ -29,7 +28,6 @@ import { AddonModQuizQuestionCardComponent } from './question-card/question-card
|
|||
AddonModQuizAttemptStateComponent,
|
||||
AddonModQuizIndexComponent,
|
||||
AddonModQuizConnectionErrorComponent,
|
||||
AddonModQuizNavigationModalComponent,
|
||||
AddonModQuizQuestionCardComponent,
|
||||
],
|
||||
imports: [
|
||||
|
@ -41,7 +39,6 @@ import { AddonModQuizQuestionCardComponent } from './question-card/question-card
|
|||
AddonModQuizAttemptStateComponent,
|
||||
AddonModQuizIndexComponent,
|
||||
AddonModQuizConnectionErrorComponent,
|
||||
AddonModQuizNavigationModalComponent,
|
||||
AddonModQuizQuestionCardComponent,
|
||||
|
||||
],
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
import { CoreQuestionQuestionParsed } from '@features/question/services/question';
|
||||
|
@ -23,6 +24,10 @@ import { ModalController } from '@singletons';
|
|||
@Component({
|
||||
selector: 'addon-mod-quiz-navigation-modal',
|
||||
templateUrl: 'navigation-modal.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModQuizNavigationModalComponent {
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import { ModalController, Translate } from '@singletons';
|
|||
import { CoreEvents } from '@singletons/events';
|
||||
import { AddonModQuizAutoSave } from '../../classes/auto-save';
|
||||
import {
|
||||
AddonModQuizNavigationModalComponent,
|
||||
AddonModQuizNavigationModalReturn,
|
||||
AddonModQuizNavigationQuestion,
|
||||
} from '../../components/navigation-modal/navigation-modal';
|
||||
|
@ -728,6 +727,8 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
|
|||
this.reloadNavigation = false;
|
||||
}
|
||||
|
||||
const { AddonModQuizNavigationModalComponent } = await import('../../components/navigation-modal/navigation-modal');
|
||||
|
||||
// Create the navigation modal.
|
||||
const modalData = await CoreModals.openSideModal<AddonModQuizNavigationModalReturn>({
|
||||
component: AddonModQuizNavigationModalComponent,
|
||||
|
|
|
@ -22,7 +22,6 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { CoreDom } from '@singletons/dom';
|
||||
import { CoreTime } from '@singletons/time';
|
||||
import {
|
||||
AddonModQuizNavigationModalComponent,
|
||||
AddonModQuizNavigationModalReturn,
|
||||
AddonModQuizNavigationQuestion,
|
||||
} from '../../components/navigation-modal/navigation-modal';
|
||||
|
@ -266,6 +265,8 @@ export class AddonModQuizReviewPage implements OnInit {
|
|||
}
|
||||
|
||||
async openNavigation(): Promise<void> {
|
||||
const { AddonModQuizNavigationModalComponent } = await import('../../components/navigation-modal/navigation-modal');
|
||||
|
||||
// Create the navigation modal.
|
||||
const modalData = await CoreModals.openSideModal<AddonModQuizNavigationModalReturn>({
|
||||
component: AddonModQuizNavigationModalComponent,
|
||||
|
|
|
@ -27,8 +27,6 @@ import { AddonModResourceIndexComponent } from './index/index';
|
|||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModResourceIndexComponent,
|
||||
],
|
||||
|
|
|
@ -16,22 +16,17 @@ import { NgModule } from '@angular/core';
|
|||
import { AddonModScormIndexComponent } from './index/index';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { AddonModScormTocComponent } from './toc/toc';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModScormIndexComponent,
|
||||
AddonModScormTocComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
AddonModScormIndexComponent,
|
||||
AddonModScormTocComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModScormComponentsModule {}
|
||||
|
|
|
@ -17,6 +17,7 @@ import { ModalController } from '@singletons';
|
|||
import { AddonModScormGetScormAccessInformationWSResponse } from '../../services/scorm';
|
||||
import { AddonModScormTOCScoWithIcon } from '../../services/scorm-helper';
|
||||
import { AddonModScormMode } from '../../constants';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal to display the TOC of a SCORM.
|
||||
|
@ -24,6 +25,10 @@ import { AddonModScormMode } from '../../constants';
|
|||
@Component({
|
||||
selector: 'addon-mod-scorm-toc',
|
||||
templateUrl: 'toc.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModScormTocComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import { CoreTimeUtils } from '@services/utils/time';
|
|||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreEventObserver, CoreEvents } from '@singletons/events';
|
||||
import { AddonModScormDataModel12 } from '../../classes/data-model-12';
|
||||
import { AddonModScormTocComponent } from '../../components/toc/toc';
|
||||
import {
|
||||
AddonModScorm,
|
||||
AddonModScormAttemptCountResult,
|
||||
|
@ -514,6 +513,8 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
|
|||
* Show the TOC.
|
||||
*/
|
||||
async openToc(): Promise<void> {
|
||||
const { AddonModScormTocComponent } = await import('../../components/toc/toc');
|
||||
|
||||
const modalData = await CoreModals.openSideModal<AddonModScormScoWithData>({
|
||||
component: AddonModScormTocComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -17,14 +17,10 @@ import { NgModule } from '@angular/core';
|
|||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { CoreTagComponentsModule } from '@features/tag/components/components.module';
|
||||
import { AddonModWikiIndexComponent } from './index/index';
|
||||
import { AddonModWikiMapModalComponent } from './map/map';
|
||||
import { AddonModWikiSubwikiPickerComponent } from './subwiki-picker/subwiki-picker';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModWikiIndexComponent,
|
||||
AddonModWikiSubwikiPickerComponent,
|
||||
AddonModWikiMapModalComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -33,8 +29,6 @@ import { AddonModWikiSubwikiPickerComponent } from './subwiki-picker/subwiki-pic
|
|||
],
|
||||
exports: [
|
||||
AddonModWikiIndexComponent,
|
||||
AddonModWikiSubwikiPickerComponent,
|
||||
AddonModWikiMapModalComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModWikiComponentsModule {}
|
||||
|
|
|
@ -664,8 +664,9 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
* Show the map.
|
||||
*/
|
||||
async openMap(): Promise<void> {
|
||||
// Create the toc modal.
|
||||
const { AddonModWikiMapModalComponent } = await import('../map/map');
|
||||
|
||||
// Create the map modal.
|
||||
const modalData = await CoreModals.openSideModal<AddonModWikiMapModalReturn>({
|
||||
component: AddonModWikiMapModalComponent,
|
||||
componentProps: {
|
||||
|
@ -885,6 +886,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
*/
|
||||
async showSubwikiPicker(event: MouseEvent): Promise<void> {
|
||||
const { AddonModWikiSubwikiPickerComponent } = await import('../subwiki-picker/subwiki-picker');
|
||||
|
||||
const subwiki = await CoreDomUtils.openPopover<AddonModWikiSubwiki>({
|
||||
component: AddonModWikiSubwikiPickerComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -17,6 +17,7 @@ import { ModalController } from '@singletons';
|
|||
import { AddonModWikiPageDBRecord } from '../../services/database/wiki';
|
||||
import { AddonModWikiSubwikiPage, AddonModWikiWiki } from '../../services/wiki';
|
||||
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal to display the map of a Wiki.
|
||||
|
@ -24,6 +25,10 @@ import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
|||
@Component({
|
||||
selector: 'page-addon-mod-wiki-map',
|
||||
templateUrl: 'map.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModWikiMapModalComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import { PopoverController } from '@singletons';
|
||||
import { AddonModWikiSubwiki, AddonModWikiSubwikiListGrouping } from '../../services/wiki';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to display the a list of subwikis in a wiki.
|
||||
|
@ -22,6 +23,10 @@ import { AddonModWikiSubwiki, AddonModWikiSubwikiListGrouping } from '../../serv
|
|||
@Component({
|
||||
selector: 'addon-mod-wiki-subwiki-picker',
|
||||
templateUrl: 'addon-mod-wiki-subwiki-picker.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModWikiSubwikiPickerComponent {
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import { CoreBlockComponent } from './block/block';
|
|||
import { CoreBlockOnlyTitleComponent } from './only-title-block/only-title-block';
|
||||
import { CoreBlockPreRenderedComponent } from './pre-rendered-block/pre-rendered-block';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreBlockSideBlocksComponent } from './side-blocks/side-blocks';
|
||||
import { CoreBlockSideBlocksButtonComponent } from './side-blocks-button/side-blocks-button';
|
||||
import { CoreBlockSideBlocksTourComponent } from './side-blocks-tour/side-blocks-tour';
|
||||
|
||||
|
@ -26,7 +25,6 @@ import { CoreBlockSideBlocksTourComponent } from './side-blocks-tour/side-blocks
|
|||
CoreBlockComponent,
|
||||
CoreBlockOnlyTitleComponent,
|
||||
CoreBlockPreRenderedComponent,
|
||||
CoreBlockSideBlocksComponent,
|
||||
CoreBlockSideBlocksButtonComponent,
|
||||
CoreBlockSideBlocksTourComponent,
|
||||
],
|
||||
|
@ -37,7 +35,6 @@ import { CoreBlockSideBlocksTourComponent } from './side-blocks-tour/side-blocks
|
|||
CoreBlockComponent,
|
||||
CoreBlockOnlyTitleComponent,
|
||||
CoreBlockPreRenderedComponent,
|
||||
CoreBlockSideBlocksComponent,
|
||||
CoreBlockSideBlocksButtonComponent,
|
||||
CoreBlockSideBlocksTourComponent,
|
||||
],
|
||||
|
|
|
@ -19,7 +19,6 @@ import { CoreUserToursAlignment, CoreUserToursSide } from '@features/usertours/s
|
|||
import { CoreModals } from '@services/modals';
|
||||
import { CoreDom } from '@singletons/dom';
|
||||
import { CoreBlockSideBlocksTourComponent } from '../side-blocks-tour/side-blocks-tour';
|
||||
import { CoreBlockSideBlocksComponent } from '../side-blocks/side-blocks';
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
|
||||
/**
|
||||
|
@ -67,7 +66,9 @@ export class CoreBlockSideBlocksButtonComponent implements OnInit, OnDestroy {
|
|||
/**
|
||||
* Open side blocks.
|
||||
*/
|
||||
openBlocks(): void {
|
||||
async openBlocks(): Promise<void> {
|
||||
const { CoreBlockSideBlocksComponent } = await import('@features/block/components/side-blocks/side-blocks');
|
||||
|
||||
CoreModals.openSideModal({
|
||||
component: CoreBlockSideBlocksComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -24,6 +24,8 @@ import { CoreTextUtils } from '@services/utils/text';
|
|||
import { CoreDom } from '@singletons/dom';
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
import { CoreWait } from '@singletons/wait';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreBlockComponentsModule } from '../components.module';
|
||||
|
||||
/**
|
||||
* Component that displays the list of side blocks.
|
||||
|
@ -31,7 +33,12 @@ import { CoreWait } from '@singletons/wait';
|
|||
@Component({
|
||||
selector: 'core-block-side-blocks',
|
||||
templateUrl: 'side-blocks.html',
|
||||
styleUrls: ['side-blocks.scss'],
|
||||
styleUrl: 'side-blocks.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreBlockComponentsModule,
|
||||
],
|
||||
})
|
||||
export class CoreBlockSideBlocksComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { Translate } from '@singletons';
|
||||
import { CoreEventObserver, CoreEvents } from '@singletons/events';
|
||||
import { CoreLogger } from '@singletons/logger';
|
||||
import { CoreCourseModuleSummaryComponent, CoreCourseModuleSummaryResult } from '../components/module-summary/module-summary';
|
||||
import { CoreCourseModuleSummaryResult } from '../components/module-summary/module-summary';
|
||||
import { CoreCourseContentsPage } from '../pages/contents/contents';
|
||||
import { CoreCourse } from '../services/course';
|
||||
import { CoreCourseHelper, CoreCourseModuleData } from '../services/course-helper';
|
||||
|
@ -425,6 +425,8 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy,
|
|||
return;
|
||||
}
|
||||
|
||||
const { CoreCourseModuleSummaryComponent } = await import('@features/course/components/module-summary/module-summary');
|
||||
|
||||
const data = await CoreModals.openSideModal<CoreCourseModuleSummaryResult>({
|
||||
component: CoreCourseModuleSummaryComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -24,7 +24,6 @@ import { CoreCourseUnsupportedModuleComponent } from './unsupported-module/unsup
|
|||
import { CoreCourseModuleCompletionLegacyComponent } from './module-completion-legacy/module-completion-legacy';
|
||||
import { CoreCourseModuleInfoComponent } from './module-info/module-info';
|
||||
import { CoreCourseModuleNavigationComponent } from './module-navigation/module-navigation';
|
||||
import { CoreCourseModuleSummaryComponent } from './module-summary/module-summary';
|
||||
import { CoreCourseCourseIndexTourComponent } from './course-index-tour/course-index-tour';
|
||||
import { CoreRemindersComponentsModule } from '@features/reminders/components/components.module';
|
||||
import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-details/module-completion-details';
|
||||
|
@ -40,7 +39,6 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseTagAreaComponent,
|
||||
CoreCourseUnsupportedModuleComponent,
|
||||
CoreCourseModuleNavigationComponent,
|
||||
CoreCourseModuleSummaryComponent,
|
||||
CoreCourseModuleCompletionDetailsComponent,
|
||||
],
|
||||
imports: [
|
||||
|
@ -58,7 +56,6 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseTagAreaComponent,
|
||||
CoreCourseUnsupportedModuleComponent,
|
||||
CoreCourseModuleNavigationComponent,
|
||||
CoreCourseModuleSummaryComponent,
|
||||
CoreCourseModuleCompletionDetailsComponent,
|
||||
],
|
||||
})
|
||||
|
|
|
@ -51,7 +51,6 @@ import { CoreCourseCourseIndexTourComponent } from '../course-index-tour/course-
|
|||
import { CoreDom } from '@singletons/dom';
|
||||
import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
|
||||
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
||||
import { CoreBlockSideBlocksComponent } from '@features/block/components/side-blocks/side-blocks';
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
import { CoreModals } from '@services/modals';
|
||||
|
||||
|
@ -317,6 +316,8 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
this.sectionChanged(section);
|
||||
}
|
||||
} else if (this.initialBlockInstanceId && this.displayBlocks && this.hasBlocks) {
|
||||
const { CoreBlockSideBlocksComponent } = await import('@features/block/components/side-blocks/side-blocks');
|
||||
|
||||
CoreModals.openSideModal({
|
||||
component: CoreBlockSideBlocksComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -33,6 +33,7 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { ModalController, NgZone } from '@singletons';
|
||||
import { CoreEventObserver, CoreEvents } from '@singletons/events';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to display a module summary modal.
|
||||
|
@ -40,7 +41,11 @@ import { Subscription } from 'rxjs';
|
|||
@Component({
|
||||
selector: 'core-course-module-summary',
|
||||
templateUrl: 'module-summary.html',
|
||||
styleUrls: ['module-summary.scss'],
|
||||
styleUrl: 'module-summary.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
@ -13,10 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
CoreCourseModuleSummaryResult,
|
||||
CoreCourseModuleSummaryComponent,
|
||||
} from '@features/course/components/module-summary/module-summary';
|
||||
import { CoreCourseModuleSummaryResult } from '@features/course/components/module-summary/module-summary';
|
||||
import { CoreCourse } from '@features/course/services/course';
|
||||
import { CoreCourseHelper, CoreCourseModuleData, CoreCourseSection } from '@features/course/services/course-helper';
|
||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
|
||||
|
@ -107,6 +104,8 @@ export class CoreCourseModulePreviewPage implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const { CoreCourseModuleSummaryComponent } = await import('@features/course/components/module-summary/module-summary');
|
||||
|
||||
const data = await CoreModals.openSideModal<CoreCourseModuleSummaryResult>({
|
||||
component: CoreCourseModuleSummaryComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -69,7 +69,6 @@ import { CoreNavigationOptions, CoreNavigator } from '@services/navigator';
|
|||
import { CoreSiteHomeHomeHandlerService } from '@features/sitehome/services/handlers/sitehome-home';
|
||||
import { CoreStatusWithWarningsWSResponse } from '@services/ws';
|
||||
import { CoreCourseWithImageAndColor } from '@features/courses/services/courses-helper';
|
||||
import { CoreCourseSummaryPage } from '../pages/course-summary/course-summary.page';
|
||||
import { CoreRemindersPushNotificationData } from '@features/reminders/services/reminders';
|
||||
import { CoreLocalNotifications } from '@services/local-notifications';
|
||||
import { CoreEnrol } from '@features/enrol/services/enrol';
|
||||
|
@ -1997,6 +1996,7 @@ export class CoreCourseHelperProvider {
|
|||
|
||||
/**
|
||||
* Retrieves course summary page module.
|
||||
* This is meant to be here so it can be overriden.
|
||||
*
|
||||
* @returns Course summary page module.
|
||||
*/
|
||||
|
@ -2009,7 +2009,9 @@ export class CoreCourseHelperProvider {
|
|||
*
|
||||
* @param course Course selected
|
||||
*/
|
||||
openCourseSummary(course: CoreCourseWithImageAndColor & CoreCourseAnyCourseData): void {
|
||||
async openCourseSummary(course: CoreCourseWithImageAndColor & CoreCourseAnyCourseData): Promise<void> {
|
||||
const { CoreCourseSummaryPage } = await import('../pages/course-summary/course-summary.page');
|
||||
|
||||
CoreModals.openSideModal<void>({
|
||||
component: CoreCourseSummaryPage,
|
||||
componentProps: {
|
||||
|
|
|
@ -24,8 +24,6 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
CoreEditorRichTextEditorComponent,
|
||||
],
|
||||
|
|
|
@ -26,8 +26,6 @@ import { CoreH5PIframeComponent } from './h5p-iframe/h5p-iframe';
|
|||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
CoreH5PPlayerComponent,
|
||||
CoreH5PIframeComponent,
|
||||
|
|
|
@ -14,14 +14,12 @@
|
|||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreLoginSitesModalComponent } from './sites-modal/sites-modal';
|
||||
import { CoreLoginMethodsComponent } from './login-methods/login-methods';
|
||||
import { CoreLoginExceededAttemptsComponent } from '@features/login/components/exceeded-attempts/exceeded-attempts';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreLoginExceededAttemptsComponent,
|
||||
CoreLoginSitesModalComponent,
|
||||
CoreLoginMethodsComponent,
|
||||
],
|
||||
imports: [
|
||||
|
@ -29,7 +27,6 @@ import { CoreLoginExceededAttemptsComponent } from '@features/login/components/e
|
|||
],
|
||||
exports: [
|
||||
CoreLoginExceededAttemptsComponent,
|
||||
CoreLoginSitesModalComponent,
|
||||
CoreLoginMethodsComponent,
|
||||
],
|
||||
})
|
||||
|
|
|
@ -21,6 +21,7 @@ import { CoreNavigator } from '@services/navigator';
|
|||
import { CoreFilter } from '@features/filter/services/filter';
|
||||
import { CoreAnimations } from '@components/animations';
|
||||
import { ModalController } from '@singletons';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Modal that displays a list of sites to be able to enter or delete a site.
|
||||
|
@ -29,6 +30,10 @@ import { ModalController } from '@singletons';
|
|||
selector: 'core-login-sites-modal',
|
||||
templateUrl: 'sites-modal.html',
|
||||
animations: [CoreAnimations.SLIDE_IN_OUT, CoreAnimations.SHOW_HIDE],
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreLoginSitesModalComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -15,14 +15,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreMainMenuUserButtonComponent } from './user-menu-button/user-menu-button';
|
||||
import { CoreMainMenuUserMenuComponent } from './user-menu/user-menu';
|
||||
import { CoreLoginComponentsModule } from '@features/login/components/components.module';
|
||||
import { CoreMainMenuUserMenuTourComponent } from './user-menu-tour/user-menu-tour';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreMainMenuUserButtonComponent,
|
||||
CoreMainMenuUserMenuComponent,
|
||||
CoreMainMenuUserMenuTourComponent,
|
||||
],
|
||||
imports: [
|
||||
|
@ -31,7 +29,6 @@ import { CoreMainMenuUserMenuTourComponent } from './user-menu-tour/user-menu-to
|
|||
],
|
||||
exports: [
|
||||
CoreMainMenuUserButtonComponent,
|
||||
CoreMainMenuUserMenuComponent,
|
||||
CoreMainMenuUserMenuTourComponent,
|
||||
],
|
||||
})
|
||||
|
|
|
@ -21,7 +21,6 @@ import { CoreScreen } from '@services/screen';
|
|||
import { CoreSites } from '@services/sites';
|
||||
import { CoreModals } from '@services/modals';
|
||||
import { CoreMainMenuUserMenuTourComponent } from '../user-menu-tour/user-menu-tour';
|
||||
import { CoreMainMenuUserMenuComponent } from '../user-menu/user-menu';
|
||||
import { CoreMainMenuPage } from '@features/mainmenu/pages/menu/menu';
|
||||
|
||||
/**
|
||||
|
@ -62,10 +61,12 @@ export class CoreMainMenuUserButtonComponent implements OnInit {
|
|||
*
|
||||
* @param event Click event.
|
||||
*/
|
||||
openUserMenu(event: Event): void {
|
||||
async openUserMenu(event: Event): Promise<void> {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const { CoreMainMenuUserMenuComponent } = await import('../user-menu/user-menu');
|
||||
|
||||
CoreModals.openSideModal<void>({
|
||||
component: CoreMainMenuUserMenuComponent,
|
||||
});
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { CoreConstants } from '@/core/constants';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { CoreSite } from '@classes/sites/site';
|
||||
import { CoreSiteInfo } from '@classes/sites/unauthenticated-site';
|
||||
import { CoreFilter } from '@features/filter/services/filter';
|
||||
import { CoreLoginSitesModalComponent } from '@features/login/components/sites-modal/sites-modal';
|
||||
import { CoreLoginHelper } from '@features/login/services/login-helper';
|
||||
import { CoreUserAuthenticatedSupportConfig } from '@features/user/classes/support/authenticated-support-config';
|
||||
import { CoreUserSupport } from '@features/user/services/support';
|
||||
|
@ -42,7 +42,11 @@ import { Subscription } from 'rxjs';
|
|||
@Component({
|
||||
selector: 'core-main-menu-user-menu',
|
||||
templateUrl: 'user-menu.html',
|
||||
styleUrls: ['user-menu.scss'],
|
||||
styleUrl: 'user-menu.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
@ -249,6 +253,8 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const { CoreLoginSitesModalComponent } = await import('@features/login/components/sites-modal/sites-modal');
|
||||
|
||||
const closeAll = await CoreModals.openSideModal<boolean>({
|
||||
component: CoreLoginSitesModalComponent,
|
||||
cssClass: 'core-modal-lateral core-modal-lateral-sm',
|
||||
|
|
|
@ -16,7 +16,6 @@ import { NgModule } from '@angular/core';
|
|||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreReportBuilderReportColumnComponent } from './report-column/report-column';
|
||||
import { CoreReportBuilderReportDetailComponent } from './report-detail/report-detail';
|
||||
import { CoreReportBuilderReportSummaryComponent } from './report-summary/report-summary';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -25,12 +24,10 @@ import { CoreReportBuilderReportSummaryComponent } from './report-summary/report
|
|||
declarations: [
|
||||
CoreReportBuilderReportDetailComponent,
|
||||
CoreReportBuilderReportColumnComponent,
|
||||
CoreReportBuilderReportSummaryComponent,
|
||||
],
|
||||
exports: [
|
||||
CoreReportBuilderReportDetailComponent,
|
||||
CoreReportBuilderReportColumnComponent,
|
||||
CoreReportBuilderReportSummaryComponent,
|
||||
],
|
||||
})
|
||||
export class CoreReportBuilderComponentsModule {}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
||||
import { CoreReportBuilderReportDetail } from '@features/reportbuilder/services/reportbuilder';
|
||||
import { CoreFormatDatePipe } from '@pipes/format-date';
|
||||
|
@ -21,8 +22,12 @@ import { ModalController } from '@singletons';
|
|||
@Component({
|
||||
selector: 'core-report-builder-report-summary',
|
||||
templateUrl: './report-summary.html',
|
||||
styleUrls: ['./report-summary.scss'],
|
||||
styleUrl: './report-summary.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreReportBuilderReportSummaryComponent implements OnInit {
|
||||
|
||||
|
@ -30,6 +35,9 @@ export class CoreReportBuilderReportSummaryComponent implements OnInit {
|
|||
reportUrl!: string;
|
||||
reportDetailToDisplay!: { title: string; text: string }[];
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
const formatDate = new CoreFormatDatePipe();
|
||||
const site = CoreSites.getRequiredCurrentSite();
|
||||
|
@ -54,6 +62,9 @@ export class CoreReportBuilderReportSummaryComponent implements OnInit {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the modal.
|
||||
*/
|
||||
closeModal(): void {
|
||||
ModalController.dismiss();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { CoreReportBuilderReportSummaryComponent } from '@features/reportbuilder/components/report-summary/report-summary';
|
||||
import { CoreReportBuilderReportDetail } from '@features/reportbuilder/services/reportbuilder';
|
||||
import { CoreModals } from '@services/modals';
|
||||
import { CoreNavigator } from '@services/navigator';
|
||||
|
@ -26,6 +25,7 @@ export class CoreReportBuilderReportPage implements OnInit {
|
|||
|
||||
reportId!: string;
|
||||
reportDetail?: CoreReportBuilderReportDetail;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@ -42,7 +42,13 @@ export class CoreReportBuilderReportPage implements OnInit {
|
|||
this.reportDetail = reportDetail;
|
||||
}
|
||||
|
||||
openInfo(): void {
|
||||
/**
|
||||
* Open the report info modal.
|
||||
*/
|
||||
async openInfo(): Promise<void> {
|
||||
const { CoreReportBuilderReportSummaryComponent } =
|
||||
await import('@features/reportbuilder/components/report-summary/report-summary');
|
||||
|
||||
CoreModals.openSideModal<void>({
|
||||
component: CoreReportBuilderReportSummaryComponent,
|
||||
componentProps: { reportDetail: this.reportDetail },
|
||||
|
|
|
@ -23,6 +23,7 @@ import {
|
|||
import { CoreEvents } from '@singletons/events';
|
||||
import { ModalController } from '@singletons';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
type Filter<T=unknown> = T & { checked: boolean };
|
||||
|
||||
|
@ -30,6 +31,10 @@ type Filter<T=unknown> = T & { checked: boolean };
|
|||
selector: 'core-search-global-search-filters',
|
||||
templateUrl: 'global-search-filters.html',
|
||||
styleUrls: ['./global-search-filters.scss'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreSearchGlobalSearchFiltersComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSearchGlobalSearchFiltersComponent } from './global-search-filters.component';
|
||||
|
||||
export { CoreSearchGlobalSearchFiltersComponent };
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
declarations: [
|
||||
CoreSearchGlobalSearchFiltersComponent,
|
||||
],
|
||||
})
|
||||
export class CoreSearchGlobalSearchFiltersComponentModule {}
|
|
@ -138,7 +138,7 @@ export class CoreSearchGlobalSearchPage implements OnInit, OnDestroy, AfterViewI
|
|||
*/
|
||||
async openFilters(): Promise<void> {
|
||||
const { CoreSearchGlobalSearchFiltersComponent } =
|
||||
await import('@features/search/components/global-search-filters/global-search-filters.module');
|
||||
await import('@features/search/components/global-search-filters/global-search-filters.component');
|
||||
|
||||
await CoreModals.openSideModal<CoreSearchGlobalSearchFilters>({
|
||||
component: CoreSearchGlobalSearchFiltersComponent,
|
||||
|
|
|
@ -30,7 +30,6 @@ import { CoreBlockHelper } from '@features/block/services/block-helper';
|
|||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreTime } from '@singletons/time';
|
||||
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
||||
import { CoreBlockSideBlocksComponent } from '@features/block/components/side-blocks/side-blocks';
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
import { CoreModals } from '@services/modals';
|
||||
|
||||
|
@ -228,12 +227,14 @@ export class CoreSiteHomeIndexPage implements OnInit, OnDestroy {
|
|||
/**
|
||||
* Check whether there is a focused instance in the page parameters and open it.
|
||||
*/
|
||||
private openFocusedInstance() {
|
||||
private async openFocusedInstance() {
|
||||
const blockInstanceId = CoreNavigator.getRouteNumberParam('blockInstanceId');
|
||||
if (!blockInstanceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { CoreBlockSideBlocksComponent } = await import('@features/block/components/side-blocks/side-blocks');
|
||||
|
||||
CoreModals.openSideModal({
|
||||
component: CoreBlockSideBlocksComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -15,10 +15,7 @@
|
|||
import { Component, OnInit, OnDestroy, Input, ViewChild, HostBinding } from '@angular/core';
|
||||
|
||||
import { CoreSiteWSPreSets } from '@classes/sites/authenticated-site';
|
||||
import {
|
||||
CoreCourseModuleSummaryResult,
|
||||
CoreCourseModuleSummaryComponent,
|
||||
} from '@features/course/components/module-summary/module-summary';
|
||||
import { CoreCourseModuleSummaryResult } from '@features/course/components/module-summary/module-summary';
|
||||
import { CoreCourse } from '@features/course/services/course';
|
||||
import { CoreCourseModuleData } from '@features/course/services/course-helper';
|
||||
import {
|
||||
|
@ -157,6 +154,8 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C
|
|||
return;
|
||||
}
|
||||
|
||||
const { CoreCourseModuleSummaryComponent } = await import('@features/course/components/module-summary/module-summary');
|
||||
|
||||
const data = await CoreModals.openSideModal<CoreCourseModuleSummaryResult>({
|
||||
component: CoreCourseModuleSummaryComponent,
|
||||
componentProps: {
|
||||
|
|
Loading…
Reference in New Issue