@skyux/core 5.0.0-beta.8 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bundles/skyux-core-testing.umd.js +363 -234
- package/bundles/skyux-core-testing.umd.js.map +1 -1
- package/bundles/skyux-core.umd.js +3303 -2916
- package/bundles/skyux-core.umd.js.map +1 -1
- package/documentation.json +8863 -0
- package/esm2015/modules/adapter-service/adapter.module.js +11 -8
- package/esm2015/modules/adapter-service/adapter.service.js +14 -15
- package/esm2015/modules/adapter-service/focusable-children-options.js +2 -1
- package/esm2015/modules/affix/affix-auto-fit-context.js +1 -1
- package/esm2015/modules/affix/affix-config.js +2 -1
- package/esm2015/modules/affix/affix-horizontal-alignment.js +2 -1
- package/esm2015/modules/affix/affix-offset-change.js +2 -1
- package/esm2015/modules/affix/affix-offset.js +2 -1
- package/esm2015/modules/affix/affix-placement-change.js +2 -1
- package/esm2015/modules/affix/affix-placement.js +2 -1
- package/esm2015/modules/affix/affix-utils.js +1 -1
- package/esm2015/modules/affix/affix-vertical-alignment.js +2 -1
- package/esm2015/modules/affix/affix.directive.js +36 -49
- package/esm2015/modules/affix/affix.module.js +22 -17
- package/esm2015/modules/affix/affix.service.js +12 -15
- package/esm2015/modules/affix/affixer.js +1 -1
- package/esm2015/modules/affix/dom-utils.js +1 -1
- package/esm2015/modules/dock/dock-dom-adapter.service.js +23 -15
- package/esm2015/modules/dock/dock-insert-component-config.js +2 -1
- package/esm2015/modules/dock/dock-item-config.js +2 -1
- package/esm2015/modules/dock/dock-item-reference.js +2 -1
- package/esm2015/modules/dock/dock-item.js +1 -1
- package/esm2015/modules/dock/dock-location.js +19 -0
- package/esm2015/modules/dock/dock-options.js +2 -0
- package/esm2015/modules/dock/dock.component.js +48 -33
- package/esm2015/modules/dock/dock.module.js +28 -17
- package/esm2015/modules/dock/dock.service.js +44 -16
- package/esm2015/modules/dock/sort-by-stack-order.js +1 -1
- package/esm2015/modules/dynamic-component/dynamic-component-location.js +15 -3
- package/esm2015/modules/dynamic-component/dynamic-component-options.js +2 -1
- package/esm2015/modules/dynamic-component/dynamic-component.module.js +11 -8
- package/esm2015/modules/dynamic-component/dynamic-component.service.js +24 -23
- package/esm2015/modules/format/app-format.js +11 -11
- package/esm2015/modules/id/id.directive.js +14 -16
- package/esm2015/modules/id/id.module.js +18 -15
- package/esm2015/modules/log/log.module.js +11 -8
- package/esm2015/modules/log/log.service.js +11 -11
- package/esm2015/modules/media-query/media-breakpoints.js +1 -1
- package/esm2015/modules/media-query/media-query-listener.js +2 -1
- package/esm2015/modules/media-query/media-query.module.js +11 -8
- package/esm2015/modules/media-query/media-query.service.js +16 -20
- package/esm2015/modules/mutation/mutation-observer-service.js +11 -11
- package/esm2015/modules/numeric/numeric-symbol.js +2 -1
- package/esm2015/modules/numeric/numeric.module.js +30 -21
- package/esm2015/modules/numeric/numeric.options.js +6 -1
- package/esm2015/modules/numeric/numeric.pipe.js +14 -16
- package/esm2015/modules/numeric/numeric.service.js +15 -17
- package/esm2015/modules/overlay/overlay-adapter.service.js +13 -15
- package/esm2015/modules/overlay/overlay-config.js +2 -1
- package/esm2015/modules/overlay/overlay-context.js +1 -1
- package/esm2015/modules/overlay/overlay-instance.js +1 -1
- package/esm2015/modules/overlay/overlay.component.js +41 -44
- package/esm2015/modules/overlay/overlay.module.js +22 -17
- package/esm2015/modules/overlay/overlay.service.js +18 -26
- package/esm2015/modules/percent-pipe/percent-pipe.module.js +30 -21
- package/esm2015/modules/percent-pipe/percent.pipe.js +15 -15
- package/esm2015/modules/scrollable-host/scrollable-host.service.js +83 -0
- package/esm2015/modules/shared/number-format/number-format-utility.js +4 -3
- package/esm2015/modules/shared/sky-core-resources.module.js +41 -0
- package/esm2015/modules/title/set-title-args.js +2 -1
- package/esm2015/modules/title/title.service.js +11 -15
- package/esm2015/modules/ui-config/ui-config.service.js +11 -11
- package/esm2015/modules/viewkeeper/viewkeeper-boundary-info.js +2 -1
- package/esm2015/modules/viewkeeper/viewkeeper-fixed-styles.js +2 -1
- package/esm2015/modules/viewkeeper/viewkeeper-host-options.js +9 -8
- package/esm2015/modules/viewkeeper/viewkeeper-offset.js +2 -1
- package/esm2015/modules/viewkeeper/viewkeeper-options.js +2 -1
- package/esm2015/modules/viewkeeper/viewkeeper.directive.js +47 -32
- package/esm2015/modules/viewkeeper/viewkeeper.js +16 -11
- package/esm2015/modules/viewkeeper/viewkeeper.module.js +18 -15
- package/esm2015/modules/viewkeeper/viewkeeper.service.js +13 -16
- package/esm2015/modules/window/window-ref.js +11 -11
- package/esm2015/public-api.js +60 -0
- package/esm2015/skyux-core.js +2 -12
- package/esm2015/testing/mock-media-query.service.js +9 -8
- package/esm2015/testing/mock-ui-config.service.js +9 -8
- package/esm2015/testing/public-api.js +3 -0
- package/esm2015/testing/skyux-core-testing.js +2 -2
- package/fesm2015/skyux-core-testing.js +15 -11
- package/fesm2015/skyux-core-testing.js.map +1 -1
- package/fesm2015/skyux-core.js +828 -570
- package/fesm2015/skyux-core.js.map +1 -1
- package/modules/adapter-service/adapter.module.d.ts +4 -0
- package/modules/adapter-service/adapter.service.d.ts +3 -0
- package/modules/affix/affix.directive.d.ts +3 -0
- package/modules/affix/affix.module.d.ts +6 -0
- package/modules/affix/affix.service.d.ts +3 -0
- package/modules/dock/dock-dom-adapter.service.d.ts +6 -0
- package/modules/dock/dock-location.d.ts +17 -0
- package/modules/dock/dock-options.d.ts +18 -0
- package/modules/dock/dock.component.d.ts +8 -3
- package/modules/dock/dock.module.d.ts +6 -0
- package/modules/dock/dock.service.d.ts +14 -1
- package/modules/dynamic-component/dynamic-component-location.d.ts +14 -2
- package/modules/dynamic-component/dynamic-component-options.d.ts +4 -0
- package/modules/dynamic-component/dynamic-component.module.d.ts +4 -0
- package/modules/dynamic-component/dynamic-component.service.d.ts +3 -0
- package/modules/format/app-format.d.ts +3 -0
- package/modules/id/id.directive.d.ts +3 -0
- package/modules/id/id.module.d.ts +5 -0
- package/modules/log/log.module.d.ts +4 -0
- package/modules/log/log.service.d.ts +3 -0
- package/modules/media-query/media-query.module.d.ts +4 -0
- package/modules/media-query/media-query.service.d.ts +3 -0
- package/modules/mutation/mutation-observer-service.d.ts +3 -0
- package/modules/numeric/numeric.module.d.ts +7 -0
- package/modules/numeric/numeric.options.d.ts +5 -0
- package/modules/numeric/numeric.pipe.d.ts +3 -0
- package/modules/numeric/numeric.service.d.ts +3 -0
- package/modules/overlay/overlay-adapter.service.d.ts +3 -0
- package/modules/overlay/overlay.component.d.ts +3 -0
- package/modules/overlay/overlay.module.d.ts +6 -0
- package/modules/overlay/overlay.service.d.ts +3 -0
- package/modules/percent-pipe/percent-pipe.module.d.ts +7 -0
- package/modules/percent-pipe/percent.pipe.d.ts +3 -0
- package/modules/scrollable-host/scrollable-host.service.d.ts +16 -0
- package/modules/shared/number-format/number-format-utility.d.ts +1 -1
- package/modules/shared/sky-core-resources.module.d.ts +14 -0
- package/modules/title/title.service.d.ts +3 -0
- package/modules/ui-config/ui-config.service.d.ts +3 -0
- package/modules/viewkeeper/viewkeeper-host-options.d.ts +4 -0
- package/modules/viewkeeper/viewkeeper-options.d.ts +5 -0
- package/modules/viewkeeper/viewkeeper.d.ts +1 -0
- package/modules/viewkeeper/viewkeeper.directive.d.ts +7 -1
- package/modules/viewkeeper/viewkeeper.module.d.ts +5 -0
- package/modules/viewkeeper/viewkeeper.service.d.ts +3 -0
- package/modules/window/window-ref.d.ts +3 -0
- package/package.json +8 -23
- package/{public_api.d.ts → public-api.d.ts} +6 -0
- package/skyux-core.d.ts +2 -11
- package/testing/mock-media-query.service.d.ts +3 -0
- package/testing/mock-ui-config.service.d.ts +3 -0
- package/testing/package.json +2 -5
- package/testing/{public_api.d.ts → public-api.d.ts} +0 -0
- package/testing/skyux-core-testing.d.ts +2 -1
- package/CHANGELOG.md +0 -320
- package/bundles/skyux-core-testing.umd.min.js +0 -16
- package/bundles/skyux-core-testing.umd.min.js.map +0 -1
- package/bundles/skyux-core.umd.min.js +0 -16
- package/bundles/skyux-core.umd.min.js.map +0 -1
- package/esm2015/modules/shared/core-resources.module.js +0 -17
- package/esm2015/plugin-resources/core-resources-provider.js +0 -16
- package/esm2015/public_api.js +0 -36
- package/esm2015/testing/public_api.js +0 -3
- package/esm5/modules/adapter-service/adapter.module.js +0 -16
- package/esm5/modules/adapter-service/adapter.service.js +0 -221
- package/esm5/modules/adapter-service/focusable-children-options.js +0 -1
- package/esm5/modules/affix/affix-auto-fit-context.js +0 -12
- package/esm5/modules/affix/affix-config.js +0 -1
- package/esm5/modules/affix/affix-horizontal-alignment.js +0 -1
- package/esm5/modules/affix/affix-offset-change.js +0 -1
- package/esm5/modules/affix/affix-offset.js +0 -1
- package/esm5/modules/affix/affix-placement-change.js +0 -1
- package/esm5/modules/affix/affix-placement.js +0 -1
- package/esm5/modules/affix/affix-utils.js +0 -23
- package/esm5/modules/affix/affix-vertical-alignment.js +0 -1
- package/esm5/modules/affix/affix.directive.js +0 -113
- package/esm5/modules/affix/affix.module.js +0 -24
- package/esm5/modules/affix/affix.service.js +0 -28
- package/esm5/modules/affix/affixer.js +0 -368
- package/esm5/modules/affix/dom-utils.js +0 -79
- package/esm5/modules/dock/dock-dom-adapter.service.js +0 -72
- package/esm5/modules/dock/dock-insert-component-config.js +0 -1
- package/esm5/modules/dock/dock-item-config.js +0 -1
- package/esm5/modules/dock/dock-item-reference.js +0 -1
- package/esm5/modules/dock/dock-item.js +0 -35
- package/esm5/modules/dock/dock.component.js +0 -87
- package/esm5/modules/dock/dock.module.js +0 -24
- package/esm5/modules/dock/dock.service.js +0 -69
- package/esm5/modules/dock/sort-by-stack-order.js +0 -13
- package/esm5/modules/dynamic-component/dynamic-component-location.js +0 -15
- package/esm5/modules/dynamic-component/dynamic-component-options.js +0 -1
- package/esm5/modules/dynamic-component/dynamic-component.module.js +0 -17
- package/esm5/modules/dynamic-component/dynamic-component.service.js +0 -82
- package/esm5/modules/format/app-format.js +0 -25
- package/esm5/modules/id/id.directive.js +0 -41
- package/esm5/modules/id/id.module.js +0 -20
- package/esm5/modules/log/log.module.js +0 -16
- package/esm5/modules/log/log.service.js +0 -29
- package/esm5/modules/media-query/media-breakpoints.js +0 -20
- package/esm5/modules/media-query/media-query-listener.js +0 -1
- package/esm5/modules/media-query/media-query.module.js +0 -16
- package/esm5/modules/media-query/media-query.service.js +0 -128
- package/esm5/modules/mutation/mutation-observer-service.js +0 -19
- package/esm5/modules/numeric/numeric-symbol.js +0 -1
- package/esm5/modules/numeric/numeric.module.js +0 -29
- package/esm5/modules/numeric/numeric.options.js +0 -38
- package/esm5/modules/numeric/numeric.pipe.js +0 -70
- package/esm5/modules/numeric/numeric.service.js +0 -195
- package/esm5/modules/overlay/overlay-adapter.service.js +0 -44
- package/esm5/modules/overlay/overlay-config.js +0 -1
- package/esm5/modules/overlay/overlay-context.js +0 -12
- package/esm5/modules/overlay/overlay-instance.js +0 -66
- package/esm5/modules/overlay/overlay.component.js +0 -168
- package/esm5/modules/overlay/overlay.module.js +0 -24
- package/esm5/modules/overlay/overlay.service.js +0 -128
- package/esm5/modules/percent-pipe/percent-pipe.module.js +0 -29
- package/esm5/modules/percent-pipe/percent.pipe.js +0 -49
- package/esm5/modules/shared/core-resources.module.js +0 -20
- package/esm5/modules/shared/number-format/number-format-utility.js +0 -75
- package/esm5/modules/title/set-title-args.js +0 -1
- package/esm5/modules/title/title.service.js +0 -35
- package/esm5/modules/ui-config/ui-config.service.js +0 -24
- package/esm5/modules/viewkeeper/viewkeeper-boundary-info.js +0 -1
- package/esm5/modules/viewkeeper/viewkeeper-fixed-styles.js +0 -1
- package/esm5/modules/viewkeeper/viewkeeper-host-options.js +0 -12
- package/esm5/modules/viewkeeper/viewkeeper-offset.js +0 -1
- package/esm5/modules/viewkeeper/viewkeeper-options.js +0 -1
- package/esm5/modules/viewkeeper/viewkeeper.directive.js +0 -134
- package/esm5/modules/viewkeeper/viewkeeper.js +0 -219
- package/esm5/modules/viewkeeper/viewkeeper.module.js +0 -20
- package/esm5/modules/viewkeeper/viewkeeper.service.js +0 -42
- package/esm5/modules/window/window-ref.js +0 -37
- package/esm5/plugin-resources/core-resources-provider.js +0 -17
- package/esm5/public_api.js +0 -36
- package/esm5/skyux-core.js +0 -15
- package/esm5/testing/mock-media-query.service.js +0 -47
- package/esm5/testing/mock-ui-config.service.js +0 -66
- package/esm5/testing/public_api.js +0 -3
- package/esm5/testing/skyux-core-testing.js +0 -5
- package/fesm5/skyux-core-testing.js +0 -114
- package/fesm5/skyux-core-testing.js.map +0 -1
- package/fesm5/skyux-core.js +0 -2902
- package/fesm5/skyux-core.js.map +0 -1
- package/modules/shared/core-resources.module.d.ts +0 -2
- package/plugin-resources/core-resources-provider.d.ts +0 -5
- package/skyux-core.metadata.json +0 -1
- package/src/assets/locales/resources_en_US.json +0 -18
- package/testing/skyux-core-testing.metadata.json +0 -1
package/fesm2015/skyux-core.js
CHANGED
@@ -1,21 +1,28 @@
|
|
1
|
-
import
|
2
|
-
import { NgModule,
|
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
|
7
|
-
import {
|
8
|
-
import
|
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
|
-
|
15
|
-
}
|
16
|
-
SkyCoreAdapterModule =
|
17
|
-
|
18
|
-
|
17
|
+
class SkyCoreAdapterModule {
|
18
|
+
}
|
19
|
+
SkyCoreAdapterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreAdapterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
20
|
+
SkyCoreAdapterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreAdapterModule });
|
21
|
+
SkyCoreAdapterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreAdapterModule });
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
], SkyCoreAdapterService);
|
251
|
+
}
|
252
|
+
SkyCoreAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
253
|
+
SkyCoreAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreAdapterService, providedIn: 'root' });
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
], SkyAffixService);
|
728
|
+
}
|
729
|
+
SkyAffixService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAffixService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
730
|
+
SkyAffixService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAffixService, providedIn: 'root' });
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
]
|
800
|
-
|
801
|
-
|
802
|
-
],
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
],
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
],
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
],
|
821
|
-
|
822
|
-
|
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.7", 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.7", 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.7", 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
|
-
|
837
|
-
}
|
838
|
-
SkyAffixModule =
|
839
|
-
|
840
|
-
|
831
|
+
class SkyAffixModule {
|
832
|
+
}
|
833
|
+
SkyAffixModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
834
|
+
SkyAffixModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAffixModule, declarations: [SkyAffixDirective], imports: [CommonModule], exports: [SkyAffixDirective] });
|
835
|
+
SkyAffixModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAffixModule, imports: [[
|
841
836
|
CommonModule
|
842
|
-
]
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
837
|
+
]] });
|
838
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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.ɵ
|
886
|
-
MutationObserverService =
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
904
|
+
}
|
905
|
+
MutationObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MutationObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
906
|
+
MutationObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: MutationObserverService, providedIn: 'root' });
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
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
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
Injectable()
|
954
|
-
], SkyDockDomAdapterService);
|
980
|
+
}
|
981
|
+
SkyDockDomAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", 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.7", ngImport: i0, type: SkyDockDomAdapterService });
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
1024
|
-
|
1025
|
-
|
1026
|
-
{
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
],
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
})
|
1046
|
-
], SkyDockComponent);
|
1069
|
+
}
|
1070
|
+
SkyDockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", 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.7", 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.7", 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
|
-
|
1049
|
-
}
|
1050
|
-
SkyDockModule =
|
1051
|
-
|
1052
|
-
|
1093
|
+
class SkyDockModule {
|
1094
|
+
}
|
1095
|
+
SkyDockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1096
|
+
SkyDockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDockModule, declarations: [SkyDockComponent], imports: [CommonModule] });
|
1097
|
+
SkyDockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDockModule, providers: [
|
1098
|
+
MutationObserverService
|
1099
|
+
], imports: [[
|
1053
1100
|
CommonModule
|
1054
|
-
]
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1101
|
+
]] });
|
1102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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.ɵ
|
1084
|
-
SkyAppWindowRef =
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
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.7", ngImport: i0, type: SkyAppWindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1167
|
+
SkyAppWindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppWindowRef, providedIn: 'root' });
|
1168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
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.7", 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.7", ngImport: i0, type: SkyDynamicComponentService, providedIn: 'any' });
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
-
|
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
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
], SkyDockService);
|
1326
|
+
}
|
1327
|
+
SkyDockService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDockService, deps: [{ token: SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1328
|
+
SkyDockService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDockService, providedIn: 'root' });
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
1239
|
-
}
|
1240
|
-
SkyDynamicComponentModule =
|
1241
|
-
|
1242
|
-
|
1341
|
+
class SkyDynamicComponentModule {
|
1342
|
+
}
|
1343
|
+
SkyDynamicComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDynamicComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1344
|
+
SkyDynamicComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDynamicComponentModule });
|
1345
|
+
SkyDynamicComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDynamicComponentModule });
|
1346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyDynamicComponentModule, decorators: [{
|
1347
|
+
type: NgModule,
|
1348
|
+
args: [{}]
|
1349
|
+
}] });
|
1243
1350
|
|
1244
|
-
|
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.ɵ
|
1252
|
-
SkyAppFormat =
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1357
|
+
}
|
1358
|
+
SkyAppFormat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppFormat, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1359
|
+
SkyAppFormat.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppFormat, providedIn: 'root' });
|
1360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
], SkyIdDirective);
|
1388
|
+
}
|
1389
|
+
SkyIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", 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.7", type: SkyIdDirective, selector: "[skyId]", exportAs: ["skyId"], ngImport: i0 });
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
1292
|
-
}
|
1293
|
-
SkyIdModule =
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1399
|
+
class SkyIdModule {
|
1400
|
+
}
|
1401
|
+
SkyIdModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyIdModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1402
|
+
SkyIdModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyIdModule, declarations: [SkyIdDirective], exports: [SkyIdDirective] });
|
1403
|
+
SkyIdModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyIdModule });
|
1404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
1309
|
-
}
|
1310
|
-
SkyLogModule =
|
1311
|
-
|
1312
|
-
|
1420
|
+
class SkyLogModule {
|
1421
|
+
}
|
1422
|
+
SkyLogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyLogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1423
|
+
SkyLogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyLogModule });
|
1424
|
+
SkyLogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyLogModule });
|
1425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
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.ɵ
|
1326
|
-
SkyLogService =
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1440
|
+
}
|
1441
|
+
SkyLogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1442
|
+
SkyLogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyLogService, providedIn: 'root' });
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", 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
|
-
|
1337
|
-
}
|
1338
|
-
SkyMediaQueryModule =
|
1339
|
-
|
1340
|
-
|
1454
|
+
class SkyMediaQueryModule {
|
1455
|
+
}
|
1456
|
+
SkyMediaQueryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1457
|
+
SkyMediaQueryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryModule });
|
1458
|
+
SkyMediaQueryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryModule });
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryModule, decorators: [{
|
1460
|
+
type: NgModule,
|
1461
|
+
args: [{}]
|
1462
|
+
}] });
|
1341
1463
|
|
1342
|
-
|
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:
|
1471
|
+
mediaQueryString: SkyMediaQueryService.xs,
|
1351
1472
|
name: SkyMediaBreakpoints.xs
|
1352
1473
|
},
|
1353
1474
|
{
|
1354
|
-
mediaQueryString:
|
1475
|
+
mediaQueryString: SkyMediaQueryService.sm,
|
1355
1476
|
name: SkyMediaBreakpoints.sm
|
1356
1477
|
},
|
1357
1478
|
{
|
1358
|
-
mediaQueryString:
|
1479
|
+
mediaQueryString: SkyMediaQueryService.md,
|
1359
1480
|
name: SkyMediaBreakpoints.md
|
1360
1481
|
},
|
1361
1482
|
{
|
1362
|
-
mediaQueryString:
|
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
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
], SkyMediaQueryService);
|
1568
|
+
SkyMediaQueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
1569
|
+
SkyMediaQueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryService, providedIn: 'root' });
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyMediaQueryService, decorators: [{
|
1571
|
+
type: Injectable,
|
1572
|
+
args: [{
|
1573
|
+
providedIn: 'root'
|
1574
|
+
}]
|
1575
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
1456
1576
|
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
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
|
1588
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
1463
1589
|
}
|
1464
|
-
}
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
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.7", ngImport: i0, type: SkyCoreResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1597
|
+
SkyCoreResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCoreResourcesModule, exports: [SkyI18nModule] });
|
1598
|
+
SkyCoreResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", 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.7", 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
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
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
|
-
|
1722
|
+
class SkyNumericService {
|
1547
1723
|
constructor(resourcesService) {
|
1548
1724
|
this.resourcesService = resourcesService;
|
1549
1725
|
this.symbolIndex = [
|
@@ -1569,6 +1745,7 @@ let SkyNumericService = class SkyNumericService {
|
|
1569
1745
|
* @param options Format options.
|
1570
1746
|
*/
|
1571
1747
|
formatNumber(value, options) {
|
1748
|
+
var _a;
|
1572
1749
|
/* tslint:disable-next-line:no-null-keyword */
|
1573
1750
|
if (isNaN(value) || value === null) {
|
1574
1751
|
return '';
|
@@ -1598,7 +1775,7 @@ let SkyNumericService = class SkyNumericService {
|
|
1598
1775
|
const locale = options.locale || this.currentLocale;
|
1599
1776
|
let digits;
|
1600
1777
|
// Checks the string entered for format. Using toLowerCase to ignore case.
|
1601
|
-
switch (options.format.toLowerCase()) {
|
1778
|
+
switch ((_a = options.format) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
1602
1779
|
// In a case where a decimal value was not shortened and
|
1603
1780
|
// the digit input is 2 or higher, it forces 2 digits.
|
1604
1781
|
// For example, this prevents a value like $15.50 from displaying as $15.5.
|
@@ -1620,7 +1797,7 @@ let SkyNumericService = class SkyNumericService {
|
|
1620
1797
|
// and the appropriate string value for Angular 5+.
|
1621
1798
|
// See: https://angular.io/api/common/CurrencyPipe#parameters
|
1622
1799
|
const symbolDisplay = 'symbol';
|
1623
|
-
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);
|
1624
1801
|
break;
|
1625
1802
|
// The following is a catch-all to ensure that if
|
1626
1803
|
// anything but currency (or a future option) are entered,
|
@@ -1714,52 +1891,15 @@ let SkyNumericService = class SkyNumericService {
|
|
1714
1891
|
// TODO: Need to implement the async `getString` method in a breaking change.
|
1715
1892
|
return this.resourcesService.getStringForLocale({ locale: 'en_US' }, key);
|
1716
1893
|
}
|
1717
|
-
};
|
1718
|
-
SkyNumericService.ctorParameters = () => [
|
1719
|
-
{ type: SkyLibResourcesService }
|
1720
|
-
];
|
1721
|
-
SkyNumericService.ɵprov = ɵɵdefineInjectable({ factory: function SkyNumericService_Factory() { return new SkyNumericService(ɵɵinject(SkyLibResourcesService)); }, token: SkyNumericService, providedIn: "any" });
|
1722
|
-
SkyNumericService = __decorate([
|
1723
|
-
Injectable({
|
1724
|
-
providedIn: 'any'
|
1725
|
-
})
|
1726
|
-
], SkyNumericService);
|
1727
|
-
|
1728
|
-
/**
|
1729
|
-
* Provides arguments for the number to format.
|
1730
|
-
*/
|
1731
|
-
class NumericOptions {
|
1732
|
-
constructor() {
|
1733
|
-
/**
|
1734
|
-
* Specifies the maximum number of digits after the decimal separator.
|
1735
|
-
* @default 1
|
1736
|
-
*/
|
1737
|
-
this.digits = 1;
|
1738
|
-
/**
|
1739
|
-
* Specifies how to format the number. Options are `currency` or `number`.
|
1740
|
-
* @default "number"
|
1741
|
-
*/
|
1742
|
-
this.format = 'number';
|
1743
|
-
/**
|
1744
|
-
* Specifies the ISO4217 currency code to use for currency formatting. If you do not specify a
|
1745
|
-
* currency code, the component uses the browser's culture to determine the currency unless your
|
1746
|
-
* SPA provides a different culture with `SkyAppLocaleProvider`.
|
1747
|
-
* @default 'USD'
|
1748
|
-
*/
|
1749
|
-
this.iso = 'USD';
|
1750
|
-
/**
|
1751
|
-
* Indicates whether to shorten numbers to rounded numbers and abbreviation characters
|
1752
|
-
* such as K for thousands, M for millions, B for billions, and T for trillion.
|
1753
|
-
*/
|
1754
|
-
this.truncate = true;
|
1755
|
-
/**
|
1756
|
-
* Specifies the starting point after which numbers are shortened to rounded numbers
|
1757
|
-
* and abbreviation characters.
|
1758
|
-
* @default 0
|
1759
|
-
*/
|
1760
|
-
this.truncateAfter = 0;
|
1761
|
-
}
|
1762
1894
|
}
|
1895
|
+
SkyNumericService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericService, deps: [{ token: i1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1896
|
+
SkyNumericService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericService, providedIn: 'any' });
|
1897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericService, decorators: [{
|
1898
|
+
type: Injectable,
|
1899
|
+
args: [{
|
1900
|
+
providedIn: 'any'
|
1901
|
+
}]
|
1902
|
+
}], ctorParameters: function () { return [{ type: i1.SkyLibResourcesService }]; } });
|
1763
1903
|
|
1764
1904
|
/**
|
1765
1905
|
* Shorten numbers to rounded numbers and abbreviation characters such as K for thousands,
|
@@ -1771,7 +1911,7 @@ class NumericOptions {
|
|
1771
1911
|
* {{ value | skyNumeric(config) }}
|
1772
1912
|
* ```
|
1773
1913
|
*/
|
1774
|
-
|
1914
|
+
class SkyNumericPipe {
|
1775
1915
|
constructor(localeProvider, numericService) {
|
1776
1916
|
this.localeProvider = localeProvider;
|
1777
1917
|
this.numericService = numericService;
|
@@ -1811,36 +1951,45 @@ let SkyNumericPipe = class SkyNumericPipe {
|
|
1811
1951
|
Object.assign(options, config);
|
1812
1952
|
return this.numericService.formatNumber(value, options);
|
1813
1953
|
}
|
1814
|
-
}
|
1815
|
-
SkyNumericPipe
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
], SkyNumericPipe);
|
1954
|
+
}
|
1955
|
+
SkyNumericPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericPipe, deps: [{ token: i1.SkyAppLocaleProvider }, { token: SkyNumericService }], target: i0.ɵɵFactoryTarget.Pipe });
|
1956
|
+
SkyNumericPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericPipe, name: "skyNumeric" });
|
1957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericPipe, decorators: [{
|
1958
|
+
type: Pipe,
|
1959
|
+
args: [{
|
1960
|
+
name: 'skyNumeric'
|
1961
|
+
}]
|
1962
|
+
}], ctorParameters: function () { return [{ type: i1.SkyAppLocaleProvider }, { type: SkyNumericService }]; } });
|
1824
1963
|
|
1825
|
-
|
1826
|
-
}
|
1827
|
-
SkyNumericModule =
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
SkyNumericPipe
|
1834
|
-
],
|
1835
|
-
imports: [
|
1964
|
+
class SkyNumericModule {
|
1965
|
+
}
|
1966
|
+
SkyNumericModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1967
|
+
SkyNumericModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericModule, declarations: [SkyNumericPipe], imports: [SkyI18nModule,
|
1968
|
+
SkyCoreResourcesModule], exports: [SkyNumericPipe] });
|
1969
|
+
SkyNumericModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericModule, providers: [
|
1970
|
+
SkyNumericPipe
|
1971
|
+
], imports: [[
|
1836
1972
|
SkyI18nModule,
|
1837
1973
|
SkyCoreResourcesModule
|
1838
|
-
]
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1974
|
+
]] });
|
1975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyNumericModule, decorators: [{
|
1976
|
+
type: NgModule,
|
1977
|
+
args: [{
|
1978
|
+
declarations: [
|
1979
|
+
SkyNumericPipe
|
1980
|
+
],
|
1981
|
+
providers: [
|
1982
|
+
SkyNumericPipe
|
1983
|
+
],
|
1984
|
+
imports: [
|
1985
|
+
SkyI18nModule,
|
1986
|
+
SkyCoreResourcesModule
|
1987
|
+
],
|
1988
|
+
exports: [
|
1989
|
+
SkyNumericPipe
|
1990
|
+
]
|
1991
|
+
}]
|
1992
|
+
}] });
|
1844
1993
|
|
1845
1994
|
/**
|
1846
1995
|
* Represents a new overlay instance. It is used to manage the "closed" state of the overlay,
|
@@ -1923,7 +2072,7 @@ let uniqueZIndex = 5000;
|
|
1923
2072
|
/**
|
1924
2073
|
* @internal
|
1925
2074
|
*/
|
1926
|
-
|
2075
|
+
class SkyOverlayComponent {
|
1927
2076
|
constructor(changeDetector, resolver, injector, coreAdapter, context, router) {
|
1928
2077
|
this.changeDetector = changeDetector;
|
1929
2078
|
this.resolver = resolver;
|
@@ -2016,63 +2165,65 @@ let SkyOverlayComponent = class SkyOverlayComponent {
|
|
2016
2165
|
this.routerSubscription = undefined;
|
2017
2166
|
}
|
2018
2167
|
}
|
2019
|
-
}
|
2020
|
-
SkyOverlayComponent
|
2021
|
-
{ type:
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
]
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
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}"]
|
2052
|
-
}),
|
2053
|
-
__param(5, Optional())
|
2054
|
-
], SkyOverlayComponent);
|
2168
|
+
}
|
2169
|
+
SkyOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", 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 });
|
2170
|
+
SkyOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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 });
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayComponent, decorators: [{
|
2172
|
+
type: Component,
|
2173
|
+
args: [{
|
2174
|
+
selector: 'sky-overlay',
|
2175
|
+
templateUrl: './overlay.component.html',
|
2176
|
+
styleUrls: ['./overlay.component.scss'],
|
2177
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
2178
|
+
}]
|
2179
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: SkyCoreAdapterService }, { type: SkyOverlayContext }, { type: i3.Router, decorators: [{
|
2180
|
+
type: Optional
|
2181
|
+
}] }]; }, propDecorators: { overlayContentRef: [{
|
2182
|
+
type: ViewChild,
|
2183
|
+
args: ['overlayContentRef', {
|
2184
|
+
read: ElementRef,
|
2185
|
+
static: true
|
2186
|
+
}]
|
2187
|
+
}], overlayRef: [{
|
2188
|
+
type: ViewChild,
|
2189
|
+
args: ['overlayRef', {
|
2190
|
+
read: ElementRef,
|
2191
|
+
static: true
|
2192
|
+
}]
|
2193
|
+
}], targetRef: [{
|
2194
|
+
type: ViewChild,
|
2195
|
+
args: ['target', {
|
2196
|
+
read: ViewContainerRef,
|
2197
|
+
static: true
|
2198
|
+
}]
|
2199
|
+
}] } });
|
2055
2200
|
|
2056
|
-
|
2057
|
-
}
|
2058
|
-
SkyOverlayModule =
|
2059
|
-
|
2060
|
-
|
2201
|
+
class SkyOverlayModule {
|
2202
|
+
}
|
2203
|
+
SkyOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2204
|
+
SkyOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayModule, declarations: [SkyOverlayComponent], imports: [CommonModule] });
|
2205
|
+
SkyOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayModule, imports: [[
|
2061
2206
|
CommonModule
|
2062
|
-
]
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2207
|
+
]] });
|
2208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayModule, decorators: [{
|
2209
|
+
type: NgModule,
|
2210
|
+
args: [{
|
2211
|
+
imports: [
|
2212
|
+
CommonModule
|
2213
|
+
],
|
2214
|
+
declarations: [
|
2215
|
+
SkyOverlayComponent
|
2216
|
+
],
|
2217
|
+
entryComponents: [
|
2218
|
+
SkyOverlayComponent
|
2219
|
+
]
|
2220
|
+
}]
|
2221
|
+
}] });
|
2071
2222
|
|
2072
2223
|
/**
|
2073
2224
|
* @internal
|
2074
2225
|
*/
|
2075
|
-
|
2226
|
+
class SkyOverlayAdapterService {
|
2076
2227
|
constructor(rendererFactory) {
|
2077
2228
|
this.renderer = rendererFactory.createRenderer(undefined, undefined);
|
2078
2229
|
}
|
@@ -2093,27 +2244,26 @@ let SkyOverlayAdapterService = class SkyOverlayAdapterService {
|
|
2093
2244
|
this.destroyStyleElement();
|
2094
2245
|
}
|
2095
2246
|
destroyStyleElement() {
|
2247
|
+
/* istanbul ignore else */
|
2096
2248
|
if (this.styleElement.parentElement === document.head) {
|
2097
2249
|
this.renderer.removeChild(document.head, this.styleElement);
|
2098
2250
|
}
|
2099
2251
|
}
|
2100
|
-
}
|
2101
|
-
SkyOverlayAdapterService
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
], SkyOverlayAdapterService);
|
2252
|
+
}
|
2253
|
+
SkyOverlayAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
2254
|
+
SkyOverlayAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayAdapterService, providedIn: 'root' });
|
2255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayAdapterService, decorators: [{
|
2256
|
+
type: Injectable,
|
2257
|
+
args: [{
|
2258
|
+
providedIn: 'root'
|
2259
|
+
}]
|
2260
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
2110
2261
|
|
2111
|
-
var SkyOverlayService_1;
|
2112
2262
|
/**
|
2113
2263
|
* This service is used to create new overlays.
|
2114
2264
|
* @dynamic
|
2115
2265
|
*/
|
2116
|
-
|
2266
|
+
class SkyOverlayService {
|
2117
2267
|
constructor(applicationRef, componentFactoryResolver, injector, adapter) {
|
2118
2268
|
this.applicationRef = applicationRef;
|
2119
2269
|
this.componentFactoryResolver = componentFactoryResolver;
|
@@ -2134,11 +2284,11 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2134
2284
|
instance.closed.subscribe(() => {
|
2135
2285
|
// Only execute the service's close method if the instance still exists.
|
2136
2286
|
// This is needed to address a race condition if the deprecated instance.close method is used instead.
|
2137
|
-
if (
|
2287
|
+
if (SkyOverlayService.overlays.indexOf(instance) > -1) {
|
2138
2288
|
this.close(instance);
|
2139
2289
|
}
|
2140
2290
|
});
|
2141
|
-
|
2291
|
+
SkyOverlayService.overlays.push(instance);
|
2142
2292
|
return instance;
|
2143
2293
|
}
|
2144
2294
|
/**
|
@@ -2167,8 +2317,8 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2167
2317
|
closeAll() {
|
2168
2318
|
// The `close` event handler for each instance alters the array's length asynchronously,
|
2169
2319
|
// so the only "safe" index to call is zero.
|
2170
|
-
while (
|
2171
|
-
this.close(
|
2320
|
+
while (SkyOverlayService.overlays.length > 0) {
|
2321
|
+
this.close(SkyOverlayService.overlays[0]);
|
2172
2322
|
}
|
2173
2323
|
}
|
2174
2324
|
createOverlay(config) {
|
@@ -2200,31 +2350,27 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2200
2350
|
return Object.assign(Object.assign({}, defaults), config);
|
2201
2351
|
}
|
2202
2352
|
destroyOverlay(instance) {
|
2203
|
-
|
2353
|
+
SkyOverlayService.overlays.splice(SkyOverlayService.overlays.indexOf(instance), 1);
|
2204
2354
|
if (instance.config.enableScroll === false) {
|
2205
2355
|
// Only release the body scroll if no other overlay wishes it to be disabled.
|
2206
|
-
const anotherOverlayDisablesScroll =
|
2356
|
+
const anotherOverlayDisablesScroll = SkyOverlayService.overlays.some(o => !o.config.enableScroll);
|
2207
2357
|
if (!anotherOverlayDisablesScroll) {
|
2208
2358
|
this.adapter.releaseBodyScroll();
|
2209
2359
|
}
|
2210
2360
|
}
|
2211
2361
|
}
|
2212
|
-
}
|
2362
|
+
}
|
2213
2363
|
SkyOverlayService.overlays = [];
|
2214
|
-
SkyOverlayService
|
2215
|
-
|
2216
|
-
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2221
|
-
|
2222
|
-
Injectable({
|
2223
|
-
providedIn: 'root'
|
2224
|
-
})
|
2225
|
-
], SkyOverlayService);
|
2364
|
+
SkyOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayService, deps: [{ token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: SkyOverlayAdapterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2365
|
+
SkyOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayService, providedIn: 'root' });
|
2366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyOverlayService, decorators: [{
|
2367
|
+
type: Injectable,
|
2368
|
+
args: [{
|
2369
|
+
providedIn: 'root'
|
2370
|
+
}]
|
2371
|
+
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: SkyOverlayAdapterService }]; } });
|
2226
2372
|
|
2227
|
-
|
2373
|
+
class SkyPercentPipe {
|
2228
2374
|
constructor(localeProvider) {
|
2229
2375
|
this.localeProvider = localeProvider;
|
2230
2376
|
this.defaultFormat = '1.0-2';
|
@@ -2253,41 +2399,128 @@ let SkyPercentPipe = class SkyPercentPipe {
|
|
2253
2399
|
const format = this.format || this.defaultFormat;
|
2254
2400
|
this.formattedValue = SkyNumberFormatUtility.formatNumber(locale, this.value, SkyIntlNumberFormatStyle.Percent, format);
|
2255
2401
|
}
|
2256
|
-
}
|
2257
|
-
SkyPercentPipe
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
],
|
2402
|
+
}
|
2403
|
+
SkyPercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipe, deps: [{ token: i1.SkyAppLocaleProvider }], target: i0.ɵɵFactoryTarget.Pipe });
|
2404
|
+
SkyPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipe, name: "skyPercent", pure: false });
|
2405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipe, decorators: [{
|
2406
|
+
type: Pipe,
|
2407
|
+
args: [{
|
2408
|
+
name: 'skyPercent',
|
2409
|
+
pure: false
|
2410
|
+
}]
|
2411
|
+
}], ctorParameters: function () { return [{ type: i1.SkyAppLocaleProvider }]; } });
|
2266
2412
|
|
2267
|
-
|
2268
|
-
}
|
2269
|
-
SkyPercentPipeModule =
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
SkyPercentPipe
|
2276
|
-
],
|
2277
|
-
imports: [
|
2413
|
+
class SkyPercentPipeModule {
|
2414
|
+
}
|
2415
|
+
SkyPercentPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2416
|
+
SkyPercentPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipeModule, declarations: [SkyPercentPipe], imports: [CommonModule,
|
2417
|
+
SkyCoreResourcesModule], exports: [SkyPercentPipe] });
|
2418
|
+
SkyPercentPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipeModule, providers: [
|
2419
|
+
SkyPercentPipe
|
2420
|
+
], imports: [[
|
2278
2421
|
CommonModule,
|
2279
2422
|
SkyCoreResourcesModule
|
2280
|
-
]
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2423
|
+
]] });
|
2424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyPercentPipeModule, decorators: [{
|
2425
|
+
type: NgModule,
|
2426
|
+
args: [{
|
2427
|
+
declarations: [
|
2428
|
+
SkyPercentPipe
|
2429
|
+
],
|
2430
|
+
providers: [
|
2431
|
+
SkyPercentPipe
|
2432
|
+
],
|
2433
|
+
imports: [
|
2434
|
+
CommonModule,
|
2435
|
+
SkyCoreResourcesModule
|
2436
|
+
],
|
2437
|
+
exports: [
|
2438
|
+
SkyPercentPipe
|
2439
|
+
]
|
2440
|
+
}]
|
2441
|
+
}] });
|
2442
|
+
|
2443
|
+
class SkyScrollableHostService {
|
2444
|
+
constructor(mutationObserverSvc, windowRef) {
|
2445
|
+
this.mutationObserverSvc = mutationObserverSvc;
|
2446
|
+
this.windowRef = windowRef;
|
2447
|
+
}
|
2448
|
+
getScrollabeHost(elementRef) {
|
2449
|
+
return this.findScrollableHost(elementRef.nativeElement);
|
2450
|
+
}
|
2451
|
+
watchScrollableHost(elementRef, completionObservable) {
|
2452
|
+
let scrollableHost = this.findScrollableHost(elementRef.nativeElement);
|
2453
|
+
let behaviorSubject = new BehaviorSubject(scrollableHost);
|
2454
|
+
const mutationObserver = this.mutationObserverSvc.create(() => {
|
2455
|
+
let newScrollableHost = this.findScrollableHost(elementRef.nativeElement);
|
2456
|
+
if (newScrollableHost !== scrollableHost) {
|
2457
|
+
scrollableHost = newScrollableHost;
|
2458
|
+
this.observeForScrollableHostChanges(scrollableHost, mutationObserver);
|
2459
|
+
behaviorSubject.next(scrollableHost);
|
2460
|
+
}
|
2461
|
+
});
|
2462
|
+
this.observeForScrollableHostChanges(scrollableHost, mutationObserver);
|
2463
|
+
completionObservable.pipe(take(1)).subscribe(() => {
|
2464
|
+
mutationObserver.disconnect();
|
2465
|
+
});
|
2466
|
+
return behaviorSubject;
|
2467
|
+
}
|
2468
|
+
findScrollableHost(element) {
|
2469
|
+
const regex = /(auto|scroll)/;
|
2470
|
+
const windowObj = this.windowRef.nativeWindow;
|
2471
|
+
const bodyObj = windowObj.document.body;
|
2472
|
+
/* Sanity check */
|
2473
|
+
if (!element) {
|
2474
|
+
return windowObj;
|
2475
|
+
}
|
2476
|
+
let style = windowObj.getComputedStyle(element);
|
2477
|
+
let parent = element;
|
2478
|
+
do {
|
2479
|
+
parent = parent.parentNode;
|
2480
|
+
/* Sanity check for if this function is called for an element which has been removed from the DOM */
|
2481
|
+
if (!(parent instanceof HTMLElement)) {
|
2482
|
+
return windowObj;
|
2483
|
+
}
|
2484
|
+
style = windowObj.getComputedStyle(parent);
|
2485
|
+
} while (!regex.test(style.overflow) &&
|
2486
|
+
!regex.test(style.overflowY) &&
|
2487
|
+
parent !== bodyObj);
|
2488
|
+
if (parent === bodyObj) {
|
2489
|
+
return windowObj;
|
2490
|
+
}
|
2491
|
+
return parent;
|
2492
|
+
}
|
2493
|
+
observeForScrollableHostChanges(element, mutationObserver) {
|
2494
|
+
mutationObserver.disconnect();
|
2495
|
+
if (element instanceof HTMLElement) {
|
2496
|
+
mutationObserver.observe(element, {
|
2497
|
+
attributes: true,
|
2498
|
+
attributeFilter: ["class", "style.overflow", "style.overflow-y"],
|
2499
|
+
subtree: true
|
2500
|
+
});
|
2501
|
+
}
|
2502
|
+
else {
|
2503
|
+
mutationObserver.observe(document.documentElement, {
|
2504
|
+
attributes: true,
|
2505
|
+
attributeFilter: ["class", "style.overflow", "style.overflow-y"],
|
2506
|
+
subtree: true
|
2507
|
+
});
|
2508
|
+
}
|
2509
|
+
}
|
2510
|
+
}
|
2511
|
+
SkyScrollableHostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyScrollableHostService, deps: [{ token: MutationObserverService }, { token: SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
2512
|
+
SkyScrollableHostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyScrollableHostService, providedIn: 'root' });
|
2513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyScrollableHostService, decorators: [{
|
2514
|
+
type: Injectable,
|
2515
|
+
args: [{
|
2516
|
+
providedIn: 'root'
|
2517
|
+
}]
|
2518
|
+
}], ctorParameters: function () { return [{ type: MutationObserverService }, { type: SkyAppWindowRef }]; } });
|
2286
2519
|
|
2287
2520
|
/**
|
2288
2521
|
* Provides a method for setting a formatted title on the current window.
|
2289
2522
|
*/
|
2290
|
-
|
2523
|
+
class SkyAppTitleService {
|
2291
2524
|
constructor(title) {
|
2292
2525
|
this.title = title;
|
2293
2526
|
}
|
@@ -2301,18 +2534,17 @@ let SkyAppTitleService = class SkyAppTitleService {
|
|
2301
2534
|
this.title.setTitle(args.titleParts.join(' - '));
|
2302
2535
|
}
|
2303
2536
|
}
|
2304
|
-
}
|
2305
|
-
SkyAppTitleService
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
], SkyAppTitleService);
|
2537
|
+
}
|
2538
|
+
SkyAppTitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppTitleService, deps: [{ token: i1$1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
2539
|
+
SkyAppTitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppTitleService, providedIn: 'root' });
|
2540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppTitleService, decorators: [{
|
2541
|
+
type: Injectable,
|
2542
|
+
args: [{
|
2543
|
+
providedIn: 'root'
|
2544
|
+
}]
|
2545
|
+
}], ctorParameters: function () { return [{ type: i1$1.Title }]; } });
|
2314
2546
|
|
2315
|
-
|
2547
|
+
class SkyUIConfigService {
|
2316
2548
|
getConfig(key, defaultConfig) {
|
2317
2549
|
return of(defaultConfig);
|
2318
2550
|
}
|
@@ -2320,19 +2552,23 @@ let SkyUIConfigService = class SkyUIConfigService {
|
|
2320
2552
|
setConfig(key, value) {
|
2321
2553
|
return of({});
|
2322
2554
|
}
|
2323
|
-
}
|
2324
|
-
SkyUIConfigService.ɵ
|
2325
|
-
SkyUIConfigService =
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2555
|
+
}
|
2556
|
+
SkyUIConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
2557
|
+
SkyUIConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, providedIn: 'root' });
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, decorators: [{
|
2559
|
+
type: Injectable,
|
2560
|
+
args: [{
|
2561
|
+
providedIn: 'root'
|
2562
|
+
}]
|
2563
|
+
}] });
|
2330
2564
|
|
2331
|
-
|
2332
|
-
}
|
2333
|
-
SkyViewkeeperHostOptions =
|
2334
|
-
|
2335
|
-
|
2565
|
+
class SkyViewkeeperHostOptions {
|
2566
|
+
}
|
2567
|
+
SkyViewkeeperHostOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
2568
|
+
SkyViewkeeperHostOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions });
|
2569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions, decorators: [{
|
2570
|
+
type: Injectable
|
2571
|
+
}] });
|
2336
2572
|
|
2337
2573
|
const CLS_VIEWKEEPER_FIXED = 'sky-viewkeeper-fixed';
|
2338
2574
|
const EVT_AFTER_VIEWKEEPER_SYNC = 'afterViewkeeperSync';
|
@@ -2362,11 +2598,12 @@ function nextId() {
|
|
2362
2598
|
nextIdIndex = (nextIdIndex || 0) + 1;
|
2363
2599
|
return 'viewkeeper-' + nextIdIndex;
|
2364
2600
|
}
|
2365
|
-
function getOffset(el) {
|
2601
|
+
function getOffset(el, scrollableHost) {
|
2366
2602
|
const rect = el.getBoundingClientRect();
|
2603
|
+
const parent = scrollableHost ? scrollableHost : document.documentElement;
|
2367
2604
|
return {
|
2368
|
-
top: rect.top +
|
2369
|
-
left: rect.left +
|
2605
|
+
top: rect.top + parent.scrollTop,
|
2606
|
+
left: rect.left + parent.scrollLeft
|
2370
2607
|
};
|
2371
2608
|
}
|
2372
2609
|
function px(value) {
|
@@ -2402,6 +2639,7 @@ class SkyViewkeeper {
|
|
2402
2639
|
this.id = nextId();
|
2403
2640
|
this.el = options.el;
|
2404
2641
|
this.boundaryEl = options.boundaryEl;
|
2642
|
+
this.scrollableHost = options.scrollableHost;
|
2405
2643
|
this.verticalOffset = options.verticalOffset || 0;
|
2406
2644
|
this.verticalOffsetEl = options.verticalOffsetEl;
|
2407
2645
|
this.viewportMarginTop = options.viewportMarginTop || 0;
|
@@ -2409,7 +2647,7 @@ class SkyViewkeeper {
|
|
2409
2647
|
if (this.verticalOffsetEl) {
|
2410
2648
|
this.verticalOffsetEl.addEventListener(EVT_AFTER_VIEWKEEPER_SYNC, this.syncElPositionHandler);
|
2411
2649
|
}
|
2412
|
-
window.addEventListener('scroll', this.syncElPositionHandler);
|
2650
|
+
window.addEventListener('scroll', this.syncElPositionHandler, true);
|
2413
2651
|
window.addEventListener('resize', this.syncElPositionHandler);
|
2414
2652
|
window.addEventListener('orientationchange', this.syncElPositionHandler);
|
2415
2653
|
ensureStyleEl();
|
@@ -2437,7 +2675,7 @@ class SkyViewkeeper {
|
|
2437
2675
|
}
|
2438
2676
|
destroy() {
|
2439
2677
|
if (!this.isDestroyed) {
|
2440
|
-
window.removeEventListener('scroll', this.syncElPositionHandler);
|
2678
|
+
window.removeEventListener('scroll', this.syncElPositionHandler, true);
|
2441
2679
|
window.removeEventListener('resize', this.syncElPositionHandler);
|
2442
2680
|
window.removeEventListener('orientationchange', this.syncElPositionHandler);
|
2443
2681
|
this.unfixEl();
|
@@ -2475,16 +2713,19 @@ class SkyViewkeeper {
|
|
2475
2713
|
const verticalOffsetElTop = parseInt(verticalOffsetElTopStyle, 10) || 0;
|
2476
2714
|
offset += (this.verticalOffsetEl.offsetHeight + verticalOffsetElTop);
|
2477
2715
|
}
|
2716
|
+
else if (this.scrollableHost) {
|
2717
|
+
offset += this.scrollableHost.getBoundingClientRect().top;
|
2718
|
+
}
|
2478
2719
|
return offset;
|
2479
2720
|
}
|
2480
2721
|
shouldFixEl(boundaryInfo, verticalOffset) {
|
2481
2722
|
let anchorTop;
|
2482
2723
|
let doFixEl;
|
2483
2724
|
if (boundaryInfo.spacerEl) {
|
2484
|
-
anchorTop = getOffset(boundaryInfo.spacerEl).top;
|
2725
|
+
anchorTop = getOffset(boundaryInfo.spacerEl, this.scrollableHost).top;
|
2485
2726
|
}
|
2486
2727
|
else {
|
2487
|
-
anchorTop = getOffset(this.el).top;
|
2728
|
+
anchorTop = getOffset(this.el, this.scrollableHost).top;
|
2488
2729
|
}
|
2489
2730
|
doFixEl = boundaryInfo.scrollTop + verticalOffset + this.viewportMarginTop > anchorTop;
|
2490
2731
|
return doFixEl;
|
@@ -2543,11 +2784,11 @@ class SkyViewkeeper {
|
|
2543
2784
|
const spacerId = this.getSpacerId();
|
2544
2785
|
const spacerEl = document.getElementById(spacerId);
|
2545
2786
|
const boundaryEl = this.boundaryEl;
|
2546
|
-
const boundaryOffset = getOffset(boundaryEl);
|
2787
|
+
const boundaryOffset = getOffset(boundaryEl, this.scrollableHost);
|
2547
2788
|
const boundaryTop = boundaryOffset.top;
|
2548
2789
|
const boundaryBottom = boundaryTop + boundaryEl.getBoundingClientRect().height;
|
2549
|
-
const scrollLeft = document.documentElement.scrollLeft;
|
2550
|
-
const scrollTop = document.documentElement.scrollTop;
|
2790
|
+
const scrollLeft = this.scrollableHost ? this.scrollableHost.scrollLeft : document.documentElement.scrollLeft;
|
2791
|
+
const scrollTop = this.scrollableHost ? this.scrollableHost.scrollTop : document.documentElement.scrollTop;
|
2551
2792
|
const elHeight = getHeightWithMargin(this.el);
|
2552
2793
|
return {
|
2553
2794
|
boundaryBottom,
|
@@ -2565,7 +2806,7 @@ class SkyViewkeeper {
|
|
2565
2806
|
/**
|
2566
2807
|
* Provides methods for creating and destroying viewkeeper instances.
|
2567
2808
|
*/
|
2568
|
-
|
2809
|
+
class SkyViewkeeperService {
|
2569
2810
|
constructor(hostOptions) {
|
2570
2811
|
this.hostOptions = hostOptions;
|
2571
2812
|
}
|
@@ -2584,24 +2825,26 @@ let SkyViewkeeperService = class SkyViewkeeperService {
|
|
2584
2825
|
destroy(vk) {
|
2585
2826
|
vk.destroy();
|
2586
2827
|
}
|
2587
|
-
}
|
2588
|
-
SkyViewkeeperService
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
|
-
|
2597
|
-
]
|
2828
|
+
}
|
2829
|
+
SkyViewkeeperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperService, deps: [{ token: SkyViewkeeperHostOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
2830
|
+
SkyViewkeeperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperService, providedIn: 'root' });
|
2831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperService, decorators: [{
|
2832
|
+
type: Injectable,
|
2833
|
+
args: [{
|
2834
|
+
providedIn: 'root'
|
2835
|
+
}]
|
2836
|
+
}], ctorParameters: function () { return [{ type: SkyViewkeeperHostOptions, decorators: [{
|
2837
|
+
type: Optional
|
2838
|
+
}] }]; } });
|
2598
2839
|
|
2599
|
-
|
2600
|
-
constructor(el, mutationObserverSvc, viewkeeperSvc) {
|
2840
|
+
class SkyViewkeeperDirective {
|
2841
|
+
constructor(el, mutationObserverSvc, viewkeeperSvc, scrollableHostService) {
|
2601
2842
|
this.el = el;
|
2602
2843
|
this.mutationObserverSvc = mutationObserverSvc;
|
2603
2844
|
this.viewkeeperSvc = viewkeeperSvc;
|
2845
|
+
this.scrollableHostService = scrollableHostService;
|
2604
2846
|
this.viewkeepers = [];
|
2847
|
+
this.scrollableHostWatchUnsubscribe = undefined;
|
2605
2848
|
}
|
2606
2849
|
set skyViewkeeper(value) {
|
2607
2850
|
this._skyViewkeeper = value;
|
@@ -2657,51 +2900,66 @@ let SkyViewkeeperDirective = class SkyViewkeeperDirective {
|
|
2657
2900
|
detectElements() {
|
2658
2901
|
let viewkeeperEls = this.getViewkeeperEls();
|
2659
2902
|
if (this.viewkeeperElsChanged(viewkeeperEls)) {
|
2660
|
-
this.
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
2664
|
-
|
2665
|
-
|
2666
|
-
setWidth: true,
|
2667
|
-
verticalOffsetEl: previousViewkeeperEl
|
2668
|
-
}));
|
2669
|
-
previousViewkeeperEl = viewkeeperEl;
|
2903
|
+
if (this.scrollableHostWatchUnsubscribe) {
|
2904
|
+
this.scrollableHostWatchUnsubscribe.next();
|
2905
|
+
this.scrollableHostWatchUnsubscribe = new Subject();
|
2906
|
+
}
|
2907
|
+
else {
|
2908
|
+
this.scrollableHostWatchUnsubscribe = new Subject();
|
2670
2909
|
}
|
2910
|
+
this.scrollableHostService.watchScrollableHost(this.el, this.scrollableHostWatchUnsubscribe)
|
2911
|
+
.pipe(takeUntil(this.scrollableHostWatchUnsubscribe))
|
2912
|
+
.subscribe(scrollableHost => {
|
2913
|
+
this.destroyViewkeepers();
|
2914
|
+
let previousViewkeeperEl;
|
2915
|
+
for (const viewkeeperEl of viewkeeperEls) {
|
2916
|
+
this.viewkeepers.push(this.viewkeeperSvc.create({
|
2917
|
+
boundaryEl: this.el.nativeElement,
|
2918
|
+
scrollableHost: scrollableHost instanceof HTMLElement ? scrollableHost : undefined,
|
2919
|
+
el: viewkeeperEl,
|
2920
|
+
setWidth: true,
|
2921
|
+
verticalOffsetEl: previousViewkeeperEl
|
2922
|
+
}));
|
2923
|
+
previousViewkeeperEl = viewkeeperEl;
|
2924
|
+
}
|
2925
|
+
});
|
2671
2926
|
this.currentViewkeeperEls = viewkeeperEls;
|
2672
2927
|
}
|
2673
2928
|
}
|
2674
|
-
}
|
2675
|
-
SkyViewkeeperDirective
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
],
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
], SkyViewkeeperDirective);
|
2929
|
+
}
|
2930
|
+
SkyViewkeeperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperDirective, deps: [{ token: i0.ElementRef }, { token: MutationObserverService }, { token: SkyViewkeeperService }, { token: SkyScrollableHostService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
2931
|
+
SkyViewkeeperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: SkyViewkeeperDirective, selector: "[skyViewkeeper]", inputs: { skyViewkeeper: "skyViewkeeper" }, ngImport: i0 });
|
2932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperDirective, decorators: [{
|
2933
|
+
type: Directive,
|
2934
|
+
args: [{
|
2935
|
+
selector: '[skyViewkeeper]'
|
2936
|
+
}]
|
2937
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MutationObserverService }, { type: SkyViewkeeperService }, { type: SkyScrollableHostService, decorators: [{
|
2938
|
+
type: Optional
|
2939
|
+
}] }]; }, propDecorators: { skyViewkeeper: [{
|
2940
|
+
type: Input
|
2941
|
+
}] } });
|
2688
2942
|
|
2689
|
-
|
2690
|
-
}
|
2691
|
-
SkyViewkeeperModule =
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2700
|
-
|
2943
|
+
class SkyViewkeeperModule {
|
2944
|
+
}
|
2945
|
+
SkyViewkeeperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2946
|
+
SkyViewkeeperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, declarations: [SkyViewkeeperDirective], exports: [SkyViewkeeperDirective] });
|
2947
|
+
SkyViewkeeperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule });
|
2948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, decorators: [{
|
2949
|
+
type: NgModule,
|
2950
|
+
args: [{
|
2951
|
+
declarations: [
|
2952
|
+
SkyViewkeeperDirective
|
2953
|
+
],
|
2954
|
+
exports: [
|
2955
|
+
SkyViewkeeperDirective
|
2956
|
+
]
|
2957
|
+
}]
|
2958
|
+
}] });
|
2701
2959
|
|
2702
2960
|
/**
|
2703
2961
|
* Generated bundle index. Do not edit.
|
2704
2962
|
*/
|
2705
2963
|
|
2706
|
-
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
|
2964
|
+
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 };
|
2707
2965
|
//# sourceMappingURL=skyux-core.js.map
|