@skyux/core 6.0.0-beta.0 → 6.0.0-beta.11
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 +1207 -525
- package/esm2020/index.mjs +5 -1
- package/esm2020/lib/modules/adapter-service/adapter.module.mjs +4 -4
- package/esm2020/lib/modules/adapter-service/adapter.service.mjs +17 -10
- package/esm2020/lib/modules/affix/affix.directive.mjs +3 -3
- package/esm2020/lib/modules/affix/affix.module.mjs +4 -4
- package/esm2020/lib/modules/affix/affix.service.mjs +3 -3
- package/esm2020/lib/modules/affix/affixer.mjs +1 -4
- package/esm2020/lib/modules/dock/dock-dom-adapter.service.mjs +3 -3
- package/esm2020/lib/modules/dock/dock.component.mjs +3 -3
- package/esm2020/lib/modules/dock/dock.module.mjs +4 -4
- package/esm2020/lib/modules/dock/dock.service.mjs +3 -3
- package/esm2020/lib/modules/dynamic-component/dynamic-component.module.mjs +4 -4
- package/esm2020/lib/modules/dynamic-component/dynamic-component.service.mjs +3 -3
- package/esm2020/lib/modules/format/app-format.mjs +3 -3
- package/esm2020/lib/modules/id/id.directive.mjs +3 -3
- package/esm2020/lib/modules/id/id.module.mjs +4 -4
- package/esm2020/lib/modules/log/log.module.mjs +4 -4
- package/esm2020/lib/modules/log/log.service.mjs +121 -12
- 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/media-query/media-query-listener.mjs +1 -1
- package/esm2020/lib/modules/media-query/media-query.module.mjs +4 -4
- package/esm2020/lib/modules/media-query/media-query.service.mjs +5 -5
- package/esm2020/lib/modules/mutation/mutation-observer-service.mjs +3 -3
- package/esm2020/lib/modules/numeric/numeric.module.mjs +4 -4
- package/esm2020/lib/modules/numeric/numeric.options.mjs +3 -29
- package/esm2020/lib/modules/numeric/numeric.pipe.mjs +4 -6
- package/esm2020/lib/modules/numeric/numeric.service.mjs +4 -6
- package/esm2020/lib/modules/overlay/overlay-adapter.service.mjs +3 -3
- package/esm2020/lib/modules/overlay/overlay.component.mjs +3 -3
- package/esm2020/lib/modules/overlay/overlay.module.mjs +4 -4
- package/esm2020/lib/modules/overlay/overlay.service.mjs +3 -3
- package/esm2020/lib/modules/percent-pipe/percent-pipe.module.mjs +4 -4
- package/esm2020/lib/modules/percent-pipe/percent.pipe.mjs +3 -3
- package/esm2020/lib/modules/resize-observer/resize-observer-media-query.service.mjs +117 -0
- package/esm2020/lib/modules/resize-observer/resize-observer.service.mjs +73 -0
- package/esm2020/lib/modules/scrollable-host/scrollable-host.service.mjs +5 -5
- package/esm2020/lib/modules/shared/number-format/number-format-utility.mjs +1 -2
- package/esm2020/lib/modules/shared/sky-core-resources.module.mjs +4 -4
- package/esm2020/lib/modules/title/title.service.mjs +3 -3
- package/esm2020/lib/modules/ui-config/ui-config.service.mjs +3 -3
- package/esm2020/lib/modules/viewkeeper/viewkeeper-host-options.mjs +3 -3
- package/esm2020/lib/modules/viewkeeper/viewkeeper.directive.mjs +3 -3
- package/esm2020/lib/modules/viewkeeper/viewkeeper.module.mjs +4 -4
- package/esm2020/lib/modules/viewkeeper/viewkeeper.service.mjs +3 -3
- package/esm2020/lib/modules/window/window-ref.mjs +3 -3
- package/esm2020/testing/mock-media-query.service.mjs +3 -3
- package/esm2020/testing/mock-ui-config.service.mjs +3 -3
- package/fesm2015/skyux-core-testing.mjs +6 -6
- package/fesm2015/skyux-core.mjs +448 -179
- package/fesm2015/skyux-core.mjs.map +1 -1
- package/fesm2020/skyux-core-testing.mjs +6 -6
- package/fesm2020/skyux-core.mjs +442 -178
- package/fesm2020/skyux-core.mjs.map +1 -1
- package/index.d.ts +4 -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/lib/modules/media-query/media-query-listener.d.ts +1 -1
- package/lib/modules/media-query/media-query.service.d.ts +1 -1
- package/lib/modules/numeric/numeric.options.d.ts +17 -11
- package/lib/modules/numeric/numeric.pipe.d.ts +2 -4
- package/lib/modules/numeric/numeric.service.d.ts +2 -2
- package/lib/modules/resize-observer/resize-observer-media-query.service.d.ts +44 -0
- package/lib/modules/resize-observer/resize-observer.service.d.ts +21 -0
- package/package.json +21 -18
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';
|
@@ -43,6 +45,8 @@ export * from './lib/modules/overlay/overlay.module';
|
|
43
45
|
export * from './lib/modules/overlay/overlay.service';
|
44
46
|
export * from './lib/modules/percent-pipe/percent-pipe.module';
|
45
47
|
export * from './lib/modules/percent-pipe/percent.pipe';
|
48
|
+
export * from './lib/modules/resize-observer/resize-observer.service';
|
49
|
+
export * from './lib/modules/resize-observer/resize-observer-media-query.service';
|
46
50
|
export * from './lib/modules/scrollable-host/scrollable-host.service';
|
47
51
|
export * from './lib/modules/title/set-title-args';
|
48
52
|
export * from './lib/modules/title/title.service';
|
@@ -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
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SkyMediaBreakpoints } from './media-breakpoints';
|
2
2
|
/**
|
3
|
-
* Specifies a
|
3
|
+
* Specifies a function that is called when the breakpoints change. It is called
|
4
4
|
* with a `SkyMediaBreakpoints` argument, which is an enum that represents the new breakpoint.
|
5
5
|
*/
|
6
6
|
export declare type SkyMediaQueryListener = (args: SkyMediaBreakpoints) => void;
|
@@ -36,7 +36,7 @@ export declare class SkyMediaQueryService implements OnDestroy {
|
|
36
36
|
constructor(zone: NgZone);
|
37
37
|
ngOnDestroy(): void;
|
38
38
|
/**
|
39
|
-
*
|
39
|
+
* Subscribes to screen size changes.
|
40
40
|
* @param listener Specifies a function that is called when breakpoints change.
|
41
41
|
*/
|
42
42
|
subscribe(listener: SkyMediaQueryListener): Subscription;
|
@@ -1,27 +1,21 @@
|
|
1
1
|
/**
|
2
2
|
* Provides arguments for the number to format.
|
3
3
|
*/
|
4
|
-
export
|
4
|
+
export interface SkyNumericOptions {
|
5
5
|
/**
|
6
6
|
* Specifies the maximum number of digits after the decimal separator.
|
7
|
-
* @default 1
|
8
7
|
*/
|
9
8
|
digits?: number;
|
10
9
|
/**
|
11
10
|
* Specifies how to format the number. Options are `currency` or `number`.
|
12
|
-
* @default "number"
|
13
11
|
*/
|
14
12
|
format?: string;
|
15
13
|
/**
|
16
14
|
* Specifies the format of the currency.
|
17
|
-
* @default "standard"
|
18
15
|
*/
|
19
16
|
currencySign?: 'accounting' | 'standard';
|
20
17
|
/**
|
21
|
-
* Specifies the ISO4217 currency code to use for currency formatting.
|
22
|
-
* currency code, the component uses the browser's culture to determine the currency unless your
|
23
|
-
* SPA provides a different culture with `SkyAppLocaleProvider`.
|
24
|
-
* @default "USD"
|
18
|
+
* Specifies the ISO4217 currency code to use for currency formatting.
|
25
19
|
*/
|
26
20
|
iso?: string;
|
27
21
|
/**
|
@@ -40,9 +34,21 @@ export declare class NumericOptions {
|
|
40
34
|
*/
|
41
35
|
truncate?: boolean;
|
42
36
|
/**
|
43
|
-
* Specifies the
|
44
|
-
* and abbreviation characters.
|
45
|
-
* @default 0
|
37
|
+
* Specifies the minimum value at which numbers are shortened to rounded numbers and abbreviation characters. Values less than `1000` are not truncated.
|
46
38
|
*/
|
47
39
|
truncateAfter?: number;
|
48
40
|
}
|
41
|
+
/**
|
42
|
+
* Provides arguments for the number to format.
|
43
|
+
* @deprecated Use the `SkyNumericOptions` interface instead.
|
44
|
+
*/
|
45
|
+
export declare class NumericOptions implements SkyNumericOptions {
|
46
|
+
digits?: number;
|
47
|
+
format?: string;
|
48
|
+
currencySign?: 'accounting' | 'standard';
|
49
|
+
iso?: string;
|
50
|
+
locale?: string;
|
51
|
+
minDigits?: number;
|
52
|
+
truncate?: boolean;
|
53
|
+
truncateAfter?: number;
|
54
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
|
2
2
|
import { SkyAppLocaleProvider } from '@skyux/i18n';
|
3
|
-
import {
|
3
|
+
import { SkyNumericOptions } from './numeric.options';
|
4
4
|
import { SkyNumericService } from './numeric.service';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
/**
|
@@ -19,13 +19,11 @@ export declare class SkyNumericPipe implements PipeTransform, OnDestroy {
|
|
19
19
|
private changeDetector;
|
20
20
|
private cacheKey;
|
21
21
|
private formattedValue;
|
22
|
-
private lastTransformLocale;
|
23
|
-
private rawValue;
|
24
22
|
private providerLocale;
|
25
23
|
private ngUnsubscribe;
|
26
24
|
constructor(localeProvider: SkyAppLocaleProvider, numericService: SkyNumericService, changeDetector: ChangeDetectorRef);
|
27
25
|
ngOnDestroy(): void;
|
28
|
-
transform(value: number, config?:
|
26
|
+
transform(value: number, config?: SkyNumericOptions): string;
|
29
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyNumericPipe, never>;
|
30
28
|
static ɵpipe: i0.ɵɵPipeDeclaration<SkyNumericPipe, "skyNumeric">;
|
31
29
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
2
|
-
import {
|
2
|
+
import { SkyNumericOptions } from './numeric.options';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class SkyNumericService {
|
5
5
|
private resourcesService;
|
@@ -21,7 +21,7 @@ export declare class SkyNumericService {
|
|
21
21
|
* @param value The number to format.
|
22
22
|
* @param options Format options.
|
23
23
|
*/
|
24
|
-
formatNumber(value: number, options:
|
24
|
+
formatNumber(value: number, options: SkyNumericOptions): string;
|
25
25
|
/**
|
26
26
|
* Rounds a given number
|
27
27
|
*
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
2
|
+
import { Subscription } from 'rxjs';
|
3
|
+
import { SkyMediaBreakpoints } from '../media-query/media-breakpoints';
|
4
|
+
import { SkyMediaQueryListener } from '../media-query/media-query-listener';
|
5
|
+
import { SkyResizeObserverService } from './resize-observer.service';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
/**
|
8
|
+
* Acts like `SkyMediaQueryService` for a container element, emitting the same responsive breakpoints.
|
9
|
+
*/
|
10
|
+
export declare class SkyResizeObserverMediaQueryService implements OnDestroy {
|
11
|
+
private resizeObserverService;
|
12
|
+
/**
|
13
|
+
* Returns the current breakpoint.
|
14
|
+
*/
|
15
|
+
get current(): SkyMediaBreakpoints | undefined;
|
16
|
+
private _breakpoints;
|
17
|
+
private _currentBreakpointObservable;
|
18
|
+
private _currentBreakpoint;
|
19
|
+
private _stopListening;
|
20
|
+
private _target?;
|
21
|
+
constructor(resizeObserverService: SkyResizeObserverService);
|
22
|
+
ngOnDestroy(): void;
|
23
|
+
/**
|
24
|
+
* @internal
|
25
|
+
*/
|
26
|
+
destroy(): void;
|
27
|
+
/**
|
28
|
+
* Sets the container element to watch. The `SkyResizeObserverMediaQueryService` will only observe one element at a
|
29
|
+
* time. Any previous subscriptions will be unsubscribed when a new element is observed.
|
30
|
+
*/
|
31
|
+
observe(element: ElementRef): SkyResizeObserverMediaQueryService;
|
32
|
+
/**
|
33
|
+
* Stop watching the container element.
|
34
|
+
*/
|
35
|
+
unobserve(): void;
|
36
|
+
/**
|
37
|
+
* Subscribes to element size changes that cross breakpoints.
|
38
|
+
*/
|
39
|
+
subscribe(listener: SkyMediaQueryListener): Subscription;
|
40
|
+
private updateBreakpoint;
|
41
|
+
private checkBreakpoint;
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverMediaQueryService, never>;
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverMediaQueryService>;
|
44
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { ElementRef, NgZone, OnDestroy } from '@angular/core';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* Service to create rxjs observables for changes to the content box dimensions of elements.
|
6
|
+
*/
|
7
|
+
export declare class SkyResizeObserverService implements OnDestroy {
|
8
|
+
private zone;
|
9
|
+
private _resizeObserver;
|
10
|
+
private _tracking;
|
11
|
+
constructor(zone: NgZone);
|
12
|
+
ngOnDestroy(): void;
|
13
|
+
/**
|
14
|
+
* Create rxjs observable to get size changes for an element ref.
|
15
|
+
*/
|
16
|
+
observe(element: ElementRef): Observable<ResizeObserverEntry>;
|
17
|
+
private observeAndTrack;
|
18
|
+
private callback;
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverService, never>;
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverService>;
|
21
|
+
}
|
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.11",
|
4
4
|
"author": "Blackbaud, Inc.",
|
5
5
|
"keywords": [
|
6
6
|
"blackbaud",
|
@@ -15,22 +15,6 @@
|
|
15
15
|
"url": "https://github.com/blackbaud/skyux/issues"
|
16
16
|
},
|
17
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
18
|
-
"peerDependencies": {
|
19
|
-
"@angular/common": "^13.2.7",
|
20
|
-
"@angular/core": "^13.2.7",
|
21
|
-
"@angular/platform-browser": "^13.2.7",
|
22
|
-
"@angular/router": "^13.2.7",
|
23
|
-
"@skyux/i18n": "6.0.0-beta.0"
|
24
|
-
},
|
25
|
-
"dependencies": {
|
26
|
-
"tslib": "^2.3.1"
|
27
|
-
},
|
28
|
-
"module": "fesm2015/skyux-core.mjs",
|
29
|
-
"es2020": "fesm2020/skyux-core.mjs",
|
30
|
-
"esm2020": "esm2020/skyux-core.mjs",
|
31
|
-
"fesm2020": "fesm2020/skyux-core.mjs",
|
32
|
-
"fesm2015": "fesm2015/skyux-core.mjs",
|
33
|
-
"typings": "skyux-core.d.ts",
|
34
18
|
"exports": {
|
35
19
|
"./package.json": {
|
36
20
|
"default": "./package.json"
|
@@ -50,7 +34,26 @@
|
|
50
34
|
"es2015": "./fesm2015/skyux-core-testing.mjs",
|
51
35
|
"node": "./fesm2015/skyux-core-testing.mjs",
|
52
36
|
"default": "./fesm2020/skyux-core-testing.mjs"
|
37
|
+
},
|
38
|
+
"./documentation.json": {
|
39
|
+
"default": "./documentation.json"
|
53
40
|
}
|
54
41
|
},
|
42
|
+
"peerDependencies": {
|
43
|
+
"@angular/common": "^13.3.2",
|
44
|
+
"@angular/core": "^13.3.2",
|
45
|
+
"@angular/platform-browser": "^13.3.2",
|
46
|
+
"@angular/router": "^13.3.2",
|
47
|
+
"@skyux/i18n": "6.0.0-beta.11"
|
48
|
+
},
|
49
|
+
"dependencies": {
|
50
|
+
"tslib": "^2.3.1"
|
51
|
+
},
|
52
|
+
"module": "fesm2015/skyux-core.mjs",
|
53
|
+
"es2020": "fesm2020/skyux-core.mjs",
|
54
|
+
"esm2020": "esm2020/skyux-core.mjs",
|
55
|
+
"fesm2020": "fesm2020/skyux-core.mjs",
|
56
|
+
"fesm2015": "fesm2015/skyux-core.mjs",
|
57
|
+
"typings": "skyux-core.d.ts",
|
55
58
|
"sideEffects": false
|
56
|
-
}
|
59
|
+
}
|