@sumaris-net/ngx-components 2.4.0-rc8 → 2.4.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.
@@ -81,17 +81,17 @@ import * as i6$3 from '@angular/material/tooltip';
81
81
  import { MatTooltipModule } from '@angular/material/tooltip';
82
82
  import * as i11$1 from '@angular/material/chips';
83
83
  import { MatChipsModule } from '@angular/material/chips';
84
- import * as i2$4 from '@angular/common/http';
85
- import { HttpResponse, HttpEventType, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
86
- import { __decorate, __param } from 'tslib';
87
84
  import * as i5 from 'ngx-color-picker';
88
85
  import { ColorPickerModule } from 'ngx-color-picker';
89
86
  import * as i2$2 from '@ionic-native/audio-management/ngx';
90
87
  import { AudioManagement } from '@ionic-native/audio-management/ngx';
88
+ import { __decorate, __param } from 'tslib';
91
89
  import { Haptics } from '@capacitor/haptics';
92
90
  import { NativeAudio } from '@capacitor-community/native-audio';
93
91
  import * as i1$4 from '@angular/platform-browser';
94
92
  import { HammerGestureConfig, HammerModule } from '@angular/platform-browser';
93
+ import * as i2$4 from '@angular/common/http';
94
+ import { HttpEventType, HttpClient, HttpHeaders, HttpResponse, HttpClientModule } from '@angular/common/http';
95
95
  import { v4 } from 'uuid';
96
96
  import { DragDropModule } from '@angular/cdk/drag-drop';
97
97
  import * as i6$4 from 'ngx-markdown';
@@ -9811,58 +9811,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
9811
9811
  args: [{ providedIn: 'root' }]
9812
9812
  }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; } });
9813
9813
 
9814
- const APP_PROGRESS_BAR_SERVICE = new InjectionToken('ProgressBarService');
9815
- class ProgressBarService {
9816
- constructor() {
9817
- this._requestsRunning = 0;
9818
- this.onProgressChanged = new EventEmitter();
9819
- }
9820
- list() {
9821
- return this._requestsRunning;
9822
- }
9823
- increase() {
9824
- this._requestsRunning++;
9825
- if (this._requestsRunning === 1) {
9826
- this.onProgressChanged.emit('query');
9827
- }
9828
- }
9829
- decrease() {
9830
- if (this._requestsRunning > 0) {
9831
- this._requestsRunning--;
9832
- }
9833
- if (this._requestsRunning === 0) {
9834
- this.onProgressChanged.emit(null);
9835
- }
9836
- }
9837
- }
9838
- ProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9839
- ProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, providedIn: 'root' });
9840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, decorators: [{
9841
- type: Injectable,
9842
- args: [{ providedIn: 'root' }]
9843
- }] });
9844
-
9845
- let ProgressInterceptor = class ProgressInterceptor {
9846
- constructor(progressBarService) {
9847
- this.progressBarService = progressBarService;
9848
- }
9849
- intercept(req, next) {
9850
- this.progressBarService.increase();
9851
- return next.handle(req)
9852
- .pipe(tap(event => {
9853
- if (event instanceof HttpResponse) {
9854
- this.progressBarService.decrease();
9855
- }
9856
- }), catchError((err, event) => {
9857
- this.progressBarService.decrease();
9858
- throw err;
9859
- }));
9860
- }
9861
- };
9862
- ProgressInterceptor = __decorate([
9863
- __param(0, Inject(APP_PROGRESS_BAR_SERVICE))
9864
- ], ProgressInterceptor);
9865
-
9866
9814
  function rgbToHex(r, g, b) {
9867
9815
  return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
9868
9816
  }
@@ -12781,6 +12729,37 @@ class EntityStore {
12781
12729
  }
12782
12730
  }
12783
12731
 
12732
+ const APP_PROGRESS_BAR_SERVICE = new InjectionToken('ProgressBarService');
12733
+ class ProgressBarService {
12734
+ constructor() {
12735
+ this._requestsRunning = 0;
12736
+ this.onProgressChanged = new EventEmitter();
12737
+ }
12738
+ list() {
12739
+ return this._requestsRunning;
12740
+ }
12741
+ increase() {
12742
+ this._requestsRunning++;
12743
+ if (this._requestsRunning === 1) {
12744
+ this.onProgressChanged.emit('query');
12745
+ }
12746
+ }
12747
+ decrease() {
12748
+ if (this._requestsRunning > 0) {
12749
+ this._requestsRunning--;
12750
+ }
12751
+ if (this._requestsRunning === 0) {
12752
+ this.onProgressChanged.emit(null);
12753
+ }
12754
+ }
12755
+ }
12756
+ ProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12757
+ ProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, providedIn: 'root' });
12758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ProgressBarService, decorators: [{
12759
+ type: Injectable,
12760
+ args: [{ providedIn: 'root' }]
12761
+ }] });
12762
+
12784
12763
  const APP_LOCAL_STORAGE_TYPE_POLICIES = new InjectionToken('localStorageTypePolicies');
12785
12764
  class EntitiesStorage extends StartableService {
12786
12765
  constructor(platform, progressBarService, storage, environment, typePolicies) {
@@ -19070,7 +19049,6 @@ class SharedModule {
19070
19049
  { provide: ENVIRONMENT, useValue: environment },
19071
19050
  // { provide: StorageService, useClass: StorageService, deps: [ENVIRONMENT]},
19072
19051
  { provide: APP_STORAGE, useExisting: StorageService },
19073
- // { provide: APP_PROGRESS_BAR_SERVICE, useClass: ProgressBarService },
19074
19052
  StorageService,
19075
19053
  AudioProvider,
19076
19054
  FileService,
@@ -19085,7 +19063,6 @@ class SharedModule {
19085
19063
  HighlightPipe,
19086
19064
  NumberFormatPipe,
19087
19065
  { provide: OverlayContainer, useClass: FullscreenOverlayContainer },
19088
- { provide: HTTP_INTERCEPTORS, useClass: ProgressInterceptor, multi: true, deps: [APP_PROGRESS_BAR_SERVICE] },
19089
19066
  { provide: MatPaginatorIntl, useClass: MatPaginatorI18n, deps: [TranslateService] },
19090
19067
  { provide: MatStepperIntl, useClass: MatStepperI18n, deps: [TranslateService] },
19091
19068
  // FIXME: try to force a custom overlay for autocomplete, because of there is a bug when using inside an ionic modal
@@ -19598,6 +19575,27 @@ class FormFieldValuesHolder {
19598
19575
  }
19599
19576
  }
19600
19577
 
19578
+ let ProgressInterceptor = class ProgressInterceptor {
19579
+ constructor(progressBarService) {
19580
+ this.progressBarService = progressBarService;
19581
+ }
19582
+ intercept(req, next) {
19583
+ this.progressBarService.increase();
19584
+ return next.handle(req)
19585
+ .pipe(tap(event => {
19586
+ if (event instanceof HttpResponse) {
19587
+ this.progressBarService.decrease();
19588
+ }
19589
+ }), catchError((err, event) => {
19590
+ this.progressBarService.decrease();
19591
+ throw err;
19592
+ }));
19593
+ }
19594
+ };
19595
+ ProgressInterceptor = __decorate([
19596
+ __param(0, Inject(APP_PROGRESS_BAR_SERVICE))
19597
+ ], ProgressInterceptor);
19598
+
19601
19599
  class ImageService extends StartableService {
19602
19600
  constructor(platform, settings, translate, popoverController,
19603
19601
  // protected camera: Camera,