@skyux/core 5.0.0-beta.0 → 5.0.0-beta.12
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 +3196 -2906
- package/bundles/skyux-core.umd.js.map +1 -1
- package/documentation.json +8549 -0
- package/esm2015/modules/adapter-service/adapter.module.js +11 -8
- package/esm2015/modules/adapter-service/adapter.service.js +16 -17
- 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 -20
- 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 +34 -32
- 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/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 +17 -21
- package/esm2015/modules/viewkeeper/viewkeeper.js +1 -1
- 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 +59 -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 +729 -562
- 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/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 +3 -0
- package/modules/viewkeeper/viewkeeper.directive.d.ts +3 -0
- 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} +5 -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 -280
- 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 -79
- 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 -191
- 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 -2895
- 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
6
|
import { takeUntil, debounceTime } from 'rxjs/operators';
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import
|
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) {
|
@@ -47,10 +54,10 @@ const SKY_TABBABLE_SELECTOR = [
|
|
47
54
|
'iframe',
|
48
55
|
'object',
|
49
56
|
'embed',
|
50
|
-
'*[contenteditable=true]',
|
51
|
-
'*[tabindex]'
|
57
|
+
'*[contenteditable=true]:not([disabled])',
|
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,25 +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
|
-
})
|
1174
|
-
], 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 }]; } });
|
1175
1252
|
|
1176
1253
|
/**
|
1177
1254
|
* This service docks components to specific areas on the page.
|
1178
1255
|
*/
|
1179
|
-
|
1256
|
+
class SkyDockService {
|
1180
1257
|
constructor(dynamicComponentService) {
|
1181
1258
|
this.dynamicComponentService = dynamicComponentService;
|
1182
1259
|
this._items = [];
|
@@ -1209,48 +1286,83 @@ let SkyDockService = class SkyDockService {
|
|
1209
1286
|
this._items.sort(sortByStackOrder);
|
1210
1287
|
return item;
|
1211
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
|
+
}
|
1212
1299
|
createDock() {
|
1213
|
-
|
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);
|
1214
1321
|
}
|
1215
1322
|
destroyDock() {
|
1216
1323
|
this.dynamicComponentService.removeComponent(this.dockRef);
|
1217
1324
|
this.dockRef = undefined;
|
1218
1325
|
}
|
1219
|
-
}
|
1220
|
-
SkyDockService
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
], 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 }]; } });
|
1229
1335
|
|
1230
1336
|
/**
|
1231
1337
|
* Provides services required to create dynamic components on the page.
|
1232
1338
|
* @deprecated The `SkyDynamicComponentService` no longer needs the `SkyDynamicComponentModule`.
|
1233
1339
|
* The `SkyDynamicComponentModule` can be removed from your project.
|
1234
1340
|
*/
|
1235
|
-
|
1236
|
-
}
|
1237
|
-
SkyDynamicComponentModule =
|
1238
|
-
|
1239
|
-
|
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
|
+
}] });
|
1240
1350
|
|
1241
|
-
|
1351
|
+
class SkyAppFormat {
|
1242
1352
|
formatText(format, ...args) {
|
1243
1353
|
return String(format).replace(/\{(\d+)\}/g, function (match, capture) {
|
1244
1354
|
return args[parseInt(capture, 10)];
|
1245
1355
|
});
|
1246
1356
|
}
|
1247
|
-
}
|
1248
|
-
SkyAppFormat.ɵ
|
1249
|
-
SkyAppFormat =
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
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
|
+
}] });
|
1254
1366
|
|
1255
1367
|
let idIndex = 0;
|
1256
1368
|
function generateId() {
|
@@ -1262,7 +1374,7 @@ function generateId() {
|
|
1262
1374
|
* such as in a `label` element's `for` attribute, assign this directive to a template reference
|
1263
1375
|
* variable, then use its `id` property.
|
1264
1376
|
*/
|
1265
|
-
|
1377
|
+
class SkyIdDirective {
|
1266
1378
|
constructor(elRef, renderer) {
|
1267
1379
|
// Generate and apply the ID before the template is rendered
|
1268
1380
|
// to avoid a changed-after-checked error.
|
@@ -1273,90 +1385,102 @@ let SkyIdDirective = class SkyIdDirective {
|
|
1273
1385
|
get id() {
|
1274
1386
|
return this._id;
|
1275
1387
|
}
|
1276
|
-
}
|
1277
|
-
SkyIdDirective
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
], 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 }]; } });
|
1287
1398
|
|
1288
|
-
|
1289
|
-
}
|
1290
|
-
SkyIdModule =
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
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
|
+
}] });
|
1300
1415
|
|
1301
1416
|
/**
|
1302
1417
|
* @deprecated The `SkyLogService` no longer needs the `SkyLogModule`.
|
1303
1418
|
* The `SkyLogModule` can be removed from your project.
|
1304
1419
|
*/
|
1305
|
-
|
1306
|
-
}
|
1307
|
-
SkyLogModule =
|
1308
|
-
|
1309
|
-
|
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
|
+
}] });
|
1310
1429
|
|
1311
1430
|
/**
|
1312
1431
|
* @deprecated The `SkyLogService` will be removed in the next major version of `@skyux/core`.
|
1313
1432
|
*/
|
1314
|
-
|
1433
|
+
class SkyLogService {
|
1315
1434
|
warn(message, ...optionalParams) {
|
1316
1435
|
/*istanbul ignore else */
|
1317
1436
|
if (window.console) {
|
1318
1437
|
window.console.warn.apply(window.console, arguments);
|
1319
1438
|
}
|
1320
1439
|
}
|
1321
|
-
}
|
1322
|
-
SkyLogService.ɵ
|
1323
|
-
SkyLogService =
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
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
|
+
}] });
|
1328
1449
|
|
1329
1450
|
/**
|
1330
1451
|
* @deprecated The `SkyMediaQueryService` no longer needs the `SkyMediaQueryModule`.
|
1331
1452
|
* The `SkyMediaQueryModule` can be removed from your project.
|
1332
1453
|
*/
|
1333
|
-
|
1334
|
-
}
|
1335
|
-
SkyMediaQueryModule =
|
1336
|
-
|
1337
|
-
|
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
|
+
}] });
|
1338
1463
|
|
1339
|
-
|
1340
|
-
let SkyMediaQueryService = SkyMediaQueryService_1 = class SkyMediaQueryService {
|
1464
|
+
class SkyMediaQueryService {
|
1341
1465
|
constructor(zone) {
|
1342
1466
|
this.zone = zone;
|
1343
1467
|
this.currentSubject = new BehaviorSubject(this.current);
|
1344
1468
|
this._current = SkyMediaBreakpoints.md;
|
1345
1469
|
this.breakpoints = [
|
1346
1470
|
{
|
1347
|
-
mediaQueryString:
|
1471
|
+
mediaQueryString: SkyMediaQueryService.xs,
|
1348
1472
|
name: SkyMediaBreakpoints.xs
|
1349
1473
|
},
|
1350
1474
|
{
|
1351
|
-
mediaQueryString:
|
1475
|
+
mediaQueryString: SkyMediaQueryService.sm,
|
1352
1476
|
name: SkyMediaBreakpoints.sm
|
1353
1477
|
},
|
1354
1478
|
{
|
1355
|
-
mediaQueryString:
|
1479
|
+
mediaQueryString: SkyMediaQueryService.md,
|
1356
1480
|
name: SkyMediaBreakpoints.md
|
1357
1481
|
},
|
1358
1482
|
{
|
1359
|
-
mediaQueryString:
|
1483
|
+
mediaQueryString: SkyMediaQueryService.lg,
|
1360
1484
|
name: SkyMediaBreakpoints.lg
|
1361
1485
|
}
|
1362
1486
|
];
|
@@ -1424,7 +1548,7 @@ let SkyMediaQueryService = SkyMediaQueryService_1 = class SkyMediaQueryService {
|
|
1424
1548
|
this._current = breakpoint;
|
1425
1549
|
this.currentSubject.next(breakpoint);
|
1426
1550
|
}
|
1427
|
-
}
|
1551
|
+
}
|
1428
1552
|
/**
|
1429
1553
|
* The size for the `xs` breakpoint.
|
1430
1554
|
*/
|
@@ -1441,39 +1565,93 @@ SkyMediaQueryService.md = '(min-width: 992px) and (max-width: 1199px)';
|
|
1441
1565
|
* The size for the `lg` breakpoint.
|
1442
1566
|
*/
|
1443
1567
|
SkyMediaQueryService.lg = '(min-width: 1200px)';
|
1444
|
-
SkyMediaQueryService
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
], 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 }]; } });
|
1453
1576
|
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
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 {
|
1458
1587
|
getString(localeInfo, name) {
|
1459
|
-
return
|
1588
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
1460
1589
|
}
|
1461
|
-
}
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
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
|
+
}] });
|
1465
1614
|
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
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
|
+
}
|
1477
1655
|
|
1478
1656
|
/* tslint:disable:no-null-keyword */
|
1479
1657
|
function isNumeric(value) {
|
@@ -1493,7 +1671,7 @@ function parseIntAutoRadix(text) {
|
|
1493
1671
|
class SkyNumberFormatUtility {
|
1494
1672
|
/* istanbul ignore next */
|
1495
1673
|
constructor() { }
|
1496
|
-
static formatNumber(locale, value, style, digits, currency = null, currencyAsSymbol = false) {
|
1674
|
+
static formatNumber(locale, value, style, digits, currency = null, currencyAsSymbol = false, currencySign) {
|
1497
1675
|
if (value == null) {
|
1498
1676
|
return null;
|
1499
1677
|
}
|
@@ -1534,13 +1712,14 @@ class SkyNumberFormatUtility {
|
|
1534
1712
|
minimumFractionDigits: minFraction,
|
1535
1713
|
maximumFractionDigits: maxFraction,
|
1536
1714
|
currency: currency,
|
1537
|
-
currencyAsSymbol: currencyAsSymbol
|
1715
|
+
currencyAsSymbol: currencyAsSymbol,
|
1716
|
+
currencySign: currencySign
|
1538
1717
|
});
|
1539
1718
|
}
|
1540
1719
|
}
|
1541
1720
|
SkyNumberFormatUtility._NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
|
1542
1721
|
|
1543
|
-
|
1722
|
+
class SkyNumericService {
|
1544
1723
|
constructor(resourcesService) {
|
1545
1724
|
this.resourcesService = resourcesService;
|
1546
1725
|
this.symbolIndex = [
|
@@ -1566,32 +1745,37 @@ let SkyNumericService = class SkyNumericService {
|
|
1566
1745
|
* @param options Format options.
|
1567
1746
|
*/
|
1568
1747
|
formatNumber(value, options) {
|
1748
|
+
var _a;
|
1569
1749
|
/* tslint:disable-next-line:no-null-keyword */
|
1570
1750
|
if (isNaN(value) || value === null) {
|
1571
1751
|
return '';
|
1572
1752
|
}
|
1573
1753
|
const decimalPlaceRegExp = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1754
|
+
// Get the symbol for the number after rounding, since rounding could push the number
|
1755
|
+
// into a different symbol range.
|
1756
|
+
let roundedNumber = this.roundNumber(value, options.digits);
|
1757
|
+
let roundedNumberAbs = Math.abs(roundedNumber);
|
1758
|
+
let suffix = '';
|
1759
|
+
for (let i = 0; i < this.symbolIndex.length; i++) {
|
1760
|
+
let symbol = this.symbolIndex[i];
|
1761
|
+
if (options.truncate &&
|
1762
|
+
roundedNumberAbs >= options.truncateAfter && roundedNumberAbs >= symbol.value) {
|
1763
|
+
roundedNumber = this.roundNumber((value / symbol.value), options.digits);
|
1764
|
+
if (Math.abs(roundedNumber) === 1000 && i > 0) {
|
1765
|
+
// Rounding caused the number to cross into the range of the next symbol.
|
1766
|
+
symbol = this.symbolIndex[i - 1];
|
1767
|
+
roundedNumber /= 1000;
|
1768
|
+
}
|
1769
|
+
suffix = symbol.label;
|
1770
|
+
break;
|
1771
|
+
}
|
1589
1772
|
}
|
1773
|
+
let output = roundedNumber.toString().replace(decimalPlaceRegExp, '$1') + suffix;
|
1590
1774
|
this.storeShortenSymbol(output);
|
1591
1775
|
const locale = options.locale || this.currentLocale;
|
1592
1776
|
let digits;
|
1593
1777
|
// Checks the string entered for format. Using toLowerCase to ignore case.
|
1594
|
-
switch (options.format.toLowerCase()) {
|
1778
|
+
switch ((_a = options.format) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
1595
1779
|
// In a case where a decimal value was not shortened and
|
1596
1780
|
// the digit input is 2 or higher, it forces 2 digits.
|
1597
1781
|
// For example, this prevents a value like $15.50 from displaying as $15.5.
|
@@ -1613,7 +1797,7 @@ let SkyNumericService = class SkyNumericService {
|
|
1613
1797
|
// and the appropriate string value for Angular 5+.
|
1614
1798
|
// See: https://angular.io/api/common/CurrencyPipe#parameters
|
1615
1799
|
const symbolDisplay = 'symbol';
|
1616
|
-
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);
|
1617
1801
|
break;
|
1618
1802
|
// The following is a catch-all to ensure that if
|
1619
1803
|
// anything but currency (or a future option) are entered,
|
@@ -1707,52 +1891,15 @@ let SkyNumericService = class SkyNumericService {
|
|
1707
1891
|
// TODO: Need to implement the async `getString` method in a breaking change.
|
1708
1892
|
return this.resourcesService.getStringForLocale({ locale: 'en_US' }, key);
|
1709
1893
|
}
|
1710
|
-
};
|
1711
|
-
SkyNumericService.ctorParameters = () => [
|
1712
|
-
{ type: SkyLibResourcesService }
|
1713
|
-
];
|
1714
|
-
SkyNumericService.ɵprov = ɵɵdefineInjectable({ factory: function SkyNumericService_Factory() { return new SkyNumericService(ɵɵinject(SkyLibResourcesService)); }, token: SkyNumericService, providedIn: "root" });
|
1715
|
-
SkyNumericService = __decorate([
|
1716
|
-
Injectable({
|
1717
|
-
providedIn: 'root'
|
1718
|
-
})
|
1719
|
-
], SkyNumericService);
|
1720
|
-
|
1721
|
-
/**
|
1722
|
-
* Provides arguments for the number to format.
|
1723
|
-
*/
|
1724
|
-
class NumericOptions {
|
1725
|
-
constructor() {
|
1726
|
-
/**
|
1727
|
-
* Specifies the maximum number of digits after the decimal separator.
|
1728
|
-
* @default 1
|
1729
|
-
*/
|
1730
|
-
this.digits = 1;
|
1731
|
-
/**
|
1732
|
-
* Specifies how to format the number. Options are `currency` or `number`.
|
1733
|
-
* @default "number"
|
1734
|
-
*/
|
1735
|
-
this.format = 'number';
|
1736
|
-
/**
|
1737
|
-
* Specifies the ISO4217 currency code to use for currency formatting. If you do not specify a
|
1738
|
-
* currency code, the component uses the browser's culture to determine the currency unless your
|
1739
|
-
* SPA provides a different culture with `SkyAppLocaleProvider`.
|
1740
|
-
* @default 'USD'
|
1741
|
-
*/
|
1742
|
-
this.iso = 'USD';
|
1743
|
-
/**
|
1744
|
-
* Indicates whether to shorten numbers to rounded numbers and abbreviation characters
|
1745
|
-
* such as K for thousands, M for millions, B for billions, and T for trillion.
|
1746
|
-
*/
|
1747
|
-
this.truncate = true;
|
1748
|
-
/**
|
1749
|
-
* Specifies the starting point after which numbers are shortened to rounded numbers
|
1750
|
-
* and abbreviation characters.
|
1751
|
-
* @default 0
|
1752
|
-
*/
|
1753
|
-
this.truncateAfter = 0;
|
1754
|
-
}
|
1755
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 }]; } });
|
1756
1903
|
|
1757
1904
|
/**
|
1758
1905
|
* Shorten numbers to rounded numbers and abbreviation characters such as K for thousands,
|
@@ -1764,7 +1911,7 @@ class NumericOptions {
|
|
1764
1911
|
* {{ value | skyNumeric(config) }}
|
1765
1912
|
* ```
|
1766
1913
|
*/
|
1767
|
-
|
1914
|
+
class SkyNumericPipe {
|
1768
1915
|
constructor(localeProvider, numericService) {
|
1769
1916
|
this.localeProvider = localeProvider;
|
1770
1917
|
this.numericService = numericService;
|
@@ -1804,36 +1951,45 @@ let SkyNumericPipe = class SkyNumericPipe {
|
|
1804
1951
|
Object.assign(options, config);
|
1805
1952
|
return this.numericService.formatNumber(value, options);
|
1806
1953
|
}
|
1807
|
-
}
|
1808
|
-
SkyNumericPipe
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
], 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 }]; } });
|
1817
1963
|
|
1818
|
-
|
1819
|
-
}
|
1820
|
-
SkyNumericModule =
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
SkyNumericPipe
|
1827
|
-
],
|
1828
|
-
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: [[
|
1829
1972
|
SkyI18nModule,
|
1830
1973
|
SkyCoreResourcesModule
|
1831
|
-
]
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
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
|
+
}] });
|
1837
1993
|
|
1838
1994
|
/**
|
1839
1995
|
* Represents a new overlay instance. It is used to manage the "closed" state of the overlay,
|
@@ -1916,7 +2072,7 @@ let uniqueZIndex = 5000;
|
|
1916
2072
|
/**
|
1917
2073
|
* @internal
|
1918
2074
|
*/
|
1919
|
-
|
2075
|
+
class SkyOverlayComponent {
|
1920
2076
|
constructor(changeDetector, resolver, injector, coreAdapter, context, router) {
|
1921
2077
|
this.changeDetector = changeDetector;
|
1922
2078
|
this.resolver = resolver;
|
@@ -2009,63 +2165,65 @@ let SkyOverlayComponent = class SkyOverlayComponent {
|
|
2009
2165
|
this.routerSubscription = undefined;
|
2010
2166
|
}
|
2011
2167
|
}
|
2012
|
-
}
|
2013
|
-
SkyOverlayComponent
|
2014
|
-
{ type:
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
]
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
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}"]
|
2045
|
-
}),
|
2046
|
-
__param(5, Optional())
|
2047
|
-
], 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
|
+
}] } });
|
2048
2200
|
|
2049
|
-
|
2050
|
-
}
|
2051
|
-
SkyOverlayModule =
|
2052
|
-
|
2053
|
-
|
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: [[
|
2054
2206
|
CommonModule
|
2055
|
-
]
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
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
|
+
}] });
|
2064
2222
|
|
2065
2223
|
/**
|
2066
2224
|
* @internal
|
2067
2225
|
*/
|
2068
|
-
|
2226
|
+
class SkyOverlayAdapterService {
|
2069
2227
|
constructor(rendererFactory) {
|
2070
2228
|
this.renderer = rendererFactory.createRenderer(undefined, undefined);
|
2071
2229
|
}
|
@@ -2086,27 +2244,26 @@ let SkyOverlayAdapterService = class SkyOverlayAdapterService {
|
|
2086
2244
|
this.destroyStyleElement();
|
2087
2245
|
}
|
2088
2246
|
destroyStyleElement() {
|
2247
|
+
/* istanbul ignore else */
|
2089
2248
|
if (this.styleElement.parentElement === document.head) {
|
2090
2249
|
this.renderer.removeChild(document.head, this.styleElement);
|
2091
2250
|
}
|
2092
2251
|
}
|
2093
|
-
}
|
2094
|
-
SkyOverlayAdapterService
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
], 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 }]; } });
|
2103
2261
|
|
2104
|
-
var SkyOverlayService_1;
|
2105
2262
|
/**
|
2106
2263
|
* This service is used to create new overlays.
|
2107
2264
|
* @dynamic
|
2108
2265
|
*/
|
2109
|
-
|
2266
|
+
class SkyOverlayService {
|
2110
2267
|
constructor(applicationRef, componentFactoryResolver, injector, adapter) {
|
2111
2268
|
this.applicationRef = applicationRef;
|
2112
2269
|
this.componentFactoryResolver = componentFactoryResolver;
|
@@ -2127,11 +2284,11 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2127
2284
|
instance.closed.subscribe(() => {
|
2128
2285
|
// Only execute the service's close method if the instance still exists.
|
2129
2286
|
// This is needed to address a race condition if the deprecated instance.close method is used instead.
|
2130
|
-
if (
|
2287
|
+
if (SkyOverlayService.overlays.indexOf(instance) > -1) {
|
2131
2288
|
this.close(instance);
|
2132
2289
|
}
|
2133
2290
|
});
|
2134
|
-
|
2291
|
+
SkyOverlayService.overlays.push(instance);
|
2135
2292
|
return instance;
|
2136
2293
|
}
|
2137
2294
|
/**
|
@@ -2160,8 +2317,8 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2160
2317
|
closeAll() {
|
2161
2318
|
// The `close` event handler for each instance alters the array's length asynchronously,
|
2162
2319
|
// so the only "safe" index to call is zero.
|
2163
|
-
while (
|
2164
|
-
this.close(
|
2320
|
+
while (SkyOverlayService.overlays.length > 0) {
|
2321
|
+
this.close(SkyOverlayService.overlays[0]);
|
2165
2322
|
}
|
2166
2323
|
}
|
2167
2324
|
createOverlay(config) {
|
@@ -2193,31 +2350,27 @@ let SkyOverlayService = SkyOverlayService_1 = class SkyOverlayService {
|
|
2193
2350
|
return Object.assign(Object.assign({}, defaults), config);
|
2194
2351
|
}
|
2195
2352
|
destroyOverlay(instance) {
|
2196
|
-
|
2353
|
+
SkyOverlayService.overlays.splice(SkyOverlayService.overlays.indexOf(instance), 1);
|
2197
2354
|
if (instance.config.enableScroll === false) {
|
2198
2355
|
// Only release the body scroll if no other overlay wishes it to be disabled.
|
2199
|
-
const anotherOverlayDisablesScroll =
|
2356
|
+
const anotherOverlayDisablesScroll = SkyOverlayService.overlays.some(o => !o.config.enableScroll);
|
2200
2357
|
if (!anotherOverlayDisablesScroll) {
|
2201
2358
|
this.adapter.releaseBodyScroll();
|
2202
2359
|
}
|
2203
2360
|
}
|
2204
2361
|
}
|
2205
|
-
}
|
2362
|
+
}
|
2206
2363
|
SkyOverlayService.overlays = [];
|
2207
|
-
SkyOverlayService
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2215
|
-
Injectable({
|
2216
|
-
providedIn: 'root'
|
2217
|
-
})
|
2218
|
-
], 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 }]; } });
|
2219
2372
|
|
2220
|
-
|
2373
|
+
class SkyPercentPipe {
|
2221
2374
|
constructor(localeProvider) {
|
2222
2375
|
this.localeProvider = localeProvider;
|
2223
2376
|
this.defaultFormat = '1.0-2';
|
@@ -2246,41 +2399,51 @@ let SkyPercentPipe = class SkyPercentPipe {
|
|
2246
2399
|
const format = this.format || this.defaultFormat;
|
2247
2400
|
this.formattedValue = SkyNumberFormatUtility.formatNumber(locale, this.value, SkyIntlNumberFormatStyle.Percent, format);
|
2248
2401
|
}
|
2249
|
-
}
|
2250
|
-
SkyPercentPipe
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2258
|
-
],
|
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 }]; } });
|
2259
2412
|
|
2260
|
-
|
2261
|
-
}
|
2262
|
-
SkyPercentPipeModule =
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
SkyPercentPipe
|
2269
|
-
],
|
2270
|
-
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: [[
|
2271
2421
|
CommonModule,
|
2272
2422
|
SkyCoreResourcesModule
|
2273
|
-
]
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
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
|
+
}] });
|
2279
2442
|
|
2280
2443
|
/**
|
2281
2444
|
* Provides a method for setting a formatted title on the current window.
|
2282
2445
|
*/
|
2283
|
-
|
2446
|
+
class SkyAppTitleService {
|
2284
2447
|
constructor(title) {
|
2285
2448
|
this.title = title;
|
2286
2449
|
}
|
@@ -2294,18 +2457,17 @@ let SkyAppTitleService = class SkyAppTitleService {
|
|
2294
2457
|
this.title.setTitle(args.titleParts.join(' - '));
|
2295
2458
|
}
|
2296
2459
|
}
|
2297
|
-
}
|
2298
|
-
SkyAppTitleService
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
], SkyAppTitleService);
|
2460
|
+
}
|
2461
|
+
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 });
|
2462
|
+
SkyAppTitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppTitleService, providedIn: 'root' });
|
2463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyAppTitleService, decorators: [{
|
2464
|
+
type: Injectable,
|
2465
|
+
args: [{
|
2466
|
+
providedIn: 'root'
|
2467
|
+
}]
|
2468
|
+
}], ctorParameters: function () { return [{ type: i1$1.Title }]; } });
|
2307
2469
|
|
2308
|
-
|
2470
|
+
class SkyUIConfigService {
|
2309
2471
|
getConfig(key, defaultConfig) {
|
2310
2472
|
return of(defaultConfig);
|
2311
2473
|
}
|
@@ -2313,19 +2475,23 @@ let SkyUIConfigService = class SkyUIConfigService {
|
|
2313
2475
|
setConfig(key, value) {
|
2314
2476
|
return of({});
|
2315
2477
|
}
|
2316
|
-
}
|
2317
|
-
SkyUIConfigService.ɵ
|
2318
|
-
SkyUIConfigService =
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2478
|
+
}
|
2479
|
+
SkyUIConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
2480
|
+
SkyUIConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, providedIn: 'root' });
|
2481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyUIConfigService, decorators: [{
|
2482
|
+
type: Injectable,
|
2483
|
+
args: [{
|
2484
|
+
providedIn: 'root'
|
2485
|
+
}]
|
2486
|
+
}] });
|
2323
2487
|
|
2324
|
-
|
2325
|
-
}
|
2326
|
-
SkyViewkeeperHostOptions =
|
2327
|
-
|
2328
|
-
|
2488
|
+
class SkyViewkeeperHostOptions {
|
2489
|
+
}
|
2490
|
+
SkyViewkeeperHostOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
2491
|
+
SkyViewkeeperHostOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions });
|
2492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperHostOptions, decorators: [{
|
2493
|
+
type: Injectable
|
2494
|
+
}] });
|
2329
2495
|
|
2330
2496
|
const CLS_VIEWKEEPER_FIXED = 'sky-viewkeeper-fixed';
|
2331
2497
|
const EVT_AFTER_VIEWKEEPER_SYNC = 'afterViewkeeperSync';
|
@@ -2558,7 +2724,7 @@ class SkyViewkeeper {
|
|
2558
2724
|
/**
|
2559
2725
|
* Provides methods for creating and destroying viewkeeper instances.
|
2560
2726
|
*/
|
2561
|
-
|
2727
|
+
class SkyViewkeeperService {
|
2562
2728
|
constructor(hostOptions) {
|
2563
2729
|
this.hostOptions = hostOptions;
|
2564
2730
|
}
|
@@ -2577,19 +2743,19 @@ let SkyViewkeeperService = class SkyViewkeeperService {
|
|
2577
2743
|
destroy(vk) {
|
2578
2744
|
vk.destroy();
|
2579
2745
|
}
|
2580
|
-
}
|
2581
|
-
SkyViewkeeperService
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2589
|
-
|
2590
|
-
]
|
2746
|
+
}
|
2747
|
+
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 });
|
2748
|
+
SkyViewkeeperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperService, providedIn: 'root' });
|
2749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperService, decorators: [{
|
2750
|
+
type: Injectable,
|
2751
|
+
args: [{
|
2752
|
+
providedIn: 'root'
|
2753
|
+
}]
|
2754
|
+
}], ctorParameters: function () { return [{ type: SkyViewkeeperHostOptions, decorators: [{
|
2755
|
+
type: Optional
|
2756
|
+
}] }]; } });
|
2591
2757
|
|
2592
|
-
|
2758
|
+
class SkyViewkeeperDirective {
|
2593
2759
|
constructor(el, mutationObserverSvc, viewkeeperSvc) {
|
2594
2760
|
this.el = el;
|
2595
2761
|
this.mutationObserverSvc = mutationObserverSvc;
|
@@ -2664,37 +2830,38 @@ let SkyViewkeeperDirective = class SkyViewkeeperDirective {
|
|
2664
2830
|
this.currentViewkeeperEls = viewkeeperEls;
|
2665
2831
|
}
|
2666
2832
|
}
|
2667
|
-
}
|
2668
|
-
SkyViewkeeperDirective
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
2675
|
-
],
|
2676
|
-
|
2677
|
-
|
2678
|
-
selector: '[skyViewkeeper]'
|
2679
|
-
})
|
2680
|
-
], SkyViewkeeperDirective);
|
2833
|
+
}
|
2834
|
+
SkyViewkeeperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperDirective, deps: [{ token: i0.ElementRef }, { token: MutationObserverService }, { token: SkyViewkeeperService }], target: i0.ɵɵFactoryTarget.Directive });
|
2835
|
+
SkyViewkeeperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: SkyViewkeeperDirective, selector: "[skyViewkeeper]", inputs: { skyViewkeeper: "skyViewkeeper" }, ngImport: i0 });
|
2836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperDirective, decorators: [{
|
2837
|
+
type: Directive,
|
2838
|
+
args: [{
|
2839
|
+
selector: '[skyViewkeeper]'
|
2840
|
+
}]
|
2841
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MutationObserverService }, { type: SkyViewkeeperService }]; }, propDecorators: { skyViewkeeper: [{
|
2842
|
+
type: Input
|
2843
|
+
}] } });
|
2681
2844
|
|
2682
|
-
|
2683
|
-
}
|
2684
|
-
SkyViewkeeperModule =
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2845
|
+
class SkyViewkeeperModule {
|
2846
|
+
}
|
2847
|
+
SkyViewkeeperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2848
|
+
SkyViewkeeperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, declarations: [SkyViewkeeperDirective], exports: [SkyViewkeeperDirective] });
|
2849
|
+
SkyViewkeeperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule });
|
2850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyViewkeeperModule, decorators: [{
|
2851
|
+
type: NgModule,
|
2852
|
+
args: [{
|
2853
|
+
declarations: [
|
2854
|
+
SkyViewkeeperDirective
|
2855
|
+
],
|
2856
|
+
exports: [
|
2857
|
+
SkyViewkeeperDirective
|
2858
|
+
]
|
2859
|
+
}]
|
2860
|
+
}] });
|
2694
2861
|
|
2695
2862
|
/**
|
2696
2863
|
* Generated bundle index. Do not edit.
|
2697
2864
|
*/
|
2698
2865
|
|
2699
|
-
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
|
2866
|
+
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, SkyUIConfigService, SkyViewkeeperHostOptions, SkyViewkeeperModule, SkyViewkeeperService, getWindow, SkyAffixDirective as λ1, SkyIdDirective as λ2, SkyViewkeeperDirective as λ3 };
|
2700
2867
|
//# sourceMappingURL=skyux-core.js.map
|