Enhancement: angular 19 (#8584)

This commit is contained in:
shamoon
2025-01-01 22:26:53 -08:00
committed by GitHub
parent 75de53eb83
commit f89b6281da
209 changed files with 6147 additions and 4098 deletions

View File

@@ -6,22 +6,15 @@ import {
} from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { By } from '@angular/platform-browser'
import { ActivatedRoute, Router, convertToParamMap } from '@angular/router'
import { RouterTestingModule } from '@angular/router/testing'
import {
NgbDatepickerModule,
NgbDropdown,
NgbDropdownItem,
NgbDropdownModule,
NgbModal,
NgbModalRef,
NgbPopoverModule,
NgbTooltipModule,
NgbTypeaheadModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgSelectModule } from '@ng-select/ng-select'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { Subject, of, throwError } from 'rxjs'
import { routes } from 'src/app/app-routing.module'
@@ -38,13 +31,11 @@ import {
} from 'src/app/data/filter-rule-type'
import { SavedView } from 'src/app/data/saved-view'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
import { SortableDirective } from 'src/app/directives/sortable.directive'
import { PermissionsGuard } from 'src/app/guards/permissions.guard'
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
import { FilterPipe } from 'src/app/pipes/filter.pipe'
import { IsNumberPipe } from 'src/app/pipes/is-number.pipe'
import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe'
import { UsernamePipe } from 'src/app/pipes/username.pipe'
import {
@@ -57,22 +48,9 @@ import { DocumentService } from 'src/app/services/rest/document.service'
import { SavedViewService } from 'src/app/services/rest/saved-view.service'
import { SettingsService } from 'src/app/services/settings.service'
import { ToastService } from 'src/app/services/toast.service'
import { ClearableBadgeComponent } from '../common/clearable-badge/clearable-badge.component'
import { ConfirmDialogComponent } from '../common/confirm-dialog/confirm-dialog.component'
import { DatesDropdownComponent } from '../common/dates-dropdown/dates-dropdown.component'
import { FilterableDropdownComponent } from '../common/filterable-dropdown/filterable-dropdown.component'
import { ToggleableDropdownButtonComponent } from '../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component'
import { CheckComponent } from '../common/input/check/check.component'
import { TextComponent } from '../common/input/text/text.component'
import { PageHeaderComponent } from '../common/page-header/page-header.component'
import { PermissionsFilterDropdownComponent } from '../common/permissions-filter-dropdown/permissions-filter-dropdown.component'
import { PreviewPopupComponent } from '../common/preview-popup/preview-popup.component'
import { BulkEditorComponent } from './bulk-editor/bulk-editor.component'
import { DocumentCardLargeComponent } from './document-card-large/document-card-large.component'
import { DocumentCardSmallComponent } from './document-card-small/document-card-small.component'
import { DocumentListComponent } from './document-list.component'
import { FilterEditorComponent } from './filter-editor/filter-editor.component'
import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component'
const docs: Document[] = [
{
@@ -114,43 +92,10 @@ describe('DocumentListComponent', () => {
beforeEach(async () => {
TestBed.configureTestingModule({
declarations: [
DocumentListComponent,
PageHeaderComponent,
FilterEditorComponent,
FilterableDropdownComponent,
DatesDropdownComponent,
PermissionsFilterDropdownComponent,
ToggleableDropdownButtonComponent,
BulkEditorComponent,
ClearableBadgeComponent,
DocumentCardSmallComponent,
DocumentCardLargeComponent,
ConfirmDialogComponent,
SaveViewConfigDialogComponent,
TextComponent,
CheckComponent,
IfPermissionsDirective,
FilterPipe,
CustomDatePipe,
SortableDirective,
DocumentTitlePipe,
UsernamePipe,
SafeHtmlPipe,
IsNumberPipe,
PreviewPopupComponent,
],
imports: [
RouterTestingModule.withRoutes(routes),
FormsModule,
ReactiveFormsModule,
NgbDropdownModule,
NgbDatepickerModule,
NgbPopoverModule,
NgbTooltipModule,
NgxBootstrapIconsModule.pick(allIcons),
NgSelectModule,
NgbTypeaheadModule,
DocumentListComponent,
],
providers: [
FilterPipe,