@dontdrinkandroot/ngx-extensions 0.20.0 → 0.21.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.
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InjectionToken, Injectable, inject, makeEnvironmentProviders, EventEmitter, HostListener, Output, Directive } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, ViewportScroller } from '@angular/common';
|
|
4
4
|
import { Router, NavigationStart } from '@angular/router';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
|
-
import { merge, fromEvent, throwError } from 'rxjs';
|
|
7
|
-
import { debounceTime, startWith, map, distinctUntilChanged, shareReplay
|
|
6
|
+
import { merge, fromEvent, catchError, throwError } from 'rxjs';
|
|
7
|
+
import { debounceTime, startWith, map, distinctUntilChanged, shareReplay } from 'rxjs/operators';
|
|
8
8
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
9
9
|
|
|
10
|
+
class Storage {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const DDR_LOGIN_PATH = new InjectionToken('DDR_LOGIN_PATH');
|
|
14
|
+
const DDR_STORAGE_PREFIX = new InjectionToken('DDR_STORAGE_PREFIX');
|
|
15
|
+
const DDR_WITH_CREDENTIALS_PATTERN = new InjectionToken('DDR_WITH_CREDENTIALS_PATTERN');
|
|
16
|
+
|
|
10
17
|
class Logger {
|
|
11
18
|
debugEnabled = false;
|
|
12
19
|
infoEnabled = true;
|
|
@@ -47,18 +54,14 @@ class ConsoleLogger extends Logger {
|
|
|
47
54
|
console.error(...data);
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConsoleLogger, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
58
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConsoleLogger });
|
|
52
59
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConsoleLogger, decorators: [{
|
|
54
61
|
type: Injectable
|
|
55
62
|
}] });
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
class StorageService {
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
class LocalStorageService extends StorageService {
|
|
64
|
+
class LocalStorageStorage extends Storage {
|
|
62
65
|
storagePrefix = inject(DDR_STORAGE_PREFIX);
|
|
63
66
|
logger = inject(Logger);
|
|
64
67
|
/**
|
|
@@ -94,60 +97,61 @@ class LocalStorageService extends StorageService {
|
|
|
94
97
|
getFullKey(key) {
|
|
95
98
|
return this.storagePrefix + '.' + key;
|
|
96
99
|
}
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
98
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
100
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LocalStorageStorage, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
101
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LocalStorageStorage });
|
|
99
102
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LocalStorageStorage, decorators: [{
|
|
101
104
|
type: Injectable
|
|
102
105
|
}] });
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Provides the Logger service.
|
|
109
|
+
*/
|
|
110
|
+
function provideDdrLogger(options) {
|
|
111
|
+
return makeEnvironmentProviders([
|
|
112
|
+
{
|
|
113
|
+
provide: Logger,
|
|
114
|
+
useClass: options?.implementation ?? ConsoleLogger
|
|
115
|
+
}
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Provides the Storage service with an optional prefix.
|
|
120
|
+
*/
|
|
121
|
+
function provideDdrStorage(options) {
|
|
122
|
+
return makeEnvironmentProviders([
|
|
123
|
+
{
|
|
124
|
+
provide: DDR_STORAGE_PREFIX,
|
|
125
|
+
useValue: options?.prefix ?? 'ddr'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
provide: Storage,
|
|
129
|
+
useClass: options?.implementation ?? LocalStorageStorage
|
|
130
|
+
}
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Provides the RedirectToLogin configuration.
|
|
135
|
+
*/
|
|
136
|
+
function provideDdrRedirectToLoginPath(loginPath = '/login') {
|
|
137
|
+
return makeEnvironmentProviders([
|
|
138
|
+
{
|
|
139
|
+
provide: DDR_LOGIN_PATH,
|
|
140
|
+
useValue: loginPath
|
|
141
|
+
}
|
|
142
|
+
]);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Provides the WithCredentials configuration.
|
|
146
|
+
*/
|
|
147
|
+
function provideDdrWithCredentialsPattern(pattern = /.*/) {
|
|
148
|
+
return makeEnvironmentProviders([
|
|
149
|
+
{
|
|
150
|
+
provide: DDR_WITH_CREDENTIALS_PATTERN,
|
|
151
|
+
useValue: pattern
|
|
152
|
+
}
|
|
153
|
+
]);
|
|
126
154
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DdrExtensionsModule, decorators: [{
|
|
128
|
-
type: NgModule,
|
|
129
|
-
args: [{
|
|
130
|
-
imports: [],
|
|
131
|
-
providers: [
|
|
132
|
-
{
|
|
133
|
-
provide: DDR_LOGIN_PATH,
|
|
134
|
-
useValue: '/login'
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
provide: Logger,
|
|
138
|
-
useClass: ConsoleLogger
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
provide: DDR_STORAGE_PREFIX,
|
|
142
|
-
useValue: 'ddr'
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
provide: StorageService,
|
|
146
|
-
useClass: LocalStorageService
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
}]
|
|
150
|
-
}] });
|
|
151
155
|
|
|
152
156
|
// This service is based on the `ng2-cookies` package which sadly is not a service and does
|
|
153
157
|
// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.
|
|
@@ -266,10 +270,10 @@ class CookieService {
|
|
|
266
270
|
const escapedName = name.replace(/([[\]{}()|=;+?,.*^$])/ig, '\\$1');
|
|
267
271
|
return new RegExp('(?:^' + escapedName + '|;\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');
|
|
268
272
|
}
|
|
269
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
270
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CookieService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
274
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CookieService, providedIn: 'root' });
|
|
271
275
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CookieService, decorators: [{
|
|
273
277
|
type: Injectable,
|
|
274
278
|
args: [{
|
|
275
279
|
providedIn: 'root'
|
|
@@ -388,10 +392,10 @@ class ScrollService {
|
|
|
388
392
|
}, 1);
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
392
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
396
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ScrollService, providedIn: 'root' });
|
|
393
397
|
}
|
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ScrollService, decorators: [{
|
|
395
399
|
type: Injectable,
|
|
396
400
|
args: [{
|
|
397
401
|
providedIn: 'root'
|
|
@@ -457,8 +461,8 @@ class BottomHitDirective {
|
|
|
457
461
|
this.elementBottomHit.emit();
|
|
458
462
|
}
|
|
459
463
|
}
|
|
460
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
461
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
464
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BottomHitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
465
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BottomHitDirective, isStandalone: true, selector: "[ddrBottomHit]", outputs: { windowBottomHit: "windowBottomHit", elementBottomHit: "elementBottomHit" }, host: { listeners: { "scroll": "scrolled($event)", "window:scroll": "windowScrolled()" } }, ngImport: i0 });
|
|
462
466
|
}
|
|
463
467
|
__decorate([
|
|
464
468
|
Limit()
|
|
@@ -466,7 +470,7 @@ __decorate([
|
|
|
466
470
|
__decorate([
|
|
467
471
|
Limit()
|
|
468
472
|
], BottomHitDirective.prototype, "windowScrolled", null);
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BottomHitDirective, decorators: [{
|
|
470
474
|
type: Directive,
|
|
471
475
|
args: [{
|
|
472
476
|
selector: '[ddrBottomHit]',
|
|
@@ -491,30 +495,24 @@ class VisibilityService {
|
|
|
491
495
|
getVisibilityObservable() {
|
|
492
496
|
return this.visibility$;
|
|
493
497
|
}
|
|
494
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
498
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
499
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VisibilityService, providedIn: 'root' });
|
|
496
500
|
}
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VisibilityService, decorators: [{
|
|
498
502
|
type: Injectable,
|
|
499
503
|
args: [{ providedIn: 'root' }]
|
|
500
504
|
}], ctorParameters: () => [] });
|
|
501
505
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
*/
|
|
506
|
-
intercept(req, next) {
|
|
506
|
+
const withCredentialsInterceptor = (req, next) => {
|
|
507
|
+
const pattern = inject(DDR_WITH_CREDENTIALS_PATTERN, { optional: true });
|
|
508
|
+
if (pattern === null || pattern.test(req.url)) {
|
|
507
509
|
const cloned = req.clone({
|
|
508
510
|
withCredentials: true
|
|
509
511
|
});
|
|
510
|
-
return next
|
|
512
|
+
return next(cloned);
|
|
511
513
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: WithCredentialsInterceptor, decorators: [{
|
|
516
|
-
type: Injectable
|
|
517
|
-
}] });
|
|
514
|
+
return next(req);
|
|
515
|
+
};
|
|
518
516
|
|
|
519
517
|
class UrlInfo {
|
|
520
518
|
protocol;
|
|
@@ -549,28 +547,16 @@ class UrlInfo {
|
|
|
549
547
|
}
|
|
550
548
|
}
|
|
551
549
|
|
|
552
|
-
|
|
553
|
-
router = inject(Router);
|
|
554
|
-
loginPath = inject(DDR_LOGIN_PATH);
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
return
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
this.router.navigate([this.loginPath]);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
return throwError(err);
|
|
566
|
-
}));
|
|
567
|
-
}
|
|
568
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RedirectToLoginInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
569
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RedirectToLoginInterceptor });
|
|
570
|
-
}
|
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RedirectToLoginInterceptor, decorators: [{
|
|
572
|
-
type: Injectable
|
|
573
|
-
}] });
|
|
550
|
+
const redirectToLoginInterceptor = (req, next) => {
|
|
551
|
+
const router = inject(Router);
|
|
552
|
+
const loginPath = inject(DDR_LOGIN_PATH, { optional: true }) ?? '/login';
|
|
553
|
+
return next(req).pipe(catchError((err) => {
|
|
554
|
+
if (err instanceof HttpErrorResponse && err.status === 401) {
|
|
555
|
+
router.navigate([loginPath]);
|
|
556
|
+
}
|
|
557
|
+
return throwError(() => err);
|
|
558
|
+
}));
|
|
559
|
+
};
|
|
574
560
|
|
|
575
561
|
function isNonNull(value) {
|
|
576
562
|
return value != null;
|
|
@@ -584,5 +570,5 @@ function isNonNull(value) {
|
|
|
584
570
|
* Generated bundle index. Do not edit.
|
|
585
571
|
*/
|
|
586
572
|
|
|
587
|
-
export { BottomHitDirective, CollectionUtils, CookieService, DDR_LOGIN_PATH, DDR_STORAGE_PREFIX,
|
|
573
|
+
export { BottomHitDirective, CollectionUtils, ConsoleLogger, CookieService, DDR_LOGIN_PATH, DDR_STORAGE_PREFIX, DDR_WITH_CREDENTIALS_PATTERN, Debounce, Limit, Logger, NumberUtils, ObjectUtils, ScrollService, Storage, StringUtils, TypeUtils, UrlInfo, VisibilityService, isNonNull, provideDdrLogger, provideDdrRedirectToLoginPath, provideDdrStorage, provideDdrWithCredentialsPattern, redirectToLoginInterceptor, withCredentialsInterceptor };
|
|
588
574
|
//# sourceMappingURL=dontdrinkandroot-ngx-extensions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dontdrinkandroot-ngx-extensions.mjs","sources":["../../src/logger/logger.service.ts","../../src/logger/console-logger.service.ts","../../src/storage/storage.service.ts","../../src/storage/local-storage.service.ts","../../src/ddr-extensions.module.ts","../../src/cookie/cookie.service.ts","../../src/util/object-utils.ts","../../src/util/collection-utils.ts","../../src/util/string-utils.ts","../../src/util/number-utils.ts","../../src/util/type-utils.ts","../../src/scroll/scroll.service.ts","../../src/methoddecorator/debounce.ts","../../src/methoddecorator/limit.ts","../../src/scroll/bottom-hit.directive.ts","../../src/visibility/visibility.service.ts","../../src/http/with-credentials-interceptor.service.ts","../../src/http/url-info.ts","../../src/http/redirect-to-login-interceptor.service.ts","../../src/typeguard/is-non-null.ts","../../public-api.ts","../../dontdrinkandroot-ngx-extensions.ts"],"sourcesContent":["export abstract class Logger\n{\n public debugEnabled = false;\n\n public infoEnabled = true;\n\n public warnEnabled = true;\n\n public errorEnabled = true;\n\n public abstract debug(...data: unknown[]): void;\n\n public abstract info(...data: unknown[]): void;\n\n public abstract warn(...data: unknown[]): void;\n\n public abstract error(...data: unknown[]): void;\n}\n","import {Logger} from './logger.service';\nimport {Injectable} from '@angular/core';\n\n@Injectable()\nexport class ConsoleLogger extends Logger\n{\n /**\n * @override\n */\n public debug(...data: unknown[]): void\n {\n if (this.debugEnabled) {\n console.debug(...data);\n }\n }\n\n /**\n * @override\n */\n public info(...data: unknown[]): void\n {\n if (this.infoEnabled) {\n console.info(...data);\n }\n }\n\n /**\n * @override\n */\n public warn(...data: unknown[]): void\n {\n if (this.warnEnabled) {\n console.warn(...data);\n }\n }\n\n /**\n * @override\n */\n public error(...data: unknown[]): void\n {\n if (this.errorEnabled) {\n console.error(...data);\n }\n }\n}\n","import {InjectionToken} from \"@angular/core\";\n\nexport const DDR_STORAGE_PREFIX = new InjectionToken<string>('storage-prefix');\n\nexport abstract class StorageService\n{\n public abstract store<T>(key: string, value: T): void;\n\n public abstract retrieve<T>(key: string, defaultValue?: T): T | null;\n\n public abstract remove(key: string): void;\n}\n","import {DDR_STORAGE_PREFIX, StorageService} from './storage.service';\nimport {inject, Injectable} from '@angular/core';\nimport {Logger} from '../logger/logger.service';\n\n@Injectable()\nexport class LocalStorageService extends StorageService\n{\n protected storagePrefix = inject(DDR_STORAGE_PREFIX);\n protected logger = inject(Logger);\n\n /**\n * @override\n */\n public retrieve<T>(key: string, defaultValue: T | null = null): T | null\n {\n const fullKey = this.getFullKey(key);\n const valueJson = localStorage.getItem(fullKey);\n if (null == valueJson) {\n return defaultValue;\n }\n\n try {\n return JSON.parse(valueJson);\n } catch (e) {\n this.logger.warn('Could not parse json value', valueJson, e);\n localStorage.removeItem(fullKey);\n return null;\n }\n }\n\n /**\n * @override\n */\n public store<T>(key: string, value: T): void\n {\n localStorage.setItem(this.getFullKey(key), JSON.stringify(value));\n }\n\n /**\n * @override\n */\n public remove(key: string)\n {\n localStorage.removeItem(this.getFullKey(key));\n }\n\n protected getFullKey(key: string): string\n {\n return this.storagePrefix + '.' + key;\n }\n}\n","import {InjectionToken, NgModule} from '@angular/core';\nimport {Logger} from './logger/logger.service';\nimport {ConsoleLogger} from './logger/console-logger.service';\nimport {DDR_STORAGE_PREFIX, StorageService} from './storage/storage.service';\nimport {LocalStorageService} from './storage/local-storage.service';\n\nexport const DDR_LOGIN_PATH = new InjectionToken<string>('DDR_LOGIN_PATH');\n\n@NgModule({\n imports: [],\n providers: [\n {\n provide: DDR_LOGIN_PATH,\n useValue: '/login'\n },\n {\n provide: Logger,\n useClass: ConsoleLogger\n },\n {\n provide: DDR_STORAGE_PREFIX,\n useValue: 'ddr'\n },\n {\n provide: StorageService,\n useClass: LocalStorageService\n },\n ],\n})\nexport class DdrExtensionsModule\n{\n}\n","// This service is based on the `ng2-cookies` package which sadly is not a service and does\n// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.\n// Package: https://github.com/BCJTI/ng2-cookies\n\nimport {inject, Injectable} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CookieService {\n private document = inject<Document>(DOCUMENT);\n\n // To avoid issues with server side prerendering, check if `document` is defined.\n private readonly documentIsAccessible: boolean = this.document !== undefined;\n\n /**\n * @param name Cookie name\n */\n check(name: string): boolean {\n if (!this.documentIsAccessible) {\n return false;\n }\n\n name = encodeURIComponent(name);\n\n const regExp: RegExp = this.getCookieRegExp(name);\n return regExp.test(this.document.cookie);\n }\n\n /**\n * @param name Cookie name\n */\n get(name: string): string {\n if (this.documentIsAccessible && this.check(name)) {\n name = encodeURIComponent(name);\n\n const regExp = this.getCookieRegExp(name);\n const result = regExp.exec(this.document.cookie);\n if (null == result) return ''\n\n return decodeURIComponent(result[1]);\n } else {\n return '';\n }\n }\n\n parse(): Record<string, string> {\n if (!this.documentIsAccessible) {\n return {};\n }\n\n const cookieRecord: Record<string, string> = {};\n const document = this.document;\n\n if (document.cookie && document.cookie !== '') {\n const cookieParts = document.cookie.split(';');\n for (const currentCookie of cookieParts) {\n const cookie = currentCookie.split('=');\n const cookieName = cookie[0].replace(/^ /, '');\n const cookieValue = cookie[1];\n cookieRecord[cookieName] = decodeURIComponent(cookieValue);\n }\n }\n\n return cookieRecord;\n }\n\n /**\n * @param name Cookie name\n * @param value Cookie value\n * @param expires Number of days until the cookies expires or an actual `Date`\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Secure flag\n */\n set(\n name: string,\n value: string,\n expires?: number | Date,\n path?: string,\n domain?: string,\n secure?: boolean\n ): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n let cookieString: string = encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';\n\n if (expires) {\n if (typeof expires === 'number') {\n const dateExpires: Date = new Date(new Date().getTime() + expires * 1000 * 60 * 60 * 24);\n\n cookieString += 'expires=' + dateExpires.toUTCString() + ';';\n } else {\n cookieString += 'expires=' + expires.toUTCString() + ';';\n }\n }\n\n if (path) {\n cookieString += 'path=' + path + ';';\n }\n\n if (domain) {\n cookieString += 'domain=' + domain + ';';\n }\n\n if (secure) {\n cookieString += 'secure;';\n }\n\n this.document.cookie = cookieString;\n }\n\n /**\n * @param name Cookie name\n * @param path Cookie path\n * @param domain Cookie domain\n */\n delete(name: string, path?: string, domain?: string): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n this.set(name, '', -1, path, domain);\n }\n\n /**\n * @param path Cookie path\n * @param domain Cookie domain\n */\n deleteAll(path?: string, domain?: string): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n const cookies = this.parse();\n\n for (const cookieName in cookies) {\n if (Object.hasOwn(cookies, cookieName)) {\n this.delete(cookieName, path, domain);\n }\n }\n }\n\n /**\n * @param name Cookie name\n */\n private getCookieRegExp(name: string): RegExp {\n const escapedName: string = name.replace(/([[\\]{}()|=;+?,.*^$])/ig, '\\\\$1');\n\n return new RegExp('(?:^' + escapedName + '|;\\\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');\n }\n}\n","export class ObjectUtils\n{\n public static deepCopy<T>(value: T): T\n {\n return JSON.parse(JSON.stringify(value));\n }\n\n public static getProperty<T, K extends keyof T>(o: T, propertyName: K): T[K]\n {\n return o[propertyName];\n }\n}\n","import {ObjectUtils} from './object-utils';\n\nexport class CollectionUtils\n{\n /**\n * Maps an array into a Map by a specific property which should be unique.\n */\n public static mapByProperty<V extends object, K extends keyof V>(entries: V[], property: K): Map<V[K], V>\n {\n const map = new Map<V[K], V>();\n for (const entry of entries) {\n map.set(ObjectUtils.getProperty(entry, property), entry);\n }\n\n return map;\n }\n\n /**\n * Maps an array into a Map by a specified property and aggregates them into an array.\n */\n public static mapArrayByProperty<V extends object, K extends keyof V>(entries: V[], property: K): Map<V[K], V[]>\n {\n const map = new Map<V[K], V[]>();\n for (const entry of entries) {\n const value = ObjectUtils.getProperty(entry, property);\n const existingEntries = map.get(value) ?? []\n existingEntries.push(entry)\n map.set(value, existingEntries)\n }\n\n return map;\n }\n}\n","export class StringUtils\n{\n public static capitalizeFirstLetter(text: string): string\n {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n public static stripTrailingSlash(text: string): string\n {\n const lastChar = text.charAt(text.length - 1);\n if ('/' === lastChar) {\n return text.slice(0, text.length - 1);\n }\n\n return text;\n }\n\n public static updateUrlParameter(uri: string, key: string, value: string): string\n {\n // remove the hash part before operating on the uri\n const i = uri.indexOf('#');\n const hash = i === -1 ? '' : uri.substr(i);\n uri = i === -1 ? uri : uri.substr(0, i);\n\n const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');\n const separator = uri.indexOf('?') !== -1 ? '&' : '?';\n if (uri.match(re)) {\n uri = uri.replace(re, '$1' + key + '=' + value + '$2');\n } else {\n uri = uri + separator + key + '=' + value;\n }\n return uri + hash; // finally append the hash as well\n }\n\n public static createRandomString(lengthOfCode: number, possible: string): string\n {\n let text = '';\n for (let i = 0; i < lengthOfCode; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }\n}\n","export class NumberUtils\n{\n public static getNextPowerOfTwo(value: number): number\n {\n let target = 2;\n while (target < value) {\n target *= 2;\n }\n\n return target;\n }\n}\n","export class TypeUtils\n{\n public static notNull<T>(value: T | null | undefined, message = 'Value must not be null'): T\n {\n if (null == value) {\n throw new Error(message);\n }\n\n return value;\n }\n}\n","import {NavigationStart, Router} from '@angular/router';\nimport {ViewportScroller} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollService\n{\n private router = inject(Router);\n private viewportScroller = inject(ViewportScroller);\n\n private scrollPositionMap: Map<string, [number, number]> = new Map<string, [number, number]>();\n\n constructor()\n {\n this.router.events\n .subscribe(e => {\n if (e instanceof NavigationStart) {\n this.scrollPositionMap.set(this.router.url, this.viewportScroller.getScrollPosition());\n }\n });\n }\n\n public restore(): void\n {\n const url = this.router.url;\n if (this.scrollPositionMap.has(url)) {\n /* Restore after timeout so rendering was completed */\n setTimeout(() => {\n const scrollPosition = this.scrollPositionMap.get(url);\n if (null != scrollPosition) this.viewportScroller.scrollToPosition(scrollPosition);\n }, 1);\n }\n }\n}\n","export function Debounce(delay = 250): MethodDecorator\n{\n let timeoutReference: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line\n return (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>) => {\n const original = descriptor.value\n descriptor.value = function (...args: unknown[]) {\n if (null != timeoutReference) clearTimeout(timeoutReference);\n timeoutReference = setTimeout(() => original.apply(this, args), delay);\n };\n\n return descriptor;\n };\n}\n","export function Limit(rate = 250): MethodDecorator\n{\n let timeoutReference: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line\n return (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>) => {\n const original = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n if (null == timeoutReference) {\n timeoutReference = setTimeout(() => {\n original.apply(this, args);\n timeoutReference = null\n }, rate);\n }\n };\n\n return descriptor;\n };\n}\n","import {Directive, EventEmitter, HostListener, Output} from '@angular/core';\nimport {Limit} from '../methoddecorator/limit';\n\n@Directive({\n selector: '[ddrBottomHit]',\n})\nexport class BottomHitDirective\n{\n public offset = 1000;\n\n @Output()\n public windowBottomHit = new EventEmitter();\n\n @Output()\n private elementBottomHit = new EventEmitter();\n\n @HostListener('scroll', ['$event'])\n @Limit()\n public scrolled($event: Event): void\n {\n this.elementScrollEvent($event);\n }\n\n @HostListener('window:scroll')\n @Limit()\n public windowScrolled(): void\n {\n this.windowScrollEvent();\n }\n\n protected windowScrollEvent(): void\n {\n const pageHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n const viewportHeight = document.documentElement.clientHeight;\n const scrollPosition = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;\n const distanceToBottom = pageHeight - (scrollPosition + viewportHeight);\n if (distanceToBottom < this.offset) {\n this.windowBottomHit.emit();\n }\n }\n\n protected elementScrollEvent($event: Event): void\n {\n const target = $event.target as HTMLElement;\n const scrollPosition = target.scrollHeight - target.scrollTop;\n const offsetHeight = target.offsetHeight;\n const isReachingBottom = (scrollPosition - offsetHeight) < this.offset;\n if (isReachingBottom) {\n this.elementBottomHit.emit();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, map, shareReplay, startWith} from 'rxjs/operators';\n\n@Injectable({providedIn: 'root'})\nexport class VisibilityService\n{\n private readonly visibility$: Observable<boolean>;\n\n constructor()\n {\n this.visibility$ = merge(\n fromEvent(document, 'visibilitychange'),\n fromEvent(window, 'focus'),\n fromEvent(window, 'blur')\n ).pipe(\n debounceTime(50),\n startWith(true),\n map(() => document.hasFocus()),\n distinctUntilChanged(),\n shareReplay(1),\n );\n }\n\n public getVisibilityObservable(): Observable<boolean>\n {\n return this.visibility$;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {Observable} from 'rxjs';\n\n@Injectable()\nexport class WithCredentialsInterceptor implements HttpInterceptor\n{\n /**\n * @override\n */\n public intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>\n {\n const cloned = req.clone({\n withCredentials: true\n });\n\n return next.handle(cloned);\n }\n}\n","export class UrlInfo\n{\n protected constructor(\n public readonly protocol: string,\n public readonly host: string,\n public readonly hostname: string,\n public readonly port: number,\n public readonly pathname: string,\n public readonly hash: string,\n public readonly search: string\n )\n {\n }\n\n public static parse(urlString: string): UrlInfo\n {\n const parser = document.createElement('a');\n parser.href = urlString;\n\n return new UrlInfo(\n parser.protocol,\n parser.host,\n parser.hostname,\n parser.port === '' ? 80 : +parser.port,\n parser.pathname,\n parser.hash,\n parser.search,\n );\n }\n\n public getRoot(): string\n {\n let root = this.protocol + '//' + this.hostname;\n if (this.port !== 80) root += ':' + this.port;\n\n return root;\n }\n\n public getUrl(): string\n {\n return this.getRoot() + this.pathname;\n }\n}\n","import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {inject, Injectable} from '@angular/core';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError} from 'rxjs/operators';\nimport {Router} from '@angular/router';\nimport {DDR_LOGIN_PATH} from '../ddr-extensions.module';\n\n@Injectable()\nexport class RedirectToLoginInterceptor implements HttpInterceptor\n{\n private router = inject(Router);\n private loginPath = inject(DDR_LOGIN_PATH);\n\n /**\n * @override\n */\n public intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>\n {\n return next.handle(req).pipe(catchError((err) => {\n\n if (err instanceof HttpErrorResponse) {\n if (err.status === 401) {\n this.router.navigate([this.loginPath]);\n }\n }\n\n return throwError(err);\n }));\n }\n}\n","export function isNonNull<T>(value: T): value is NonNullable<T>\n{\n return value != null;\n}\n","/*\n * Public API Surface of ngx-extensions\n */\n\nexport * from './src/ddr-extensions.module';\nexport * from './src/cookie/cookie.service';\nexport * from './src/util/collection-utils';\nexport * from './src/util/string-utils';\nexport * from './src/util/object-utils';\nexport * from './src/util/number-utils';\nexport * from './src/util/type-utils';\nexport * from './src/scroll/scroll.service';\nexport * from './src/methoddecorator/debounce';\nexport * from './src/methoddecorator/limit';\nexport * from './src/scroll/bottom-hit.directive';\nexport * from './src/visibility/visibility.service';\n\nexport * from './src/http/with-credentials-interceptor.service';\nexport * from './src/http/url-info';\nexport * from './src/http/redirect-to-login-interceptor.service';\n\nexport * from './src/storage/storage.service';\n\nexport * from './src/typeguard/is-non-null';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAAsB,MAAM,CAAA;IAEjB,YAAY,GAAG,KAAK;IAEpB,WAAW,GAAG,IAAI;IAElB,WAAW,GAAG,IAAI;IAElB,YAAY,GAAG,IAAI;AAS7B;;ACbK,MAAO,aAAc,SAAQ,MAAM,CAAA;AAErC;;AAEG;IACI,KAAK,CAAC,GAAG,I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,EAAE,IAAiB,EAAA;AAEzD,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,KAAI;AAE5C,YAAA,IAAI,GAAG,YAAY,iBAAiB,EAAE;AAClC,gBAAA,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;oBACpB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;;;AAI9C,YAAA,OAAO,UAAU,CAAC,GAAG,CAAC;SACzB,CAAC,CAAC;;uGAnBE,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAA1B,0BAA0B,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;;ACPK,SAAU,SAAS,CAAI,KAAQ,EAAA;IAEjC,OAAO,KAAK,IAAI,IAAI;AACxB;;ACHA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"dontdrinkandroot-ngx-extensions.mjs","sources":["../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/storage/storage.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/tokens.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/logger/logger.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/logger/console-logger.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/storage/local-storage-storage.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/providers.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/cookie/cookie.service.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/util/object-utils.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/util/collection-utils.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/util/string-utils.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/util/number-utils.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/util/type-utils.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/scroll/scroll.service.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/methoddecorator/debounce.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/methoddecorator/limit.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/scroll/bottom-hit.directive.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/visibility/visibility.service.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/http/with-credentials.interceptor.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/http/url-info.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/http/redirect-to-login.interceptor.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/lib/typeguard/is-non-null.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/public-api.ts","../../../../projects/dontdrinkandroot/ngx-extensions/src/dontdrinkandroot-ngx-extensions.ts"],"sourcesContent":["export abstract class Storage\n{\n public abstract store<T>(key: string, value: T): void;\n\n public abstract retrieve<T>(key: string, defaultValue?: T): T | null;\n\n public abstract remove(key: string): void;\n}\n","import {InjectionToken} from '@angular/core';\n\nexport const DDR_LOGIN_PATH = new InjectionToken<string>('DDR_LOGIN_PATH');\nexport const DDR_STORAGE_PREFIX = new InjectionToken<string>('DDR_STORAGE_PREFIX');\nexport const DDR_WITH_CREDENTIALS_PATTERN = new InjectionToken<RegExp>('DDR_WITH_CREDENTIALS_PATTERN');\n","export abstract class Logger\n{\n public debugEnabled = false;\n\n public infoEnabled = true;\n\n public warnEnabled = true;\n\n public errorEnabled = true;\n\n public abstract debug(...data: unknown[]): void;\n\n public abstract info(...data: unknown[]): void;\n\n public abstract warn(...data: unknown[]): void;\n\n public abstract error(...data: unknown[]): void;\n}\n","import {Injectable} from '@angular/core';\nimport {Logger} from \"./logger\";\n\n@Injectable()\nexport class ConsoleLogger extends Logger\n{\n /**\n * @override\n */\n public debug(...data: unknown[]): void\n {\n if (this.debugEnabled) {\n console.debug(...data);\n }\n }\n\n /**\n * @override\n */\n public info(...data: unknown[]): void\n {\n if (this.infoEnabled) {\n console.info(...data);\n }\n }\n\n /**\n * @override\n */\n public warn(...data: unknown[]): void\n {\n if (this.warnEnabled) {\n console.warn(...data);\n }\n }\n\n /**\n * @override\n */\n public error(...data: unknown[]): void\n {\n if (this.errorEnabled) {\n console.error(...data);\n }\n }\n}\n","import {Storage} from './storage';\nimport {inject, Injectable} from '@angular/core';\nimport {DDR_STORAGE_PREFIX} from '../tokens';\nimport {Logger} from \"../logger/logger\";\n\n@Injectable()\nexport class LocalStorageStorage extends Storage\n{\n protected storagePrefix = inject(DDR_STORAGE_PREFIX);\n protected logger = inject(Logger);\n\n /**\n * @override\n */\n public retrieve<T>(key: string, defaultValue: T | null = null): T | null\n {\n const fullKey = this.getFullKey(key);\n const valueJson = localStorage.getItem(fullKey);\n if (null == valueJson) {\n return defaultValue;\n }\n\n try {\n return JSON.parse(valueJson);\n } catch (e) {\n this.logger.warn('Could not parse json value', valueJson, e);\n localStorage.removeItem(fullKey);\n return null;\n }\n }\n\n /**\n * @override\n */\n public store<T>(key: string, value: T): void\n {\n localStorage.setItem(this.getFullKey(key), JSON.stringify(value));\n }\n\n /**\n * @override\n */\n public remove(key: string)\n {\n localStorage.removeItem(this.getFullKey(key));\n }\n\n protected getFullKey(key: string): string\n {\n return this.storagePrefix + '.' + key;\n }\n}\n","import {EnvironmentProviders, makeEnvironmentProviders, Type} from '@angular/core';\nimport {Storage} from './storage/storage';\nimport {DDR_LOGIN_PATH, DDR_STORAGE_PREFIX, DDR_WITH_CREDENTIALS_PATTERN} from './tokens';\nimport {Logger} from \"./logger/logger\";\nimport {ConsoleLogger} from \"./logger/console-logger\";\nimport {LocalStorageStorage} from \"./storage/local-storage-storage\";\n\n/**\n * Provides the Logger service.\n */\nexport function provideDdrLogger(options?: {\n implementation?: Type<Logger>\n}): EnvironmentProviders\n{\n return makeEnvironmentProviders([\n {\n provide: Logger,\n useClass: options?.implementation ?? ConsoleLogger\n }\n ]);\n}\n\n/**\n * Provides the Storage service with an optional prefix.\n */\nexport function provideDdrStorage(options?: {\n prefix?: string,\n implementation?: Type<Storage>\n}): EnvironmentProviders\n{\n return makeEnvironmentProviders([\n {\n provide: DDR_STORAGE_PREFIX,\n useValue: options?.prefix ?? 'ddr'\n },\n {\n provide: Storage,\n useClass: options?.implementation ?? LocalStorageStorage\n }\n ]);\n}\n\n/**\n * Provides the RedirectToLogin configuration.\n */\nexport function provideDdrRedirectToLoginPath(loginPath: string = '/login'): EnvironmentProviders\n{\n return makeEnvironmentProviders([\n {\n provide: DDR_LOGIN_PATH,\n useValue: loginPath\n }\n ]);\n}\n\n/**\n * Provides the WithCredentials configuration.\n */\nexport function provideDdrWithCredentialsPattern(pattern: RegExp = /.*/): EnvironmentProviders\n{\n return makeEnvironmentProviders([\n {\n provide: DDR_WITH_CREDENTIALS_PATTERN,\n useValue: pattern\n }\n ]);\n}\n","// This service is based on the `ng2-cookies` package which sadly is not a service and does\n// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.\n// Package: https://github.com/BCJTI/ng2-cookies\n\nimport {inject, Injectable} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CookieService\n{\n private document = inject<Document>(DOCUMENT);\n\n // To avoid issues with server side prerendering, check if `document` is defined.\n private readonly documentIsAccessible: boolean = this.document !== undefined;\n\n /**\n * @param name Cookie name\n */\n check(name: string): boolean\n {\n if (!this.documentIsAccessible) {\n return false;\n }\n\n name = encodeURIComponent(name);\n\n const regExp: RegExp = this.getCookieRegExp(name);\n return regExp.test(this.document.cookie);\n }\n\n /**\n * @param name Cookie name\n */\n get(name: string): string\n {\n if (this.documentIsAccessible && this.check(name)) {\n name = encodeURIComponent(name);\n\n const regExp = this.getCookieRegExp(name);\n const result = regExp.exec(this.document.cookie);\n if (null == result) return ''\n\n return decodeURIComponent(result[1]);\n } else {\n return '';\n }\n }\n\n parse(): Record<string, string>\n {\n if (!this.documentIsAccessible) {\n return {};\n }\n\n const cookieRecord: Record<string, string> = {};\n const document = this.document;\n\n if (document.cookie && document.cookie !== '') {\n const cookieParts = document.cookie.split(';');\n for (const currentCookie of cookieParts) {\n const cookie = currentCookie.split('=');\n const cookieName = cookie[0].replace(/^ /, '');\n const cookieValue = cookie[1];\n cookieRecord[cookieName] = decodeURIComponent(cookieValue);\n }\n }\n\n return cookieRecord;\n }\n\n /**\n * @param name Cookie name\n * @param value Cookie value\n * @param expires Number of days until the cookies expires or an actual `Date`\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Secure flag\n */\n set(\n name: string,\n value: string,\n expires?: number | Date,\n path?: string,\n domain?: string,\n secure?: boolean\n ): void\n {\n if (!this.documentIsAccessible) {\n return;\n }\n\n let cookieString: string = encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';\n\n if (expires) {\n if (typeof expires === 'number') {\n const dateExpires: Date = new Date(new Date().getTime() + expires * 1000 * 60 * 60 * 24);\n\n cookieString += 'expires=' + dateExpires.toUTCString() + ';';\n } else {\n cookieString += 'expires=' + expires.toUTCString() + ';';\n }\n }\n\n if (path) {\n cookieString += 'path=' + path + ';';\n }\n\n if (domain) {\n cookieString += 'domain=' + domain + ';';\n }\n\n if (secure) {\n cookieString += 'secure;';\n }\n\n this.document.cookie = cookieString;\n }\n\n /**\n * @param name Cookie name\n * @param path Cookie path\n * @param domain Cookie domain\n */\n delete(name: string, path?: string, domain?: string): void\n {\n if (!this.documentIsAccessible) {\n return;\n }\n\n this.set(name, '', -1, path, domain);\n }\n\n /**\n * @param path Cookie path\n * @param domain Cookie domain\n */\n deleteAll(path?: string, domain?: string): void\n {\n if (!this.documentIsAccessible) {\n return;\n }\n\n const cookies = this.parse();\n\n for (const cookieName in cookies) {\n if (Object.hasOwn(cookies, cookieName)) {\n this.delete(cookieName, path, domain);\n }\n }\n }\n\n /**\n * @param name Cookie name\n */\n private getCookieRegExp(name: string): RegExp\n {\n const escapedName: string = name.replace(/([[\\]{}()|=;+?,.*^$])/ig, '\\\\$1');\n\n return new RegExp('(?:^' + escapedName + '|;\\\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');\n }\n}\n","export class ObjectUtils\n{\n public static deepCopy<T>(value: T): T\n {\n return JSON.parse(JSON.stringify(value));\n }\n\n public static getProperty<T, K extends keyof T>(o: T, propertyName: K): T[K]\n {\n return o[propertyName];\n }\n}\n","import {ObjectUtils} from './object-utils';\n\nexport class CollectionUtils\n{\n /**\n * Maps an array into a Map by a specific property which should be unique.\n */\n public static mapByProperty<V extends object, K extends keyof V>(entries: V[], property: K): Map<V[K], V>\n {\n const map = new Map<V[K], V>();\n for (const entry of entries) {\n map.set(ObjectUtils.getProperty(entry, property), entry);\n }\n\n return map;\n }\n\n /**\n * Maps an array into a Map by a specified property and aggregates them into an array.\n */\n public static mapArrayByProperty<V extends object, K extends keyof V>(entries: V[], property: K): Map<V[K], V[]>\n {\n const map = new Map<V[K], V[]>();\n for (const entry of entries) {\n const value = ObjectUtils.getProperty(entry, property);\n const existingEntries = map.get(value) ?? []\n existingEntries.push(entry)\n map.set(value, existingEntries)\n }\n\n return map;\n }\n}\n","export class StringUtils\n{\n public static capitalizeFirstLetter(text: string): string\n {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n public static stripTrailingSlash(text: string): string\n {\n const lastChar = text.charAt(text.length - 1);\n if ('/' === lastChar) {\n return text.slice(0, text.length - 1);\n }\n\n return text;\n }\n\n public static updateUrlParameter(uri: string, key: string, value: string): string\n {\n // remove the hash part before operating on the uri\n const i = uri.indexOf('#');\n const hash = i === -1 ? '' : uri.substr(i);\n uri = i === -1 ? uri : uri.substr(0, i);\n\n const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');\n const separator = uri.indexOf('?') !== -1 ? '&' : '?';\n if (uri.match(re)) {\n uri = uri.replace(re, '$1' + key + '=' + value + '$2');\n } else {\n uri = uri + separator + key + '=' + value;\n }\n return uri + hash; // finally append the hash as well\n }\n\n public static createRandomString(lengthOfCode: number, possible: string): string\n {\n let text = '';\n for (let i = 0; i < lengthOfCode; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }\n}\n","export class NumberUtils\n{\n public static getNextPowerOfTwo(value: number): number\n {\n let target = 2;\n while (target < value) {\n target *= 2;\n }\n\n return target;\n }\n}\n","export class TypeUtils\n{\n public static notNull<T>(value: T | null | undefined, message = 'Value must not be null'): T\n {\n if (null == value) {\n throw new Error(message);\n }\n\n return value;\n }\n}\n","import {NavigationStart, Router} from '@angular/router';\nimport {ViewportScroller} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollService\n{\n private router = inject(Router);\n private viewportScroller = inject(ViewportScroller);\n\n private scrollPositionMap: Map<string, [number, number]> = new Map<string, [number, number]>();\n\n constructor()\n {\n this.router.events\n .subscribe(e => {\n if (e instanceof NavigationStart) {\n this.scrollPositionMap.set(this.router.url, this.viewportScroller.getScrollPosition());\n }\n });\n }\n\n public restore(): void\n {\n const url = this.router.url;\n if (this.scrollPositionMap.has(url)) {\n /* Restore after timeout so rendering was completed */\n setTimeout(() => {\n const scrollPosition = this.scrollPositionMap.get(url);\n if (null != scrollPosition) this.viewportScroller.scrollToPosition(scrollPosition);\n }, 1);\n }\n }\n}\n","export function Debounce(delay = 250): MethodDecorator\n{\n let timeoutReference: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line\n return (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>) => {\n const original = descriptor.value\n descriptor.value = function (...args: unknown[]) {\n if (null != timeoutReference) clearTimeout(timeoutReference);\n timeoutReference = setTimeout(() => original.apply(this, args), delay);\n };\n\n return descriptor;\n };\n}\n","export function Limit(rate = 250): MethodDecorator\n{\n let timeoutReference: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line\n return (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>) => {\n const original = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n if (null == timeoutReference) {\n timeoutReference = setTimeout(() => {\n original.apply(this, args);\n timeoutReference = null\n }, rate);\n }\n };\n\n return descriptor;\n };\n}\n","import {Directive, EventEmitter, HostListener, Output} from '@angular/core';\nimport {Limit} from '../methoddecorator/limit';\n\n@Directive({\n selector: '[ddrBottomHit]',\n})\nexport class BottomHitDirective\n{\n public offset = 1000;\n\n @Output()\n public windowBottomHit = new EventEmitter();\n\n @Output()\n private elementBottomHit = new EventEmitter();\n\n @HostListener('scroll', ['$event'])\n @Limit()\n public scrolled($event: Event): void\n {\n this.elementScrollEvent($event);\n }\n\n @HostListener('window:scroll')\n @Limit()\n public windowScrolled(): void\n {\n this.windowScrollEvent();\n }\n\n protected windowScrollEvent(): void\n {\n const pageHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n const viewportHeight = document.documentElement.clientHeight;\n const scrollPosition = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;\n const distanceToBottom = pageHeight - (scrollPosition + viewportHeight);\n if (distanceToBottom < this.offset) {\n this.windowBottomHit.emit();\n }\n }\n\n protected elementScrollEvent($event: Event): void\n {\n const target = $event.target as HTMLElement;\n const scrollPosition = target.scrollHeight - target.scrollTop;\n const offsetHeight = target.offsetHeight;\n const isReachingBottom = (scrollPosition - offsetHeight) < this.offset;\n if (isReachingBottom) {\n this.elementBottomHit.emit();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, map, shareReplay, startWith} from 'rxjs/operators';\n\n@Injectable({providedIn: 'root'})\nexport class VisibilityService\n{\n private readonly visibility$: Observable<boolean>;\n\n constructor()\n {\n this.visibility$ = merge(\n fromEvent(document, 'visibilitychange'),\n fromEvent(window, 'focus'),\n fromEvent(window, 'blur')\n ).pipe(\n debounceTime(50),\n startWith(true),\n map(() => document.hasFocus()),\n distinctUntilChanged(),\n shareReplay(1),\n );\n }\n\n public getVisibilityObservable(): Observable<boolean>\n {\n return this.visibility$;\n }\n}\n","import {HttpInterceptorFn} from '@angular/common/http';\nimport {inject} from '@angular/core';\nimport {DDR_WITH_CREDENTIALS_PATTERN} from '../tokens';\n\nexport const withCredentialsInterceptor: HttpInterceptorFn = (req, next) => {\n const pattern = inject(DDR_WITH_CREDENTIALS_PATTERN, {optional: true});\n\n if (pattern === null || pattern.test(req.url)) {\n const cloned = req.clone({\n withCredentials: true\n });\n return next(cloned);\n }\n\n return next(req);\n};\n","export class UrlInfo\n{\n protected constructor(\n public readonly protocol: string,\n public readonly host: string,\n public readonly hostname: string,\n public readonly port: number,\n public readonly pathname: string,\n public readonly hash: string,\n public readonly search: string\n )\n {\n }\n\n public static parse(urlString: string): UrlInfo\n {\n const parser = document.createElement('a');\n parser.href = urlString;\n\n return new UrlInfo(\n parser.protocol,\n parser.host,\n parser.hostname,\n parser.port === '' ? 80 : +parser.port,\n parser.pathname,\n parser.hash,\n parser.search,\n );\n }\n\n public getRoot(): string\n {\n let root = this.protocol + '//' + this.hostname;\n if (this.port !== 80) root += ':' + this.port;\n\n return root;\n }\n\n public getUrl(): string\n {\n return this.getRoot() + this.pathname;\n }\n}\n","import {HttpErrorResponse, HttpInterceptorFn} from '@angular/common/http';\nimport {inject} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {catchError, throwError} from 'rxjs';\nimport {DDR_LOGIN_PATH} from '../tokens';\n\nexport const redirectToLoginInterceptor: HttpInterceptorFn = (req, next) => {\n const router = inject(Router);\n const loginPath = inject(DDR_LOGIN_PATH, {optional: true}) ?? '/login';\n\n return next(req).pipe(\n catchError((err) => {\n if (err instanceof HttpErrorResponse && err.status === 401) {\n router.navigate([loginPath]);\n }\n return throwError(() => err);\n })\n );\n};\n","export function isNonNull<T>(value: T): value is NonNullable<T>\n{\n return value != null;\n}\n","/*\n * Public API Surface of ngx-extensions\n */\n\nexport * from './lib/providers';\nexport * from './lib/tokens';\nexport * from './lib/cookie/cookie.service';\nexport * from './lib/util/collection-utils';\nexport * from './lib/util/string-utils';\nexport * from './lib/util/object-utils';\nexport * from './lib/util/number-utils';\nexport * from './lib/util/type-utils';\nexport * from './lib/scroll/scroll.service';\nexport * from './lib/methoddecorator/debounce';\nexport * from './lib/methoddecorator/limit';\nexport * from './lib/scroll/bottom-hit.directive';\nexport * from './lib/visibility/visibility.service';\n\nexport * from './lib/http/with-credentials.interceptor';\nexport * from './lib/http/url-info';\nexport * from './lib/http/redirect-to-login.interceptor';\n\nexport * from './lib/storage/storage';\nexport * from './lib/logger/logger';\nexport * from './lib/logger/console-logger';\n\nexport * from './lib/typeguard/is-non-null';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAAsB,OAAO,CAAA;AAO5B;;MCLY,cAAc,GAAG,IAAI,cAAc,CAAS,gBAAgB;MAC5D,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;MACpE,4BAA4B,GAAG,IAAI,cAAc,CAAS,8BAA8B;;MCJ/E,MAAM,CAAA;IAEjB,YAAY,GAAG,KAAK;IAEpB,WAAW,GAAG,IAAI;IAElB,WAAW,GAAG,IAAI;IAElB,YAAY,GAAG,IAAI;AAS7B;;ACbK,MAAO,aAAc,SAAQ,MAAM,CAAA;AAErC;;AAEG;IACI,KAAK,CAAC,GAAG,IAAe,EAAA;AAE3B,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;QAC1B;IACJ;AAEA;;AAEG;IACI,IAAI,CAAC,GAAG,IAAe,EAAA;AAE1B,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AAClB,YAAA,OAAO,CAAC,IAAI,CAAC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AACL;;AClBM,SAAU,SAAS,CAAI,KAAQ,EAAA;IAEjC,OAAO,KAAK,IAAI,IAAI;AACxB;;ACHA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dontdrinkandroot/ngx-extensions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/dontdrinkandroot/ngx-libs.ts.git",
|
|
7
|
+
"directory": "projects/dontdrinkandroot/ngx-extensions"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/dontdrinkandroot/ngx-libs.ts",
|
|
10
|
+
"license": "Apache-2.0",
|
|
4
11
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
12
|
+
"@angular/common": "^21.0.0",
|
|
13
|
+
"@angular/core": "^21.0.0"
|
|
7
14
|
},
|
|
8
15
|
"dependencies": {
|
|
9
16
|
"tslib": "^2.3.0"
|
|
10
17
|
},
|
|
11
18
|
"sideEffects": false,
|
|
12
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
13
19
|
"module": "fesm2022/dontdrinkandroot-ngx-extensions.mjs",
|
|
14
|
-
"typings": "
|
|
20
|
+
"typings": "types/dontdrinkandroot-ngx-extensions.d.ts",
|
|
15
21
|
"exports": {
|
|
16
22
|
"./package.json": {
|
|
17
23
|
"default": "./package.json"
|
|
18
24
|
},
|
|
19
25
|
".": {
|
|
20
|
-
"types": "./
|
|
26
|
+
"types": "./types/dontdrinkandroot-ngx-extensions.d.ts",
|
|
21
27
|
"default": "./fesm2022/dontdrinkandroot-ngx-extensions.mjs"
|
|
22
28
|
}
|
|
23
29
|
}
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EventEmitter } from '@angular/core';
|
|
2
|
+
import { Type, EnvironmentProviders, InjectionToken, EventEmitter } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { HttpInterceptorFn } from '@angular/common/http';
|
|
5
5
|
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DdrExtensionsModule>;
|
|
6
|
+
declare abstract class Storage {
|
|
7
|
+
abstract store<T>(key: string, value: T): void;
|
|
8
|
+
abstract retrieve<T>(key: string, defaultValue?: T): T | null;
|
|
9
|
+
abstract remove(key: string): void;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
declare abstract class Logger {
|
|
13
|
+
debugEnabled: boolean;
|
|
14
|
+
infoEnabled: boolean;
|
|
15
|
+
warnEnabled: boolean;
|
|
16
|
+
errorEnabled: boolean;
|
|
17
|
+
abstract debug(...data: unknown[]): void;
|
|
18
|
+
abstract info(...data: unknown[]): void;
|
|
19
|
+
abstract warn(...data: unknown[]): void;
|
|
20
|
+
abstract error(...data: unknown[]): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Provides the Logger service.
|
|
25
|
+
*/
|
|
26
|
+
declare function provideDdrLogger(options?: {
|
|
27
|
+
implementation?: Type<Logger>;
|
|
28
|
+
}): EnvironmentProviders;
|
|
29
|
+
/**
|
|
30
|
+
* Provides the Storage service with an optional prefix.
|
|
31
|
+
*/
|
|
32
|
+
declare function provideDdrStorage(options?: {
|
|
33
|
+
prefix?: string;
|
|
34
|
+
implementation?: Type<Storage>;
|
|
35
|
+
}): EnvironmentProviders;
|
|
36
|
+
/**
|
|
37
|
+
* Provides the RedirectToLogin configuration.
|
|
38
|
+
*/
|
|
39
|
+
declare function provideDdrRedirectToLoginPath(loginPath?: string): EnvironmentProviders;
|
|
40
|
+
/**
|
|
41
|
+
* Provides the WithCredentials configuration.
|
|
42
|
+
*/
|
|
43
|
+
declare function provideDdrWithCredentialsPattern(pattern?: RegExp): EnvironmentProviders;
|
|
44
|
+
|
|
45
|
+
declare const DDR_LOGIN_PATH: InjectionToken<string>;
|
|
46
|
+
declare const DDR_STORAGE_PREFIX: InjectionToken<string>;
|
|
47
|
+
declare const DDR_WITH_CREDENTIALS_PATTERN: InjectionToken<RegExp>;
|
|
48
|
+
|
|
13
49
|
declare class CookieService {
|
|
14
50
|
private document;
|
|
15
51
|
private readonly documentIsAccessible;
|
|
@@ -115,14 +151,7 @@ declare class VisibilityService {
|
|
|
115
151
|
static ɵprov: i0.ɵɵInjectableDeclaration<VisibilityService>;
|
|
116
152
|
}
|
|
117
153
|
|
|
118
|
-
declare
|
|
119
|
-
/**
|
|
120
|
-
* @override
|
|
121
|
-
*/
|
|
122
|
-
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
123
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WithCredentialsInterceptor, never>;
|
|
124
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WithCredentialsInterceptor>;
|
|
125
|
-
}
|
|
154
|
+
declare const withCredentialsInterceptor: HttpInterceptorFn;
|
|
126
155
|
|
|
127
156
|
declare class UrlInfo {
|
|
128
157
|
readonly protocol: string;
|
|
@@ -138,24 +167,29 @@ declare class UrlInfo {
|
|
|
138
167
|
getUrl(): string;
|
|
139
168
|
}
|
|
140
169
|
|
|
141
|
-
declare
|
|
142
|
-
|
|
143
|
-
|
|
170
|
+
declare const redirectToLoginInterceptor: HttpInterceptorFn;
|
|
171
|
+
|
|
172
|
+
declare class ConsoleLogger extends Logger {
|
|
144
173
|
/**
|
|
145
174
|
* @override
|
|
146
175
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
176
|
+
debug(...data: unknown[]): void;
|
|
177
|
+
/**
|
|
178
|
+
* @override
|
|
179
|
+
*/
|
|
180
|
+
info(...data: unknown[]): void;
|
|
181
|
+
/**
|
|
182
|
+
* @override
|
|
183
|
+
*/
|
|
184
|
+
warn(...data: unknown[]): void;
|
|
185
|
+
/**
|
|
186
|
+
* @override
|
|
187
|
+
*/
|
|
188
|
+
error(...data: unknown[]): void;
|
|
189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleLogger, never>;
|
|
190
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleLogger>;
|
|
157
191
|
}
|
|
158
192
|
|
|
159
193
|
declare function isNonNull<T>(value: T): value is NonNullable<T>;
|
|
160
194
|
|
|
161
|
-
export { BottomHitDirective, CollectionUtils, CookieService, DDR_LOGIN_PATH, DDR_STORAGE_PREFIX,
|
|
195
|
+
export { BottomHitDirective, CollectionUtils, ConsoleLogger, CookieService, DDR_LOGIN_PATH, DDR_STORAGE_PREFIX, DDR_WITH_CREDENTIALS_PATTERN, Debounce, Limit, Logger, NumberUtils, ObjectUtils, ScrollService, Storage, StringUtils, TypeUtils, UrlInfo, VisibilityService, isNonNull, provideDdrLogger, provideDdrRedirectToLoginPath, provideDdrStorage, provideDdrWithCredentialsPattern, redirectToLoginInterceptor, withCredentialsInterceptor };
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|