@wizishop/angular-components 14.4.54 → 14.4.56

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.
@@ -2568,9 +2568,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
2568
2568
  }] } });
2569
2569
 
2570
2570
  class HistoryService {
2571
- constructor(router, location) {
2571
+ constructor(router) {
2572
2572
  this.router = router;
2573
- this.location = location;
2574
2573
  this.history = [];
2575
2574
  }
2576
2575
  registerHistory() {
@@ -2582,9 +2581,10 @@ class HistoryService {
2582
2581
  });
2583
2582
  }
2584
2583
  back(link) {
2584
+ const lastlink = this.history[this.history.length - 1];
2585
2585
  this.history.pop();
2586
- if (this.history.length > 0) {
2587
- this.location.back();
2586
+ if (this.history.length > 0 && lastlink) {
2587
+ this.router.navigate([lastlink]);
2588
2588
  }
2589
2589
  else {
2590
2590
  this.redirect(link);
@@ -2605,14 +2605,14 @@ class HistoryService {
2605
2605
  this.router.navigate(link);
2606
2606
  }
2607
2607
  }
2608
- HistoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, deps: [{ token: i1$3.Router }, { token: i1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
2608
+ HistoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2609
2609
  HistoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, providedIn: 'root' });
2610
2610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, decorators: [{
2611
2611
  type: Injectable,
2612
2612
  args: [{
2613
2613
  providedIn: 'root'
2614
2614
  }]
2615
- }], ctorParameters: function () { return [{ type: i1$3.Router }, { type: i1.Location }]; } });
2615
+ }], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
2616
2616
 
2617
2617
  class HeaderPageComponent {
2618
2618
  constructor(historyService, location) {
@@ -6059,7 +6059,7 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
6059
6059
  LoaderComponent,
6060
6060
  ProgressBarComponent,
6061
6061
  TreeComponent, ExpansionPanelComponent, ExpansionPanelHeaderComponent, AccordionComponent, ExpansionPanelDirective, ExpansionPanelHeaderDirective] });
6062
- SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, providers: [HistoryService], imports: [CommonModule,
6062
+ SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, imports: [CommonModule,
6063
6063
  FormsModule,
6064
6064
  NwbAllModule,
6065
6065
  TranslateModule.forChild(),
@@ -6117,7 +6117,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
6117
6117
  ExpansionModule
6118
6118
  ],
6119
6119
  declarations: components,
6120
- providers: [HistoryService],
6121
6120
  exports: [...components, ...exportsFromModule]
6122
6121
  }]
6123
6122
  }] });
@@ -6130,7 +6129,7 @@ WiziComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
6130
6129
  SharedDirectives,
6131
6130
  SharedPipes,
6132
6131
  NwbAllModule], exports: [SharedComponentsModule, SharedDirectives, SharedPipes] });
6133
- WiziComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, imports: [CommonModule,
6132
+ WiziComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, providers: [HistoryService], imports: [CommonModule,
6134
6133
  SharedComponentsModule,
6135
6134
  SharedDirectives,
6136
6135
  SharedPipes,
@@ -6145,6 +6144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
6145
6144
  SharedPipes,
6146
6145
  NwbAllModule
6147
6146
  ],
6147
+ providers: [HistoryService],
6148
6148
  exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
6149
6149
  }]
6150
6150
  }] });