@dontdrinkandroot/ngx-extensions 0.6.0 → 0.7.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.
- package/fesm2022/dontdrinkandroot-ngx-extensions.mjs +168 -126
- package/fesm2022/dontdrinkandroot-ngx-extensions.mjs.map +1 -1
- package/package.json +5 -7
- package/src/cookie/cookie.service.d.ts +1 -1
- package/src/http/redirect-to-login-interceptor.service.d.ts +1 -1
- package/src/http/with-credentials-interceptor.service.d.ts +1 -1
- package/src/image/lazy-image.directive.d.ts +4 -4
- package/src/jwt/jwt-interceptor.service.d.ts +1 -1
- package/src/jwt/jwt-refresh-token-interceptor.service.d.ts +1 -1
- package/src/logger/console-logger.service.d.ts +4 -4
- package/src/logger/logger.service.d.ts +4 -4
- package/src/oauth/oauth2-access-token-interceptor.service.d.ts +1 -1
- package/src/oauth/oauth2-refresh-token-interceptor.service.d.ts +1 -1
- package/src/oauth/oauth2.service.d.ts +1 -1
- package/src/oauth/redirect-to-oauth2-login-interceptor.service.d.ts +1 -1
- package/src/scroll/bottom-hit.directive.d.ts +5 -6
- package/src/util/collection-utils.d.ts +2 -2
- package/esm2022/dontdrinkandroot-ngx-extensions.mjs +0 -5
- package/esm2022/public-api.mjs +0 -29
- package/esm2022/src/cookie/cookie.service.mjs +0 -135
- package/esm2022/src/ddr-extensions.module.mjs +0 -67
- package/esm2022/src/http/redirect-to-login-interceptor.service.mjs +0 -35
- package/esm2022/src/http/url-info.mjs +0 -26
- package/esm2022/src/http/with-credentials-interceptor.service.mjs +0 -19
- package/esm2022/src/image/lazy-image.directive.mjs +0 -132
- package/esm2022/src/jwt/jwt-interceptor.service.mjs +0 -26
- package/esm2022/src/jwt/jwt-refresh-token-interceptor.service.mjs +0 -50
- package/esm2022/src/jwt/jwt-token-response.mjs +0 -2
- package/esm2022/src/jwt/jwt.service.mjs +0 -81
- package/esm2022/src/logger/console-logger.service.mjs +0 -43
- package/esm2022/src/logger/logger.service.mjs +0 -9
- package/esm2022/src/methoddecorator/debounce.mjs +0 -13
- package/esm2022/src/methoddecorator/limit.mjs +0 -16
- package/esm2022/src/oauth/json-web-token.mjs +0 -2
- package/esm2022/src/oauth/oauth2-access-token-interceptor.service.mjs +0 -26
- package/esm2022/src/oauth/oauth2-config.mjs +0 -11
- package/esm2022/src/oauth/oauth2-error.mjs +0 -8
- package/esm2022/src/oauth/oauth2-refresh-token-interceptor.service.mjs +0 -24
- package/esm2022/src/oauth/oauth2.module.mjs +0 -44
- package/esm2022/src/oauth/oauth2.service.mjs +0 -125
- package/esm2022/src/oauth/redirect-to-oauth2-login-interceptor.service.mjs +0 -41
- package/esm2022/src/oauth/token-response.mjs +0 -2
- package/esm2022/src/scroll/bottom-hit.directive.mjs +0 -60
- package/esm2022/src/scroll/scroll.service.mjs +0 -38
- package/esm2022/src/storage/local-storage.service.mjs +0 -53
- package/esm2022/src/storage/storage.service.mjs +0 -5
- package/esm2022/src/typeguard/is-non-null.mjs +0 -4
- package/esm2022/src/util/collection-utils.mjs +0 -27
- package/esm2022/src/util/number-utils.mjs +0 -10
- package/esm2022/src/util/object-utils.mjs +0 -9
- package/esm2022/src/util/string-utils.mjs +0 -35
- package/esm2022/src/util/type-utils.mjs +0 -9
- package/esm2022/src/visibility/visibility.service.mjs +0 -19
|
@@ -57,6 +57,7 @@ class StringUtils {
|
|
|
57
57
|
|
|
58
58
|
function Debounce(delay = 250) {
|
|
59
59
|
let timeoutReference = null;
|
|
60
|
+
// eslint-disable-next-line
|
|
60
61
|
return (target, propertyKey, descriptor) => {
|
|
61
62
|
const original = descriptor.value;
|
|
62
63
|
descriptor.value = function (...args) {
|
|
@@ -70,13 +71,14 @@ function Debounce(delay = 250) {
|
|
|
70
71
|
|
|
71
72
|
function Limit(rate = 250) {
|
|
72
73
|
let timeoutReference = null;
|
|
74
|
+
// eslint-disable-next-line
|
|
73
75
|
return (target, propertyKey, descriptor) => {
|
|
74
76
|
const original = descriptor.value;
|
|
75
77
|
descriptor.value = function (...args) {
|
|
76
78
|
if (null == timeoutReference) {
|
|
77
79
|
timeoutReference = setTimeout(() => {
|
|
78
80
|
original.apply(this, args);
|
|
79
|
-
timeoutReference =
|
|
81
|
+
timeoutReference = null;
|
|
80
82
|
}, rate);
|
|
81
83
|
}
|
|
82
84
|
};
|
|
@@ -85,27 +87,32 @@ function Limit(rate = 250) {
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
class LazyImageDirective {
|
|
90
|
+
element;
|
|
91
|
+
changeDetectorRef;
|
|
92
|
+
src;
|
|
93
|
+
objectFit = 'contain';
|
|
94
|
+
offset = 1000;
|
|
95
|
+
hostSrc = 'assets/placeholder.gif';
|
|
96
|
+
hostStyleWidthPx;
|
|
97
|
+
hostStyleHeightPx;
|
|
98
|
+
hostStyleObjectFit = 'contain';
|
|
99
|
+
displayed = false;
|
|
100
|
+
maxLoadedDimension = null;
|
|
88
101
|
constructor(element, changeDetectorRef) {
|
|
89
102
|
this.element = element;
|
|
90
103
|
this.changeDetectorRef = changeDetectorRef;
|
|
91
|
-
this.objectFit = 'contain';
|
|
92
|
-
this.offset = 1000;
|
|
93
|
-
this.hostSrc = 'assets/placeholder.gif';
|
|
94
|
-
this.hostStyleObjectFit = 'contain';
|
|
95
|
-
this.displayed = false;
|
|
96
|
-
this.maxLoadedDimension = null;
|
|
97
104
|
}
|
|
98
|
-
windowResized(
|
|
105
|
+
windowResized() {
|
|
99
106
|
this.displayed = false;
|
|
100
107
|
this.check();
|
|
101
108
|
}
|
|
102
|
-
windowScroll(
|
|
109
|
+
windowScroll() {
|
|
103
110
|
this.check();
|
|
104
111
|
}
|
|
105
112
|
/**
|
|
106
113
|
* @override
|
|
107
114
|
*/
|
|
108
|
-
ngOnChanges(
|
|
115
|
+
ngOnChanges() {
|
|
109
116
|
this.displayed = false;
|
|
110
117
|
this.maxLoadedDimension = null;
|
|
111
118
|
this.check();
|
|
@@ -149,14 +156,14 @@ class LazyImageDirective {
|
|
|
149
156
|
}
|
|
150
157
|
isInsideViewport(element, threshold) {
|
|
151
158
|
const ownerDocument = element.ownerDocument;
|
|
152
|
-
const documentTop = window.
|
|
153
|
-
const documentLeft = window.
|
|
159
|
+
const documentTop = window.scrollY || ownerDocument.body.scrollTop;
|
|
160
|
+
const documentLeft = window.scrollX || ownerDocument.body.scrollLeft;
|
|
154
161
|
const documentWidth = window.innerWidth || (ownerDocument.documentElement.clientWidth || document.body.clientWidth);
|
|
155
162
|
const documentHeight = window.innerHeight || (ownerDocument.documentElement.clientHeight || document.body.clientHeight);
|
|
156
163
|
const topOffset = element.getBoundingClientRect().top + documentTop - ownerDocument.documentElement.clientTop;
|
|
157
164
|
const leftOffset = element.getBoundingClientRect().left + documentLeft - ownerDocument.documentElement.clientLeft;
|
|
158
165
|
const isBelowViewport = documentHeight + documentTop <= topOffset - threshold;
|
|
159
|
-
const isAtRightOfViewport = documentWidth + window.
|
|
166
|
+
const isAtRightOfViewport = documentWidth + window.scrollX <= leftOffset - threshold;
|
|
160
167
|
const isAboveViewport = documentTop >= topOffset + threshold + element.offsetHeight;
|
|
161
168
|
const isAtLeftOfViewport = documentLeft >= leftOffset + threshold + element.offsetWidth;
|
|
162
169
|
return !isBelowViewport && !isAboveViewport && !isAtRightOfViewport && !isAtLeftOfViewport;
|
|
@@ -170,8 +177,8 @@ class LazyImageDirective {
|
|
|
170
177
|
isHidden(element) {
|
|
171
178
|
return window.getComputedStyle(element).display === 'none';
|
|
172
179
|
}
|
|
173
|
-
static
|
|
174
|
-
static
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LazyImageDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
181
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: LazyImageDirective, isStandalone: false, selector: "[ddrLazyImage]", inputs: { src: ["ddrLazyImage", "src"], objectFit: "objectFit", offset: "offset" }, host: { listeners: { "window:resize": "windowResized($event)", "window:scroll": "windowScroll($event)" }, properties: { "src": "this.hostSrc", "style.width.px": "this.hostStyleWidthPx", "style.height.px": "this.hostStyleHeightPx", "style.object-fit": "this.hostStyleObjectFit" } }, usesOnChanges: true, ngImport: i0 });
|
|
175
182
|
}
|
|
176
183
|
__decorate([
|
|
177
184
|
Debounce()
|
|
@@ -179,9 +186,12 @@ __decorate([
|
|
|
179
186
|
__decorate([
|
|
180
187
|
Limit()
|
|
181
188
|
], LazyImageDirective.prototype, "windowScroll", null);
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LazyImageDirective, decorators: [{
|
|
183
190
|
type: Directive,
|
|
184
|
-
args: [{
|
|
191
|
+
args: [{
|
|
192
|
+
selector: '[ddrLazyImage]',
|
|
193
|
+
standalone: false
|
|
194
|
+
}]
|
|
185
195
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { src: [{
|
|
186
196
|
type: Input,
|
|
187
197
|
args: ['ddrLazyImage']
|
|
@@ -210,24 +220,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
210
220
|
}] } });
|
|
211
221
|
|
|
212
222
|
class BottomHitDirective {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
this.onElementBottomHit = new EventEmitter();
|
|
217
|
-
}
|
|
223
|
+
offset = 1000;
|
|
224
|
+
windowBottomHit = new EventEmitter();
|
|
225
|
+
elementBottomHit = new EventEmitter();
|
|
218
226
|
scrolled($event) {
|
|
219
227
|
this.elementScrollEvent($event);
|
|
220
228
|
}
|
|
221
|
-
windowScrolled(
|
|
222
|
-
this.windowScrollEvent(
|
|
229
|
+
windowScrolled() {
|
|
230
|
+
this.windowScrollEvent();
|
|
223
231
|
}
|
|
224
|
-
windowScrollEvent(
|
|
232
|
+
windowScrollEvent() {
|
|
225
233
|
const pageHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
|
|
226
234
|
const viewportHeight = document.documentElement.clientHeight;
|
|
227
|
-
const scrollPosition = window.
|
|
235
|
+
const scrollPosition = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
228
236
|
const distanceToBottom = pageHeight - (scrollPosition + viewportHeight);
|
|
229
237
|
if (distanceToBottom < this.offset) {
|
|
230
|
-
this.
|
|
238
|
+
this.windowBottomHit.emit();
|
|
231
239
|
}
|
|
232
240
|
}
|
|
233
241
|
elementScrollEvent($event) {
|
|
@@ -236,11 +244,11 @@ class BottomHitDirective {
|
|
|
236
244
|
const offsetHeight = target.offsetHeight;
|
|
237
245
|
const isReachingBottom = (scrollPosition - offsetHeight) < this.offset;
|
|
238
246
|
if (isReachingBottom) {
|
|
239
|
-
this.
|
|
247
|
+
this.elementBottomHit.emit();
|
|
240
248
|
}
|
|
241
249
|
}
|
|
242
|
-
static
|
|
243
|
-
static
|
|
250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BottomHitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
251
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: BottomHitDirective, isStandalone: false, selector: "[ddrBottomHit]", outputs: { windowBottomHit: "windowBottomHit", elementBottomHit: "elementBottomHit" }, host: { listeners: { "scroll": "scrolled($event)", "window:scroll": "windowScrolled($event)" } }, ngImport: i0 });
|
|
244
252
|
}
|
|
245
253
|
__decorate([
|
|
246
254
|
Limit()
|
|
@@ -248,14 +256,15 @@ __decorate([
|
|
|
248
256
|
__decorate([
|
|
249
257
|
Limit()
|
|
250
258
|
], BottomHitDirective.prototype, "windowScrolled", null);
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BottomHitDirective, decorators: [{
|
|
252
260
|
type: Directive,
|
|
253
261
|
args: [{
|
|
254
|
-
selector: '[ddrBottomHit]'
|
|
262
|
+
selector: '[ddrBottomHit]',
|
|
263
|
+
standalone: false
|
|
255
264
|
}]
|
|
256
|
-
}],
|
|
265
|
+
}], propDecorators: { windowBottomHit: [{
|
|
257
266
|
type: Output
|
|
258
|
-
}],
|
|
267
|
+
}], elementBottomHit: [{
|
|
259
268
|
type: Output
|
|
260
269
|
}], scrolled: [{
|
|
261
270
|
type: HostListener,
|
|
@@ -266,12 +275,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
266
275
|
}] } });
|
|
267
276
|
|
|
268
277
|
class Logger {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
this.errorEnabled = true;
|
|
274
|
-
}
|
|
278
|
+
debugEnabled = false;
|
|
279
|
+
infoEnabled = true;
|
|
280
|
+
warnEnabled = true;
|
|
281
|
+
errorEnabled = true;
|
|
275
282
|
}
|
|
276
283
|
|
|
277
284
|
class ConsoleLogger extends Logger {
|
|
@@ -307,10 +314,10 @@ class ConsoleLogger extends Logger {
|
|
|
307
314
|
console.error(...data);
|
|
308
315
|
}
|
|
309
316
|
}
|
|
310
|
-
static
|
|
311
|
-
static
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConsoleLogger, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
318
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConsoleLogger });
|
|
312
319
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConsoleLogger, decorators: [{
|
|
314
321
|
type: Injectable
|
|
315
322
|
}] });
|
|
316
323
|
|
|
@@ -319,6 +326,8 @@ class StorageService {
|
|
|
319
326
|
}
|
|
320
327
|
|
|
321
328
|
class LocalStorageService extends StorageService {
|
|
329
|
+
storagePrefix;
|
|
330
|
+
logger;
|
|
322
331
|
constructor(storagePrefix, logger) {
|
|
323
332
|
super();
|
|
324
333
|
this.storagePrefix = storagePrefix;
|
|
@@ -328,8 +337,8 @@ class LocalStorageService extends StorageService {
|
|
|
328
337
|
* @override
|
|
329
338
|
*/
|
|
330
339
|
retrieve(key, defaultValue = null) {
|
|
331
|
-
|
|
332
|
-
|
|
340
|
+
const fullKey = this.getFullKey(key);
|
|
341
|
+
const valueJson = localStorage.getItem(fullKey);
|
|
333
342
|
if (null == valueJson) {
|
|
334
343
|
return defaultValue;
|
|
335
344
|
}
|
|
@@ -357,10 +366,10 @@ class LocalStorageService extends StorageService {
|
|
|
357
366
|
getFullKey(key) {
|
|
358
367
|
return this.storagePrefix + '.' + key;
|
|
359
368
|
}
|
|
360
|
-
static
|
|
361
|
-
static
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LocalStorageService, deps: [{ token: DDR_STORAGE_PREFIX }, { token: Logger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
370
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LocalStorageService });
|
|
362
371
|
}
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
364
373
|
type: Injectable
|
|
365
374
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
366
375
|
type: Inject,
|
|
@@ -370,11 +379,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
370
379
|
const DDR_JWT_REFRESH_TOKEN_URL = new InjectionToken('DDR_JWT_REFRESH_TOKEN_URL');
|
|
371
380
|
const DDR_LOGIN_PATH = new InjectionToken('DDR_LOGIN_PATH');
|
|
372
381
|
class DdrExtensionsModule {
|
|
373
|
-
static
|
|
374
|
-
static
|
|
382
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
383
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: DdrExtensionsModule, declarations: [LazyImageDirective,
|
|
375
384
|
BottomHitDirective], exports: [LazyImageDirective,
|
|
376
|
-
BottomHitDirective] });
|
|
377
|
-
static
|
|
385
|
+
BottomHitDirective] });
|
|
386
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrExtensionsModule, providers: [
|
|
378
387
|
{
|
|
379
388
|
provide: DDR_LOGIN_PATH,
|
|
380
389
|
useValue: '/login'
|
|
@@ -391,9 +400,9 @@ class DdrExtensionsModule {
|
|
|
391
400
|
provide: StorageService,
|
|
392
401
|
useClass: LocalStorageService
|
|
393
402
|
},
|
|
394
|
-
] });
|
|
403
|
+
] });
|
|
395
404
|
}
|
|
396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrExtensionsModule, decorators: [{
|
|
397
406
|
type: NgModule,
|
|
398
407
|
args: [{
|
|
399
408
|
declarations: [
|
|
@@ -430,6 +439,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
430
439
|
// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.
|
|
431
440
|
// Package: https://github.com/BCJTI/ng2-cookies
|
|
432
441
|
class CookieService {
|
|
442
|
+
document;
|
|
443
|
+
documentIsAccessible;
|
|
433
444
|
constructor(document) {
|
|
434
445
|
this.document = document;
|
|
435
446
|
// To avoid issues with server side prerendering, check if `document` is defined.
|
|
@@ -462,22 +473,22 @@ class CookieService {
|
|
|
462
473
|
return '';
|
|
463
474
|
}
|
|
464
475
|
}
|
|
465
|
-
|
|
476
|
+
parse() {
|
|
466
477
|
if (!this.documentIsAccessible) {
|
|
467
478
|
return {};
|
|
468
479
|
}
|
|
469
|
-
const
|
|
480
|
+
const cookieRecord = {};
|
|
470
481
|
const document = this.document;
|
|
471
482
|
if (document.cookie && document.cookie !== '') {
|
|
472
|
-
const
|
|
473
|
-
for (
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
483
|
+
const cookieParts = document.cookie.split(';');
|
|
484
|
+
for (const currentCookie of cookieParts) {
|
|
485
|
+
const cookie = currentCookie.split('=');
|
|
486
|
+
const cookieName = cookie[0].replace(/^ /, '');
|
|
487
|
+
const cookieValue = cookie[1];
|
|
488
|
+
cookieRecord[cookieName] = decodeURIComponent(cookieValue);
|
|
478
489
|
}
|
|
479
490
|
}
|
|
480
|
-
return
|
|
491
|
+
return cookieRecord;
|
|
481
492
|
}
|
|
482
493
|
/**
|
|
483
494
|
* @param name Cookie name
|
|
@@ -531,9 +542,9 @@ class CookieService {
|
|
|
531
542
|
if (!this.documentIsAccessible) {
|
|
532
543
|
return;
|
|
533
544
|
}
|
|
534
|
-
const cookies = this.
|
|
545
|
+
const cookies = this.parse();
|
|
535
546
|
for (const cookieName in cookies) {
|
|
536
|
-
if (
|
|
547
|
+
if (Object.hasOwn(cookies, cookieName)) {
|
|
537
548
|
this.delete(cookieName, path, domain);
|
|
538
549
|
}
|
|
539
550
|
}
|
|
@@ -542,13 +553,13 @@ class CookieService {
|
|
|
542
553
|
* @param name Cookie name
|
|
543
554
|
*/
|
|
544
555
|
getCookieRegExp(name) {
|
|
545
|
-
const escapedName = name.replace(/([
|
|
556
|
+
const escapedName = name.replace(/([[\]{}()|=;+?,.*^$])/ig, '\\$1');
|
|
546
557
|
return new RegExp('(?:^' + escapedName + '|;\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');
|
|
547
558
|
}
|
|
548
|
-
static
|
|
549
|
-
static
|
|
559
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CookieService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
560
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CookieService, providedIn: 'root' });
|
|
550
561
|
}
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CookieService, decorators: [{
|
|
552
563
|
type: Injectable,
|
|
553
564
|
args: [{
|
|
554
565
|
providedIn: 'root'
|
|
@@ -603,10 +614,12 @@ class TypeUtils {
|
|
|
603
614
|
}
|
|
604
615
|
|
|
605
616
|
class ScrollService {
|
|
617
|
+
router;
|
|
618
|
+
viewportScroller;
|
|
619
|
+
scrollPositionMap = new Map();
|
|
606
620
|
constructor(router, viewportScroller) {
|
|
607
621
|
this.router = router;
|
|
608
622
|
this.viewportScroller = viewportScroller;
|
|
609
|
-
this.scrollPositionMap = new Map();
|
|
610
623
|
this.router.events
|
|
611
624
|
.subscribe(e => {
|
|
612
625
|
if (e instanceof NavigationStart) {
|
|
@@ -619,16 +632,16 @@ class ScrollService {
|
|
|
619
632
|
if (this.scrollPositionMap.has(url)) {
|
|
620
633
|
/* Restore after timeout so rendering was completed */
|
|
621
634
|
setTimeout(() => {
|
|
622
|
-
|
|
635
|
+
const scrollPosition = this.scrollPositionMap.get(url);
|
|
623
636
|
if (null != scrollPosition)
|
|
624
637
|
this.viewportScroller.scrollToPosition(scrollPosition);
|
|
625
638
|
}, 1);
|
|
626
639
|
}
|
|
627
640
|
}
|
|
628
|
-
static
|
|
629
|
-
static
|
|
641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScrollService, deps: [{ token: i1.Router }, { token: i2.ViewportScroller }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
642
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScrollService, providedIn: 'root' });
|
|
630
643
|
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScrollService, decorators: [{
|
|
632
645
|
type: Injectable,
|
|
633
646
|
args: [{
|
|
634
647
|
providedIn: 'root'
|
|
@@ -636,16 +649,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
636
649
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.ViewportScroller }] });
|
|
637
650
|
|
|
638
651
|
class VisibilityService {
|
|
652
|
+
visibility$;
|
|
639
653
|
constructor() {
|
|
640
654
|
this.visibility$ = merge(fromEvent(document, 'visibilitychange'), fromEvent(window, 'focus'), fromEvent(window, 'blur')).pipe(debounceTime(50), startWith(true), map(() => document.hasFocus()), distinctUntilChanged(), shareReplay(1));
|
|
641
655
|
}
|
|
642
656
|
getVisibilityObservable() {
|
|
643
657
|
return this.visibility$;
|
|
644
658
|
}
|
|
645
|
-
static
|
|
646
|
-
static
|
|
659
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: VisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
660
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: VisibilityService, providedIn: 'root' });
|
|
647
661
|
}
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: VisibilityService, decorators: [{
|
|
649
663
|
type: Injectable,
|
|
650
664
|
args: [{ providedIn: 'root' }]
|
|
651
665
|
}], ctorParameters: () => [] });
|
|
@@ -660,14 +674,21 @@ class WithCredentialsInterceptor {
|
|
|
660
674
|
});
|
|
661
675
|
return next.handle(cloned);
|
|
662
676
|
}
|
|
663
|
-
static
|
|
664
|
-
static
|
|
677
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: WithCredentialsInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
678
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: WithCredentialsInterceptor });
|
|
665
679
|
}
|
|
666
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: WithCredentialsInterceptor, decorators: [{
|
|
667
681
|
type: Injectable
|
|
668
682
|
}] });
|
|
669
683
|
|
|
670
684
|
class UrlInfo {
|
|
685
|
+
protocol;
|
|
686
|
+
host;
|
|
687
|
+
hostname;
|
|
688
|
+
port;
|
|
689
|
+
pathname;
|
|
690
|
+
hash;
|
|
691
|
+
search;
|
|
671
692
|
constructor(protocol, host, hostname, port, pathname, hash, search) {
|
|
672
693
|
this.protocol = protocol;
|
|
673
694
|
this.host = host;
|
|
@@ -694,6 +715,8 @@ class UrlInfo {
|
|
|
694
715
|
}
|
|
695
716
|
|
|
696
717
|
class RedirectToLoginInterceptor {
|
|
718
|
+
router;
|
|
719
|
+
loginPath;
|
|
697
720
|
constructor(router, loginPath) {
|
|
698
721
|
this.router = router;
|
|
699
722
|
this.loginPath = loginPath;
|
|
@@ -711,10 +734,10 @@ class RedirectToLoginInterceptor {
|
|
|
711
734
|
return throwError(err);
|
|
712
735
|
}));
|
|
713
736
|
}
|
|
714
|
-
static
|
|
715
|
-
static
|
|
737
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToLoginInterceptor, deps: [{ token: i1.Router }, { token: DDR_LOGIN_PATH }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
738
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToLoginInterceptor });
|
|
716
739
|
}
|
|
717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToLoginInterceptor, decorators: [{
|
|
718
741
|
type: Injectable
|
|
719
742
|
}], ctorParameters: () => [{ type: i1.Router }, { type: undefined, decorators: [{
|
|
720
743
|
type: Inject,
|
|
@@ -723,6 +746,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
723
746
|
|
|
724
747
|
const DDR_OAUTH2_CONFIG = new InjectionToken('DDR_OAUTH2_CONFIG');
|
|
725
748
|
class OAuth2Config {
|
|
749
|
+
clientId;
|
|
750
|
+
redirectUri;
|
|
751
|
+
authorizeUri;
|
|
752
|
+
tokenUri;
|
|
726
753
|
constructor(clientId, redirectUri, authorizeUri, tokenUri) {
|
|
727
754
|
this.clientId = clientId;
|
|
728
755
|
this.redirectUri = redirectUri;
|
|
@@ -732,26 +759,30 @@ class OAuth2Config {
|
|
|
732
759
|
}
|
|
733
760
|
|
|
734
761
|
class OAuth2Error extends Error {
|
|
735
|
-
static
|
|
736
|
-
static
|
|
762
|
+
static CODE_NOT_FOUND = 'code_not_found';
|
|
763
|
+
static ACCESS_DENIED = 'access_denied';
|
|
737
764
|
constructor(error) {
|
|
738
765
|
super(error);
|
|
739
766
|
}
|
|
740
767
|
}
|
|
741
768
|
|
|
742
769
|
class OAuth2Service {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
770
|
+
route;
|
|
771
|
+
httpClient;
|
|
772
|
+
loggerService;
|
|
773
|
+
config;
|
|
774
|
+
static STORAGE_KEY_CHALLENGE = 'ddr_oauth2_challenge';
|
|
775
|
+
static STORAGE_KEY_REFRESH_TOKEN = 'ddr_oauth2_refresh_token';
|
|
776
|
+
static STORAGE_KEY_RETURN_URL = 'ddr_oauth2_return_url';
|
|
777
|
+
accessTokenString = null;
|
|
778
|
+
accessToken = null;
|
|
779
|
+
REFRESH_MARGIN_SECONDS = 60 * 10;
|
|
780
|
+
refreshTokenRequest$ = null;
|
|
746
781
|
constructor(route, httpClient, loggerService, config) {
|
|
747
782
|
this.route = route;
|
|
748
783
|
this.httpClient = httpClient;
|
|
749
784
|
this.loggerService = loggerService;
|
|
750
785
|
this.config = config;
|
|
751
|
-
this.accessTokenString = null;
|
|
752
|
-
this.accessToken = null;
|
|
753
|
-
this.REFRESH_MARGIN_SECONDS = 60 * 10;
|
|
754
|
-
this.refreshTokenRequest$ = null;
|
|
755
786
|
}
|
|
756
787
|
redirectToLogin() {
|
|
757
788
|
const challenge = this.createChallenge();
|
|
@@ -841,10 +872,10 @@ class OAuth2Service {
|
|
|
841
872
|
getReturnUrl() {
|
|
842
873
|
return localStorage.getItem(OAuth2Service.STORAGE_KEY_RETURN_URL);
|
|
843
874
|
}
|
|
844
|
-
static
|
|
845
|
-
static
|
|
875
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Service, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.HttpClient }, { token: Logger }, { token: DDR_OAUTH2_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
876
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Service });
|
|
846
877
|
}
|
|
847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Service, decorators: [{
|
|
848
879
|
type: Injectable
|
|
849
880
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2$1.HttpClient }, { type: Logger }, { type: OAuth2Config, decorators: [{
|
|
850
881
|
type: Inject,
|
|
@@ -852,6 +883,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
852
883
|
}] }] });
|
|
853
884
|
|
|
854
885
|
class OAuth2RefreshTokenInterceptor {
|
|
886
|
+
oAuth2Service;
|
|
855
887
|
constructor(oAuth2Service) {
|
|
856
888
|
this.oAuth2Service = oAuth2Service;
|
|
857
889
|
}
|
|
@@ -864,14 +896,17 @@ class OAuth2RefreshTokenInterceptor {
|
|
|
864
896
|
}
|
|
865
897
|
return next.handle(req);
|
|
866
898
|
}
|
|
867
|
-
static
|
|
868
|
-
static
|
|
899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2RefreshTokenInterceptor, deps: [{ token: OAuth2Service }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
900
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2RefreshTokenInterceptor });
|
|
869
901
|
}
|
|
870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2RefreshTokenInterceptor, decorators: [{
|
|
871
903
|
type: Injectable
|
|
872
904
|
}], ctorParameters: () => [{ type: OAuth2Service }] });
|
|
873
905
|
|
|
874
906
|
class RedirectToOAuth2LoginInterceptor {
|
|
907
|
+
oAuth2Service;
|
|
908
|
+
router;
|
|
909
|
+
oAuth2Config;
|
|
875
910
|
constructor(oAuth2Service, router, oAuth2Config) {
|
|
876
911
|
this.oAuth2Service = oAuth2Service;
|
|
877
912
|
this.router = router;
|
|
@@ -893,10 +928,10 @@ class RedirectToOAuth2LoginInterceptor {
|
|
|
893
928
|
return throwError(err);
|
|
894
929
|
}));
|
|
895
930
|
}
|
|
896
|
-
static
|
|
897
|
-
static
|
|
931
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToOAuth2LoginInterceptor, deps: [{ token: OAuth2Service }, { token: i1.Router }, { token: DDR_OAUTH2_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
932
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToOAuth2LoginInterceptor });
|
|
898
933
|
}
|
|
899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RedirectToOAuth2LoginInterceptor, decorators: [{
|
|
900
935
|
type: Injectable
|
|
901
936
|
}], ctorParameters: () => [{ type: OAuth2Service }, { type: i1.Router }, { type: OAuth2Config, decorators: [{
|
|
902
937
|
type: Inject,
|
|
@@ -904,6 +939,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
904
939
|
}] }] });
|
|
905
940
|
|
|
906
941
|
class OAuth2AccessTokenInterceptor {
|
|
942
|
+
oAuth2Service;
|
|
907
943
|
constructor(oAuth2Service) {
|
|
908
944
|
this.oAuth2Service = oAuth2Service;
|
|
909
945
|
}
|
|
@@ -919,10 +955,10 @@ class OAuth2AccessTokenInterceptor {
|
|
|
919
955
|
}
|
|
920
956
|
return next.handle(req);
|
|
921
957
|
}
|
|
922
|
-
static
|
|
923
|
-
static
|
|
958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2AccessTokenInterceptor, deps: [{ token: OAuth2Service }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
959
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2AccessTokenInterceptor });
|
|
924
960
|
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2AccessTokenInterceptor, decorators: [{
|
|
926
962
|
type: Injectable
|
|
927
963
|
}], ctorParameters: () => [{ type: OAuth2Service }] });
|
|
928
964
|
|
|
@@ -954,11 +990,11 @@ class OAuth2Module {
|
|
|
954
990
|
],
|
|
955
991
|
};
|
|
956
992
|
}
|
|
957
|
-
static
|
|
958
|
-
static
|
|
959
|
-
static
|
|
993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
994
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Module });
|
|
995
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Module });
|
|
960
996
|
}
|
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OAuth2Module, decorators: [{
|
|
962
998
|
type: NgModule
|
|
963
999
|
}] });
|
|
964
1000
|
|
|
@@ -967,17 +1003,19 @@ function isNonNull(value) {
|
|
|
967
1003
|
}
|
|
968
1004
|
|
|
969
1005
|
class JwtService {
|
|
1006
|
+
storageService;
|
|
1007
|
+
loggerService;
|
|
1008
|
+
/**
|
|
1009
|
+
* The current token.
|
|
1010
|
+
*/
|
|
1011
|
+
token = null;
|
|
1012
|
+
/**
|
|
1013
|
+
* The expiry of the current token.
|
|
1014
|
+
*/
|
|
1015
|
+
tokenExpiry = null;
|
|
970
1016
|
constructor(storageService, loggerService) {
|
|
971
1017
|
this.storageService = storageService;
|
|
972
1018
|
this.loggerService = loggerService;
|
|
973
|
-
/**
|
|
974
|
-
* The current token.
|
|
975
|
-
*/
|
|
976
|
-
this.token = null;
|
|
977
|
-
/**
|
|
978
|
-
* The expiry of the current token.
|
|
979
|
-
*/
|
|
980
|
-
this.tokenExpiry = null;
|
|
981
1019
|
}
|
|
982
1020
|
/**
|
|
983
1021
|
* Sets the current token and a refresh token.
|
|
@@ -1033,10 +1071,10 @@ class JwtService {
|
|
|
1033
1071
|
getRefreshTokenStorageKey() {
|
|
1034
1072
|
return 'jwt.refresh_token';
|
|
1035
1073
|
}
|
|
1036
|
-
static
|
|
1037
|
-
static
|
|
1074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtService, deps: [{ token: StorageService }, { token: Logger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1075
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtService, providedIn: 'root' });
|
|
1038
1076
|
}
|
|
1039
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtService, decorators: [{
|
|
1040
1078
|
type: Injectable,
|
|
1041
1079
|
args: [{
|
|
1042
1080
|
providedIn: 'root'
|
|
@@ -1044,6 +1082,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
1044
1082
|
}], ctorParameters: () => [{ type: StorageService }, { type: Logger }] });
|
|
1045
1083
|
|
|
1046
1084
|
class JwtInterceptor {
|
|
1085
|
+
jwtService;
|
|
1047
1086
|
constructor(jwtService) {
|
|
1048
1087
|
this.jwtService = jwtService;
|
|
1049
1088
|
}
|
|
@@ -1059,19 +1098,22 @@ class JwtInterceptor {
|
|
|
1059
1098
|
}
|
|
1060
1099
|
return next.handle(req);
|
|
1061
1100
|
}
|
|
1062
|
-
static
|
|
1063
|
-
static
|
|
1101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtInterceptor, deps: [{ token: JwtService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1102
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtInterceptor });
|
|
1064
1103
|
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtInterceptor, decorators: [{
|
|
1066
1105
|
type: Injectable
|
|
1067
1106
|
}], ctorParameters: () => [{ type: JwtService }] });
|
|
1068
1107
|
|
|
1069
1108
|
class JwtRefreshTokenInterceptor {
|
|
1109
|
+
jwtService;
|
|
1110
|
+
httpClient;
|
|
1111
|
+
jwtRefreshTokenUrl;
|
|
1112
|
+
refreshTokenRequest$ = null;
|
|
1070
1113
|
constructor(jwtService, httpClient, jwtRefreshTokenUrl) {
|
|
1071
1114
|
this.jwtService = jwtService;
|
|
1072
1115
|
this.httpClient = httpClient;
|
|
1073
1116
|
this.jwtRefreshTokenUrl = jwtRefreshTokenUrl;
|
|
1074
|
-
this.refreshTokenRequest$ = null;
|
|
1075
1117
|
}
|
|
1076
1118
|
/**
|
|
1077
1119
|
* @override
|
|
@@ -1099,10 +1141,10 @@ class JwtRefreshTokenInterceptor {
|
|
|
1099
1141
|
}
|
|
1100
1142
|
return this.refreshTokenRequest$;
|
|
1101
1143
|
}
|
|
1102
|
-
static
|
|
1103
|
-
static
|
|
1144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtRefreshTokenInterceptor, deps: [{ token: JwtService }, { token: i2$1.HttpClient }, { token: DDR_JWT_REFRESH_TOKEN_URL }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1145
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtRefreshTokenInterceptor });
|
|
1104
1146
|
}
|
|
1105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JwtRefreshTokenInterceptor, decorators: [{
|
|
1106
1148
|
type: Injectable
|
|
1107
1149
|
}], ctorParameters: () => [{ type: JwtService }, { type: i2$1.HttpClient }, { type: undefined, decorators: [{
|
|
1108
1150
|
type: Inject,
|