angular-toolbox 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/esm2022/lib/angular-toolbox.module.mjs +7 -3
- package/esm2022/lib/component/angular-toolbox-logo/angular-toolbox-logo.component.mjs +18 -0
- package/esm2022/lib/component/index.mjs +9 -0
- package/esm2022/lib/core/abstract/abstract-subscription-manager.mjs +113 -0
- package/esm2022/lib/core/abstract/abstract-version-manager.mjs +37 -0
- package/esm2022/lib/core/abstract/index.mjs +3 -0
- package/esm2022/lib/core/impl/version/version.impl.mjs +6 -3
- package/esm2022/lib/core/index.mjs +2 -1
- package/esm2022/lib/model/business/index.mjs +2 -1
- package/esm2022/lib/model/business/subscription/index.mjs +2 -0
- package/esm2022/lib/model/business/subscription/subscription-manager.mjs +9 -0
- package/esm2022/lib/model/business/version/index.mjs +2 -1
- package/esm2022/lib/model/business/version/version-config.mjs +1 -1
- package/esm2022/lib/model/business/version/version-manager.mjs +10 -0
- package/esm2022/lib/model/business/version/version.mjs +1 -1
- package/esm2022/lib/model/service/subscription/subscription.service.mjs +6 -98
- package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +38 -0
- package/esm2022/lib/model/service/version/version.service.mjs +4 -20
- package/esm2022/lib/pipe/safe/safe-html.pipe.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/angular-toolbox.mjs +289 -169
- package/fesm2022/angular-toolbox.mjs.map +1 -1
- package/lib/component/angular-toolbox-logo/angular-toolbox-logo.component.d.ts +5 -0
- package/lib/component/index.d.ts +8 -0
- package/lib/core/abstract/abstract-subscription-manager.d.ts +73 -0
- package/lib/core/abstract/abstract-version-manager.d.ts +34 -0
- package/lib/core/abstract/index.d.ts +2 -0
- package/lib/core/impl/version/version.impl.d.ts +5 -1
- package/lib/core/index.d.ts +1 -0
- package/lib/model/business/index.d.ts +1 -0
- package/lib/model/business/subscription/index.d.ts +1 -0
- package/lib/model/business/subscription/subscription-manager.d.ts +52 -0
- package/lib/model/business/version/index.d.ts +1 -0
- package/lib/model/business/version/version-config.d.ts +4 -0
- package/lib/model/business/version/version-manager.d.ts +25 -0
- package/lib/model/business/version/version.d.ts +4 -0
- package/lib/model/service/subscription/subscription.service.d.ts +3 -59
- package/lib/model/service/version/angular-toolbox-version.service.d.ts +13 -0
- package/lib/model/service/version/version.service.d.ts +3 -18
- package/lib/pipe/safe/safe-html.pipe.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AngularToolboxLogoComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularToolboxLogoComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularToolboxLogoComponent, "atx-logo", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
export * from './angular-toolbox-logo/angular-toolbox-logo.component';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { Identifiable, SubscriptionManager } from '../../model';
|
|
10
|
+
/**
|
|
11
|
+
* The abstract class for all services that implement the `SubscriptionManager` interface.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class AbstractSubscriptionManager implements SubscriptionManager {
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
* Stores an internal reference to the last reference used with the `register()`
|
|
17
|
+
* method.
|
|
18
|
+
*/
|
|
19
|
+
private _lastRef;
|
|
20
|
+
/**
|
|
21
|
+
* @private
|
|
22
|
+
* The internal `Subscription` instances storage.
|
|
23
|
+
*/
|
|
24
|
+
private _subMap;
|
|
25
|
+
/**
|
|
26
|
+
* Stores a new `Subscription` instance associated with the specified reference.
|
|
27
|
+
*
|
|
28
|
+
* @param ref The reference for which to store a new `Subscription` instance.
|
|
29
|
+
* Can be either a string or an `Identifiable` object.
|
|
30
|
+
* @param subscription The `Subscription` instance to register.
|
|
31
|
+
*
|
|
32
|
+
* @returns A reference to this `SubscriptionService` instance.
|
|
33
|
+
*/
|
|
34
|
+
register(ref: string | Identifiable, subscription: Subscription): SubscriptionManager;
|
|
35
|
+
/**
|
|
36
|
+
* Stores a new `Subscription` instance associated with the reference specified
|
|
37
|
+
* by the last `register()` method invokation.
|
|
38
|
+
*
|
|
39
|
+
* @param subscription The `Subscription` instance to register.
|
|
40
|
+
*
|
|
41
|
+
* @returns A reference to this `SubscriptionService` instance.
|
|
42
|
+
*/
|
|
43
|
+
append(subscription: Subscription): SubscriptionManager;
|
|
44
|
+
/**
|
|
45
|
+
* Unsubscribes and removes all `Subscription` instances associated with the specified reference.
|
|
46
|
+
*
|
|
47
|
+
* @param ref The reference for which to remove all `Subscription` instances.
|
|
48
|
+
* Can be either a string or an `Identifiable` object.
|
|
49
|
+
*
|
|
50
|
+
* @returns `true` whether the specified reference exists; `false` otherwise.
|
|
51
|
+
*/
|
|
52
|
+
clearAll(ref: string | Identifiable): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns all `Subscription` instances associated with the specified reference.
|
|
55
|
+
*
|
|
56
|
+
* @param ref The reference for which to remove get `Subscription` instances.
|
|
57
|
+
* Can be either a string or an `Identifiable` object.
|
|
58
|
+
*
|
|
59
|
+
* @returns All `Subscription` instances associated with the specified reference, or
|
|
60
|
+
* `null` whether the specified reference does not exists.
|
|
61
|
+
*/
|
|
62
|
+
get(ref: string | Identifiable): Array<Subscription> | null;
|
|
63
|
+
/**
|
|
64
|
+
* @private
|
|
65
|
+
* Returns the string reference for the regsitration process.
|
|
66
|
+
*
|
|
67
|
+
* @param ref The reference to be used the regsitration process.
|
|
68
|
+
* Can be either a string or an `Identifiable` object.
|
|
69
|
+
*
|
|
70
|
+
* @returns the string reference for the regsitration process.
|
|
71
|
+
*/
|
|
72
|
+
private getRef;
|
|
73
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Version, VersionConfig, VersionManager } from "../../model";
|
|
9
|
+
/**
|
|
10
|
+
* The abstract class for all services that implement the `VersionManager` interface.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class AbstractVersionManager implements VersionManager {
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private readonly _version;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new VersionManager object.
|
|
19
|
+
* @param config the reference to the VersionConfig provider.
|
|
20
|
+
*/
|
|
21
|
+
constructor(config: VersionConfig);
|
|
22
|
+
/**
|
|
23
|
+
* Returns the version of the associated Angular project.
|
|
24
|
+
*
|
|
25
|
+
* @return the version of the associated Angular project.
|
|
26
|
+
*/
|
|
27
|
+
getVersion(): Version;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the build timestamp of the associated Angular project.
|
|
30
|
+
*
|
|
31
|
+
* @return the build timestamp of the associated Angular project.
|
|
32
|
+
*/
|
|
33
|
+
getBuildTimestamp(): number;
|
|
34
|
+
}
|
|
@@ -27,10 +27,14 @@ export declare class VersionImpl implements Version {
|
|
|
27
27
|
* Specifies the timestamp that corresponds to the build date for this `Version` instance.
|
|
28
28
|
*/
|
|
29
29
|
readonly buildTimeStamp: number;
|
|
30
|
+
/**
|
|
31
|
+
* An optional string that indicates additional labels for pre-release and build metadata.
|
|
32
|
+
*/
|
|
33
|
+
readonly metadata: string | undefined;
|
|
30
34
|
/**
|
|
31
35
|
* @private
|
|
32
36
|
*/
|
|
33
|
-
constructor(major: number, minor: number, patch: number, buildTimeStamp: number);
|
|
37
|
+
constructor(major: number, minor: number, patch: number, buildTimeStamp: number, metadata?: string);
|
|
34
38
|
/**
|
|
35
39
|
* Returns a string representation of this `Version` object in the form `M.m.p`, where
|
|
36
40
|
* `M` represents the major number, `m` represents the minor number and `p` represents
|
package/lib/core/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './subscription-manager';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { Identifiable } from '../lang';
|
|
10
|
+
/**
|
|
11
|
+
* Defines the API to implement to create Angular subscription management objects.
|
|
12
|
+
*/
|
|
13
|
+
export interface SubscriptionManager {
|
|
14
|
+
/**
|
|
15
|
+
* Stores a new `Subscription` instance associated with the specified reference.
|
|
16
|
+
*
|
|
17
|
+
* @param ref The reference for which to store a new `Subscription` instance.
|
|
18
|
+
* Can be either a string or an `Identifiable` object.
|
|
19
|
+
* @param subscription The `Subscription` instance to register.
|
|
20
|
+
*
|
|
21
|
+
* @returns A reference to this `SubscriptionManager` object.
|
|
22
|
+
*/
|
|
23
|
+
register(ref: string | Identifiable, subscription: Subscription): SubscriptionManager;
|
|
24
|
+
/**
|
|
25
|
+
* Stores a new `Subscription` instance associated with the reference specified
|
|
26
|
+
* by the last `register()` method invokation.
|
|
27
|
+
*
|
|
28
|
+
* @param subscription The `Subscription` instance to register.
|
|
29
|
+
*
|
|
30
|
+
* @returns A reference to this `SubscriptionManager` object.
|
|
31
|
+
*/
|
|
32
|
+
append(subscription: Subscription): SubscriptionManager;
|
|
33
|
+
/**
|
|
34
|
+
* Unsubscribes and removes all `Subscription` instances associated with the specified reference.
|
|
35
|
+
*
|
|
36
|
+
* @param ref The reference for which to remove all `Subscription` instances.
|
|
37
|
+
* Can be either a string or an `Identifiable` object.
|
|
38
|
+
*
|
|
39
|
+
* @returns `true` whether the specified reference exists; `false` otherwise.
|
|
40
|
+
*/
|
|
41
|
+
clearAll(ref: string | Identifiable): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Returns all `Subscription` instances associated with the specified reference.
|
|
44
|
+
*
|
|
45
|
+
* @param ref The reference for which to remove get `Subscription` instances.
|
|
46
|
+
* Can be either a string or an `Identifiable` object.
|
|
47
|
+
*
|
|
48
|
+
* @returns All `Subscription` instances associated with the specified reference, or
|
|
49
|
+
* `null` whether the specified reference does not exists.
|
|
50
|
+
*/
|
|
51
|
+
get(ref: string | Identifiable): Array<Subscription> | null;
|
|
52
|
+
}
|
|
@@ -25,4 +25,8 @@ export interface VersionConfig {
|
|
|
25
25
|
* Specifies the timestamp that corresponds to the build date for this config.
|
|
26
26
|
*/
|
|
27
27
|
buildTimestamp: number;
|
|
28
|
+
/**
|
|
29
|
+
* An optional string that indicates additional labels for pre-release and build metadata.
|
|
30
|
+
*/
|
|
31
|
+
metadata?: string;
|
|
28
32
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Version } from "./version";
|
|
9
|
+
/**
|
|
10
|
+
* The interface implemented by services that specifie the semantic versioning of an Angular application.
|
|
11
|
+
*/
|
|
12
|
+
export interface VersionManager {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the version of the associated Angular project.
|
|
15
|
+
*
|
|
16
|
+
* @return the version of the associated Angular project.
|
|
17
|
+
*/
|
|
18
|
+
getVersion(): Version;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the build timestamp of the associated Angular project.
|
|
21
|
+
*
|
|
22
|
+
* @return the build timestamp of the associated Angular project.
|
|
23
|
+
*/
|
|
24
|
+
getBuildTimestamp(): number;
|
|
25
|
+
}
|
|
@@ -25,6 +25,10 @@ export interface Version {
|
|
|
25
25
|
* Specifies the timestamp that corresponds to the build date for this `Version` object.
|
|
26
26
|
*/
|
|
27
27
|
buildTimeStamp: number;
|
|
28
|
+
/**
|
|
29
|
+
* An optional string that indicates additional labels for pre-release and build metadata.
|
|
30
|
+
*/
|
|
31
|
+
metadata?: string;
|
|
28
32
|
/**
|
|
29
33
|
* Returns a string representation of this `Version` object.
|
|
30
34
|
*
|
|
@@ -1,66 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Identifiable } from '../../business';
|
|
1
|
+
import { AbstractSubscriptionManager } from '../../../core';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SubscriptionService {
|
|
3
|
+
export declare class SubscriptionService extends AbstractSubscriptionManager {
|
|
5
4
|
/**
|
|
6
5
|
* @private
|
|
7
|
-
* Stores an internal reference to the last reference used with the `register()`
|
|
8
|
-
* method.
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* The internal `Subscription` instances storage.
|
|
14
|
-
*/
|
|
15
|
-
private _subMap;
|
|
16
|
-
/**
|
|
17
|
-
* Stores a new `Subscription` instance associated with the specified reference.
|
|
18
|
-
*
|
|
19
|
-
* @param ref The reference for which to store a new `Subscription` instance.
|
|
20
|
-
* Can be either a string or an `Identifiable` object.
|
|
21
|
-
* @param subscription The `Subscription` instance to register.
|
|
22
|
-
*
|
|
23
|
-
* @returns A reference to this `SubscriptionService` instance.
|
|
24
|
-
*/
|
|
25
|
-
register(ref: string | Identifiable, subscription: Subscription): SubscriptionService;
|
|
26
|
-
/**
|
|
27
|
-
* Stores a new `Subscription` instance associated with the reference specified
|
|
28
|
-
* by the last `register()` method invokation.
|
|
29
|
-
*
|
|
30
|
-
* @param subscription The `Subscription` instance to register.
|
|
31
|
-
*
|
|
32
|
-
* @returns A reference to this `SubscriptionService` instance.
|
|
33
|
-
*/
|
|
34
|
-
append(subscription: Subscription): SubscriptionService;
|
|
35
|
-
/**
|
|
36
|
-
* Unsubscribes and removes all `Subscription` instances associated with the specified reference.
|
|
37
|
-
*
|
|
38
|
-
* @param ref The reference for which to remove all `Subscription` instances.
|
|
39
|
-
* Can be either a string or an `Identifiable` object.
|
|
40
|
-
*
|
|
41
|
-
* @returns `true` whether the specified reference exists; `false` otherwise.
|
|
42
|
-
*/
|
|
43
|
-
clearAll(ref: string | Identifiable): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Returns all `Subscription` instances associated with the specified reference.
|
|
46
|
-
*
|
|
47
|
-
* @param ref The reference for which to remove get `Subscription` instances.
|
|
48
|
-
* Can be either a string or an `Identifiable` object.
|
|
49
|
-
*
|
|
50
|
-
* @returns All `Subscription` instances associated with the specified reference, or
|
|
51
|
-
* `null` whether the specified reference does not exists.
|
|
52
|
-
*/
|
|
53
|
-
get(ref: string | Identifiable): Array<Subscription> | null;
|
|
54
|
-
/**
|
|
55
|
-
* @private
|
|
56
|
-
* Returns the string reference for the regsitration process.
|
|
57
|
-
*
|
|
58
|
-
* @param ref The reference to be used the regsitration process.
|
|
59
|
-
* Can be either a string or an `Identifiable` object.
|
|
60
|
-
*
|
|
61
|
-
* @returns the string reference for the regsitration process.
|
|
62
|
-
*/
|
|
63
|
-
private getRef;
|
|
7
|
+
constructor();
|
|
64
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
|
|
65
9
|
static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
|
|
66
10
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractVersionManager } from '../../../core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* The public service that exposes the current version of the Angular Toolbox library.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AngularToolboxVersionService extends AbstractVersionManager {
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
constructor();
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularToolboxVersionService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AngularToolboxVersionService>;
|
|
13
|
+
}
|
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VersionConfig, VersionManager } from '../../business';
|
|
2
|
+
import { AbstractVersionManager } from '../../../core';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* A lightweight service that provides Semantic Versioning implementation for your Angular projects.
|
|
5
6
|
*/
|
|
6
|
-
export declare class VersionService {
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
private readonly _version;
|
|
7
|
+
export declare class VersionService extends AbstractVersionManager implements VersionManager {
|
|
11
8
|
/**
|
|
12
9
|
* Creates a new VersionService instance.
|
|
13
10
|
* @param config the reference to the VersionConfig provider.
|
|
14
11
|
*/
|
|
15
12
|
constructor(config: VersionConfig);
|
|
16
|
-
/**
|
|
17
|
-
* Returns the version of the associated Angular project.
|
|
18
|
-
*
|
|
19
|
-
* @return the version of the associated Angular project.
|
|
20
|
-
*/
|
|
21
|
-
getVersion(): Version;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the build timestamp of the associated Angular project.
|
|
24
|
-
*
|
|
25
|
-
* @return the build timestamp of the associated Angular project.
|
|
26
|
-
*/
|
|
27
|
-
getBuildTimestamp(): number;
|
|
28
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<VersionService, never>;
|
|
29
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<VersionService>;
|
|
30
15
|
}
|
|
@@ -9,7 +9,7 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
|
9
9
|
import { PipeTransform } from "@angular/core";
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
/**
|
|
12
|
-
* A basic implementation of HTML sanitization pipe.
|
|
12
|
+
* A basic implementation of a HTML sanitization pipe.
|
|
13
13
|
*/
|
|
14
14
|
export declare class SafeHtmlPipe implements PipeTransform {
|
|
15
15
|
private _sanitizer;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
export * from './lib/angular-toolbox.module';
|
|
9
|
+
export * from './lib/component';
|
|
9
10
|
export * from './lib/core';
|
|
10
11
|
export * from './lib/directive';
|
|
11
12
|
export * from './lib/framework';
|