From 7d1dcd3c233fb4beea753a259370d4061ee0a35e Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 19 Nov 2020 12:40:18 +0100 Subject: [PATCH] MOBILE-3320 core: Refactor folders structure --- angular.json | 3 +- config/webpack.config.js | 17 ++++--- gulp/task-build-lang.js | 48 +++++++------------ gulpfile.js | 11 ++--- jest.config.js | 4 +- .../privatefiles/lang/en.json | 0 .../privatefiles/pages/index/index.html | 0 .../pages/index/index.page.module.ts | 0 .../privatefiles/pages/index/index.page.ts | 6 +-- .../privatefiles/privatefiles-init.module.ts | 6 +-- .../privatefiles-routing.module.ts | 0 .../privatefiles/privatefiles.module.ts | 0 .../services/handlers/mainmenu.ts | 4 +- .../services/privatefiles.helper.ts | 2 +- .../privatefiles/services/privatefiles.ts | 0 src/app/app-routing.module.ts | 6 +-- src/app/app.component.test.ts | 4 +- src/app/app.component.ts | 2 +- src/app/app.module.ts | 14 +++--- src/{app => core}/classes/delegate-sorted.ts | 3 +- src/{app => core}/classes/delegate.ts | 0 src/{app => core}/classes/error.test.ts | 4 +- src/{app => core}/classes/errors/ajaxerror.ts | 0 .../classes/errors/ajaxwserror.ts | 0 .../classes/errors/cancelederror.ts | 0 .../classes/errors/captureerror.ts | 0 src/{app => core}/classes/errors/error.ts | 0 .../classes/errors/silenterror.ts | 0 src/{app => core}/classes/errors/siteerror.ts | 0 src/{app => core}/classes/errors/wserror.ts | 0 src/{app => core}/classes/interceptor.ts | 0 src/{app => core}/classes/ion-loading.ts | 0 .../classes/native-to-angular-http.ts | 0 src/{app => core}/classes/queue-runner.ts | 0 .../classes/singletons-factory.ts | 0 src/{app => core}/classes/site.ts | 2 +- src/{app => core}/classes/sqlitedb.ts | 0 src/{app => core}/components/chrono/chrono.ts | 0 .../components/chrono/core-chrono.html | 0 .../components/components.module.ts | 4 +- .../core-download-refresh.html | 0 .../download-refresh/download-refresh.scss | 0 .../download-refresh/download-refresh.ts | 2 +- .../components/empty-box/core-empty-box.html | 0 .../components/empty-box/empty-box.scss | 0 .../components/empty-box/empty-box.ts | 0 .../components/file/core-file.html | 0 src/{app => core}/components/file/file.scss | 0 src/{app => core}/components/file/file.ts | 4 +- src/{app => core}/components/icon/icon.scss | 0 src/{app => core}/components/icon/icon.ts | 0 .../components/iframe/core-iframe.html | 0 .../components/iframe/iframe.scss | 0 src/{app => core}/components/iframe/iframe.ts | 0 .../input-errors/core-input-errors.html | 0 .../components/input-errors/input-errors.scss | 0 .../components/input-errors/input-errors.ts | 0 .../components/loading/core-loading.html | 0 .../components/loading/loading.scss | 0 .../components/loading/loading.ts | 0 .../mark-required/core-mark-required.html | 0 .../mark-required/mark-required.scss | 0 .../components/mark-required/mark-required.ts | 0 .../components/recaptcha/core-recaptcha.html | 0 .../recaptcha/core-recaptchamodal.html | 0 .../components/recaptcha/recaptcha.ts | 0 .../components/recaptcha/recaptchamodal.ts | 0 .../show-password/core-show-password.html | 0 .../show-password/show-password.scss | 0 .../components/show-password/show-password.ts | 0 .../components/tabs/core-tabs.html | 0 src/{app => core}/components/tabs/tabs.scss | 0 src/{app => core}/components/tabs/tabs.ts | 4 +- .../components/tests/icon.test.ts | 2 +- .../components/tests/iframe.test.ts | 0 .../components/tests/user-avatar.test.ts | 0 src/{app => }/core/constants.ts | 0 src/{app => core}/directives/auto-focus.ts | 0 .../directives/directives.module.ts | 0 .../directives/external-content.ts | 0 src/{app => core}/directives/fa-icon.ts | 2 +- src/{app => core}/directives/fab.ts | 0 src/{app => core}/directives/format-text.ts | 0 src/{app => core}/directives/link.ts | 2 +- src/{app => core}/directives/long-press.ts | 0 .../directives/supress-events.ts | 0 .../directives/tests/format-text.test.ts | 2 +- .../directives/tests/link.test.ts | 2 +- .../contentlinks/classes/base-handler.ts | 0 .../classes/module-grade-handler.ts | 2 +- .../classes/module-index-handler.ts | 0 .../classes/module-list-handler.ts | 2 +- .../features}/contentlinks/lang/en.json | 0 .../pages/choose-site/choose-site.html | 0 .../choose-site/choose-site.page.module.ts | 0 .../pages/choose-site/choose-site.page.ts | 2 +- .../services/contentlinks.delegate.ts | 0 .../services/contentlinks.helper.ts | 4 +- .../features}/courses/courses.module.ts | 2 +- .../features}/courses/lang/en.json | 0 .../courses/pages/dashboard/dashboard.html | 0 .../pages/dashboard/dashboard.page.module.ts | 0 .../courses/pages/dashboard/dashboard.page.ts | 0 .../courses/pages/dashboard/dashboard.scss | 0 .../services/handlers/dashboard.home.ts | 2 +- .../features}/emulator/classes/sqlitedb.ts | 0 .../capture-media/capture-media.html | 0 .../capture-media/capture-media.scss | 0 .../components/capture-media/capture-media.ts | 0 .../emulator/components/components.module.ts | 6 +-- .../features}/emulator/emulator.module.ts | 0 .../features}/emulator/services/camera.ts | 0 .../emulator/services/capture.helper.ts | 0 .../features}/emulator/services/clipboard.ts | 0 .../emulator/services/emulator.helper.ts | 0 .../emulator/services/file-opener.ts | 0 .../emulator/services/file-transfer.ts | 2 +- .../features}/emulator/services/file.ts | 0 .../emulator/services/geolocation.ts | 0 .../emulator/services/inappbrowser.ts | 0 .../emulator/services/media-capture.ts | 0 .../features}/emulator/services/network.ts | 0 .../features}/emulator/services/zip.ts | 0 .../fileuploader/fileuploader-init.module.ts | 0 .../features}/fileuploader/lang/en.json | 0 .../services/fileuploader.delegate.ts | 0 .../services/fileuploader.helper.ts | 6 +-- .../fileuploader/services/fileuploader.ts | 4 +- .../fileuploader/services/handlers/album.ts | 0 .../fileuploader/services/handlers/audio.ts | 0 .../fileuploader/services/handlers/camera.ts | 0 .../fileuploader/services/handlers/file.ts | 0 .../fileuploader/services/handlers/video.ts | 0 .../login/components/site-help/site-help.html | 0 .../login/components/site-help/site-help.scss | 0 .../login/components/site-help/site-help.ts | 2 +- .../site-onboarding/site-onboarding.html | 0 .../site-onboarding/site-onboarding.scss | 0 .../site-onboarding/site-onboarding.ts | 2 +- .../core => core/features}/login/lang/en.json | 0 .../features}/login/login-routing.module.ts | 0 .../features}/login/login.module.ts | 0 .../core => core/features}/login/login.scss | 0 .../change-password/change-password.html | 0 .../change-password.page.module.ts | 0 .../change-password/change-password.page.ts | 2 +- .../login/pages/credentials/credentials.html | 0 .../credentials/credentials.page.module.ts | 0 .../pages/credentials/credentials.page.ts | 4 +- .../pages/email-signup/email-signup.html | 0 .../email-signup/email-signup.page.module.ts | 0 .../pages/email-signup/email-signup.page.ts | 9 +++- .../forgotten-password.html | 0 .../forgotten-password.page.module.ts | 0 .../forgotten-password.page.ts | 2 +- .../features}/login/pages/init/init.html | 0 .../login/pages/init/init.page.module.ts | 0 .../features}/login/pages/init/init.page.ts | 6 +-- .../features}/login/pages/init/init.scss | 2 +- .../login/pages/reconnect/reconnect.html | 0 .../pages/reconnect/reconnect.page.module.ts | 0 .../login/pages/reconnect/reconnect.page.ts | 2 +- .../login/pages/site-policy/site-policy.html | 0 .../site-policy/site-policy.page.module.ts | 0 .../pages/site-policy/site-policy.page.ts | 2 +- .../features}/login/pages/site/site.html | 0 .../login/pages/site/site.page.module.ts | 0 .../features}/login/pages/site/site.page.ts | 8 ++-- .../features}/login/pages/site/site.scss | 0 .../features}/login/pages/sites/sites.html | 0 .../login/pages/sites/sites.page.module.ts | 0 .../features}/login/pages/sites/sites.page.ts | 2 +- .../features}/login/services/login.helper.ts | 4 +- .../features}/login/tests/init.page.test.ts | 10 ++-- .../features}/mainmenu/lang/en.json | 0 .../mainmenu/mainmenu-routing.module.ts | 2 +- .../features}/mainmenu/mainmenu.module.ts | 0 .../pages/home/home-routing.module.ts | 2 +- .../features}/mainmenu/pages/home/home.html | 0 .../mainmenu/pages/home/home.page.module.ts | 0 .../mainmenu/pages/home/home.page.ts | 0 .../features}/mainmenu/pages/home/home.scss | 0 .../features}/mainmenu/pages/menu/menu.html | 0 .../mainmenu/pages/menu/menu.page.ts | 4 +- .../features}/mainmenu/pages/menu/menu.scss | 0 .../features}/mainmenu/pages/more/more.html | 0 .../mainmenu/pages/more/more.page.ts | 2 +- .../mainmenu/services/handlers/mainmenu.ts | 0 .../mainmenu/services/home.delegate.ts | 0 .../mainmenu/services/mainmenu.delegate.ts | 0 .../features}/mainmenu/services/mainmenu.ts | 2 +- .../search/components/components.module.ts | 0 .../search-box/core-search-box.html | 0 .../components/search-box/search-box.scss | 0 .../components/search-box/search-box.ts | 0 .../features}/search/search.module.ts | 0 .../search/services/search-history.ts | 2 +- .../search/services/search.history.db.ts | 1 - .../features}/settings/lang/en.json | 0 .../features}/settings/pages/about/about.html | 0 .../settings/pages/about/about.page.module.ts | 4 +- .../settings/pages/about/about.page.ts | 2 +- .../features}/settings/pages/app/app.html | 0 .../settings/pages/app/app.page.module.ts | 0 .../features}/settings/pages/app/app.page.ts | 0 .../settings/pages/deviceinfo/deviceinfo.html | 0 .../deviceinfo/deviceinfo.page.module.ts | 0 .../pages/deviceinfo/deviceinfo.page.ts | 2 +- .../settings/pages/deviceinfo/deviceinfo.scss | 0 .../settings/pages/general/general.html | 0 .../pages/general/general.page.module.ts | 0 .../settings/pages/general/general.page.ts | 4 +- .../settings/pages/general/general.scss | 0 .../settings/pages/licenses/licenses.html | 0 .../pages/licenses/licenses.page.module.ts | 0 .../settings/pages/licenses/licenses.page.ts | 2 +- .../features}/settings/pages/site/site.html | 0 .../settings/pages/site/site.page.module.ts | 0 .../settings/pages/site/site.page.ts | 2 +- .../pages/space-usage/space-usage.html | 0 .../space-usage/space-usage.page.module.ts | 0 .../pages/space-usage/space-usage.page.ts | 0 .../synchronization/synchronization.html | 0 .../synchronization.page.module.ts | 0 .../synchronization/synchronization.page.ts | 4 +- .../settings/services/settings.delegate.ts | 0 .../settings/services/settings.helper.ts | 6 +-- .../settings/settings-init.module.ts | 6 +-- .../settings/settings-routing.module.ts | 4 +- .../features}/settings/settings.module.ts | 0 src/{app => core}/guards/auth.guard.ts | 0 src/{app => core}/lang/en.json | 0 src/{app => core}/pipes/bytes-to-size.pipe.ts | 0 src/{app => core}/pipes/create-links.pipe.ts | 0 src/{app => core}/pipes/format-date.pipe.ts | 0 src/{app => core}/pipes/no-tags.pipe.ts | 0 src/{app => core}/pipes/pipes.module.ts | 0 .../pipes/seconds-to-hms.pipe.ts | 2 +- src/{app => core}/pipes/time-ago.pipe.ts | 0 src/{app => core}/services/app.db.ts | 0 src/{app => core}/services/app.ts | 2 +- src/{app => core}/services/config.db.ts | 0 src/{app => core}/services/config.ts | 0 src/{app => core}/services/cron.db.ts | 0 src/{app => core}/services/cron.ts | 2 +- src/{app => core}/services/db.ts | 2 +- src/{app => core}/services/file-helper.ts | 2 +- src/{app => core}/services/file-session.ts | 0 src/{app => core}/services/file.ts | 2 +- src/{app => core}/services/filepool.db.ts | 0 src/{app => core}/services/filepool.ts | 2 +- src/{app => core}/services/geolocation.ts | 0 src/{app => core}/services/groups.ts | 0 .../handlers/site-info-cron-handler.ts | 0 src/{app => core}/services/init.ts | 0 src/{app => core}/services/lang.ts | 2 +- .../services/local-notifications.db.ts | 0 .../services/local-notifications.ts | 2 +- .../services/plugin-file.delegate.ts | 2 +- src/{app => core}/services/sites.db.ts | 0 src/{app => core}/services/sites.ts | 2 +- src/{app => core}/services/sync.db.ts | 1 - src/{app => core}/services/sync.ts | 0 .../services/tests/utils/text.test.ts | 2 +- .../services/tests/utils/url.test.ts | 0 src/{app => core}/services/update-manager.ts | 2 +- src/{app => core}/services/utils/dom.ts | 2 +- src/{app => core}/services/utils/iframe.ts | 0 src/{app => core}/services/utils/mimetype.ts | 0 src/{app => core}/services/utils/text.ts | 0 src/{app => core}/services/utils/time.ts | 2 +- src/{app => core}/services/utils/url.ts | 2 +- src/{app => core}/services/utils/utils.ts | 0 src/{app => core}/services/ws.ts | 2 +- src/{app => core}/singletons/array.ts | 0 .../singletons/core.singletons.ts | 0 src/{app => core}/singletons/events.ts | 0 src/{app => core}/singletons/locutus.ts | 0 src/{app => core}/singletons/logger.ts | 2 +- src/{app => core}/singletons/object.ts | 0 src/{app => core}/singletons/url.ts | 0 src/{app => core}/singletons/window.ts | 0 src/main.ts | 2 +- src/polyfills.ts | 13 ++--- src/{tests => testing}/setup.ts | 0 src/{tests => testing}/utils.ts | 2 +- src/types/global.d.ts | 2 +- src/zone-flags.ts | 21 -------- tsconfig.app.json | 20 ++++---- tsconfig.json | 19 ++++---- tsconfig.test.json | 21 ++++---- 291 files changed, 197 insertions(+), 240 deletions(-) rename src/{app/addon => addons}/privatefiles/lang/en.json (100%) rename src/{app/addon => addons}/privatefiles/pages/index/index.html (100%) rename src/{app/addon => addons}/privatefiles/pages/index/index.page.module.ts (100%) rename src/{app/addon => addons}/privatefiles/pages/index/index.page.ts (97%) rename src/{app/addon => addons}/privatefiles/privatefiles-init.module.ts (81%) rename src/{app/addon => addons}/privatefiles/privatefiles-routing.module.ts (100%) rename src/{app/addon => addons}/privatefiles/privatefiles.module.ts (100%) rename src/{app/addon => addons}/privatefiles/services/handlers/mainmenu.ts (88%) rename src/{app/addon => addons}/privatefiles/services/privatefiles.helper.ts (96%) rename src/{app/addon => addons}/privatefiles/services/privatefiles.ts (100%) rename src/{app => core}/classes/delegate-sorted.ts (98%) rename src/{app => core}/classes/delegate.ts (100%) rename src/{app => core}/classes/error.test.ts (93%) rename src/{app => core}/classes/errors/ajaxerror.ts (100%) rename src/{app => core}/classes/errors/ajaxwserror.ts (100%) rename src/{app => core}/classes/errors/cancelederror.ts (100%) rename src/{app => core}/classes/errors/captureerror.ts (100%) rename src/{app => core}/classes/errors/error.ts (100%) rename src/{app => core}/classes/errors/silenterror.ts (100%) rename src/{app => core}/classes/errors/siteerror.ts (100%) rename src/{app => core}/classes/errors/wserror.ts (100%) rename src/{app => core}/classes/interceptor.ts (100%) rename src/{app => core}/classes/ion-loading.ts (100%) rename src/{app => core}/classes/native-to-angular-http.ts (100%) rename src/{app => core}/classes/queue-runner.ts (100%) rename src/{app => core}/classes/singletons-factory.ts (100%) rename src/{app => core}/classes/site.ts (99%) rename src/{app => core}/classes/sqlitedb.ts (100%) rename src/{app => core}/components/chrono/chrono.ts (100%) rename src/{app => core}/components/chrono/core-chrono.html (100%) rename src/{app => core}/components/components.module.ts (95%) rename src/{app => core}/components/download-refresh/core-download-refresh.html (100%) rename src/{app => core}/components/download-refresh/download-refresh.scss (100%) rename src/{app => core}/components/download-refresh/download-refresh.ts (97%) rename src/{app => core}/components/empty-box/core-empty-box.html (100%) rename src/{app => core}/components/empty-box/empty-box.scss (100%) rename src/{app => core}/components/empty-box/empty-box.ts (100%) rename src/{app => core}/components/file/core-file.html (100%) rename src/{app => core}/components/file/file.scss (100%) rename src/{app => core}/components/file/file.ts (98%) rename src/{app => core}/components/icon/icon.scss (100%) rename src/{app => core}/components/icon/icon.ts (100%) rename src/{app => core}/components/iframe/core-iframe.html (100%) rename src/{app => core}/components/iframe/iframe.scss (100%) rename src/{app => core}/components/iframe/iframe.ts (100%) rename src/{app => core}/components/input-errors/core-input-errors.html (100%) rename src/{app => core}/components/input-errors/input-errors.scss (100%) rename src/{app => core}/components/input-errors/input-errors.ts (100%) rename src/{app => core}/components/loading/core-loading.html (100%) rename src/{app => core}/components/loading/loading.scss (100%) rename src/{app => core}/components/loading/loading.ts (100%) rename src/{app => core}/components/mark-required/core-mark-required.html (100%) rename src/{app => core}/components/mark-required/mark-required.scss (100%) rename src/{app => core}/components/mark-required/mark-required.ts (100%) rename src/{app => core}/components/recaptcha/core-recaptcha.html (100%) rename src/{app => core}/components/recaptcha/core-recaptchamodal.html (100%) rename src/{app => core}/components/recaptcha/recaptcha.ts (100%) rename src/{app => core}/components/recaptcha/recaptchamodal.ts (100%) rename src/{app => core}/components/show-password/core-show-password.html (100%) rename src/{app => core}/components/show-password/show-password.scss (100%) rename src/{app => core}/components/show-password/show-password.ts (100%) rename src/{app => core}/components/tabs/core-tabs.html (100%) rename src/{app => core}/components/tabs/tabs.scss (100%) rename src/{app => core}/components/tabs/tabs.ts (99%) rename src/{app => core}/components/tests/icon.test.ts (95%) rename src/{app => core}/components/tests/iframe.test.ts (100%) rename src/{app => core}/components/tests/user-avatar.test.ts (100%) rename src/{app => }/core/constants.ts (100%) rename src/{app => core}/directives/auto-focus.ts (100%) rename src/{app => core}/directives/directives.module.ts (100%) rename src/{app => core}/directives/external-content.ts (100%) rename src/{app => core}/directives/fa-icon.ts (98%) rename src/{app => core}/directives/fab.ts (100%) rename src/{app => core}/directives/format-text.ts (100%) rename src/{app => core}/directives/link.ts (99%) rename src/{app => core}/directives/long-press.ts (100%) rename src/{app => core}/directives/supress-events.ts (100%) rename src/{app => core}/directives/tests/format-text.test.ts (99%) rename src/{app => core}/directives/tests/link.test.ts (96%) rename src/{app/core => core/features}/contentlinks/classes/base-handler.ts (100%) rename src/{app/core => core/features}/contentlinks/classes/module-grade-handler.ts (98%) rename src/{app/core => core/features}/contentlinks/classes/module-index-handler.ts (100%) rename src/{app/core => core/features}/contentlinks/classes/module-list-handler.ts (97%) rename src/{app/core => core/features}/contentlinks/lang/en.json (100%) rename src/{app/core => core/features}/contentlinks/pages/choose-site/choose-site.html (100%) rename src/{app/core => core/features}/contentlinks/pages/choose-site/choose-site.page.module.ts (100%) rename src/{app/core => core/features}/contentlinks/pages/choose-site/choose-site.page.ts (98%) rename src/{app/core => core/features}/contentlinks/services/contentlinks.delegate.ts (100%) rename src/{app/core => core/features}/contentlinks/services/contentlinks.helper.ts (98%) rename src/{app/core => core/features}/courses/courses.module.ts (91%) rename src/{app/core => core/features}/courses/lang/en.json (100%) rename src/{app/core => core/features}/courses/pages/dashboard/dashboard.html (100%) rename src/{app/core => core/features}/courses/pages/dashboard/dashboard.page.module.ts (100%) rename src/{app/core => core/features}/courses/pages/dashboard/dashboard.page.ts (100%) rename src/{app/core => core/features}/courses/pages/dashboard/dashboard.scss (100%) rename src/{app/core => core/features}/courses/services/handlers/dashboard.home.ts (94%) rename src/{app/core => core/features}/emulator/classes/sqlitedb.ts (100%) rename src/{app/core => core/features}/emulator/components/capture-media/capture-media.html (100%) rename src/{app/core => core/features}/emulator/components/capture-media/capture-media.scss (100%) rename src/{app/core => core/features}/emulator/components/capture-media/capture-media.ts (100%) rename src/{app/core => core/features}/emulator/components/components.module.ts (85%) rename src/{app/core => core/features}/emulator/emulator.module.ts (100%) rename src/{app/core => core/features}/emulator/services/camera.ts (100%) rename src/{app/core => core/features}/emulator/services/capture.helper.ts (100%) rename src/{app/core => core/features}/emulator/services/clipboard.ts (100%) rename src/{app/core => core/features}/emulator/services/emulator.helper.ts (100%) rename src/{app/core => core/features}/emulator/services/file-opener.ts (100%) rename src/{app/core => core/features}/emulator/services/file-transfer.ts (99%) rename src/{app/core => core/features}/emulator/services/file.ts (100%) rename src/{app/core => core/features}/emulator/services/geolocation.ts (100%) rename src/{app/core => core/features}/emulator/services/inappbrowser.ts (100%) rename src/{app/core => core/features}/emulator/services/media-capture.ts (100%) rename src/{app/core => core/features}/emulator/services/network.ts (100%) rename src/{app/core => core/features}/emulator/services/zip.ts (100%) rename src/{app/core => core/features}/fileuploader/fileuploader-init.module.ts (100%) rename src/{app/core => core/features}/fileuploader/lang/en.json (100%) rename src/{app/core => core/features}/fileuploader/services/fileuploader.delegate.ts (100%) rename src/{app/core => core/features}/fileuploader/services/fileuploader.helper.ts (99%) rename src/{app/core => core/features}/fileuploader/services/fileuploader.ts (99%) rename src/{app/core => core/features}/fileuploader/services/handlers/album.ts (100%) rename src/{app/core => core/features}/fileuploader/services/handlers/audio.ts (100%) rename src/{app/core => core/features}/fileuploader/services/handlers/camera.ts (100%) rename src/{app/core => core/features}/fileuploader/services/handlers/file.ts (100%) rename src/{app/core => core/features}/fileuploader/services/handlers/video.ts (100%) rename src/{app/core => core/features}/login/components/site-help/site-help.html (100%) rename src/{app/core => core/features}/login/components/site-help/site-help.scss (100%) rename src/{app/core => core/features}/login/components/site-help/site-help.ts (95%) rename src/{app/core => core/features}/login/components/site-onboarding/site-onboarding.html (100%) rename src/{app/core => core/features}/login/components/site-onboarding/site-onboarding.scss (100%) rename src/{app/core => core/features}/login/components/site-onboarding/site-onboarding.ts (96%) rename src/{app/core => core/features}/login/lang/en.json (100%) rename src/{app/core => core/features}/login/login-routing.module.ts (100%) rename src/{app/core => core/features}/login/login.module.ts (100%) rename src/{app/core => core/features}/login/login.scss (100%) rename src/{app/core => core/features}/login/pages/change-password/change-password.html (100%) rename src/{app/core => core/features}/login/pages/change-password/change-password.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/change-password/change-password.page.ts (96%) rename src/{app/core => core/features}/login/pages/credentials/credentials.html (100%) rename src/{app/core => core/features}/login/pages/credentials/credentials.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/credentials/credentials.page.ts (98%) rename src/{app/core => core/features}/login/pages/email-signup/email-signup.html (100%) rename src/{app/core => core/features}/login/pages/email-signup/email-signup.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/email-signup/email-signup.page.ts (98%) rename src/{app/core => core/features}/login/pages/forgotten-password/forgotten-password.html (100%) rename src/{app/core => core/features}/login/pages/forgotten-password/forgotten-password.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/forgotten-password/forgotten-password.page.ts (98%) rename src/{app/core => core/features}/login/pages/init/init.html (100%) rename src/{app/core => core/features}/login/pages/init/init.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/init/init.page.ts (95%) rename src/{app/core => core/features}/login/pages/init/init.scss (88%) rename src/{app/core => core/features}/login/pages/reconnect/reconnect.html (100%) rename src/{app/core => core/features}/login/pages/reconnect/reconnect.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/reconnect/reconnect.page.ts (99%) rename src/{app/core => core/features}/login/pages/site-policy/site-policy.html (100%) rename src/{app/core => core/features}/login/pages/site-policy/site-policy.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/site-policy/site-policy.page.ts (98%) rename src/{app/core => core/features}/login/pages/site/site.html (100%) rename src/{app/core => core/features}/login/pages/site/site.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/site/site.page.ts (98%) rename src/{app/core => core/features}/login/pages/site/site.scss (100%) rename src/{app/core => core/features}/login/pages/sites/sites.html (100%) rename src/{app/core => core/features}/login/pages/sites/sites.page.module.ts (100%) rename src/{app/core => core/features}/login/pages/sites/sites.page.ts (98%) rename src/{app/core => core/features}/login/services/login.helper.ts (99%) rename src/{app/core => core/features}/login/tests/init.page.test.ts (88%) rename src/{app/core => core/features}/mainmenu/lang/en.json (100%) rename src/{app/core => core/features}/mainmenu/mainmenu-routing.module.ts (97%) rename src/{app/core => core/features}/mainmenu/mainmenu.module.ts (100%) rename src/{app/core => core/features}/mainmenu/pages/home/home-routing.module.ts (96%) rename src/{app/core => core/features}/mainmenu/pages/home/home.html (100%) rename src/{app/core => core/features}/mainmenu/pages/home/home.page.module.ts (100%) rename src/{app/core => core/features}/mainmenu/pages/home/home.page.ts (100%) rename src/{app/core => core/features}/mainmenu/pages/home/home.scss (100%) rename src/{app/core => core/features}/mainmenu/pages/menu/menu.html (100%) rename src/{app/core => core/features}/mainmenu/pages/menu/menu.page.ts (98%) rename src/{app/core => core/features}/mainmenu/pages/menu/menu.scss (100%) rename src/{app/core => core/features}/mainmenu/pages/more/more.html (100%) rename src/{app/core => core/features}/mainmenu/pages/more/more.page.ts (98%) rename src/{app/core => core/features}/mainmenu/services/handlers/mainmenu.ts (100%) rename src/{app/core => core/features}/mainmenu/services/home.delegate.ts (100%) rename src/{app/core => core/features}/mainmenu/services/mainmenu.delegate.ts (100%) rename src/{app/core => core/features}/mainmenu/services/mainmenu.ts (99%) rename src/{app/core => core/features}/search/components/components.module.ts (100%) rename src/{app/core => core/features}/search/components/search-box/core-search-box.html (100%) rename src/{app/core => core/features}/search/components/search-box/search-box.scss (100%) rename src/{app/core => core/features}/search/components/search-box/search-box.ts (100%) rename src/{app/core => core/features}/search/search.module.ts (100%) rename src/{app/core => core/features}/search/services/search-history.ts (98%) rename src/{app/core => core/features}/search/services/search.history.db.ts (99%) rename src/{app/core => core/features}/settings/lang/en.json (100%) rename src/{app/core => core/features}/settings/pages/about/about.html (100%) rename src/{app/core => core/features}/settings/pages/about/about.page.module.ts (92%) rename src/{app/core => core/features}/settings/pages/about/about.page.ts (97%) rename src/{app/core => core/features}/settings/pages/app/app.html (100%) rename src/{app/core => core/features}/settings/pages/app/app.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/app/app.page.ts (100%) rename src/{app/core => core/features}/settings/pages/deviceinfo/deviceinfo.html (100%) rename src/{app/core => core/features}/settings/pages/deviceinfo/deviceinfo.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/deviceinfo/deviceinfo.page.ts (99%) rename src/{app/core => core/features}/settings/pages/deviceinfo/deviceinfo.scss (100%) rename src/{app/core => core/features}/settings/pages/general/general.html (100%) rename src/{app/core => core/features}/settings/pages/general/general.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/general/general.page.ts (97%) rename src/{app/core => core/features}/settings/pages/general/general.scss (100%) rename src/{app/core => core/features}/settings/pages/licenses/licenses.html (100%) rename src/{app/core => core/features}/settings/pages/licenses/licenses.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/licenses/licenses.page.ts (98%) rename src/{app/core => core/features}/settings/pages/site/site.html (100%) rename src/{app/core => core/features}/settings/pages/site/site.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/site/site.page.ts (98%) rename src/{app/core => core/features}/settings/pages/space-usage/space-usage.html (100%) rename src/{app/core => core/features}/settings/pages/space-usage/space-usage.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/space-usage/space-usage.page.ts (100%) rename src/{app/core => core/features}/settings/pages/synchronization/synchronization.html (100%) rename src/{app/core => core/features}/settings/pages/synchronization/synchronization.page.module.ts (100%) rename src/{app/core => core/features}/settings/pages/synchronization/synchronization.page.ts (96%) rename src/{app/core => core/features}/settings/services/settings.delegate.ts (100%) rename src/{app/core => core/features}/settings/services/settings.helper.ts (98%) rename src/{app/core => core/features}/settings/settings-init.module.ts (77%) rename src/{app/core => core/features}/settings/settings-routing.module.ts (89%) rename src/{app/core => core/features}/settings/settings.module.ts (100%) rename src/{app => core}/guards/auth.guard.ts (100%) rename src/{app => core}/lang/en.json (100%) rename src/{app => core}/pipes/bytes-to-size.pipe.ts (100%) rename src/{app => core}/pipes/create-links.pipe.ts (100%) rename src/{app => core}/pipes/format-date.pipe.ts (100%) rename src/{app => core}/pipes/no-tags.pipe.ts (100%) rename src/{app => core}/pipes/pipes.module.ts (100%) rename src/{app => core}/pipes/seconds-to-hms.pipe.ts (97%) rename src/{app => core}/pipes/time-ago.pipe.ts (100%) rename src/{app => core}/services/app.db.ts (100%) rename src/{app => core}/services/app.ts (99%) rename src/{app => core}/services/config.db.ts (100%) rename src/{app => core}/services/config.ts (100%) rename src/{app => core}/services/cron.db.ts (100%) rename src/{app => core}/services/cron.ts (99%) rename src/{app => core}/services/db.ts (97%) rename src/{app => core}/services/file-helper.ts (99%) rename src/{app => core}/services/file-session.ts (100%) rename src/{app => core}/services/file.ts (99%) rename src/{app => core}/services/filepool.db.ts (100%) rename src/{app => core}/services/filepool.ts (99%) rename src/{app => core}/services/geolocation.ts (100%) rename src/{app => core}/services/groups.ts (100%) rename src/{app => core}/services/handlers/site-info-cron-handler.ts (100%) rename src/{app => core}/services/init.ts (100%) rename src/{app => core}/services/lang.ts (99%) rename src/{app => core}/services/local-notifications.db.ts (100%) rename src/{app => core}/services/local-notifications.ts (99%) rename src/{app => core}/services/plugin-file.delegate.ts (99%) rename src/{app => core}/services/sites.db.ts (100%) rename src/{app => core}/services/sites.ts (99%) rename src/{app => core}/services/sync.db.ts (99%) rename src/{app => core}/services/sync.ts (100%) rename src/{app => core}/services/tests/utils/text.test.ts (97%) rename src/{app => core}/services/tests/utils/url.test.ts (100%) rename src/{app => core}/services/update-manager.ts (97%) rename src/{app => core}/services/utils/dom.ts (99%) rename src/{app => core}/services/utils/iframe.ts (100%) rename src/{app => core}/services/utils/mimetype.ts (100%) rename src/{app => core}/services/utils/text.ts (100%) rename src/{app => core}/services/utils/time.ts (99%) rename src/{app => core}/services/utils/url.ts (99%) rename src/{app => core}/services/utils/utils.ts (100%) rename src/{app => core}/services/ws.ts (99%) rename src/{app => core}/singletons/array.ts (100%) rename src/{app => core}/singletons/core.singletons.ts (100%) rename src/{app => core}/singletons/events.ts (100%) rename src/{app => core}/singletons/locutus.ts (100%) rename src/{app => core}/singletons/logger.ts (98%) rename src/{app => core}/singletons/object.ts (100%) rename src/{app => core}/singletons/url.ts (100%) rename src/{app => core}/singletons/window.ts (100%) rename src/{tests => testing}/setup.ts (100%) rename src/{tests => testing}/utils.ts (98%) delete mode 100644 src/zone-flags.ts diff --git a/angular.json b/angular.json index 7bbf70116..b7952db75 100644 --- a/angular.json +++ b/angular.json @@ -93,7 +93,8 @@ "options": { "lintFilePatterns": [ "src/**/*.ts", - "src/app/**/*.html" + "src/core/**/*.html", + "src/addons/**/*.html" ] } }, diff --git a/config/webpack.config.js b/config/webpack.config.js index 8a850f580..27266089c 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -18,15 +18,14 @@ const { resolve } = require('path'); module.exports = config => { config.resolve.alias['@'] = resolve('src'); - config.resolve.alias['@addon'] = resolve('src/app/addon'); - config.resolve.alias['@app'] = resolve('src/app'); - config.resolve.alias['@classes'] = resolve('src/app/classes'); - config.resolve.alias['@components'] = resolve('src/app/components'); - config.resolve.alias['@core'] = resolve('src/app/core'); - config.resolve.alias['@directives'] = resolve('src/app/directives'); - config.resolve.alias['@pipes'] = resolve('src/app/pipes'); - config.resolve.alias['@services'] = resolve('src/app/services'); - config.resolve.alias['@singletons'] = resolve('src/app/singletons'); + config.resolve.alias['@classes'] = resolve('src/core/classes'); + config.resolve.alias['@components'] = resolve('src/core/components'); + config.resolve.alias['@directives'] = resolve('src/core/directives'); + config.resolve.alias['@features'] = resolve('src/core/features'); + config.resolve.alias['@guards'] = resolve('src/core/guards'); + config.resolve.alias['@pipes'] = resolve('src/core/pipes'); + config.resolve.alias['@services'] = resolve('src/core/services'); + config.resolve.alias['@singletons'] = resolve('src/core/singletons'); config.plugins.push( new webpack.DefinePlugin({ diff --git a/gulp/task-build-lang.js b/gulp/task-build-lang.js index 980bf52a4..5927aa535 100644 --- a/gulp/task-build-lang.js +++ b/gulp/task-build-lang.js @@ -136,47 +136,35 @@ class BuildLangTask { treatMergedData(data) { const merged = {}; const mergedOrdered = {}; + const getPrefix = (path) => { + const folders = path.split(/[\/\\]/); - for (let filepath in data) { - - const pathSplit = filepath.split(/[\/\\]/); - let prefix; - - pathSplit.pop(); - - switch (pathSplit[0]) { - case 'lang': - prefix = 'core'; - break; + switch (folders[0]) { case 'core': - if (pathSplit[1] == 'lang') { - // Not used right now. - prefix = 'core'; - } else { - prefix = 'core.' + pathSplit[1]; + switch (folders[1]) { + case 'lang': + return 'core.'; + case 'features': + return `core.${folders[2]}.`; } - break; - case 'addon': - // Remove final item 'lang'. - pathSplit.pop(); - // Remove first item 'addon'. - pathSplit.shift(); - // For subplugins. We'll use plugin_subfolder_subfolder2_... - // E.g. 'mod_assign_feedback_comments'. - prefix = 'addon.' + pathSplit.join('_'); break; + case 'addons': + return `addon.${folders.slice(1, -2).join('_')}.`; case 'assets': - prefix = 'assets.' + pathSplit[1]; - break; + return `assets.${folders[1]}.`; } - if (prefix) { - this.addProperties(merged, data[filepath], prefix + '.'); - } + return null; } + for (let filepath in data) { + const prefix = getPrefix(filepath); + if (prefix) { + this.addProperties(merged, data[filepath], prefix); + } + } // Force ordering by string key. Object.keys(merged).sort().forEach((key) => { diff --git a/gulpfile.js b/gulpfile.js index 7a08d6c88..e8efdd7a6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,13 +19,12 @@ const gulp = require('gulp'); const paths = { lang: [ - './src/app/lang/', - './src/app/core/**/lang/', - './src/app/addon/**/lang/', - './src/app/**/**/lang/', + './src/addons/**/lang/', './src/assets/countries/', - './src/assets/mimetypes/' - ] + './src/assets/mimetypes/', + './src/core/features/**/lang/', + './src/core/lang/', + ], }; const args = Utils.getCommandLineArguments(); diff --git a/jest.config.js b/jest.config.js index 255dd66b3..f464ae96e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,11 +3,11 @@ const { compilerOptions } = require('./tsconfig'); module.exports = { preset: 'jest-preset-angular', - setupFilesAfterEnv: ['/src/tests/setup.ts'], + setupFilesAfterEnv: ['/src/testing/setup.ts'], testMatch: ['**/?(*.)test.ts'], collectCoverageFrom: [ 'src/**/*.{ts,html}', - '!src/tests/**/*', + '!src/testing/**/*', ], transform: { '^.+\\.(ts|html)$': 'ts-jest', diff --git a/src/app/addon/privatefiles/lang/en.json b/src/addons/privatefiles/lang/en.json similarity index 100% rename from src/app/addon/privatefiles/lang/en.json rename to src/addons/privatefiles/lang/en.json diff --git a/src/app/addon/privatefiles/pages/index/index.html b/src/addons/privatefiles/pages/index/index.html similarity index 100% rename from src/app/addon/privatefiles/pages/index/index.html rename to src/addons/privatefiles/pages/index/index.html diff --git a/src/app/addon/privatefiles/pages/index/index.page.module.ts b/src/addons/privatefiles/pages/index/index.page.module.ts similarity index 100% rename from src/app/addon/privatefiles/pages/index/index.page.module.ts rename to src/addons/privatefiles/pages/index/index.page.module.ts diff --git a/src/app/addon/privatefiles/pages/index/index.page.ts b/src/addons/privatefiles/pages/index/index.page.ts similarity index 97% rename from src/app/addon/privatefiles/pages/index/index.page.ts rename to src/addons/privatefiles/pages/index/index.page.ts index ca20a6df2..d6c6c868c 100644 --- a/src/app/addon/privatefiles/pages/index/index.page.ts +++ b/src/addons/privatefiles/pages/index/index.page.ts @@ -29,9 +29,9 @@ import { AddonPrivateFilesFile, AddonPrivateFilesGetUserInfoWSResult, AddonPrivateFilesGetFilesWSParams, -} from '@addon/privatefiles/services/privatefiles'; -import { AddonPrivateFilesHelper } from '@addon/privatefiles/services/privatefiles.helper'; -import { CoreUtils } from '@/app/services/utils/utils'; +} from '@/addons/privatefiles/services/privatefiles'; +import { AddonPrivateFilesHelper } from '@/addons/privatefiles/services/privatefiles.helper'; +import { CoreUtils } from '@services/utils/utils'; /** * Page that displays the list of files. diff --git a/src/app/addon/privatefiles/privatefiles-init.module.ts b/src/addons/privatefiles/privatefiles-init.module.ts similarity index 81% rename from src/app/addon/privatefiles/privatefiles-init.module.ts rename to src/addons/privatefiles/privatefiles-init.module.ts index b09af1fd2..8c7c3d67b 100644 --- a/src/app/addon/privatefiles/privatefiles-init.module.ts +++ b/src/addons/privatefiles/privatefiles-init.module.ts @@ -15,14 +15,14 @@ import { NgModule } from '@angular/core'; import { Routes } from '@angular/router'; -import { CoreMainMenuDelegate } from '@core/mainmenu/services/mainmenu.delegate'; -import { CoreMainMenuRoutingModule } from '@core/mainmenu/mainmenu-routing.module'; +import { CoreMainMenuDelegate } from '@features/mainmenu/services/mainmenu.delegate'; +import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module'; import { AddonPrivateFilesMainMenuHandler } from './services/handlers/mainmenu'; const routes: Routes = [ { path: 'addon-privatefiles', - loadChildren: () => import('@addon/privatefiles/privatefiles.module').then(m => m.AddonPrivateFilesModule), + loadChildren: () => import('@/addons/privatefiles/privatefiles.module').then(m => m.AddonPrivateFilesModule), }, ]; diff --git a/src/app/addon/privatefiles/privatefiles-routing.module.ts b/src/addons/privatefiles/privatefiles-routing.module.ts similarity index 100% rename from src/app/addon/privatefiles/privatefiles-routing.module.ts rename to src/addons/privatefiles/privatefiles-routing.module.ts diff --git a/src/app/addon/privatefiles/privatefiles.module.ts b/src/addons/privatefiles/privatefiles.module.ts similarity index 100% rename from src/app/addon/privatefiles/privatefiles.module.ts rename to src/addons/privatefiles/privatefiles.module.ts diff --git a/src/app/addon/privatefiles/services/handlers/mainmenu.ts b/src/addons/privatefiles/services/handlers/mainmenu.ts similarity index 88% rename from src/app/addon/privatefiles/services/handlers/mainmenu.ts rename to src/addons/privatefiles/services/handlers/mainmenu.ts index d7c5c33d5..f3859f456 100644 --- a/src/app/addon/privatefiles/services/handlers/mainmenu.ts +++ b/src/addons/privatefiles/services/handlers/mainmenu.ts @@ -14,8 +14,8 @@ import { Injectable } from '@angular/core'; -import { CoreMainMenuHandler, CoreMainMenuHandlerData } from '@core/mainmenu/services/mainmenu.delegate'; -import { AddonPrivateFiles } from '@addon/privatefiles/services/privatefiles'; +import { CoreMainMenuHandler, CoreMainMenuHandlerData } from '@features/mainmenu/services/mainmenu.delegate'; +import { AddonPrivateFiles } from '@/addons/privatefiles/services/privatefiles'; /** * Handler to inject an option into main menu. diff --git a/src/app/addon/privatefiles/services/privatefiles.helper.ts b/src/addons/privatefiles/services/privatefiles.helper.ts similarity index 96% rename from src/app/addon/privatefiles/services/privatefiles.helper.ts rename to src/addons/privatefiles/services/privatefiles.helper.ts index 2dbd3e5d9..e37992cc8 100644 --- a/src/app/addon/privatefiles/services/privatefiles.helper.ts +++ b/src/addons/privatefiles/services/privatefiles.helper.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreFileUploaderHelper } from '@core/fileuploader/services/fileuploader.helper'; +import { CoreFileUploaderHelper } from '@features/fileuploader/services/fileuploader.helper'; import { AddonPrivateFiles, AddonPrivateFilesGetUserInfoWSResult } from './privatefiles'; import { CoreError } from '@classes/errors/error'; import { makeSingleton, Translate } from '@singletons/core.singletons'; diff --git a/src/app/addon/privatefiles/services/privatefiles.ts b/src/addons/privatefiles/services/privatefiles.ts similarity index 100% rename from src/app/addon/privatefiles/services/privatefiles.ts rename to src/addons/privatefiles/services/privatefiles.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 2a8d0f660..2bcc80750 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -20,15 +20,15 @@ import { AuthGuard } from '@guards/auth.guard'; const routes: Routes = [ { path: 'login', - loadChildren: () => import('./core/login/login.module').then( m => m.CoreLoginModule), + loadChildren: () => import('@features/login/login.module').then( m => m.CoreLoginModule), }, { path: 'settings', - loadChildren: () => import('./core/settings/settings.module').then( m => m.CoreSettingsModule), + loadChildren: () => import('@features/settings/settings.module').then( m => m.CoreSettingsModule), }, { path: '', - loadChildren: () => import('./core/mainmenu/mainmenu.module').then( m => m.CoreMainMenuModule), + loadChildren: () => import('@features/mainmenu/mainmenu.module').then( m => m.CoreMainMenuModule), canActivate: [AuthGuard], canLoad: [AuthGuard], }, diff --git a/src/app/app.component.test.ts b/src/app/app.component.test.ts index b495748b6..f2f11836d 100644 --- a/src/app/app.component.test.ts +++ b/src/app/app.component.test.ts @@ -15,12 +15,12 @@ import { Observable } from 'rxjs'; import { NavController } from '@ionic/angular'; -import { AppComponent } from '@app/app.component'; +import { AppComponent } from '@/app/app.component'; import { CoreEvents } from '@singletons/events'; import { CoreLangProvider } from '@services/lang'; import { Network, Platform, NgZone } from '@singletons/core.singletons'; -import { mock, mockSingleton, renderComponent, RenderConfig } from '@/tests/utils'; +import { mock, mockSingleton, renderComponent, RenderConfig } from '@/testing/utils'; describe('AppComponent', () => { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ce97f3c93..1bd3a63de 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -16,7 +16,7 @@ import { Component, OnInit } from '@angular/core'; import { NavController } from '@ionic/angular'; import { CoreLangProvider } from '@services/lang'; -import { CoreLoginHelperProvider } from '@core/login/services/login.helper'; +import { CoreLoginHelperProvider } from '@features/login/services/login.helper'; import { CoreEvents, CoreEventSessionExpiredData } from '@singletons/events'; import { Network, NgZone, Platform } from '@singletons/core.singletons'; import { CoreApp } from '@services/app'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 953bc83ef..df93cf574 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -54,17 +54,17 @@ import { CoreUtilsProvider } from '@services/utils/utils'; import { initCoreFilepoolDB } from '@services/filepool.db'; import { initCoreSitesDB } from '@services/sites.db'; import { initCoreSyncDB } from '@services/sync.db'; -import { initCoreSearchHistoryDB } from '@core/search/services/search.history.db'; +import { initCoreSearchHistoryDB } from '@features/search/services/search.history.db'; // Import core modules. -import { CoreEmulatorModule } from '@core/emulator/emulator.module'; -import { CoreLoginModule } from '@core/login/login.module'; -import { CoreCoursesModule } from '@core/courses/courses.module'; -import { CoreSettingsInitModule } from '@core/settings/settings-init.module'; -import { CoreFileUploaderInitModule } from '@core/fileuploader/fileuploader-init.module'; +import { CoreEmulatorModule } from '@features/emulator/emulator.module'; +import { CoreLoginModule } from '@features/login/login.module'; +import { CoreCoursesModule } from '@features/courses/courses.module'; +import { CoreSettingsInitModule } from '@features/settings/settings-init.module'; +import { CoreFileUploaderInitModule } from '@features/fileuploader/fileuploader-init.module'; // Import addons init modules. -import { AddonPrivateFilesInitModule } from '@addon/privatefiles/privatefiles-init.module'; +import { AddonPrivateFilesInitModule } from '@/addons/privatefiles/privatefiles-init.module'; import { setSingletonsInjector } from '@singletons/core.singletons'; diff --git a/src/app/classes/delegate-sorted.ts b/src/core/classes/delegate-sorted.ts similarity index 98% rename from src/app/classes/delegate-sorted.ts rename to src/core/classes/delegate-sorted.ts index 1b8c121e6..751573574 100644 --- a/src/app/classes/delegate-sorted.ts +++ b/src/core/classes/delegate-sorted.ts @@ -13,7 +13,7 @@ // limitations under the License. import { BehaviorSubject, Subject } from 'rxjs'; -import { CoreEvents } from '../singletons/events'; +import { CoreEvents } from '@singletons/events'; import { CoreDelegate, CoreDelegateDisplayHandler, CoreDelegateToDisplay } from './delegate'; /** @@ -101,4 +101,3 @@ export class CoreSortedDelegate< } } - diff --git a/src/app/classes/delegate.ts b/src/core/classes/delegate.ts similarity index 100% rename from src/app/classes/delegate.ts rename to src/core/classes/delegate.ts diff --git a/src/app/classes/error.test.ts b/src/core/classes/error.test.ts similarity index 93% rename from src/app/classes/error.test.ts rename to src/core/classes/error.test.ts index e7f0e9cf5..005da6c67 100644 --- a/src/app/classes/error.test.ts +++ b/src/core/classes/error.test.ts @@ -38,7 +38,7 @@ describe('CoreError', () => { expect(error!.name).toEqual('CoreError'); expect(error!.message).toEqual(message); expect(error!.stack).not.toBeNull(); - expect(error!.stack).toContain('src/app/classes/error.test.ts'); + expect(error!.stack).toContain('src/core/classes/error.test.ts'); }); it('can be subclassed', () => { @@ -70,7 +70,7 @@ describe('CoreError', () => { expect(error!.name).toEqual('CustomCoreError'); expect(error!.message).toEqual(`Custom message: ${message}`); expect(error!.stack).not.toBeNull(); - expect(error!.stack).toContain('src/app/classes/error.test.ts'); + expect(error!.stack).toContain('src/core/classes/error.test.ts'); }); }); diff --git a/src/app/classes/errors/ajaxerror.ts b/src/core/classes/errors/ajaxerror.ts similarity index 100% rename from src/app/classes/errors/ajaxerror.ts rename to src/core/classes/errors/ajaxerror.ts diff --git a/src/app/classes/errors/ajaxwserror.ts b/src/core/classes/errors/ajaxwserror.ts similarity index 100% rename from src/app/classes/errors/ajaxwserror.ts rename to src/core/classes/errors/ajaxwserror.ts diff --git a/src/app/classes/errors/cancelederror.ts b/src/core/classes/errors/cancelederror.ts similarity index 100% rename from src/app/classes/errors/cancelederror.ts rename to src/core/classes/errors/cancelederror.ts diff --git a/src/app/classes/errors/captureerror.ts b/src/core/classes/errors/captureerror.ts similarity index 100% rename from src/app/classes/errors/captureerror.ts rename to src/core/classes/errors/captureerror.ts diff --git a/src/app/classes/errors/error.ts b/src/core/classes/errors/error.ts similarity index 100% rename from src/app/classes/errors/error.ts rename to src/core/classes/errors/error.ts diff --git a/src/app/classes/errors/silenterror.ts b/src/core/classes/errors/silenterror.ts similarity index 100% rename from src/app/classes/errors/silenterror.ts rename to src/core/classes/errors/silenterror.ts diff --git a/src/app/classes/errors/siteerror.ts b/src/core/classes/errors/siteerror.ts similarity index 100% rename from src/app/classes/errors/siteerror.ts rename to src/core/classes/errors/siteerror.ts diff --git a/src/app/classes/errors/wserror.ts b/src/core/classes/errors/wserror.ts similarity index 100% rename from src/app/classes/errors/wserror.ts rename to src/core/classes/errors/wserror.ts diff --git a/src/app/classes/interceptor.ts b/src/core/classes/interceptor.ts similarity index 100% rename from src/app/classes/interceptor.ts rename to src/core/classes/interceptor.ts diff --git a/src/app/classes/ion-loading.ts b/src/core/classes/ion-loading.ts similarity index 100% rename from src/app/classes/ion-loading.ts rename to src/core/classes/ion-loading.ts diff --git a/src/app/classes/native-to-angular-http.ts b/src/core/classes/native-to-angular-http.ts similarity index 100% rename from src/app/classes/native-to-angular-http.ts rename to src/core/classes/native-to-angular-http.ts diff --git a/src/app/classes/queue-runner.ts b/src/core/classes/queue-runner.ts similarity index 100% rename from src/app/classes/queue-runner.ts rename to src/core/classes/queue-runner.ts diff --git a/src/app/classes/singletons-factory.ts b/src/core/classes/singletons-factory.ts similarity index 100% rename from src/app/classes/singletons-factory.ts rename to src/core/classes/singletons-factory.ts diff --git a/src/app/classes/site.ts b/src/core/classes/site.ts similarity index 99% rename from src/app/classes/site.ts rename to src/core/classes/site.ts index 9e875a91d..de721524d 100644 --- a/src/app/classes/site.ts +++ b/src/core/classes/site.ts @@ -32,7 +32,7 @@ import { CoreTextUtils } from '@services/utils/text'; import { CoreTimeUtils } from '@services/utils/time'; import { CoreUrlUtils, CoreUrlParams } from '@services/utils/url'; import { CoreUtils, PromiseDefer } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { SQLiteDB } from '@classes/sqlitedb'; import { CoreError } from '@classes/errors/error'; import { CoreWSError } from '@classes/errors/wserror'; diff --git a/src/app/classes/sqlitedb.ts b/src/core/classes/sqlitedb.ts similarity index 100% rename from src/app/classes/sqlitedb.ts rename to src/core/classes/sqlitedb.ts diff --git a/src/app/components/chrono/chrono.ts b/src/core/components/chrono/chrono.ts similarity index 100% rename from src/app/components/chrono/chrono.ts rename to src/core/components/chrono/chrono.ts diff --git a/src/app/components/chrono/core-chrono.html b/src/core/components/chrono/core-chrono.html similarity index 100% rename from src/app/components/chrono/core-chrono.html rename to src/core/components/chrono/core-chrono.html diff --git a/src/app/components/components.module.ts b/src/core/components/components.module.ts similarity index 95% rename from src/app/components/components.module.ts rename to src/core/components/components.module.ts index b67263e6a..0137d6548 100644 --- a/src/app/components/components.module.ts +++ b/src/core/components/components.module.ts @@ -31,8 +31,8 @@ import { CoreShowPasswordComponent } from './show-password/show-password'; import { CoreEmptyBoxComponent } from './empty-box/empty-box'; import { CoreTabsComponent } from './tabs/tabs'; -import { CoreDirectivesModule } from '@app/directives/directives.module'; -import { CorePipesModule } from '@app/pipes/pipes.module'; +import { CoreDirectivesModule } from '@directives/directives.module'; +import { CorePipesModule } from '@pipes/pipes.module'; @NgModule({ declarations: [ diff --git a/src/app/components/download-refresh/core-download-refresh.html b/src/core/components/download-refresh/core-download-refresh.html similarity index 100% rename from src/app/components/download-refresh/core-download-refresh.html rename to src/core/components/download-refresh/core-download-refresh.html diff --git a/src/app/components/download-refresh/download-refresh.scss b/src/core/components/download-refresh/download-refresh.scss similarity index 100% rename from src/app/components/download-refresh/download-refresh.scss rename to src/core/components/download-refresh/download-refresh.scss diff --git a/src/app/components/download-refresh/download-refresh.ts b/src/core/components/download-refresh/download-refresh.ts similarity index 97% rename from src/app/components/download-refresh/download-refresh.ts rename to src/core/components/download-refresh/download-refresh.ts index ad7b9d7c9..0b96d9102 100644 --- a/src/app/components/download-refresh/download-refresh.ts +++ b/src/core/components/download-refresh/download-refresh.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, Input, Output, EventEmitter } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; /** * Component to show a download button with refresh option, the spinner and the status of it. diff --git a/src/app/components/empty-box/core-empty-box.html b/src/core/components/empty-box/core-empty-box.html similarity index 100% rename from src/app/components/empty-box/core-empty-box.html rename to src/core/components/empty-box/core-empty-box.html diff --git a/src/app/components/empty-box/empty-box.scss b/src/core/components/empty-box/empty-box.scss similarity index 100% rename from src/app/components/empty-box/empty-box.scss rename to src/core/components/empty-box/empty-box.scss diff --git a/src/app/components/empty-box/empty-box.ts b/src/core/components/empty-box/empty-box.ts similarity index 100% rename from src/app/components/empty-box/empty-box.ts rename to src/core/components/empty-box/empty-box.ts diff --git a/src/app/components/file/core-file.html b/src/core/components/file/core-file.html similarity index 100% rename from src/app/components/file/core-file.html rename to src/core/components/file/core-file.html diff --git a/src/app/components/file/file.scss b/src/core/components/file/file.scss similarity index 100% rename from src/app/components/file/file.scss rename to src/core/components/file/file.scss diff --git a/src/app/components/file/file.ts b/src/core/components/file/file.ts similarity index 98% rename from src/app/components/file/file.ts rename to src/core/components/file/file.ts index 7b006e8ae..5b73eabe7 100644 --- a/src/app/components/file/file.ts +++ b/src/core/components/file/file.ts @@ -23,9 +23,9 @@ import { CoreMimetypeUtils } from '@services/utils/mimetype'; import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; import { CoreTextUtils } from '@services/utils/text'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; -import { CoreWSExternalFile } from '@/app/services/ws'; +import { CoreWSExternalFile } from '@services/ws'; /** * Component to handle a remote file. Shows the file name, icon (depending on mimetype) and a button diff --git a/src/app/components/icon/icon.scss b/src/core/components/icon/icon.scss similarity index 100% rename from src/app/components/icon/icon.scss rename to src/core/components/icon/icon.scss diff --git a/src/app/components/icon/icon.ts b/src/core/components/icon/icon.ts similarity index 100% rename from src/app/components/icon/icon.ts rename to src/core/components/icon/icon.ts diff --git a/src/app/components/iframe/core-iframe.html b/src/core/components/iframe/core-iframe.html similarity index 100% rename from src/app/components/iframe/core-iframe.html rename to src/core/components/iframe/core-iframe.html diff --git a/src/app/components/iframe/iframe.scss b/src/core/components/iframe/iframe.scss similarity index 100% rename from src/app/components/iframe/iframe.scss rename to src/core/components/iframe/iframe.scss diff --git a/src/app/components/iframe/iframe.ts b/src/core/components/iframe/iframe.ts similarity index 100% rename from src/app/components/iframe/iframe.ts rename to src/core/components/iframe/iframe.ts diff --git a/src/app/components/input-errors/core-input-errors.html b/src/core/components/input-errors/core-input-errors.html similarity index 100% rename from src/app/components/input-errors/core-input-errors.html rename to src/core/components/input-errors/core-input-errors.html diff --git a/src/app/components/input-errors/input-errors.scss b/src/core/components/input-errors/input-errors.scss similarity index 100% rename from src/app/components/input-errors/input-errors.scss rename to src/core/components/input-errors/input-errors.scss diff --git a/src/app/components/input-errors/input-errors.ts b/src/core/components/input-errors/input-errors.ts similarity index 100% rename from src/app/components/input-errors/input-errors.ts rename to src/core/components/input-errors/input-errors.ts diff --git a/src/app/components/loading/core-loading.html b/src/core/components/loading/core-loading.html similarity index 100% rename from src/app/components/loading/core-loading.html rename to src/core/components/loading/core-loading.html diff --git a/src/app/components/loading/loading.scss b/src/core/components/loading/loading.scss similarity index 100% rename from src/app/components/loading/loading.scss rename to src/core/components/loading/loading.scss diff --git a/src/app/components/loading/loading.ts b/src/core/components/loading/loading.ts similarity index 100% rename from src/app/components/loading/loading.ts rename to src/core/components/loading/loading.ts diff --git a/src/app/components/mark-required/core-mark-required.html b/src/core/components/mark-required/core-mark-required.html similarity index 100% rename from src/app/components/mark-required/core-mark-required.html rename to src/core/components/mark-required/core-mark-required.html diff --git a/src/app/components/mark-required/mark-required.scss b/src/core/components/mark-required/mark-required.scss similarity index 100% rename from src/app/components/mark-required/mark-required.scss rename to src/core/components/mark-required/mark-required.scss diff --git a/src/app/components/mark-required/mark-required.ts b/src/core/components/mark-required/mark-required.ts similarity index 100% rename from src/app/components/mark-required/mark-required.ts rename to src/core/components/mark-required/mark-required.ts diff --git a/src/app/components/recaptcha/core-recaptcha.html b/src/core/components/recaptcha/core-recaptcha.html similarity index 100% rename from src/app/components/recaptcha/core-recaptcha.html rename to src/core/components/recaptcha/core-recaptcha.html diff --git a/src/app/components/recaptcha/core-recaptchamodal.html b/src/core/components/recaptcha/core-recaptchamodal.html similarity index 100% rename from src/app/components/recaptcha/core-recaptchamodal.html rename to src/core/components/recaptcha/core-recaptchamodal.html diff --git a/src/app/components/recaptcha/recaptcha.ts b/src/core/components/recaptcha/recaptcha.ts similarity index 100% rename from src/app/components/recaptcha/recaptcha.ts rename to src/core/components/recaptcha/recaptcha.ts diff --git a/src/app/components/recaptcha/recaptchamodal.ts b/src/core/components/recaptcha/recaptchamodal.ts similarity index 100% rename from src/app/components/recaptcha/recaptchamodal.ts rename to src/core/components/recaptcha/recaptchamodal.ts diff --git a/src/app/components/show-password/core-show-password.html b/src/core/components/show-password/core-show-password.html similarity index 100% rename from src/app/components/show-password/core-show-password.html rename to src/core/components/show-password/core-show-password.html diff --git a/src/app/components/show-password/show-password.scss b/src/core/components/show-password/show-password.scss similarity index 100% rename from src/app/components/show-password/show-password.scss rename to src/core/components/show-password/show-password.scss diff --git a/src/app/components/show-password/show-password.ts b/src/core/components/show-password/show-password.ts similarity index 100% rename from src/app/components/show-password/show-password.ts rename to src/core/components/show-password/show-password.ts diff --git a/src/app/components/tabs/core-tabs.html b/src/core/components/tabs/core-tabs.html similarity index 100% rename from src/app/components/tabs/core-tabs.html rename to src/core/components/tabs/core-tabs.html diff --git a/src/app/components/tabs/tabs.scss b/src/core/components/tabs/tabs.scss similarity index 100% rename from src/app/components/tabs/tabs.scss rename to src/core/components/tabs/tabs.scss diff --git a/src/app/components/tabs/tabs.ts b/src/core/components/tabs/tabs.ts similarity index 99% rename from src/app/components/tabs/tabs.ts rename to src/core/components/tabs/tabs.ts index 10b3add1c..734139814 100644 --- a/src/app/components/tabs/tabs.ts +++ b/src/core/components/tabs/tabs.ts @@ -29,8 +29,8 @@ import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { CoreApp } from '@services/app'; import { CoreConfig } from '@services/config'; -import { CoreConstants } from '@core/constants'; -import { CoreUtils } from '@/app/services/utils/utils'; +import { CoreConstants } from '@/core/constants'; +import { CoreUtils } from '@services/utils/utils'; import { NavigationOptions } from '@ionic/angular/providers/nav-controller'; import { Params } from '@angular/router'; diff --git a/src/app/components/tests/icon.test.ts b/src/core/components/tests/icon.test.ts similarity index 95% rename from src/app/components/tests/icon.test.ts rename to src/core/components/tests/icon.test.ts index 531bbc9fc..0153b35cc 100644 --- a/src/app/components/tests/icon.test.ts +++ b/src/core/components/tests/icon.test.ts @@ -14,7 +14,7 @@ import { CoreIconComponent } from '@components/icon/icon'; -import { renderWrapperComponent } from '@/tests/utils'; +import { renderWrapperComponent } from '@/testing/utils'; describe('CoreIconComponent', () => { diff --git a/src/app/components/tests/iframe.test.ts b/src/core/components/tests/iframe.test.ts similarity index 100% rename from src/app/components/tests/iframe.test.ts rename to src/core/components/tests/iframe.test.ts diff --git a/src/app/components/tests/user-avatar.test.ts b/src/core/components/tests/user-avatar.test.ts similarity index 100% rename from src/app/components/tests/user-avatar.test.ts rename to src/core/components/tests/user-avatar.test.ts diff --git a/src/app/core/constants.ts b/src/core/constants.ts similarity index 100% rename from src/app/core/constants.ts rename to src/core/constants.ts diff --git a/src/app/directives/auto-focus.ts b/src/core/directives/auto-focus.ts similarity index 100% rename from src/app/directives/auto-focus.ts rename to src/core/directives/auto-focus.ts diff --git a/src/app/directives/directives.module.ts b/src/core/directives/directives.module.ts similarity index 100% rename from src/app/directives/directives.module.ts rename to src/core/directives/directives.module.ts diff --git a/src/app/directives/external-content.ts b/src/core/directives/external-content.ts similarity index 100% rename from src/app/directives/external-content.ts rename to src/core/directives/external-content.ts diff --git a/src/app/directives/fa-icon.ts b/src/core/directives/fa-icon.ts similarity index 98% rename from src/app/directives/fa-icon.ts rename to src/core/directives/fa-icon.ts index ba6df3247..38298a46b 100644 --- a/src/app/directives/fa-icon.ts +++ b/src/core/directives/fa-icon.ts @@ -15,7 +15,7 @@ import { Directive, ElementRef, Input, OnChanges, SimpleChange } from '@angular/core'; import { CoreLogger } from '@singletons/logger'; import { Http } from '@singletons/core.singletons'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; /** * Directive to enable font-awesome 5 as ionicons. diff --git a/src/app/directives/fab.ts b/src/core/directives/fab.ts similarity index 100% rename from src/app/directives/fab.ts rename to src/core/directives/fab.ts diff --git a/src/app/directives/format-text.ts b/src/core/directives/format-text.ts similarity index 100% rename from src/app/directives/format-text.ts rename to src/core/directives/format-text.ts diff --git a/src/app/directives/link.ts b/src/core/directives/link.ts similarity index 99% rename from src/app/directives/link.ts rename to src/core/directives/link.ts index 0bc60d88a..35d491e9b 100644 --- a/src/app/directives/link.ts +++ b/src/core/directives/link.ts @@ -21,7 +21,7 @@ import { CoreDomUtils } from '@services/utils/dom'; import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; import { CoreTextUtils } from '@services/utils/text'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; /** * Directive to open a link in external browser or in the app. diff --git a/src/app/directives/long-press.ts b/src/core/directives/long-press.ts similarity index 100% rename from src/app/directives/long-press.ts rename to src/core/directives/long-press.ts diff --git a/src/app/directives/supress-events.ts b/src/core/directives/supress-events.ts similarity index 100% rename from src/app/directives/supress-events.ts rename to src/core/directives/supress-events.ts diff --git a/src/app/directives/tests/format-text.test.ts b/src/core/directives/tests/format-text.test.ts similarity index 99% rename from src/app/directives/tests/format-text.test.ts rename to src/core/directives/tests/format-text.test.ts index 3f7d858e9..71120ea9e 100644 --- a/src/app/directives/tests/format-text.test.ts +++ b/src/core/directives/tests/format-text.test.ts @@ -27,7 +27,7 @@ import { CoreUrlUtils, CoreUrlUtilsProvider } from '@services/utils/url'; import { CoreUtils, CoreUtilsProvider } from '@services/utils/utils'; import { Platform } from '@singletons/core.singletons'; -import { mock, mockSingleton, RenderConfig, renderWrapperComponent } from '@/tests/utils'; +import { mock, mockSingleton, RenderConfig, renderWrapperComponent } from '@/testing/utils'; describe('CoreFormatTextDirective', () => { diff --git a/src/app/directives/tests/link.test.ts b/src/core/directives/tests/link.test.ts similarity index 96% rename from src/app/directives/tests/link.test.ts rename to src/core/directives/tests/link.test.ts index 30a99db90..00bdbab0f 100644 --- a/src/app/directives/tests/link.test.ts +++ b/src/core/directives/tests/link.test.ts @@ -14,7 +14,7 @@ import { CoreLinkDirective } from '@directives/link'; -import { renderTemplate } from '@/tests/utils'; +import { renderTemplate } from '@/testing/utils'; describe('CoreLinkDirective', () => { diff --git a/src/app/core/contentlinks/classes/base-handler.ts b/src/core/features/contentlinks/classes/base-handler.ts similarity index 100% rename from src/app/core/contentlinks/classes/base-handler.ts rename to src/core/features/contentlinks/classes/base-handler.ts diff --git a/src/app/core/contentlinks/classes/module-grade-handler.ts b/src/core/features/contentlinks/classes/module-grade-handler.ts similarity index 98% rename from src/app/core/contentlinks/classes/module-grade-handler.ts rename to src/core/features/contentlinks/classes/module-grade-handler.ts index d48da8311..ad19f4906 100644 --- a/src/app/core/contentlinks/classes/module-grade-handler.ts +++ b/src/core/features/contentlinks/classes/module-grade-handler.ts @@ -16,7 +16,7 @@ import { CoreContentLinksAction } from '../services/contentlinks.delegate'; import { CoreContentLinksHandlerBase } from './base-handler'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; -// import { CoreCourseHelperProvider } from '@core/course/providers/helper'; +// import { CoreCourseHelperProvider } from '@features/course/providers/helper'; import { Params } from '@angular/router'; /** diff --git a/src/app/core/contentlinks/classes/module-index-handler.ts b/src/core/features/contentlinks/classes/module-index-handler.ts similarity index 100% rename from src/app/core/contentlinks/classes/module-index-handler.ts rename to src/core/features/contentlinks/classes/module-index-handler.ts diff --git a/src/app/core/contentlinks/classes/module-list-handler.ts b/src/core/features/contentlinks/classes/module-list-handler.ts similarity index 97% rename from src/app/core/contentlinks/classes/module-list-handler.ts rename to src/core/features/contentlinks/classes/module-list-handler.ts index b206af783..9ba7f7078 100644 --- a/src/app/core/contentlinks/classes/module-list-handler.ts +++ b/src/core/features/contentlinks/classes/module-list-handler.ts @@ -14,7 +14,7 @@ import { CoreContentLinksHelper } from '../services/contentlinks.helper'; import { CoreContentLinksHandlerBase } from './base-handler'; -import { Translate } from '@/app/singletons/core.singletons'; +import { Translate } from '@singletons/core.singletons'; import { Params } from '@angular/router'; import { CoreContentLinksAction } from '../services/contentlinks.delegate'; diff --git a/src/app/core/contentlinks/lang/en.json b/src/core/features/contentlinks/lang/en.json similarity index 100% rename from src/app/core/contentlinks/lang/en.json rename to src/core/features/contentlinks/lang/en.json diff --git a/src/app/core/contentlinks/pages/choose-site/choose-site.html b/src/core/features/contentlinks/pages/choose-site/choose-site.html similarity index 100% rename from src/app/core/contentlinks/pages/choose-site/choose-site.html rename to src/core/features/contentlinks/pages/choose-site/choose-site.html diff --git a/src/app/core/contentlinks/pages/choose-site/choose-site.page.module.ts b/src/core/features/contentlinks/pages/choose-site/choose-site.page.module.ts similarity index 100% rename from src/app/core/contentlinks/pages/choose-site/choose-site.page.module.ts rename to src/core/features/contentlinks/pages/choose-site/choose-site.page.module.ts diff --git a/src/app/core/contentlinks/pages/choose-site/choose-site.page.ts b/src/core/features/contentlinks/pages/choose-site/choose-site.page.ts similarity index 98% rename from src/app/core/contentlinks/pages/choose-site/choose-site.page.ts rename to src/core/features/contentlinks/pages/choose-site/choose-site.page.ts index ebc2b9a95..89812d320 100644 --- a/src/app/core/contentlinks/pages/choose-site/choose-site.page.ts +++ b/src/core/features/contentlinks/pages/choose-site/choose-site.page.ts @@ -17,7 +17,7 @@ import { NavController } from '@ionic/angular'; import { CoreSiteBasicInfo, CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { Translate } from '@singletons/core.singletons'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { CoreContentLinksAction } from '../../services/contentlinks.delegate'; import { CoreContentLinksHelper } from '../../services/contentlinks.helper'; import { ActivatedRoute } from '@angular/router'; diff --git a/src/app/core/contentlinks/services/contentlinks.delegate.ts b/src/core/features/contentlinks/services/contentlinks.delegate.ts similarity index 100% rename from src/app/core/contentlinks/services/contentlinks.delegate.ts rename to src/core/features/contentlinks/services/contentlinks.delegate.ts diff --git a/src/app/core/contentlinks/services/contentlinks.helper.ts b/src/core/features/contentlinks/services/contentlinks.helper.ts similarity index 98% rename from src/app/core/contentlinks/services/contentlinks.helper.ts rename to src/core/features/contentlinks/services/contentlinks.helper.ts index dd9b835c3..18cf9e33f 100644 --- a/src/app/core/contentlinks/services/contentlinks.helper.ts +++ b/src/core/features/contentlinks/services/contentlinks.helper.ts @@ -17,10 +17,10 @@ import { NavController } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { CoreContentLinksDelegate, CoreContentLinksAction } from './contentlinks.delegate'; import { CoreSite } from '@classes/site'; -import { CoreMainMenu } from '@core/mainmenu/services/mainmenu'; +import { CoreMainMenu } from '@features/mainmenu/services/mainmenu'; import { makeSingleton, NgZone, Translate } from '@singletons/core.singletons'; import { Params } from '@angular/router'; diff --git a/src/app/core/courses/courses.module.ts b/src/core/features/courses/courses.module.ts similarity index 91% rename from src/app/core/courses/courses.module.ts rename to src/core/features/courses/courses.module.ts index c38b25679..570eb5569 100644 --- a/src/app/core/courses/courses.module.ts +++ b/src/core/features/courses/courses.module.ts @@ -22,7 +22,7 @@ const routes: Routes = [ { path: 'dashboard', loadChildren: () => - import('@core/courses/pages/dashboard/dashboard.page.module').then(m => m.CoreCoursesDashboardPageModule), + import('@features/courses/pages/dashboard/dashboard.page.module').then(m => m.CoreCoursesDashboardPageModule), }, ]; diff --git a/src/app/core/courses/lang/en.json b/src/core/features/courses/lang/en.json similarity index 100% rename from src/app/core/courses/lang/en.json rename to src/core/features/courses/lang/en.json diff --git a/src/app/core/courses/pages/dashboard/dashboard.html b/src/core/features/courses/pages/dashboard/dashboard.html similarity index 100% rename from src/app/core/courses/pages/dashboard/dashboard.html rename to src/core/features/courses/pages/dashboard/dashboard.html diff --git a/src/app/core/courses/pages/dashboard/dashboard.page.module.ts b/src/core/features/courses/pages/dashboard/dashboard.page.module.ts similarity index 100% rename from src/app/core/courses/pages/dashboard/dashboard.page.module.ts rename to src/core/features/courses/pages/dashboard/dashboard.page.module.ts diff --git a/src/app/core/courses/pages/dashboard/dashboard.page.ts b/src/core/features/courses/pages/dashboard/dashboard.page.ts similarity index 100% rename from src/app/core/courses/pages/dashboard/dashboard.page.ts rename to src/core/features/courses/pages/dashboard/dashboard.page.ts diff --git a/src/app/core/courses/pages/dashboard/dashboard.scss b/src/core/features/courses/pages/dashboard/dashboard.scss similarity index 100% rename from src/app/core/courses/pages/dashboard/dashboard.scss rename to src/core/features/courses/pages/dashboard/dashboard.scss diff --git a/src/app/core/courses/services/handlers/dashboard.home.ts b/src/core/features/courses/services/handlers/dashboard.home.ts similarity index 94% rename from src/app/core/courses/services/handlers/dashboard.home.ts rename to src/core/features/courses/services/handlers/dashboard.home.ts index cfdbb8ab3..3c9505e2f 100644 --- a/src/app/core/courses/services/handlers/dashboard.home.ts +++ b/src/core/features/courses/services/handlers/dashboard.home.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Injectable } from '@angular/core'; -import { CoreHomeHandler, CoreHomeHandlerToDisplay } from '@core/mainmenu/services/home.delegate'; +import { CoreHomeHandler, CoreHomeHandlerToDisplay } from '@features/mainmenu/services/home.delegate'; /** * Handler to add Home into main menu. diff --git a/src/app/core/emulator/classes/sqlitedb.ts b/src/core/features/emulator/classes/sqlitedb.ts similarity index 100% rename from src/app/core/emulator/classes/sqlitedb.ts rename to src/core/features/emulator/classes/sqlitedb.ts diff --git a/src/app/core/emulator/components/capture-media/capture-media.html b/src/core/features/emulator/components/capture-media/capture-media.html similarity index 100% rename from src/app/core/emulator/components/capture-media/capture-media.html rename to src/core/features/emulator/components/capture-media/capture-media.html diff --git a/src/app/core/emulator/components/capture-media/capture-media.scss b/src/core/features/emulator/components/capture-media/capture-media.scss similarity index 100% rename from src/app/core/emulator/components/capture-media/capture-media.scss rename to src/core/features/emulator/components/capture-media/capture-media.scss diff --git a/src/app/core/emulator/components/capture-media/capture-media.ts b/src/core/features/emulator/components/capture-media/capture-media.ts similarity index 100% rename from src/app/core/emulator/components/capture-media/capture-media.ts rename to src/core/features/emulator/components/capture-media/capture-media.ts diff --git a/src/app/core/emulator/components/components.module.ts b/src/core/features/emulator/components/components.module.ts similarity index 85% rename from src/app/core/emulator/components/components.module.ts rename to src/core/features/emulator/components/components.module.ts index c5d5c3e34..831546f26 100644 --- a/src/app/core/emulator/components/components.module.ts +++ b/src/core/features/emulator/components/components.module.ts @@ -17,9 +17,9 @@ import { CommonModule } from '@angular/common'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { CoreComponentsModule } from '@app/components/components.module'; -import { CoreDirectivesModule } from '@app/directives/directives.module'; -import { CorePipesModule } from '@app/pipes/pipes.module'; +import { CoreComponentsModule } from '@components/components.module'; +import { CoreDirectivesModule } from '@directives/directives.module'; +import { CorePipesModule } from '@pipes/pipes.module'; import { CoreEmulatorCaptureMediaComponent } from './capture-media/capture-media'; @NgModule({ diff --git a/src/app/core/emulator/emulator.module.ts b/src/core/features/emulator/emulator.module.ts similarity index 100% rename from src/app/core/emulator/emulator.module.ts rename to src/core/features/emulator/emulator.module.ts diff --git a/src/app/core/emulator/services/camera.ts b/src/core/features/emulator/services/camera.ts similarity index 100% rename from src/app/core/emulator/services/camera.ts rename to src/core/features/emulator/services/camera.ts diff --git a/src/app/core/emulator/services/capture.helper.ts b/src/core/features/emulator/services/capture.helper.ts similarity index 100% rename from src/app/core/emulator/services/capture.helper.ts rename to src/core/features/emulator/services/capture.helper.ts diff --git a/src/app/core/emulator/services/clipboard.ts b/src/core/features/emulator/services/clipboard.ts similarity index 100% rename from src/app/core/emulator/services/clipboard.ts rename to src/core/features/emulator/services/clipboard.ts diff --git a/src/app/core/emulator/services/emulator.helper.ts b/src/core/features/emulator/services/emulator.helper.ts similarity index 100% rename from src/app/core/emulator/services/emulator.helper.ts rename to src/core/features/emulator/services/emulator.helper.ts diff --git a/src/app/core/emulator/services/file-opener.ts b/src/core/features/emulator/services/file-opener.ts similarity index 100% rename from src/app/core/emulator/services/file-opener.ts rename to src/core/features/emulator/services/file-opener.ts diff --git a/src/app/core/emulator/services/file-transfer.ts b/src/core/features/emulator/services/file-transfer.ts similarity index 99% rename from src/app/core/emulator/services/file-transfer.ts rename to src/core/features/emulator/services/file-transfer.ts index 13b6b119d..da4e1bc34 100644 --- a/src/app/core/emulator/services/file-transfer.ts +++ b/src/core/features/emulator/services/file-transfer.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreTextUtils } from '@/app/services/utils/text'; +import { CoreTextUtils } from '@services/utils/text'; import { Injectable } from '@angular/core'; import { FileTransfer, FileTransferObject, FileUploadResult, FileTransferError } from '@ionic-native/file-transfer/ngx'; diff --git a/src/app/core/emulator/services/file.ts b/src/core/features/emulator/services/file.ts similarity index 100% rename from src/app/core/emulator/services/file.ts rename to src/core/features/emulator/services/file.ts diff --git a/src/app/core/emulator/services/geolocation.ts b/src/core/features/emulator/services/geolocation.ts similarity index 100% rename from src/app/core/emulator/services/geolocation.ts rename to src/core/features/emulator/services/geolocation.ts diff --git a/src/app/core/emulator/services/inappbrowser.ts b/src/core/features/emulator/services/inappbrowser.ts similarity index 100% rename from src/app/core/emulator/services/inappbrowser.ts rename to src/core/features/emulator/services/inappbrowser.ts diff --git a/src/app/core/emulator/services/media-capture.ts b/src/core/features/emulator/services/media-capture.ts similarity index 100% rename from src/app/core/emulator/services/media-capture.ts rename to src/core/features/emulator/services/media-capture.ts diff --git a/src/app/core/emulator/services/network.ts b/src/core/features/emulator/services/network.ts similarity index 100% rename from src/app/core/emulator/services/network.ts rename to src/core/features/emulator/services/network.ts diff --git a/src/app/core/emulator/services/zip.ts b/src/core/features/emulator/services/zip.ts similarity index 100% rename from src/app/core/emulator/services/zip.ts rename to src/core/features/emulator/services/zip.ts diff --git a/src/app/core/fileuploader/fileuploader-init.module.ts b/src/core/features/fileuploader/fileuploader-init.module.ts similarity index 100% rename from src/app/core/fileuploader/fileuploader-init.module.ts rename to src/core/features/fileuploader/fileuploader-init.module.ts diff --git a/src/app/core/fileuploader/lang/en.json b/src/core/features/fileuploader/lang/en.json similarity index 100% rename from src/app/core/fileuploader/lang/en.json rename to src/core/features/fileuploader/lang/en.json diff --git a/src/app/core/fileuploader/services/fileuploader.delegate.ts b/src/core/features/fileuploader/services/fileuploader.delegate.ts similarity index 100% rename from src/app/core/fileuploader/services/fileuploader.delegate.ts rename to src/core/features/fileuploader/services/fileuploader.delegate.ts diff --git a/src/app/core/fileuploader/services/fileuploader.helper.ts b/src/core/features/fileuploader/services/fileuploader.helper.ts similarity index 99% rename from src/app/core/fileuploader/services/fileuploader.helper.ts rename to src/core/features/fileuploader/services/fileuploader.helper.ts index 9aa8c431a..b056ac40a 100644 --- a/src/app/core/fileuploader/services/fileuploader.helper.ts +++ b/src/core/features/fileuploader/services/fileuploader.helper.ts @@ -31,9 +31,9 @@ import { CoreCanceledError } from '@classes/errors/cancelederror'; import { CoreError } from '@classes/errors/error'; import { CoreFileUploader, CoreFileUploaderProvider, CoreFileUploaderOptions } from './fileuploader'; import { CoreFileUploaderDelegate } from './fileuploader.delegate'; -import { CoreCaptureError } from '@/app/classes/errors/captureerror'; -import { CoreIonLoadingElement } from '@/app/classes/ion-loading'; -import { CoreWSUploadFileResult } from '@/app/services/ws'; +import { CoreCaptureError } from '@classes/errors/captureerror'; +import { CoreIonLoadingElement } from '@classes/ion-loading'; +import { CoreWSUploadFileResult } from '@services/ws'; /** * Helper service to upload files. diff --git a/src/app/core/fileuploader/services/fileuploader.ts b/src/core/features/fileuploader/services/fileuploader.ts similarity index 99% rename from src/app/core/fileuploader/services/fileuploader.ts rename to src/core/features/fileuploader/services/fileuploader.ts index 38eda6f6f..c5e4369e4 100644 --- a/src/app/core/fileuploader/services/fileuploader.ts +++ b/src/core/features/fileuploader/services/fileuploader.ts @@ -29,8 +29,8 @@ import { CoreUtils } from '@services/utils/utils'; import { CoreWSExternalFile, CoreWSFileUploadOptions, CoreWSUploadFileResult } from '@services/ws'; import { makeSingleton, Translate, MediaCapture, ModalController, Camera } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; -import { CoreEmulatorCaptureMediaComponent } from '@core/emulator/components/capture-media/capture-media'; -import { CoreError } from '@/app/classes/errors/error'; +import { CoreEmulatorCaptureMediaComponent } from '@features/emulator/components/capture-media/capture-media'; +import { CoreError } from '@classes/errors/error'; /** * File upload options. diff --git a/src/app/core/fileuploader/services/handlers/album.ts b/src/core/features/fileuploader/services/handlers/album.ts similarity index 100% rename from src/app/core/fileuploader/services/handlers/album.ts rename to src/core/features/fileuploader/services/handlers/album.ts diff --git a/src/app/core/fileuploader/services/handlers/audio.ts b/src/core/features/fileuploader/services/handlers/audio.ts similarity index 100% rename from src/app/core/fileuploader/services/handlers/audio.ts rename to src/core/features/fileuploader/services/handlers/audio.ts diff --git a/src/app/core/fileuploader/services/handlers/camera.ts b/src/core/features/fileuploader/services/handlers/camera.ts similarity index 100% rename from src/app/core/fileuploader/services/handlers/camera.ts rename to src/core/features/fileuploader/services/handlers/camera.ts diff --git a/src/app/core/fileuploader/services/handlers/file.ts b/src/core/features/fileuploader/services/handlers/file.ts similarity index 100% rename from src/app/core/fileuploader/services/handlers/file.ts rename to src/core/features/fileuploader/services/handlers/file.ts diff --git a/src/app/core/fileuploader/services/handlers/video.ts b/src/core/features/fileuploader/services/handlers/video.ts similarity index 100% rename from src/app/core/fileuploader/services/handlers/video.ts rename to src/core/features/fileuploader/services/handlers/video.ts diff --git a/src/app/core/login/components/site-help/site-help.html b/src/core/features/login/components/site-help/site-help.html similarity index 100% rename from src/app/core/login/components/site-help/site-help.html rename to src/core/features/login/components/site-help/site-help.html diff --git a/src/app/core/login/components/site-help/site-help.scss b/src/core/features/login/components/site-help/site-help.scss similarity index 100% rename from src/app/core/login/components/site-help/site-help.scss rename to src/core/features/login/components/site-help/site-help.scss diff --git a/src/app/core/login/components/site-help/site-help.ts b/src/core/features/login/components/site-help/site-help.ts similarity index 95% rename from src/app/core/login/components/site-help/site-help.ts rename to src/core/features/login/components/site-help/site-help.ts index 0a99681bd..8be6c64b6 100644 --- a/src/app/core/login/components/site-help/site-help.ts +++ b/src/core/features/login/components/site-help/site-help.ts @@ -16,7 +16,7 @@ import { Component } from '@angular/core'; import { CoreUtils } from '@services/utils/utils'; import { ModalController, Translate } from '@singletons/core.singletons'; -import { CoreLoginHelperProvider } from '@core/login/services/login.helper'; +import { CoreLoginHelperProvider } from '@features/login/services/login.helper'; /** * Component that displays help to connect to a site. diff --git a/src/app/core/login/components/site-onboarding/site-onboarding.html b/src/core/features/login/components/site-onboarding/site-onboarding.html similarity index 100% rename from src/app/core/login/components/site-onboarding/site-onboarding.html rename to src/core/features/login/components/site-onboarding/site-onboarding.html diff --git a/src/app/core/login/components/site-onboarding/site-onboarding.scss b/src/core/features/login/components/site-onboarding/site-onboarding.scss similarity index 100% rename from src/app/core/login/components/site-onboarding/site-onboarding.scss rename to src/core/features/login/components/site-onboarding/site-onboarding.scss diff --git a/src/app/core/login/components/site-onboarding/site-onboarding.ts b/src/core/features/login/components/site-onboarding/site-onboarding.ts similarity index 96% rename from src/app/core/login/components/site-onboarding/site-onboarding.ts rename to src/core/features/login/components/site-onboarding/site-onboarding.ts index d9d6d6144..7c9f8a873 100644 --- a/src/app/core/login/components/site-onboarding/site-onboarding.ts +++ b/src/core/features/login/components/site-onboarding/site-onboarding.ts @@ -16,7 +16,7 @@ import { Component } from '@angular/core'; import { CoreConfig } from '@services/config'; import { CoreUtils } from '@services/utils/utils'; -import { CoreLoginHelperProvider } from '@core/login/services/login.helper'; +import { CoreLoginHelperProvider } from '@features/login/services/login.helper'; import { ModalController } from '@singletons/core.singletons'; /** diff --git a/src/app/core/login/lang/en.json b/src/core/features/login/lang/en.json similarity index 100% rename from src/app/core/login/lang/en.json rename to src/core/features/login/lang/en.json diff --git a/src/app/core/login/login-routing.module.ts b/src/core/features/login/login-routing.module.ts similarity index 100% rename from src/app/core/login/login-routing.module.ts rename to src/core/features/login/login-routing.module.ts diff --git a/src/app/core/login/login.module.ts b/src/core/features/login/login.module.ts similarity index 100% rename from src/app/core/login/login.module.ts rename to src/core/features/login/login.module.ts diff --git a/src/app/core/login/login.scss b/src/core/features/login/login.scss similarity index 100% rename from src/app/core/login/login.scss rename to src/core/features/login/login.scss diff --git a/src/app/core/login/pages/change-password/change-password.html b/src/core/features/login/pages/change-password/change-password.html similarity index 100% rename from src/app/core/login/pages/change-password/change-password.html rename to src/core/features/login/pages/change-password/change-password.html diff --git a/src/app/core/login/pages/change-password/change-password.page.module.ts b/src/core/features/login/pages/change-password/change-password.page.module.ts similarity index 100% rename from src/app/core/login/pages/change-password/change-password.page.module.ts rename to src/core/features/login/pages/change-password/change-password.page.module.ts diff --git a/src/app/core/login/pages/change-password/change-password.page.ts b/src/core/features/login/pages/change-password/change-password.page.ts similarity index 96% rename from src/app/core/login/pages/change-password/change-password.page.ts rename to src/core/features/login/pages/change-password/change-password.page.ts index 88564ff77..2f1a13c1d 100644 --- a/src/app/core/login/pages/change-password/change-password.page.ts +++ b/src/core/features/login/pages/change-password/change-password.page.ts @@ -16,7 +16,7 @@ import { Component } from '@angular/core'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { Translate } from '@singletons/core.singletons'; /** diff --git a/src/app/core/login/pages/credentials/credentials.html b/src/core/features/login/pages/credentials/credentials.html similarity index 100% rename from src/app/core/login/pages/credentials/credentials.html rename to src/core/features/login/pages/credentials/credentials.html diff --git a/src/app/core/login/pages/credentials/credentials.page.module.ts b/src/core/features/login/pages/credentials/credentials.page.module.ts similarity index 100% rename from src/app/core/login/pages/credentials/credentials.page.module.ts rename to src/core/features/login/pages/credentials/credentials.page.module.ts diff --git a/src/app/core/login/pages/credentials/credentials.page.ts b/src/core/features/login/pages/credentials/credentials.page.ts similarity index 98% rename from src/app/core/login/pages/credentials/credentials.page.ts rename to src/core/features/login/pages/credentials/credentials.page.ts index 9d0f92491..fe3e0884a 100644 --- a/src/app/core/login/pages/credentials/credentials.page.ts +++ b/src/core/features/login/pages/credentials/credentials.page.ts @@ -21,8 +21,8 @@ import { CoreApp } from '@services/app'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; -import { CoreLoginHelper, CoreLoginHelperProvider } from '@core/login/services/login.helper'; -import { CoreConstants } from '@core/constants'; +import { CoreLoginHelper, CoreLoginHelperProvider } from '@features/login/services/login.helper'; +import { CoreConstants } from '@/core/constants'; import { Translate } from '@singletons/core.singletons'; import { CoreSiteIdentityProvider, CoreSitePublicConfigResponse } from '@classes/site'; import { CoreEvents } from '@singletons/events'; diff --git a/src/app/core/login/pages/email-signup/email-signup.html b/src/core/features/login/pages/email-signup/email-signup.html similarity index 100% rename from src/app/core/login/pages/email-signup/email-signup.html rename to src/core/features/login/pages/email-signup/email-signup.html diff --git a/src/app/core/login/pages/email-signup/email-signup.page.module.ts b/src/core/features/login/pages/email-signup/email-signup.page.module.ts similarity index 100% rename from src/app/core/login/pages/email-signup/email-signup.page.module.ts rename to src/core/features/login/pages/email-signup/email-signup.page.module.ts diff --git a/src/app/core/login/pages/email-signup/email-signup.page.ts b/src/core/features/login/pages/email-signup/email-signup.page.ts similarity index 98% rename from src/app/core/login/pages/email-signup/email-signup.page.ts rename to src/core/features/login/pages/email-signup/email-signup.page.ts index 1aff70a6d..10891d231 100644 --- a/src/app/core/login/pages/email-signup/email-signup.page.ts +++ b/src/core/features/login/pages/email-signup/email-signup.page.ts @@ -22,11 +22,16 @@ import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { CoreCountry, CoreUtils } from '@services/utils/utils'; import { CoreWS, CoreWSExternalWarning } from '@services/ws'; -import { AuthEmailSignupProfileFieldsCategory, AuthEmailSignupSettings, CoreLoginHelper } from '@core/login/services/login.helper'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { Translate } from '@singletons/core.singletons'; import { CoreSitePublicConfigResponse } from '@classes/site'; +import { + AuthEmailSignupProfileFieldsCategory, + AuthEmailSignupSettings, + CoreLoginHelper, +} from '@features/login/services/login.helper'; + /** * Page to signup using email. */ diff --git a/src/app/core/login/pages/forgotten-password/forgotten-password.html b/src/core/features/login/pages/forgotten-password/forgotten-password.html similarity index 100% rename from src/app/core/login/pages/forgotten-password/forgotten-password.html rename to src/core/features/login/pages/forgotten-password/forgotten-password.html diff --git a/src/app/core/login/pages/forgotten-password/forgotten-password.page.module.ts b/src/core/features/login/pages/forgotten-password/forgotten-password.page.module.ts similarity index 100% rename from src/app/core/login/pages/forgotten-password/forgotten-password.page.module.ts rename to src/core/features/login/pages/forgotten-password/forgotten-password.page.module.ts diff --git a/src/app/core/login/pages/forgotten-password/forgotten-password.page.ts b/src/core/features/login/pages/forgotten-password/forgotten-password.page.ts similarity index 98% rename from src/app/core/login/pages/forgotten-password/forgotten-password.page.ts rename to src/core/features/login/pages/forgotten-password/forgotten-password.page.ts index ffb021905..b44f968a2 100644 --- a/src/app/core/login/pages/forgotten-password/forgotten-password.page.ts +++ b/src/core/features/login/pages/forgotten-password/forgotten-password.page.ts @@ -18,7 +18,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { NavController } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { Translate, Platform } from '@singletons/core.singletons'; import { CoreWSExternalWarning } from '@services/ws'; diff --git a/src/app/core/login/pages/init/init.html b/src/core/features/login/pages/init/init.html similarity index 100% rename from src/app/core/login/pages/init/init.html rename to src/core/features/login/pages/init/init.html diff --git a/src/app/core/login/pages/init/init.page.module.ts b/src/core/features/login/pages/init/init.page.module.ts similarity index 100% rename from src/app/core/login/pages/init/init.page.module.ts rename to src/core/features/login/pages/init/init.page.module.ts diff --git a/src/app/core/login/pages/init/init.page.ts b/src/core/features/login/pages/init/init.page.ts similarity index 95% rename from src/app/core/login/pages/init/init.page.ts rename to src/core/features/login/pages/init/init.page.ts index 936d8dcb2..e1d64bdbf 100644 --- a/src/app/core/login/pages/init/init.page.ts +++ b/src/core/features/login/pages/init/init.page.ts @@ -18,9 +18,9 @@ import { NavController } from '@ionic/angular'; import { CoreApp, CoreRedirectData } from '@services/app'; import { CoreInit } from '@services/init'; import { SplashScreen } from '@singletons/core.singletons'; -import { CoreConstants } from '@core/constants'; -import { CoreSites } from '@/app/services/sites'; -import { CoreLoginHelper } from '@/app/core/login/services/login.helper'; +import { CoreConstants } from '@/core/constants'; +import { CoreSites } from '@services/sites'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; /** * Page that displays a "splash screen" while the app is being initialized. diff --git a/src/app/core/login/pages/init/init.scss b/src/core/features/login/pages/init/init.scss similarity index 88% rename from src/app/core/login/pages/init/init.scss rename to src/core/features/login/pages/init/init.scss index 12ed653de..688408424 100644 --- a/src/app/core/login/pages/init/init.scss +++ b/src/core/features/login/pages/init/init.scss @@ -1,7 +1,7 @@ ion-content::part(background) { --background: var(--core-splash-screen-background, #ffffff); - background-image: url("../../../../../assets/img/splash.png"); + background-image: url("~@/assets/img/splash.png"); background-repeat: no-repeat; background-size: 100%; background-size: var(--core-splash-bgsize, 100vmax); diff --git a/src/app/core/login/pages/reconnect/reconnect.html b/src/core/features/login/pages/reconnect/reconnect.html similarity index 100% rename from src/app/core/login/pages/reconnect/reconnect.html rename to src/core/features/login/pages/reconnect/reconnect.html diff --git a/src/app/core/login/pages/reconnect/reconnect.page.module.ts b/src/core/features/login/pages/reconnect/reconnect.page.module.ts similarity index 100% rename from src/app/core/login/pages/reconnect/reconnect.page.module.ts rename to src/core/features/login/pages/reconnect/reconnect.page.module.ts diff --git a/src/app/core/login/pages/reconnect/reconnect.page.ts b/src/core/features/login/pages/reconnect/reconnect.page.ts similarity index 99% rename from src/app/core/login/pages/reconnect/reconnect.page.ts rename to src/core/features/login/pages/reconnect/reconnect.page.ts index 449939627..70c0b2afd 100644 --- a/src/app/core/login/pages/reconnect/reconnect.page.ts +++ b/src/core/features/login/pages/reconnect/reconnect.page.ts @@ -21,7 +21,7 @@ import { CoreApp } from '@services/app'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { CoreSiteIdentityProvider, CoreSitePublicConfigResponse } from '@classes/site'; import { CoreEvents } from '@singletons/events'; import { CoreError } from '@classes/errors/error'; diff --git a/src/app/core/login/pages/site-policy/site-policy.html b/src/core/features/login/pages/site-policy/site-policy.html similarity index 100% rename from src/app/core/login/pages/site-policy/site-policy.html rename to src/core/features/login/pages/site-policy/site-policy.html diff --git a/src/app/core/login/pages/site-policy/site-policy.page.module.ts b/src/core/features/login/pages/site-policy/site-policy.page.module.ts similarity index 100% rename from src/app/core/login/pages/site-policy/site-policy.page.module.ts rename to src/core/features/login/pages/site-policy/site-policy.page.module.ts diff --git a/src/app/core/login/pages/site-policy/site-policy.page.ts b/src/core/features/login/pages/site-policy/site-policy.page.ts similarity index 98% rename from src/app/core/login/pages/site-policy/site-policy.page.ts rename to src/core/features/login/pages/site-policy/site-policy.page.ts index 4a5f87f1f..57c6d5066 100644 --- a/src/app/core/login/pages/site-policy/site-policy.page.ts +++ b/src/core/features/login/pages/site-policy/site-policy.page.ts @@ -20,7 +20,7 @@ import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; import { CoreMimetypeUtils } from '@services/utils/mimetype'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { CoreSite } from '@classes/site'; /** diff --git a/src/app/core/login/pages/site/site.html b/src/core/features/login/pages/site/site.html similarity index 100% rename from src/app/core/login/pages/site/site.html rename to src/core/features/login/pages/site/site.html diff --git a/src/app/core/login/pages/site/site.page.module.ts b/src/core/features/login/pages/site/site.page.module.ts similarity index 100% rename from src/app/core/login/pages/site/site.page.module.ts rename to src/core/features/login/pages/site/site.page.module.ts diff --git a/src/app/core/login/pages/site/site.page.ts b/src/core/features/login/pages/site/site.page.ts similarity index 98% rename from src/app/core/login/pages/site/site.page.ts rename to src/core/features/login/pages/site/site.page.ts index 7470dca99..f96186bef 100644 --- a/src/app/core/login/pages/site/site.page.ts +++ b/src/core/features/login/pages/site/site.page.ts @@ -22,15 +22,15 @@ import { CoreConfig } from '@services/config'; import { CoreSites, CoreSiteCheckResponse, CoreLoginSiteInfo, CoreSitesDemoSiteData } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreLoginHelper, CoreLoginHelperProvider } from '@core/login/services/login.helper'; +import { CoreLoginHelper, CoreLoginHelperProvider } from '@features/login/services/login.helper'; import { CoreSite } from '@classes/site'; import { CoreError } from '@classes/errors/error'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { Translate, ModalController } from '@singletons/core.singletons'; import { CoreUrl } from '@singletons/url'; import { CoreUrlUtils } from '@services/utils/url'; -import { CoreLoginSiteHelpComponent } from '@core/login/components/site-help/site-help'; -import { CoreLoginSiteOnboardingComponent } from '@core/login/components/site-onboarding/site-onboarding'; +import { CoreLoginSiteHelpComponent } from '@features/login/components/site-help/site-help'; +import { CoreLoginSiteOnboardingComponent } from '@features/login/components/site-onboarding/site-onboarding'; /** * Page that displays a "splash screen" while the app is being initialized. diff --git a/src/app/core/login/pages/site/site.scss b/src/core/features/login/pages/site/site.scss similarity index 100% rename from src/app/core/login/pages/site/site.scss rename to src/core/features/login/pages/site/site.scss diff --git a/src/app/core/login/pages/sites/sites.html b/src/core/features/login/pages/sites/sites.html similarity index 100% rename from src/app/core/login/pages/sites/sites.html rename to src/core/features/login/pages/sites/sites.html diff --git a/src/app/core/login/pages/sites/sites.page.module.ts b/src/core/features/login/pages/sites/sites.page.module.ts similarity index 100% rename from src/app/core/login/pages/sites/sites.page.module.ts rename to src/core/features/login/pages/sites/sites.page.module.ts diff --git a/src/app/core/login/pages/sites/sites.page.ts b/src/core/features/login/pages/sites/sites.page.ts similarity index 98% rename from src/app/core/login/pages/sites/sites.page.ts rename to src/core/features/login/pages/sites/sites.page.ts index fb1e8e632..47cdc96d2 100644 --- a/src/app/core/login/pages/sites/sites.page.ts +++ b/src/core/features/login/pages/sites/sites.page.ts @@ -18,7 +18,7 @@ import { Component, OnInit } from '@angular/core'; import { CoreSiteBasicInfo, CoreSites } from '@services/sites'; import { CoreLogger } from '@singletons/logger'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; /** * Page that displays a "splash screen" while the app is being initialized. diff --git a/src/app/core/login/services/login.helper.ts b/src/core/features/login/services/login.helper.ts similarity index 99% rename from src/app/core/login/services/login.helper.ts rename to src/core/features/login/services/login.helper.ts index abeee7248..b086d9f54 100644 --- a/src/app/core/login/services/login.helper.ts +++ b/src/core/features/login/services/login.helper.ts @@ -27,7 +27,7 @@ import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { CoreUrlParams, CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreSite, CoreSiteIdentityProvider, CoreSitePublicConfigResponse } from '@classes/site'; import { CoreError } from '@classes/errors/error'; import { CoreWSError } from '@classes/errors/wserror'; @@ -35,7 +35,7 @@ import { makeSingleton, Translate } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; import { CoreUrl } from '@singletons/url'; import { NavigationOptions } from '@ionic/angular/providers/nav-controller'; -import { CoreObject } from '@/app/singletons/object'; +import { CoreObject } from '@singletons/object'; /** * Helper provider that provides some common features regarding authentication. diff --git a/src/app/core/login/tests/init.page.test.ts b/src/core/features/login/tests/init.page.test.ts similarity index 88% rename from src/app/core/login/tests/init.page.test.ts rename to src/core/features/login/tests/init.page.test.ts index 3271530f0..010e42113 100644 --- a/src/app/core/login/tests/init.page.test.ts +++ b/src/core/features/login/tests/init.page.test.ts @@ -14,13 +14,13 @@ import { NavController } from '@ionic/angular'; -import { CoreApp } from '@/app/services/app'; +import { CoreApp } from '@services/app'; import { CoreInit } from '@services/init'; -import { CoreLoginInitPage } from '@core/login/pages/init/init.page'; -import { CoreSites } from '@/app/services/sites'; -import { SplashScreen } from '@/app/singletons/core.singletons'; +import { CoreLoginInitPage } from '@features/login/pages/init/init.page'; +import { CoreSites } from '@services/sites'; +import { SplashScreen } from '@singletons/core.singletons'; -import { mock, mockSingleton, renderComponent, RenderConfig } from '@/tests/utils'; +import { mock, mockSingleton, renderComponent, RenderConfig } from '@/testing/utils'; describe('CoreLoginInitPage', () => { diff --git a/src/app/core/mainmenu/lang/en.json b/src/core/features/mainmenu/lang/en.json similarity index 100% rename from src/app/core/mainmenu/lang/en.json rename to src/core/features/mainmenu/lang/en.json diff --git a/src/app/core/mainmenu/mainmenu-routing.module.ts b/src/core/features/mainmenu/mainmenu-routing.module.ts similarity index 97% rename from src/app/core/mainmenu/mainmenu-routing.module.ts rename to src/core/features/mainmenu/mainmenu-routing.module.ts index 1afad8941..ddf72fc95 100644 --- a/src/app/core/mainmenu/mainmenu-routing.module.ts +++ b/src/core/features/mainmenu/mainmenu-routing.module.ts @@ -15,7 +15,7 @@ import { InjectionToken, Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { RouterModule, ROUTES, Routes } from '@angular/router'; -import { CoreArray } from '@/app/singletons/array'; +import { CoreArray } from '@singletons/array'; import { CoreMainMenuPage } from './pages/menu/menu.page'; import { CoreMainMenuMorePage } from './pages/more/more.page'; diff --git a/src/app/core/mainmenu/mainmenu.module.ts b/src/core/features/mainmenu/mainmenu.module.ts similarity index 100% rename from src/app/core/mainmenu/mainmenu.module.ts rename to src/core/features/mainmenu/mainmenu.module.ts diff --git a/src/app/core/mainmenu/pages/home/home-routing.module.ts b/src/core/features/mainmenu/pages/home/home-routing.module.ts similarity index 96% rename from src/app/core/mainmenu/pages/home/home-routing.module.ts rename to src/core/features/mainmenu/pages/home/home-routing.module.ts index 092239b13..5e85d3b64 100644 --- a/src/app/core/mainmenu/pages/home/home-routing.module.ts +++ b/src/core/features/mainmenu/pages/home/home-routing.module.ts @@ -15,7 +15,7 @@ import { InjectionToken, Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { RouterModule, ROUTES, Routes } from '@angular/router'; -import { CoreArray } from '@/app/singletons/array'; +import { CoreArray } from '@singletons/array'; import { CoreHomePage } from './home.page'; diff --git a/src/app/core/mainmenu/pages/home/home.html b/src/core/features/mainmenu/pages/home/home.html similarity index 100% rename from src/app/core/mainmenu/pages/home/home.html rename to src/core/features/mainmenu/pages/home/home.html diff --git a/src/app/core/mainmenu/pages/home/home.page.module.ts b/src/core/features/mainmenu/pages/home/home.page.module.ts similarity index 100% rename from src/app/core/mainmenu/pages/home/home.page.module.ts rename to src/core/features/mainmenu/pages/home/home.page.module.ts diff --git a/src/app/core/mainmenu/pages/home/home.page.ts b/src/core/features/mainmenu/pages/home/home.page.ts similarity index 100% rename from src/app/core/mainmenu/pages/home/home.page.ts rename to src/core/features/mainmenu/pages/home/home.page.ts diff --git a/src/app/core/mainmenu/pages/home/home.scss b/src/core/features/mainmenu/pages/home/home.scss similarity index 100% rename from src/app/core/mainmenu/pages/home/home.scss rename to src/core/features/mainmenu/pages/home/home.scss diff --git a/src/app/core/mainmenu/pages/menu/menu.html b/src/core/features/mainmenu/pages/menu/menu.html similarity index 100% rename from src/app/core/mainmenu/pages/menu/menu.html rename to src/core/features/mainmenu/pages/menu/menu.html diff --git a/src/app/core/mainmenu/pages/menu/menu.page.ts b/src/core/features/mainmenu/pages/menu/menu.page.ts similarity index 98% rename from src/app/core/mainmenu/pages/menu/menu.page.ts rename to src/core/features/mainmenu/pages/menu/menu.page.ts index 68925539e..820dd4b8c 100644 --- a/src/app/core/mainmenu/pages/menu/menu.page.ts +++ b/src/core/features/mainmenu/pages/menu/menu.page.ts @@ -23,8 +23,8 @@ import { CoreTextUtils } from '@services/utils/text'; import { CoreEvents, CoreEventObserver, CoreEventLoadPageMainMenuData } from '@singletons/events'; import { CoreMainMenu } from '../../services/mainmenu'; import { CoreMainMenuDelegate, CoreMainMenuHandlerToDisplay } from '../../services/mainmenu.delegate'; -import { CoreDomUtils } from '@/app/services/utils/dom'; -import { Translate } from '@/app/singletons/core.singletons'; +import { CoreDomUtils } from '@services/utils/dom'; +import { Translate } from '@singletons/core.singletons'; /** * Page that displays the main menu of the app. diff --git a/src/app/core/mainmenu/pages/menu/menu.scss b/src/core/features/mainmenu/pages/menu/menu.scss similarity index 100% rename from src/app/core/mainmenu/pages/menu/menu.scss rename to src/core/features/mainmenu/pages/menu/menu.scss diff --git a/src/app/core/mainmenu/pages/more/more.html b/src/core/features/mainmenu/pages/more/more.html similarity index 100% rename from src/app/core/mainmenu/pages/more/more.html rename to src/core/features/mainmenu/pages/more/more.html diff --git a/src/app/core/mainmenu/pages/more/more.page.ts b/src/core/features/mainmenu/pages/more/more.page.ts similarity index 98% rename from src/app/core/mainmenu/pages/more/more.page.ts rename to src/core/features/mainmenu/pages/more/more.page.ts index 50c2028eb..f5d5fd3b0 100644 --- a/src/app/core/mainmenu/pages/more/more.page.ts +++ b/src/core/features/mainmenu/pages/more/more.page.ts @@ -18,7 +18,7 @@ import { Subscription } from 'rxjs'; import { CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; import { CoreSiteInfo } from '@classes/site'; -import { CoreLoginHelper } from '@core/login/services/login.helper'; +import { CoreLoginHelper } from '@features/login/services/login.helper'; import { CoreMainMenuDelegate, CoreMainMenuHandlerData } from '../../services/mainmenu.delegate'; import { CoreMainMenu, CoreMainMenuCustomItem } from '../../services/mainmenu'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; diff --git a/src/app/core/mainmenu/services/handlers/mainmenu.ts b/src/core/features/mainmenu/services/handlers/mainmenu.ts similarity index 100% rename from src/app/core/mainmenu/services/handlers/mainmenu.ts rename to src/core/features/mainmenu/services/handlers/mainmenu.ts diff --git a/src/app/core/mainmenu/services/home.delegate.ts b/src/core/features/mainmenu/services/home.delegate.ts similarity index 100% rename from src/app/core/mainmenu/services/home.delegate.ts rename to src/core/features/mainmenu/services/home.delegate.ts diff --git a/src/app/core/mainmenu/services/mainmenu.delegate.ts b/src/core/features/mainmenu/services/mainmenu.delegate.ts similarity index 100% rename from src/app/core/mainmenu/services/mainmenu.delegate.ts rename to src/core/features/mainmenu/services/mainmenu.delegate.ts diff --git a/src/app/core/mainmenu/services/mainmenu.ts b/src/core/features/mainmenu/services/mainmenu.ts similarity index 99% rename from src/app/core/mainmenu/services/mainmenu.ts rename to src/core/features/mainmenu/services/mainmenu.ts index 4d733b128..5baf7aad1 100644 --- a/src/app/core/mainmenu/services/mainmenu.ts +++ b/src/core/features/mainmenu/services/mainmenu.ts @@ -18,7 +18,7 @@ import { CoreApp } from '@services/app'; import { CoreLang } from '@services/lang'; import { CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreMainMenuDelegate, CoreMainMenuHandlerToDisplay } from './mainmenu.delegate'; import { makeSingleton } from '@singletons/core.singletons'; diff --git a/src/app/core/search/components/components.module.ts b/src/core/features/search/components/components.module.ts similarity index 100% rename from src/app/core/search/components/components.module.ts rename to src/core/features/search/components/components.module.ts diff --git a/src/app/core/search/components/search-box/core-search-box.html b/src/core/features/search/components/search-box/core-search-box.html similarity index 100% rename from src/app/core/search/components/search-box/core-search-box.html rename to src/core/features/search/components/search-box/core-search-box.html diff --git a/src/app/core/search/components/search-box/search-box.scss b/src/core/features/search/components/search-box/search-box.scss similarity index 100% rename from src/app/core/search/components/search-box/search-box.scss rename to src/core/features/search/components/search-box/search-box.scss diff --git a/src/app/core/search/components/search-box/search-box.ts b/src/core/features/search/components/search-box/search-box.ts similarity index 100% rename from src/app/core/search/components/search-box/search-box.ts rename to src/core/features/search/components/search-box/search-box.ts diff --git a/src/app/core/search/search.module.ts b/src/core/features/search/search.module.ts similarity index 100% rename from src/app/core/search/search.module.ts rename to src/core/features/search/search.module.ts diff --git a/src/app/core/search/services/search-history.ts b/src/core/features/search/services/search-history.ts similarity index 98% rename from src/app/core/search/services/search-history.ts rename to src/core/features/search/services/search-history.ts index 9cf4b552c..9ed2afaa4 100644 --- a/src/app/core/search/services/search-history.ts +++ b/src/core/features/search/services/search-history.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; import { CoreSites } from '@services/sites'; import { SQLiteDB } from '@classes/sqlitedb'; import { CoreSearchHistoryDBRecord, SEARCH_HISTORY_TABLE_NAME } from './search.history.db'; -import { makeSingleton } from '@/app/singletons/core.singletons'; +import { makeSingleton } from '@singletons/core.singletons'; /** * Service that enables adding a history to a search box. diff --git a/src/app/core/search/services/search.history.db.ts b/src/core/features/search/services/search.history.db.ts similarity index 99% rename from src/app/core/search/services/search.history.db.ts rename to src/core/features/search/services/search.history.db.ts index 6b1080d06..abc79d8c9 100644 --- a/src/app/core/search/services/search.history.db.ts +++ b/src/core/features/search/services/search.history.db.ts @@ -64,4 +64,3 @@ export type CoreSearchHistoryDBRecord = { export const initCoreSearchHistoryDB = (): void => { registerSiteSchema(SITE_SCHEMA); }; - diff --git a/src/app/core/settings/lang/en.json b/src/core/features/settings/lang/en.json similarity index 100% rename from src/app/core/settings/lang/en.json rename to src/core/features/settings/lang/en.json diff --git a/src/app/core/settings/pages/about/about.html b/src/core/features/settings/pages/about/about.html similarity index 100% rename from src/app/core/settings/pages/about/about.html rename to src/core/features/settings/pages/about/about.html diff --git a/src/app/core/settings/pages/about/about.page.module.ts b/src/core/features/settings/pages/about/about.page.module.ts similarity index 92% rename from src/app/core/settings/pages/about/about.page.module.ts rename to src/core/features/settings/pages/about/about.page.module.ts index 02566fc19..51a9e2e66 100644 --- a/src/app/core/settings/pages/about/about.page.module.ts +++ b/src/core/features/settings/pages/about/about.page.module.ts @@ -31,13 +31,13 @@ const routes: Routes = [ { path: 'deviceinfo', loadChildren: () => - import('@core/settings/pages/deviceinfo/deviceinfo.page.module') + import('@features/settings/pages/deviceinfo/deviceinfo.page.module') .then(m => m.CoreSettingsDeviceInfoPageModule), }, { path: 'licenses', loadChildren: () => - import('@core/settings/pages/licenses/licenses.page.module') + import('@features/settings/pages/licenses/licenses.page.module') .then(m => m.CoreSettingsLicensesPageModule), }, ]; diff --git a/src/app/core/settings/pages/about/about.page.ts b/src/core/features/settings/pages/about/about.page.ts similarity index 97% rename from src/app/core/settings/pages/about/about.page.ts rename to src/core/features/settings/pages/about/about.page.ts index 876621bcd..ca4546ebf 100644 --- a/src/app/core/settings/pages/about/about.page.ts +++ b/src/core/features/settings/pages/about/about.page.ts @@ -15,7 +15,7 @@ import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreSites } from '@services/sites'; /** diff --git a/src/app/core/settings/pages/app/app.html b/src/core/features/settings/pages/app/app.html similarity index 100% rename from src/app/core/settings/pages/app/app.html rename to src/core/features/settings/pages/app/app.html diff --git a/src/app/core/settings/pages/app/app.page.module.ts b/src/core/features/settings/pages/app/app.page.module.ts similarity index 100% rename from src/app/core/settings/pages/app/app.page.module.ts rename to src/core/features/settings/pages/app/app.page.module.ts diff --git a/src/app/core/settings/pages/app/app.page.ts b/src/core/features/settings/pages/app/app.page.ts similarity index 100% rename from src/app/core/settings/pages/app/app.page.ts rename to src/core/features/settings/pages/app/app.page.ts diff --git a/src/app/core/settings/pages/deviceinfo/deviceinfo.html b/src/core/features/settings/pages/deviceinfo/deviceinfo.html similarity index 100% rename from src/app/core/settings/pages/deviceinfo/deviceinfo.html rename to src/core/features/settings/pages/deviceinfo/deviceinfo.html diff --git a/src/app/core/settings/pages/deviceinfo/deviceinfo.page.module.ts b/src/core/features/settings/pages/deviceinfo/deviceinfo.page.module.ts similarity index 100% rename from src/app/core/settings/pages/deviceinfo/deviceinfo.page.module.ts rename to src/core/features/settings/pages/deviceinfo/deviceinfo.page.module.ts diff --git a/src/app/core/settings/pages/deviceinfo/deviceinfo.page.ts b/src/core/features/settings/pages/deviceinfo/deviceinfo.page.ts similarity index 99% rename from src/app/core/settings/pages/deviceinfo/deviceinfo.page.ts rename to src/core/features/settings/pages/deviceinfo/deviceinfo.page.ts index 06096fc70..8f65d99ca 100644 --- a/src/app/core/settings/pages/deviceinfo/deviceinfo.page.ts +++ b/src/core/features/settings/pages/deviceinfo/deviceinfo.page.ts @@ -14,7 +14,7 @@ import { CoreApp } from '@services/app'; import { Component, OnDestroy } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreLocalNotifications } from '@services/local-notifications'; import { Device, Platform, Translate, Network, NgZone } from '@singletons/core.singletons'; import { CoreLang } from '@services/lang'; diff --git a/src/app/core/settings/pages/deviceinfo/deviceinfo.scss b/src/core/features/settings/pages/deviceinfo/deviceinfo.scss similarity index 100% rename from src/app/core/settings/pages/deviceinfo/deviceinfo.scss rename to src/core/features/settings/pages/deviceinfo/deviceinfo.scss diff --git a/src/app/core/settings/pages/general/general.html b/src/core/features/settings/pages/general/general.html similarity index 100% rename from src/app/core/settings/pages/general/general.html rename to src/core/features/settings/pages/general/general.html diff --git a/src/app/core/settings/pages/general/general.page.module.ts b/src/core/features/settings/pages/general/general.page.module.ts similarity index 100% rename from src/app/core/settings/pages/general/general.page.module.ts rename to src/core/features/settings/pages/general/general.page.module.ts diff --git a/src/app/core/settings/pages/general/general.page.ts b/src/core/features/settings/pages/general/general.page.ts similarity index 97% rename from src/app/core/settings/pages/general/general.page.ts rename to src/core/features/settings/pages/general/general.page.ts index 46f9c80e2..b410e130c 100644 --- a/src/app/core/settings/pages/general/general.page.ts +++ b/src/core/features/settings/pages/general/general.page.ts @@ -13,12 +13,12 @@ // limitations under the License. import { Component } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreConfig } from '@services/config'; import { CoreEvents } from '@singletons/events'; import { CoreLang } from '@services/lang'; import { CoreDomUtils } from '@services/utils/dom'; -// import { CorePushNotifications } from '@core/pushnotifications/services/pushnotifications'; +// import { CorePushNotifications } from '@features/pushnotifications/services/pushnotifications'; import { CoreSettingsHelper, CoreColorScheme } from '../../services/settings.helper'; /** diff --git a/src/app/core/settings/pages/general/general.scss b/src/core/features/settings/pages/general/general.scss similarity index 100% rename from src/app/core/settings/pages/general/general.scss rename to src/core/features/settings/pages/general/general.scss diff --git a/src/app/core/settings/pages/licenses/licenses.html b/src/core/features/settings/pages/licenses/licenses.html similarity index 100% rename from src/app/core/settings/pages/licenses/licenses.html rename to src/core/features/settings/pages/licenses/licenses.html diff --git a/src/app/core/settings/pages/licenses/licenses.page.module.ts b/src/core/features/settings/pages/licenses/licenses.page.module.ts similarity index 100% rename from src/app/core/settings/pages/licenses/licenses.page.module.ts rename to src/core/features/settings/pages/licenses/licenses.page.module.ts diff --git a/src/app/core/settings/pages/licenses/licenses.page.ts b/src/core/features/settings/pages/licenses/licenses.page.ts similarity index 98% rename from src/app/core/settings/pages/licenses/licenses.page.ts rename to src/core/features/settings/pages/licenses/licenses.page.ts index 05dd7334f..d9793fd49 100644 --- a/src/app/core/settings/pages/licenses/licenses.page.ts +++ b/src/core/features/settings/pages/licenses/licenses.page.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { Http } from '@singletons/core.singletons'; /** diff --git a/src/app/core/settings/pages/site/site.html b/src/core/features/settings/pages/site/site.html similarity index 100% rename from src/app/core/settings/pages/site/site.html rename to src/core/features/settings/pages/site/site.html diff --git a/src/app/core/settings/pages/site/site.page.module.ts b/src/core/features/settings/pages/site/site.page.module.ts similarity index 100% rename from src/app/core/settings/pages/site/site.page.module.ts rename to src/core/features/settings/pages/site/site.page.module.ts diff --git a/src/app/core/settings/pages/site/site.page.ts b/src/core/features/settings/pages/site/site.page.ts similarity index 98% rename from src/app/core/settings/pages/site/site.page.ts rename to src/core/features/settings/pages/site/site.page.ts index 0ac690b20..28f794e11 100644 --- a/src/app/core/settings/pages/site/site.page.ts +++ b/src/core/features/settings/pages/site/site.page.ts @@ -21,7 +21,7 @@ import { CoreEventObserver, CoreEvents, CoreEventSiteUpdatedData } from '@single import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; // import { CoreSplitViewComponent } from '@components/split-view/split-view'; -// import { CoreSharedFiles } from '@core/sharedfiles/providers/sharedfiles'; +// import { CoreSharedFiles } from '@features/sharedfiles/providers/sharedfiles'; import { CoreSettingsHelper, CoreSiteSpaceUsage } from '../../services/settings.helper'; import { CoreApp } from '@services/app'; import { CoreSiteInfo } from '@classes/site'; diff --git a/src/app/core/settings/pages/space-usage/space-usage.html b/src/core/features/settings/pages/space-usage/space-usage.html similarity index 100% rename from src/app/core/settings/pages/space-usage/space-usage.html rename to src/core/features/settings/pages/space-usage/space-usage.html diff --git a/src/app/core/settings/pages/space-usage/space-usage.page.module.ts b/src/core/features/settings/pages/space-usage/space-usage.page.module.ts similarity index 100% rename from src/app/core/settings/pages/space-usage/space-usage.page.module.ts rename to src/core/features/settings/pages/space-usage/space-usage.page.module.ts diff --git a/src/app/core/settings/pages/space-usage/space-usage.page.ts b/src/core/features/settings/pages/space-usage/space-usage.page.ts similarity index 100% rename from src/app/core/settings/pages/space-usage/space-usage.page.ts rename to src/core/features/settings/pages/space-usage/space-usage.page.ts diff --git a/src/app/core/settings/pages/synchronization/synchronization.html b/src/core/features/settings/pages/synchronization/synchronization.html similarity index 100% rename from src/app/core/settings/pages/synchronization/synchronization.html rename to src/core/features/settings/pages/synchronization/synchronization.html diff --git a/src/app/core/settings/pages/synchronization/synchronization.page.module.ts b/src/core/features/settings/pages/synchronization/synchronization.page.module.ts similarity index 100% rename from src/app/core/settings/pages/synchronization/synchronization.page.module.ts rename to src/core/features/settings/pages/synchronization/synchronization.page.module.ts diff --git a/src/app/core/settings/pages/synchronization/synchronization.page.ts b/src/core/features/settings/pages/synchronization/synchronization.page.ts similarity index 96% rename from src/app/core/settings/pages/synchronization/synchronization.page.ts rename to src/core/features/settings/pages/synchronization/synchronization.page.ts index 19c6bf063..2802f5132 100644 --- a/src/app/core/settings/pages/synchronization/synchronization.page.ts +++ b/src/core/features/settings/pages/synchronization/synchronization.page.ts @@ -14,12 +14,12 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreEventObserver, CoreEvents, CoreEventSiteUpdatedData } from '@singletons/events'; import { CoreSites, CoreSiteBasicInfo } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreConfig } from '@services/config'; -import { CoreSettingsHelper } from '@core/settings/services/settings.helper'; +import { CoreSettingsHelper } from '@features/settings/services/settings.helper'; import { Translate } from '@singletons/core.singletons'; /** diff --git a/src/app/core/settings/services/settings.delegate.ts b/src/core/features/settings/services/settings.delegate.ts similarity index 100% rename from src/app/core/settings/services/settings.delegate.ts rename to src/core/features/settings/services/settings.delegate.ts diff --git a/src/app/core/settings/services/settings.helper.ts b/src/core/features/settings/services/settings.helper.ts similarity index 98% rename from src/app/core/settings/services/settings.helper.ts rename to src/core/features/settings/services/settings.helper.ts index ecef516b3..6f9022b6b 100644 --- a/src/app/core/settings/services/settings.helper.ts +++ b/src/core/features/settings/services/settings.helper.ts @@ -20,11 +20,11 @@ import { CoreFilepool } from '@services/filepool'; import { CoreSite } from '@classes/site'; import { CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreConfig } from '@services/config'; -// import { CoreFilterProvider } from '@core/filter/providers/filter'; +// import { CoreFilterProvider } from '@features/filter/providers/filter'; import { CoreDomUtils } from '@services/utils/dom'; -// import { CoreCourseProvider } from '@core/course/providers/course'; +// import { CoreCourseProvider } from '@features/course/providers/course'; import { makeSingleton, Translate } from '@singletons/core.singletons'; import { CoreError } from '@classes/errors/error'; diff --git a/src/app/core/settings/settings-init.module.ts b/src/core/features/settings/settings-init.module.ts similarity index 77% rename from src/app/core/settings/settings-init.module.ts rename to src/core/features/settings/settings-init.module.ts index 10b819776..6300b1bc8 100644 --- a/src/app/core/settings/settings-init.module.ts +++ b/src/core/features/settings/settings-init.module.ts @@ -15,16 +15,16 @@ import { NgModule } from '@angular/core'; import { Routes } from '@angular/router'; -import { CoreMainMenuRoutingModule } from '@core/mainmenu/mainmenu-routing.module'; +import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module'; const routes: Routes = [ { path: 'settings', - loadChildren: () => import('@core/settings/settings.module').then(m => m.CoreSettingsModule), + loadChildren: () => import('@features/settings/settings.module').then(m => m.CoreSettingsModule), }, { path: 'preferences', - loadChildren: () => import('@core/settings/pages/site/site.page.module').then(m => m.CoreSitePreferencesPageModule), + loadChildren: () => import('@features/settings/pages/site/site.page.module').then(m => m.CoreSitePreferencesPageModule), }, ]; diff --git a/src/app/core/settings/settings-routing.module.ts b/src/core/features/settings/settings-routing.module.ts similarity index 89% rename from src/app/core/settings/settings-routing.module.ts rename to src/core/features/settings/settings-routing.module.ts index 19d726001..76538b40b 100644 --- a/src/app/core/settings/settings-routing.module.ts +++ b/src/core/features/settings/settings-routing.module.ts @@ -27,13 +27,13 @@ const routes: Routes = [ { path: 'spaceusage', loadChildren: () => - import('@core/settings/pages/space-usage/space-usage.page.module') + import('@features/settings/pages/space-usage/space-usage.page.module') .then(m => m.CoreSettingsSpaceUsagePageModule), }, { path: 'sync', loadChildren: () => - import('@core/settings/pages/synchronization/synchronization.page.module') + import('@features/settings/pages/synchronization/synchronization.page.module') .then(m => m.CoreSettingsSynchronizationPageModule), }, { diff --git a/src/app/core/settings/settings.module.ts b/src/core/features/settings/settings.module.ts similarity index 100% rename from src/app/core/settings/settings.module.ts rename to src/core/features/settings/settings.module.ts diff --git a/src/app/guards/auth.guard.ts b/src/core/guards/auth.guard.ts similarity index 100% rename from src/app/guards/auth.guard.ts rename to src/core/guards/auth.guard.ts diff --git a/src/app/lang/en.json b/src/core/lang/en.json similarity index 100% rename from src/app/lang/en.json rename to src/core/lang/en.json diff --git a/src/app/pipes/bytes-to-size.pipe.ts b/src/core/pipes/bytes-to-size.pipe.ts similarity index 100% rename from src/app/pipes/bytes-to-size.pipe.ts rename to src/core/pipes/bytes-to-size.pipe.ts diff --git a/src/app/pipes/create-links.pipe.ts b/src/core/pipes/create-links.pipe.ts similarity index 100% rename from src/app/pipes/create-links.pipe.ts rename to src/core/pipes/create-links.pipe.ts diff --git a/src/app/pipes/format-date.pipe.ts b/src/core/pipes/format-date.pipe.ts similarity index 100% rename from src/app/pipes/format-date.pipe.ts rename to src/core/pipes/format-date.pipe.ts diff --git a/src/app/pipes/no-tags.pipe.ts b/src/core/pipes/no-tags.pipe.ts similarity index 100% rename from src/app/pipes/no-tags.pipe.ts rename to src/core/pipes/no-tags.pipe.ts diff --git a/src/app/pipes/pipes.module.ts b/src/core/pipes/pipes.module.ts similarity index 100% rename from src/app/pipes/pipes.module.ts rename to src/core/pipes/pipes.module.ts diff --git a/src/app/pipes/seconds-to-hms.pipe.ts b/src/core/pipes/seconds-to-hms.pipe.ts similarity index 97% rename from src/app/pipes/seconds-to-hms.pipe.ts rename to src/core/pipes/seconds-to-hms.pipe.ts index f483237f0..047b24ab4 100644 --- a/src/app/pipes/seconds-to-hms.pipe.ts +++ b/src/core/pipes/seconds-to-hms.pipe.ts @@ -16,7 +16,7 @@ import { Pipe, PipeTransform } from '@angular/core'; import { CoreTextUtils } from '@services/utils/text'; import { CoreLogger } from '@singletons/logger'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; /** * Pipe to convert a number of seconds to Hours:Minutes:Seconds. diff --git a/src/app/pipes/time-ago.pipe.ts b/src/core/pipes/time-ago.pipe.ts similarity index 100% rename from src/app/pipes/time-ago.pipe.ts rename to src/core/pipes/time-ago.pipe.ts diff --git a/src/app/services/app.db.ts b/src/core/services/app.db.ts similarity index 100% rename from src/app/services/app.db.ts rename to src/core/services/app.db.ts diff --git a/src/app/services/app.ts b/src/core/services/app.ts similarity index 99% rename from src/app/services/app.ts rename to src/core/services/app.ts index c977b166f..8ced91397 100644 --- a/src/app/services/app.ts +++ b/src/core/services/app.ts @@ -21,7 +21,7 @@ import { CoreEvents } from '@singletons/events'; import { CoreUtils, PromiseDefer } from '@services/utils/utils'; import { CoreUrlUtils } from '@services/utils/url'; import { SQLiteDB, SQLiteDBTableSchema } from '@classes/sqlitedb'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton, Keyboard, Network, StatusBar, Platform, Device } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; diff --git a/src/app/services/config.db.ts b/src/core/services/config.db.ts similarity index 100% rename from src/app/services/config.db.ts rename to src/core/services/config.db.ts diff --git a/src/app/services/config.ts b/src/core/services/config.ts similarity index 100% rename from src/app/services/config.ts rename to src/core/services/config.ts diff --git a/src/app/services/cron.db.ts b/src/core/services/cron.db.ts similarity index 100% rename from src/app/services/cron.db.ts rename to src/core/services/cron.db.ts diff --git a/src/app/services/cron.ts b/src/core/services/cron.ts similarity index 99% rename from src/app/services/cron.ts rename to src/core/services/cron.ts index f542bfcbc..e7c6e2fc7 100644 --- a/src/app/services/cron.ts +++ b/src/core/services/cron.ts @@ -17,7 +17,7 @@ import { Injectable, NgZone } from '@angular/core'; import { CoreApp, CoreAppProvider } from '@services/app'; import { CoreConfig } from '@services/config'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { SQLiteDB } from '@classes/sqlitedb'; import { CoreError } from '@classes/errors/error'; diff --git a/src/app/services/db.ts b/src/core/services/db.ts similarity index 97% rename from src/app/services/db.ts rename to src/core/services/db.ts index ca5aedb1e..ce0979c67 100644 --- a/src/app/services/db.ts +++ b/src/core/services/db.ts @@ -15,7 +15,7 @@ import { Injectable } from '@angular/core'; import { SQLiteDB } from '@classes/sqlitedb'; -import { SQLiteDBMock } from '@core/emulator/classes/sqlitedb'; +import { SQLiteDBMock } from '@features/emulator/classes/sqlitedb'; import { makeSingleton, SQLite, Platform } from '@singletons/core.singletons'; /** diff --git a/src/app/services/file-helper.ts b/src/core/services/file-helper.ts similarity index 99% rename from src/app/services/file-helper.ts rename to src/core/services/file-helper.ts index b9280a4ce..da28831c8 100644 --- a/src/app/services/file-helper.ts +++ b/src/core/services/file-helper.ts @@ -23,7 +23,7 @@ import { CoreWS, CoreWSExternalFile } from '@services/ws'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreError } from '@classes/errors/error'; import { makeSingleton, Translate } from '@singletons/core.singletons'; diff --git a/src/app/services/file-session.ts b/src/core/services/file-session.ts similarity index 100% rename from src/app/services/file-session.ts rename to src/core/services/file-session.ts diff --git a/src/app/services/file.ts b/src/core/services/file.ts similarity index 99% rename from src/app/services/file.ts rename to src/core/services/file.ts index 0912615fb..f760f2d2f 100644 --- a/src/app/services/file.ts +++ b/src/core/services/file.ts @@ -21,7 +21,7 @@ import { CoreWSExternalFile } from '@services/ws'; import { CoreMimetypeUtils } from '@services/utils/mimetype'; import { CoreTextUtils } from '@services/utils/text'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreError } from '@classes/errors/error'; import { CoreLogger } from '@singletons/logger'; diff --git a/src/app/services/filepool.db.ts b/src/core/services/filepool.db.ts similarity index 100% rename from src/app/services/filepool.db.ts rename to src/core/services/filepool.db.ts diff --git a/src/app/services/filepool.ts b/src/core/services/filepool.ts similarity index 99% rename from src/app/services/filepool.ts rename to src/core/services/filepool.ts index bed2a0680..0318b7f28 100644 --- a/src/app/services/filepool.ts +++ b/src/core/services/filepool.ts @@ -30,7 +30,7 @@ import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils, PromiseDefer } from '@services/utils/utils'; import { SQLiteDB } from '@classes/sqlitedb'; import { CoreError } from '@classes/errors/error'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton, Network, NgZone, Translate } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; import { diff --git a/src/app/services/geolocation.ts b/src/core/services/geolocation.ts similarity index 100% rename from src/app/services/geolocation.ts rename to src/core/services/geolocation.ts diff --git a/src/app/services/groups.ts b/src/core/services/groups.ts similarity index 100% rename from src/app/services/groups.ts rename to src/core/services/groups.ts diff --git a/src/app/services/handlers/site-info-cron-handler.ts b/src/core/services/handlers/site-info-cron-handler.ts similarity index 100% rename from src/app/services/handlers/site-info-cron-handler.ts rename to src/core/services/handlers/site-info-cron-handler.ts diff --git a/src/app/services/init.ts b/src/core/services/init.ts similarity index 100% rename from src/app/services/init.ts rename to src/core/services/init.ts diff --git a/src/app/services/lang.ts b/src/core/services/lang.ts similarity index 99% rename from src/app/services/lang.ts rename to src/core/services/lang.ts index 8daaa3171..571d4df81 100644 --- a/src/app/services/lang.ts +++ b/src/core/services/lang.ts @@ -14,7 +14,7 @@ import { Injectable } from '@angular/core'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { LangChangeEvent } from '@ngx-translate/core'; import { CoreAppProvider } from '@services/app'; import { CoreConfig } from '@services/config'; diff --git a/src/app/services/local-notifications.db.ts b/src/core/services/local-notifications.db.ts similarity index 100% rename from src/app/services/local-notifications.db.ts rename to src/core/services/local-notifications.db.ts diff --git a/src/app/services/local-notifications.ts b/src/core/services/local-notifications.ts similarity index 99% rename from src/app/services/local-notifications.ts rename to src/core/services/local-notifications.ts index 55253e69c..c20ca3217 100644 --- a/src/app/services/local-notifications.ts +++ b/src/core/services/local-notifications.ts @@ -25,7 +25,7 @@ import { SQLiteDB } from '@classes/sqlitedb'; import { CoreSite } from '@classes/site'; import { CoreQueueRunner } from '@classes/queue-runner'; import { CoreError } from '@classes/errors/error'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton, NgZone, Platform, Translate, LocalNotifications, Push } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; import { diff --git a/src/app/services/plugin-file.delegate.ts b/src/core/services/plugin-file.delegate.ts similarity index 99% rename from src/app/services/plugin-file.delegate.ts rename to src/core/services/plugin-file.delegate.ts index bc0c51953..3c46e0ab6 100644 --- a/src/app/services/plugin-file.delegate.ts +++ b/src/core/services/plugin-file.delegate.ts @@ -17,7 +17,7 @@ import { FileEntry } from '@ionic-native/file'; import { CoreFilepool, CoreFilepoolOnProgressCallback } from '@services/filepool'; import { CoreWSExternalFile } from '@services/ws'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreDelegate, CoreDelegateHandler } from '@classes/delegate'; import { makeSingleton } from '@singletons/core.singletons'; diff --git a/src/app/services/sites.db.ts b/src/core/services/sites.db.ts similarity index 100% rename from src/app/services/sites.db.ts rename to src/core/services/sites.db.ts diff --git a/src/app/services/sites.ts b/src/core/services/sites.ts similarity index 99% rename from src/app/services/sites.ts rename to src/core/services/sites.ts index 665798c64..d60e0d026 100644 --- a/src/app/services/sites.ts +++ b/src/core/services/sites.ts @@ -23,7 +23,7 @@ import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreSite, CoreSiteWSPreSets, diff --git a/src/app/services/sync.db.ts b/src/core/services/sync.db.ts similarity index 99% rename from src/app/services/sync.db.ts rename to src/core/services/sync.db.ts index 91489c5f7..47d5dc900 100644 --- a/src/app/services/sync.db.ts +++ b/src/core/services/sync.db.ts @@ -59,4 +59,3 @@ export type CoreSyncRecord = { export const initCoreSyncDB = (): void => { registerSiteSchema(SITE_SCHEMA); }; - diff --git a/src/app/services/sync.ts b/src/core/services/sync.ts similarity index 100% rename from src/app/services/sync.ts rename to src/core/services/sync.ts diff --git a/src/app/services/tests/utils/text.test.ts b/src/core/services/tests/utils/text.test.ts similarity index 97% rename from src/app/services/tests/utils/text.test.ts rename to src/core/services/tests/utils/text.test.ts index 82bbc2bfd..2b82aa7a8 100644 --- a/src/app/services/tests/utils/text.test.ts +++ b/src/core/services/tests/utils/text.test.ts @@ -17,7 +17,7 @@ import { DomSanitizer } from '@angular/platform-browser'; import { CoreApp } from '@services/app'; import { CoreTextUtilsProvider } from '@services/utils/text'; -import { mock, mockSingleton } from '@/tests/utils'; +import { mock, mockSingleton } from '@/testing/utils'; describe('CoreTextUtilsProvider', () => { diff --git a/src/app/services/tests/utils/url.test.ts b/src/core/services/tests/utils/url.test.ts similarity index 100% rename from src/app/services/tests/utils/url.test.ts rename to src/core/services/tests/utils/url.test.ts diff --git a/src/app/services/update-manager.ts b/src/core/services/update-manager.ts similarity index 97% rename from src/app/services/update-manager.ts rename to src/core/services/update-manager.ts index 2245269e6..4c8eca8d9 100644 --- a/src/app/services/update-manager.ts +++ b/src/core/services/update-manager.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { CoreConfig } from '@services/config'; import { CoreInitHandler, CoreInitDelegate } from '@services/init'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton } from '@singletons/core.singletons'; import { CoreLogger } from '@singletons/logger'; diff --git a/src/app/services/utils/dom.ts b/src/core/services/utils/dom.ts similarity index 99% rename from src/app/services/utils/dom.ts rename to src/core/services/utils/dom.ts index ec31a81bc..eb6ac5042 100644 --- a/src/app/services/utils/dom.ts +++ b/src/core/services/utils/dom.ts @@ -26,7 +26,7 @@ import { CoreWSExternalWarning } from '@services/ws'; import { CoreTextUtils, CoreTextErrorObject } from '@services/utils/text'; import { CoreUrlUtils } from '@services/utils/url'; import { CoreUtils } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreIonLoadingElement } from '@classes/ion-loading'; import { CoreCanceledError } from '@classes/errors/cancelederror'; import { CoreError } from '@classes/errors/error'; diff --git a/src/app/services/utils/iframe.ts b/src/core/services/utils/iframe.ts similarity index 100% rename from src/app/services/utils/iframe.ts rename to src/core/services/utils/iframe.ts diff --git a/src/app/services/utils/mimetype.ts b/src/core/services/utils/mimetype.ts similarity index 100% rename from src/app/services/utils/mimetype.ts rename to src/core/services/utils/mimetype.ts diff --git a/src/app/services/utils/text.ts b/src/core/services/utils/text.ts similarity index 100% rename from src/app/services/utils/text.ts rename to src/core/services/utils/text.ts diff --git a/src/app/services/utils/time.ts b/src/core/services/utils/time.ts similarity index 99% rename from src/app/services/utils/time.ts rename to src/core/services/utils/time.ts index d06b45b47..0cdbfba45 100644 --- a/src/app/services/utils/time.ts +++ b/src/core/services/utils/time.ts @@ -15,7 +15,7 @@ import { Injectable } from '@angular/core'; import moment, { LongDateFormatKey } from 'moment'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton, Translate } from '@singletons/core.singletons'; /* diff --git a/src/app/services/utils/url.ts b/src/core/services/utils/url.ts similarity index 99% rename from src/app/services/utils/url.ts rename to src/core/services/utils/url.ts index 7fc7ee464..4f0917d0c 100644 --- a/src/app/services/utils/url.ts +++ b/src/core/services/utils/url.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { CoreLang } from '@services/lang'; import { CoreTextUtils } from '@services/utils/text'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { makeSingleton } from '@singletons/core.singletons'; import { CoreUrl } from '@singletons/url'; diff --git a/src/app/services/utils/utils.ts b/src/core/services/utils/utils.ts similarity index 100% rename from src/app/services/utils/utils.ts rename to src/core/services/utils/utils.ts diff --git a/src/app/services/ws.ts b/src/core/services/ws.ts similarity index 99% rename from src/app/services/ws.ts rename to src/core/services/ws.ts index bcacb74c2..9e0d211eb 100644 --- a/src/app/services/ws.ts +++ b/src/core/services/ws.ts @@ -27,7 +27,7 @@ import { CoreFile, CoreFileProvider } from '@services/file'; import { CoreMimetypeUtils } from '@services/utils/mimetype'; import { CoreTextUtils } from '@services/utils/text'; import { CoreUtils, PromiseDefer } from '@services/utils/utils'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; import { CoreError } from '@classes/errors/error'; import { CoreInterceptor } from '@classes/interceptor'; import { makeSingleton, Translate, FileTransfer, Http, Platform, NativeHttp } from '@singletons/core.singletons'; diff --git a/src/app/singletons/array.ts b/src/core/singletons/array.ts similarity index 100% rename from src/app/singletons/array.ts rename to src/core/singletons/array.ts diff --git a/src/app/singletons/core.singletons.ts b/src/core/singletons/core.singletons.ts similarity index 100% rename from src/app/singletons/core.singletons.ts rename to src/core/singletons/core.singletons.ts diff --git a/src/app/singletons/events.ts b/src/core/singletons/events.ts similarity index 100% rename from src/app/singletons/events.ts rename to src/core/singletons/events.ts diff --git a/src/app/singletons/locutus.ts b/src/core/singletons/locutus.ts similarity index 100% rename from src/app/singletons/locutus.ts rename to src/core/singletons/locutus.ts diff --git a/src/app/singletons/logger.ts b/src/core/singletons/logger.ts similarity index 98% rename from src/app/singletons/logger.ts rename to src/core/singletons/logger.ts index fab03132b..88e1dd93d 100644 --- a/src/app/singletons/logger.ts +++ b/src/core/singletons/logger.ts @@ -14,7 +14,7 @@ import moment from 'moment'; -import { CoreConstants } from '@core/constants'; +import { CoreConstants } from '@/core/constants'; /** * Log function type. diff --git a/src/app/singletons/object.ts b/src/core/singletons/object.ts similarity index 100% rename from src/app/singletons/object.ts rename to src/core/singletons/object.ts diff --git a/src/app/singletons/url.ts b/src/core/singletons/url.ts similarity index 100% rename from src/app/singletons/url.ts rename to src/core/singletons/url.ts diff --git a/src/app/singletons/window.ts b/src/core/singletons/window.ts similarity index 100% rename from src/app/singletons/window.ts rename to src/core/singletons/window.ts diff --git a/src/main.ts b/src/main.ts index 12a0be150..5e28626c8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,7 +16,7 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; -import { CoreConstants } from './app/core/constants'; +import { CoreConstants } from './core/constants'; if (CoreConstants.BUILD.isProduction) { enableProdMode(); diff --git a/src/polyfills.ts b/src/polyfills.ts index 7139d16af..191982e76 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -12,12 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -/** - * BROWSER POLYFILLS - */ -import './zone-flags'; +// Prevents Angular change detection from running with certain Web Component callbacks. +// eslint-disable-next-line no-underscore-dangle +window.__Zone_disable_customElements = true; -/** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +// Zone JS is required by default for Angular itself. +import 'zone.js/dist/zone'; diff --git a/src/tests/setup.ts b/src/testing/setup.ts similarity index 100% rename from src/tests/setup.ts rename to src/testing/setup.ts diff --git a/src/tests/utils.ts b/src/testing/utils.ts similarity index 98% rename from src/tests/utils.ts rename to src/testing/utils.ts index f15be53ae..97d6bba4b 100644 --- a/src/tests/utils.ts +++ b/src/testing/utils.ts @@ -15,7 +15,7 @@ import { Component, CUSTOM_ELEMENTS_SCHEMA, Type, ViewChild } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { CoreSingletonClass } from '@app/classes/singletons-factory'; +import { CoreSingletonClass } from '@classes/singletons-factory'; abstract class WrapperComponent { diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 7d0373840..9d4eedb56 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -14,7 +14,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { CoreColorScheme } from '@core/settings/services/settings.helper'; +import { CoreColorScheme } from '@features/settings/services/settings.helper'; import { CoreSitesDemoSiteData } from '@services/sites'; declare global { diff --git a/src/zone-flags.ts b/src/zone-flags.ts deleted file mode 100644 index 2ebf40170..000000000 --- a/src/zone-flags.ts +++ /dev/null @@ -1,21 +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. - -/** - * Prevents Angular change detection from - * running with certain Web Component callbacks - */ - -// eslint-disable-next-line no-underscore-dangle -window.__Zone_disable_customElements = true; diff --git a/tsconfig.app.json b/tsconfig.app.json index 72a9b5489..fac4237c0 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -11,16 +11,14 @@ ], "paths": { "@/*": ["*"], - "@addon/*": ["app/addon/*"], - "@app/*": ["app/*"], - "@classes/*": ["app/classes/*"], - "@components/*": ["app/components/*"], - "@core/*": ["app/core/*"], - "@directives/*": ["app/directives/*"], - "@guards/*": ["app/guards/*"], - "@pipes/*": ["app/pipes/*"], - "@services/*": ["app/services/*"], - "@singletons/*": ["app/singletons/*"] + "@classes/*": ["core/classes/*"], + "@components/*": ["core/components/*"], + "@directives/*": ["core/directives/*"], + "@features/*": ["core/features/*"], + "@guards/*": ["core/guards/*"], + "@pipes/*": ["core/pipes/*"], + "@services/*": ["core/services/*"], + "@singletons/*": ["core/singletons/*"] } }, "files": [ @@ -33,6 +31,6 @@ ], "exclude": [ "src/**/*.test.ts", - "src/tests/**" + "src/testing/**" ] } diff --git a/tsconfig.json b/tsconfig.json index 1bc3663d1..549502f80 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,17 +30,14 @@ ], "paths": { "@/*": ["*"], - "@addon/*": ["app/addon/*"], - "@app/*": ["app/*"], - "@classes/*": ["app/classes/*"], - "@components/*": ["app/components/*"], - "@core/*": ["app/core/*"], - "@directives/*": ["app/directives/*"], - "@guards/*": ["app/guards/*"], - "@pipes/*": ["app/pipes/*"], - "@services/*": ["app/services/*"], - "@singletons/*": ["app/singletons/*"], - "@tests/*": ["tests/*"] + "@classes/*": ["core/classes/*"], + "@components/*": ["core/components/*"], + "@directives/*": ["core/directives/*"], + "@features/*": ["core/features/*"], + "@guards/*": ["core/guards/*"], + "@pipes/*": ["core/pipes/*"], + "@services/*": ["core/services/*"], + "@singletons/*": ["core/singletons/*"] } }, "angularCompilerOptions": { diff --git a/tsconfig.test.json b/tsconfig.test.json index c62c89cf9..7d7f29bfe 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -16,21 +16,18 @@ ], "paths": { "@/*": ["*"], - "@addon/*": ["app/addon/*"], - "@app/*": ["app/*"], - "@classes/*": ["app/classes/*"], - "@components/*": ["app/components/*"], - "@core/*": ["app/core/*"], - "@directives/*": ["app/directives/*"], - "@guards/*": ["app/guards/*"], - "@pipes/*": ["app/pipes/*"], - "@services/*": ["app/services/*"], - "@singletons/*": ["app/singletons/*"], - "@tests/*": ["tests/*"] + "@classes/*": ["core/classes/*"], + "@components/*": ["core/components/*"], + "@directives/*": ["core/directives/*"], + "@features/*": ["core/features/*"], + "@guards/*": ["core/guards/*"], + "@pipes/*": ["core/pipes/*"], + "@services/*": ["core/services/*"], + "@singletons/*": ["core/singletons/*"] } }, "files": [ - "src/tests/setup.ts", + "src/testing/setup.ts", "src/polyfills.ts" ], "include": [