@dontdrinkandroot/ngx-extensions 0.0.5 → 0.2.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.
Files changed (70) hide show
  1. package/{esm2015/dontdrinkandroot-ngx-extensions.js → esm2020/dontdrinkandroot-ngx-extensions.mjs} +1 -1
  2. package/esm2020/public-api.mjs +24 -0
  3. package/esm2020/src/cookie/cookie.service.mjs +135 -0
  4. package/esm2020/src/ddr-extensions.module.mjs +40 -0
  5. package/esm2020/src/http/redirect-to-login-interceptor.service.mjs +35 -0
  6. package/esm2020/src/http/url-info.mjs +26 -0
  7. package/esm2020/src/http/with-credentials-interceptor.service.mjs +19 -0
  8. package/esm2020/src/image/lazy-image.directive.mjs +132 -0
  9. package/esm2020/src/jwt/jwt-interceptor.service.mjs +26 -0
  10. package/esm2020/src/jwt/jwt-refresh-token-interceptor.service.mjs +50 -0
  11. package/esm2020/src/jwt/jwt-token-response.mjs +2 -0
  12. package/esm2020/src/jwt/jwt.service.mjs +82 -0
  13. package/esm2020/src/methoddecorator/debounce.mjs +13 -0
  14. package/esm2020/src/methoddecorator/limit.mjs +16 -0
  15. package/esm2020/src/scroll/bottom-hit.directive.mjs +60 -0
  16. package/esm2020/src/scroll/scroll.service.mjs +38 -0
  17. package/esm2020/src/util/collection-utils.mjs +27 -0
  18. package/esm2020/src/util/number-utils.mjs +10 -0
  19. package/esm2020/src/util/object-utils.mjs +9 -0
  20. package/esm2020/src/util/string-utils.mjs +35 -0
  21. package/esm2020/src/util/type-utils.mjs +9 -0
  22. package/esm2020/src/visibility/visibility.service.mjs +19 -0
  23. package/fesm2015/dontdrinkandroot-ngx-extensions.mjs +760 -0
  24. package/fesm2015/dontdrinkandroot-ngx-extensions.mjs.map +1 -0
  25. package/{fesm2015/dontdrinkandroot-ngx-extensions.js → fesm2020/dontdrinkandroot-ngx-extensions.mjs} +210 -154
  26. package/fesm2020/dontdrinkandroot-ngx-extensions.mjs.map +1 -0
  27. package/{dontdrinkandroot-ngx-extensions.d.ts → index.d.ts} +1 -0
  28. package/package.json +23 -11
  29. package/public-api.d.ts +1 -0
  30. package/src/cookie/cookie.service.d.ts +5 -2
  31. package/src/ddr-extensions.module.d.ts +6 -0
  32. package/src/http/redirect-to-login-interceptor.service.d.ts +4 -1
  33. package/src/http/url-info.d.ts +8 -7
  34. package/src/http/with-credentials-interceptor.service.d.ts +3 -0
  35. package/src/image/lazy-image.directive.d.ts +4 -1
  36. package/src/jwt/jwt-interceptor.service.d.ts +3 -0
  37. package/src/jwt/jwt-refresh-token-interceptor.service.d.ts +3 -0
  38. package/src/jwt/jwt.service.d.ts +3 -0
  39. package/src/scroll/bottom-hit.directive.d.ts +3 -0
  40. package/src/scroll/scroll.service.d.ts +3 -0
  41. package/src/util/collection-utils.d.ts +2 -4
  42. package/src/util/object-utils.d.ts +1 -0
  43. package/src/util/type-utils.d.ts +3 -0
  44. package/src/visibility/visibility.service.d.ts +3 -0
  45. package/bundles/dontdrinkandroot-ngx-extensions.umd.js +0 -1088
  46. package/bundles/dontdrinkandroot-ngx-extensions.umd.js.map +0 -1
  47. package/bundles/dontdrinkandroot-ngx-extensions.umd.min.js +0 -16
  48. package/bundles/dontdrinkandroot-ngx-extensions.umd.min.js.map +0 -1
  49. package/dontdrinkandroot-ngx-extensions.metadata.json +0 -1
  50. package/esm2015/public-api.js +0 -23
  51. package/esm2015/src/cookie/cookie.service.js +0 -136
  52. package/esm2015/src/ddr-extensions.module.js +0 -28
  53. package/esm2015/src/http/redirect-to-login-interceptor.service.js +0 -33
  54. package/esm2015/src/http/url-info.js +0 -26
  55. package/esm2015/src/http/with-credentials-interceptor.service.js +0 -16
  56. package/esm2015/src/image/lazy-image.directive.js +0 -118
  57. package/esm2015/src/jwt/jwt-interceptor.service.js +0 -26
  58. package/esm2015/src/jwt/jwt-refresh-token-interceptor.service.js +0 -50
  59. package/esm2015/src/jwt/jwt-token-response.js +0 -2
  60. package/esm2015/src/jwt/jwt.service.js +0 -73
  61. package/esm2015/src/methoddecorator/debounce.js +0 -12
  62. package/esm2015/src/methoddecorator/limit.js +0 -16
  63. package/esm2015/src/scroll/bottom-hit.directive.js +0 -53
  64. package/esm2015/src/scroll/scroll.service.js +0 -39
  65. package/esm2015/src/util/collection-utils.js +0 -29
  66. package/esm2015/src/util/number-utils.js +0 -10
  67. package/esm2015/src/util/object-utils.js +0 -6
  68. package/esm2015/src/util/string-utils.js +0 -35
  69. package/esm2015/src/visibility/visibility.service.js +0 -18
  70. package/fesm2015/dontdrinkandroot-ngx-extensions.js.map +0 -1
@@ -1,1088 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http')) :
3
- typeof define === 'function' && define.amd ? define('@dontdrinkandroot/ngx-extensions', ['exports', '@angular/core', '@angular/common', '@angular/router', 'rxjs', 'rxjs/operators', '@angular/common/http'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.dontdrinkandroot = global.dontdrinkandroot || {}, global.dontdrinkandroot['ngx-extensions'] = {}), global.ng.core, global.ng.common, global.ng.router, global.rxjs, global.rxjs.operators, global.ng.common.http));
5
- }(this, (function (exports, i0, i1, i1$1, rxjs, operators, http) { 'use strict';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
- var extendStatics = function (d, b) {
23
- extendStatics = Object.setPrototypeOf ||
24
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
- function (d, b) { for (var p in b)
26
- if (Object.prototype.hasOwnProperty.call(b, p))
27
- d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
- var __assign = function () {
36
- __assign = Object.assign || function __assign(t) {
37
- for (var s, i = 1, n = arguments.length; i < n; i++) {
38
- s = arguments[i];
39
- for (var p in s)
40
- if (Object.prototype.hasOwnProperty.call(s, p))
41
- t[p] = s[p];
42
- }
43
- return t;
44
- };
45
- return __assign.apply(this, arguments);
46
- };
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s)
50
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
- t[p] = s[p];
52
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
- t[p[i]] = s[p[i]];
56
- }
57
- return t;
58
- }
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
- r = Reflect.decorate(decorators, target, key, desc);
63
- else
64
- for (var i = decorators.length - 1; i >= 0; i--)
65
- if (d = decorators[i])
66
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
- return c > 3 && r && Object.defineProperty(target, key, r), r;
68
- }
69
- function __param(paramIndex, decorator) {
70
- return function (target, key) { decorator(target, key, paramIndex); };
71
- }
72
- function __metadata(metadataKey, metadataValue) {
73
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
- return Reflect.metadata(metadataKey, metadataValue);
75
- }
76
- function __awaiter(thisArg, _arguments, P, generator) {
77
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
- return new (P || (P = Promise))(function (resolve, reject) {
79
- function fulfilled(value) { try {
80
- step(generator.next(value));
81
- }
82
- catch (e) {
83
- reject(e);
84
- } }
85
- function rejected(value) { try {
86
- step(generator["throw"](value));
87
- }
88
- catch (e) {
89
- reject(e);
90
- } }
91
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
- step((generator = generator.apply(thisArg, _arguments || [])).next());
93
- });
94
- }
95
- function __generator(thisArg, body) {
96
- var _ = { label: 0, sent: function () { if (t[0] & 1)
97
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
- function verb(n) { return function (v) { return step([n, v]); }; }
100
- function step(op) {
101
- if (f)
102
- throw new TypeError("Generator is already executing.");
103
- while (_)
104
- try {
105
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
- return t;
107
- if (y = 0, t)
108
- op = [op[0] & 2, t.value];
109
- switch (op[0]) {
110
- case 0:
111
- case 1:
112
- t = op;
113
- break;
114
- case 4:
115
- _.label++;
116
- return { value: op[1], done: false };
117
- case 5:
118
- _.label++;
119
- y = op[1];
120
- op = [0];
121
- continue;
122
- case 7:
123
- op = _.ops.pop();
124
- _.trys.pop();
125
- continue;
126
- default:
127
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
- _ = 0;
129
- continue;
130
- }
131
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
- _.label = op[1];
133
- break;
134
- }
135
- if (op[0] === 6 && _.label < t[1]) {
136
- _.label = t[1];
137
- t = op;
138
- break;
139
- }
140
- if (t && _.label < t[2]) {
141
- _.label = t[2];
142
- _.ops.push(op);
143
- break;
144
- }
145
- if (t[2])
146
- _.ops.pop();
147
- _.trys.pop();
148
- continue;
149
- }
150
- op = body.call(thisArg, _);
151
- }
152
- catch (e) {
153
- op = [6, e];
154
- y = 0;
155
- }
156
- finally {
157
- f = t = 0;
158
- }
159
- if (op[0] & 5)
160
- throw op[1];
161
- return { value: op[0] ? op[1] : void 0, done: true };
162
- }
163
- }
164
- var __createBinding = Object.create ? (function (o, m, k, k2) {
165
- if (k2 === undefined)
166
- k2 = k;
167
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
- }) : (function (o, m, k, k2) {
169
- if (k2 === undefined)
170
- k2 = k;
171
- o[k2] = m[k];
172
- });
173
- function __exportStar(m, o) {
174
- for (var p in m)
175
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
176
- __createBinding(o, m, p);
177
- }
178
- function __values(o) {
179
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
- if (m)
181
- return m.call(o);
182
- if (o && typeof o.length === "number")
183
- return {
184
- next: function () {
185
- if (o && i >= o.length)
186
- o = void 0;
187
- return { value: o && o[i++], done: !o };
188
- }
189
- };
190
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
- }
192
- function __read(o, n) {
193
- var m = typeof Symbol === "function" && o[Symbol.iterator];
194
- if (!m)
195
- return o;
196
- var i = m.call(o), r, ar = [], e;
197
- try {
198
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
- ar.push(r.value);
200
- }
201
- catch (error) {
202
- e = { error: error };
203
- }
204
- finally {
205
- try {
206
- if (r && !r.done && (m = i["return"]))
207
- m.call(i);
208
- }
209
- finally {
210
- if (e)
211
- throw e.error;
212
- }
213
- }
214
- return ar;
215
- }
216
- function __spread() {
217
- for (var ar = [], i = 0; i < arguments.length; i++)
218
- ar = ar.concat(__read(arguments[i]));
219
- return ar;
220
- }
221
- function __spreadArrays() {
222
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
- s += arguments[i].length;
224
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
- r[k] = a[j];
227
- return r;
228
- }
229
- ;
230
- function __await(v) {
231
- return this instanceof __await ? (this.v = v, this) : new __await(v);
232
- }
233
- function __asyncGenerator(thisArg, _arguments, generator) {
234
- if (!Symbol.asyncIterator)
235
- throw new TypeError("Symbol.asyncIterator is not defined.");
236
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
- function verb(n) { if (g[n])
239
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
- function resume(n, v) { try {
241
- step(g[n](v));
242
- }
243
- catch (e) {
244
- settle(q[0][3], e);
245
- } }
246
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
- function fulfill(value) { resume("next", value); }
248
- function reject(value) { resume("throw", value); }
249
- function settle(f, v) { if (f(v), q.shift(), q.length)
250
- resume(q[0][0], q[0][1]); }
251
- }
252
- function __asyncDelegator(o) {
253
- var i, p;
254
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
- }
257
- function __asyncValues(o) {
258
- if (!Symbol.asyncIterator)
259
- throw new TypeError("Symbol.asyncIterator is not defined.");
260
- var m = o[Symbol.asyncIterator], i;
261
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
- }
265
- function __makeTemplateObject(cooked, raw) {
266
- if (Object.defineProperty) {
267
- Object.defineProperty(cooked, "raw", { value: raw });
268
- }
269
- else {
270
- cooked.raw = raw;
271
- }
272
- return cooked;
273
- }
274
- ;
275
- var __setModuleDefault = Object.create ? (function (o, v) {
276
- Object.defineProperty(o, "default", { enumerable: true, value: v });
277
- }) : function (o, v) {
278
- o["default"] = v;
279
- };
280
- function __importStar(mod) {
281
- if (mod && mod.__esModule)
282
- return mod;
283
- var result = {};
284
- if (mod != null)
285
- for (var k in mod)
286
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
287
- __createBinding(result, mod, k);
288
- __setModuleDefault(result, mod);
289
- return result;
290
- }
291
- function __importDefault(mod) {
292
- return (mod && mod.__esModule) ? mod : { default: mod };
293
- }
294
- function __classPrivateFieldGet(receiver, privateMap) {
295
- if (!privateMap.has(receiver)) {
296
- throw new TypeError("attempted to get private field on non-instance");
297
- }
298
- return privateMap.get(receiver);
299
- }
300
- function __classPrivateFieldSet(receiver, privateMap, value) {
301
- if (!privateMap.has(receiver)) {
302
- throw new TypeError("attempted to set private field on non-instance");
303
- }
304
- privateMap.set(receiver, value);
305
- return value;
306
- }
307
-
308
- var NumberUtils = /** @class */ (function () {
309
- function NumberUtils() {
310
- }
311
- NumberUtils.getNextPowerOfTwo = function (value) {
312
- var target = 2;
313
- while (target < value) {
314
- target *= 2;
315
- }
316
- return target;
317
- };
318
- return NumberUtils;
319
- }());
320
-
321
- var StringUtils = /** @class */ (function () {
322
- function StringUtils() {
323
- }
324
- StringUtils.capitalizeFirstLetter = function (text) {
325
- return text.charAt(0).toUpperCase() + text.slice(1);
326
- };
327
- StringUtils.stripTrailingSlash = function (text) {
328
- var lastChar = text.charAt(text.length - 1);
329
- if ('/' === lastChar) {
330
- return text.slice(0, text.length - 1);
331
- }
332
- return text;
333
- };
334
- StringUtils.updateUrlParameter = function (uri, key, value) {
335
- // remove the hash part before operating on the uri
336
- var i = uri.indexOf('#');
337
- var hash = i === -1 ? '' : uri.substr(i);
338
- uri = i === -1 ? uri : uri.substr(0, i);
339
- var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');
340
- var separator = uri.indexOf('?') !== -1 ? '&' : '?';
341
- if (uri.match(re)) {
342
- uri = uri.replace(re, '$1' + key + '=' + value + '$2');
343
- }
344
- else {
345
- uri = uri + separator + key + '=' + value;
346
- }
347
- return uri + hash; // finally append the hash as well
348
- };
349
- StringUtils.createRandomString = function (lengthOfCode, possible) {
350
- var text = '';
351
- for (var i = 0; i < lengthOfCode; i++) {
352
- text += possible.charAt(Math.floor(Math.random() * possible.length));
353
- }
354
- return text;
355
- };
356
- return StringUtils;
357
- }());
358
-
359
- function Debounce(delay) {
360
- if (delay === void 0) { delay = 250; }
361
- return function (target, propertyKey, descriptor) {
362
- var original = descriptor.value;
363
- var key = "__timeout__" + propertyKey;
364
- descriptor.value = function () {
365
- var _this = this;
366
- var args = [];
367
- for (var _i = 0; _i < arguments.length; _i++) {
368
- args[_i] = arguments[_i];
369
- }
370
- clearTimeout(this[key]);
371
- this[key] = setTimeout(function () { return original.apply(_this, args); }, delay);
372
- };
373
- return descriptor;
374
- };
375
- }
376
-
377
- function Limit(rate) {
378
- if (rate === void 0) { rate = 250; }
379
- return function (target, propertyKey, descriptor) {
380
- var original = descriptor.value;
381
- var key = "__timeout__" + propertyKey;
382
- descriptor.value = function () {
383
- var _this = this;
384
- var args = [];
385
- for (var _i = 0; _i < arguments.length; _i++) {
386
- args[_i] = arguments[_i];
387
- }
388
- if (null == this[key]) {
389
- this[key] = setTimeout(function () {
390
- original.apply(_this, args);
391
- delete _this[key];
392
- }, rate);
393
- }
394
- };
395
- return descriptor;
396
- };
397
- }
398
-
399
- var LazyImageDirective = /** @class */ (function () {
400
- function LazyImageDirective(element, changeDetectorRef) {
401
- this.element = element;
402
- this.changeDetectorRef = changeDetectorRef;
403
- this.objectFit = 'contain';
404
- this.offset = 1000;
405
- this.hostSrc = 'assets/placeholder.gif';
406
- this.hostStyleObjectFit = 'contain';
407
- this.displayed = false;
408
- this.maxLoadedDimension = null;
409
- }
410
- LazyImageDirective.prototype.windowResized = function ($event) {
411
- this.displayed = false;
412
- this.check();
413
- };
414
- LazyImageDirective.prototype.windowScroll = function ($event) {
415
- this.check();
416
- };
417
- /**
418
- * @override
419
- */
420
- LazyImageDirective.prototype.ngOnChanges = function (changes) {
421
- this.displayed = false;
422
- this.maxLoadedDimension = null;
423
- this.check();
424
- };
425
- LazyImageDirective.prototype.check = function () {
426
- var _this = this;
427
- if (this.element.nativeElement.parentElement.offsetWidth > 0) {
428
- this.doCheck();
429
- }
430
- else {
431
- setTimeout(function () { return _this.doCheck(); }, 1);
432
- }
433
- };
434
- LazyImageDirective.prototype.doCheck = function () {
435
- if (this.displayed || this.isHidden(this.element.nativeElement)) {
436
- return;
437
- }
438
- if (this.isInsideViewport(this.element.nativeElement, this.offset)) {
439
- this.displayed = true;
440
- var dimension = this.getDimension();
441
- this.hostStyleWidthPx = dimension.width;
442
- this.hostStyleHeightPx = dimension.height;
443
- if (this.maxLoadedDimension != null
444
- && this.maxLoadedDimension.width >= dimension.width
445
- && this.maxLoadedDimension.height >= dimension.height) {
446
- // console.log('has smaller dimension');
447
- return;
448
- }
449
- this.maxLoadedDimension = dimension;
450
- var wantedSize = void 0;
451
- if (this.objectFit === 'cover') {
452
- wantedSize = NumberUtils.getNextPowerOfTwo(Math.max(dimension.width, dimension.height));
453
- this.hostStyleObjectFit = 'cover';
454
- }
455
- else {
456
- wantedSize = NumberUtils.getNextPowerOfTwo(Math.min(dimension.width, dimension.height));
457
- this.hostStyleObjectFit = 'contain';
458
- }
459
- this.hostSrc = StringUtils.updateUrlParameter(this.src, 'size', String(wantedSize));
460
- this.changeDetectorRef.markForCheck();
461
- }
462
- };
463
- LazyImageDirective.prototype.isInsideViewport = function (element, threshold) {
464
- var ownerDocument = element.ownerDocument;
465
- var documentTop = window.pageYOffset || ownerDocument.body.scrollTop;
466
- var documentLeft = window.pageXOffset || ownerDocument.body.scrollLeft;
467
- var documentWidth = window.innerWidth || (ownerDocument.documentElement.clientWidth || document.body.clientWidth);
468
- var documentHeight = window.innerHeight || (ownerDocument.documentElement.clientHeight || document.body.clientHeight);
469
- var topOffset = element.getBoundingClientRect().top + documentTop - ownerDocument.documentElement.clientTop;
470
- var leftOffset = element.getBoundingClientRect().left + documentLeft - ownerDocument.documentElement.clientLeft;
471
- var isBelowViewport = documentHeight + documentTop <= topOffset - threshold;
472
- var isAtRightOfViewport = documentWidth + window.pageXOffset <= leftOffset - threshold;
473
- var isAboveViewport = documentTop >= topOffset + threshold + element.offsetHeight;
474
- var isAtLeftOfViewport = documentLeft >= leftOffset + threshold + element.offsetWidth;
475
- return !isBelowViewport && !isAboveViewport && !isAtRightOfViewport && !isAtLeftOfViewport;
476
- };
477
- LazyImageDirective.prototype.getDimension = function () {
478
- return {
479
- width: this.element.nativeElement.parentElement.offsetWidth,
480
- height: this.element.nativeElement.parentElement.offsetHeight,
481
- };
482
- };
483
- LazyImageDirective.prototype.isHidden = function (element) {
484
- return window.getComputedStyle(element).display === 'none';
485
- };
486
- return LazyImageDirective;
487
- }());
488
- LazyImageDirective.decorators = [
489
- { type: i0.Directive, args: [{ selector: '[ddrLazyImage]' },] }
490
- ];
491
- LazyImageDirective.ctorParameters = function () { return [
492
- { type: i0.ElementRef },
493
- { type: i0.ChangeDetectorRef }
494
- ]; };
495
- LazyImageDirective.propDecorators = {
496
- src: [{ type: i0.Input, args: ['ddrLazyImage',] }],
497
- objectFit: [{ type: i0.Input }],
498
- offset: [{ type: i0.Input }],
499
- hostSrc: [{ type: i0.HostBinding, args: ['src',] }],
500
- hostStyleWidthPx: [{ type: i0.HostBinding, args: ['style.width.px',] }],
501
- hostStyleHeightPx: [{ type: i0.HostBinding, args: ['style.height.px',] }],
502
- hostStyleObjectFit: [{ type: i0.HostBinding, args: ['style.object-fit',] }],
503
- windowResized: [{ type: i0.HostListener, args: ['window:resize', ['$event'],] }],
504
- windowScroll: [{ type: i0.HostListener, args: ['window:scroll', ['$event'],] }]
505
- };
506
- __decorate([
507
- Debounce()
508
- ], LazyImageDirective.prototype, "windowResized", null);
509
- __decorate([
510
- Limit()
511
- ], LazyImageDirective.prototype, "windowScroll", null);
512
-
513
- var BottomHitDirective = /** @class */ (function () {
514
- function BottomHitDirective() {
515
- this.offset = 1000;
516
- this.onWindowBottomHit = new i0.EventEmitter();
517
- this.onElementBottomHit = new i0.EventEmitter();
518
- }
519
- BottomHitDirective.prototype.scrolled = function ($event) {
520
- this.elementScrollEvent($event);
521
- };
522
- BottomHitDirective.prototype.windowScrolled = function ($event) {
523
- this.windowScrollEvent($event);
524
- };
525
- BottomHitDirective.prototype.windowScrollEvent = function ($event) {
526
- var pageHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
527
- var viewportHeight = document.documentElement.clientHeight;
528
- var scrollPosition = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
529
- var distanceToBottom = pageHeight - (scrollPosition + viewportHeight);
530
- if (distanceToBottom < this.offset) {
531
- this.onWindowBottomHit.emit();
532
- }
533
- };
534
- BottomHitDirective.prototype.elementScrollEvent = function ($event) {
535
- var target = $event.target;
536
- var scrollPosition = target.scrollHeight - target.scrollTop;
537
- var offsetHeight = target.offsetHeight;
538
- var isReachingBottom = (scrollPosition - offsetHeight) < this.offset;
539
- if (isReachingBottom) {
540
- this.onElementBottomHit.emit();
541
- }
542
- };
543
- return BottomHitDirective;
544
- }());
545
- BottomHitDirective.decorators = [
546
- { type: i0.Directive, args: [{
547
- selector: '[ddrBottomHit]'
548
- },] }
549
- ];
550
- BottomHitDirective.ctorParameters = function () { return []; };
551
- BottomHitDirective.propDecorators = {
552
- onWindowBottomHit: [{ type: i0.Output }],
553
- onElementBottomHit: [{ type: i0.Output }],
554
- scrolled: [{ type: i0.HostListener, args: ['scroll', ['$event'],] }],
555
- windowScrolled: [{ type: i0.HostListener, args: ['window:scroll', ['$event'],] }]
556
- };
557
- __decorate([
558
- Limit()
559
- ], BottomHitDirective.prototype, "scrolled", null);
560
- __decorate([
561
- Limit()
562
- ], BottomHitDirective.prototype, "windowScrolled", null);
563
-
564
- var DDR_STORAGE_PREFIX = new i0.InjectionToken('DDR_STORAGE_PREFIX');
565
- var DDR_JWT_REFRESH_TOKEN_URL = new i0.InjectionToken('DDR_JWT_REFRESH_TOKEN_URL');
566
- var DDR_LOGIN_PATH = new i0.InjectionToken('DDR_LOGIN_PATH');
567
- var DdrExtensionsModule = /** @class */ (function () {
568
- function DdrExtensionsModule() {
569
- }
570
- return DdrExtensionsModule;
571
- }());
572
- DdrExtensionsModule.decorators = [
573
- { type: i0.NgModule, args: [{
574
- declarations: [
575
- LazyImageDirective,
576
- BottomHitDirective
577
- ],
578
- imports: [],
579
- providers: [
580
- {
581
- provide: DDR_LOGIN_PATH,
582
- useValue: '/login'
583
- }
584
- ],
585
- exports: [
586
- LazyImageDirective,
587
- BottomHitDirective
588
- ]
589
- },] }
590
- ];
591
-
592
- // This service is based on the `ng2-cookies` package which sadly is not a service and does
593
- var CookieService = /** @class */ (function () {
594
- function CookieService(
595
- // The type `Document` may not be used here. Although a fix is on its way,
596
- // we will go with `any` for now to support Angular 2.4.x projects.
597
- // Issue: https://github.com/angular/angular/issues/12631
598
- // Fix: https://github.com/angular/angular/pull/14894
599
- document) {
600
- this.document = document;
601
- // To avoid issues with server side prerendering, check if `document` is defined.
602
- this.documentIsAccessible = document !== undefined;
603
- }
604
- /**
605
- * @param name Cookie name
606
- */
607
- CookieService.prototype.check = function (name) {
608
- if (!this.documentIsAccessible) {
609
- return false;
610
- }
611
- name = encodeURIComponent(name);
612
- var regExp = this.getCookieRegExp(name);
613
- return regExp.test(this.document.cookie);
614
- };
615
- /**
616
- * @param name Cookie name
617
- */
618
- CookieService.prototype.get = function (name) {
619
- if (this.documentIsAccessible && this.check(name)) {
620
- name = encodeURIComponent(name);
621
- var regExp = this.getCookieRegExp(name);
622
- var result = regExp.exec(this.document.cookie);
623
- return decodeURIComponent(result[1]);
624
- }
625
- else {
626
- return '';
627
- }
628
- };
629
- CookieService.prototype.getAll = function () {
630
- if (!this.documentIsAccessible) {
631
- return {};
632
- }
633
- var cookies = {};
634
- var document = this.document;
635
- if (document.cookie && document.cookie !== '') {
636
- var split = document.cookie.split(';');
637
- for (var i = 0; i < split.length; i += 1) {
638
- var currentCookie = split[i].split('=');
639
- currentCookie[0] = currentCookie[0].replace(/^ /, '');
640
- cookies[decodeURIComponent(currentCookie[0])] = decodeURIComponent(currentCookie[1]);
641
- }
642
- }
643
- return cookies;
644
- };
645
- /**
646
- * @param name Cookie name
647
- * @param value Cookie value
648
- * @param expires Number of days until the cookies expires or an actual `Date`
649
- * @param path Cookie path
650
- * @param domain Cookie domain
651
- * @param secure Secure flag
652
- */
653
- CookieService.prototype.set = function (name, value, expires, path, domain, secure) {
654
- if (!this.documentIsAccessible) {
655
- return;
656
- }
657
- var cookieString = encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';
658
- if (expires) {
659
- if (typeof expires === 'number') {
660
- var dateExpires = new Date(new Date().getTime() + expires * 1000 * 60 * 60 * 24);
661
- cookieString += 'expires=' + dateExpires.toUTCString() + ';';
662
- }
663
- else {
664
- cookieString += 'expires=' + expires.toUTCString() + ';';
665
- }
666
- }
667
- if (path) {
668
- cookieString += 'path=' + path + ';';
669
- }
670
- if (domain) {
671
- cookieString += 'domain=' + domain + ';';
672
- }
673
- if (secure) {
674
- cookieString += 'secure;';
675
- }
676
- this.document.cookie = cookieString;
677
- };
678
- /**
679
- * @param name Cookie name
680
- * @param path Cookie path
681
- * @param domain Cookie domain
682
- */
683
- CookieService.prototype.delete = function (name, path, domain) {
684
- if (!this.documentIsAccessible) {
685
- return;
686
- }
687
- this.set(name, '', -1, path, domain);
688
- };
689
- /**
690
- * @param path Cookie path
691
- * @param domain Cookie domain
692
- */
693
- CookieService.prototype.deleteAll = function (path, domain) {
694
- if (!this.documentIsAccessible) {
695
- return;
696
- }
697
- var cookies = this.getAll();
698
- for (var cookieName in cookies) {
699
- if (cookies.hasOwnProperty(cookieName)) {
700
- this.delete(cookieName, path, domain);
701
- }
702
- }
703
- };
704
- /**
705
- * @param name Cookie name
706
- */
707
- CookieService.prototype.getCookieRegExp = function (name) {
708
- var escapedName = name.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/ig, '\\$1');
709
- return new RegExp('(?:^' + escapedName + '|;\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');
710
- };
711
- return CookieService;
712
- }());
713
- CookieService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CookieService_Factory() { return new CookieService(i0.ɵɵinject(i1.DOCUMENT)); }, token: CookieService, providedIn: "root" });
714
- CookieService.decorators = [
715
- { type: i0.Injectable, args: [{
716
- providedIn: 'root'
717
- },] }
718
- ];
719
- CookieService.ctorParameters = function () { return [
720
- { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }
721
- ]; };
722
-
723
- var CollectionUtils = /** @class */ (function () {
724
- function CollectionUtils() {
725
- }
726
- /**
727
- * Maps an array into a Map by a specific property which should be unique.
728
- * TODO: Maybe there is something like that in typescript, couldn't find it yet.
729
- */
730
- CollectionUtils.mapByProperty = function (entries, property) {
731
- var e_1, _a;
732
- var map = new Map();
733
- try {
734
- for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
735
- var entry = entries_1_1.value;
736
- map.set(entry[property], entry);
737
- }
738
- }
739
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
740
- finally {
741
- try {
742
- if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
743
- }
744
- finally { if (e_1) throw e_1.error; }
745
- }
746
- return map;
747
- };
748
- /**
749
- * Maps an array into a Map by a specified property and aggregates them into an array.
750
- * TODO: Maybe there is something like that in typescript, couldn't find it yet.
751
- */
752
- CollectionUtils.mapArrayByProperty = function (entries, property) {
753
- var e_2, _a;
754
- var map = new Map();
755
- try {
756
- for (var entries_2 = __values(entries), entries_2_1 = entries_2.next(); !entries_2_1.done; entries_2_1 = entries_2.next()) {
757
- var entry = entries_2_1.value;
758
- var value = entry[property];
759
- if (!map.has(value)) {
760
- map.set(value, []);
761
- }
762
- map.get(value).push(entry);
763
- }
764
- }
765
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
766
- finally {
767
- try {
768
- if (entries_2_1 && !entries_2_1.done && (_a = entries_2.return)) _a.call(entries_2);
769
- }
770
- finally { if (e_2) throw e_2.error; }
771
- }
772
- return map;
773
- };
774
- return CollectionUtils;
775
- }());
776
-
777
- var ObjectUtils = /** @class */ (function () {
778
- function ObjectUtils() {
779
- }
780
- ObjectUtils.deepCopy = function (value) {
781
- return JSON.parse(JSON.stringify(value));
782
- };
783
- return ObjectUtils;
784
- }());
785
-
786
- var ScrollService = /** @class */ (function () {
787
- function ScrollService(router, viewportScroller) {
788
- var _this = this;
789
- this.router = router;
790
- this.viewportScroller = viewportScroller;
791
- this.scrollPositionMap = new Map();
792
- this.router.events
793
- .subscribe(function (e) {
794
- if (e instanceof i1$1.NavigationStart) {
795
- _this.scrollPositionMap.set(_this.router.url, _this.viewportScroller.getScrollPosition());
796
- }
797
- });
798
- }
799
- ScrollService.prototype.restore = function () {
800
- var _this = this;
801
- var url = this.router.url;
802
- if (this.scrollPositionMap.has(url)) {
803
- /* Restore after timeout so rendering was completed */
804
- setTimeout(function () {
805
- _this.viewportScroller.scrollToPosition(_this.scrollPositionMap.get(url));
806
- }, 1);
807
- }
808
- };
809
- return ScrollService;
810
- }());
811
- ScrollService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollService_Factory() { return new ScrollService(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(i1.ViewportScroller)); }, token: ScrollService, providedIn: "root" });
812
- ScrollService.decorators = [
813
- { type: i0.Injectable, args: [{
814
- providedIn: 'root'
815
- },] }
816
- ];
817
- ScrollService.ctorParameters = function () { return [
818
- { type: i1$1.Router },
819
- { type: i1.ViewportScroller }
820
- ]; };
821
-
822
- var VisibilityService = /** @class */ (function () {
823
- function VisibilityService() {
824
- this.visibility$ = rxjs.merge(rxjs.fromEvent(document, 'visibilitychange'), rxjs.fromEvent(window, 'focus'), rxjs.fromEvent(window, 'blur')).pipe(operators.debounceTime(50), operators.startWith(true), operators.map(function () { return document.hasFocus(); }), operators.distinctUntilChanged(), operators.shareReplay(1));
825
- }
826
- VisibilityService.prototype.getVisibilityObservable = function () {
827
- return this.visibility$;
828
- };
829
- return VisibilityService;
830
- }());
831
- VisibilityService.ɵprov = i0.ɵɵdefineInjectable({ factory: function VisibilityService_Factory() { return new VisibilityService(); }, token: VisibilityService, providedIn: "root" });
832
- VisibilityService.decorators = [
833
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
834
- ];
835
- VisibilityService.ctorParameters = function () { return []; };
836
-
837
- var WithCredentialsInterceptor = /** @class */ (function () {
838
- function WithCredentialsInterceptor() {
839
- }
840
- /**
841
- * @override
842
- */
843
- WithCredentialsInterceptor.prototype.intercept = function (req, next) {
844
- var cloned = req.clone({
845
- withCredentials: true
846
- });
847
- return next.handle(cloned);
848
- };
849
- return WithCredentialsInterceptor;
850
- }());
851
- WithCredentialsInterceptor.decorators = [
852
- { type: i0.Injectable }
853
- ];
854
-
855
- var UrlInfo = /** @class */ (function () {
856
- function UrlInfo() {
857
- }
858
- UrlInfo.parse = function (urlString) {
859
- var parser = document.createElement('a');
860
- parser.href = urlString;
861
- var urlInfo = new UrlInfo();
862
- urlInfo.protocol = parser.protocol;
863
- urlInfo.host = parser.host;
864
- urlInfo.hostname = parser.hostname;
865
- urlInfo.port = parser.port;
866
- urlInfo.pathname = parser.pathname;
867
- urlInfo.hash = parser.hash;
868
- urlInfo.search = parser.search;
869
- return urlInfo;
870
- };
871
- UrlInfo.prototype.getRoot = function () {
872
- var root = this.protocol + '//' + this.hostname;
873
- if (this.port != null && this.port !== '' && this.port !== '80') {
874
- root += ':' + this.port;
875
- }
876
- return root;
877
- };
878
- UrlInfo.prototype.getUrl = function () {
879
- return this.getRoot() + this.pathname;
880
- };
881
- return UrlInfo;
882
- }());
883
-
884
- var RedirectToLoginInterceptor = /** @class */ (function () {
885
- function RedirectToLoginInterceptor(router, loginPath) {
886
- this.router = router;
887
- this.loginPath = loginPath;
888
- }
889
- /**
890
- * @override
891
- */
892
- RedirectToLoginInterceptor.prototype.intercept = function (req, next) {
893
- var _this = this;
894
- return next.handle(req).pipe(operators.catchError(function (err) {
895
- if (err instanceof http.HttpErrorResponse) {
896
- if (err.status === 401) {
897
- _this.router.navigate([_this.loginPath]);
898
- }
899
- }
900
- return rxjs.throwError(err);
901
- }));
902
- };
903
- return RedirectToLoginInterceptor;
904
- }());
905
- RedirectToLoginInterceptor.decorators = [
906
- { type: i0.Injectable }
907
- ];
908
- RedirectToLoginInterceptor.ctorParameters = function () { return [
909
- { type: i1$1.Router },
910
- { type: undefined, decorators: [{ type: i0.Inject, args: [DDR_LOGIN_PATH,] }] }
911
- ]; };
912
-
913
- var JwtService = /** @class */ (function () {
914
- function JwtService(storagePrefix) {
915
- this.storagePrefix = storagePrefix;
916
- }
917
- /**
918
- * Sets the current token and a refresh token.
919
- */
920
- JwtService.prototype.setTokens = function (token, refreshToken) {
921
- this.setToken(token);
922
- localStorage.setItem(this.getRefreshTokenStorageKey(), refreshToken);
923
- };
924
- /**
925
- * Sets the current token.
926
- */
927
- JwtService.prototype.setToken = function (token) {
928
- this.token = token;
929
- var decodedToken = JSON.parse(atob(token.split('.')[1]));
930
- this.tokenExpiry = decodedToken.exp * 1000;
931
- console.log('New refresh token, expiry', new Date(this.tokenExpiry));
932
- };
933
- /**
934
- * Gets the current token.
935
- */
936
- JwtService.prototype.getToken = function () {
937
- return this.token;
938
- };
939
- /**
940
- * Gets the refresh token.
941
- */
942
- JwtService.prototype.getRefreshToken = function () {
943
- return localStorage.getItem(this.getRefreshTokenStorageKey());
944
- };
945
- /**
946
- * Checks if the current token expired.
947
- */
948
- JwtService.prototype.isExpired = function () {
949
- var now = new Date().getTime();
950
- return null == this.tokenExpiry || this.tokenExpiry < now;
951
- };
952
- /**
953
- * Checks if the current token is about to expire.
954
- * @param expiryMs
955
- */
956
- JwtService.prototype.isAboutToExpire = function (expiryMs) {
957
- if (expiryMs === void 0) { expiryMs = 60000; }
958
- var now = new Date().getTime();
959
- return null == this.tokenExpiry || this.tokenExpiry - expiryMs < now;
960
- };
961
- /**
962
- * Clears all token information.
963
- */
964
- JwtService.prototype.clear = function () {
965
- this.token = null;
966
- this.tokenExpiry = null;
967
- localStorage.removeItem(this.getRefreshTokenStorageKey());
968
- };
969
- JwtService.prototype.getRefreshTokenStorageKey = function () {
970
- return this.storagePrefix + '.jwt.refresh_token';
971
- };
972
- return JwtService;
973
- }());
974
- JwtService.ɵprov = i0.ɵɵdefineInjectable({ factory: function JwtService_Factory() { return new JwtService(i0.ɵɵinject(DDR_STORAGE_PREFIX)); }, token: JwtService, providedIn: "root" });
975
- JwtService.decorators = [
976
- { type: i0.Injectable, args: [{
977
- providedIn: 'root'
978
- },] }
979
- ];
980
- JwtService.ctorParameters = function () { return [
981
- { type: String, decorators: [{ type: i0.Inject, args: [DDR_STORAGE_PREFIX,] }] }
982
- ]; };
983
-
984
- var JwtInterceptor = /** @class */ (function () {
985
- function JwtInterceptor(jwtService) {
986
- this.jwtService = jwtService;
987
- }
988
- /**
989
- * @override
990
- */
991
- JwtInterceptor.prototype.intercept = function (req, next) {
992
- var token = this.jwtService.getToken();
993
- if (null !== token && !this.jwtService.isExpired()) {
994
- req = req.clone({
995
- headers: req.headers.set('Authorization', 'Bearer ' + token)
996
- });
997
- }
998
- return next.handle(req);
999
- };
1000
- return JwtInterceptor;
1001
- }());
1002
- JwtInterceptor.decorators = [
1003
- { type: i0.Injectable }
1004
- ];
1005
- JwtInterceptor.ctorParameters = function () { return [
1006
- { type: JwtService }
1007
- ]; };
1008
-
1009
- var JwtRefreshTokenInterceptor = /** @class */ (function () {
1010
- function JwtRefreshTokenInterceptor(jwtService, httpClient, jwtRefreshTokenUrl) {
1011
- this.jwtService = jwtService;
1012
- this.httpClient = httpClient;
1013
- this.jwtRefreshTokenUrl = jwtRefreshTokenUrl;
1014
- }
1015
- /**
1016
- * @override
1017
- */
1018
- JwtRefreshTokenInterceptor.prototype.intercept = function (req, next) {
1019
- if (this.jwtService.isAboutToExpire() && !(req.url === this.jwtRefreshTokenUrl)) {
1020
- var refreshToken = this.jwtService.getRefreshToken();
1021
- if (null != refreshToken) {
1022
- return this.getRefreshTokenRequest(refreshToken).pipe(operators.switchMap(function () { return next.handle(req); }));
1023
- }
1024
- }
1025
- return next.handle(req);
1026
- };
1027
- JwtRefreshTokenInterceptor.prototype.getRefreshTokenRequest = function (refreshToken) {
1028
- var _this = this;
1029
- if (null == this.refreshTokenRequest$) {
1030
- var refreshTokenRequest = this.httpClient.post(this.jwtRefreshTokenUrl, { refresh_token: refreshToken }).pipe(operators.map(function (response) {
1031
- _this.jwtService.setTokens(response.token, response.refresh_token);
1032
- _this.refreshTokenRequest$ = null;
1033
- return response;
1034
- }), operators.catchError(function (error) {
1035
- _this.jwtService.clear();
1036
- _this.refreshTokenRequest$ = null;
1037
- return rxjs.of(null);
1038
- }), operators.shareReplay(1));
1039
- this.refreshTokenRequest$ = refreshTokenRequest;
1040
- return refreshTokenRequest;
1041
- }
1042
- return this.refreshTokenRequest$;
1043
- };
1044
- return JwtRefreshTokenInterceptor;
1045
- }());
1046
- JwtRefreshTokenInterceptor.decorators = [
1047
- { type: i0.Injectable }
1048
- ];
1049
- JwtRefreshTokenInterceptor.ctorParameters = function () { return [
1050
- { type: JwtService },
1051
- { type: http.HttpClient },
1052
- { type: String, decorators: [{ type: i0.Inject, args: [DDR_JWT_REFRESH_TOKEN_URL,] }] }
1053
- ]; };
1054
-
1055
- /*
1056
- * Public API Surface of ngx-extensions
1057
- */
1058
-
1059
- /**
1060
- * Generated bundle index. Do not edit.
1061
- */
1062
-
1063
- exports.BottomHitDirective = BottomHitDirective;
1064
- exports.CollectionUtils = CollectionUtils;
1065
- exports.CookieService = CookieService;
1066
- exports.DDR_JWT_REFRESH_TOKEN_URL = DDR_JWT_REFRESH_TOKEN_URL;
1067
- exports.DDR_LOGIN_PATH = DDR_LOGIN_PATH;
1068
- exports.DDR_STORAGE_PREFIX = DDR_STORAGE_PREFIX;
1069
- exports.DdrExtensionsModule = DdrExtensionsModule;
1070
- exports.Debounce = Debounce;
1071
- exports.JwtInterceptor = JwtInterceptor;
1072
- exports.JwtRefreshTokenInterceptor = JwtRefreshTokenInterceptor;
1073
- exports.JwtService = JwtService;
1074
- exports.LazyImageDirective = LazyImageDirective;
1075
- exports.Limit = Limit;
1076
- exports.NumberUtils = NumberUtils;
1077
- exports.ObjectUtils = ObjectUtils;
1078
- exports.RedirectToLoginInterceptor = RedirectToLoginInterceptor;
1079
- exports.ScrollService = ScrollService;
1080
- exports.StringUtils = StringUtils;
1081
- exports.UrlInfo = UrlInfo;
1082
- exports.VisibilityService = VisibilityService;
1083
- exports.WithCredentialsInterceptor = WithCredentialsInterceptor;
1084
-
1085
- Object.defineProperty(exports, '__esModule', { value: true });
1086
-
1087
- })));
1088
- //# sourceMappingURL=dontdrinkandroot-ngx-extensions.umd.js.map