@paperless/angular 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import { trigger, transition, style, animate } from '@angular/animations';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, EventEmitter, Input, Output, ViewChild, Directive, HostListener, ChangeDetectionStrategy, NgModule, Injector, Injectable, HostBinding, TemplateRef, ContentChild, Host, ContentChildren, Pipe } from '@angular/core';
3
+ import { Component, EventEmitter, ChangeDetectionStrategy, Input, Output, ViewChild, Directive, HostListener, NgModule, Injector, Injectable, HostBinding, TemplateRef, ContentChild, Host, ContentChildren, Pipe } from '@angular/core';
4
4
  import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { BehaviorSubject, fromEvent, Subject, timer, distinctUntilChanged, map as map$1 } from 'rxjs';
5
6
  import * as i1$1 from '@angular/common';
6
7
  import { CommonModule, DatePipe, CurrencyPipe } from '@angular/common';
7
8
  import { __decorate } from 'tslib';
8
- import { fromEvent, Subject, timer, BehaviorSubject, distinctUntilChanged, map as map$1 } from 'rxjs';
9
9
  import { ObserversModule } from '@angular/cdk/observers';
10
10
  import * as i1 from '@angular/cdk/overlay';
11
11
  import { OverlayModule as OverlayModule$1, OverlayConfig } from '@angular/cdk/overlay';
@@ -163,19 +163,16 @@ class BaseUploadComponent {
163
163
  constructor() {
164
164
  this.uploaded = false;
165
165
  this.fileChange = new EventEmitter();
166
- this._loading = false;
166
+ this.loading$ = new BehaviorSubject(false);
167
167
  }
168
168
  set loading(value) {
169
- this._loading = value;
170
- }
171
- get loading() {
172
- return this._loading;
169
+ this.loading$.next(value);
173
170
  }
174
171
  onChange($event) {
175
172
  const target = $event.target;
176
173
  const file = target.files?.[0];
177
174
  if (file) {
178
- this._loading = true;
175
+ this.loading$.next(true);
179
176
  const reader = new FileReader();
180
177
  reader.onload = (e) => this.onLoad(file, e?.currentTarget?.result);
181
178
  reader.readAsDataURL(file);
@@ -191,15 +188,16 @@ class BaseUploadComponent {
191
188
  this.uploaderInput.nativeElement.value = '';
192
189
  }
193
190
  this.file = file;
194
- this._loading = false;
191
+ this.loading$.next(false);
195
192
  }
196
193
  }
197
194
  BaseUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
198
- BaseUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: BaseUploadComponent, selector: "ng-component", inputs: { fileId: "fileId", uploaded: "uploaded", loading: "loading" }, outputs: { fileChange: "fileChange" }, viewQueries: [{ propertyName: "uploaderInput", first: true, predicate: ["uploaderInput"], descendants: true }], ngImport: i0, template: ``, isInline: true });
195
+ BaseUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: BaseUploadComponent, selector: "ng-component", inputs: { fileId: "fileId", uploaded: "uploaded", loading: "loading" }, outputs: { fileChange: "fileChange" }, viewQueries: [{ propertyName: "uploaderInput", first: true, predicate: ["uploaderInput"], descendants: true }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
199
196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseUploadComponent, decorators: [{
200
197
  type: Component,
201
198
  args: [{
202
199
  template: ``,
200
+ changeDetection: ChangeDetectionStrategy.OnPush,
203
201
  }]
204
202
  }], propDecorators: { fileId: [{
205
203
  type: Input