diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 3bb90c43..d1ee4ba6 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -4,7 +4,7 @@ import { signal } from '@angular/core'; import { TestBed, waitForAsync } from '@angular/core/testing'; import { AppComponent } from './app.component'; -import { provideCdkDialog } from './common/dialog/provider'; +import { provideCdkDialog } from './common/dialog'; import { APP_CONFIG } from './core'; import { provideSession } from './core/provider'; diff --git a/src/app/app.config.ts b/src/app/app.config.ts index c1a5a374..b49727cd 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -12,7 +12,7 @@ import { import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { provideCdkDialog } from './common/dialog/provider'; +import { provideCdkDialog } from './common/dialog'; import { provideAdminFeature } from './core/admin'; import { provideAuditFeature } from './core/audit'; import { authInterceptor } from './core/auth/auth.interceptor'; diff --git a/src/app/common/dialog/public-api.ts b/src/app/common/dialog/public-api.ts index 41b65a64..9573e7f9 100644 --- a/src/app/common/dialog/public-api.ts +++ b/src/app/common/dialog/public-api.ts @@ -1,3 +1,4 @@ +export * from './provider'; export * from './dialog.model'; export * from './dialog.service'; export * from './bs-dialog-container/bs-dialog-container.component'; diff --git a/src/app/common/index.ts b/src/app/common/index.ts new file mode 100644 index 00000000..7e1a213e --- /dev/null +++ b/src/app/common/index.ts @@ -0,0 +1 @@ +export * from './public-api'; diff --git a/src/app/common/directives/link-accessibility.directive.ts b/src/app/common/link-accessibility.directive.ts similarity index 100% rename from src/app/common/directives/link-accessibility.directive.ts rename to src/app/common/link-accessibility.directive.ts diff --git a/src/app/common/directives/not-whitespace.directive.ts b/src/app/common/not-whitespace.directive.ts similarity index 100% rename from src/app/common/directives/not-whitespace.directive.ts rename to src/app/common/not-whitespace.directive.ts diff --git a/src/app/common/pipes/index.ts b/src/app/common/pipes/index.ts new file mode 100644 index 00000000..7e1a213e --- /dev/null +++ b/src/app/common/pipes/index.ts @@ -0,0 +1 @@ +export * from './public-api'; diff --git a/src/app/common/pipes/public-api.ts b/src/app/common/pipes/public-api.ts new file mode 100644 index 00000000..a359bd64 --- /dev/null +++ b/src/app/common/pipes/public-api.ts @@ -0,0 +1,5 @@ +export * from './utc-date-pipe/utc-date.pipe'; +export * from './ago-date.pipe'; +export * from './join.pipe'; +export * from './keys.pipe'; +export * from './sort-object-keys.pipe'; diff --git a/src/app/common/public-api.ts b/src/app/common/public-api.ts new file mode 100644 index 00000000..b5ab8ba4 --- /dev/null +++ b/src/app/common/public-api.ts @@ -0,0 +1,17 @@ +export * from './abstract-entity.service'; +export * from './cdk-menu-item-href.directive'; +export * from './cdk-menu-item-router-link.directive'; +export * from './flyout/flyout.component'; +export * from './link-accessibility.directive'; +export * from './loading-overlay/loading-overlay.component'; +export * from './loading-spinner/loading-spinner.component'; +export * from './multi-select.directive'; +export * from './modal/modal/modal.component'; +export * from './not-whitespace.directive'; +export * from './paging.model'; +export * from './rxjs-utils'; +export * from './search-input/search-input.component'; +export * from './skip-to.directive'; +export * from './sorting.model'; +export * from './string-utils.service'; +export * from './topic.model'; diff --git a/src/app/common/directives/skip-to.directive.ts b/src/app/common/skip-to.directive.ts similarity index 100% rename from src/app/common/directives/skip-to.directive.ts rename to src/app/common/skip-to.directive.ts diff --git a/src/app/common/system-alert/index.ts b/src/app/common/system-alert/index.ts new file mode 100644 index 00000000..7e1a213e --- /dev/null +++ b/src/app/common/system-alert/index.ts @@ -0,0 +1 @@ +export * from './public-api'; diff --git a/src/app/common/system-alert/public-api.ts b/src/app/common/system-alert/public-api.ts new file mode 100644 index 00000000..e5157e41 --- /dev/null +++ b/src/app/common/system-alert/public-api.ts @@ -0,0 +1,3 @@ +export * from './system-alert.component'; +export * from './system-alert.model'; +export * from './system-alert.service'; diff --git a/src/app/common/table/public-api.ts b/src/app/common/table/public-api.ts index c6384bbe..7f18b843 100644 --- a/src/app/common/table/public-api.ts +++ b/src/app/common/table/public-api.ts @@ -1,4 +1,5 @@ export * from './asy-table-data-source'; +export * from './actions-menu-column/actions-menu-column.component'; export * from './column-chooser/column-chooser.component'; export * from './paginator/paginator.component'; export * from './sidebar/sidebar.component'; diff --git a/src/app/core/admin/admin-topic.model.ts b/src/app/core/admin/admin-topic.model.ts index 17ce66e5..60c9f9a2 100644 --- a/src/app/core/admin/admin-topic.model.ts +++ b/src/app/core/admin/admin-topic.model.ts @@ -1,14 +1,5 @@ -import { InjectionToken, inject } from '@angular/core'; +import { InjectionToken } from '@angular/core'; -import sortBy from 'lodash/sortBy'; - -import { Topic } from '../../common/topic.model'; +import { Topic } from '../../common'; export const ADMIN_TOPICS = new InjectionToken('ADMIN_TOPIC'); - -export const injectAdminTopics: () => Topic[] = () => - sortBy((inject(ADMIN_TOPICS, { optional: true }) ?? []).flat(), [ - (t) => t.ordinal ?? 1, - 'title', - 'path' - ]); diff --git a/src/app/core/admin/admin.component.ts b/src/app/core/admin/admin.component.ts index d64aa1d0..e7841ebc 100644 --- a/src/app/core/admin/admin.component.ts +++ b/src/app/core/admin/admin.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; -import { injectAdminTopics } from './admin-topic.model'; +import { injectAdminTopics } from './provider'; @Component({ templateUrl: 'admin.component.html', diff --git a/src/app/core/admin/cache-entries/cache-entries.service.ts b/src/app/core/admin/cache-entries/cache-entries.service.ts index d0af8d45..cbde1185 100644 --- a/src/app/core/admin/cache-entries/cache-entries.service.ts +++ b/src/app/core/admin/cache-entries/cache-entries.service.ts @@ -4,8 +4,8 @@ import { Injectable, inject } from '@angular/core'; import { Observable, of } from 'rxjs'; import { catchError } from 'rxjs/operators'; -import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../../common/paging.model'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../../common'; +import { SystemAlertService } from '../../../common/system-alert'; import { CacheEntry } from './cache-entry.model'; @Injectable({ providedIn: 'root' }) diff --git a/src/app/core/admin/cache-entries/cache-entry-modal/cache-entry-modal.component.ts b/src/app/core/admin/cache-entries/cache-entry-modal/cache-entry-modal.component.ts index f8be45b7..ac3cd3ec 100644 --- a/src/app/core/admin/cache-entries/cache-entry-modal/cache-entry-modal.component.ts +++ b/src/app/core/admin/cache-entries/cache-entry-modal/cache-entry-modal.component.ts @@ -2,10 +2,9 @@ import { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog'; import { JsonPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit, inject } from '@angular/core'; +import { ModalComponent } from '../../../../common'; import { DialogAction } from '../../../../common/dialog'; -import { ModalComponent } from '../../../../common/modal/modal/modal.component'; -import { AgoDatePipe } from '../../../../common/pipes/ago-date.pipe'; -import { UtcDatePipe } from '../../../../common/pipes/utc-date-pipe/utc-date.pipe'; +import { AgoDatePipe, UtcDatePipe } from '../../../../common/pipes'; import { CacheEntry } from '../cache-entry.model'; export class CacheEntryModalData { diff --git a/src/app/core/admin/cache-entries/list-cache-entries/list-cache-entries.component.ts b/src/app/core/admin/cache-entries/list-cache-entries/list-cache-entries.component.ts index 9a53ac89..bef13f87 100644 --- a/src/app/core/admin/cache-entries/list-cache-entries/list-cache-entries.component.ts +++ b/src/app/core/admin/cache-entries/list-cache-entries/list-cache-entries.component.ts @@ -9,16 +9,19 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable } from 'rxjs'; import { filter, first, switchMap } from 'rxjs/operators'; +import { + PagingOptions, + PagingResults, + SearchInputComponent, + SkipToDirective, + SortDirection +} from '../../../../common'; import { DialogAction, DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../../common/paging.model'; -import { AgoDatePipe } from '../../../../common/pipes/ago-date.pipe'; -import { UtcDatePipe } from '../../../../common/pipes/utc-date-pipe/utc-date.pipe'; -import { SearchInputComponent } from '../../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { AgoDatePipe, UtcDatePipe } from '../../../../common/pipes'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { + ActionsMenuColumnComponent, + ActionsMenuTemplateDirective, AgoDateColumnComponent, AsyFilterDirective, AsySortDirective, @@ -28,10 +31,6 @@ import { PaginatorComponent, TextColumnComponent } from '../../../../common/table'; -import { - ActionsMenuColumnComponent, - ActionsMenuTemplateDirective -} from '../../../../common/table/actions-menu-column/actions-menu-column.component'; import { CacheEntriesService } from '../cache-entries.service'; import { CacheEntryModalComponent, diff --git a/src/app/core/admin/end-user-agreement/eua.service.ts b/src/app/core/admin/end-user-agreement/eua.service.ts index 164d27b4..4c79d83e 100644 --- a/src/app/core/admin/end-user-agreement/eua.service.ts +++ b/src/app/core/admin/end-user-agreement/eua.service.ts @@ -4,8 +4,8 @@ import { ActivatedRouteSnapshot, ResolveFn, Router, RouterStateSnapshot } from ' import { Observable } from 'rxjs'; import { catchError } from 'rxjs/operators'; -import { AbstractEntityService, ServiceMethod } from '../../../common/abstract-entity.service'; -import { EndUserAgreement } from './eua.model'; +import { AbstractEntityService, ServiceMethod } from '../../../common'; +import { EndUserAgreement } from '../../auth'; export const euaResolver: ResolveFn = ( route: ActivatedRouteSnapshot, diff --git a/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.spec.ts b/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.spec.ts index 103914b4..c41481bf 100644 --- a/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.spec.ts +++ b/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.spec.ts @@ -5,7 +5,7 @@ import { ActivatedRoute } from '@angular/router'; import { of } from 'rxjs'; import { DialogService } from '../../../../common/dialog'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { SystemAlertService } from '../../../../common/system-alert'; import { EuaService } from '../eua.service'; import { AdminListEuasComponent } from './admin-list-euas.component'; diff --git a/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.ts b/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.ts index 949d1d45..b32c9a37 100644 --- a/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.ts +++ b/src/app/core/admin/end-user-agreement/list-euas/admin-list-euas.component.ts @@ -8,14 +8,18 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable } from 'rxjs'; import { filter, first, switchMap } from 'rxjs/operators'; +import { + PagingOptions, + PagingResults, + SearchInputComponent, + SkipToDirective, + SortDirection +} from '../../../../common'; import { DialogAction, DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../../common/paging.model'; -import { SearchInputComponent } from '../../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { + ActionsMenuColumnComponent, + ActionsMenuTemplateDirective, AsyFilterDirective, AsySortDirective, AsySortHeaderComponent, @@ -27,11 +31,7 @@ import { SidebarComponent, TextColumnComponent } from '../../../../common/table'; -import { - ActionsMenuColumnComponent, - ActionsMenuTemplateDirective -} from '../../../../common/table/actions-menu-column/actions-menu-column.component'; -import { EndUserAgreement } from '../eua.model'; +import { EndUserAgreement } from '../../../auth'; import { EuaService } from '../eua.service'; @Component({ diff --git a/src/app/core/admin/end-user-agreement/manage-eua/manage-eua.component.ts b/src/app/core/admin/end-user-agreement/manage-eua/manage-eua.component.ts index d9e08167..e70b5db3 100644 --- a/src/app/core/admin/end-user-agreement/manage-eua/manage-eua.component.ts +++ b/src/app/core/admin/end-user-agreement/manage-eua/manage-eua.component.ts @@ -4,11 +4,10 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormsModule } from '@angular/forms'; import { Router, RouterLink } from '@angular/router'; +import { SkipToDirective } from '../../../../common'; import { DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; -import { EndUserAgreement } from '../eua.model'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; +import { EndUserAgreement } from '../../../auth'; import { EuaService } from '../eua.service'; @Component({ diff --git a/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.spec.ts b/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.spec.ts index ada118ee..fe393c05 100644 --- a/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.spec.ts +++ b/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.spec.ts @@ -3,10 +3,10 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { of } from 'rxjs'; -import { PagingResults } from '../../../../common/paging.model'; +import { PagingResults } from '../../../../common'; import { User } from '../../../auth'; import { ExportConfigService } from '../../../export-config.service'; -import { FeedbackService } from '../../../feedback/feedback.service'; +import { FeedbackService } from '../../../feedback'; import { AdminUsersService } from '../../user/admin-users.service'; import { AdminListFeedbackComponent } from './admin-list-feedback.component'; diff --git a/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.ts b/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.ts index b4ec055e..f61f2e10 100644 --- a/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.ts +++ b/src/app/core/admin/feedback/list-feedback/admin-list-feedback.component.ts @@ -9,12 +9,14 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable } from 'rxjs'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../../common/paging.model'; -import { SearchInputComponent } from '../../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { + PagingOptions, + PagingResults, + SearchInputComponent, + SkipToDirective, + SortDirection +} from '../../../../common'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { AgoDateColumnComponent, AsyFilterDirective, @@ -30,8 +32,7 @@ import { TextColumnComponent } from '../../../../common/table'; import { ExportConfigService } from '../../../export-config.service'; -import { Feedback, FeedbackStatusOption } from '../../../feedback/feedback.model'; -import { FeedbackService } from '../../../feedback/feedback.service'; +import { Feedback, FeedbackService, FeedbackStatusOption } from '../../../feedback'; import { AdminUsersService } from '../../user/admin-users.service'; @Component({ diff --git a/src/app/core/admin/messages/admin-messages-routes.ts b/src/app/core/admin/messages/admin-messages-routes.ts index 4a47bb0c..5afa503a 100644 --- a/src/app/core/admin/messages/admin-messages-routes.ts +++ b/src/app/core/admin/messages/admin-messages-routes.ts @@ -1,6 +1,6 @@ import { Routes } from '@angular/router'; -import { messageResolver } from '../../messages/message.service'; +import { messageResolver } from '../../messages'; import { ListMessagesComponent } from './list-messages/list-messages.component'; import { ManageMessageComponent } from './manage-message/manage-message.component'; diff --git a/src/app/core/admin/messages/list-messages/list-messages.component.ts b/src/app/core/admin/messages/list-messages/list-messages.component.ts index be60e7de..92b556eb 100644 --- a/src/app/core/admin/messages/list-messages/list-messages.component.ts +++ b/src/app/core/admin/messages/list-messages/list-messages.component.ts @@ -7,15 +7,19 @@ import { RouterLink } from '@angular/router'; import { Observable } from 'rxjs'; import { filter, first, switchMap } from 'rxjs/operators'; -import { CdkMenuItemRouterLinkDirective } from '../../../../common/cdk-menu-item-router-link.directive'; +import { + CdkMenuItemRouterLinkDirective, + PagingOptions, + PagingResults, + SearchInputComponent, + SkipToDirective, + SortDirection +} from '../../../../common'; import { DialogAction, DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../../common/paging.model'; -import { SearchInputComponent } from '../../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { + ActionsMenuColumnComponent, + ActionsMenuTemplateDirective, AsyFilterDirective, AsySortDirective, AsySortHeaderComponent, @@ -25,12 +29,7 @@ import { PaginatorComponent, TextColumnComponent } from '../../../../common/table'; -import { - ActionsMenuColumnComponent, - ActionsMenuTemplateDirective -} from '../../../../common/table/actions-menu-column/actions-menu-column.component'; -import { Message } from '../../../messages/message.model'; -import { MessageService } from '../../../messages/message.service'; +import { Message, MessageService } from '../../../messages'; @Component({ templateUrl: './list-messages.component.html', diff --git a/src/app/core/admin/messages/manage-message/manage-message.component.spec.ts b/src/app/core/admin/messages/manage-message/manage-message.component.spec.ts index 0c7461e3..452dd417 100644 --- a/src/app/core/admin/messages/manage-message/manage-message.component.spec.ts +++ b/src/app/core/admin/messages/manage-message/manage-message.component.spec.ts @@ -5,9 +5,8 @@ import { RouterModule } from '@angular/router'; import { of } from 'rxjs'; import { DialogService } from '../../../../common/dialog'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; -import { Message, MessageType } from '../../../messages/message.model'; -import { MessageService } from '../../../messages/message.service'; +import { SystemAlertService } from '../../../../common/system-alert'; +import { Message, MessageService, MessageType } from '../../../messages'; import { ManageMessageComponent } from './manage-message.component'; describe('ManageMessageComponent', () => { diff --git a/src/app/core/admin/messages/manage-message/manage-message.component.ts b/src/app/core/admin/messages/manage-message/manage-message.component.ts index fa9b0e95..5e700111 100644 --- a/src/app/core/admin/messages/manage-message/manage-message.component.ts +++ b/src/app/core/admin/messages/manage-message/manage-message.component.ts @@ -6,12 +6,10 @@ import { Router, RouterLink } from '@angular/router'; import { NgSelectModule } from '@ng-select/ng-select'; +import { SkipToDirective } from '../../../../common'; import { DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; -import { Message, MessageType } from '../../../messages/message.model'; -import { MessageService } from '../../../messages/message.service'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; +import { Message, MessageService, MessageType } from '../../../messages'; @Component({ standalone: true, diff --git a/src/app/core/admin/provider.ts b/src/app/core/admin/provider.ts index 91c7d93a..6e1c9e03 100644 --- a/src/app/core/admin/provider.ts +++ b/src/app/core/admin/provider.ts @@ -1,10 +1,20 @@ import { InjectionToken, inject, makeEnvironmentProviders } from '@angular/core'; import { ROUTES } from '@angular/router'; +import sortBy from 'lodash/sortBy'; + import { ADMIN_TOPICS } from './admin-topic.model'; export const APP_FEATURE_ADMIN = new InjectionToken('APP_FEATURE_ADMIN'); +export function injectAdminTopics() { + return sortBy((inject(ADMIN_TOPICS, { optional: true }) ?? []).flat(), [ + (t) => t.ordinal ?? 1, + 'title', + 'path' + ]); +} + export function injectAdminEnabled() { return inject(APP_FEATURE_ADMIN, { optional: true }) ?? false; } diff --git a/src/app/core/admin/public-api.ts b/src/app/core/admin/public-api.ts index 03be03e5..e624c2ae 100644 --- a/src/app/core/admin/public-api.ts +++ b/src/app/core/admin/public-api.ts @@ -1 +1,2 @@ export * from './provider'; +export * from './admin-topic.model'; diff --git a/src/app/core/admin/user/admin-users.service.ts b/src/app/core/admin/user/admin-users.service.ts index 7e6a445e..16ecffc0 100644 --- a/src/app/core/admin/user/admin-users.service.ts +++ b/src/app/core/admin/user/admin-users.service.ts @@ -5,8 +5,8 @@ import { ActivatedRouteSnapshot, ResolveFn, Router, RouterStateSnapshot } from ' import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../../common/paging.model'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../../common'; +import { SystemAlertService } from '../../../common/system-alert'; import { User } from '../../auth'; import { ErrorState } from '../../errors/error-state.model'; diff --git a/src/app/core/admin/user/list-users/admin-list-users.component.spec.ts b/src/app/core/admin/user/list-users/admin-list-users.component.spec.ts index dda4cb82..96d27d36 100644 --- a/src/app/core/admin/user/list-users/admin-list-users.component.spec.ts +++ b/src/app/core/admin/user/list-users/admin-list-users.component.spec.ts @@ -6,7 +6,7 @@ import { RouterModule } from '@angular/router'; import { of } from 'rxjs'; -import { PagingResults } from '../../../../common/paging.model'; +import { PagingResults } from '../../../../common'; import { User } from '../../../auth'; import { ExportConfigService } from '../../../export-config.service'; import { APP_CONFIG } from '../../../tokens'; diff --git a/src/app/core/admin/user/list-users/admin-list-users.component.ts b/src/app/core/admin/user/list-users/admin-list-users.component.ts index 270be02b..190ffad6 100644 --- a/src/app/core/admin/user/list-users/admin-list-users.component.ts +++ b/src/app/core/admin/user/list-users/admin-list-users.component.ts @@ -11,16 +11,20 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable, of } from 'rxjs'; import { catchError, filter, first, switchMap } from 'rxjs/operators'; -import { CdkMenuItemRouterLinkDirective } from '../../../../common/cdk-menu-item-router-link.directive'; +import { + CdkMenuItemRouterLinkDirective, + PagingOptions, + PagingResults, + SearchInputComponent, + SkipToDirective, + SortDirection +} from '../../../../common'; import { DialogAction, DialogService } from '../../../../common/dialog'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../../common/paging.model'; -import { JoinPipe } from '../../../../common/pipes/join.pipe'; -import { SearchInputComponent } from '../../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { JoinPipe } from '../../../../common/pipes'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { + ActionsMenuColumnComponent, + ActionsMenuTemplateDirective, AgoDateColumnComponent, AsyExpandableListColumnComponent, AsyFilterDirective, @@ -36,10 +40,6 @@ import { SidebarComponent, TextColumnComponent } from '../../../../common/table'; -import { - ActionsMenuColumnComponent, - ActionsMenuTemplateDirective -} from '../../../../common/table/actions-menu-column/actions-menu-column.component'; import { Role, User } from '../../../auth'; import { ExportConfigService } from '../../../export-config.service'; import { APP_CONFIG } from '../../../tokens'; diff --git a/src/app/core/admin/user/manage-user/manage-user.component.ts b/src/app/core/admin/user/manage-user/manage-user.component.ts index 4c852962..2bb92f92 100644 --- a/src/app/core/admin/user/manage-user/manage-user.component.ts +++ b/src/app/core/admin/user/manage-user/manage-user.component.ts @@ -7,10 +7,9 @@ import { Router, RouterLink } from '@angular/router'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { SkipToDirective } from '../../../../common/directives/skip-to.directive'; -import { JoinPipe } from '../../../../common/pipes/join.pipe'; -import { SystemAlertComponent } from '../../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { SkipToDirective } from '../../../../common'; +import { JoinPipe } from '../../../../common/pipes'; +import { SystemAlertComponent, SystemAlertService } from '../../../../common/system-alert'; import { EditUser, Role } from '../../../auth'; import { APP_CONFIG } from '../../../tokens'; import { AdminUsersService } from '../admin-users.service'; diff --git a/src/app/core/audit/audit-view-change-modal/audit-view-change-modal.component.ts b/src/app/core/audit/audit-view-change-modal/audit-view-change-modal.component.ts index fde4abe0..16eee3cb 100644 --- a/src/app/core/audit/audit-view-change-modal/audit-view-change-modal.component.ts +++ b/src/app/core/audit/audit-view-change-modal/audit-view-change-modal.component.ts @@ -1,9 +1,8 @@ import { JsonPipe } from '@angular/common'; import { Component } from '@angular/core'; -import { ModalComponent } from '../../../common/modal/modal/modal.component'; -import { SortObjectKeysPipe } from '../../../common/pipes/sort-object-keys.pipe'; -import { UtcDatePipe } from '../../../common/pipes/utc-date-pipe/utc-date.pipe'; +import { ModalComponent } from '../../../common'; +import { SortObjectKeysPipe, UtcDatePipe } from '../../../common/pipes'; import { AuditViewDetailsModalComponent } from '../audit-view-details-modal/audit-view-details-modal.component'; @Component({ diff --git a/src/app/core/audit/audit-view-details-modal/audit-view-details-modal.component.ts b/src/app/core/audit/audit-view-details-modal/audit-view-details-modal.component.ts index 4f657bf3..be16b891 100644 --- a/src/app/core/audit/audit-view-details-modal/audit-view-details-modal.component.ts +++ b/src/app/core/audit/audit-view-details-modal/audit-view-details-modal.component.ts @@ -2,8 +2,8 @@ import { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog'; import { JsonPipe, TitleCasePipe } from '@angular/common'; import { Component, inject } from '@angular/core'; -import { ModalComponent } from '../../../common/modal/modal/modal.component'; -import { UtcDatePipe } from '../../../common/pipes/utc-date-pipe/utc-date.pipe'; +import { ModalComponent } from '../../../common'; +import { UtcDatePipe } from '../../../common/pipes'; @Component({ templateUrl: './audit-view-details-modal.component.html', diff --git a/src/app/core/audit/audit.service.spec.ts b/src/app/core/audit/audit.service.spec.ts index dbd648f1..b9506234 100644 --- a/src/app/core/audit/audit.service.spec.ts +++ b/src/app/core/audit/audit.service.spec.ts @@ -3,8 +3,8 @@ import { TestBed, getTestBed } from '@angular/core/testing'; import _cloneDeep from 'lodash/cloneDeep'; -import { PagingOptions, PagingResults } from '../../common/paging.model'; -import { SystemAlertService } from '../../common/system-alert/system-alert.service'; +import { PagingOptions, PagingResults } from '../../common'; +import { SystemAlertService } from '../../common/system-alert'; import { User } from '../auth'; import { AuditService } from './audit.service'; diff --git a/src/app/core/audit/audit.service.ts b/src/app/core/audit/audit.service.ts index 69edbc3f..8a1aecd9 100644 --- a/src/app/core/audit/audit.service.ts +++ b/src/app/core/audit/audit.service.ts @@ -4,8 +4,8 @@ import { Injectable, inject } from '@angular/core'; import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../common/paging.model'; -import { SystemAlertService } from '../../common/system-alert/system-alert.service'; +import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../common'; +import { SystemAlertService } from '../../common/system-alert'; import { User } from '../auth'; import { AuditActionTypes } from './audit.classes'; diff --git a/src/app/core/audit/list-audit-entries/audit-actor-filter.directive.ts b/src/app/core/audit/list-audit-entries/audit-actor-filter.directive.ts index eb4d5e1e..05fbb016 100644 --- a/src/app/core/audit/list-audit-entries/audit-actor-filter.directive.ts +++ b/src/app/core/audit/list-audit-entries/audit-actor-filter.directive.ts @@ -2,7 +2,7 @@ import { Directive, OnInit, inject } from '@angular/core'; import { map } from 'rxjs/operators'; -import { PagingOptions } from '../../../common/paging.model'; +import { PagingOptions } from '../../../common'; import { AsyHeaderTypeaheadFilterComponent } from '../../../common/table'; import { AuditService } from '../audit.service'; diff --git a/src/app/core/audit/list-audit-entries/list-audit-entries.component.spec.ts b/src/app/core/audit/list-audit-entries/list-audit-entries.component.spec.ts index 26d71b4f..d588fe61 100644 --- a/src/app/core/audit/list-audit-entries/list-audit-entries.component.spec.ts +++ b/src/app/core/audit/list-audit-entries/list-audit-entries.component.spec.ts @@ -7,8 +7,8 @@ import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/t import { of } from 'rxjs'; -import { PagingResults } from '../../../common/paging.model'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { PagingResults } from '../../../common'; +import { SystemAlertService } from '../../../common/system-alert'; import { APP_CONFIG } from '../../tokens'; import { AuditService } from '../audit.service'; import { ListAuditEntriesComponent } from './list-audit-entries.component'; diff --git a/src/app/core/audit/list-audit-entries/list-audit-entries.component.ts b/src/app/core/audit/list-audit-entries/list-audit-entries.component.ts index 1d3c52d7..4c8e91e3 100644 --- a/src/app/core/audit/list-audit-entries/list-audit-entries.component.ts +++ b/src/app/core/audit/list-audit-entries/list-audit-entries.component.ts @@ -13,12 +13,10 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable } from 'rxjs'; +import { PagingOptions, PagingResults, SkipToDirective } from '../../../common'; import { DialogService } from '../../../common/dialog'; -import { SkipToDirective } from '../../../common/directives/skip-to.directive'; -import { PagingOptions, PagingResults } from '../../../common/paging.model'; -import { UtcDatePipe } from '../../../common/pipes/utc-date-pipe/utc-date.pipe'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { UtcDatePipe } from '../../../common/pipes'; +import { SystemAlertComponent, SystemAlertService } from '../../../common/system-alert'; import { AsyFilterDirective, AsyHeaderDateFilterComponent, diff --git a/src/app/core/auth/auth.guard.spec.ts b/src/app/core/auth/auth.guard.spec.ts index 775414da..a17e9141 100644 --- a/src/app/core/auth/auth.guard.spec.ts +++ b/src/app/core/auth/auth.guard.spec.ts @@ -4,11 +4,11 @@ import { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/r import { of } from 'rxjs'; -import { EndUserAgreement } from '../admin/end-user-agreement/eua.model'; import { provideSession } from '../provider'; import { APP_CONFIG } from '../tokens'; import { authGuard } from './auth.guard'; import { AuthenticationService } from './authentication.service'; +import { EndUserAgreement } from './eua.model'; import { Session } from './session.model'; import { SessionService } from './session.service'; diff --git a/src/app/core/auth/authentication.service.ts b/src/app/core/auth/authentication.service.ts index 506bf049..9f04816f 100644 --- a/src/app/core/auth/authentication.service.ts +++ b/src/app/core/auth/authentication.service.ts @@ -4,7 +4,7 @@ import { Injectable, inject } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; -import { EndUserAgreement } from '../admin/end-user-agreement/eua.model'; +import { EndUserAgreement } from './eua.model'; import { EditUser } from './user.model'; @Injectable({ providedIn: 'root' }) diff --git a/src/app/core/admin/end-user-agreement/eua.model.ts b/src/app/core/auth/eua.model.ts similarity index 100% rename from src/app/core/admin/end-user-agreement/eua.model.ts rename to src/app/core/auth/eua.model.ts diff --git a/src/app/core/auth/public-api.ts b/src/app/core/auth/public-api.ts index 87a5ba81..58e36e4f 100644 --- a/src/app/core/auth/public-api.ts +++ b/src/app/core/auth/public-api.ts @@ -4,6 +4,7 @@ export * from './session.model'; export * from './session.service'; export * from './role.model'; export * from './user.model'; +export * from './eua.model'; export * from './directives/has-every-role.directive'; export * from './directives/has-role.directive'; export * from './directives/has-some-roles.directive'; diff --git a/src/app/core/auth/session.service.ts b/src/app/core/auth/session.service.ts index 2ab07507..858aa38b 100644 --- a/src/app/core/auth/session.service.ts +++ b/src/app/core/auth/session.service.ts @@ -4,8 +4,8 @@ import { toObservable } from '@angular/core/rxjs-interop'; import { Observable, of } from 'rxjs'; import { catchError, map, tap } from 'rxjs/operators'; -import { EndUserAgreement } from '../admin/end-user-agreement/eua.model'; import { AuthenticationService } from './authentication.service'; +import { EndUserAgreement } from './eua.model'; import { Session } from './session.model'; @Injectable({ diff --git a/src/app/core/auth/user.model.ts b/src/app/core/auth/user.model.ts index ce1e7eed..a4a2465c 100644 --- a/src/app/core/auth/user.model.ts +++ b/src/app/core/auth/user.model.ts @@ -1,4 +1,4 @@ -import { EndUserAgreement } from '../admin/end-user-agreement/eua.model'; +import { EndUserAgreement } from './eua.model'; export class User { public _id: string; diff --git a/src/app/core/core-routes.ts b/src/app/core/core-routes.ts index e2614cd9..3f2bbca9 100644 --- a/src/app/core/core-routes.ts +++ b/src/app/core/core-routes.ts @@ -6,7 +6,7 @@ import { AccessComponent } from './errors/access.component'; import { ErrorComponent } from './errors/error.component'; import { UserEuaComponent } from './eua/user-eua.component'; import { MasqueradeComponent } from './masquerade/masquerade/masquerade.component'; -import { ViewAllMessagesComponent } from './messages/view-all-messages/view-all-messages.component'; +import { ViewAllMessagesComponent } from './messages'; import { SigninComponent } from './signin/signin.component'; import { SignedUpComponent } from './signup/signed-up.component'; import { SignupComponent } from './signup/signup.component'; diff --git a/src/app/core/eua/user-eua.component.ts b/src/app/core/eua/user-eua.component.ts index 7525b775..9beab624 100644 --- a/src/app/core/eua/user-eua.component.ts +++ b/src/app/core/eua/user-eua.component.ts @@ -14,10 +14,8 @@ import { FormsModule } from '@angular/forms'; import { Observable } from 'rxjs'; -import { SystemAlertComponent } from '../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../common/system-alert/system-alert.service'; -import { EndUserAgreement } from '../admin/end-user-agreement/eua.model'; -import { SessionService } from '../auth'; +import { SystemAlertComponent, SystemAlertService } from '../../common/system-alert'; +import { EndUserAgreement, SessionService } from '../auth'; import { NavigationService } from '../navigation.service'; import { APP_SESSION } from '../tokens'; diff --git a/src/app/core/feedback/feedback-flyout/feedback-flyout.component.ts b/src/app/core/feedback/feedback-flyout/feedback-flyout.component.ts index 6cf6fa3b..34a9ec57 100644 --- a/src/app/core/feedback/feedback-flyout/feedback-flyout.component.ts +++ b/src/app/core/feedback/feedback-flyout/feedback-flyout.component.ts @@ -14,7 +14,7 @@ import { Router } from '@angular/router'; import { NgSelectModule } from '@ng-select/ng-select'; -import { FlyoutComponent } from '../../../common/flyout/flyout.component'; +import { FlyoutComponent } from '../../../common'; import { APP_CONFIG } from '../../tokens'; import { Feedback } from '../feedback.model'; import { FeedbackService } from '../feedback.service'; diff --git a/src/app/core/feedback/feedback-modal/feedback-modal.component.ts b/src/app/core/feedback/feedback-modal/feedback-modal.component.ts index 20a3a550..fcdd4980 100644 --- a/src/app/core/feedback/feedback-modal/feedback-modal.component.ts +++ b/src/app/core/feedback/feedback-modal/feedback-modal.component.ts @@ -14,7 +14,7 @@ import { Router } from '@angular/router'; import { NgSelectModule } from '@ng-select/ng-select'; -import { ModalComponent } from '../../../common/modal/modal/modal.component'; +import { ModalComponent } from '../../../common'; import { APP_CONFIG } from '../../tokens'; import { Feedback } from '../feedback.model'; import { FeedbackService } from '../feedback.service'; diff --git a/src/app/core/feedback/feedback.service.ts b/src/app/core/feedback/feedback.service.ts index 6cf575a6..2a311948 100644 --- a/src/app/core/feedback/feedback.service.ts +++ b/src/app/core/feedback/feedback.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { AbstractEntityService, ServiceMethod } from '../../common/abstract-entity.service'; +import { AbstractEntityService, ServiceMethod } from '../../common'; import { Feedback, FeedbackStatusOption } from './feedback.model'; @Injectable({ diff --git a/src/app/core/feedback/index.ts b/src/app/core/feedback/index.ts new file mode 100644 index 00000000..7e1a213e --- /dev/null +++ b/src/app/core/feedback/index.ts @@ -0,0 +1 @@ +export * from './public-api'; diff --git a/src/app/core/feedback/public-api.ts b/src/app/core/feedback/public-api.ts new file mode 100644 index 00000000..613b6894 --- /dev/null +++ b/src/app/core/feedback/public-api.ts @@ -0,0 +1,4 @@ +export * from './feedback-flyout/feedback-flyout.component'; +export * from './feedback-modal/feedback-modal.component'; +export * from './feedback.model'; +export * from './feedback.service'; diff --git a/src/app/core/masquerade/masquerade.service.ts b/src/app/core/masquerade/masquerade.service.ts index afb11cf8..37bc5e1a 100644 --- a/src/app/core/masquerade/masquerade.service.ts +++ b/src/app/core/masquerade/masquerade.service.ts @@ -4,7 +4,7 @@ import { Injectable, inject } from '@angular/core'; import { Observable, of } from 'rxjs'; import { catchError, tap } from 'rxjs/operators'; -import { NULL_PAGING_RESULTS, PagingResults } from '../../common/paging.model'; +import { NULL_PAGING_RESULTS, PagingResults } from '../../common'; import { LocalStorageService } from '../../common/storage/local-storage.service'; import { User } from '../auth'; diff --git a/src/app/core/masquerade/masquerade/masquerade.component.ts b/src/app/core/masquerade/masquerade/masquerade.component.ts index 15e306f5..0ebed6e8 100644 --- a/src/app/core/masquerade/masquerade/masquerade.component.ts +++ b/src/app/core/masquerade/masquerade/masquerade.component.ts @@ -13,7 +13,7 @@ import { tap } from 'rxjs/operators'; -import { LoadingSpinnerComponent } from '../../../common/loading-spinner/loading-spinner.component'; +import { LoadingSpinnerComponent } from '../../../common'; import { User } from '../../auth'; import { APP_SESSION } from '../../tokens'; import { MasqueradeService } from '../masquerade.service'; diff --git a/src/app/core/messages/index.ts b/src/app/core/messages/index.ts new file mode 100644 index 00000000..7e1a213e --- /dev/null +++ b/src/app/core/messages/index.ts @@ -0,0 +1 @@ +export * from './public-api'; diff --git a/src/app/core/messages/message.service.ts b/src/app/core/messages/message.service.ts index b1d9686e..c1a00037 100644 --- a/src/app/core/messages/message.service.ts +++ b/src/app/core/messages/message.service.ts @@ -5,8 +5,7 @@ import { ActivatedRouteSnapshot, ResolveFn, Router, RouterStateSnapshot } from ' import { Observable, take } from 'rxjs'; import { catchError, filter, map } from 'rxjs/operators'; -import { AbstractEntityService, ServiceMethod } from '../../common/abstract-entity.service'; -import { isNotNullOrUndefined } from '../../common/rxjs-utils'; +import { AbstractEntityService, ServiceMethod, isNotNullOrUndefined } from '../../common'; import { SocketService } from '../socket.service'; import { APP_SESSION } from '../tokens'; import { Message } from './message.model'; diff --git a/src/app/core/messages/public-api.ts b/src/app/core/messages/public-api.ts new file mode 100644 index 00000000..730f4de3 --- /dev/null +++ b/src/app/core/messages/public-api.ts @@ -0,0 +1,4 @@ +export * from './recent-messages/recent-messages.component'; +export * from './view-all-messages/view-all-messages.component'; +export * from './message.model'; +export * from './message.service'; diff --git a/src/app/core/messages/view-all-messages/view-all-messages.component.spec.ts b/src/app/core/messages/view-all-messages/view-all-messages.component.spec.ts index 728396a4..bc79cf90 100644 --- a/src/app/core/messages/view-all-messages/view-all-messages.component.spec.ts +++ b/src/app/core/messages/view-all-messages/view-all-messages.component.spec.ts @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Subject, of } from 'rxjs'; -import { PagingResults } from '../../../common/paging.model'; +import { PagingResults } from '../../../common'; import { Message, MessageType } from '../message.model'; import { MessageService } from '../message.service'; import { ViewAllMessagesComponent } from './view-all-messages.component'; diff --git a/src/app/core/messages/view-all-messages/view-all-messages.component.ts b/src/app/core/messages/view-all-messages/view-all-messages.component.ts index c178322a..c0144524 100644 --- a/src/app/core/messages/view-all-messages/view-all-messages.component.ts +++ b/src/app/core/messages/view-all-messages/view-all-messages.component.ts @@ -12,11 +12,9 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { WINDOW } from '@ng-web-apis/common'; -import { PagingOptions, PagingResults } from '../../../common/paging.model'; -import { AgoDatePipe } from '../../../common/pipes/ago-date.pipe'; -import { SearchInputComponent } from '../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../common/sorting.model'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; +import { PagingOptions, PagingResults, SearchInputComponent, SortDirection } from '../../../common'; +import { AgoDatePipe } from '../../../common/pipes'; +import { SystemAlertComponent } from '../../../common/system-alert'; import { Message, MessageType } from '../message.model'; import { MessageService } from '../message.service'; diff --git a/src/app/core/public-api.ts b/src/app/core/public-api.ts index b068dec2..5f9846c3 100644 --- a/src/app/core/public-api.ts +++ b/src/app/core/public-api.ts @@ -6,5 +6,4 @@ export * from './export-config.service'; export * from './tokens'; export * from './site-navbar/navbar-topic.model'; export * from './errors/error-state.model'; -export * from './admin/admin-topic.model'; export * from './audit/audit.classes'; diff --git a/src/app/core/signin/signin.component.ts b/src/app/core/signin/signin.component.ts index 0f56be9f..5d9f4007 100644 --- a/src/app/core/signin/signin.component.ts +++ b/src/app/core/signin/signin.component.ts @@ -11,7 +11,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormsModule } from '@angular/forms'; import { RouterLink } from '@angular/router'; -import { LoadingSpinnerComponent } from '../../common/loading-spinner/loading-spinner.component'; +import { LoadingSpinnerComponent } from '../../common'; import { SessionService } from '../auth'; import { NavigationService } from '../navigation.service'; import { APP_CONFIG } from '../tokens'; diff --git a/src/app/core/signup/signup.component.ts b/src/app/core/signup/signup.component.ts index 830d8a95..e03efd9f 100644 --- a/src/app/core/signup/signup.component.ts +++ b/src/app/core/signup/signup.component.ts @@ -7,8 +7,7 @@ import { Router, RouterLink } from '@angular/router'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { SystemAlertComponent } from '../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../common/system-alert/system-alert.service'; +import { SystemAlertComponent, SystemAlertService } from '../../common/system-alert'; import { AuthenticationService, EditUser } from '../auth'; @Component({ diff --git a/src/app/core/site-container/site-container.component.ts b/src/app/core/site-container/site-container.component.ts index 29e8736e..248997d4 100644 --- a/src/app/core/site-container/site-container.component.ts +++ b/src/app/core/site-container/site-container.component.ts @@ -2,7 +2,7 @@ import { CdkScrollable } from '@angular/cdk/overlay'; import { Component, computed, inject } from '@angular/core'; import { IsAuthenticatedDirective } from '../auth'; -import { FeedbackFlyoutComponent } from '../feedback/feedback-flyout/feedback-flyout.component'; +import { FeedbackFlyoutComponent } from '../feedback'; import { SiteNavbarComponent } from '../site-navbar/site-navbar.component'; import { APP_CONFIG, APP_SESSION } from '../tokens'; diff --git a/src/app/core/site-navbar/navbar-topic.model.ts b/src/app/core/site-navbar/navbar-topic.model.ts index 98d46257..70f5cd26 100644 --- a/src/app/core/site-navbar/navbar-topic.model.ts +++ b/src/app/core/site-navbar/navbar-topic.model.ts @@ -2,7 +2,7 @@ import { InjectionToken, inject } from '@angular/core'; import sortBy from 'lodash/sortBy'; -import { Topic } from '../../common/topic.model'; +import { Topic } from '../../common'; export interface NavbarTopic extends Topic { iconClass: string; diff --git a/src/app/core/site-navbar/site-navbar.component.spec.ts b/src/app/core/site-navbar/site-navbar.component.spec.ts index 33dff2ea..2b7730f7 100644 --- a/src/app/core/site-navbar/site-navbar.component.spec.ts +++ b/src/app/core/site-navbar/site-navbar.component.spec.ts @@ -11,7 +11,7 @@ import { of } from 'rxjs'; import { Session } from '../auth'; import { Config } from '../config.model'; import { MasqueradeService } from '../masquerade/masquerade.service'; -import { MessageService } from '../messages/message.service'; +import { MessageService } from '../messages'; import { APP_CONFIG, APP_SESSION } from '../tokens'; import { SiteNavbarComponent } from './site-navbar.component'; diff --git a/src/app/core/site-navbar/site-navbar.component.ts b/src/app/core/site-navbar/site-navbar.component.ts index 8fdc71e7..28de56d3 100644 --- a/src/app/core/site-navbar/site-navbar.component.ts +++ b/src/app/core/site-navbar/site-navbar.component.ts @@ -11,19 +11,19 @@ import { STORAGE_EVENT, StorageService, filterByKey, toValue } from '@ng-web-api import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { map } from 'rxjs/operators'; -import { CdkMenuItemHrefDirective } from '../../common/cdk-menu-item-href.directive'; -import { CdkMenuItemRouterLinkDirective } from '../../common/cdk-menu-item-router-link.directive'; +import { + CdkMenuItemHrefDirective, + CdkMenuItemRouterLinkDirective, + LinkAccessibilityDirective +} from '../../common'; import { DialogService } from '../../common/dialog'; -import { LinkAccessibilityDirective } from '../../common/directives/link-accessibility.directive'; -import { injectAdminEnabled } from '../admin'; -import { injectAdminTopics } from '../admin/admin-topic.model'; +import { injectAdminEnabled, injectAdminTopics } from '../admin'; import { injectAuditEnabled } from '../audit'; import { HasRoleDirective, HasSomeRolesDirective, IsAuthenticatedDirective } from '../auth'; -import { FeedbackModalComponent } from '../feedback/feedback-modal/feedback-modal.component'; +import { FeedbackModalComponent } from '../feedback'; import { injectHelpEnabled } from '../help'; import { MasqueradeService } from '../masquerade/masquerade.service'; -import { MessageService } from '../messages/message.service'; -import { RecentMessagesComponent } from '../messages/recent-messages/recent-messages.component'; +import { MessageService, RecentMessagesComponent } from '../messages'; import { injectTeamsEnabled } from '../teams/provider'; import { ThemeToggleComponent } from '../theming/theme-toggle/theme-toggle.component'; import { APP_CONFIG, APP_SESSION } from '../tokens'; diff --git a/src/app/core/teams/add-members-modal/add-members-modal.component.ts b/src/app/core/teams/add-members-modal/add-members-modal.component.ts index f6693f04..a99fb8b7 100644 --- a/src/app/core/teams/add-members-modal/add-members-modal.component.ts +++ b/src/app/core/teams/add-members-modal/add-members-modal.component.ts @@ -17,9 +17,8 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'; +import { ModalComponent, PagingOptions } from '../../../common'; import { DialogAction, DialogReturn } from '../../../common/dialog'; -import { ModalComponent } from '../../../common/modal/modal/modal.component'; -import { PagingOptions } from '../../../common/paging.model'; import { User } from '../../auth'; import { TeamRole } from '../team-role.model'; import { AddedMember, TeamsService } from '../teams.service'; diff --git a/src/app/core/teams/create-team/create-team.component.ts b/src/app/core/teams/create-team/create-team.component.ts index 99051c5b..15cfbde4 100644 --- a/src/app/core/teams/create-team/create-team.component.ts +++ b/src/app/core/teams/create-team/create-team.component.ts @@ -8,11 +8,8 @@ import { NgSelectModule } from '@ng-select/ng-select'; import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged, filter, map, switchMap, tap } from 'rxjs/operators'; -import { SkipToDirective } from '../../../common/directives/skip-to.directive'; -import { MultiSelectDirective } from '../../../common/multi-select.directive'; -import { PagingOptions } from '../../../common/paging.model'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { MultiSelectDirective, PagingOptions, SkipToDirective } from '../../../common'; +import { SystemAlertComponent, SystemAlertService } from '../../../common/system-alert'; import { SessionService, User, UserExternalRolesSelectDirective } from '../../auth'; import { APP_CONFIG, APP_SESSION } from '../../tokens'; import { TeamSelectDirective } from '../directives/team-select.directive'; diff --git a/src/app/core/teams/list-team-members/list-team-members.component.ts b/src/app/core/teams/list-team-members/list-team-members.component.ts index 5a85fd85..a999f894 100644 --- a/src/app/core/teams/list-team-members/list-team-members.component.ts +++ b/src/app/core/teams/list-team-members/list-team-members.component.ts @@ -17,19 +17,21 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip'; import { Observable, of } from 'rxjs'; import { catchError, filter, first, switchMap } from 'rxjs/operators'; +import { + PagingOptions, + PagingResults, + SearchInputComponent, + SortDirection, + isNotNullOrUndefined +} from '../../../common'; import { DialogAction, DialogService, isDialogActionOK, mapToDialogReturnData } from '../../../common/dialog'; -import { PagingOptions, PagingResults } from '../../../common/paging.model'; -import { AgoDatePipe } from '../../../common/pipes/ago-date.pipe'; -import { UtcDatePipe } from '../../../common/pipes/utc-date-pipe/utc-date.pipe'; -import { isNotNullOrUndefined } from '../../../common/rxjs-utils'; -import { SearchInputComponent } from '../../../common/search-input/search-input.component'; -import { SortDirection } from '../../../common/sorting.model'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { AgoDatePipe, UtcDatePipe } from '../../../common/pipes'; +import { SystemAlertService } from '../../../common/system-alert'; import { AgoDateColumnComponent, AsyFilterDirective, diff --git a/src/app/core/teams/list-teams/base-list-teams.component.ts b/src/app/core/teams/list-teams/base-list-teams.component.ts index 2955ab87..1e37a8be 100644 --- a/src/app/core/teams/list-teams/base-list-teams.component.ts +++ b/src/app/core/teams/list-teams/base-list-teams.component.ts @@ -10,8 +10,8 @@ import { import cloneDeep from 'lodash/cloneDeep'; import { Observable } from 'rxjs'; -import { PagingOptions, PagingResults } from '../../../common/paging.model'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { PagingOptions, PagingResults } from '../../../common'; +import { SystemAlertService } from '../../../common/system-alert'; import { AsyTableDataSource } from '../../../common/table'; import { APP_SESSION } from '../../tokens'; import { Team } from '../team.model'; diff --git a/src/app/core/teams/list-teams/list-sub-teams.component.ts b/src/app/core/teams/list-teams/list-sub-teams.component.ts index 94bb035b..f4fec602 100644 --- a/src/app/core/teams/list-teams/list-sub-teams.component.ts +++ b/src/app/core/teams/list-teams/list-sub-teams.component.ts @@ -6,9 +6,8 @@ import { RouterLink } from '@angular/router'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { SkipToDirective } from '../../../common/directives/skip-to.directive'; -import { SearchInputComponent } from '../../../common/search-input/search-input.component'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; +import { SearchInputComponent, SkipToDirective } from '../../../common'; +import { SystemAlertComponent } from '../../../common/system-alert'; import { AgoDateColumnComponent, AsyFilterDirective, diff --git a/src/app/core/teams/list-teams/list-teams.component.ts b/src/app/core/teams/list-teams/list-teams.component.ts index f4de30a7..6fe48e13 100644 --- a/src/app/core/teams/list-teams/list-teams.component.ts +++ b/src/app/core/teams/list-teams/list-teams.component.ts @@ -4,9 +4,8 @@ import { RouterLink } from '@angular/router'; import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { SkipToDirective } from '../../../common/directives/skip-to.directive'; -import { SearchInputComponent } from '../../../common/search-input/search-input.component'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; +import { SearchInputComponent, SkipToDirective } from '../../../common'; +import { SystemAlertComponent } from '../../../common/system-alert'; import { AgoDateColumnComponent, AsyFilterDirective, diff --git a/src/app/core/teams/provider.ts b/src/app/core/teams/provider.ts index 32e776d9..9cb62cdf 100644 --- a/src/app/core/teams/provider.ts +++ b/src/app/core/teams/provider.ts @@ -1,7 +1,7 @@ import { InjectionToken, inject, makeEnvironmentProviders } from '@angular/core'; import { ROUTES, Routes } from '@angular/router'; -import { Topic } from '../../common/topic.model'; +import { Topic } from '../../common'; import { TEAM_TOPICS } from './team-topic.model'; export type AdditionalTeamsRoutes = { diff --git a/src/app/core/teams/team-topic.model.ts b/src/app/core/teams/team-topic.model.ts index 73b80a5d..b2fa4d2e 100644 --- a/src/app/core/teams/team-topic.model.ts +++ b/src/app/core/teams/team-topic.model.ts @@ -2,7 +2,7 @@ import { InjectionToken, inject } from '@angular/core'; import sortBy from 'lodash/sortBy'; -import { Topic } from '../../common/topic.model'; +import { Topic } from '../../common'; export const TEAM_TOPICS = new InjectionToken('TEAM_TOPIC'); diff --git a/src/app/core/teams/teams.service.ts b/src/app/core/teams/teams.service.ts index db3d36bd..de29c3dd 100644 --- a/src/app/core/teams/teams.service.ts +++ b/src/app/core/teams/teams.service.ts @@ -5,8 +5,13 @@ import { ActivatedRouteSnapshot, ResolveFn, Router, RouterStateSnapshot } from ' import { Observable, of } from 'rxjs'; import { catchError, map, tap } from 'rxjs/operators'; -import { AbstractEntityService, ServiceMethod } from '../../common/abstract-entity.service'; -import { NULL_PAGING_RESULTS, PagingOptions, PagingResults } from '../../common/paging.model'; +import { + AbstractEntityService, + NULL_PAGING_RESULTS, + PagingOptions, + PagingResults, + ServiceMethod +} from '../../common'; import { User } from '../auth'; import { APP_SESSION } from '../tokens'; import { TeamMember } from './team-member.model'; diff --git a/src/app/core/teams/view-team/general-details/general-details.component.ts b/src/app/core/teams/view-team/general-details/general-details.component.ts index d16e3d1f..e0b7b6cf 100644 --- a/src/app/core/teams/view-team/general-details/general-details.component.ts +++ b/src/app/core/teams/view-team/general-details/general-details.component.ts @@ -15,10 +15,9 @@ import { RouterLink } from '@angular/router'; import { NgSelectModule } from '@ng-select/ng-select'; import { switchMap, tap } from 'rxjs/operators'; -import { MultiSelectDirective } from '../../../../common/multi-select.directive'; -import { JoinPipe } from '../../../../common/pipes/join.pipe'; -import { UtcDatePipe } from '../../../../common/pipes/utc-date-pipe/utc-date.pipe'; -import { SystemAlertService } from '../../../../common/system-alert/system-alert.service'; +import { MultiSelectDirective } from '../../../../common'; +import { JoinPipe, UtcDatePipe } from '../../../../common/pipes'; +import { SystemAlertService } from '../../../../common/system-alert'; import { SessionService, UserExternalRolesSelectDirective } from '../../../auth'; import { APP_CONFIG, APP_SESSION } from '../../../tokens'; import { HasTeamRoleDirective } from '../../directives/has-team-role.directive'; diff --git a/src/app/core/teams/view-team/view-team.component.ts b/src/app/core/teams/view-team/view-team.component.ts index 84cd06ea..ed70f0d3 100644 --- a/src/app/core/teams/view-team/view-team.component.ts +++ b/src/app/core/teams/view-team/view-team.component.ts @@ -12,7 +12,7 @@ import { Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/rou import { filter, first, map, switchMap } from 'rxjs/operators'; import { DialogAction, DialogService } from '../../../common/dialog'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; +import { SystemAlertComponent } from '../../../common/system-alert'; import { SessionService } from '../../auth'; import { APP_SESSION } from '../../tokens'; import { HasTeamRoleDirective } from '../directives/has-team-role.directive'; diff --git a/src/app/core/theming/theme-toggle/theme-toggle.component.ts b/src/app/core/theming/theme-toggle/theme-toggle.component.ts index 09aec3da..409b2e08 100644 --- a/src/app/core/theming/theme-toggle/theme-toggle.component.ts +++ b/src/app/core/theming/theme-toggle/theme-toggle.component.ts @@ -2,7 +2,7 @@ import { CdkMenu, CdkMenuItem, CdkMenuTrigger } from '@angular/cdk/menu'; import { CdkTableModule } from '@angular/cdk/table'; import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { CdkMenuItemRouterLinkDirective } from '../../../common/cdk-menu-item-router-link.directive'; +import { CdkMenuItemRouterLinkDirective } from '../../../common'; import { Theme, ThemingService } from '../theming.service'; @Component({ diff --git a/src/app/site/example/alerts/alerts.component.ts b/src/app/site/example/alerts/alerts.component.ts index fe9e23e4..5f0368c2 100644 --- a/src/app/site/example/alerts/alerts.component.ts +++ b/src/app/site/example/alerts/alerts.component.ts @@ -4,8 +4,7 @@ import { FormsModule } from '@angular/forms'; import { NgSelectModule } from '@ng-select/ng-select'; -import { SystemAlertComponent } from '../../../common/system-alert/system-alert.component'; -import { SystemAlertService } from '../../../common/system-alert/system-alert.service'; +import { SystemAlertComponent, SystemAlertService } from '../../../common/system-alert'; @Component({ templateUrl: './alerts.component.html', diff --git a/src/app/site/example/loading-overlay/example-loading-overlay.component.ts b/src/app/site/example/loading-overlay/example-loading-overlay.component.ts index a7e2bc9d..3fc2de33 100644 --- a/src/app/site/example/loading-overlay/example-loading-overlay.component.ts +++ b/src/app/site/example/loading-overlay/example-loading-overlay.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { LoadingOverlayComponent } from '../../../common/loading-overlay/loading-overlay.component'; +import { LoadingOverlayComponent } from '../../../common'; @Component({ templateUrl: './example-loading-overlay.component.html', diff --git a/src/app/site/example/provider.ts b/src/app/site/example/provider.ts index 4aa70ee1..ccf7fae2 100644 --- a/src/app/site/example/provider.ts +++ b/src/app/site/example/provider.ts @@ -1,7 +1,8 @@ import { makeEnvironmentProviders } from '@angular/core'; import { ROUTES } from '@angular/router'; -import { ADMIN_TOPICS, NAVBAR_TOPICS } from '../../core'; +import { NAVBAR_TOPICS } from '../../core'; +import { ADMIN_TOPICS } from '../../core/admin'; import { EXAMPLE_ROUTES } from './example-routes'; export function provideExampleSiteFeature() {