@skyux/core 5.9.5 → 5.9.6
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/bundles/skyux-core.umd.js +18 -13
- package/documentation.json +137 -134
- package/esm2015/lib/modules/numeric/numeric.pipe.js +3 -4
- package/esm2015/lib/modules/numeric/numeric.pipe.js.map +1 -1
- package/esm2015/lib/modules/numeric/numeric.service.js +1 -1
- package/esm2015/lib/modules/numeric/numeric.service.js.map +1 -1
- package/esm2015/lib/modules/resize-observer/resize-observer-media-query.service.js +14 -8
- package/esm2015/lib/modules/resize-observer/resize-observer-media-query.service.js.map +1 -1
- package/fesm2015/skyux-core.js +18 -13
- package/fesm2015/skyux-core.js.map +1 -1
- package/lib/modules/numeric/numeric.pipe.d.ts +3 -4
- package/lib/modules/numeric/numeric.service.d.ts +1 -1
- package/lib/modules/resize-observer/resize-observer-media-query.service.d.ts +1 -1
- package/package.json +2 -2
@@ -2187,7 +2187,7 @@
|
|
2187
2187
|
configurable: true
|
2188
2188
|
});
|
2189
2189
|
/**
|
2190
|
-
*
|
2190
|
+
* Formats a number based on the provided options.
|
2191
2191
|
* @param value The number to format.
|
2192
2192
|
* @param options Format options.
|
2193
2193
|
*/
|
@@ -2357,10 +2357,6 @@
|
|
2357
2357
|
* M for millions, B for billions, and T for trillions. The pipe also formats for currency.
|
2358
2358
|
* Be sure you have a space after the two curly brackets opening the pipe and
|
2359
2359
|
* a space before the two curly brackets closing the pipe or it will not work.
|
2360
|
-
* Usage:
|
2361
|
-
* ```
|
2362
|
-
* {{ value | skyNumeric(config) }}
|
2363
|
-
* ```
|
2364
2360
|
*/
|
2365
2361
|
var SkyNumericPipe = /** @class */ (function () {
|
2366
2362
|
function SkyNumericPipe(localeProvider, numericService, changeDetector) {
|
@@ -2382,6 +2378,9 @@
|
|
2382
2378
|
this.ngUnsubscribe.next();
|
2383
2379
|
this.ngUnsubscribe.complete();
|
2384
2380
|
};
|
2381
|
+
/**
|
2382
|
+
* Formats a number based on the provided options.
|
2383
|
+
*/
|
2385
2384
|
SkyNumericPipe.prototype.transform = function (value, config) {
|
2386
2385
|
var _a;
|
2387
2386
|
var newCacheKey = (config ? JSON.stringify(config, Object.keys(config).sort()) : '') +
|
@@ -2994,7 +2993,7 @@
|
|
2994
2993
|
this.resizeObserverService = resizeObserverService;
|
2995
2994
|
this._breakpoints = [
|
2996
2995
|
{
|
2997
|
-
check: function (width) { return width <= 767; },
|
2996
|
+
check: function (width) { return width > 0 && width <= 767; },
|
2998
2997
|
name: exports.SkyMediaBreakpoints.xs,
|
2999
2998
|
},
|
3000
2999
|
{
|
@@ -3052,12 +3051,8 @@
|
|
3052
3051
|
this._stopListening.next();
|
3053
3052
|
}
|
3054
3053
|
this._target = element;
|
3055
|
-
|
3056
|
-
|
3057
|
-
var breakpoint = this.checkBreakpoint(width);
|
3058
|
-
this.updateBreakpoint(breakpoint);
|
3059
|
-
}
|
3060
|
-
this._resizeSubscription = this.resizeObserverService
|
3054
|
+
this.checkWidth(element);
|
3055
|
+
this.resizeObserverService
|
3061
3056
|
.observe(element)
|
3062
3057
|
.pipe(operators.takeUntil(this._stopListening))
|
3063
3058
|
.subscribe(function (value) {
|
@@ -3081,7 +3076,9 @@
|
|
3081
3076
|
SkyResizeObserverMediaQueryService.prototype.subscribe = function (listener) {
|
3082
3077
|
return this._currentBreakpointObservable
|
3083
3078
|
.pipe(operators.takeUntil(this._stopListening))
|
3084
|
-
.subscribe(
|
3079
|
+
.subscribe(function (value) {
|
3080
|
+
listener(value);
|
3081
|
+
});
|
3085
3082
|
};
|
3086
3083
|
SkyResizeObserverMediaQueryService.prototype.updateBreakpoint = function (breakpoint) {
|
3087
3084
|
this._currentBreakpoint = breakpoint;
|
@@ -3091,6 +3088,14 @@
|
|
3091
3088
|
var _a;
|
3092
3089
|
return (_a = this._breakpoints.find(function (breakpoint) { return breakpoint.check(width); })) === null || _a === void 0 ? void 0 : _a.name;
|
3093
3090
|
};
|
3091
|
+
SkyResizeObserverMediaQueryService.prototype.checkWidth = function (element) {
|
3092
|
+
var width = element.nativeElement.offsetWidth || 0;
|
3093
|
+
var breakpoint = this.checkBreakpoint(width);
|
3094
|
+
/* istanbul ignore else */
|
3095
|
+
if (breakpoint !== this._currentBreakpoint) {
|
3096
|
+
this.updateBreakpoint(breakpoint);
|
3097
|
+
}
|
3098
|
+
};
|
3094
3099
|
return SkyResizeObserverMediaQueryService;
|
3095
3100
|
}());
|
3096
3101
|
SkyResizeObserverMediaQueryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyResizeObserverMediaQueryService, deps: [{ token: SkyResizeObserverService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|