@skyux/core 5.0.0-beta.9 → 5.1.2

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.
Files changed (235) hide show
  1. package/LICENSE +21 -0
  2. package/bundles/skyux-core-testing.umd.js +363 -234
  3. package/bundles/skyux-core-testing.umd.js.map +1 -1
  4. package/bundles/skyux-core.umd.js +3320 -2917
  5. package/bundles/skyux-core.umd.js.map +1 -1
  6. package/documentation.json +8855 -0
  7. package/esm2015/modules/adapter-service/adapter.module.js +11 -8
  8. package/esm2015/modules/adapter-service/adapter.service.js +14 -15
  9. package/esm2015/modules/adapter-service/focusable-children-options.js +2 -1
  10. package/esm2015/modules/affix/affix-auto-fit-context.js +1 -1
  11. package/esm2015/modules/affix/affix-config.js +2 -1
  12. package/esm2015/modules/affix/affix-horizontal-alignment.js +2 -1
  13. package/esm2015/modules/affix/affix-offset-change.js +2 -1
  14. package/esm2015/modules/affix/affix-offset.js +2 -1
  15. package/esm2015/modules/affix/affix-placement-change.js +2 -1
  16. package/esm2015/modules/affix/affix-placement.js +2 -1
  17. package/esm2015/modules/affix/affix-utils.js +1 -1
  18. package/esm2015/modules/affix/affix-vertical-alignment.js +2 -1
  19. package/esm2015/modules/affix/affix.directive.js +36 -49
  20. package/esm2015/modules/affix/affix.module.js +22 -17
  21. package/esm2015/modules/affix/affix.service.js +12 -15
  22. package/esm2015/modules/affix/affixer.js +1 -1
  23. package/esm2015/modules/affix/dom-utils.js +1 -1
  24. package/esm2015/modules/dock/dock-dom-adapter.service.js +23 -15
  25. package/esm2015/modules/dock/dock-insert-component-config.js +2 -1
  26. package/esm2015/modules/dock/dock-item-config.js +2 -1
  27. package/esm2015/modules/dock/dock-item-reference.js +2 -1
  28. package/esm2015/modules/dock/dock-item.js +1 -1
  29. package/esm2015/modules/dock/dock-location.js +19 -0
  30. package/esm2015/modules/dock/dock-options.js +2 -0
  31. package/esm2015/modules/dock/dock.component.js +48 -33
  32. package/esm2015/modules/dock/dock.module.js +28 -17
  33. package/esm2015/modules/dock/dock.service.js +44 -16
  34. package/esm2015/modules/dock/sort-by-stack-order.js +1 -1
  35. package/esm2015/modules/dynamic-component/dynamic-component-location.js +15 -3
  36. package/esm2015/modules/dynamic-component/dynamic-component-options.js +2 -1
  37. package/esm2015/modules/dynamic-component/dynamic-component.module.js +11 -8
  38. package/esm2015/modules/dynamic-component/dynamic-component.service.js +24 -23
  39. package/esm2015/modules/format/app-format.js +11 -11
  40. package/esm2015/modules/id/id.directive.js +14 -16
  41. package/esm2015/modules/id/id.module.js +18 -15
  42. package/esm2015/modules/log/log.module.js +11 -8
  43. package/esm2015/modules/log/log.service.js +11 -11
  44. package/esm2015/modules/media-query/media-breakpoints.js +1 -1
  45. package/esm2015/modules/media-query/media-query-listener.js +2 -1
  46. package/esm2015/modules/media-query/media-query.module.js +11 -8
  47. package/esm2015/modules/media-query/media-query.service.js +16 -20
  48. package/esm2015/modules/mutation/mutation-observer-service.js +11 -11
  49. package/esm2015/modules/numeric/numeric-symbol.js +2 -1
  50. package/esm2015/modules/numeric/numeric.module.js +30 -21
  51. package/esm2015/modules/numeric/numeric.options.js +6 -1
  52. package/esm2015/modules/numeric/numeric.pipe.js +35 -21
  53. package/esm2015/modules/numeric/numeric.service.js +13 -16
  54. package/esm2015/modules/overlay/overlay-adapter.service.js +13 -15
  55. package/esm2015/modules/overlay/overlay-config.js +2 -1
  56. package/esm2015/modules/overlay/overlay-context.js +1 -1
  57. package/esm2015/modules/overlay/overlay-instance.js +1 -1
  58. package/esm2015/modules/overlay/overlay.component.js +41 -44
  59. package/esm2015/modules/overlay/overlay.module.js +22 -17
  60. package/esm2015/modules/overlay/overlay.service.js +18 -26
  61. package/esm2015/modules/percent-pipe/percent-pipe.module.js +30 -21
  62. package/esm2015/modules/percent-pipe/percent.pipe.js +15 -15
  63. package/esm2015/modules/scrollable-host/scrollable-host.service.js +83 -0
  64. package/esm2015/modules/shared/number-format/number-format-utility.js +4 -3
  65. package/esm2015/modules/shared/sky-core-resources.module.js +41 -0
  66. package/esm2015/modules/title/set-title-args.js +2 -1
  67. package/esm2015/modules/title/title.service.js +11 -15
  68. package/esm2015/modules/ui-config/ui-config.service.js +11 -11
  69. package/esm2015/modules/viewkeeper/viewkeeper-boundary-info.js +2 -1
  70. package/esm2015/modules/viewkeeper/viewkeeper-fixed-styles.js +2 -1
  71. package/esm2015/modules/viewkeeper/viewkeeper-host-options.js +9 -8
  72. package/esm2015/modules/viewkeeper/viewkeeper-offset.js +2 -1
  73. package/esm2015/modules/viewkeeper/viewkeeper-options.js +2 -1
  74. package/esm2015/modules/viewkeeper/viewkeeper.directive.js +47 -32
  75. package/esm2015/modules/viewkeeper/viewkeeper.js +16 -11
  76. package/esm2015/modules/viewkeeper/viewkeeper.module.js +18 -15
  77. package/esm2015/modules/viewkeeper/viewkeeper.service.js +13 -16
  78. package/esm2015/modules/window/window-ref.js +11 -11
  79. package/esm2015/public-api.js +60 -0
  80. package/esm2015/skyux-core.js +2 -12
  81. package/esm2015/testing/mock-media-query.service.js +9 -8
  82. package/esm2015/testing/mock-ui-config.service.js +9 -8
  83. package/esm2015/testing/public-api.js +3 -0
  84. package/esm2015/testing/skyux-core-testing.js +2 -2
  85. package/fesm2015/skyux-core-testing.js +15 -11
  86. package/fesm2015/skyux-core-testing.js.map +1 -1
  87. package/fesm2015/skyux-core.js +847 -574
  88. package/fesm2015/skyux-core.js.map +1 -1
  89. package/modules/adapter-service/adapter.module.d.ts +4 -0
  90. package/modules/adapter-service/adapter.service.d.ts +3 -0
  91. package/modules/affix/affix.directive.d.ts +3 -0
  92. package/modules/affix/affix.module.d.ts +6 -0
  93. package/modules/affix/affix.service.d.ts +3 -0
  94. package/modules/dock/dock-dom-adapter.service.d.ts +6 -0
  95. package/modules/dock/dock-location.d.ts +17 -0
  96. package/modules/dock/dock-options.d.ts +18 -0
  97. package/modules/dock/dock.component.d.ts +8 -3
  98. package/modules/dock/dock.module.d.ts +6 -0
  99. package/modules/dock/dock.service.d.ts +14 -1
  100. package/modules/dynamic-component/dynamic-component-location.d.ts +14 -2
  101. package/modules/dynamic-component/dynamic-component-options.d.ts +4 -0
  102. package/modules/dynamic-component/dynamic-component.module.d.ts +4 -0
  103. package/modules/dynamic-component/dynamic-component.service.d.ts +3 -0
  104. package/modules/format/app-format.d.ts +3 -0
  105. package/modules/id/id.directive.d.ts +3 -0
  106. package/modules/id/id.module.d.ts +5 -0
  107. package/modules/log/log.module.d.ts +4 -0
  108. package/modules/log/log.service.d.ts +3 -0
  109. package/modules/media-query/media-query.module.d.ts +4 -0
  110. package/modules/media-query/media-query.service.d.ts +3 -0
  111. package/modules/mutation/mutation-observer-service.d.ts +3 -0
  112. package/modules/numeric/numeric.module.d.ts +7 -0
  113. package/modules/numeric/numeric.options.d.ts +5 -0
  114. package/modules/numeric/numeric.pipe.d.ts +11 -2
  115. package/modules/numeric/numeric.service.d.ts +3 -0
  116. package/modules/overlay/overlay-adapter.service.d.ts +3 -0
  117. package/modules/overlay/overlay.component.d.ts +3 -0
  118. package/modules/overlay/overlay.module.d.ts +6 -0
  119. package/modules/overlay/overlay.service.d.ts +3 -0
  120. package/modules/percent-pipe/percent-pipe.module.d.ts +7 -0
  121. package/modules/percent-pipe/percent.pipe.d.ts +3 -0
  122. package/modules/scrollable-host/scrollable-host.service.d.ts +16 -0
  123. package/modules/shared/number-format/number-format-utility.d.ts +1 -1
  124. package/modules/shared/sky-core-resources.module.d.ts +14 -0
  125. package/modules/title/title.service.d.ts +3 -0
  126. package/modules/ui-config/ui-config.service.d.ts +3 -0
  127. package/modules/viewkeeper/viewkeeper-host-options.d.ts +4 -0
  128. package/modules/viewkeeper/viewkeeper-options.d.ts +5 -0
  129. package/modules/viewkeeper/viewkeeper.d.ts +1 -0
  130. package/modules/viewkeeper/viewkeeper.directive.d.ts +7 -1
  131. package/modules/viewkeeper/viewkeeper.module.d.ts +5 -0
  132. package/modules/viewkeeper/viewkeeper.service.d.ts +3 -0
  133. package/modules/window/window-ref.d.ts +3 -0
  134. package/package.json +8 -23
  135. package/{public_api.d.ts → public-api.d.ts} +6 -0
  136. package/skyux-core.d.ts +2 -11
  137. package/testing/mock-media-query.service.d.ts +3 -0
  138. package/testing/mock-ui-config.service.d.ts +3 -0
  139. package/testing/package.json +2 -5
  140. package/testing/{public_api.d.ts → public-api.d.ts} +0 -0
  141. package/testing/skyux-core-testing.d.ts +2 -1
  142. package/CHANGELOG.md +0 -328
  143. package/bundles/skyux-core-testing.umd.min.js +0 -16
  144. package/bundles/skyux-core-testing.umd.min.js.map +0 -1
  145. package/bundles/skyux-core.umd.min.js +0 -16
  146. package/bundles/skyux-core.umd.min.js.map +0 -1
  147. package/esm2015/modules/shared/core-resources.module.js +0 -17
  148. package/esm2015/plugin-resources/core-resources-provider.js +0 -16
  149. package/esm2015/public_api.js +0 -36
  150. package/esm2015/testing/public_api.js +0 -3
  151. package/esm5/modules/adapter-service/adapter.module.js +0 -16
  152. package/esm5/modules/adapter-service/adapter.service.js +0 -221
  153. package/esm5/modules/adapter-service/focusable-children-options.js +0 -1
  154. package/esm5/modules/affix/affix-auto-fit-context.js +0 -12
  155. package/esm5/modules/affix/affix-config.js +0 -1
  156. package/esm5/modules/affix/affix-horizontal-alignment.js +0 -1
  157. package/esm5/modules/affix/affix-offset-change.js +0 -1
  158. package/esm5/modules/affix/affix-offset.js +0 -1
  159. package/esm5/modules/affix/affix-placement-change.js +0 -1
  160. package/esm5/modules/affix/affix-placement.js +0 -1
  161. package/esm5/modules/affix/affix-utils.js +0 -23
  162. package/esm5/modules/affix/affix-vertical-alignment.js +0 -1
  163. package/esm5/modules/affix/affix.directive.js +0 -113
  164. package/esm5/modules/affix/affix.module.js +0 -24
  165. package/esm5/modules/affix/affix.service.js +0 -28
  166. package/esm5/modules/affix/affixer.js +0 -368
  167. package/esm5/modules/affix/dom-utils.js +0 -79
  168. package/esm5/modules/dock/dock-dom-adapter.service.js +0 -72
  169. package/esm5/modules/dock/dock-insert-component-config.js +0 -1
  170. package/esm5/modules/dock/dock-item-config.js +0 -1
  171. package/esm5/modules/dock/dock-item-reference.js +0 -1
  172. package/esm5/modules/dock/dock-item.js +0 -35
  173. package/esm5/modules/dock/dock.component.js +0 -87
  174. package/esm5/modules/dock/dock.module.js +0 -24
  175. package/esm5/modules/dock/dock.service.js +0 -69
  176. package/esm5/modules/dock/sort-by-stack-order.js +0 -13
  177. package/esm5/modules/dynamic-component/dynamic-component-location.js +0 -15
  178. package/esm5/modules/dynamic-component/dynamic-component-options.js +0 -1
  179. package/esm5/modules/dynamic-component/dynamic-component.module.js +0 -17
  180. package/esm5/modules/dynamic-component/dynamic-component.service.js +0 -82
  181. package/esm5/modules/format/app-format.js +0 -25
  182. package/esm5/modules/id/id.directive.js +0 -41
  183. package/esm5/modules/id/id.module.js +0 -20
  184. package/esm5/modules/log/log.module.js +0 -16
  185. package/esm5/modules/log/log.service.js +0 -29
  186. package/esm5/modules/media-query/media-breakpoints.js +0 -20
  187. package/esm5/modules/media-query/media-query-listener.js +0 -1
  188. package/esm5/modules/media-query/media-query.module.js +0 -16
  189. package/esm5/modules/media-query/media-query.service.js +0 -128
  190. package/esm5/modules/mutation/mutation-observer-service.js +0 -19
  191. package/esm5/modules/numeric/numeric-symbol.js +0 -1
  192. package/esm5/modules/numeric/numeric.module.js +0 -29
  193. package/esm5/modules/numeric/numeric.options.js +0 -38
  194. package/esm5/modules/numeric/numeric.pipe.js +0 -70
  195. package/esm5/modules/numeric/numeric.service.js +0 -196
  196. package/esm5/modules/overlay/overlay-adapter.service.js +0 -44
  197. package/esm5/modules/overlay/overlay-config.js +0 -1
  198. package/esm5/modules/overlay/overlay-context.js +0 -12
  199. package/esm5/modules/overlay/overlay-instance.js +0 -66
  200. package/esm5/modules/overlay/overlay.component.js +0 -168
  201. package/esm5/modules/overlay/overlay.module.js +0 -24
  202. package/esm5/modules/overlay/overlay.service.js +0 -128
  203. package/esm5/modules/percent-pipe/percent-pipe.module.js +0 -29
  204. package/esm5/modules/percent-pipe/percent.pipe.js +0 -49
  205. package/esm5/modules/shared/core-resources.module.js +0 -20
  206. package/esm5/modules/shared/number-format/number-format-utility.js +0 -75
  207. package/esm5/modules/title/set-title-args.js +0 -1
  208. package/esm5/modules/title/title.service.js +0 -35
  209. package/esm5/modules/ui-config/ui-config.service.js +0 -24
  210. package/esm5/modules/viewkeeper/viewkeeper-boundary-info.js +0 -1
  211. package/esm5/modules/viewkeeper/viewkeeper-fixed-styles.js +0 -1
  212. package/esm5/modules/viewkeeper/viewkeeper-host-options.js +0 -12
  213. package/esm5/modules/viewkeeper/viewkeeper-offset.js +0 -1
  214. package/esm5/modules/viewkeeper/viewkeeper-options.js +0 -1
  215. package/esm5/modules/viewkeeper/viewkeeper.directive.js +0 -134
  216. package/esm5/modules/viewkeeper/viewkeeper.js +0 -219
  217. package/esm5/modules/viewkeeper/viewkeeper.module.js +0 -20
  218. package/esm5/modules/viewkeeper/viewkeeper.service.js +0 -42
  219. package/esm5/modules/window/window-ref.js +0 -37
  220. package/esm5/plugin-resources/core-resources-provider.js +0 -17
  221. package/esm5/public_api.js +0 -36
  222. package/esm5/skyux-core.js +0 -15
  223. package/esm5/testing/mock-media-query.service.js +0 -47
  224. package/esm5/testing/mock-ui-config.service.js +0 -66
  225. package/esm5/testing/public_api.js +0 -3
  226. package/esm5/testing/skyux-core-testing.js +0 -5
  227. package/fesm5/skyux-core-testing.js +0 -114
  228. package/fesm5/skyux-core-testing.js.map +0 -1
  229. package/fesm5/skyux-core.js +0 -2903
  230. package/fesm5/skyux-core.js.map +0 -1
  231. package/modules/shared/core-resources.module.d.ts +0 -2
  232. package/plugin-resources/core-resources-provider.d.ts +0 -5
  233. package/skyux-core.metadata.json +0 -1
  234. package/src/assets/locales/resources_en_US.json +0 -18
  235. package/testing/skyux-core-testing.metadata.json +0 -1
@@ -1,21 +1,28 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { NgModule, RendererFactory2, ɵɵdefineInjectable, ɵɵinject, Injectable, EventEmitter, ElementRef, Input, Output, Directive, Injector, ChangeDetectorRef, ComponentFactoryResolver, ViewChild, ViewContainerRef, Component, ChangeDetectionStrategy, ApplicationRef, INJECTOR, Renderer2, NgZone, Pipe, Optional } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { NgModule, Injectable, EventEmitter, Directive, Input, Output, Injector, ViewContainerRef, Component, ChangeDetectionStrategy, ViewChild, Pipe, ElementRef, Optional } from '@angular/core';
3
+ import * as i4 from '@angular/common';
3
4
  import { CommonModule } from '@angular/common';
4
5
  import { Subject, fromEvent, BehaviorSubject, of } from 'rxjs';
5
- import { takeUntil, debounceTime } from 'rxjs/operators';
6
- import { getStringForLocale, SKY_LIB_RESOURCES_PROVIDERS, SkyIntlNumberFormatStyle, SkyIntlNumberFormatter, SkyLibResourcesService, SkyAppLocaleProvider, SkyI18nModule } from '@skyux/i18n';
7
- import { NavigationStart, Router } from '@angular/router';
8
- import { Title } from '@angular/platform-browser';
6
+ import { takeUntil, debounceTime, take } from 'rxjs/operators';
7
+ import * as i1 from '@skyux/i18n';
8
+ import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, SkyIntlNumberFormatStyle, SkyIntlNumberFormatter } from '@skyux/i18n';
9
+ import * as i3 from '@angular/router';
10
+ import { NavigationStart } from '@angular/router';
11
+ import * as i1$1 from '@angular/platform-browser';
9
12
 
10
13
  /**
11
14
  * @deprecated The `SkyCoreAdapterService` no longer needs the `SkyCoreAdapterModule`.
12
15
  * The `SkyCoreAdapterModule` can be removed from your project.
13
16
  */
14
- let SkyCoreAdapterModule = class SkyCoreAdapterModule {
15
- };
16
- SkyCoreAdapterModule = __decorate([
17
- NgModule({})
18
- ], SkyCoreAdapterModule);
17
+ class SkyCoreAdapterModule {
18
+ }
19
+ SkyCoreAdapterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20
+ SkyCoreAdapterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterModule });
21
+ SkyCoreAdapterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterModule });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterModule, decorators: [{
23
+ type: NgModule,
24
+ args: [{}]
25
+ }] });
19
26
 
20
27
  var SkyMediaBreakpoints;
21
28
  (function (SkyMediaBreakpoints) {
@@ -50,7 +57,7 @@ const SKY_TABBABLE_SELECTOR = [
50
57
  '*[contenteditable=true]:not([disabled])',
51
58
  '*[tabindex]:not([disabled])'
52
59
  ].join(', ');
53
- let SkyCoreAdapterService = class SkyCoreAdapterService {
60
+ class SkyCoreAdapterService {
54
61
  constructor(rendererFactory) {
55
62
  this.rendererFactory = rendererFactory;
56
63
  this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
@@ -196,6 +203,7 @@ let SkyCoreAdapterService = class SkyCoreAdapterService {
196
203
  */
197
204
  resetHeight(elementRef, selector) {
198
205
  const children = elementRef.nativeElement.querySelectorAll(selector);
206
+ /* istanbul ignore else */
199
207
  if (children.length > 0) {
200
208
  for (let i = 0; i < children.length; i++) {
201
209
  // Setting style attributes with Web API requires null instead of undefined.
@@ -211,6 +219,7 @@ let SkyCoreAdapterService = class SkyCoreAdapterService {
211
219
  */
212
220
  syncMaxHeight(elementRef, selector) {
213
221
  const children = elementRef.nativeElement.querySelectorAll(selector);
222
+ /* istanbul ignore else */
214
223
  if (children.length > 0) {
215
224
  let maxHeight = 0;
216
225
  for (let i = 0; i < children.length; i++) {
@@ -239,16 +248,15 @@ let SkyCoreAdapterService = class SkyCoreAdapterService {
239
248
  element.getClientRects().length);
240
249
  return hasBounds;
241
250
  }
242
- };
243
- SkyCoreAdapterService.ctorParameters = () => [
244
- { type: RendererFactory2 }
245
- ];
246
- SkyCoreAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function SkyCoreAdapterService_Factory() { return new SkyCoreAdapterService(ɵɵinject(RendererFactory2)); }, token: SkyCoreAdapterService, providedIn: "root" });
247
- SkyCoreAdapterService = __decorate([
248
- Injectable({
249
- providedIn: 'root'
250
- })
251
- ], SkyCoreAdapterService);
251
+ }
252
+ SkyCoreAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
253
+ SkyCoreAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterService, providedIn: 'root' });
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreAdapterService, decorators: [{
255
+ type: Injectable,
256
+ args: [{
257
+ providedIn: 'root'
258
+ }]
259
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
252
260
 
253
261
  var SkyAffixAutoFitContext;
254
262
  (function (SkyAffixAutoFitContext) {
@@ -706,7 +714,7 @@ class SkyAffixer {
706
714
  }
707
715
  }
708
716
 
709
- let SkyAffixService = class SkyAffixService {
717
+ class SkyAffixService {
710
718
  constructor(rendererFactory) {
711
719
  this.renderer = rendererFactory.createRenderer(undefined, undefined);
712
720
  }
@@ -717,21 +725,20 @@ let SkyAffixService = class SkyAffixService {
717
725
  createAffixer(affixed) {
718
726
  return new SkyAffixer(affixed.nativeElement, this.renderer);
719
727
  }
720
- };
721
- SkyAffixService.ctorParameters = () => [
722
- { type: RendererFactory2 }
723
- ];
724
- SkyAffixService.ɵprov = ɵɵdefineInjectable({ factory: function SkyAffixService_Factory() { return new SkyAffixService(ɵɵinject(RendererFactory2)); }, token: SkyAffixService, providedIn: "root" });
725
- SkyAffixService = __decorate([
726
- Injectable({
727
- providedIn: 'root'
728
- })
729
- ], SkyAffixService);
728
+ }
729
+ SkyAffixService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
730
+ SkyAffixService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixService, providedIn: 'root' });
731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixService, decorators: [{
732
+ type: Injectable,
733
+ args: [{
734
+ providedIn: 'root'
735
+ }]
736
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
730
737
 
731
738
  /**
732
739
  * Affixes the host element to a base element.
733
740
  */
734
- let SkyAffixDirective = class SkyAffixDirective {
741
+ class SkyAffixDirective {
735
742
  constructor(elementRef, affixService) {
736
743
  this.affixService = affixService;
737
744
  /**
@@ -789,65 +796,59 @@ let SkyAffixDirective = class SkyAffixDirective {
789
796
  verticalAlignment: this.affixVerticalAlignment
790
797
  });
791
798
  }
792
- };
793
- SkyAffixDirective.ctorParameters = () => [
794
- { type: ElementRef },
795
- { type: SkyAffixService }
796
- ];
797
- __decorate([
798
- Input()
799
- ], SkyAffixDirective.prototype, "skyAffixTo", void 0);
800
- __decorate([
801
- Input()
802
- ], SkyAffixDirective.prototype, "affixAutoFitContext", void 0);
803
- __decorate([
804
- Input()
805
- ], SkyAffixDirective.prototype, "affixAutoFitOverflowOffset", void 0);
806
- __decorate([
807
- Input()
808
- ], SkyAffixDirective.prototype, "affixEnableAutoFit", void 0);
809
- __decorate([
810
- Input()
811
- ], SkyAffixDirective.prototype, "affixHorizontalAlignment", void 0);
812
- __decorate([
813
- Input()
814
- ], SkyAffixDirective.prototype, "affixIsSticky", void 0);
815
- __decorate([
816
- Input()
817
- ], SkyAffixDirective.prototype, "affixPlacement", void 0);
818
- __decorate([
819
- Input()
820
- ], SkyAffixDirective.prototype, "affixVerticalAlignment", void 0);
821
- __decorate([
822
- Output()
823
- ], SkyAffixDirective.prototype, "affixOffsetChange", void 0);
824
- __decorate([
825
- Output()
826
- ], SkyAffixDirective.prototype, "affixOverflowScroll", void 0);
827
- __decorate([
828
- Output()
829
- ], SkyAffixDirective.prototype, "affixPlacementChange", void 0);
830
- SkyAffixDirective = __decorate([
831
- Directive({
832
- selector: '[skyAffixTo]'
833
- })
834
- ], SkyAffixDirective);
799
+ }
800
+ SkyAffixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixDirective, deps: [{ token: i0.ElementRef }, { token: SkyAffixService }], target: i0.ɵɵFactoryTarget.Directive });
801
+ SkyAffixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.12", type: SkyAffixDirective, selector: "[skyAffixTo]", inputs: { skyAffixTo: "skyAffixTo", affixAutoFitContext: "affixAutoFitContext", affixAutoFitOverflowOffset: "affixAutoFitOverflowOffset", affixEnableAutoFit: "affixEnableAutoFit", affixHorizontalAlignment: "affixHorizontalAlignment", affixIsSticky: "affixIsSticky", affixPlacement: "affixPlacement", affixVerticalAlignment: "affixVerticalAlignment" }, outputs: { affixOffsetChange: "affixOffsetChange", affixOverflowScroll: "affixOverflowScroll", affixPlacementChange: "affixPlacementChange" }, usesOnChanges: true, ngImport: i0 });
802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixDirective, decorators: [{
803
+ type: Directive,
804
+ args: [{
805
+ selector: '[skyAffixTo]'
806
+ }]
807
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SkyAffixService }]; }, propDecorators: { skyAffixTo: [{
808
+ type: Input
809
+ }], affixAutoFitContext: [{
810
+ type: Input
811
+ }], affixAutoFitOverflowOffset: [{
812
+ type: Input
813
+ }], affixEnableAutoFit: [{
814
+ type: Input
815
+ }], affixHorizontalAlignment: [{
816
+ type: Input
817
+ }], affixIsSticky: [{
818
+ type: Input
819
+ }], affixPlacement: [{
820
+ type: Input
821
+ }], affixVerticalAlignment: [{
822
+ type: Input
823
+ }], affixOffsetChange: [{
824
+ type: Output
825
+ }], affixOverflowScroll: [{
826
+ type: Output
827
+ }], affixPlacementChange: [{
828
+ type: Output
829
+ }] } });
835
830
 
836
- let SkyAffixModule = class SkyAffixModule {
837
- };
838
- SkyAffixModule = __decorate([
839
- NgModule({
840
- imports: [
831
+ class SkyAffixModule {
832
+ }
833
+ SkyAffixModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
834
+ SkyAffixModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixModule, declarations: [SkyAffixDirective], imports: [CommonModule], exports: [SkyAffixDirective] });
835
+ SkyAffixModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixModule, imports: [[
841
836
  CommonModule
842
- ],
843
- exports: [
844
- SkyAffixDirective
845
- ],
846
- declarations: [
847
- SkyAffixDirective
848
- ]
849
- })
850
- ], SkyAffixModule);
837
+ ]] });
838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAffixModule, decorators: [{
839
+ type: NgModule,
840
+ args: [{
841
+ imports: [
842
+ CommonModule
843
+ ],
844
+ exports: [
845
+ SkyAffixDirective
846
+ ],
847
+ declarations: [
848
+ SkyAffixDirective
849
+ ]
850
+ }]
851
+ }] });
851
852
 
852
853
  /**
853
854
  * Represents a single item added to the dock.
@@ -877,29 +878,52 @@ class SkyDockItem {
877
878
  }
878
879
  }
879
880
 
880
- let MutationObserverService = class MutationObserverService {
881
+ /**
882
+ * The location on the page where the dock component should be rendered.
883
+ */
884
+ var SkyDockLocation;
885
+ (function (SkyDockLocation) {
886
+ /**
887
+ * Renders the dock component before a given element.
888
+ */
889
+ SkyDockLocation[SkyDockLocation["BeforeElement"] = 0] = "BeforeElement";
890
+ /**
891
+ * Renders the dock component as the last element inside the BODY element.
892
+ */
893
+ SkyDockLocation[SkyDockLocation["BodyBottom"] = 1] = "BodyBottom";
894
+ /**
895
+ * Renders the dock component as the last element inside a given element.
896
+ */
897
+ SkyDockLocation[SkyDockLocation["ElementBottom"] = 2] = "ElementBottom";
898
+ })(SkyDockLocation || (SkyDockLocation = {}));
899
+
900
+ class MutationObserverService {
881
901
  create(callback) {
882
902
  return new MutationObserver(callback);
883
903
  }
884
- };
885
- MutationObserverService.ɵprov = ɵɵdefineInjectable({ factory: function MutationObserverService_Factory() { return new MutationObserverService(); }, token: MutationObserverService, providedIn: "root" });
886
- MutationObserverService = __decorate([
887
- Injectable({
888
- providedIn: 'root'
889
- })
890
- ], MutationObserverService);
904
+ }
905
+ MutationObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: MutationObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
906
+ MutationObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: MutationObserverService, providedIn: 'root' });
907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: MutationObserverService, decorators: [{
908
+ type: Injectable,
909
+ args: [{
910
+ providedIn: 'root'
911
+ }]
912
+ }] });
891
913
 
892
914
  /**
893
915
  * @internal
894
916
  */
895
- let SkyDockDomAdapterService = class SkyDockDomAdapterService {
917
+ class SkyDockDomAdapterService {
896
918
  constructor(mutationService, rendererFactory) {
897
919
  this.mutationService = mutationService;
898
920
  this.ngUnsubscribe = new Subject();
899
921
  this.renderer = rendererFactory.createRenderer(undefined, undefined);
900
922
  }
901
923
  ngOnDestroy() {
902
- this.observer.disconnect();
924
+ if (this.observer) {
925
+ this.observer.disconnect();
926
+ }
903
927
  this.ngUnsubscribe.next();
904
928
  if (this.styleElement) {
905
929
  this.destroyStyleElement();
@@ -909,6 +933,15 @@ let SkyDockDomAdapterService = class SkyDockDomAdapterService {
909
933
  this.observer =
910
934
  this.styleElement = undefined;
911
935
  }
936
+ setSticky(elementRef) {
937
+ this.renderer.addClass(elementRef.nativeElement, 'sky-dock-sticky');
938
+ }
939
+ setZIndex(zIndex, elementRef) {
940
+ this.renderer.setStyle(elementRef.nativeElement, 'z-index', zIndex);
941
+ }
942
+ unbindDock(elementRef) {
943
+ this.renderer.addClass(elementRef.nativeElement, 'sky-dock-unbound');
944
+ }
912
945
  watchDomChanges(elementRef) {
913
946
  this.observer = this.mutationService.create(() => {
914
947
  this.adjustBodyStyles(elementRef);
@@ -944,14 +977,12 @@ let SkyDockDomAdapterService = class SkyDockDomAdapterService {
944
977
  destroyStyleElement() {
945
978
  this.renderer.removeChild(document.head, this.styleElement);
946
979
  }
947
- };
948
- SkyDockDomAdapterService.ctorParameters = () => [
949
- { type: MutationObserverService },
950
- { type: RendererFactory2 }
951
- ];
952
- SkyDockDomAdapterService = __decorate([
953
- Injectable()
954
- ], SkyDockDomAdapterService);
980
+ }
981
+ SkyDockDomAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockDomAdapterService, deps: [{ token: MutationObserverService }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
982
+ SkyDockDomAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockDomAdapterService });
983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockDomAdapterService, decorators: [{
984
+ type: Injectable
985
+ }], ctorParameters: function () { return [{ type: MutationObserverService }, { type: i0.RendererFactory2 }]; } });
955
986
 
956
987
  /**
957
988
  * @internal
@@ -969,7 +1000,7 @@ function sortByStackOrder(a, b) {
969
1000
  /**
970
1001
  * @internal
971
1002
  */
972
- let SkyDockComponent = class SkyDockComponent {
1003
+ class SkyDockComponent {
973
1004
  constructor(changeDetector, resolver, elementRef, injector, domAdapter) {
974
1005
  this.changeDetector = changeDetector;
975
1006
  this.resolver = resolver;
@@ -978,9 +1009,6 @@ let SkyDockComponent = class SkyDockComponent {
978
1009
  this.domAdapter = domAdapter;
979
1010
  this.itemRefs = [];
980
1011
  }
981
- ngOnInit() {
982
- this.domAdapter.watchDomChanges(this.elementRef);
983
- }
984
1012
  insertComponent(component, config = {}) {
985
1013
  const factory = this.resolver.resolveComponentFactory(component);
986
1014
  const injector = Injector.create({
@@ -1008,6 +1036,25 @@ let SkyDockComponent = class SkyDockComponent {
1008
1036
  const found = this.itemRefs.find(i => i.componentRef.hostView === viewRef);
1009
1037
  this.itemRefs.splice(this.itemRefs.indexOf(found), 1);
1010
1038
  }
1039
+ setOptions(options) {
1040
+ var _a, _b;
1041
+ this.options = options;
1042
+ switch ((_a = this.options) === null || _a === void 0 ? void 0 : _a.location) {
1043
+ case SkyDockLocation.BeforeElement:
1044
+ this.domAdapter.unbindDock(this.elementRef);
1045
+ break;
1046
+ case SkyDockLocation.ElementBottom:
1047
+ this.domAdapter.setSticky(this.elementRef);
1048
+ break;
1049
+ case SkyDockLocation.BodyBottom:
1050
+ default:
1051
+ this.domAdapter.watchDomChanges(this.elementRef);
1052
+ break;
1053
+ }
1054
+ if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.zIndex) {
1055
+ this.domAdapter.setZIndex(this.options.zIndex, this.elementRef);
1056
+ }
1057
+ }
1011
1058
  sortItemsByStackOrder() {
1012
1059
  this.itemRefs.sort(sortByStackOrder);
1013
1060
  // Reassign the correct index for each view.
@@ -1019,47 +1066,83 @@ let SkyDockComponent = class SkyDockComponent {
1019
1066
  }
1020
1067
  return this.itemRefs[0].stackOrder + 1;
1021
1068
  }
1022
- };
1023
- SkyDockComponent.ctorParameters = () => [
1024
- { type: ChangeDetectorRef },
1025
- { type: ComponentFactoryResolver },
1026
- { type: ElementRef },
1027
- { type: Injector },
1028
- { type: SkyDockDomAdapterService }
1029
- ];
1030
- __decorate([
1031
- ViewChild('target', {
1032
- read: ViewContainerRef,
1033
- static: true
1034
- })
1035
- ], SkyDockComponent.prototype, "target", void 0);
1036
- SkyDockComponent = __decorate([
1037
- Component({
1038
- selector: 'sky-dock',
1039
- template: "<ng-container\n #target\n></ng-container>",
1040
- providers: [
1041
- SkyDockDomAdapterService
1042
- ],
1043
- changeDetection: ChangeDetectionStrategy.OnPush,
1044
- styles: [":host{position:fixed;left:0;bottom:0;right:0;display:flex;flex-direction:column;width:100%}"]
1045
- })
1046
- ], SkyDockComponent);
1069
+ }
1070
+ SkyDockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.Injector }, { token: SkyDockDomAdapterService }], target: i0.ɵɵFactoryTarget.Component });
1071
+ SkyDockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SkyDockComponent, selector: "sky-dock", providers: [
1072
+ SkyDockDomAdapterService
1073
+ ], viewQueries: [{ propertyName: "target", first: true, predicate: ["target"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container\n #target\n></ng-container>", styles: [":host{display:flex;flex-direction:column;width:100%}:host:not(.sky-dock-unbound){position:fixed;left:0;bottom:0;right:0}:host.sky-dock-sticky{position:sticky}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockComponent, decorators: [{
1075
+ type: Component,
1076
+ args: [{
1077
+ selector: 'sky-dock',
1078
+ templateUrl: './dock.component.html',
1079
+ styleUrls: ['./dock.component.scss'],
1080
+ providers: [
1081
+ SkyDockDomAdapterService
1082
+ ],
1083
+ changeDetection: ChangeDetectionStrategy.OnPush
1084
+ }]
1085
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.Injector }, { type: SkyDockDomAdapterService }]; }, propDecorators: { target: [{
1086
+ type: ViewChild,
1087
+ args: ['target', {
1088
+ read: ViewContainerRef,
1089
+ static: true
1090
+ }]
1091
+ }] } });
1047
1092
 
1048
- let SkyDockModule = class SkyDockModule {
1049
- };
1050
- SkyDockModule = __decorate([
1051
- NgModule({
1052
- imports: [
1093
+ class SkyDockModule {
1094
+ }
1095
+ SkyDockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1096
+ SkyDockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockModule, declarations: [SkyDockComponent], imports: [CommonModule] });
1097
+ SkyDockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockModule, providers: [
1098
+ MutationObserverService
1099
+ ], imports: [[
1053
1100
  CommonModule
1054
- ],
1055
- declarations: [
1056
- SkyDockComponent
1057
- ],
1058
- entryComponents: [
1059
- SkyDockComponent
1060
- ]
1061
- })
1062
- ], SkyDockModule);
1101
+ ]] });
1102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockModule, decorators: [{
1103
+ type: NgModule,
1104
+ args: [{
1105
+ imports: [
1106
+ CommonModule
1107
+ ],
1108
+ declarations: [
1109
+ SkyDockComponent
1110
+ ],
1111
+ entryComponents: [
1112
+ SkyDockComponent
1113
+ ],
1114
+ providers: [
1115
+ MutationObserverService
1116
+ ]
1117
+ }]
1118
+ }] });
1119
+
1120
+ /**
1121
+ * The location on the page where the dynamic component should be rendered.
1122
+ */
1123
+ var SkyDynamicComponentLocation;
1124
+ (function (SkyDynamicComponentLocation) {
1125
+ /**
1126
+ * Renders the dynamic component before a given element.
1127
+ */
1128
+ SkyDynamicComponentLocation[SkyDynamicComponentLocation["BeforeElement"] = 0] = "BeforeElement";
1129
+ /**
1130
+ * Renders the dynamic component as the last element inside the BODY element.
1131
+ */
1132
+ SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyBottom"] = 1] = "BodyBottom";
1133
+ /**
1134
+ * Renders the dynamic component as the first element inside the BODY element.
1135
+ */
1136
+ SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyTop"] = 2] = "BodyTop";
1137
+ /**
1138
+ * Renders the dynamic component as the last element inside a given element.
1139
+ */
1140
+ SkyDynamicComponentLocation[SkyDynamicComponentLocation["ElementBottom"] = 3] = "ElementBottom";
1141
+ /**
1142
+ * Renders the dynamic component as the first element inside a given element.
1143
+ */
1144
+ SkyDynamicComponentLocation[SkyDynamicComponentLocation["ElementTop"] = 4] = "ElementTop";
1145
+ })(SkyDynamicComponentLocation || (SkyDynamicComponentLocation = {}));
1063
1146
 
1064
1147
  /**
1065
1148
  * @internal
@@ -1072,40 +1155,27 @@ function getWindow() {
1072
1155
  * After users inject SkyAppWindowRef into a component, they can use the service to interact with
1073
1156
  * window properties and event handlers by referencing its nativeWindow property.
1074
1157
  */
1075
- let SkyAppWindowRef = class SkyAppWindowRef {
1158
+ class SkyAppWindowRef {
1076
1159
  /**
1077
1160
  * References the global `window` variable.
1078
1161
  */
1079
1162
  get nativeWindow() {
1080
1163
  return getWindow();
1081
1164
  }
1082
- };
1083
- SkyAppWindowRef.ɵprov = ɵɵdefineInjectable({ factory: function SkyAppWindowRef_Factory() { return new SkyAppWindowRef(); }, token: SkyAppWindowRef, providedIn: "root" });
1084
- SkyAppWindowRef = __decorate([
1085
- Injectable({
1086
- providedIn: 'root'
1087
- })
1088
- ], SkyAppWindowRef);
1089
-
1090
- /**
1091
- * The location on the page where the dynamic component should be rendered.
1092
- */
1093
- var SkyDynamicComponentLocation;
1094
- (function (SkyDynamicComponentLocation) {
1095
- /**
1096
- * Renders the dynamic component as the last element inside the BODY element.
1097
- */
1098
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyBottom"] = 0] = "BodyBottom";
1099
- /**
1100
- * Renders the dynamic component as the first element inside the BODY element.
1101
- */
1102
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyTop"] = 1] = "BodyTop";
1103
- })(SkyDynamicComponentLocation || (SkyDynamicComponentLocation = {}));
1165
+ }
1166
+ SkyAppWindowRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppWindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1167
+ SkyAppWindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppWindowRef, providedIn: 'root' });
1168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppWindowRef, decorators: [{
1169
+ type: Injectable,
1170
+ args: [{
1171
+ providedIn: 'root'
1172
+ }]
1173
+ }] });
1104
1174
 
1105
1175
  /**
1106
1176
  * Angular service for creating and rendering a dynamic component.
1107
1177
  */
1108
- let SkyDynamicComponentService = class SkyDynamicComponentService {
1178
+ class SkyDynamicComponentService {
1109
1179
  constructor(componentFactoryResolver, applicationRef, injector, windowRef, rendererFactory) {
1110
1180
  this.componentFactoryResolver = componentFactoryResolver;
1111
1181
  this.applicationRef = applicationRef;
@@ -1133,6 +1203,15 @@ let SkyDynamicComponentService = class SkyDynamicComponentService {
1133
1203
  const el = this.getRootNode(componentRef);
1134
1204
  const bodyEl = this.windowRef.nativeWindow.document.body;
1135
1205
  switch (options.location) {
1206
+ case SkyDynamicComponentLocation.BeforeElement:
1207
+ this.renderer.insertBefore(options.referenceEl.parentElement, el, options.referenceEl);
1208
+ break;
1209
+ case SkyDynamicComponentLocation.ElementTop:
1210
+ this.renderer.insertBefore(options.referenceEl, el, options.referenceEl.firstChild);
1211
+ break;
1212
+ case SkyDynamicComponentLocation.ElementBottom:
1213
+ this.renderer.appendChild(options.referenceEl, el);
1214
+ break;
1136
1215
  case SkyDynamicComponentLocation.BodyTop:
1137
1216
  this.renderer.insertBefore(bodyEl, el, bodyEl.firstChild);
1138
1217
  break;
@@ -1158,28 +1237,23 @@ let SkyDynamicComponentService = class SkyDynamicComponentService {
1158
1237
  // https://malcoded.com/posts/angular-dynamic-components
1159
1238
  return componentRef.hostView.rootNodes[0];
1160
1239
  }
1161
- };
1162
- SkyDynamicComponentService.ctorParameters = () => [
1163
- { type: ComponentFactoryResolver },
1164
- { type: ApplicationRef },
1165
- { type: Injector },
1166
- { type: SkyAppWindowRef },
1167
- { type: RendererFactory2 }
1168
- ];
1169
- SkyDynamicComponentService.ɵprov = ɵɵdefineInjectable({ factory: function SkyDynamicComponentService_Factory() { return new SkyDynamicComponentService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(SkyAppWindowRef), ɵɵinject(RendererFactory2)); }, token: SkyDynamicComponentService, providedIn: "any" });
1170
- SkyDynamicComponentService = __decorate([
1171
- Injectable({
1172
- // Must be 'any' so that the component is created in the context of its module's injector.
1173
- // If set to 'root', the component's dependency injections would only be derived from the root
1174
- // injector and may loose context if the component is created within a lazy-loaded module.
1175
- providedIn: 'any'
1176
- })
1177
- ], SkyDynamicComponentService);
1240
+ }
1241
+ SkyDynamicComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: SkyAppWindowRef }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
1242
+ SkyDynamicComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentService, providedIn: 'any' });
1243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentService, decorators: [{
1244
+ type: Injectable,
1245
+ args: [{
1246
+ // Must be 'any' so that the component is created in the context of its module's injector.
1247
+ // If set to 'root', the component's dependency injections would only be derived from the root
1248
+ // injector and may loose context if the component is created within a lazy-loaded module.
1249
+ providedIn: 'any'
1250
+ }]
1251
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: SkyAppWindowRef }, { type: i0.RendererFactory2 }]; } });
1178
1252
 
1179
1253
  /**
1180
1254
  * This service docks components to specific areas on the page.
1181
1255
  */
1182
- let SkyDockService = class SkyDockService {
1256
+ class SkyDockService {
1183
1257
  constructor(dynamicComponentService) {
1184
1258
  this.dynamicComponentService = dynamicComponentService;
1185
1259
  this._items = [];
@@ -1212,48 +1286,83 @@ let SkyDockService = class SkyDockService {
1212
1286
  this._items.sort(sortByStackOrder);
1213
1287
  return item;
1214
1288
  }
1289
+ /**
1290
+ * Sets options for the positioning and styling of the dock component. Since the dock service is a
1291
+ * singleton instance, these options will be applied to all components inserted into the dock. In
1292
+ * order to create a seperate dock with different options, consumers should provide a different
1293
+ * instance of the dock service.
1294
+ * @param options The options for positioning and styling
1295
+ */
1296
+ setDockOptions(options) {
1297
+ this.options = options;
1298
+ }
1215
1299
  createDock() {
1216
- this.dockRef = this.dynamicComponentService.createComponent(SkyDockComponent);
1300
+ let dockOptions;
1301
+ if (this.options) {
1302
+ let dynamicLocation;
1303
+ switch (this.options.location) {
1304
+ case SkyDockLocation.BeforeElement:
1305
+ dynamicLocation = SkyDynamicComponentLocation.BeforeElement;
1306
+ break;
1307
+ case SkyDockLocation.ElementBottom:
1308
+ dynamicLocation = SkyDynamicComponentLocation.ElementBottom;
1309
+ break;
1310
+ default:
1311
+ dynamicLocation = SkyDynamicComponentLocation.BodyTop;
1312
+ break;
1313
+ }
1314
+ dockOptions = {
1315
+ location: dynamicLocation,
1316
+ referenceEl: this.options.referenceEl
1317
+ };
1318
+ }
1319
+ this.dockRef = this.dynamicComponentService.createComponent(SkyDockComponent, dockOptions);
1320
+ this.dockRef.instance.setOptions(this.options);
1217
1321
  }
1218
1322
  destroyDock() {
1219
1323
  this.dynamicComponentService.removeComponent(this.dockRef);
1220
1324
  this.dockRef = undefined;
1221
1325
  }
1222
- };
1223
- SkyDockService.ctorParameters = () => [
1224
- { type: SkyDynamicComponentService }
1225
- ];
1226
- SkyDockService.ɵprov = ɵɵdefineInjectable({ factory: function SkyDockService_Factory() { return new SkyDockService(ɵɵinject(SkyDynamicComponentService)); }, token: SkyDockService, providedIn: "root" });
1227
- SkyDockService = __decorate([
1228
- Injectable({
1229
- providedIn: 'root'
1230
- })
1231
- ], SkyDockService);
1326
+ }
1327
+ SkyDockService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockService, deps: [{ token: SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
1328
+ SkyDockService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockService, providedIn: 'root' });
1329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDockService, decorators: [{
1330
+ type: Injectable,
1331
+ args: [{
1332
+ providedIn: 'root'
1333
+ }]
1334
+ }], ctorParameters: function () { return [{ type: SkyDynamicComponentService }]; } });
1232
1335
 
1233
1336
  /**
1234
1337
  * Provides services required to create dynamic components on the page.
1235
1338
  * @deprecated The `SkyDynamicComponentService` no longer needs the `SkyDynamicComponentModule`.
1236
1339
  * The `SkyDynamicComponentModule` can be removed from your project.
1237
1340
  */
1238
- let SkyDynamicComponentModule = class SkyDynamicComponentModule {
1239
- };
1240
- SkyDynamicComponentModule = __decorate([
1241
- NgModule({})
1242
- ], SkyDynamicComponentModule);
1341
+ class SkyDynamicComponentModule {
1342
+ }
1343
+ SkyDynamicComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1344
+ SkyDynamicComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentModule });
1345
+ SkyDynamicComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentModule });
1346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyDynamicComponentModule, decorators: [{
1347
+ type: NgModule,
1348
+ args: [{}]
1349
+ }] });
1243
1350
 
1244
- let SkyAppFormat = class SkyAppFormat {
1351
+ class SkyAppFormat {
1245
1352
  formatText(format, ...args) {
1246
1353
  return String(format).replace(/\{(\d+)\}/g, function (match, capture) {
1247
1354
  return args[parseInt(capture, 10)];
1248
1355
  });
1249
1356
  }
1250
- };
1251
- SkyAppFormat.ɵprov = ɵɵdefineInjectable({ factory: function SkyAppFormat_Factory() { return new SkyAppFormat(); }, token: SkyAppFormat, providedIn: "root" });
1252
- SkyAppFormat = __decorate([
1253
- Injectable({
1254
- providedIn: 'root'
1255
- })
1256
- ], SkyAppFormat);
1357
+ }
1358
+ SkyAppFormat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppFormat, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1359
+ SkyAppFormat.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppFormat, providedIn: 'root' });
1360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppFormat, decorators: [{
1361
+ type: Injectable,
1362
+ args: [{
1363
+ providedIn: 'root'
1364
+ }]
1365
+ }] });
1257
1366
 
1258
1367
  let idIndex = 0;
1259
1368
  function generateId() {
@@ -1265,7 +1374,7 @@ function generateId() {
1265
1374
  * such as in a `label` element's `for` attribute, assign this directive to a template reference
1266
1375
  * variable, then use its `id` property.
1267
1376
  */
1268
- let SkyIdDirective = class SkyIdDirective {
1377
+ class SkyIdDirective {
1269
1378
  constructor(elRef, renderer) {
1270
1379
  // Generate and apply the ID before the template is rendered
1271
1380
  // to avoid a changed-after-checked error.
@@ -1276,90 +1385,102 @@ let SkyIdDirective = class SkyIdDirective {
1276
1385
  get id() {
1277
1386
  return this._id;
1278
1387
  }
1279
- };
1280
- SkyIdDirective.ctorParameters = () => [
1281
- { type: ElementRef },
1282
- { type: Renderer2 }
1283
- ];
1284
- SkyIdDirective = __decorate([
1285
- Directive({
1286
- selector: '[skyId]',
1287
- exportAs: 'skyId'
1288
- })
1289
- ], SkyIdDirective);
1388
+ }
1389
+ SkyIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1390
+ SkyIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.12", type: SkyIdDirective, selector: "[skyId]", exportAs: ["skyId"], ngImport: i0 });
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdDirective, decorators: [{
1392
+ type: Directive,
1393
+ args: [{
1394
+ selector: '[skyId]',
1395
+ exportAs: 'skyId'
1396
+ }]
1397
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
1290
1398
 
1291
- let SkyIdModule = class SkyIdModule {
1292
- };
1293
- SkyIdModule = __decorate([
1294
- NgModule({
1295
- declarations: [
1296
- SkyIdDirective
1297
- ],
1298
- exports: [
1299
- SkyIdDirective
1300
- ]
1301
- })
1302
- ], SkyIdModule);
1399
+ class SkyIdModule {
1400
+ }
1401
+ SkyIdModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1402
+ SkyIdModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdModule, declarations: [SkyIdDirective], exports: [SkyIdDirective] });
1403
+ SkyIdModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdModule });
1404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyIdModule, decorators: [{
1405
+ type: NgModule,
1406
+ args: [{
1407
+ declarations: [
1408
+ SkyIdDirective
1409
+ ],
1410
+ exports: [
1411
+ SkyIdDirective
1412
+ ]
1413
+ }]
1414
+ }] });
1303
1415
 
1304
1416
  /**
1305
1417
  * @deprecated The `SkyLogService` no longer needs the `SkyLogModule`.
1306
1418
  * The `SkyLogModule` can be removed from your project.
1307
1419
  */
1308
- let SkyLogModule = class SkyLogModule {
1309
- };
1310
- SkyLogModule = __decorate([
1311
- NgModule({})
1312
- ], SkyLogModule);
1420
+ class SkyLogModule {
1421
+ }
1422
+ SkyLogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1423
+ SkyLogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogModule });
1424
+ SkyLogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogModule });
1425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogModule, decorators: [{
1426
+ type: NgModule,
1427
+ args: [{}]
1428
+ }] });
1313
1429
 
1314
1430
  /**
1315
1431
  * @deprecated The `SkyLogService` will be removed in the next major version of `@skyux/core`.
1316
1432
  */
1317
- let SkyLogService = class SkyLogService {
1433
+ class SkyLogService {
1318
1434
  warn(message, ...optionalParams) {
1319
1435
  /*istanbul ignore else */
1320
1436
  if (window.console) {
1321
1437
  window.console.warn.apply(window.console, arguments);
1322
1438
  }
1323
1439
  }
1324
- };
1325
- SkyLogService.ɵprov = ɵɵdefineInjectable({ factory: function SkyLogService_Factory() { return new SkyLogService(); }, token: SkyLogService, providedIn: "root" });
1326
- SkyLogService = __decorate([
1327
- Injectable({
1328
- providedIn: 'root'
1329
- })
1330
- ], SkyLogService);
1440
+ }
1441
+ SkyLogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1442
+ SkyLogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogService, providedIn: 'root' });
1443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyLogService, decorators: [{
1444
+ type: Injectable,
1445
+ args: [{
1446
+ providedIn: 'root'
1447
+ }]
1448
+ }] });
1331
1449
 
1332
1450
  /**
1333
1451
  * @deprecated The `SkyMediaQueryService` no longer needs the `SkyMediaQueryModule`.
1334
1452
  * The `SkyMediaQueryModule` can be removed from your project.
1335
1453
  */
1336
- let SkyMediaQueryModule = class SkyMediaQueryModule {
1337
- };
1338
- SkyMediaQueryModule = __decorate([
1339
- NgModule({})
1340
- ], SkyMediaQueryModule);
1454
+ class SkyMediaQueryModule {
1455
+ }
1456
+ SkyMediaQueryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1457
+ SkyMediaQueryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryModule });
1458
+ SkyMediaQueryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryModule });
1459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryModule, decorators: [{
1460
+ type: NgModule,
1461
+ args: [{}]
1462
+ }] });
1341
1463
 
1342
- var SkyMediaQueryService_1;
1343
- let SkyMediaQueryService = SkyMediaQueryService_1 = class SkyMediaQueryService {
1464
+ class SkyMediaQueryService {
1344
1465
  constructor(zone) {
1345
1466
  this.zone = zone;
1346
1467
  this.currentSubject = new BehaviorSubject(this.current);
1347
1468
  this._current = SkyMediaBreakpoints.md;
1348
1469
  this.breakpoints = [
1349
1470
  {
1350
- mediaQueryString: SkyMediaQueryService_1.xs,
1471
+ mediaQueryString: SkyMediaQueryService.xs,
1351
1472
  name: SkyMediaBreakpoints.xs
1352
1473
  },
1353
1474
  {
1354
- mediaQueryString: SkyMediaQueryService_1.sm,
1475
+ mediaQueryString: SkyMediaQueryService.sm,
1355
1476
  name: SkyMediaBreakpoints.sm
1356
1477
  },
1357
1478
  {
1358
- mediaQueryString: SkyMediaQueryService_1.md,
1479
+ mediaQueryString: SkyMediaQueryService.md,
1359
1480
  name: SkyMediaBreakpoints.md
1360
1481
  },
1361
1482
  {
1362
- mediaQueryString: SkyMediaQueryService_1.lg,
1483
+ mediaQueryString: SkyMediaQueryService.lg,
1363
1484
  name: SkyMediaBreakpoints.lg
1364
1485
  }
1365
1486
  ];
@@ -1427,7 +1548,7 @@ let SkyMediaQueryService = SkyMediaQueryService_1 = class SkyMediaQueryService {
1427
1548
  this._current = breakpoint;
1428
1549
  this.currentSubject.next(breakpoint);
1429
1550
  }
1430
- };
1551
+ }
1431
1552
  /**
1432
1553
  * The size for the `xs` breakpoint.
1433
1554
  */
@@ -1444,39 +1565,93 @@ SkyMediaQueryService.md = '(min-width: 992px) and (max-width: 1199px)';
1444
1565
  * The size for the `lg` breakpoint.
1445
1566
  */
1446
1567
  SkyMediaQueryService.lg = '(min-width: 1200px)';
1447
- SkyMediaQueryService.ctorParameters = () => [
1448
- { type: NgZone }
1449
- ];
1450
- SkyMediaQueryService.ɵprov = ɵɵdefineInjectable({ factory: function SkyMediaQueryService_Factory() { return new SkyMediaQueryService(ɵɵinject(NgZone)); }, token: SkyMediaQueryService, providedIn: "root" });
1451
- SkyMediaQueryService = SkyMediaQueryService_1 = __decorate([
1452
- Injectable({
1453
- providedIn: 'root'
1454
- })
1455
- ], SkyMediaQueryService);
1568
+ SkyMediaQueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
1569
+ SkyMediaQueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryService, providedIn: 'root' });
1570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyMediaQueryService, decorators: [{
1571
+ type: Injectable,
1572
+ args: [{
1573
+ providedIn: 'root'
1574
+ }]
1575
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
1456
1576
 
1457
- let SkyCoreResourcesProvider = class SkyCoreResourcesProvider {
1458
- constructor() {
1459
- this.resources = { "EN-US": { "skyux_numeric_billions_symbol": "B", "skyux_numeric_millions_symbol": "M", "skyux_numeric_thousands_symbol": "K", "skyux_numeric_trillions_symbol": "T" } };
1460
- }
1577
+ /**
1578
+ * NOTICE: DO NOT MODIFY THIS FILE!
1579
+ * The contents of this file were automatically generated by
1580
+ * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-core' schematic.
1581
+ * To update this file, simply rerun the command.
1582
+ */
1583
+ const RESOURCES = {
1584
+ 'EN-US': { "skyux_numeric_billions_symbol": { "message": "B" }, "skyux_numeric_millions_symbol": { "message": "M" }, "skyux_numeric_thousands_symbol": { "message": "K" }, "skyux_numeric_trillions_symbol": { "message": "T" } },
1585
+ };
1586
+ class SkyCoreResourcesProvider {
1461
1587
  getString(localeInfo, name) {
1462
- return getStringForLocale(this.resources, localeInfo.locale, name);
1588
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
1463
1589
  }
1464
- };
1465
- SkyCoreResourcesProvider = __decorate([
1466
- Injectable()
1467
- ], SkyCoreResourcesProvider);
1590
+ }
1591
+ /**
1592
+ * Import into any component library module that needs to use resource strings.
1593
+ */
1594
+ class SkyCoreResourcesModule {
1595
+ }
1596
+ SkyCoreResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1597
+ SkyCoreResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreResourcesModule, exports: [SkyI18nModule] });
1598
+ SkyCoreResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreResourcesModule, providers: [{
1599
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
1600
+ useClass: SkyCoreResourcesProvider,
1601
+ multi: true
1602
+ }], imports: [SkyI18nModule] });
1603
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyCoreResourcesModule, decorators: [{
1604
+ type: NgModule,
1605
+ args: [{
1606
+ exports: [SkyI18nModule],
1607
+ providers: [{
1608
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
1609
+ useClass: SkyCoreResourcesProvider,
1610
+ multi: true
1611
+ }]
1612
+ }]
1613
+ }] });
1468
1614
 
1469
- let SkyCoreResourcesModule = class SkyCoreResourcesModule {
1470
- };
1471
- SkyCoreResourcesModule = __decorate([
1472
- NgModule({
1473
- providers: [{
1474
- provide: SKY_LIB_RESOURCES_PROVIDERS,
1475
- useClass: SkyCoreResourcesProvider,
1476
- multi: true
1477
- }]
1478
- })
1479
- ], SkyCoreResourcesModule);
1615
+ /**
1616
+ * Provides arguments for the number to format.
1617
+ */
1618
+ class NumericOptions {
1619
+ constructor() {
1620
+ /**
1621
+ * Specifies the maximum number of digits after the decimal separator.
1622
+ * @default 1
1623
+ */
1624
+ this.digits = 1;
1625
+ /**
1626
+ * Specifies how to format the number. Options are `currency` or `number`.
1627
+ * @default "number"
1628
+ */
1629
+ this.format = 'number';
1630
+ /**
1631
+ * Specifies the format of the currency`.
1632
+ * @default "standard"
1633
+ */
1634
+ this.currencySign = 'standard';
1635
+ /**
1636
+ * Specifies the ISO4217 currency code to use for currency formatting. If you do not specify a
1637
+ * currency code, the component uses the browser's culture to determine the currency unless your
1638
+ * SPA provides a different culture with `SkyAppLocaleProvider`.
1639
+ * @default 'USD'
1640
+ */
1641
+ this.iso = 'USD';
1642
+ /**
1643
+ * Indicates whether to shorten numbers to rounded numbers and abbreviation characters
1644
+ * such as K for thousands, M for millions, B for billions, and T for trillion.
1645
+ */
1646
+ this.truncate = true;
1647
+ /**
1648
+ * Specifies the starting point after which numbers are shortened to rounded numbers
1649
+ * and abbreviation characters.
1650
+ * @default 0
1651
+ */
1652
+ this.truncateAfter = 0;
1653
+ }
1654
+ }
1480
1655
 
1481
1656
  /* tslint:disable:no-null-keyword */
1482
1657
  function isNumeric(value) {
@@ -1496,7 +1671,7 @@ function parseIntAutoRadix(text) {
1496
1671
  class SkyNumberFormatUtility {
1497
1672
  /* istanbul ignore next */
1498
1673
  constructor() { }
1499
- static formatNumber(locale, value, style, digits, currency = null, currencyAsSymbol = false) {
1674
+ static formatNumber(locale, value, style, digits, currency = null, currencyAsSymbol = false, currencySign) {
1500
1675
  if (value == null) {
1501
1676
  return null;
1502
1677
  }
@@ -1537,13 +1712,14 @@ class SkyNumberFormatUtility {
1537
1712
  minimumFractionDigits: minFraction,
1538
1713
  maximumFractionDigits: maxFraction,
1539
1714
  currency: currency,
1540
- currencyAsSymbol: currencyAsSymbol
1715
+ currencyAsSymbol: currencyAsSymbol,
1716
+ currencySign: currencySign
1541
1717
  });
1542
1718
  }
1543
1719
  }
1544
1720
  SkyNumberFormatUtility._NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
1545
1721
 
1546
- let SkyNumericService = class SkyNumericService {
1722
+ class SkyNumericService {
1547
1723
  constructor(resourcesService) {
1548
1724
  this.resourcesService = resourcesService;
1549
1725
  this.symbolIndex = [
@@ -1621,7 +1797,7 @@ let SkyNumericService = class SkyNumericService {
1621
1797
  // and the appropriate string value for Angular 5+.
1622
1798
  // See: https://angular.io/api/common/CurrencyPipe#parameters
1623
1799
  const symbolDisplay = 'symbol';
1624
- output = SkyNumberFormatUtility.formatNumber(locale, parseFloat(output), SkyIntlNumberFormatStyle.Currency, digits, options.iso, symbolDisplay);
1800
+ output = SkyNumberFormatUtility.formatNumber(locale, parseFloat(output), SkyIntlNumberFormatStyle.Currency, digits, options.iso, symbolDisplay, options.currencySign);
1625
1801
  break;
1626
1802
  // The following is a catch-all to ensure that if
1627
1803
  // anything but currency (or a future option) are entered,
@@ -1715,52 +1891,15 @@ let SkyNumericService = class SkyNumericService {
1715
1891
  // TODO: Need to implement the async `getString` method in a breaking change.
1716
1892
  return this.resourcesService.getStringForLocale({ locale: 'en_US' }, key);
1717
1893
  }
1718
- };
1719
- SkyNumericService.ctorParameters = () => [
1720
- { type: SkyLibResourcesService }
1721
- ];
1722
- SkyNumericService.ɵprov = ɵɵdefineInjectable({ factory: function SkyNumericService_Factory() { return new SkyNumericService(ɵɵinject(SkyLibResourcesService)); }, token: SkyNumericService, providedIn: "any" });
1723
- SkyNumericService = __decorate([
1724
- Injectable({
1725
- providedIn: 'any'
1726
- })
1727
- ], SkyNumericService);
1728
-
1729
- /**
1730
- * Provides arguments for the number to format.
1731
- */
1732
- class NumericOptions {
1733
- constructor() {
1734
- /**
1735
- * Specifies the maximum number of digits after the decimal separator.
1736
- * @default 1
1737
- */
1738
- this.digits = 1;
1739
- /**
1740
- * Specifies how to format the number. Options are `currency` or `number`.
1741
- * @default "number"
1742
- */
1743
- this.format = 'number';
1744
- /**
1745
- * Specifies the ISO4217 currency code to use for currency formatting. If you do not specify a
1746
- * currency code, the component uses the browser's culture to determine the currency unless your
1747
- * SPA provides a different culture with `SkyAppLocaleProvider`.
1748
- * @default 'USD'
1749
- */
1750
- this.iso = 'USD';
1751
- /**
1752
- * Indicates whether to shorten numbers to rounded numbers and abbreviation characters
1753
- * such as K for thousands, M for millions, B for billions, and T for trillion.
1754
- */
1755
- this.truncate = true;
1756
- /**
1757
- * Specifies the starting point after which numbers are shortened to rounded numbers
1758
- * and abbreviation characters.
1759
- * @default 0
1760
- */
1761
- this.truncateAfter = 0;
1762
- }
1763
1894
  }
1895
+ SkyNumericService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericService, deps: [{ token: i1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Injectable });
1896
+ SkyNumericService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericService, providedIn: 'any' });
1897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericService, decorators: [{
1898
+ type: Injectable,
1899
+ args: [{
1900
+ providedIn: 'any'
1901
+ }]
1902
+ }], ctorParameters: function () { return [{ type: i1.SkyLibResourcesService }]; } });
1764
1903
 
1765
1904
  /**
1766
1905
  * Shorten numbers to rounded numbers and abbreviation characters such as K for thousands,
@@ -1772,15 +1911,18 @@ class NumericOptions {
1772
1911
  * {{ value | skyNumeric(config) }}
1773
1912
  * ```
1774
1913
  */
1775
- let SkyNumericPipe = class SkyNumericPipe {
1776
- constructor(localeProvider, numericService) {
1914
+ class SkyNumericPipe {
1915
+ constructor(localeProvider, numericService, changeDetector) {
1777
1916
  this.localeProvider = localeProvider;
1778
1917
  this.numericService = numericService;
1918
+ this.changeDetector = changeDetector;
1779
1919
  this.ngUnsubscribe = new Subject();
1780
1920
  this.localeProvider.getLocaleInfo()
1781
1921
  .pipe(takeUntil(this.ngUnsubscribe))
1782
1922
  .subscribe((localeInfo) => {
1783
- numericService.currentLocale = localeInfo.locale;
1923
+ this.providerLocale = localeInfo.locale;
1924
+ numericService.currentLocale = this.providerLocale;
1925
+ this.changeDetector.markForCheck();
1784
1926
  });
1785
1927
  }
1786
1928
  ngOnDestroy() {
@@ -1788,13 +1930,20 @@ let SkyNumericPipe = class SkyNumericPipe {
1788
1930
  this.ngUnsubscribe.complete();
1789
1931
  }
1790
1932
  transform(value, config) {
1933
+ var _a;
1934
+ let newCacheKey = (config ? JSON.stringify(config, Object.keys(config).sort()) : '') + `${value}_${(config === null || config === void 0 ? void 0 : config.locale) || this.providerLocale}`;
1935
+ /* If the value and locale are the same as the last transform then return the previous value
1936
+ instead of reformatting. */
1937
+ if (this.formattedValue && this.cacheKey === newCacheKey) {
1938
+ return this.formattedValue;
1939
+ }
1791
1940
  const options = new NumericOptions();
1792
1941
  // The default number of digits is `1`. When truncate is disabled, set digits
1793
1942
  // to `0` to avoid the unnecessary addition of `.0` at the end of the formatted number.
1794
1943
  if (config &&
1795
1944
  config.truncate === false &&
1796
1945
  config.digits === undefined) {
1797
- config.digits = 0;
1946
+ options.digits = 0;
1798
1947
  }
1799
1948
  // If the minimum digits is less than the set maximum digits then throw an error
1800
1949
  if (config &&
@@ -1807,41 +1956,56 @@ let SkyNumericPipe = class SkyNumericPipe {
1807
1956
  else if (config &&
1808
1957
  config.minDigits &&
1809
1958
  !config.digits) {
1810
- config.digits = config.minDigits;
1959
+ options.digits = config.minDigits;
1811
1960
  }
1812
1961
  Object.assign(options, config);
1813
- return this.numericService.formatNumber(value, options);
1962
+ // Assign properties for proper result caching.
1963
+ this.rawValue = value;
1964
+ this.lastTransformLocale = (_a = config === null || config === void 0 ? void 0 : config.locale) !== null && _a !== void 0 ? _a : this.providerLocale;
1965
+ this.cacheKey = newCacheKey;
1966
+ this.formattedValue = this.numericService.formatNumber(value, options);
1967
+ return this.formattedValue;
1814
1968
  }
1815
- };
1816
- SkyNumericPipe.ctorParameters = () => [
1817
- { type: SkyAppLocaleProvider },
1818
- { type: SkyNumericService }
1819
- ];
1820
- SkyNumericPipe = __decorate([
1821
- Pipe({
1822
- name: 'skyNumeric'
1823
- })
1824
- ], SkyNumericPipe);
1969
+ }
1970
+ SkyNumericPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericPipe, deps: [{ token: i1.SkyAppLocaleProvider }, { token: SkyNumericService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
1971
+ SkyNumericPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericPipe, name: "skyNumeric", pure: false });
1972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericPipe, decorators: [{
1973
+ type: Pipe,
1974
+ args: [{
1975
+ name: 'skyNumeric',
1976
+ pure: false
1977
+ }]
1978
+ }], ctorParameters: function () { return [{ type: i1.SkyAppLocaleProvider }, { type: SkyNumericService }, { type: i0.ChangeDetectorRef }]; } });
1825
1979
 
1826
- let SkyNumericModule = class SkyNumericModule {
1827
- };
1828
- SkyNumericModule = __decorate([
1829
- NgModule({
1830
- declarations: [
1831
- SkyNumericPipe
1832
- ],
1833
- providers: [
1834
- SkyNumericPipe
1835
- ],
1836
- imports: [
1980
+ class SkyNumericModule {
1981
+ }
1982
+ SkyNumericModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1983
+ SkyNumericModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericModule, declarations: [SkyNumericPipe], imports: [SkyI18nModule,
1984
+ SkyCoreResourcesModule], exports: [SkyNumericPipe] });
1985
+ SkyNumericModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericModule, providers: [
1986
+ SkyNumericPipe
1987
+ ], imports: [[
1837
1988
  SkyI18nModule,
1838
1989
  SkyCoreResourcesModule
1839
- ],
1840
- exports: [
1841
- SkyNumericPipe
1842
- ]
1843
- })
1844
- ], SkyNumericModule);
1990
+ ]] });
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyNumericModule, decorators: [{
1992
+ type: NgModule,
1993
+ args: [{
1994
+ declarations: [
1995
+ SkyNumericPipe
1996
+ ],
1997
+ providers: [
1998
+ SkyNumericPipe
1999
+ ],
2000
+ imports: [
2001
+ SkyI18nModule,
2002
+ SkyCoreResourcesModule
2003
+ ],
2004
+ exports: [
2005
+ SkyNumericPipe
2006
+ ]
2007
+ }]
2008
+ }] });
1845
2009
 
1846
2010
  /**
1847
2011
  * Represents a new overlay instance. It is used to manage the "closed" state of the overlay,
@@ -1924,7 +2088,7 @@ let uniqueZIndex = 5000;
1924
2088
  /**
1925
2089
  * @internal
1926
2090
  */
1927
- let SkyOverlayComponent = class SkyOverlayComponent {
2091
+ class SkyOverlayComponent {
1928
2092
  constructor(changeDetector, resolver, injector, coreAdapter, context, router) {
1929
2093
  this.changeDetector = changeDetector;
1930
2094
  this.resolver = resolver;
@@ -2017,63 +2181,65 @@ let SkyOverlayComponent = class SkyOverlayComponent {
2017
2181
  this.routerSubscription = undefined;
2018
2182
  }
2019
2183
  }
2020
- };
2021
- SkyOverlayComponent.ctorParameters = () => [
2022
- { type: ChangeDetectorRef },
2023
- { type: ComponentFactoryResolver },
2024
- { type: Injector },
2025
- { type: SkyCoreAdapterService },
2026
- { type: SkyOverlayContext },
2027
- { type: Router, decorators: [{ type: Optional }] }
2028
- ];
2029
- __decorate([
2030
- ViewChild('overlayContentRef', {
2031
- read: ElementRef,
2032
- static: true
2033
- })
2034
- ], SkyOverlayComponent.prototype, "overlayContentRef", void 0);
2035
- __decorate([
2036
- ViewChild('overlayRef', {
2037
- read: ElementRef,
2038
- static: true
2039
- })
2040
- ], SkyOverlayComponent.prototype, "overlayRef", void 0);
2041
- __decorate([
2042
- ViewChild('target', {
2043
- read: ViewContainerRef,
2044
- static: true
2045
- })
2046
- ], SkyOverlayComponent.prototype, "targetRef", void 0);
2047
- SkyOverlayComponent = __decorate([
2048
- Component({
2049
- selector: 'sky-overlay',
2050
- template: "<div\n [class]=\"wrapperClass\"\n [style.zIndex]=\"zIndex\"\n [ngClass]=\"{\n 'enable-pointer-events-pass-through': enablePointerEvents,\n 'sky-overlay': true\n }\"\n #overlayRef\n>\n <div\n class=\"sky-overlay-content\"\n #overlayContentRef\n >\n <ng-template\n #target\n >\n </ng-template>\n </div>\n <div *ngIf=\"showBackdrop\"\n class=\"sky-overlay-backdrop\"\n ></div>\n</div>\n",
2051
- changeDetection: ChangeDetectionStrategy.OnPush,
2052
- styles: [".sky-overlay{position:fixed;top:0;right:0;left:0;bottom:0;width:100%;height:100%;display:flex;pointer-events:auto}.sky-overlay-content{position:relative;z-index:1;display:inline-flex;-ms-grid-row-align:start;align-self:start;pointer-events:auto}.sky-overlay-backdrop{background:rgba(0,0,0,.5);top:0;right:0;left:0;bottom:0;width:100%;height:100%;position:absolute}.enable-pointer-events-pass-through,.enable-pointer-events-pass-through .sky-overlay-backdrop{pointer-events:none}.enable-pointer-events-pass-through .sky-overlay-content{pointer-events:auto}"]
2053
- }),
2054
- __param(5, Optional())
2055
- ], SkyOverlayComponent);
2184
+ }
2185
+ SkyOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: SkyCoreAdapterService }, { token: SkyOverlayContext }, { token: i3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2186
+ SkyOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SkyOverlayComponent, selector: "sky-overlay", viewQueries: [{ propertyName: "overlayContentRef", first: true, predicate: ["overlayContentRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "overlayRef", first: true, predicate: ["overlayRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "targetRef", first: true, predicate: ["target"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n [class]=\"wrapperClass\"\n [style.zIndex]=\"zIndex\"\n [ngClass]=\"{\n 'enable-pointer-events-pass-through': enablePointerEvents,\n 'sky-overlay': true\n }\"\n #overlayRef\n>\n <div\n class=\"sky-overlay-content\"\n #overlayContentRef\n >\n <ng-template\n #target\n >\n </ng-template>\n </div>\n <div *ngIf=\"showBackdrop\"\n class=\"sky-overlay-backdrop\"\n ></div>\n</div>\n", styles: [".sky-overlay{position:fixed;top:0;right:0;left:0;bottom:0;width:100%;height:100%;display:flex;pointer-events:auto}.sky-overlay-content{position:relative;z-index:1;display:inline-flex;align-self:start;pointer-events:auto}.sky-overlay-backdrop{background:rgba(0,0,0,.5);top:0;right:0;left:0;bottom:0;width:100%;height:100%;position:absolute}.enable-pointer-events-pass-through{pointer-events:none}.enable-pointer-events-pass-through .sky-overlay-backdrop{pointer-events:none}.enable-pointer-events-pass-through .sky-overlay-content{pointer-events:auto}\n"], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayComponent, decorators: [{
2188
+ type: Component,
2189
+ args: [{
2190
+ selector: 'sky-overlay',
2191
+ templateUrl: './overlay.component.html',
2192
+ styleUrls: ['./overlay.component.scss'],
2193
+ changeDetection: ChangeDetectionStrategy.OnPush
2194
+ }]
2195
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: SkyCoreAdapterService }, { type: SkyOverlayContext }, { type: i3.Router, decorators: [{
2196
+ type: Optional
2197
+ }] }]; }, propDecorators: { overlayContentRef: [{
2198
+ type: ViewChild,
2199
+ args: ['overlayContentRef', {
2200
+ read: ElementRef,
2201
+ static: true
2202
+ }]
2203
+ }], overlayRef: [{
2204
+ type: ViewChild,
2205
+ args: ['overlayRef', {
2206
+ read: ElementRef,
2207
+ static: true
2208
+ }]
2209
+ }], targetRef: [{
2210
+ type: ViewChild,
2211
+ args: ['target', {
2212
+ read: ViewContainerRef,
2213
+ static: true
2214
+ }]
2215
+ }] } });
2056
2216
 
2057
- let SkyOverlayModule = class SkyOverlayModule {
2058
- };
2059
- SkyOverlayModule = __decorate([
2060
- NgModule({
2061
- imports: [
2217
+ class SkyOverlayModule {
2218
+ }
2219
+ SkyOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2220
+ SkyOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayModule, declarations: [SkyOverlayComponent], imports: [CommonModule] });
2221
+ SkyOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayModule, imports: [[
2062
2222
  CommonModule
2063
- ],
2064
- declarations: [
2065
- SkyOverlayComponent
2066
- ],
2067
- entryComponents: [
2068
- SkyOverlayComponent
2069
- ]
2070
- })
2071
- ], SkyOverlayModule);
2223
+ ]] });
2224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayModule, decorators: [{
2225
+ type: NgModule,
2226
+ args: [{
2227
+ imports: [
2228
+ CommonModule
2229
+ ],
2230
+ declarations: [
2231
+ SkyOverlayComponent
2232
+ ],
2233
+ entryComponents: [
2234
+ SkyOverlayComponent
2235
+ ]
2236
+ }]
2237
+ }] });
2072
2238
 
2073
2239
  /**
2074
2240
  * @internal
2075
2241
  */
2076
- let SkyOverlayAdapterService = class SkyOverlayAdapterService {
2242
+ class SkyOverlayAdapterService {
2077
2243
  constructor(rendererFactory) {
2078
2244
  this.renderer = rendererFactory.createRenderer(undefined, undefined);
2079
2245
  }
@@ -2094,27 +2260,26 @@ let SkyOverlayAdapterService = class SkyOverlayAdapterService {
2094
2260
  this.destroyStyleElement();
2095
2261
  }
2096
2262
  destroyStyleElement() {
2263
+ /* istanbul ignore else */
2097
2264
  if (this.styleElement.parentElement === document.head) {
2098
2265
  this.renderer.removeChild(document.head, this.styleElement);
2099
2266
  }
2100
2267
  }
2101
- };
2102
- SkyOverlayAdapterService.ctorParameters = () => [
2103
- { type: RendererFactory2 }
2104
- ];
2105
- SkyOverlayAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function SkyOverlayAdapterService_Factory() { return new SkyOverlayAdapterService(ɵɵinject(RendererFactory2)); }, token: SkyOverlayAdapterService, providedIn: "root" });
2106
- SkyOverlayAdapterService = __decorate([
2107
- Injectable({
2108
- providedIn: 'root'
2109
- })
2110
- ], SkyOverlayAdapterService);
2268
+ }
2269
+ SkyOverlayAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
2270
+ SkyOverlayAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayAdapterService, providedIn: 'root' });
2271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayAdapterService, decorators: [{
2272
+ type: Injectable,
2273
+ args: [{
2274
+ providedIn: 'root'
2275
+ }]
2276
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
2111
2277
 
2112
- var SkyOverlayService_1;
2113
2278
  /**
2114
2279
  * This service is used to create new overlays.
2115
2280
  * @dynamic
2116
2281
  */
2117
- let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
2282
+ class SkyOverlayService {
2118
2283
  constructor(applicationRef, componentFactoryResolver, injector, adapter) {
2119
2284
  this.applicationRef = applicationRef;
2120
2285
  this.componentFactoryResolver = componentFactoryResolver;
@@ -2135,11 +2300,11 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
2135
2300
  instance.closed.subscribe(() => {
2136
2301
  // Only execute the service's close method if the instance still exists.
2137
2302
  // This is needed to address a race condition if the deprecated instance.close method is used instead.
2138
- if (SkyOverlayService_1.overlays.indexOf(instance) > -1) {
2303
+ if (SkyOverlayService.overlays.indexOf(instance) > -1) {
2139
2304
  this.close(instance);
2140
2305
  }
2141
2306
  });
2142
- SkyOverlayService_1.overlays.push(instance);
2307
+ SkyOverlayService.overlays.push(instance);
2143
2308
  return instance;
2144
2309
  }
2145
2310
  /**
@@ -2168,8 +2333,8 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
2168
2333
  closeAll() {
2169
2334
  // The `close` event handler for each instance alters the array's length asynchronously,
2170
2335
  // so the only "safe" index to call is zero.
2171
- while (SkyOverlayService_1.overlays.length > 0) {
2172
- this.close(SkyOverlayService_1.overlays[0]);
2336
+ while (SkyOverlayService.overlays.length > 0) {
2337
+ this.close(SkyOverlayService.overlays[0]);
2173
2338
  }
2174
2339
  }
2175
2340
  createOverlay(config) {
@@ -2201,31 +2366,27 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
2201
2366
  return Object.assign(Object.assign({}, defaults), config);
2202
2367
  }
2203
2368
  destroyOverlay(instance) {
2204
- SkyOverlayService_1.overlays.splice(SkyOverlayService_1.overlays.indexOf(instance), 1);
2369
+ SkyOverlayService.overlays.splice(SkyOverlayService.overlays.indexOf(instance), 1);
2205
2370
  if (instance.config.enableScroll === false) {
2206
2371
  // Only release the body scroll if no other overlay wishes it to be disabled.
2207
- const anotherOverlayDisablesScroll = SkyOverlayService_1.overlays.some(o => !o.config.enableScroll);
2372
+ const anotherOverlayDisablesScroll = SkyOverlayService.overlays.some(o => !o.config.enableScroll);
2208
2373
  if (!anotherOverlayDisablesScroll) {
2209
2374
  this.adapter.releaseBodyScroll();
2210
2375
  }
2211
2376
  }
2212
2377
  }
2213
- };
2378
+ }
2214
2379
  SkyOverlayService.overlays = [];
2215
- SkyOverlayService.ctorParameters = () => [
2216
- { type: ApplicationRef },
2217
- { type: ComponentFactoryResolver },
2218
- { type: Injector },
2219
- { type: SkyOverlayAdapterService }
2220
- ];
2221
- SkyOverlayService.ɵprov = ɵɵdefineInjectable({ factory: function SkyOverlayService_Factory() { return new SkyOverlayService(ɵɵinject(ApplicationRef), ɵɵinject(ComponentFactoryResolver), ɵɵinject(INJECTOR), ɵɵinject(SkyOverlayAdapterService)); }, token: SkyOverlayService, providedIn: "root" });
2222
- SkyOverlayService = SkyOverlayService_1 = __decorate([
2223
- Injectable({
2224
- providedIn: 'root'
2225
- })
2226
- ], SkyOverlayService);
2380
+ SkyOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayService, deps: [{ token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: SkyOverlayAdapterService }], target: i0.ɵɵFactoryTarget.Injectable });
2381
+ SkyOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayService, providedIn: 'root' });
2382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyOverlayService, decorators: [{
2383
+ type: Injectable,
2384
+ args: [{
2385
+ providedIn: 'root'
2386
+ }]
2387
+ }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: SkyOverlayAdapterService }]; } });
2227
2388
 
2228
- let SkyPercentPipe = class SkyPercentPipe {
2389
+ class SkyPercentPipe {
2229
2390
  constructor(localeProvider) {
2230
2391
  this.localeProvider = localeProvider;
2231
2392
  this.defaultFormat = '1.0-2';
@@ -2254,41 +2415,128 @@ let SkyPercentPipe = class SkyPercentPipe {
2254
2415
  const format = this.format || this.defaultFormat;
2255
2416
  this.formattedValue = SkyNumberFormatUtility.formatNumber(locale, this.value, SkyIntlNumberFormatStyle.Percent, format);
2256
2417
  }
2257
- };
2258
- SkyPercentPipe.ctorParameters = () => [
2259
- { type: SkyAppLocaleProvider }
2260
- ];
2261
- SkyPercentPipe = __decorate([
2262
- Pipe({
2263
- name: 'skyPercent',
2264
- pure: false
2265
- })
2266
- ], SkyPercentPipe);
2418
+ }
2419
+ SkyPercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipe, deps: [{ token: i1.SkyAppLocaleProvider }], target: i0.ɵɵFactoryTarget.Pipe });
2420
+ SkyPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipe, name: "skyPercent", pure: false });
2421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipe, decorators: [{
2422
+ type: Pipe,
2423
+ args: [{
2424
+ name: 'skyPercent',
2425
+ pure: false
2426
+ }]
2427
+ }], ctorParameters: function () { return [{ type: i1.SkyAppLocaleProvider }]; } });
2267
2428
 
2268
- let SkyPercentPipeModule = class SkyPercentPipeModule {
2269
- };
2270
- SkyPercentPipeModule = __decorate([
2271
- NgModule({
2272
- declarations: [
2273
- SkyPercentPipe
2274
- ],
2275
- providers: [
2276
- SkyPercentPipe
2277
- ],
2278
- imports: [
2429
+ class SkyPercentPipeModule {
2430
+ }
2431
+ SkyPercentPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2432
+ SkyPercentPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipeModule, declarations: [SkyPercentPipe], imports: [CommonModule,
2433
+ SkyCoreResourcesModule], exports: [SkyPercentPipe] });
2434
+ SkyPercentPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipeModule, providers: [
2435
+ SkyPercentPipe
2436
+ ], imports: [[
2279
2437
  CommonModule,
2280
2438
  SkyCoreResourcesModule
2281
- ],
2282
- exports: [
2283
- SkyPercentPipe
2284
- ]
2285
- })
2286
- ], SkyPercentPipeModule);
2439
+ ]] });
2440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyPercentPipeModule, decorators: [{
2441
+ type: NgModule,
2442
+ args: [{
2443
+ declarations: [
2444
+ SkyPercentPipe
2445
+ ],
2446
+ providers: [
2447
+ SkyPercentPipe
2448
+ ],
2449
+ imports: [
2450
+ CommonModule,
2451
+ SkyCoreResourcesModule
2452
+ ],
2453
+ exports: [
2454
+ SkyPercentPipe
2455
+ ]
2456
+ }]
2457
+ }] });
2458
+
2459
+ class SkyScrollableHostService {
2460
+ constructor(mutationObserverSvc, windowRef) {
2461
+ this.mutationObserverSvc = mutationObserverSvc;
2462
+ this.windowRef = windowRef;
2463
+ }
2464
+ getScrollabeHost(elementRef) {
2465
+ return this.findScrollableHost(elementRef.nativeElement);
2466
+ }
2467
+ watchScrollableHost(elementRef, completionObservable) {
2468
+ let scrollableHost = this.findScrollableHost(elementRef.nativeElement);
2469
+ let behaviorSubject = new BehaviorSubject(scrollableHost);
2470
+ const mutationObserver = this.mutationObserverSvc.create(() => {
2471
+ let newScrollableHost = this.findScrollableHost(elementRef.nativeElement);
2472
+ if (newScrollableHost !== scrollableHost) {
2473
+ scrollableHost = newScrollableHost;
2474
+ this.observeForScrollableHostChanges(scrollableHost, mutationObserver);
2475
+ behaviorSubject.next(scrollableHost);
2476
+ }
2477
+ });
2478
+ this.observeForScrollableHostChanges(scrollableHost, mutationObserver);
2479
+ completionObservable.pipe(take(1)).subscribe(() => {
2480
+ mutationObserver.disconnect();
2481
+ });
2482
+ return behaviorSubject;
2483
+ }
2484
+ findScrollableHost(element) {
2485
+ const regex = /(auto|scroll)/;
2486
+ const windowObj = this.windowRef.nativeWindow;
2487
+ const bodyObj = windowObj.document.body;
2488
+ /* Sanity check */
2489
+ if (!element) {
2490
+ return windowObj;
2491
+ }
2492
+ let style = windowObj.getComputedStyle(element);
2493
+ let parent = element;
2494
+ do {
2495
+ parent = parent.parentNode;
2496
+ /* Sanity check for if this function is called for an element which has been removed from the DOM */
2497
+ if (!(parent instanceof HTMLElement)) {
2498
+ return windowObj;
2499
+ }
2500
+ style = windowObj.getComputedStyle(parent);
2501
+ } while (!regex.test(style.overflow) &&
2502
+ !regex.test(style.overflowY) &&
2503
+ parent !== bodyObj);
2504
+ if (parent === bodyObj) {
2505
+ return windowObj;
2506
+ }
2507
+ return parent;
2508
+ }
2509
+ observeForScrollableHostChanges(element, mutationObserver) {
2510
+ mutationObserver.disconnect();
2511
+ if (element instanceof HTMLElement) {
2512
+ mutationObserver.observe(element, {
2513
+ attributes: true,
2514
+ attributeFilter: ["class", "style.overflow", "style.overflow-y"],
2515
+ subtree: true
2516
+ });
2517
+ }
2518
+ else {
2519
+ mutationObserver.observe(document.documentElement, {
2520
+ attributes: true,
2521
+ attributeFilter: ["class", "style.overflow", "style.overflow-y"],
2522
+ subtree: true
2523
+ });
2524
+ }
2525
+ }
2526
+ }
2527
+ SkyScrollableHostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyScrollableHostService, deps: [{ token: MutationObserverService }, { token: SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
2528
+ SkyScrollableHostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyScrollableHostService, providedIn: 'root' });
2529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyScrollableHostService, decorators: [{
2530
+ type: Injectable,
2531
+ args: [{
2532
+ providedIn: 'root'
2533
+ }]
2534
+ }], ctorParameters: function () { return [{ type: MutationObserverService }, { type: SkyAppWindowRef }]; } });
2287
2535
 
2288
2536
  /**
2289
2537
  * Provides a method for setting a formatted title on the current window.
2290
2538
  */
2291
- let SkyAppTitleService = class SkyAppTitleService {
2539
+ class SkyAppTitleService {
2292
2540
  constructor(title) {
2293
2541
  this.title = title;
2294
2542
  }
@@ -2302,18 +2550,17 @@ let SkyAppTitleService = class SkyAppTitleService {
2302
2550
  this.title.setTitle(args.titleParts.join(' - '));
2303
2551
  }
2304
2552
  }
2305
- };
2306
- SkyAppTitleService.ctorParameters = () => [
2307
- { type: Title }
2308
- ];
2309
- SkyAppTitleService.ɵprov = ɵɵdefineInjectable({ factory: function SkyAppTitleService_Factory() { return new SkyAppTitleService(ɵɵinject(Title)); }, token: SkyAppTitleService, providedIn: "root" });
2310
- SkyAppTitleService = __decorate([
2311
- Injectable({
2312
- providedIn: 'root'
2313
- })
2314
- ], SkyAppTitleService);
2553
+ }
2554
+ SkyAppTitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppTitleService, deps: [{ token: i1$1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
2555
+ SkyAppTitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppTitleService, providedIn: 'root' });
2556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyAppTitleService, decorators: [{
2557
+ type: Injectable,
2558
+ args: [{
2559
+ providedIn: 'root'
2560
+ }]
2561
+ }], ctorParameters: function () { return [{ type: i1$1.Title }]; } });
2315
2562
 
2316
- let SkyUIConfigService = class SkyUIConfigService {
2563
+ class SkyUIConfigService {
2317
2564
  getConfig(key, defaultConfig) {
2318
2565
  return of(defaultConfig);
2319
2566
  }
@@ -2321,19 +2568,23 @@ let SkyUIConfigService = class SkyUIConfigService {
2321
2568
  setConfig(key, value) {
2322
2569
  return of({});
2323
2570
  }
2324
- };
2325
- SkyUIConfigService.ɵprov = ɵɵdefineInjectable({ factory: function SkyUIConfigService_Factory() { return new SkyUIConfigService(); }, token: SkyUIConfigService, providedIn: "root" });
2326
- SkyUIConfigService = __decorate([
2327
- Injectable({
2328
- providedIn: 'root'
2329
- })
2330
- ], SkyUIConfigService);
2571
+ }
2572
+ SkyUIConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyUIConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2573
+ SkyUIConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyUIConfigService, providedIn: 'root' });
2574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyUIConfigService, decorators: [{
2575
+ type: Injectable,
2576
+ args: [{
2577
+ providedIn: 'root'
2578
+ }]
2579
+ }] });
2331
2580
 
2332
- let SkyViewkeeperHostOptions = class SkyViewkeeperHostOptions {
2333
- };
2334
- SkyViewkeeperHostOptions = __decorate([
2335
- Injectable()
2336
- ], SkyViewkeeperHostOptions);
2581
+ class SkyViewkeeperHostOptions {
2582
+ }
2583
+ SkyViewkeeperHostOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperHostOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2584
+ SkyViewkeeperHostOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperHostOptions });
2585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperHostOptions, decorators: [{
2586
+ type: Injectable
2587
+ }] });
2337
2588
 
2338
2589
  const CLS_VIEWKEEPER_FIXED = 'sky-viewkeeper-fixed';
2339
2590
  const EVT_AFTER_VIEWKEEPER_SYNC = 'afterViewkeeperSync';
@@ -2363,11 +2614,12 @@ function nextId() {
2363
2614
  nextIdIndex = (nextIdIndex || 0) + 1;
2364
2615
  return 'viewkeeper-' + nextIdIndex;
2365
2616
  }
2366
- function getOffset(el) {
2617
+ function getOffset(el, scrollableHost) {
2367
2618
  const rect = el.getBoundingClientRect();
2619
+ const parent = scrollableHost ? scrollableHost : document.documentElement;
2368
2620
  return {
2369
- top: rect.top + document.documentElement.scrollTop,
2370
- left: rect.left + document.documentElement.scrollLeft
2621
+ top: rect.top + parent.scrollTop,
2622
+ left: rect.left + parent.scrollLeft
2371
2623
  };
2372
2624
  }
2373
2625
  function px(value) {
@@ -2403,6 +2655,7 @@ class SkyViewkeeper {
2403
2655
  this.id = nextId();
2404
2656
  this.el = options.el;
2405
2657
  this.boundaryEl = options.boundaryEl;
2658
+ this.scrollableHost = options.scrollableHost;
2406
2659
  this.verticalOffset = options.verticalOffset || 0;
2407
2660
  this.verticalOffsetEl = options.verticalOffsetEl;
2408
2661
  this.viewportMarginTop = options.viewportMarginTop || 0;
@@ -2410,7 +2663,7 @@ class SkyViewkeeper {
2410
2663
  if (this.verticalOffsetEl) {
2411
2664
  this.verticalOffsetEl.addEventListener(EVT_AFTER_VIEWKEEPER_SYNC, this.syncElPositionHandler);
2412
2665
  }
2413
- window.addEventListener('scroll', this.syncElPositionHandler);
2666
+ window.addEventListener('scroll', this.syncElPositionHandler, true);
2414
2667
  window.addEventListener('resize', this.syncElPositionHandler);
2415
2668
  window.addEventListener('orientationchange', this.syncElPositionHandler);
2416
2669
  ensureStyleEl();
@@ -2438,7 +2691,7 @@ class SkyViewkeeper {
2438
2691
  }
2439
2692
  destroy() {
2440
2693
  if (!this.isDestroyed) {
2441
- window.removeEventListener('scroll', this.syncElPositionHandler);
2694
+ window.removeEventListener('scroll', this.syncElPositionHandler, true);
2442
2695
  window.removeEventListener('resize', this.syncElPositionHandler);
2443
2696
  window.removeEventListener('orientationchange', this.syncElPositionHandler);
2444
2697
  this.unfixEl();
@@ -2476,16 +2729,19 @@ class SkyViewkeeper {
2476
2729
  const verticalOffsetElTop = parseInt(verticalOffsetElTopStyle, 10) || 0;
2477
2730
  offset += (this.verticalOffsetEl.offsetHeight + verticalOffsetElTop);
2478
2731
  }
2732
+ else if (this.scrollableHost) {
2733
+ offset += this.scrollableHost.getBoundingClientRect().top;
2734
+ }
2479
2735
  return offset;
2480
2736
  }
2481
2737
  shouldFixEl(boundaryInfo, verticalOffset) {
2482
2738
  let anchorTop;
2483
2739
  let doFixEl;
2484
2740
  if (boundaryInfo.spacerEl) {
2485
- anchorTop = getOffset(boundaryInfo.spacerEl).top;
2741
+ anchorTop = getOffset(boundaryInfo.spacerEl, this.scrollableHost).top;
2486
2742
  }
2487
2743
  else {
2488
- anchorTop = getOffset(this.el).top;
2744
+ anchorTop = getOffset(this.el, this.scrollableHost).top;
2489
2745
  }
2490
2746
  doFixEl = boundaryInfo.scrollTop + verticalOffset + this.viewportMarginTop > anchorTop;
2491
2747
  return doFixEl;
@@ -2544,11 +2800,11 @@ class SkyViewkeeper {
2544
2800
  const spacerId = this.getSpacerId();
2545
2801
  const spacerEl = document.getElementById(spacerId);
2546
2802
  const boundaryEl = this.boundaryEl;
2547
- const boundaryOffset = getOffset(boundaryEl);
2803
+ const boundaryOffset = getOffset(boundaryEl, this.scrollableHost);
2548
2804
  const boundaryTop = boundaryOffset.top;
2549
2805
  const boundaryBottom = boundaryTop + boundaryEl.getBoundingClientRect().height;
2550
- const scrollLeft = document.documentElement.scrollLeft;
2551
- const scrollTop = document.documentElement.scrollTop;
2806
+ const scrollLeft = this.scrollableHost ? this.scrollableHost.scrollLeft : document.documentElement.scrollLeft;
2807
+ const scrollTop = this.scrollableHost ? this.scrollableHost.scrollTop : document.documentElement.scrollTop;
2552
2808
  const elHeight = getHeightWithMargin(this.el);
2553
2809
  return {
2554
2810
  boundaryBottom,
@@ -2566,7 +2822,7 @@ class SkyViewkeeper {
2566
2822
  /**
2567
2823
  * Provides methods for creating and destroying viewkeeper instances.
2568
2824
  */
2569
- let SkyViewkeeperService = class SkyViewkeeperService {
2825
+ class SkyViewkeeperService {
2570
2826
  constructor(hostOptions) {
2571
2827
  this.hostOptions = hostOptions;
2572
2828
  }
@@ -2585,24 +2841,26 @@ let SkyViewkeeperService = class SkyViewkeeperService {
2585
2841
  destroy(vk) {
2586
2842
  vk.destroy();
2587
2843
  }
2588
- };
2589
- SkyViewkeeperService.ctorParameters = () => [
2590
- { type: SkyViewkeeperHostOptions, decorators: [{ type: Optional }] }
2591
- ];
2592
- SkyViewkeeperService.ɵprov = ɵɵdefineInjectable({ factory: function SkyViewkeeperService_Factory() { return new SkyViewkeeperService(ɵɵinject(SkyViewkeeperHostOptions, 8)); }, token: SkyViewkeeperService, providedIn: "root" });
2593
- SkyViewkeeperService = __decorate([
2594
- Injectable({
2595
- providedIn: 'root'
2596
- }),
2597
- __param(0, Optional())
2598
- ], SkyViewkeeperService);
2844
+ }
2845
+ SkyViewkeeperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperService, deps: [{ token: SkyViewkeeperHostOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2846
+ SkyViewkeeperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperService, providedIn: 'root' });
2847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperService, decorators: [{
2848
+ type: Injectable,
2849
+ args: [{
2850
+ providedIn: 'root'
2851
+ }]
2852
+ }], ctorParameters: function () { return [{ type: SkyViewkeeperHostOptions, decorators: [{
2853
+ type: Optional
2854
+ }] }]; } });
2599
2855
 
2600
- let SkyViewkeeperDirective = class SkyViewkeeperDirective {
2601
- constructor(el, mutationObserverSvc, viewkeeperSvc) {
2856
+ class SkyViewkeeperDirective {
2857
+ constructor(el, mutationObserverSvc, viewkeeperSvc, scrollableHostService) {
2602
2858
  this.el = el;
2603
2859
  this.mutationObserverSvc = mutationObserverSvc;
2604
2860
  this.viewkeeperSvc = viewkeeperSvc;
2861
+ this.scrollableHostService = scrollableHostService;
2605
2862
  this.viewkeepers = [];
2863
+ this.scrollableHostWatchUnsubscribe = undefined;
2606
2864
  }
2607
2865
  set skyViewkeeper(value) {
2608
2866
  this._skyViewkeeper = value;
@@ -2658,51 +2916,66 @@ let SkyViewkeeperDirective = class SkyViewkeeperDirective {
2658
2916
  detectElements() {
2659
2917
  let viewkeeperEls = this.getViewkeeperEls();
2660
2918
  if (this.viewkeeperElsChanged(viewkeeperEls)) {
2661
- this.destroyViewkeepers();
2662
- let previousViewkeeperEl;
2663
- for (const viewkeeperEl of viewkeeperEls) {
2664
- this.viewkeepers.push(this.viewkeeperSvc.create({
2665
- boundaryEl: this.el.nativeElement,
2666
- el: viewkeeperEl,
2667
- setWidth: true,
2668
- verticalOffsetEl: previousViewkeeperEl
2669
- }));
2670
- previousViewkeeperEl = viewkeeperEl;
2919
+ if (this.scrollableHostWatchUnsubscribe) {
2920
+ this.scrollableHostWatchUnsubscribe.next();
2921
+ this.scrollableHostWatchUnsubscribe = new Subject();
2922
+ }
2923
+ else {
2924
+ this.scrollableHostWatchUnsubscribe = new Subject();
2671
2925
  }
2926
+ this.scrollableHostService.watchScrollableHost(this.el, this.scrollableHostWatchUnsubscribe)
2927
+ .pipe(takeUntil(this.scrollableHostWatchUnsubscribe))
2928
+ .subscribe(scrollableHost => {
2929
+ this.destroyViewkeepers();
2930
+ let previousViewkeeperEl;
2931
+ for (const viewkeeperEl of viewkeeperEls) {
2932
+ this.viewkeepers.push(this.viewkeeperSvc.create({
2933
+ boundaryEl: this.el.nativeElement,
2934
+ scrollableHost: scrollableHost instanceof HTMLElement ? scrollableHost : undefined,
2935
+ el: viewkeeperEl,
2936
+ setWidth: true,
2937
+ verticalOffsetEl: previousViewkeeperEl
2938
+ }));
2939
+ previousViewkeeperEl = viewkeeperEl;
2940
+ }
2941
+ });
2672
2942
  this.currentViewkeeperEls = viewkeeperEls;
2673
2943
  }
2674
2944
  }
2675
- };
2676
- SkyViewkeeperDirective.ctorParameters = () => [
2677
- { type: ElementRef },
2678
- { type: MutationObserverService },
2679
- { type: SkyViewkeeperService }
2680
- ];
2681
- __decorate([
2682
- Input()
2683
- ], SkyViewkeeperDirective.prototype, "skyViewkeeper", null);
2684
- SkyViewkeeperDirective = __decorate([
2685
- Directive({
2686
- selector: '[skyViewkeeper]'
2687
- })
2688
- ], SkyViewkeeperDirective);
2945
+ }
2946
+ SkyViewkeeperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperDirective, deps: [{ token: i0.ElementRef }, { token: MutationObserverService }, { token: SkyViewkeeperService }, { token: SkyScrollableHostService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2947
+ SkyViewkeeperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.12", type: SkyViewkeeperDirective, selector: "[skyViewkeeper]", inputs: { skyViewkeeper: "skyViewkeeper" }, ngImport: i0 });
2948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperDirective, decorators: [{
2949
+ type: Directive,
2950
+ args: [{
2951
+ selector: '[skyViewkeeper]'
2952
+ }]
2953
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MutationObserverService }, { type: SkyViewkeeperService }, { type: SkyScrollableHostService, decorators: [{
2954
+ type: Optional
2955
+ }] }]; }, propDecorators: { skyViewkeeper: [{
2956
+ type: Input
2957
+ }] } });
2689
2958
 
2690
- let SkyViewkeeperModule = class SkyViewkeeperModule {
2691
- };
2692
- SkyViewkeeperModule = __decorate([
2693
- NgModule({
2694
- declarations: [
2695
- SkyViewkeeperDirective
2696
- ],
2697
- exports: [
2698
- SkyViewkeeperDirective
2699
- ]
2700
- })
2701
- ], SkyViewkeeperModule);
2959
+ class SkyViewkeeperModule {
2960
+ }
2961
+ SkyViewkeeperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2962
+ SkyViewkeeperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperModule, declarations: [SkyViewkeeperDirective], exports: [SkyViewkeeperDirective] });
2963
+ SkyViewkeeperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperModule });
2964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: SkyViewkeeperModule, decorators: [{
2965
+ type: NgModule,
2966
+ args: [{
2967
+ declarations: [
2968
+ SkyViewkeeperDirective
2969
+ ],
2970
+ exports: [
2971
+ SkyViewkeeperDirective
2972
+ ]
2973
+ }]
2974
+ }] });
2702
2975
 
2703
2976
  /**
2704
2977
  * Generated bundle index. Do not edit.
2705
2978
  */
2706
2979
 
2707
- export { MutationObserverService, NumericOptions, SkyAffixAutoFitContext, SkyAffixModule, SkyAffixService, SkyAffixer, SkyAppFormat, SkyAppTitleService, SkyAppWindowRef, SkyCoreAdapterModule, SkyCoreAdapterService, SkyDockItem, SkyDockModule, SkyDockService, SkyDynamicComponentLocation, SkyDynamicComponentModule, SkyDynamicComponentService, SkyIdModule, SkyLogModule, SkyLogService, SkyMediaBreakpoints, SkyMediaQueryModule, SkyMediaQueryService, SkyNumericModule, SkyNumericPipe, SkyNumericService, SkyOverlayInstance, SkyOverlayModule, SkyOverlayService, SkyPercentPipe, SkyPercentPipeModule, SkyUIConfigService, SkyViewkeeperHostOptions, SkyViewkeeperModule, SkyViewkeeperService, getWindow, SkyAffixDirective as ɵa, SkyDockComponent as ɵb, SkyDockDomAdapterService as ɵc, SkyIdDirective as ɵd, SkyCoreResourcesModule as ɵe, SkyCoreResourcesProvider as ɵf, SkyOverlayComponent as ɵg, SkyOverlayContext as ɵh, SkyOverlayAdapterService as ɵi, SkyViewkeeperDirective as ɵj };
2980
+ export { MutationObserverService, NumericOptions, SkyAffixAutoFitContext, SkyAffixModule, SkyAffixService, SkyAffixer, SkyAppFormat, SkyAppTitleService, SkyAppWindowRef, SkyCoreAdapterModule, SkyCoreAdapterService, SkyDockItem, SkyDockLocation, SkyDockModule, SkyDockService, SkyDynamicComponentLocation, SkyDynamicComponentModule, SkyDynamicComponentService, SkyIdModule, SkyLogModule, SkyLogService, SkyMediaBreakpoints, SkyMediaQueryModule, SkyMediaQueryService, SkyNumericModule, SkyNumericPipe, SkyNumericService, SkyOverlayInstance, SkyOverlayModule, SkyOverlayService, SkyPercentPipe, SkyPercentPipeModule, SkyScrollableHostService, SkyUIConfigService, SkyViewkeeperHostOptions, SkyViewkeeperModule, SkyViewkeeperService, getWindow, SkyAffixDirective as λ1, SkyIdDirective as λ2, SkyViewkeeperDirective as λ3 };
2708
2981
  //# sourceMappingURL=skyux-core.js.map