@solidpepper/solidpepper-service 1.0.0 → 1.0.1
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.
|
@@ -5,8 +5,7 @@ import * as i1 from '@angular/common/http';
|
|
|
5
5
|
import { HttpHeaders } from '@angular/common/http';
|
|
6
6
|
import { ReplaySubject, Subject, BehaviorSubject, map, defer, debounceTime, distinctUntilChanged, switchMap } from 'rxjs';
|
|
7
7
|
import * as i3 from '@angular/router';
|
|
8
|
-
import * as i5 from '@
|
|
9
|
-
import { ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
|
|
8
|
+
import * as i5 from '@angular/material/dialog';
|
|
10
9
|
import * as signalR from '@aspnet/signalr';
|
|
11
10
|
import { HubConnectionState } from '@aspnet/signalr';
|
|
12
11
|
import { finalize } from 'rxjs/operators';
|
|
@@ -1433,12 +1432,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1433
1432
|
}], ctorParameters: () => [{ type: SettingsService }, { type: i3.Router }, { type: RightsService }, { type: NotificationServiceService }, { type: i0.NgZone }] });
|
|
1434
1433
|
|
|
1435
1434
|
class AuthService {
|
|
1436
|
-
constructor(myRoute, http, _settingsService, _companies,
|
|
1435
|
+
constructor(myRoute, http, _settingsService, _companies, dialog, _webSocket) {
|
|
1437
1436
|
this.myRoute = myRoute;
|
|
1438
1437
|
this.http = http;
|
|
1439
1438
|
this._settingsService = _settingsService;
|
|
1440
1439
|
this._companies = _companies;
|
|
1441
|
-
this.
|
|
1440
|
+
this.dialog = dialog;
|
|
1442
1441
|
this._webSocket = _webSocket;
|
|
1443
1442
|
this.authenticateObjectWithRight = {};
|
|
1444
1443
|
if (this.isLoggedIn()) {
|
|
@@ -1539,28 +1538,21 @@ class AuthService {
|
|
|
1539
1538
|
/* ========================================================================
|
|
1540
1539
|
MODAL
|
|
1541
1540
|
======================================================================== */
|
|
1542
|
-
triggerModal(content) {
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1541
|
+
triggerModal(content, viewContainerRef) {
|
|
1542
|
+
const config = {
|
|
1543
|
+
panelClass: ['sp-dialog-panel', 'modalSize'],
|
|
1544
|
+
backdropClass: 'sp-dialog-backdrop',
|
|
1545
|
+
autoFocus: false,
|
|
1546
|
+
restoreFocus: false,
|
|
1547
|
+
width: '860px',
|
|
1548
|
+
maxWidth: '95vw',
|
|
1549
|
+
viewContainerRef
|
|
1550
|
+
};
|
|
1551
|
+
const dialogRef = this.dialog.open(content, config);
|
|
1552
|
+
return dialogRef.afterClosed().toPromise();
|
|
1550
1553
|
}
|
|
1551
1554
|
closeAllModal() {
|
|
1552
|
-
this.
|
|
1553
|
-
}
|
|
1554
|
-
getDismissReason(reason) {
|
|
1555
|
-
if (reason === ModalDismissReasons.ESC) {
|
|
1556
|
-
return 'by pressing ESC';
|
|
1557
|
-
}
|
|
1558
|
-
else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
|
|
1559
|
-
return 'by clicking on a backdrop';
|
|
1560
|
-
}
|
|
1561
|
-
else {
|
|
1562
|
-
return 'with: ${reason}';
|
|
1563
|
-
}
|
|
1555
|
+
this.dialog.closeAll();
|
|
1564
1556
|
}
|
|
1565
1557
|
/* ========================================================================
|
|
1566
1558
|
OTHER
|
|
@@ -1583,7 +1575,7 @@ class AuthService {
|
|
|
1583
1575
|
delay(ms) {
|
|
1584
1576
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1585
1577
|
}
|
|
1586
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, deps: [{ token: i3.Router }, { token: i1.HttpClient }, { token: SettingsService }, { token: CompaniesService }, { token: i5.
|
|
1578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, deps: [{ token: i3.Router }, { token: i1.HttpClient }, { token: SettingsService }, { token: CompaniesService }, { token: i5.MatDialog }, { token: websocketService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1587
1579
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
1588
1580
|
}
|
|
1589
1581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, decorators: [{
|
|
@@ -1591,7 +1583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1591
1583
|
args: [{
|
|
1592
1584
|
providedIn: 'root',
|
|
1593
1585
|
}]
|
|
1594
|
-
}], ctorParameters: () => [{ type: i3.Router }, { type: i1.HttpClient }, { type: SettingsService }, { type: CompaniesService }, { type: i5.
|
|
1586
|
+
}], ctorParameters: () => [{ type: i3.Router }, { type: i1.HttpClient }, { type: SettingsService }, { type: CompaniesService }, { type: i5.MatDialog }, { type: websocketService }] });
|
|
1595
1587
|
|
|
1596
1588
|
class TeamsService {
|
|
1597
1589
|
constructor(http, _settings, auth) {
|