@skyux/indicators 7.2.0 → 7.4.0

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.
@@ -8,7 +8,7 @@ import * as i1 from '@skyux/theme';
8
8
  import { SkyThemeIconManifestModule, SkyThemeModule } from '@skyux/theme';
9
9
  import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
10
10
  import * as i2 from '@skyux/core';
11
- import { SkyTrimModule, SkyMutationObserverService } from '@skyux/core';
11
+ import { SkyTrimModule, SkyMutationObserverService, SkyDynamicComponentLocation } from '@skyux/core';
12
12
  import { trigger, transition, style, animate } from '@angular/animations';
13
13
  import { Subject, BehaviorSubject, defer } from 'rxjs';
14
14
  import { takeUntil, take, finalize } from 'rxjs/operators';
@@ -1845,10 +1845,10 @@ _SkyWaitComponent_elRef = new WeakMap(), _SkyWaitComponent_adapterService = new
1845
1845
  }
1846
1846
  };
1847
1847
  SkyWaitComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitComponent, deps: [{ token: i0.ElementRef }, { token: SkyWaitAdapterService }, { token: i1$2.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1848
- SkyWaitComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyWaitComponent, selector: "sky-wait", inputs: { ariaLabel: "ariaLabel", isWaiting: "isWaiting", isFullPage: "isFullPage", isNonBlocking: "isNonBlocking" }, providers: [SkyWaitAdapterService], ngImport: i0, template: "<div class=\"sky-wait-container\">\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n role=\"progressbar\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;inset:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{inset:auto auto 0 0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1848
+ SkyWaitComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyWaitComponent, selector: "sky-wait", inputs: { ariaLabel: "ariaLabel", isWaiting: "isWaiting", isFullPage: "isFullPage", isNonBlocking: "isNonBlocking" }, providers: [SkyWaitAdapterService], ngImport: i0, template: "<div\n class=\"sky-wait-container\"\n [ngClass]=\"{\n 'sky-wait-full-page': isFullPage,\n 'sky-wait-non-blocking': isNonBlocking\n }\"\n>\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n role=\"progressbar\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;inset:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{inset:auto auto 0 0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1849
1849
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitComponent, decorators: [{
1850
1850
  type: Component,
1851
- args: [{ selector: 'sky-wait', providers: [SkyWaitAdapterService], template: "<div class=\"sky-wait-container\">\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n role=\"progressbar\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;inset:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{inset:auto auto 0 0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"] }]
1851
+ args: [{ selector: 'sky-wait', providers: [SkyWaitAdapterService], template: "<div\n class=\"sky-wait-container\"\n [ngClass]=\"{\n 'sky-wait-full-page': isFullPage,\n 'sky-wait-non-blocking': isNonBlocking\n }\"\n>\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n role=\"progressbar\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;inset:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{inset:auto auto 0 0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"] }]
1852
1852
  }], ctorParameters: function () {
1853
1853
  return [{ type: i0.ElementRef }, { type: SkyWaitAdapterService }, { type: i1$2.SkyLibResourcesService, decorators: [{
1854
1854
  type: Optional
@@ -1896,6 +1896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1896
1896
  /**
1897
1897
  * @internal
1898
1898
  */
1899
+ // TODO: Remove when dynamic component service is no longer optional in a future breaking change.
1899
1900
  class SkyWaitPageAdapterService {
1900
1901
  addPageWaitEl() {
1901
1902
  document.body.appendChild(document.createElement('sky-wait-page'));
@@ -1916,24 +1917,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1916
1917
  }]
1917
1918
  }] });
1918
1919
 
1919
- var _SkyWaitService_instances, _SkyWaitService_resolver, _SkyWaitService_appRef, _SkyWaitService_waitAdapter, _SkyWaitService_windowSvc, _SkyWaitService_setWaitComponentProperties, _SkyWaitService_beginPageWait, _SkyWaitService_endPageWait, _SkyWaitService_clearPageWait;
1920
+ var _SkyWaitService_instances, _SkyWaitService_resolver, _SkyWaitService_appRef, _SkyWaitService_waitAdapter, _SkyWaitService_windowSvc, _SkyWaitService_dynamicComponentService, _SkyWaitService_setWaitComponentProperties, _SkyWaitService_beginPageWait, _SkyWaitService_endPageWait, _SkyWaitService_clearPageWait;
1920
1921
  let waitComponent;
1922
+ let waitComponentRef;
1921
1923
  let pageWaitBlockingCount = 0;
1922
1924
  let pageWaitNonBlockingCount = 0;
1923
1925
  // Need to add the following to classes which contain static methods.
1924
1926
  // See: https://github.com/ng-packagr/ng-packagr/issues/641
1925
1927
  // @dynamic
1926
1928
  class SkyWaitService {
1927
- constructor(resolver, appRef, waitAdapter, windowSvc) {
1929
+ // TODO: Remove `Optional` in a future breaking change. When this is done - remove the `resolver` variable and any cases that account for it.
1930
+ constructor(resolver, appRef, waitAdapter, windowSvc, dynamicComponentService) {
1928
1931
  _SkyWaitService_instances.add(this);
1929
1932
  _SkyWaitService_resolver.set(this, void 0);
1930
1933
  _SkyWaitService_appRef.set(this, void 0);
1931
1934
  _SkyWaitService_waitAdapter.set(this, void 0);
1932
1935
  _SkyWaitService_windowSvc.set(this, void 0);
1936
+ _SkyWaitService_dynamicComponentService.set(this, void 0);
1933
1937
  __classPrivateFieldSet(this, _SkyWaitService_resolver, resolver, "f");
1934
1938
  __classPrivateFieldSet(this, _SkyWaitService_appRef, appRef, "f");
1935
1939
  __classPrivateFieldSet(this, _SkyWaitService_waitAdapter, waitAdapter, "f");
1936
1940
  __classPrivateFieldSet(this, _SkyWaitService_windowSvc, windowSvc, "f");
1941
+ __classPrivateFieldSet(this, _SkyWaitService_dynamicComponentService, dynamicComponentService, "f");
1937
1942
  }
1938
1943
  /**
1939
1944
  * Starts a blocking page wait on the page.
@@ -1976,7 +1981,13 @@ class SkyWaitService {
1976
1981
  waitComponent = undefined;
1977
1982
  pageWaitBlockingCount = 0;
1978
1983
  pageWaitNonBlockingCount = 0;
1979
- __classPrivateFieldGet(this, _SkyWaitService_waitAdapter, "f").removePageWaitEl();
1984
+ // TODO: Remove if-statement and else case when `Optional` is removed from the constructor.
1985
+ if (__classPrivateFieldGet(this, _SkyWaitService_dynamicComponentService, "f")) {
1986
+ __classPrivateFieldGet(this, _SkyWaitService_dynamicComponentService, "f").removeComponent(waitComponentRef);
1987
+ }
1988
+ else {
1989
+ __classPrivateFieldGet(this, _SkyWaitService_waitAdapter, "f").removePageWaitEl();
1990
+ }
1980
1991
  }
1981
1992
  }
1982
1993
  /**
@@ -1999,7 +2010,7 @@ class SkyWaitService {
1999
2010
  });
2000
2011
  }
2001
2012
  }
2002
- _SkyWaitService_resolver = new WeakMap(), _SkyWaitService_appRef = new WeakMap(), _SkyWaitService_waitAdapter = new WeakMap(), _SkyWaitService_windowSvc = new WeakMap(), _SkyWaitService_instances = new WeakSet(), _SkyWaitService_setWaitComponentProperties = function _SkyWaitService_setWaitComponentProperties(isBlocking) {
2013
+ _SkyWaitService_resolver = new WeakMap(), _SkyWaitService_appRef = new WeakMap(), _SkyWaitService_waitAdapter = new WeakMap(), _SkyWaitService_windowSvc = new WeakMap(), _SkyWaitService_dynamicComponentService = new WeakMap(), _SkyWaitService_instances = new WeakSet(), _SkyWaitService_setWaitComponentProperties = function _SkyWaitService_setWaitComponentProperties(isBlocking) {
2003
2014
  if (waitComponent) {
2004
2015
  if (isBlocking) {
2005
2016
  waitComponent.hasBlockingWait = true;
@@ -2020,10 +2031,17 @@ _SkyWaitService_resolver = new WeakMap(), _SkyWaitService_appRef = new WeakMap()
2020
2031
  // Ensuring here that we recheck this after the setTimeout is over so that we don't clash
2021
2032
  // with any other waits that are created.
2022
2033
  if (!waitComponent) {
2023
- const factory = __classPrivateFieldGet(this, _SkyWaitService_resolver, "f").resolveComponentFactory(SkyWaitPageComponent);
2024
- __classPrivateFieldGet(this, _SkyWaitService_waitAdapter, "f").addPageWaitEl();
2025
- const cmpRef = __classPrivateFieldGet(this, _SkyWaitService_appRef, "f").bootstrap(factory);
2026
- waitComponent = cmpRef.instance;
2034
+ // TODO: Remove if-statement and else case when `Optional` is removed from the constructor.
2035
+ if (__classPrivateFieldGet(this, _SkyWaitService_dynamicComponentService, "f")) {
2036
+ waitComponentRef = __classPrivateFieldGet(this, _SkyWaitService_dynamicComponentService, "f").createComponent(SkyWaitPageComponent, { location: SkyDynamicComponentLocation.BodyBottom });
2037
+ waitComponent = waitComponentRef.instance;
2038
+ }
2039
+ else {
2040
+ const factory = __classPrivateFieldGet(this, _SkyWaitService_resolver, "f").resolveComponentFactory(SkyWaitPageComponent);
2041
+ __classPrivateFieldGet(this, _SkyWaitService_waitAdapter, "f").addPageWaitEl();
2042
+ waitComponentRef = __classPrivateFieldGet(this, _SkyWaitService_appRef, "f").bootstrap(factory);
2043
+ waitComponent = waitComponentRef.instance;
2044
+ }
2027
2045
  }
2028
2046
  __classPrivateFieldGet(this, _SkyWaitService_instances, "m", _SkyWaitService_setWaitComponentProperties).call(this, isBlocking);
2029
2047
  });
@@ -2068,14 +2086,18 @@ _SkyWaitService_resolver = new WeakMap(), _SkyWaitService_appRef = new WeakMap()
2068
2086
  }
2069
2087
  }
2070
2088
  };
2071
- SkyWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: SkyWaitPageAdapterService }, { token: i2.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
2089
+ SkyWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: SkyWaitPageAdapterService }, { token: i2.SkyAppWindowRef }, { token: i2.SkyDynamicComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2072
2090
  SkyWaitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitService, providedIn: 'root' });
2073
2091
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyWaitService, decorators: [{
2074
2092
  type: Injectable,
2075
2093
  args: [{
2076
2094
  providedIn: 'root',
2077
2095
  }]
2078
- }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: SkyWaitPageAdapterService }, { type: i2.SkyAppWindowRef }]; } });
2096
+ }], ctorParameters: function () {
2097
+ return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: SkyWaitPageAdapterService }, { type: i2.SkyAppWindowRef }, { type: i2.SkyDynamicComponentService, decorators: [{
2098
+ type: Optional
2099
+ }] }];
2100
+ } });
2079
2101
 
2080
2102
  /**
2081
2103
  * Generated bundle index. Do not edit.