MOBILE-4616 chore: Import popovers during runtime
parent
7cf5d9b692
commit
072f0b8fd4
|
@ -21,7 +21,6 @@ import { CoreCommentsComponentsModule } from '@features/comments/components/comp
|
|||
|
||||
import { CoreTagComponentsModule } from '@features/tag/components/components.module';
|
||||
import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module';
|
||||
import { AddonBlogEntryOptionsMenuComponent } from './components/entry-options-menu';
|
||||
import { buildTabMainRoutes } from '@features/mainmenu/mainmenu-tab-routing.module';
|
||||
import { ADDON_BLOG_MAINMENU_PAGE_NAME } from './constants';
|
||||
import { canLeaveGuard } from '@guards/can-leave';
|
||||
|
@ -62,7 +61,6 @@ import { canLeaveGuard } from '@guards/can-leave';
|
|||
],
|
||||
declarations: [
|
||||
AddonBlogIndexPage,
|
||||
AddonBlogEntryOptionsMenuComponent,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
|
|
|
@ -11,12 +11,17 @@
|
|||
// 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 { Component } from '@angular/core';
|
||||
import { PopoverController } from '@singletons';
|
||||
|
||||
@Component({
|
||||
selector: 'addon-blog-entry-options-menu',
|
||||
templateUrl: './entry-options-menu.html',
|
||||
templateUrl: 'entry-options-menu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlogEntryOptionsMenuComponent {
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
import { AddonBlogEntryOptionsMenuComponent } from '@addons/blog/components/entry-options-menu';
|
||||
import { ADDON_BLOG_ENTRY_UPDATED } from '@addons/blog/constants';
|
||||
import { AddonBlog, AddonBlogFilter, AddonBlogPost, AddonBlogProvider } from '@addons/blog/services/blog';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
|
@ -328,6 +327,9 @@ export class AddonBlogIndexPage implements OnInit, OnDestroy {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const { AddonBlogEntryOptionsMenuComponent } =
|
||||
await import('@addons/blog/components/entry-options-menu/entry-options-menu');
|
||||
|
||||
const popoverData = await CorePopovers.open<string>({
|
||||
component: AddonBlogEntryOptionsMenuComponent,
|
||||
event,
|
||||
|
|
|
@ -43,7 +43,6 @@ import { CoreNavigator } from '@services/navigator';
|
|||
import { CanLeave } from '@guards/can-leave';
|
||||
import { CoreForms } from '@singletons/form';
|
||||
import { CoreReminders, CoreRemindersService, CoreRemindersUnits } from '@features/reminders/services/reminders';
|
||||
import { CoreRemindersSetReminderMenuComponent } from '@features/reminders/components/set-reminder-menu/set-reminder-menu';
|
||||
import moment from 'moment-timezone';
|
||||
import { ADDON_CALENDAR_COMPONENT } from '@addons/calendar/constants';
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
|
@ -638,6 +637,9 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy, CanLeave {
|
|||
const formData = this.form.value;
|
||||
const eventTime = moment(formData.timestart).unix();
|
||||
|
||||
const { CoreRemindersSetReminderMenuComponent } =
|
||||
await import('@features/reminders/components/set-reminder-menu/set-reminder-menu');
|
||||
|
||||
const reminderTime = await CorePopovers.open<{timeBefore: number}>({
|
||||
component: CoreRemindersSetReminderMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -39,7 +39,6 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/
|
|||
import { AddonCalendarEventsSource } from '@addons/calendar/classes/events-source';
|
||||
import { CoreSwipeNavigationItemsManager } from '@classes/items-management/swipe-navigation-items-manager';
|
||||
import { CoreReminders, CoreRemindersService } from '@features/reminders/services/reminders';
|
||||
import { CoreRemindersSetReminderMenuComponent } from '@features/reminders/components/set-reminder-menu/set-reminder-menu';
|
||||
import { CoreLocalNotifications } from '@services/local-notifications';
|
||||
import { CorePlatform } from '@services/platform';
|
||||
import { CoreConfig } from '@services/config';
|
||||
|
@ -385,6 +384,9 @@ export class AddonCalendarEventPage implements OnInit, OnDestroy {
|
|||
return;
|
||||
}
|
||||
|
||||
const { CoreRemindersSetReminderMenuComponent } =
|
||||
await import('@features/reminders/components/set-reminder-menu/set-reminder-menu');
|
||||
|
||||
const reminderTime = await CorePopovers.open<{timeBefore: number}>({
|
||||
component: CoreRemindersSetReminderMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
CoreReminders,
|
||||
CoreRemindersService,
|
||||
} from '@features/reminders/services/reminders';
|
||||
import { CoreRemindersSetReminderMenuComponent } from '@features/reminders/components/set-reminder-menu/set-reminder-menu';
|
||||
|
||||
/**
|
||||
* Page that displays the calendar settings.
|
||||
|
@ -51,6 +50,9 @@ export class AddonCalendarSettingsPage implements OnInit {
|
|||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
const { CoreRemindersSetReminderMenuComponent } =
|
||||
await import('@features/reminders/components/set-reminder-menu/set-reminder-menu');
|
||||
|
||||
const reminderTime = await CorePopovers.open<{timeBefore: number}>({
|
||||
component: CoreRemindersSetReminderMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -27,7 +27,7 @@ import {
|
|||
import { AddonModDataHelper } from '../../services/data-helper';
|
||||
import { AddonModDataOffline } from '../../services/data-offline';
|
||||
import { CorePopovers } from '@services/popovers';
|
||||
import { AddonModDataActionsMenuComponent, AddonModDataActionsMenuItem } from '../actionsmenu/actionsmenu';
|
||||
import { AddonModDataActionsMenuItem } from '../actionsmenu/actionsmenu';
|
||||
import {
|
||||
ADDON_MOD_DATA_ENTRY_CHANGED,
|
||||
ADDON_MOD_DATA_PAGE_NAME,
|
||||
|
@ -202,6 +202,8 @@ export class AddonModDataActionComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
const { AddonModDataActionsMenuComponent } = await import('../actionsmenu/actionsmenu');
|
||||
|
||||
await CorePopovers.openWithoutResult({
|
||||
component: AddonModDataActionsMenuComponent,
|
||||
componentProps: { items },
|
||||
|
|
|
@ -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 { PopoverController } from '@singletons';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { PopoverController } from '@singletons';
|
|||
@Component({
|
||||
selector: 'addon-mod-data-actionsmenu',
|
||||
templateUrl: 'actionsmenu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModDataActionsMenuComponent {
|
||||
|
||||
|
|
|
@ -17,12 +17,10 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { AddonModDataIndexComponent } from './index';
|
||||
import { CoreCompileHtmlComponentModule } from '@features/compile/components/compile-html/compile-html.module';
|
||||
import { AddonModDataActionsMenuComponent } from './actionsmenu/actionsmenu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModDataIndexComponent,
|
||||
AddonModDataActionsMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -31,7 +29,6 @@ import { AddonModDataActionsMenuComponent } from './actionsmenu/actionsmenu';
|
|||
],
|
||||
exports: [
|
||||
AddonModDataIndexComponent,
|
||||
AddonModDataActionsMenuComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModDataComponentsModule {}
|
||||
|
|
|
@ -20,17 +20,13 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { CoreTagComponentsModule } from '@features/tag/components/components.module';
|
||||
import { CoreRatingComponentsModule } from '@features/rating/components/components.module';
|
||||
|
||||
import { AddonModForumDiscussionOptionsMenuComponent } from './discussion-options-menu/discussion-options-menu';
|
||||
import { AddonModForumIndexComponent } from './index/index';
|
||||
import { AddonModForumPostComponent } from './post/post';
|
||||
import { AddonModForumPostOptionsMenuComponent } from './post-options-menu/post-options-menu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonModForumDiscussionOptionsMenuComponent,
|
||||
AddonModForumIndexComponent,
|
||||
AddonModForumPostComponent,
|
||||
AddonModForumPostOptionsMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
|
|
@ -20,6 +20,7 @@ import { CoreEvents } from '@singletons/events';
|
|||
import { AddonModForum, AddonModForumDiscussion } from '../../services/forum';
|
||||
import { ADDON_MOD_FORUM_CHANGE_DISCUSSION_EVENT } from '../../constants';
|
||||
import { CoreToasts } from '@services/toasts';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* This component is meant to display a popover with the discussion options.
|
||||
|
@ -27,6 +28,10 @@ import { CoreToasts } from '@services/toasts';
|
|||
@Component({
|
||||
selector: 'addon-forum-discussion-options-menu',
|
||||
templateUrl: 'discussion-options-menu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModForumDiscussionOptionsMenuComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import { CoreUser } from '@features/user/services/user';
|
|||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
import { CoreCourse } from '@features/course/services/course';
|
||||
import { CoreSplitViewComponent } from '@components/split-view/split-view';
|
||||
import { AddonModForumDiscussionOptionsMenuComponent } from '../discussion-options-menu/discussion-options-menu';
|
||||
import { CoreScreen } from '@services/screen';
|
||||
import { AddonModForumPrefetchHandler } from '../../services/handlers/prefetch';
|
||||
import { CoreRatingProvider } from '@features/rating/services/rating';
|
||||
|
@ -636,6 +635,9 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const { AddonModForumDiscussionOptionsMenuComponent } =
|
||||
await import('../discussion-options-menu/discussion-options-menu');
|
||||
|
||||
const popoverData = await CorePopovers.open<{ action?: string; value: boolean }>({
|
||||
component: AddonModForumDiscussionOptionsMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -19,6 +19,7 @@ import { AddonModForum, AddonModForumPost } from '@addons/mod/forum/services/for
|
|||
import { PopoverController } from '@singletons';
|
||||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
import { CoreNetworkError } from '@classes/errors/network-error';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* This component is meant to display a popover with the post options.
|
||||
|
@ -26,7 +27,11 @@ import { CoreNetworkError } from '@classes/errors/network-error';
|
|||
@Component({
|
||||
selector: 'addon-forum-post-options-menu',
|
||||
templateUrl: 'post-options-menu.html',
|
||||
styleUrls: ['./post-options-menu.scss'],
|
||||
styleUrl: 'post-options-menu.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModForumPostOptionsMenuComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ import { CoreTextUtils } from '@services/utils/text';
|
|||
import { AddonModForumHelper } from '../../services/forum-helper';
|
||||
import { AddonModForumOffline } from '../../services/forum-offline';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { AddonModForumPostOptionsMenuComponent } from '../post-options-menu/post-options-menu';
|
||||
import { CoreRatingInfo } from '@features/rating/services/rating';
|
||||
import { CoreForms } from '@singletons/form';
|
||||
import { CoreFileEntry } from '@services/file-helper';
|
||||
|
@ -234,6 +233,9 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy, OnChanges
|
|||
* @param event Click Event.
|
||||
*/
|
||||
async showOptionsMenu(event: Event): Promise<void> {
|
||||
const { AddonModForumPostOptionsMenuComponent } =
|
||||
await import('../post-options-menu/post-options-menu');
|
||||
|
||||
const popoverData = await CorePopovers.open<{ action?: string }>({
|
||||
component: AddonModForumPostOptionsMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AddonModGlossaryIndexComponent } from './index/index';
|
||||
import { AddonModGlossaryModePickerPopoverComponent } from './mode-picker/mode-picker';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { CoreSearchComponentsModule } from '@features/search/components/components.module';
|
||||
|
@ -22,7 +21,6 @@ import { CoreSearchComponentsModule } from '@features/search/components/componen
|
|||
@NgModule({
|
||||
declarations: [
|
||||
AddonModGlossaryIndexComponent,
|
||||
AddonModGlossaryModePickerPopoverComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -31,7 +29,6 @@ import { CoreSearchComponentsModule } from '@features/search/components/componen
|
|||
],
|
||||
exports: [
|
||||
AddonModGlossaryIndexComponent,
|
||||
AddonModGlossaryModePickerPopoverComponent,
|
||||
],
|
||||
})
|
||||
export class AddonModGlossaryComponentsModule {}
|
||||
|
|
|
@ -50,7 +50,6 @@ import {
|
|||
GLOSSARY_AUTO_SYNCED,
|
||||
} from '../../services/glossary-sync';
|
||||
import { AddonModGlossaryPrefetchHandler } from '../../services/handlers/prefetch';
|
||||
import { AddonModGlossaryModePickerPopoverComponent } from '../mode-picker/mode-picker';
|
||||
import { CoreTime } from '@singletons/time';
|
||||
import {
|
||||
ADDON_MOD_GLOSSARY_COMPONENT,
|
||||
|
@ -355,6 +354,7 @@ export class AddonModGlossaryIndexComponent extends CoreCourseModuleMainActivity
|
|||
if (!this.glossary) {
|
||||
return;
|
||||
}
|
||||
const { AddonModGlossaryModePickerPopoverComponent } = await import('../mode-picker/mode-picker');
|
||||
|
||||
const entries = await this.promisedEntries;
|
||||
const previousMode = entries.getSource().fetchMode;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { PopoverController } from '@singletons';
|
||||
import { AddonModGlossaryFetchMode } from '../../classes/glossary-entries-source';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to display the mode picker.
|
||||
|
@ -22,6 +23,10 @@ import { AddonModGlossaryFetchMode } from '../../classes/glossary-entries-source
|
|||
@Component({
|
||||
selector: 'addon-mod-glossary-mode-picker-popover',
|
||||
templateUrl: 'addon-mod-glossary-mode-picker.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModGlossaryModePickerPopoverComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import { BehaviorSubject } from 'rxjs';
|
|||
import { CoreQuestionHelper } from '@features/question/services/question-helper';
|
||||
import { CoreQuestionsAnswers } from '@features/question/services/question';
|
||||
import { CoreLogger } from '@singletons/logger';
|
||||
import { AddonModQuizConnectionErrorComponent } from '../components/connection-error/connection-error';
|
||||
import { AddonModQuiz, AddonModQuizAttemptWSData, AddonModQuizQuizWSData } from '../services/quiz';
|
||||
import { CorePopovers } from '@services/popovers';
|
||||
|
||||
|
@ -197,6 +196,8 @@ export class AddonModQuizAutoSave {
|
|||
};
|
||||
this.popoverShown = true;
|
||||
|
||||
const { AddonModQuizConnectionErrorComponent } = await import('../components/connection-error/connection-error');
|
||||
|
||||
this.popover = await CorePopovers.openWithoutResult({
|
||||
component: AddonModQuizConnectionErrorComponent,
|
||||
event: <Event> event,
|
||||
|
|
|
@ -16,7 +16,6 @@ import { NgModule } from '@angular/core';
|
|||
|
||||
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 { AddonModQuizAttemptInfoComponent } from './attempt-info/attempt-info';
|
||||
import { AddonModQuizAttemptStateComponent } from './attempt-state/attempt-state';
|
||||
|
@ -27,7 +26,6 @@ import { AddonModQuizQuestionCardComponent } from './question-card/question-card
|
|||
AddonModQuizAttemptInfoComponent,
|
||||
AddonModQuizAttemptStateComponent,
|
||||
AddonModQuizIndexComponent,
|
||||
AddonModQuizConnectionErrorComponent,
|
||||
AddonModQuizQuestionCardComponent,
|
||||
],
|
||||
imports: [
|
||||
|
@ -38,7 +36,6 @@ import { AddonModQuizQuestionCardComponent } from './question-card/question-card
|
|||
AddonModQuizAttemptInfoComponent,
|
||||
AddonModQuizAttemptStateComponent,
|
||||
AddonModQuizIndexComponent,
|
||||
AddonModQuizConnectionErrorComponent,
|
||||
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 } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
@ -20,7 +21,11 @@ import { Component } from '@angular/core';
|
|||
@Component({
|
||||
selector: 'addon-mod-quiz-connection-error',
|
||||
templateUrl: 'connection-error.html',
|
||||
styleUrls: ['connection-error.scss'],
|
||||
styleUrl: 'connection-error.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonModQuizConnectionErrorComponent {
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import { CoreChartComponent } from './chart/chart';
|
|||
import { CoreChronoComponent } from './chrono/chrono';
|
||||
import { CoreContextMenuComponent } from './context-menu/context-menu';
|
||||
import { CoreContextMenuItemComponent } from './context-menu/context-menu-item';
|
||||
import { CoreContextMenuPopoverComponent } from './context-menu/context-menu-popover';
|
||||
import { CoreDownloadRefreshComponent } from './download-refresh/download-refresh';
|
||||
import { CoreDynamicComponent } from './dynamic-component/dynamic-component';
|
||||
import { CoreEmptyBoxComponent } from './empty-box/empty-box';
|
||||
|
@ -88,7 +87,6 @@ export async function getCoreStandaloneComponents(): Promise<Type<unknown>[]> {
|
|||
CoreChronoComponent,
|
||||
CoreContextMenuComponent,
|
||||
CoreContextMenuItemComponent,
|
||||
CoreContextMenuPopoverComponent,
|
||||
CoreCourseImageComponent,
|
||||
CoreDownloadRefreshComponent,
|
||||
CoreDynamicComponent,
|
||||
|
@ -141,7 +139,6 @@ export async function getCoreStandaloneComponents(): Promise<Type<unknown>[]> {
|
|||
CoreChronoComponent,
|
||||
CoreContextMenuComponent,
|
||||
CoreContextMenuItemComponent,
|
||||
CoreContextMenuPopoverComponent,
|
||||
CoreCourseImageComponent,
|
||||
CoreDownloadRefreshComponent,
|
||||
CoreDynamicComponent,
|
||||
|
|
|
@ -17,6 +17,7 @@ import { Component } from '@angular/core';
|
|||
import { NavParams } from '@ionic/angular';
|
||||
import { PopoverController } from '@singletons';
|
||||
import { CoreContextMenuItemComponent } from './context-menu-item';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to display a list of items received by param in a popover.
|
||||
|
@ -24,7 +25,11 @@ import { CoreContextMenuItemComponent } from './context-menu-item';
|
|||
@Component({
|
||||
selector: 'core-context-menu-popover',
|
||||
templateUrl: 'core-context-menu-popover.html',
|
||||
styleUrls: ['context-menu-popover.scss'],
|
||||
styleUrl: 'context-menu-popover.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreContextMenuPopoverComponent {
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import { CorePopovers } from '@services/popovers';
|
|||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { Translate } from '@singletons';
|
||||
import { CoreContextMenuItemComponent } from './context-menu-item';
|
||||
import { CoreContextMenuPopoverComponent } from './context-menu-popover';
|
||||
import { CoreDirectivesRegistry } from '@singletons/directives-registry';
|
||||
|
||||
/**
|
||||
|
@ -183,6 +182,8 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy {
|
|||
if (!this.expanded) {
|
||||
this.expanded = true;
|
||||
|
||||
const { CoreContextMenuPopoverComponent } = await import('./context-menu-popover');
|
||||
|
||||
const popoverData = await CorePopovers.open<CoreContextMenuItemComponent>({
|
||||
event,
|
||||
component: CoreContextMenuPopoverComponent,
|
||||
|
|
|
@ -25,7 +25,6 @@ import { CoreCourseModuleInfoComponent } from './module-info/module-info';
|
|||
import { CoreCourseModuleNavigationComponent } from './module-navigation/module-navigation';
|
||||
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';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -37,7 +36,6 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseTagAreaComponent,
|
||||
CoreCourseUnsupportedModuleComponent,
|
||||
CoreCourseModuleNavigationComponent,
|
||||
CoreCourseModuleCompletionDetailsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreBlockComponentsModule,
|
||||
|
@ -53,7 +51,6 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseTagAreaComponent,
|
||||
CoreCourseUnsupportedModuleComponent,
|
||||
CoreCourseModuleNavigationComponent,
|
||||
CoreCourseModuleCompletionDetailsComponent,
|
||||
],
|
||||
})
|
||||
export class CoreCourseComponentsModule {}
|
||||
|
|
|
@ -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, OnInit } from '@angular/core';
|
||||
|
||||
import {
|
||||
|
@ -28,7 +29,11 @@ import { Translate } from '@singletons';
|
|||
@Component({
|
||||
selector: 'core-course-module-completion-details',
|
||||
templateUrl: 'module-completion-details.html',
|
||||
styleUrls: ['module-completion-details.scss'],
|
||||
styleUrl: 'module-completion-details.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreCourseModuleCompletionDetailsComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import {
|
|||
CoreCourseModuleCompletionStatus,
|
||||
} from '@features/course/services/course';
|
||||
import { CorePopovers } from '@services/popovers';
|
||||
import { CoreCourseModuleCompletionDetailsComponent } from '../module-completion-details/module-completion-details';
|
||||
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
||||
import { CoreUser } from '@features/user/services/user';
|
||||
import { Translate } from '@singletons';
|
||||
|
@ -132,6 +131,9 @@ export class CoreCourseModuleCompletionComponent
|
|||
target = target.parentElement;
|
||||
}
|
||||
|
||||
const { CoreCourseModuleCompletionDetailsComponent } =
|
||||
await import('../module-completion-details/module-completion-details');
|
||||
|
||||
CorePopovers.openWithoutResult({
|
||||
component: CoreCourseModuleCompletionDetailsComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -16,19 +16,16 @@ import { NgModule } from '@angular/core';
|
|||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesCourseListItemComponent } from './course-list-item/course-list-item';
|
||||
import { CoreCoursesCourseOptionsMenuComponent } from './course-options-menu/course-options-menu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreCoursesCourseListItemComponent,
|
||||
CoreCoursesCourseOptionsMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
exports: [
|
||||
CoreCoursesCourseListItemComponent,
|
||||
CoreCoursesCourseOptionsMenuComponent,
|
||||
],
|
||||
})
|
||||
export class CoreCoursesComponentsModule {}
|
||||
|
|
|
@ -25,7 +25,6 @@ import { CoreColors } from '@singletons/colors';
|
|||
import { CoreEventCourseStatusChanged, CoreEventObserver, CoreEvents } from '@singletons/events';
|
||||
import { CoreCourseListItem, CoreCourses, CoreCoursesProvider } from '../../services/courses';
|
||||
import { CoreCoursesHelper, CoreEnrolledCourseDataWithExtraInfoAndOptions } from '../../services/courses-helper';
|
||||
import { CoreCoursesCourseOptionsMenuComponent } from '../course-options-menu/course-options-menu';
|
||||
import { CoreEnrolHelper } from '@features/enrol/services/enrol-helper';
|
||||
import { CoreDownloadStatusTranslatable } from '@components/download-refresh/download-refresh';
|
||||
import { toBoolean } from '@/core/transforms/boolean';
|
||||
|
@ -298,6 +297,8 @@ export class CoreCoursesCourseListItemComponent implements OnInit, OnDestroy, On
|
|||
|
||||
this.initPrefetchCourse(true);
|
||||
|
||||
const { CoreCoursesCourseOptionsMenuComponent } = await import('../course-options-menu/course-options-menu');
|
||||
|
||||
const popoverData = await CorePopovers.open<string>({
|
||||
component: CoreCoursesCourseOptionsMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -17,6 +17,7 @@ import { CoreCourses } from '../../services/courses';
|
|||
import { CoreEnrolledCourseDataWithExtraInfoAndOptions } from '../../services/courses-helper';
|
||||
import { CorePrefetchStatusInfo } from '@features/course/services/course-helper';
|
||||
import { PopoverController } from '@singletons';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* This component is meant to display a popover with the course options.
|
||||
|
@ -24,6 +25,11 @@ import { PopoverController } from '@singletons';
|
|||
@Component({
|
||||
selector: 'core-courses-course-options-menu',
|
||||
templateUrl: 'core-courses-course-options-menu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
|
||||
})
|
||||
export class CoreCoursesCourseOptionsMenuComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -16,15 +16,11 @@ import { CoreSharedModule } from '@/core/shared.module';
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CoreRemindersDateComponent } from './date/date';
|
||||
import { CoreRemindersSetButtonComponent } from './set-button/set-button';
|
||||
import { CoreRemindersSetReminderCustomComponent } from './set-reminder-custom/set-reminder-custom';
|
||||
import { CoreRemindersSetReminderMenuComponent } from './set-reminder-menu/set-reminder-menu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreRemindersDateComponent,
|
||||
CoreRemindersSetButtonComponent,
|
||||
CoreRemindersSetReminderCustomComponent,
|
||||
CoreRemindersSetReminderMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
|
@ -32,8 +28,6 @@ import { CoreRemindersSetReminderMenuComponent } from './set-reminder-menu/set-r
|
|||
exports: [
|
||||
CoreRemindersDateComponent,
|
||||
CoreRemindersSetButtonComponent,
|
||||
CoreRemindersSetReminderCustomComponent,
|
||||
CoreRemindersSetReminderMenuComponent,
|
||||
],
|
||||
})
|
||||
export class CoreRemindersComponentsModule {}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
import { CoreReminderData, CoreReminders, CoreRemindersService } from '@features/reminders/services/reminders';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { CorePopovers } from '@services/popovers';
|
||||
import { CoreRemindersSetReminderMenuComponent } from '../set-reminder-menu/set-reminder-menu';
|
||||
import { Translate } from '@singletons';
|
||||
import { CoreTimeUtils } from '@services/utils/time';
|
||||
import { CoreToasts } from '@services/toasts';
|
||||
|
@ -72,6 +71,9 @@ export class CoreRemindersSetButtonComponent implements OnInit {
|
|||
}
|
||||
|
||||
// Open popover.
|
||||
const { CoreRemindersSetReminderMenuComponent }
|
||||
= await import('../set-reminder-menu/set-reminder-menu');
|
||||
|
||||
const reminderTime = await CorePopovers.open<{timeBefore: number}>({
|
||||
component: CoreRemindersSetReminderMenuComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -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 { CoreRemindersUnits } from '@features/reminders/services/reminders';
|
||||
import { PopoverController } from '@singletons';
|
||||
|
@ -21,6 +22,10 @@ import { PopoverController } from '@singletons';
|
|||
*/
|
||||
@Component({
|
||||
templateUrl: 'set-reminder-custom.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreRemindersSetReminderCustomComponent {
|
||||
|
||||
|
|
|
@ -22,14 +22,18 @@ import {
|
|||
import { CorePopovers } from '@services/popovers';
|
||||
import { CoreWait } from '@singletons/wait';
|
||||
import { PopoverController } from '@singletons';
|
||||
import { CoreRemindersSetReminderCustomComponent } from '../set-reminder-custom/set-reminder-custom';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* This component is meant to display a popover with the reminder options.
|
||||
*/
|
||||
@Component({
|
||||
templateUrl: 'set-reminder-menu.html',
|
||||
styleUrls: ['set-reminder-menu.scss'],
|
||||
styleUrl: 'set-reminder-menu.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreRemindersSetReminderMenuComponent implements OnInit {
|
||||
|
||||
|
@ -155,6 +159,9 @@ export class CoreRemindersSetReminderMenuComponent implements OnInit {
|
|||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
||||
const { CoreRemindersSetReminderCustomComponent }
|
||||
= await import('../set-reminder-custom/set-reminder-custom');
|
||||
|
||||
const reminderTime = await CorePopovers.open<CoreReminderValueAndUnit>({
|
||||
component: CoreRemindersSetReminderCustomComponent,
|
||||
componentProps: {
|
||||
|
|
|
@ -36,7 +36,6 @@ import {
|
|||
import { CoreLogger } from '@singletons/logger';
|
||||
import { CoreFileSizeSum } from '@services/plugin-file-delegate';
|
||||
import { CoreNetworkError } from '@classes/errors/network-error';
|
||||
import { CoreBSTooltipComponent } from '@components/bs-tooltip/bs-tooltip';
|
||||
import { CoreSites } from '@services/sites';
|
||||
import { CoreNetwork } from '@services/network';
|
||||
import { CoreSiteError } from '@classes/errors/siteerror';
|
||||
|
@ -540,6 +539,8 @@ export class CoreDomUtilsProvider {
|
|||
el.addEventListener('click', async (ev: Event) => {
|
||||
const html = el.getAttribute('data-html');
|
||||
|
||||
const { CoreBSTooltipComponent } = await import('@components/bs-tooltip/bs-tooltip');
|
||||
|
||||
await CorePopovers.openWithoutResult({
|
||||
component: CoreBSTooltipComponent,
|
||||
componentProps: {
|
||||
|
|
Loading…
Reference in New Issue