@skyux/core 6.0.0-beta.8 → 6.0.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.
- package/documentation.json +631 -368
- package/esm2020/lib/modules/adapter-service/adapter.service.mjs +14 -6
- package/esm2020/lib/modules/numeric/numeric.options.mjs +3 -29
- package/esm2020/lib/modules/numeric/numeric.pipe.mjs +4 -5
- package/esm2020/lib/modules/numeric/numeric.service.mjs +2 -2
- package/esm2020/lib/modules/resize-observer/resize-observer-media-query.service.mjs +14 -8
- package/fesm2015/skyux-core.mjs +32 -45
- package/fesm2015/skyux-core.mjs.map +1 -1
- package/fesm2020/skyux-core.mjs +32 -45
- package/fesm2020/skyux-core.mjs.map +1 -1
- package/lib/modules/numeric/numeric.options.d.ts +17 -11
- package/lib/modules/numeric/numeric.pipe.d.ts +5 -6
- package/lib/modules/numeric/numeric.service.d.ts +3 -3
- package/lib/modules/resize-observer/resize-observer-media-query.service.d.ts +1 -0
- package/package.json +2 -2
@@ -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
|
/**
|
@@ -8,10 +8,6 @@ import * as i0 from "@angular/core";
|
|
8
8
|
* M for millions, B for billions, and T for trillions. The pipe also formats for currency.
|
9
9
|
* Be sure you have a space after the two curly brackets opening the pipe and
|
10
10
|
* a space before the two curly brackets closing the pipe or it will not work.
|
11
|
-
* Usage:
|
12
|
-
* ```
|
13
|
-
* {{ value | skyNumeric(config) }}
|
14
|
-
* ```
|
15
11
|
*/
|
16
12
|
export declare class SkyNumericPipe implements PipeTransform, OnDestroy {
|
17
13
|
private localeProvider;
|
@@ -23,7 +19,10 @@ export declare class SkyNumericPipe implements PipeTransform, OnDestroy {
|
|
23
19
|
private ngUnsubscribe;
|
24
20
|
constructor(localeProvider: SkyAppLocaleProvider, numericService: SkyNumericService, changeDetector: ChangeDetectorRef);
|
25
21
|
ngOnDestroy(): void;
|
26
|
-
|
22
|
+
/**
|
23
|
+
* Formats a number based on the provided options.
|
24
|
+
*/
|
25
|
+
transform(value: number, config?: SkyNumericOptions): string;
|
27
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyNumericPipe, never>;
|
28
27
|
static ɵpipe: i0.ɵɵPipeDeclaration<SkyNumericPipe, "skyNumeric">;
|
29
28
|
}
|
@@ -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;
|
@@ -17,11 +17,11 @@ export declare class SkyNumericService {
|
|
17
17
|
private _locale;
|
18
18
|
constructor(resourcesService: SkyLibResourcesService);
|
19
19
|
/**
|
20
|
-
*
|
20
|
+
* Formats a number based on the provided options.
|
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
|
*
|
@@ -39,6 +39,7 @@ export declare class SkyResizeObserverMediaQueryService implements OnDestroy {
|
|
39
39
|
subscribe(listener: SkyMediaQueryListener): Subscription;
|
40
40
|
private updateBreakpoint;
|
41
41
|
private checkBreakpoint;
|
42
|
+
private checkWidth;
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverMediaQueryService, never>;
|
43
44
|
static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverMediaQueryService>;
|
44
45
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@skyux/core",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.1",
|
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.
|
47
|
+
"@skyux/i18n": "6.0.1"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
50
|
"tslib": "^2.3.1"
|