mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Update to Angular 13
This commit is contained in:
		
							
								
								
									
										1
									
								
								src-ui/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								src-ui/.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -32,6 +32,7 @@ speed-measure-plugin*.json
 | 
				
			|||||||
.history/*
 | 
					.history/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# misc
 | 
					# misc
 | 
				
			||||||
 | 
					/.angular/cache
 | 
				
			||||||
/.sass-cache
 | 
					/.sass-cache
 | 
				
			||||||
/connect.lock
 | 
					/connect.lock
 | 
				
			||||||
/coverage
 | 
					/coverage
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -139,19 +139,6 @@
 | 
				
			|||||||
						"scripts": []
 | 
											"scripts": []
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				"lint": {
 | 
					 | 
				
			||||||
					"builder": "@angular-devkit/build-angular:tslint",
 | 
					 | 
				
			||||||
					"options": {
 | 
					 | 
				
			||||||
						"tsConfig": [
 | 
					 | 
				
			||||||
							"tsconfig.app.json",
 | 
					 | 
				
			||||||
							"tsconfig.spec.json",
 | 
					 | 
				
			||||||
							"e2e/tsconfig.json"
 | 
					 | 
				
			||||||
						],
 | 
					 | 
				
			||||||
						"exclude": [
 | 
					 | 
				
			||||||
							"**/node_modules/**"
 | 
					 | 
				
			||||||
						]
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				},
 | 
					 | 
				
			||||||
				"e2e": {
 | 
									"e2e": {
 | 
				
			||||||
					"builder": "@angular-devkit/build-angular:protractor",
 | 
										"builder": "@angular-devkit/build-angular:protractor",
 | 
				
			||||||
					"options": {
 | 
										"options": {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13681
									
								
								src-ui/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										13681
									
								
								src-ui/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -11,15 +11,15 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@angular/animations": "~12.2.16",
 | 
					    "@angular/animations": "~13.2.2",
 | 
				
			||||||
    "@angular/common": "~12.2.16",
 | 
					    "@angular/common": "~13.2.2",
 | 
				
			||||||
    "@angular/compiler": "~12.2.16",
 | 
					    "@angular/compiler": "~13.2.2",
 | 
				
			||||||
    "@angular/core": "~12.2.16",
 | 
					    "@angular/core": "~13.2.2",
 | 
				
			||||||
    "@angular/forms": "~12.2.16",
 | 
					    "@angular/forms": "~13.2.2",
 | 
				
			||||||
    "@angular/localize": "~12.2.16",
 | 
					    "@angular/localize": "~13.2.2",
 | 
				
			||||||
    "@angular/platform-browser": "~12.2.16",
 | 
					    "@angular/platform-browser": "~13.2.2",
 | 
				
			||||||
    "@angular/platform-browser-dynamic": "~12.2.16",
 | 
					    "@angular/platform-browser-dynamic": "~13.2.2",
 | 
				
			||||||
    "@angular/router": "~12.2.16",
 | 
					    "@angular/router": "~13.2.2",
 | 
				
			||||||
    "@ng-bootstrap/ng-bootstrap": "^9.1.2",
 | 
					    "@ng-bootstrap/ng-bootstrap": "^9.1.2",
 | 
				
			||||||
    "@ng-select/ng-select": "^7.0.0",
 | 
					    "@ng-select/ng-select": "^7.0.0",
 | 
				
			||||||
    "@ngneat/dirty-check-forms": "^1.1.0",
 | 
					    "@ngneat/dirty-check-forms": "^1.1.0",
 | 
				
			||||||
@@ -37,9 +37,9 @@
 | 
				
			|||||||
    "zone.js": "~0.11.4"
 | 
					    "zone.js": "~0.11.4"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@angular-devkit/build-angular": "~12.2.16",
 | 
					    "@angular-devkit/build-angular": "~13.2.3",
 | 
				
			||||||
    "@angular/cli": "~12.2.16",
 | 
					    "@angular/cli": "~13.2.3",
 | 
				
			||||||
    "@angular/compiler-cli": "~12.2.16",
 | 
					    "@angular/compiler-cli": "~13.2.2",
 | 
				
			||||||
    "@types/jasmine": "~3.6.0",
 | 
					    "@types/jasmine": "~3.6.0",
 | 
				
			||||||
    "@types/jasminewd2": "~2.0.3",
 | 
					    "@types/jasminewd2": "~2.0.3",
 | 
				
			||||||
    "@types/node": "^12.11.1",
 | 
					    "@types/node": "^12.11.1",
 | 
				
			||||||
@@ -54,6 +54,6 @@
 | 
				
			|||||||
    "protractor": "~7.0.0",
 | 
					    "protractor": "~7.0.0",
 | 
				
			||||||
    "ts-node": "~8.3.0",
 | 
					    "ts-node": "~8.3.0",
 | 
				
			||||||
    "tslint": "~6.1.0",
 | 
					    "tslint": "~6.1.0",
 | 
				
			||||||
    "typescript": "~4.3.5"
 | 
					    "typescript": "~4.5.5"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -100,7 +100,7 @@
 | 
				
			|||||||
            </a>
 | 
					            </a>
 | 
				
			||||||
          </li>
 | 
					          </li>
 | 
				
			||||||
          <li class="nav-item w-100" *ngIf="openDocuments.length >= 1">
 | 
					          <li class="nav-item w-100" *ngIf="openDocuments.length >= 1">
 | 
				
			||||||
            <a class="nav-link text-truncate" [routerLink]="" (click)="closeAll()">
 | 
					            <a class="nav-link text-truncate" [routerLink]="[]" (click)="closeAll()">
 | 
				
			||||||
              <svg class="sidebaricon" fill="currentColor">
 | 
					              <svg class="sidebaricon" fill="currentColor">
 | 
				
			||||||
                <use xlink:href="assets/bootstrap-icons.svg#x"/>
 | 
					                <use xlink:href="assets/bootstrap-icons.svg#x"/>
 | 
				
			||||||
              </svg> <ng-container i18n>Close all</ng-container>
 | 
					              </svg> <ng-container i18n>Close all</ng-container>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,7 @@
 | 
				
			|||||||
  <small *ngIf="getSuggestions().length > 0">
 | 
					  <small *ngIf="getSuggestions().length > 0">
 | 
				
			||||||
    <span i18n>Suggestions:</span> 
 | 
					    <span i18n>Suggestions:</span> 
 | 
				
			||||||
    <ng-container *ngFor="let s of getSuggestions()">
 | 
					    <ng-container *ngFor="let s of getSuggestions()">
 | 
				
			||||||
      <a (click)="value = s.id; onChange(value)" [routerLink]="">{{s.name}}</a> 
 | 
					      <a (click)="value = s.id; onChange(value)" [routerLink]="[]">{{s.name}}</a> 
 | 
				
			||||||
    </ng-container>
 | 
					    </ng-container>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,7 +43,7 @@
 | 
				
			|||||||
  <small *ngIf="getSuggestions().length > 0">
 | 
					  <small *ngIf="getSuggestions().length > 0">
 | 
				
			||||||
    <span i18n>Suggestions:</span> 
 | 
					    <span i18n>Suggestions:</span> 
 | 
				
			||||||
    <ng-container *ngFor="let tag of getSuggestions()">
 | 
					    <ng-container *ngFor="let tag of getSuggestions()">
 | 
				
			||||||
      <a (click)="addTag(tag.id)" [routerLink]="">{{tag.name}}</a> 
 | 
					      <a (click)="addTag(tag.id)" [routerLink]="[]">{{tag.name}}</a> 
 | 
				
			||||||
    </ng-container>
 | 
					    </ng-container>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,2 +1,2 @@
 | 
				
			|||||||
<span *ngIf="!clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span>
 | 
					<span *ngIf="!clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span>
 | 
				
			||||||
<a [routerLink]="" [title]="linkTitle" *ngIf="clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</a>
 | 
					<a [routerLink]="[][]" [title]="linkTitle" *ngIf="clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</a>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<app-widget-frame [title]="savedView.name">
 | 
					<app-widget-frame [title]="savedView.name">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <a header-buttons [routerLink]="" (click)="showAll()" i18n>Show all</a>
 | 
					  <a header-buttons [routerLink]="[]" (click)="showAll()" i18n>Show all</a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <table content class="table table-sm table-hover table-borderless">
 | 
					  <table content class="table table-sm table-hover table-borderless">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<app-widget-frame title="Upload new documents" i18n-title>
 | 
					<app-widget-frame title="Upload new documents" i18n-title>
 | 
				
			||||||
  <div header-buttons>
 | 
					  <div header-buttons>
 | 
				
			||||||
    <a *ngIf="getStatusSuccess().length > 0" (click)="dismissCompleted()" [routerLink]="" >
 | 
					    <a *ngIf="getStatusSuccess().length > 0" (click)="dismissCompleted()" [routerLink]="[][]" >
 | 
				
			||||||
      <span i18n="This button dismisses all status messages about processed documents on the dashboard (failed and successful)">Dismiss completed</span> 
 | 
					      <span i18n="This button dismisses all status messages about processed documents on the dashboard (failed and successful)">Dismiss completed</span> 
 | 
				
			||||||
      <svg xmlns="http://www.w3.org/2000/svg" width="1rem" height="1rem" fill="currentColor" class="bi bi-check2-all" viewBox="0 0 16 16">
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" width="1rem" height="1rem" fill="currentColor" class="bi bi-check2-all" viewBox="0 0 16 16">
 | 
				
			||||||
        <path d="M12.354 4.354a.5.5 0 0 0-.708-.708L5 10.293 1.854 7.146a.5.5 0 1 0-.708.708l3.5 3.5a.5.5 0 0 0 .708 0l7-7zm-4.208 7l-.896-.897.707-.707.543.543 6.646-6.647a.5.5 0 0 1 .708.708l-7 7a.5.5 0 0 1-.708 0z"/>
 | 
					        <path d="M12.354 4.354a.5.5 0 0 0-.708-.708L5 10.293 1.854 7.146a.5.5 0 1 0-.708.708l3.5 3.5a.5.5 0 0 0 .708 0l7-7zm-4.208 7l-.896-.897.707-.707.543.543 6.646-6.647a.5.5 0 0 1 .708.708l-7 7a.5.5 0 0 1-.708 0z"/>
 | 
				
			||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
      <p *ngIf="!alertsExpanded" class="mt-3 mb-0 text-center">
 | 
					      <p *ngIf="!alertsExpanded" class="mt-3 mb-0 text-center">
 | 
				
			||||||
        <span i18n="This is shown as a summary line when there are more than 5 document in the processing pipeline.">{getStatusHidden().length, plural, =1 {One more document} other {{{getStatusHidden().length}} more documents}}</span>
 | 
					        <span i18n="This is shown as a summary line when there are more than 5 document in the processing pipeline.">{getStatusHidden().length, plural, =1 {One more document} other {{{getStatusHidden().length}} more documents}}</span>
 | 
				
			||||||
         • 
 | 
					         • 
 | 
				
			||||||
        <a [routerLink]="" (click)="alertsExpanded = !alertsExpanded" aria-controls="hiddenAlerts" [attr.aria-expanded]="alertsExpanded" i18n>Show all</a>
 | 
					        <a [routerLink]="[]" (click)="alertsExpanded = !alertsExpanded" aria-controls="hiddenAlerts" [attr.aria-expanded]="alertsExpanded" i18n>Show all</a>
 | 
				
			||||||
      </p>
 | 
					      </p>
 | 
				
			||||||
      <div #hiddenAlerts="ngbCollapse" [(ngbCollapse)]="!alertsExpanded">
 | 
					      <div #hiddenAlerts="ngbCollapse" [(ngbCollapse)]="!alertsExpanded">
 | 
				
			||||||
        <div *ngFor="let status of getStatusHidden()">
 | 
					        <div *ngFor="let status of getStatusHidden()">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,7 @@
 | 
				
			|||||||
        <div class="d-flex justify-content-between align-items-center">
 | 
					        <div class="d-flex justify-content-between align-items-center">
 | 
				
			||||||
          <h5 class="card-title">
 | 
					          <h5 class="card-title">
 | 
				
			||||||
            <ng-container *ngIf="document.correspondent">
 | 
					            <ng-container *ngIf="document.correspondent">
 | 
				
			||||||
              <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>
 | 
					              <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="[][]" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>
 | 
				
			||||||
              <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>:
 | 
					              <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>:
 | 
				
			||||||
            </ng-container>
 | 
					            </ng-container>
 | 
				
			||||||
            {{document.title | documentTitle}}
 | 
					            {{document.title | documentTitle}}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
    <div class="card-body p-2">
 | 
					    <div class="card-body p-2">
 | 
				
			||||||
      <p class="card-text">
 | 
					      <p class="card-text">
 | 
				
			||||||
        <ng-container *ngIf="document.correspondent">
 | 
					        <ng-container *ngIf="document.correspondent">
 | 
				
			||||||
          <a [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>:
 | 
					          <a [routerLink]="[]" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>:
 | 
				
			||||||
        </ng-container>
 | 
					        </ng-container>
 | 
				
			||||||
        {{document.title | documentTitle}}
 | 
					        {{document.title | documentTitle}}
 | 
				
			||||||
      </p>
 | 
					      </p>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -159,7 +159,7 @@
 | 
				
			|||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td class="d-none d-md-table-cell">
 | 
					        <td class="d-none d-md-table-cell">
 | 
				
			||||||
          <ng-container *ngIf="d.correspondent">
 | 
					          <ng-container *ngIf="d.correspondent">
 | 
				
			||||||
            <a [routerLink]="" (click)="clickCorrespondent(d.correspondent);$event.stopPropagation()" title="Filter by correspondent">{{(d.correspondent$ | async)?.name}}</a>
 | 
					            <a [routerLink]="[]" (click)="clickCorrespondent(d.correspondent);$event.stopPropagation()" title="Filter by correspondent">{{(d.correspondent$ | async)?.name}}</a>
 | 
				
			||||||
          </ng-container>
 | 
					          </ng-container>
 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td>
 | 
					        <td>
 | 
				
			||||||
@@ -168,7 +168,7 @@
 | 
				
			|||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td class="d-none d-xl-table-cell">
 | 
					        <td class="d-none d-xl-table-cell">
 | 
				
			||||||
          <ng-container *ngIf="d.document_type">
 | 
					          <ng-container *ngIf="d.document_type">
 | 
				
			||||||
            <a [routerLink]="" (click)="clickDocumentType(d.document_type);$event.stopPropagation()" title="Filter by document type">{{(d.document_type$ | async)?.name}}</a>
 | 
					            <a [routerLink]="[]" (click)="clickDocumentType(d.document_type);$event.stopPropagation()" title="Filter by document type">{{(d.document_type$ | async)?.name}}</a>
 | 
				
			||||||
          </ng-container>
 | 
					          </ng-container>
 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
        <td>
 | 
					        <td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,16 +22,6 @@ import '@angular/localize/init';
 | 
				
			|||||||
 * BROWSER POLYFILLS
 | 
					 * BROWSER POLYFILLS
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
 | 
					 | 
				
			||||||
// import 'classlist.js';  // Run `npm install --save classlist.js`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Web Animations `@angular/platform-browser/animations`
 | 
					 | 
				
			||||||
 * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
 | 
					 | 
				
			||||||
 * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
// import 'web-animations-js';  // Run `npm install --save web-animations-js`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * By default, zone.js will patch all possible macroTask and DomEvents
 | 
					 * By default, zone.js will patch all possible macroTask and DomEvents
 | 
				
			||||||
 * user can disable parts of macroTask/DomEvents patch by setting following flags
 | 
					 * user can disable parts of macroTask/DomEvents patch by setting following flags
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,9 @@ declare const require: {
 | 
				
			|||||||
// First, initialize the Angular testing environment.
 | 
					// First, initialize the Angular testing environment.
 | 
				
			||||||
getTestBed().initTestEnvironment(
 | 
					getTestBed().initTestEnvironment(
 | 
				
			||||||
  BrowserDynamicTestingModule,
 | 
					  BrowserDynamicTestingModule,
 | 
				
			||||||
  platformBrowserDynamicTesting()
 | 
					  platformBrowserDynamicTesting(), {
 | 
				
			||||||
 | 
					    teardown: { destroyAfterEach: false }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
// Then we find all the tests.
 | 
					// Then we find all the tests.
 | 
				
			||||||
const context = require.context('./', true, /\.spec\.ts$/);
 | 
					const context = require.context('./', true, /\.spec\.ts$/);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user