@skyux/layout 7.0.0-beta.0 → 7.0.0-beta.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/documentation.json +670 -555
- package/esm2020/lib/modules/action-button/action-button-adapter-service.mjs +22 -18
- package/esm2020/lib/modules/action-button/action-button-container.component.mjs +61 -53
- package/esm2020/lib/modules/action-button/action-button-icon.component.mjs +9 -6
- package/esm2020/lib/modules/action-button/action-button.component.mjs +10 -6
- package/esm2020/lib/modules/back-to-top/back-to-top-adapter.service.mjs +19 -15
- package/esm2020/lib/modules/back-to-top/back-to-top.component.mjs +8 -5
- package/esm2020/lib/modules/back-to-top/back-to-top.directive.mjs +68 -63
- package/esm2020/lib/modules/box/box.component.mjs +1 -1
- package/esm2020/lib/modules/toolbar/toolbar.component.mjs +4 -4
- package/fesm2015/skyux-layout.mjs +190 -166
- package/fesm2015/skyux-layout.mjs.map +1 -1
- package/fesm2020/skyux-layout.mjs +191 -166
- package/fesm2020/skyux-layout.mjs.map +1 -1
- package/lib/modules/action-button/action-button-adapter-service.d.ts +1 -2
- package/lib/modules/action-button/action-button-container.component.d.ts +6 -17
- package/lib/modules/action-button/action-button-icon.component.d.ts +2 -3
- package/lib/modules/action-button/action-button.component.d.ts +3 -3
- package/lib/modules/back-to-top/back-to-top-adapter.service.d.ts +1 -4
- package/lib/modules/back-to-top/back-to-top.component.d.ts +1 -1
- package/lib/modules/back-to-top/back-to-top.directive.d.ts +4 -16
- package/lib/modules/box/box.component.d.ts +3 -3
- package/lib/modules/toolbar/toolbar.component.d.ts +4 -4
- package/package.json +9 -9
|
@@ -27,6 +27,7 @@ import { trigger, transition, style, query, group, animate } from '@angular/anim
|
|
|
27
27
|
import * as i2$2 from '@skyux/modals';
|
|
28
28
|
import { SkyModalModule } from '@skyux/modals';
|
|
29
29
|
|
|
30
|
+
var _SkyActionButtonAdapterService_instances, _SkyActionButtonAdapterService_renderer, _SkyActionButtonAdapterService_getResponsiveClassName;
|
|
30
31
|
const RESPONSIVE_CLASS_SM = 'sky-action-button-container-sm';
|
|
31
32
|
const RESPONSIVE_CLASS_MD = 'sky-action-button-container-md';
|
|
32
33
|
const RESPONSIVE_CLASS_LG = 'sky-action-button-container-lg';
|
|
@@ -37,48 +38,52 @@ const BREAKPOINT_LG = 1378;
|
|
|
37
38
|
*/
|
|
38
39
|
class SkyActionButtonAdapterService {
|
|
39
40
|
constructor(rendererFactory) {
|
|
40
|
-
|
|
41
|
+
_SkyActionButtonAdapterService_instances.add(this);
|
|
42
|
+
_SkyActionButtonAdapterService_renderer.set(this, void 0);
|
|
43
|
+
__classPrivateFieldSet(this, _SkyActionButtonAdapterService_renderer, rendererFactory.createRenderer(undefined, null), "f");
|
|
41
44
|
}
|
|
42
45
|
getParentWidth(element) {
|
|
43
46
|
return element.nativeElement.parentNode.getBoundingClientRect().width;
|
|
44
47
|
}
|
|
45
48
|
setResponsiveClass(element, width) {
|
|
46
49
|
const el = element.nativeElement;
|
|
47
|
-
const className = this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
52
|
-
}
|
|
53
|
-
getResponsiveClassName(width) {
|
|
54
|
-
if (width < BREAKPOINT_MD) {
|
|
55
|
-
return RESPONSIVE_CLASS_SM;
|
|
56
|
-
}
|
|
57
|
-
else if (width > BREAKPOINT_MD && width < BREAKPOINT_LG) {
|
|
58
|
-
return RESPONSIVE_CLASS_MD;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return RESPONSIVE_CLASS_LG;
|
|
62
|
-
}
|
|
50
|
+
const className = __classPrivateFieldGet(this, _SkyActionButtonAdapterService_instances, "m", _SkyActionButtonAdapterService_getResponsiveClassName).call(this, width);
|
|
51
|
+
__classPrivateFieldGet(this, _SkyActionButtonAdapterService_renderer, "f").removeClass(el, RESPONSIVE_CLASS_SM);
|
|
52
|
+
__classPrivateFieldGet(this, _SkyActionButtonAdapterService_renderer, "f").removeClass(el, RESPONSIVE_CLASS_MD);
|
|
53
|
+
__classPrivateFieldGet(this, _SkyActionButtonAdapterService_renderer, "f").removeClass(el, RESPONSIVE_CLASS_LG);
|
|
54
|
+
__classPrivateFieldGet(this, _SkyActionButtonAdapterService_renderer, "f").addClass(el, className);
|
|
63
55
|
}
|
|
64
56
|
}
|
|
57
|
+
_SkyActionButtonAdapterService_renderer = new WeakMap(), _SkyActionButtonAdapterService_instances = new WeakSet(), _SkyActionButtonAdapterService_getResponsiveClassName = function _SkyActionButtonAdapterService_getResponsiveClassName(width) {
|
|
58
|
+
if (width < BREAKPOINT_MD) {
|
|
59
|
+
return RESPONSIVE_CLASS_SM;
|
|
60
|
+
}
|
|
61
|
+
else if (width >= BREAKPOINT_MD && width < BREAKPOINT_LG) {
|
|
62
|
+
return RESPONSIVE_CLASS_MD;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return RESPONSIVE_CLASS_LG;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
65
68
|
SkyActionButtonAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
66
69
|
SkyActionButtonAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonAdapterService });
|
|
67
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonAdapterService, decorators: [{
|
|
68
71
|
type: Injectable
|
|
69
72
|
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
70
73
|
|
|
74
|
+
var _SkyActionButtonComponent_changeDetector;
|
|
71
75
|
/**
|
|
72
76
|
* Creates a button to present users with an option to move forward with tasks.
|
|
73
77
|
*/
|
|
74
78
|
class SkyActionButtonComponent {
|
|
75
|
-
constructor(
|
|
76
|
-
this.changeRef = changeRef;
|
|
79
|
+
constructor(changeDetector) {
|
|
77
80
|
this.hidden = false;
|
|
78
81
|
/**
|
|
79
82
|
* Fires when users select the action button.
|
|
80
83
|
*/
|
|
81
84
|
this.actionClick = new EventEmitter();
|
|
85
|
+
_SkyActionButtonComponent_changeDetector.set(this, void 0);
|
|
86
|
+
__classPrivateFieldSet(this, _SkyActionButtonComponent_changeDetector, changeDetector, "f");
|
|
82
87
|
}
|
|
83
88
|
buttonClicked() {
|
|
84
89
|
this.actionClick.emit();
|
|
@@ -90,16 +95,17 @@ class SkyActionButtonComponent {
|
|
|
90
95
|
if (this.hidden === $event.userHasAccess) {
|
|
91
96
|
setTimeout(() => {
|
|
92
97
|
this.hidden = !$event.userHasAccess;
|
|
93
|
-
this.
|
|
98
|
+
__classPrivateFieldGet(this, _SkyActionButtonComponent_changeDetector, "f").markForCheck();
|
|
94
99
|
});
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
}
|
|
103
|
+
_SkyActionButtonComponent_changeDetector = new WeakMap();
|
|
98
104
|
SkyActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonComponent, deps: [{ token: i0.ChangeDetectorRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
-
SkyActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyActionButtonComponent, selector: "sky-action-button", inputs: { permalink: "permalink" }, outputs: { actionClick: "actionClick" }, host: { properties: { "hidden": "this.hidden" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"true\">\n <a\n *ngSwitchCase=\"!!permalink?.route?.commands\"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [fragment]=\"permalink
|
|
105
|
+
SkyActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyActionButtonComponent, selector: "sky-action-button", inputs: { permalink: "permalink" }, outputs: { actionClick: "actionClick" }, host: { properties: { "hidden": "this.hidden" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"true\">\n <a\n *ngSwitchCase=\"!!permalink?.route?.commands\"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [fragment]=\"permalink?.route?.extras?.fragment\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n [queryParams]=\"permalink?.route?.extras?.queryParams\"\n [queryParamsHandling]=\"permalink?.route?.extras?.queryParamsHandling\"\n [routerLink]=\"permalink?.route?.commands\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <a\n *ngSwitchCase=\"\n !permalink?.route &&\n permalink?.url &&\n (!permalink?.url?.includes('://') ||\n permalink?.url?.startsWith('https://'))\n \"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [href]=\"permalink?.url\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <a\n *ngSwitchCase=\"\n !permalink?.route &&\n permalink?.url &&\n permalink?.url?.includes('://') &&\n !permalink?.url?.startsWith('https://')\n \"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [skyHref]=\"permalink?.url\"\n (skyHrefChange)=\"onSkyHrefDisplayChange($event)\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <div\n *ngSwitchDefault\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n role=\"button\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n (click)=\"buttonClicked()\"\n (keydown.enter)=\"enterPress()\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #actionButtonContent>\n <ng-container *skyThemeIf=\"'default'\">\n <div class=\"sky-action-button-icon-header-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"details\"></ng-container>\n </ng-container>\n\n <ng-container *skyThemeIf=\"'modern'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n <div class=\"sky-action-button-content\">\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n <div\n class=\"sky-action-button-details\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"details\"></ng-container>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #icon>\n <ng-content select=\"sky-action-button-icon\"></ng-content>\n</ng-template>\n\n<ng-template #header>\n <ng-content select=\"sky-action-button-header\"></ng-content>\n</ng-template>\n\n<ng-template #details>\n <ng-content select=\"sky-action-button-details\"></ng-content>\n</ng-template>\n", styles: [".sky-action-button{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;cursor:pointer;text-align:center;text-decoration:none!important;display:block}.sky-action-button:hover{border-color:#c2c4c6}.sky-action-button-icon-header-container{display:flex;justify-content:center}.sky-action-button{padding:20px 20px 30px;margin:0 15px}.sky-action-button-icon-header-container{margin-bottom:20px}.sky-responsive-container-xs .sky-action-button,.sky-responsive-container-sm .sky-action-button,.sky-responsive-container-md .sky-action-button,.sky-responsive-container-lg .sky-action-button{padding:20px 20px 30px;margin:0 15px}.sky-responsive-container-xs .sky-action-button-icon-header-container,.sky-responsive-container-sm .sky-action-button-icon-header-container,.sky-responsive-container-md .sky-action-button-icon-header-container,.sky-responsive-container-lg .sky-action-button-icon-header-container{margin-bottom:20px}@media (min-width: 768px){.sky-action-button{padding:30px 20px;margin:0;max-width:236px}.sky-action-button-icon-header-container{margin-bottom:0;flex-direction:column}}.sky-responsive-container-sm .sky-action-button,.sky-responsive-container-md .sky-action-button,.sky-responsive-container-lg .sky-action-button{padding:30px 20px;margin:0;max-width:236px}.sky-responsive-container-sm .sky-action-button-icon-header-container,.sky-responsive-container-md .sky-action-button-icon-header-container,.sky-responsive-container-lg .sky-action-button-icon-header-container{margin-bottom:0;flex-direction:column}.sky-theme-modern .sky-action-button{display:flex;flex-flow:row nowrap;padding:30px;text-align:left;border:none}.sky-theme-modern .sky-action-button .sky-action-button-content{flex:1 1 auto;margin:0 10px 0 0;white-space:initial}.sky-theme-modern .sky-action-button,.sky-theme-modern .sky-responsive-container-xs .sky-action-button,.sky-theme-modern .sky-responsive-container-sm .sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button{padding:30px;margin:0;max-width:446px}@media (min-width: 768px){.sky-theme-modern .sky-action-button{padding:30px;margin:0}}.sky-theme-modern .sky-responsive-container-sm .sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button{padding:30px;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.λ1, selector: "[skyHref]", inputs: ["skyHref", "skyHrefElse"], outputs: ["skyHrefChange"] }, { kind: "directive", type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "directive", type: i1$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
100
106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonComponent, decorators: [{
|
|
101
107
|
type: Component,
|
|
102
|
-
args: [{ selector: 'sky-action-button', encapsulation: ViewEncapsulation.None, template: "<ng-container [ngSwitch]=\"true\">\n <a\n *ngSwitchCase=\"!!permalink?.route?.commands\"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [fragment]=\"permalink
|
|
108
|
+
args: [{ selector: 'sky-action-button', encapsulation: ViewEncapsulation.None, template: "<ng-container [ngSwitch]=\"true\">\n <a\n *ngSwitchCase=\"!!permalink?.route?.commands\"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [fragment]=\"permalink?.route?.extras?.fragment\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n [queryParams]=\"permalink?.route?.extras?.queryParams\"\n [queryParamsHandling]=\"permalink?.route?.extras?.queryParamsHandling\"\n [routerLink]=\"permalink?.route?.commands\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <a\n *ngSwitchCase=\"\n !permalink?.route &&\n permalink?.url &&\n (!permalink?.url?.includes('://') ||\n permalink?.url?.startsWith('https://'))\n \"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [href]=\"permalink?.url\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <a\n *ngSwitchCase=\"\n !permalink?.route &&\n permalink?.url &&\n permalink?.url?.includes('://') &&\n !permalink?.url?.startsWith('https://')\n \"\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n [skyHref]=\"permalink?.url\"\n (skyHrefChange)=\"onSkyHrefDisplayChange($event)\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </a>\n\n <div\n *ngSwitchDefault\n class=\"sky-action-button sky-btn-default sky-rounded-corners\"\n tabindex=\"0\"\n role=\"button\"\n [skyThemeClass]=\"{\n 'sky-btn sky-box': 'modern'\n }\"\n (click)=\"buttonClicked()\"\n (keydown.enter)=\"enterPress()\"\n >\n <ng-container *ngTemplateOutlet=\"actionButtonContent\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #actionButtonContent>\n <ng-container *skyThemeIf=\"'default'\">\n <div class=\"sky-action-button-icon-header-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"details\"></ng-container>\n </ng-container>\n\n <ng-container *skyThemeIf=\"'modern'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n <div class=\"sky-action-button-content\">\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n <div\n class=\"sky-action-button-details\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern'\n }\"\n >\n <ng-container *ngTemplateOutlet=\"details\"></ng-container>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #icon>\n <ng-content select=\"sky-action-button-icon\"></ng-content>\n</ng-template>\n\n<ng-template #header>\n <ng-content select=\"sky-action-button-header\"></ng-content>\n</ng-template>\n\n<ng-template #details>\n <ng-content select=\"sky-action-button-details\"></ng-content>\n</ng-template>\n", styles: [".sky-action-button{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;cursor:pointer;text-align:center;text-decoration:none!important;display:block}.sky-action-button:hover{border-color:#c2c4c6}.sky-action-button-icon-header-container{display:flex;justify-content:center}.sky-action-button{padding:20px 20px 30px;margin:0 15px}.sky-action-button-icon-header-container{margin-bottom:20px}.sky-responsive-container-xs .sky-action-button,.sky-responsive-container-sm .sky-action-button,.sky-responsive-container-md .sky-action-button,.sky-responsive-container-lg .sky-action-button{padding:20px 20px 30px;margin:0 15px}.sky-responsive-container-xs .sky-action-button-icon-header-container,.sky-responsive-container-sm .sky-action-button-icon-header-container,.sky-responsive-container-md .sky-action-button-icon-header-container,.sky-responsive-container-lg .sky-action-button-icon-header-container{margin-bottom:20px}@media (min-width: 768px){.sky-action-button{padding:30px 20px;margin:0;max-width:236px}.sky-action-button-icon-header-container{margin-bottom:0;flex-direction:column}}.sky-responsive-container-sm .sky-action-button,.sky-responsive-container-md .sky-action-button,.sky-responsive-container-lg .sky-action-button{padding:30px 20px;margin:0;max-width:236px}.sky-responsive-container-sm .sky-action-button-icon-header-container,.sky-responsive-container-md .sky-action-button-icon-header-container,.sky-responsive-container-lg .sky-action-button-icon-header-container{margin-bottom:0;flex-direction:column}.sky-theme-modern .sky-action-button{display:flex;flex-flow:row nowrap;padding:30px;text-align:left;border:none}.sky-theme-modern .sky-action-button .sky-action-button-content{flex:1 1 auto;margin:0 10px 0 0;white-space:initial}.sky-theme-modern .sky-action-button,.sky-theme-modern .sky-responsive-container-xs .sky-action-button,.sky-theme-modern .sky-responsive-container-sm .sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button{padding:30px;margin:0;max-width:446px}@media (min-width: 768px){.sky-theme-modern .sky-action-button{padding:30px;margin:0}}.sky-theme-modern .sky-responsive-container-sm .sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button{padding:30px;margin:0}\n"] }]
|
|
103
109
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
104
110
|
type: SkipSelf
|
|
105
111
|
}] }]; }, propDecorators: { hidden: [{
|
|
@@ -111,20 +117,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
111
117
|
type: Output
|
|
112
118
|
}] } });
|
|
113
119
|
|
|
114
|
-
var _SkyActionButtonContainerComponent_viewInitialized;
|
|
120
|
+
var _SkyActionButtonContainerComponent_instances, _SkyActionButtonContainerComponent_ngUnsubscribe, _SkyActionButtonContainerComponent_syncMaxHeightTimeout, _SkyActionButtonContainerComponent_themeName_set, _SkyActionButtonContainerComponent__alignItems, _SkyActionButtonContainerComponent__themeName, _SkyActionButtonContainerComponent_viewInitialized, _SkyActionButtonContainerComponent_actionButtonAdapterService, _SkyActionButtonContainerComponent_changeDetector, _SkyActionButtonContainerComponent_coreAdapterService, _SkyActionButtonContainerComponent_hostElRef, _SkyActionButtonContainerComponent_themeSvc, _SkyActionButtonContainerComponent_updateHeight, _SkyActionButtonContainerComponent_updateResponsiveClass;
|
|
115
121
|
/**
|
|
116
122
|
* Wraps action buttons to ensures that they have consistent height and spacing.
|
|
117
123
|
* @required
|
|
118
124
|
*/
|
|
119
125
|
class SkyActionButtonContainerComponent {
|
|
120
|
-
constructor(actionButtonAdapterService,
|
|
121
|
-
this
|
|
122
|
-
this
|
|
123
|
-
this
|
|
124
|
-
this
|
|
125
|
-
this
|
|
126
|
-
this.ngUnsubscribe = new Subject();
|
|
126
|
+
constructor(actionButtonAdapterService, changeDetector, coreAdapterService, hostElRef, themeSvc) {
|
|
127
|
+
_SkyActionButtonContainerComponent_instances.add(this);
|
|
128
|
+
_SkyActionButtonContainerComponent_ngUnsubscribe.set(this, new Subject());
|
|
129
|
+
_SkyActionButtonContainerComponent_syncMaxHeightTimeout.set(this, void 0);
|
|
130
|
+
_SkyActionButtonContainerComponent__alignItems.set(this, 'center');
|
|
131
|
+
_SkyActionButtonContainerComponent__themeName.set(this, void 0);
|
|
127
132
|
_SkyActionButtonContainerComponent_viewInitialized.set(this, false);
|
|
133
|
+
_SkyActionButtonContainerComponent_actionButtonAdapterService.set(this, void 0);
|
|
134
|
+
_SkyActionButtonContainerComponent_changeDetector.set(this, void 0);
|
|
135
|
+
_SkyActionButtonContainerComponent_coreAdapterService.set(this, void 0);
|
|
136
|
+
_SkyActionButtonContainerComponent_hostElRef.set(this, void 0);
|
|
137
|
+
_SkyActionButtonContainerComponent_themeSvc.set(this, void 0);
|
|
138
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_actionButtonAdapterService, actionButtonAdapterService, "f");
|
|
139
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_changeDetector, changeDetector, "f");
|
|
140
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_coreAdapterService, coreAdapterService, "f");
|
|
141
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_hostElRef, hostElRef, "f");
|
|
142
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_themeSvc, themeSvc, "f");
|
|
128
143
|
}
|
|
129
144
|
/**
|
|
130
145
|
* Specifies how to display the action buttons inside the action button container.
|
|
@@ -132,29 +147,24 @@ class SkyActionButtonContainerComponent {
|
|
|
132
147
|
* @default "center"
|
|
133
148
|
*/
|
|
134
149
|
set alignItems(value) {
|
|
135
|
-
this
|
|
150
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent__alignItems, value ?? 'center', "f");
|
|
136
151
|
}
|
|
137
152
|
get alignItems() {
|
|
138
|
-
return this
|
|
139
|
-
}
|
|
140
|
-
set themeName(value) {
|
|
141
|
-
this._themeName = value;
|
|
142
|
-
this.updateResponsiveClass();
|
|
143
|
-
this.updateHeight();
|
|
153
|
+
return __classPrivateFieldGet(this, _SkyActionButtonContainerComponent__alignItems, "f");
|
|
144
154
|
}
|
|
145
155
|
ngOnInit() {
|
|
146
156
|
/* istanbul ignore else */
|
|
147
|
-
if (this
|
|
148
|
-
this.
|
|
149
|
-
.pipe(takeUntil(this
|
|
157
|
+
if (__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_themeSvc, "f")) {
|
|
158
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_themeSvc, "f").settingsChange
|
|
159
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_ngUnsubscribe, "f")))
|
|
150
160
|
.subscribe((themeSettings) => {
|
|
151
|
-
this
|
|
152
|
-
this.
|
|
161
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_instances, themeSettings.currentSettings.theme.name, "a", _SkyActionButtonContainerComponent_themeName_set);
|
|
162
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_changeDetector, "f").markForCheck();
|
|
153
163
|
});
|
|
154
164
|
}
|
|
155
165
|
// Wait for children components to complete rendering before container width is determined.
|
|
156
166
|
setTimeout(() => {
|
|
157
|
-
this.
|
|
167
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateResponsiveClass).call(this);
|
|
158
168
|
});
|
|
159
169
|
}
|
|
160
170
|
ngAfterViewInit() {
|
|
@@ -162,51 +172,55 @@ class SkyActionButtonContainerComponent {
|
|
|
162
172
|
/* istanbul ignore else */
|
|
163
173
|
if (this.actionButtons) {
|
|
164
174
|
this.actionButtons.changes
|
|
165
|
-
.pipe(takeUntil(this
|
|
175
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_ngUnsubscribe, "f")))
|
|
166
176
|
.subscribe(() => {
|
|
167
|
-
this.
|
|
177
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateHeight).call(this);
|
|
168
178
|
});
|
|
169
179
|
}
|
|
170
180
|
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_viewInitialized, true, "f");
|
|
171
|
-
this.
|
|
181
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateHeight).call(this);
|
|
172
182
|
}
|
|
173
183
|
ngOnDestroy() {
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
184
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_ngUnsubscribe, "f").next();
|
|
185
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_ngUnsubscribe, "f").complete();
|
|
176
186
|
}
|
|
177
187
|
onContentChange() {
|
|
178
|
-
this.
|
|
188
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateHeight).call(this);
|
|
179
189
|
}
|
|
180
190
|
onWindowResize() {
|
|
181
|
-
this.
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
191
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateResponsiveClass).call(this);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
_SkyActionButtonContainerComponent_ngUnsubscribe = new WeakMap(), _SkyActionButtonContainerComponent_syncMaxHeightTimeout = new WeakMap(), _SkyActionButtonContainerComponent__alignItems = new WeakMap(), _SkyActionButtonContainerComponent__themeName = new WeakMap(), _SkyActionButtonContainerComponent_viewInitialized = new WeakMap(), _SkyActionButtonContainerComponent_actionButtonAdapterService = new WeakMap(), _SkyActionButtonContainerComponent_changeDetector = new WeakMap(), _SkyActionButtonContainerComponent_coreAdapterService = new WeakMap(), _SkyActionButtonContainerComponent_hostElRef = new WeakMap(), _SkyActionButtonContainerComponent_themeSvc = new WeakMap(), _SkyActionButtonContainerComponent_instances = new WeakSet(), _SkyActionButtonContainerComponent_themeName_set = function _SkyActionButtonContainerComponent_themeName_set(value) {
|
|
195
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent__themeName, value, "f");
|
|
196
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateResponsiveClass).call(this);
|
|
197
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateHeight).call(this);
|
|
198
|
+
}, _SkyActionButtonContainerComponent_updateHeight = function _SkyActionButtonContainerComponent_updateHeight(delay = 0) {
|
|
199
|
+
const ref = this.containerRef;
|
|
200
|
+
if (ref && __classPrivateFieldGet(this, _SkyActionButtonContainerComponent_viewInitialized, "f")) {
|
|
201
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_coreAdapterService, "f").resetHeight(ref, '.sky-action-button');
|
|
202
|
+
if (__classPrivateFieldGet(this, _SkyActionButtonContainerComponent__themeName, "f") === 'modern') {
|
|
203
|
+
// Wait for children components to complete rendering before height is determined.
|
|
204
|
+
clearTimeout(__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_syncMaxHeightTimeout, "f"));
|
|
205
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_syncMaxHeightTimeout, setTimeout(() => {
|
|
206
|
+
const selector = '.sky-action-button:not([hidden])';
|
|
207
|
+
const button = ref.nativeElement.querySelector(selector);
|
|
208
|
+
if (button && button.offsetHeight > 0) {
|
|
209
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_coreAdapterService, "f").syncMaxHeight(ref, selector);
|
|
210
|
+
}
|
|
211
|
+
else if (delay < 200) {
|
|
212
|
+
// Wait progressively longer between retries.
|
|
213
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_instances, "m", _SkyActionButtonContainerComponent_updateHeight).call(this, delay + 50);
|
|
214
|
+
}
|
|
215
|
+
}, delay), "f");
|
|
202
216
|
}
|
|
203
217
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
this.
|
|
218
|
+
}, _SkyActionButtonContainerComponent_updateResponsiveClass = function _SkyActionButtonContainerComponent_updateResponsiveClass() {
|
|
219
|
+
if (this.containerRef) {
|
|
220
|
+
const parentWidth = __classPrivateFieldGet(this, _SkyActionButtonContainerComponent_actionButtonAdapterService, "f").getParentWidth(__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_hostElRef, "f"));
|
|
221
|
+
__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_actionButtonAdapterService, "f").setResponsiveClass(this.containerRef, parentWidth);
|
|
207
222
|
}
|
|
208
|
-
}
|
|
209
|
-
_SkyActionButtonContainerComponent_viewInitialized = new WeakMap();
|
|
223
|
+
};
|
|
210
224
|
SkyActionButtonContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonContainerComponent, deps: [{ token: SkyActionButtonAdapterService }, { token: i0.ChangeDetectorRef }, { token: i1$2.SkyCoreAdapterService }, { token: i0.ElementRef }, { token: i1$1.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
211
225
|
SkyActionButtonContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyActionButtonContainerComponent, selector: "sky-action-button-container", inputs: { alignItems: "alignItems" }, host: { listeners: { "window:resize": "onWindowResize()" } }, providers: [SkyActionButtonAdapterService], queries: [{ propertyName: "actionButtons", predicate: SkyActionButtonComponent }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"sky-action-button-container\" #container>\n <div\n class=\"sky-action-button-flex\"\n [ngClass]=\"{\n 'sky-action-button-flex-align-left': alignItems === 'left',\n 'sky-action-button-flex-align-center': alignItems === 'center'\n }\"\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:block}.sky-action-button-flex sky-action-button{display:block}.sky-action-button-flex .sky-action-button{height:100%;min-width:236px;margin-left:10px;margin-right:10px}.sky-action-button-flex{display:block;padding:0}.sky-action-button-flex sky-action-button{margin:20px 0}.sky-responsive-container-xs .sky-action-button-flex,.sky-responsive-container-sm .sky-action-button-flex,.sky-responsive-container-md .sky-action-button-flex,.sky-responsive-container-lg .sky-action-button-flex{display:block;padding:0}.sky-responsive-container-xs .sky-action-button-flex sky-action-button,.sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:20px 0}@media (min-width: 768px){.sky-action-button-flex{display:flex;flex-flow:row wrap;padding:10px 0}.sky-action-button-flex.sky-action-button-flex-align-center{justify-content:center}.sky-action-button-flex.sky-action-button-flex-align-left{justify-content:flex-start}.sky-action-button-flex sky-action-button{margin:10px 0}}.sky-responsive-container-sm .sky-action-button-flex,.sky-responsive-container-md .sky-action-button-flex,.sky-responsive-container-lg .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:10px 0}.sky-responsive-container-sm .sky-action-button-flex.sky-action-button-flex-align-center,.sky-responsive-container-md .sky-action-button-flex.sky-action-button-flex-align-center,.sky-responsive-container-lg .sky-action-button-flex.sky-action-button-flex-align-center{justify-content:center}.sky-responsive-container-sm .sky-action-button-flex.sky-action-button-flex-align-left,.sky-responsive-container-md .sky-action-button-flex.sky-action-button-flex-align-left,.sky-responsive-container-lg .sky-action-button-flex.sky-action-button-flex-align-left{justify-content:flex-start}.sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:10px 0}.sky-theme-modern .sky-action-button-container{margin:0 auto}.sky-theme-modern .sky-action-button-container.sky-action-button-container-sm{max-width:446px}.sky-theme-modern .sky-action-button-container.sky-action-button-container-md{max-width:912px}.sky-theme-modern .sky-action-button-container.sky-action-button-container-lg{max-width:1378px}.sky-theme-modern .sky-action-button-container .sky-action-button-flex .sky-action-button{height:auto;min-width:auto;margin:0}.sky-theme-modern .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:0;margin:0 0 -20px -20px}.sky-theme-modern .sky-action-button-flex sky-action-button{margin:0 0 20px 20px;flex:0 1 446px}.sky-theme-modern .sky-responsive-container-xs .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-sm .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-md .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-lg .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:0;margin:0 0 -20px -20px}.sky-theme-modern .sky-responsive-container-xs .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:0 0 20px 20px;flex:0 1 446px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
212
226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonContainerComponent, decorators: [{
|
|
@@ -254,6 +268,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
254
268
|
args: [{ selector: 'sky-action-button-header', template: "<div\n class=\"sky-action-button-header\"\n [skyThemeClass]=\"{\n 'sky-headline': 'modern',\n 'sky-section-heading': 'default'\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host .sky-action-button-header{margin:0 5px}:host-context(.sky-responsive-container-xs) .sky-action-button-header,:host-context(.sky-responsive-container-sm) .sky-action-button-header,:host-context(.sky-responsive-container-md) .sky-action-button-header,:host-context(.sky-responsive-container-lg) .sky-action-button-header{margin:0 5px}@media (min-width: 768px){:host .sky-action-button-header{margin:0 0 20px}}:host-context(.sky-responsive-container-sm) .sky-action-button-header,:host-context(.sky-responsive-container-md) .sky-action-button-header,:host-context(.sky-responsive-container-lg) .sky-action-button-header{margin:0 0 20px}:host-context(.sky-theme-modern) .sky-action-button-header{margin:0 0 10px}.sky-theme-modern .sky-action-button-header{margin:0 0 10px}\n"] }]
|
|
255
269
|
}] });
|
|
256
270
|
|
|
271
|
+
var _SkyActionButtonIconComponent_subscription;
|
|
257
272
|
const FONTSIZECLASS_SMALL = '2x';
|
|
258
273
|
const FONTSIZECLASS_LARGE = '3x';
|
|
259
274
|
/**
|
|
@@ -261,25 +276,26 @@ const FONTSIZECLASS_LARGE = '3x';
|
|
|
261
276
|
*/
|
|
262
277
|
class SkyActionButtonIconComponent {
|
|
263
278
|
constructor(mediaQueryService) {
|
|
264
|
-
this.mediaQueryService = mediaQueryService;
|
|
265
279
|
this.fontSizeClass = FONTSIZECLASS_LARGE;
|
|
266
|
-
this
|
|
280
|
+
_SkyActionButtonIconComponent_subscription.set(this, void 0);
|
|
281
|
+
__classPrivateFieldSet(this, _SkyActionButtonIconComponent_subscription, mediaQueryService.subscribe((args) => {
|
|
267
282
|
if (args === SkyMediaBreakpoints.xs) {
|
|
268
283
|
this.fontSizeClass = FONTSIZECLASS_SMALL;
|
|
269
284
|
}
|
|
270
285
|
else {
|
|
271
286
|
this.fontSizeClass = FONTSIZECLASS_LARGE;
|
|
272
287
|
}
|
|
273
|
-
});
|
|
288
|
+
}), "f");
|
|
274
289
|
}
|
|
275
290
|
ngOnDestroy() {
|
|
276
291
|
/* istanbul ignore else */
|
|
277
292
|
/* sanity check */
|
|
278
|
-
if (this
|
|
279
|
-
this.
|
|
293
|
+
if (__classPrivateFieldGet(this, _SkyActionButtonIconComponent_subscription, "f")) {
|
|
294
|
+
__classPrivateFieldGet(this, _SkyActionButtonIconComponent_subscription, "f").unsubscribe();
|
|
280
295
|
}
|
|
281
296
|
}
|
|
282
297
|
}
|
|
298
|
+
_SkyActionButtonIconComponent_subscription = new WeakMap();
|
|
283
299
|
SkyActionButtonIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonIconComponent, deps: [{ token: i1$2.SkyMediaQueryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
284
300
|
SkyActionButtonIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyActionButtonIconComponent, selector: "sky-action-button-icon", inputs: { iconType: "iconType" }, ngImport: i0, template: "<div aria-hidden=\"true\" class=\"sky-action-button-icon-container\">\n <sky-icon\n class=\"sky-action-button-icon\"\n [icon]=\"iconType\"\n [size]=\"fontSizeClass\"\n ></sky-icon>\n</div>\n", styles: [":host .sky-action-button-icon-container{margin:0 5px}:host-context(.sky-responsive-container-xs) .sky-action-button-icon-container,:host-context(.sky-responsive-container-sm) .sky-action-button-icon-container,:host-context(.sky-responsive-container-md) .sky-action-button-icon-container,:host-context(.sky-responsive-container-lg) .sky-action-button-icon-container{margin:0 5px}@media (min-width: 768px){:host .sky-action-button-icon-container{margin:0 0 20px}}:host-context(.sky-responsive-container-sm) .sky-action-button-icon-container,:host-context(.sky-responsive-container-md) .sky-action-button-icon-container,:host-context(.sky-responsive-container-lg) .sky-action-button-icon-container{margin:0 0 20px}.sky-action-button-icon{color:#0974a1}:host-context(.sky-theme-modern) .sky-action-button-icon-container{color:#0974a1;background:#e8f8ff;margin:0 20px 0 0;border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}:host-context(.sky-theme-modern) .sky-action-button-icon-container ::ng-deep .sky-icon{font-size:24px!important}.sky-theme-modern .sky-action-button-icon-container{color:#0974a1;background:#e8f8ff;margin:0 20px 0 0;border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.sky-theme-modern .sky-action-button-icon-container ::ng-deep .sky-icon{font-size:24px!important}\n"], dependencies: [{ kind: "component", type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }] });
|
|
285
301
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyActionButtonIconComponent, decorators: [{
|
|
@@ -397,21 +413,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
397
413
|
}]
|
|
398
414
|
}] });
|
|
399
415
|
|
|
416
|
+
var _SkyBackToTopComponent__scrollToTopClick;
|
|
400
417
|
/**
|
|
401
418
|
* @internal
|
|
402
419
|
*/
|
|
403
420
|
class SkyBackToTopComponent {
|
|
404
421
|
constructor() {
|
|
405
|
-
this
|
|
422
|
+
_SkyBackToTopComponent__scrollToTopClick.set(this, new Subject());
|
|
406
423
|
}
|
|
407
424
|
get scrollToTopClick() {
|
|
408
|
-
return this.
|
|
425
|
+
return __classPrivateFieldGet(this, _SkyBackToTopComponent__scrollToTopClick, "f").asObservable();
|
|
409
426
|
}
|
|
410
427
|
onScrollToTopClick() {
|
|
411
|
-
this.
|
|
412
|
-
this.
|
|
428
|
+
__classPrivateFieldGet(this, _SkyBackToTopComponent__scrollToTopClick, "f").next();
|
|
429
|
+
__classPrivateFieldGet(this, _SkyBackToTopComponent__scrollToTopClick, "f").complete();
|
|
413
430
|
}
|
|
414
431
|
}
|
|
432
|
+
_SkyBackToTopComponent__scrollToTopClick = new WeakMap();
|
|
415
433
|
SkyBackToTopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
416
434
|
SkyBackToTopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyBackToTopComponent, selector: "sky-back-to-top", ngImport: i0, template: "<div class=\"sky-back-to-top sky-padding-squish-large\">\n <button\n class=\"sky-btn sky-btn-link-inline\"\n type=\"button\"\n (click)=\"onScrollToTopClick()\"\n >\n {{ 'skyux_back_to_top' | skyLibResources }}\n </button>\n</div>\n", styles: [".sky-back-to-top{display:flex;align-items:center;width:100%;background-color:#fff;box-shadow:0 -3px 3px #cdcfd2}\n"], dependencies: [{ kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
417
435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopComponent, decorators: [{
|
|
@@ -419,32 +437,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
419
437
|
args: [{ selector: 'sky-back-to-top', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-back-to-top sky-padding-squish-large\">\n <button\n class=\"sky-btn sky-btn-link-inline\"\n type=\"button\"\n (click)=\"onScrollToTopClick()\"\n >\n {{ 'skyux_back_to_top' | skyLibResources }}\n </button>\n</div>\n", styles: [".sky-back-to-top{display:flex;align-items:center;width:100%;background-color:#fff;box-shadow:0 -3px 3px #cdcfd2}\n"] }]
|
|
420
438
|
}] });
|
|
421
439
|
|
|
440
|
+
var _SkyBackToTopDomAdapterService_ngUnsubscribe, _SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe, _SkyBackToTopDomAdapterService_scrollableHostService, _SkyBackToTopDomAdapterService_windowRef;
|
|
422
441
|
/**
|
|
423
442
|
* @internal
|
|
424
443
|
*/
|
|
425
444
|
class SkyBackToTopDomAdapterService {
|
|
426
445
|
constructor(windowRef, scrollableHostService) {
|
|
427
|
-
this
|
|
428
|
-
this
|
|
429
|
-
this
|
|
430
|
-
this
|
|
446
|
+
_SkyBackToTopDomAdapterService_ngUnsubscribe.set(this, new Subject());
|
|
447
|
+
_SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe.set(this, new Subject());
|
|
448
|
+
_SkyBackToTopDomAdapterService_scrollableHostService.set(this, void 0);
|
|
449
|
+
_SkyBackToTopDomAdapterService_windowRef.set(this, void 0);
|
|
450
|
+
__classPrivateFieldSet(this, _SkyBackToTopDomAdapterService_windowRef, windowRef, "f");
|
|
451
|
+
__classPrivateFieldSet(this, _SkyBackToTopDomAdapterService_scrollableHostService, scrollableHostService, "f");
|
|
431
452
|
}
|
|
432
453
|
ngOnDestroy() {
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
435
|
-
this.
|
|
436
|
-
this.
|
|
454
|
+
__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_ngUnsubscribe, "f").next();
|
|
455
|
+
__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_ngUnsubscribe, "f").complete();
|
|
456
|
+
__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe, "f").next();
|
|
457
|
+
__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe, "f").complete();
|
|
437
458
|
}
|
|
438
459
|
/**
|
|
439
460
|
* This event returns a boolean on scroll indicating whether the provided element is in view.
|
|
440
461
|
* @param elementRef The target element reference.
|
|
441
462
|
*/
|
|
442
463
|
elementInViewOnScroll(elementRef) {
|
|
443
|
-
const scrollableHostObservable = this.
|
|
464
|
+
const scrollableHostObservable = __classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostService, "f").watchScrollableHostScrollEvents(elementRef);
|
|
444
465
|
const isInitiallyInView = this.isElementScrolledInView(elementRef);
|
|
445
466
|
const returnedObservable = new BehaviorSubject(isInitiallyInView);
|
|
446
467
|
scrollableHostObservable
|
|
447
|
-
.pipe(takeUntil(this
|
|
468
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe, "f")))
|
|
448
469
|
.subscribe(() => {
|
|
449
470
|
const isInView = this.isElementScrolledInView(elementRef);
|
|
450
471
|
returnedObservable.next(isInView);
|
|
@@ -461,12 +482,12 @@ class SkyBackToTopDomAdapterService {
|
|
|
461
482
|
if (!elementRef || !elementRef.nativeElement) {
|
|
462
483
|
return;
|
|
463
484
|
}
|
|
464
|
-
const scrollableHost = this.
|
|
485
|
+
const scrollableHost = __classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostService, "f").getScrollableHost(elementRef);
|
|
465
486
|
if (scrollableHost instanceof Window) {
|
|
466
487
|
// Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.
|
|
467
488
|
const bodyMarginOffset = parseInt(getComputedStyle(document.body).marginTop, 10);
|
|
468
489
|
const newOffsetTop = elementRef.nativeElement.offsetTop - bodyMarginOffset;
|
|
469
|
-
this.
|
|
490
|
+
__classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_windowRef, "f").nativeWindow.scrollTo(elementRef.nativeElement.offsetLeft, newOffsetTop);
|
|
470
491
|
}
|
|
471
492
|
else {
|
|
472
493
|
// Scroll to top of parent element.
|
|
@@ -475,13 +496,12 @@ class SkyBackToTopDomAdapterService {
|
|
|
475
496
|
}
|
|
476
497
|
}
|
|
477
498
|
isElementScrolledInView(element) {
|
|
478
|
-
const parentElement = this.
|
|
499
|
+
const parentElement = __classPrivateFieldGet(this, _SkyBackToTopDomAdapterService_scrollableHostService, "f").getScrollableHost(element);
|
|
479
500
|
if (!element.nativeElement.offsetParent) {
|
|
480
501
|
return true;
|
|
481
502
|
}
|
|
482
503
|
const buffer = 25;
|
|
483
504
|
const elementRect = element.nativeElement.getBoundingClientRect();
|
|
484
|
-
/* istanbul ignore else */
|
|
485
505
|
if (parentElement instanceof HTMLElement) {
|
|
486
506
|
const parentRect = parentElement.getBoundingClientRect();
|
|
487
507
|
return elementRect.top > parentRect.top - buffer;
|
|
@@ -491,6 +511,7 @@ class SkyBackToTopDomAdapterService {
|
|
|
491
511
|
}
|
|
492
512
|
}
|
|
493
513
|
}
|
|
514
|
+
_SkyBackToTopDomAdapterService_ngUnsubscribe = new WeakMap(), _SkyBackToTopDomAdapterService_scrollableHostScrollEventUnsubscribe = new WeakMap(), _SkyBackToTopDomAdapterService_scrollableHostService = new WeakMap(), _SkyBackToTopDomAdapterService_windowRef = new WeakMap();
|
|
494
515
|
SkyBackToTopDomAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopDomAdapterService, deps: [{ token: i1$2.SkyAppWindowRef }, { token: i1$2.SkyScrollableHostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
495
516
|
SkyBackToTopDomAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopDomAdapterService });
|
|
496
517
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopDomAdapterService, decorators: [{
|
|
@@ -508,96 +529,100 @@ var SkyBackToTopMessageType;
|
|
|
508
529
|
SkyBackToTopMessageType[SkyBackToTopMessageType["BackToTop"] = 0] = "BackToTop";
|
|
509
530
|
})(SkyBackToTopMessageType || (SkyBackToTopMessageType = {}));
|
|
510
531
|
|
|
532
|
+
var _SkyBackToTopDirective_instances, _SkyBackToTopDirective_buttonHidden, _SkyBackToTopDirective_dockItem, _SkyBackToTopDirective_dockService, _SkyBackToTopDirective_domAdapter, _SkyBackToTopDirective_elementInView, _SkyBackToTopDirective_elementRef, _SkyBackToTopDirective_ngUnsubscribe, _SkyBackToTopDirective__skyBackToTopMessageStream, _SkyBackToTopDirective_handleBackToTopButton, _SkyBackToTopDirective_addBackToTop, _SkyBackToTopDirective_handleIncomingMessages, _SkyBackToTopDirective_setBackToTopListeners, _SkyBackToTopDirective_destroyBackToTop;
|
|
511
533
|
/**
|
|
512
534
|
* Associates a button with an element on the page and displays that button
|
|
513
535
|
* to return to the element after users scroll away.
|
|
514
536
|
*/
|
|
515
537
|
class SkyBackToTopDirective {
|
|
516
|
-
constructor(dockService, domAdapter,
|
|
517
|
-
this
|
|
518
|
-
this
|
|
519
|
-
this
|
|
520
|
-
this
|
|
521
|
-
this
|
|
538
|
+
constructor(dockService, domAdapter, elementRef) {
|
|
539
|
+
_SkyBackToTopDirective_instances.add(this);
|
|
540
|
+
_SkyBackToTopDirective_buttonHidden.set(this, false);
|
|
541
|
+
_SkyBackToTopDirective_dockItem.set(this, void 0);
|
|
542
|
+
_SkyBackToTopDirective_dockService.set(this, void 0);
|
|
543
|
+
_SkyBackToTopDirective_domAdapter.set(this, void 0);
|
|
544
|
+
_SkyBackToTopDirective_elementInView.set(this, false);
|
|
545
|
+
_SkyBackToTopDirective_elementRef.set(this, void 0);
|
|
546
|
+
_SkyBackToTopDirective_ngUnsubscribe.set(this, new Subject());
|
|
547
|
+
_SkyBackToTopDirective__skyBackToTopMessageStream.set(this, void 0);
|
|
548
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_dockService, dockService, "f");
|
|
549
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_domAdapter, domAdapter, "f");
|
|
550
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_elementRef, elementRef, "f");
|
|
522
551
|
}
|
|
523
552
|
/**
|
|
524
553
|
* Specifies configuration options for the back to top component.
|
|
525
554
|
*/
|
|
526
555
|
set skyBackToTop(value) {
|
|
527
|
-
this
|
|
528
|
-
this.
|
|
556
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_buttonHidden, !!value?.buttonHidden, "f");
|
|
557
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_handleBackToTopButton).call(this, __classPrivateFieldGet(this, _SkyBackToTopDirective_elementInView, "f"));
|
|
529
558
|
}
|
|
530
559
|
/**
|
|
531
560
|
* Provides an observable to send commands to the back to top component.
|
|
532
561
|
* The commands respect the `SkyBackToTopMessage` type.
|
|
533
562
|
*/
|
|
534
563
|
set skyBackToTopMessageStream(value) {
|
|
535
|
-
if (this
|
|
536
|
-
this.
|
|
564
|
+
if (__classPrivateFieldGet(this, _SkyBackToTopDirective__skyBackToTopMessageStream, "f")) {
|
|
565
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective__skyBackToTopMessageStream, "f").unsubscribe();
|
|
537
566
|
}
|
|
538
|
-
this
|
|
539
|
-
this
|
|
540
|
-
|
|
541
|
-
.subscribe((message) => this.
|
|
567
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective__skyBackToTopMessageStream, value, "f");
|
|
568
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective__skyBackToTopMessageStream, "f")
|
|
569
|
+
?.pipe(takeUntil(__classPrivateFieldGet(this, _SkyBackToTopDirective_ngUnsubscribe, "f")))
|
|
570
|
+
.subscribe((message) => __classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_handleIncomingMessages).call(this, message));
|
|
542
571
|
}
|
|
543
572
|
ngAfterViewInit() {
|
|
544
|
-
this
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
573
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_elementInView, __classPrivateFieldGet(this, _SkyBackToTopDirective_domAdapter, "f").isElementScrolledInView(__classPrivateFieldGet(this, _SkyBackToTopDirective_elementRef, "f")), "f");
|
|
574
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_handleBackToTopButton).call(this, __classPrivateFieldGet(this, _SkyBackToTopDirective_elementInView, "f"));
|
|
575
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_setBackToTopListeners).call(this);
|
|
547
576
|
}
|
|
548
577
|
ngOnDestroy() {
|
|
549
|
-
if (this
|
|
550
|
-
this.
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
578
|
+
if (__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f")) {
|
|
579
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f").destroy();
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
_SkyBackToTopDirective_buttonHidden = new WeakMap(), _SkyBackToTopDirective_dockItem = new WeakMap(), _SkyBackToTopDirective_dockService = new WeakMap(), _SkyBackToTopDirective_domAdapter = new WeakMap(), _SkyBackToTopDirective_elementInView = new WeakMap(), _SkyBackToTopDirective_elementRef = new WeakMap(), _SkyBackToTopDirective_ngUnsubscribe = new WeakMap(), _SkyBackToTopDirective__skyBackToTopMessageStream = new WeakMap(), _SkyBackToTopDirective_instances = new WeakSet(), _SkyBackToTopDirective_handleBackToTopButton = function _SkyBackToTopDirective_handleBackToTopButton(elementInView) {
|
|
584
|
+
// Add back to top button if user scrolls down and button is not hidden.
|
|
585
|
+
if (!__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f") &&
|
|
586
|
+
elementInView !== undefined &&
|
|
587
|
+
!elementInView &&
|
|
588
|
+
!__classPrivateFieldGet(this, _SkyBackToTopDirective_buttonHidden, "f")) {
|
|
589
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_addBackToTop).call(this);
|
|
590
|
+
}
|
|
591
|
+
// Remove back to top button if user scrolls back up.
|
|
592
|
+
if (elementInView || __classPrivateFieldGet(this, _SkyBackToTopDirective_buttonHidden, "f")) {
|
|
593
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_destroyBackToTop).call(this);
|
|
594
|
+
}
|
|
595
|
+
}, _SkyBackToTopDirective_addBackToTop = function _SkyBackToTopDirective_addBackToTop() {
|
|
596
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_dockItem, __classPrivateFieldGet(this, _SkyBackToTopDirective_dockService, "f").insertComponent(SkyBackToTopComponent), "f");
|
|
597
|
+
// Listen for clicks on the "back to top" button so we know when to scroll up.
|
|
598
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f").componentInstance.scrollToTopClick
|
|
599
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyBackToTopDirective_ngUnsubscribe, "f")))
|
|
600
|
+
.subscribe(() => {
|
|
601
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_domAdapter, "f").scrollToElement(__classPrivateFieldGet(this, _SkyBackToTopDirective_elementRef, "f"));
|
|
602
|
+
});
|
|
603
|
+
}, _SkyBackToTopDirective_handleIncomingMessages = function _SkyBackToTopDirective_handleIncomingMessages(message) {
|
|
604
|
+
/* istanbul ignore else */
|
|
605
|
+
if (message.type === SkyBackToTopMessageType.BackToTop) {
|
|
606
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_domAdapter, "f").scrollToElement(__classPrivateFieldGet(this, _SkyBackToTopDirective_elementRef, "f"));
|
|
607
|
+
}
|
|
608
|
+
}, _SkyBackToTopDirective_setBackToTopListeners = function _SkyBackToTopDirective_setBackToTopListeners() {
|
|
609
|
+
/* istanbul ignore else */
|
|
610
|
+
if (__classPrivateFieldGet(this, _SkyBackToTopDirective_elementRef, "f")) {
|
|
611
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_domAdapter, "f")
|
|
612
|
+
.elementInViewOnScroll(__classPrivateFieldGet(this, _SkyBackToTopDirective_elementRef, "f"))
|
|
613
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyBackToTopDirective_ngUnsubscribe, "f")))
|
|
614
|
+
.subscribe((elementInView) => {
|
|
615
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_elementInView, elementInView, "f");
|
|
616
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_instances, "m", _SkyBackToTopDirective_handleBackToTopButton).call(this, elementInView);
|
|
573
617
|
});
|
|
574
618
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
619
|
+
}, _SkyBackToTopDirective_destroyBackToTop = function _SkyBackToTopDirective_destroyBackToTop() {
|
|
620
|
+
/* istanbul ignore else */
|
|
621
|
+
if (__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f")) {
|
|
622
|
+
__classPrivateFieldGet(this, _SkyBackToTopDirective_dockItem, "f").destroy();
|
|
623
|
+
__classPrivateFieldSet(this, _SkyBackToTopDirective_dockItem, undefined, "f");
|
|
580
624
|
}
|
|
581
|
-
|
|
582
|
-
/* istanbul ignore else */
|
|
583
|
-
if (this.element) {
|
|
584
|
-
this.domAdapter
|
|
585
|
-
.elementInViewOnScroll(this.element)
|
|
586
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
587
|
-
.subscribe((elementInView) => {
|
|
588
|
-
this.elementInView = elementInView;
|
|
589
|
-
this.handleBackToTopButton(elementInView);
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
destroyBackToTop() {
|
|
594
|
-
/* istanbul ignore else */
|
|
595
|
-
if (this.dockItem) {
|
|
596
|
-
this.dockItem.destroy();
|
|
597
|
-
this.dockItem = undefined;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
625
|
+
};
|
|
601
626
|
SkyBackToTopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopDirective, deps: [{ token: i1$2.SkyDockService }, { token: SkyBackToTopDomAdapterService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
602
627
|
SkyBackToTopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: SkyBackToTopDirective, selector: "[skyBackToTop]", inputs: { skyBackToTop: "skyBackToTop", skyBackToTopMessageStream: "skyBackToTopMessageStream" }, providers: [SkyBackToTopDomAdapterService], ngImport: i0 });
|
|
603
628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyBackToTopDirective, decorators: [{
|
|
@@ -2705,8 +2730,8 @@ class SkyToolbarComponent {
|
|
|
2705
2730
|
constructor() {
|
|
2706
2731
|
this.hasSections = false;
|
|
2707
2732
|
}
|
|
2708
|
-
|
|
2709
|
-
this.hasSections =
|
|
2733
|
+
set sectionComponents(value) {
|
|
2734
|
+
this.hasSections = !!value && value.length > 0;
|
|
2710
2735
|
}
|
|
2711
2736
|
}
|
|
2712
2737
|
SkyToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|