@skyux/core 6.0.0-beta.5 → 6.0.0-beta.8
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/documentation.json +361 -477
- package/esm2020/index.mjs +3 -1
- package/esm2020/lib/modules/log/log.service.mjs +119 -10
- package/esm2020/lib/modules/log/types/log-deprecation-args.mjs +2 -0
- package/esm2020/lib/modules/log/types/log-level-token.mjs +6 -0
- package/esm2020/lib/modules/log/types/log-level.mjs +2 -0
- package/esm2020/lib/modules/scrollable-host/scrollable-host.service.mjs +2 -2
- package/fesm2015/skyux-core.mjs +128 -11
- package/fesm2015/skyux-core.mjs.map +1 -1
- package/fesm2020/skyux-core.mjs +122 -11
- package/fesm2020/skyux-core.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/modules/log/log.service.d.ts +37 -3
- package/lib/modules/log/types/log-deprecation-args.d.ts +27 -0
- package/lib/modules/log/types/log-level-token.d.ts +6 -0
- package/lib/modules/log/types/log-level.d.ts +8 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
@@ -27,6 +27,8 @@ export * from './lib/modules/format/app-format';
|
|
27
27
|
export * from './lib/modules/id/id.module';
|
28
28
|
export * from './lib/modules/log/log.module';
|
29
29
|
export * from './lib/modules/log/log.service';
|
30
|
+
export * from './lib/modules/log/types/log-level';
|
31
|
+
export * from './lib/modules/log/types/log-level-token';
|
30
32
|
export * from './lib/modules/media-query/media-breakpoints';
|
31
33
|
export * from './lib/modules/media-query/media-query-listener';
|
32
34
|
export * from './lib/modules/media-query/media-query.module';
|
@@ -1,9 +1,43 @@
|
|
1
|
+
import { SkyAppFormat } from '../format/app-format';
|
2
|
+
import { SkyLogDeprecatedArgs } from './types/log-deprecation-args';
|
3
|
+
import { SkyLogLevel } from './types/log-level';
|
1
4
|
import * as i0 from "@angular/core";
|
2
5
|
/**
|
3
|
-
*
|
6
|
+
* Logs information to the console based on the application's log level as provided by the `SKY_LOG_LEVEL` injection token. If no token is provided, only `error` logs will be shown.
|
7
|
+
* @internal
|
4
8
|
*/
|
5
9
|
export declare class SkyLogService {
|
6
|
-
|
7
|
-
|
10
|
+
private formatter;
|
11
|
+
private applicationLogLevel;
|
12
|
+
constructor(formatter: SkyAppFormat, applicationLogLevel: SkyLogLevel);
|
13
|
+
/**
|
14
|
+
* Logs a deprecation warning for a class, property, function, etc. This will be logged as a console warning unless a different log level is given in the the `args` parameter.
|
15
|
+
* @param name The name of the deprecated class, property, function, etc.
|
16
|
+
* @param args Information about the deprecation and replacement recommendations.
|
17
|
+
* @returns
|
18
|
+
*/
|
19
|
+
deprecated(name: string, args?: SkyLogDeprecatedArgs): Promise<void>;
|
20
|
+
/**
|
21
|
+
* Logs a console error if the application's log level is `SkyLogLevel.Error`.
|
22
|
+
* @param message The error message
|
23
|
+
* @param params Optional parameters for the error message.
|
24
|
+
*/
|
25
|
+
error(message: string, params?: unknown[]): void;
|
26
|
+
/**
|
27
|
+
* Logs console information if the application's log level is `SkyLogLevel.Info` or above.
|
28
|
+
* @param message The infomational message
|
29
|
+
* @param params Optional parameters for the informational message.
|
30
|
+
*/
|
31
|
+
info(message: string, params?: unknown[]): void;
|
32
|
+
/**
|
33
|
+
* Logs a console warning if the application's log level is `SkyLogLevel.Warn` or above.
|
34
|
+
* @param message The warning message
|
35
|
+
* @param params Optional parameters for the warning message.
|
36
|
+
*/
|
37
|
+
warn(message: string, params?: unknown[]): void;
|
38
|
+
private convertStringToCode;
|
39
|
+
private canLog;
|
40
|
+
private logBasedOnLevel;
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyLogService, [null, { optional: true; }]>;
|
8
42
|
static ɵprov: i0.ɵɵInjectableDeclaration<SkyLogService>;
|
9
43
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { SkyLogLevel } from './log-level';
|
2
|
+
/**
|
3
|
+
* @internal
|
4
|
+
* Arguments used when logging that a class, property, function, etc. is depcrecated.
|
5
|
+
*/
|
6
|
+
export interface SkyLogDeprecatedArgs {
|
7
|
+
/**
|
8
|
+
* The major version which deprecated the feature.
|
9
|
+
*/
|
10
|
+
deprecationMajorVersion?: number;
|
11
|
+
/**
|
12
|
+
* The log level for the console logging. The `SkyLogService` will assume `SkyLogLevel.Warn` if this is not provided.
|
13
|
+
*/
|
14
|
+
logLevel?: SkyLogLevel;
|
15
|
+
/**
|
16
|
+
* A URL which gives more information about the deprecation or the replacement recommendation.
|
17
|
+
*/
|
18
|
+
moreInfoUrl?: string;
|
19
|
+
/**
|
20
|
+
* The major version which will remove the deprecated feature.
|
21
|
+
*/
|
22
|
+
removalMajorVersion?: number;
|
23
|
+
/**
|
24
|
+
* The recommendation for how to replace the deprecated feature.
|
25
|
+
*/
|
26
|
+
replacementRecommendation?: string;
|
27
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@skyux/core",
|
3
|
-
"version": "6.0.0-beta.
|
3
|
+
"version": "6.0.0-beta.8",
|
4
4
|
"author": "Blackbaud, Inc.",
|
5
5
|
"keywords": [
|
6
6
|
"blackbaud",
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"@angular/core": "^13.3.2",
|
45
45
|
"@angular/platform-browser": "^13.3.2",
|
46
46
|
"@angular/router": "^13.3.2",
|
47
|
-
"@skyux/i18n": "6.0.0-beta.
|
47
|
+
"@skyux/i18n": "6.0.0-beta.8"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
50
|
"tslib": "^2.3.1"
|