@skyux/layout 8.7.2 → 9.0.0-alpha.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 +228 -228
- package/esm2022/lib/modules/action-button/action-button-adapter-service.mjs +44 -0
- package/esm2022/lib/modules/action-button/action-button-container.component.mjs +138 -0
- package/{esm2020 → esm2022}/lib/modules/action-button/action-button-details.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/action-button/action-button-header.component.mjs +4 -4
- package/esm2022/lib/modules/action-button/action-button-icon.component.mjs +40 -0
- package/esm2022/lib/modules/action-button/action-button.component.mjs +50 -0
- package/{esm2020 → esm2022}/lib/modules/action-button/action-button.module.mjs +23 -23
- package/{esm2020 → esm2022}/lib/modules/back-to-top/back-to-top-adapter.service.mjs +19 -22
- package/esm2022/lib/modules/back-to-top/back-to-top.component.mjs +25 -0
- package/esm2022/lib/modules/back-to-top/back-to-top.directive.mjs +119 -0
- package/{esm2020 → esm2022}/lib/modules/back-to-top/back-to-top.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/modules/box/box-content.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/box/box-controls.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/box/box-header.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/box/box.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/box/box.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/modules/card/card-actions.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/card/card-content.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/card/card-title.component.mjs +4 -4
- package/esm2022/lib/modules/card/card.component.mjs +107 -0
- package/{esm2020 → esm2022}/lib/modules/card/card.module.mjs +21 -21
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list-content.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list-heading.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list-label.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list-value.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/modules/definition-list/definition-list.service.mjs +4 -4
- package/esm2022/lib/modules/description-list/description-list-adapter-service.mjs +44 -0
- package/{esm2020 → esm2022}/lib/modules/description-list/description-list-content.component.mjs +4 -4
- package/esm2022/lib/modules/description-list/description-list-description.component.mjs +52 -0
- package/{esm2020 → esm2022}/lib/modules/description-list/description-list-term.component.mjs +4 -4
- package/esm2022/lib/modules/description-list/description-list.component.mjs +95 -0
- package/{esm2020 → esm2022}/lib/modules/description-list/description-list.module.mjs +19 -19
- package/esm2022/lib/modules/description-list/description-list.service.mjs +24 -0
- package/esm2022/lib/modules/fluid-grid/column.component.mjs +66 -0
- package/esm2022/lib/modules/fluid-grid/fluid-grid.component.mjs +40 -0
- package/{esm2020 → esm2022}/lib/modules/fluid-grid/fluid-grid.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/modules/fluid-grid/row.component.mjs +4 -4
- package/esm2022/lib/modules/format/format.component.mjs +64 -0
- package/{esm2020 → esm2022}/lib/modules/format/format.module.mjs +5 -5
- package/esm2022/lib/modules/inline-delete/inline-delete-adapter.service.mjs +123 -0
- package/esm2022/lib/modules/inline-delete/inline-delete.component.mjs +164 -0
- package/{esm2020 → esm2022}/lib/modules/inline-delete/inline-delete.module.mjs +11 -11
- package/esm2022/lib/modules/page/page-theme-adapter.service.mjs +40 -0
- package/esm2022/lib/modules/page/page.component.mjs +49 -0
- package/{esm2020 → esm2022}/lib/modules/page/page.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-adapter.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-alert.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-content.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-image.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-key-info.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-status.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-subtitle.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary-title.component.mjs +4 -4
- package/esm2022/lib/modules/page-summary/page-summary.component.mjs +73 -0
- package/{esm2020 → esm2022}/lib/modules/page-summary/page-summary.module.mjs +19 -19
- package/esm2022/lib/modules/shared/sky-layout-resources.module.mjs +60 -0
- package/esm2022/lib/modules/text-expand/text-expand-adapter.service.mjs +26 -0
- package/{esm2020 → esm2022}/lib/modules/text-expand/text-expand-modal.component.mjs +4 -4
- package/esm2022/lib/modules/text-expand/text-expand.component.mjs +315 -0
- package/{esm2020 → esm2022}/lib/modules/text-expand/text-expand.module.mjs +11 -11
- package/esm2022/lib/modules/text-expand-repeater/text-expand-repeater-adapter.service.mjs +32 -0
- package/esm2022/lib/modules/text-expand-repeater/text-expand-repeater.component.mjs +216 -0
- package/{esm2020 → esm2022}/lib/modules/text-expand-repeater/text-expand-repeater.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/modules/toolbar/toolbar-item.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/toolbar/toolbar-section.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/toolbar/toolbar-view-actions.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/toolbar/toolbar.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modules/toolbar/toolbar.module.mjs +11 -11
- package/esm2022/testing/action-button-fixture.mjs +48 -0
- package/esm2022/testing/box/box-harness.mjs +34 -0
- package/esm2022/testing/card-fixture.mjs +65 -0
- package/esm2022/testing/page-summary-fixture.mjs +31 -0
- package/fesm2022/skyux-layout-testing.mjs +181 -0
- package/{fesm2015 → fesm2022}/skyux-layout-testing.mjs.map +1 -1
- package/fesm2022/skyux-layout.mjs +2957 -0
- package/{fesm2020 → fesm2022}/skyux-layout.mjs.map +1 -1
- package/lib/modules/action-button/action-button-container.component.d.ts +1 -1
- package/lib/modules/action-button/action-button-icon.component.d.ts +1 -1
- package/lib/modules/action-button/action-button.component.d.ts +1 -1
- package/lib/modules/back-to-top/back-to-top.directive.d.ts +1 -1
- package/lib/modules/box/box.component.d.ts +1 -1
- package/lib/modules/card/card.component.d.ts +1 -1
- package/lib/modules/definition-list/definition-list.component.d.ts +1 -1
- package/lib/modules/description-list/description-list.component.d.ts +1 -1
- package/lib/modules/fluid-grid/column.component.d.ts +1 -1
- package/lib/modules/fluid-grid/fluid-grid.component.d.ts +1 -1
- package/lib/modules/fluid-grid/row.component.d.ts +1 -1
- package/lib/modules/format/format.component.d.ts +1 -1
- package/lib/modules/inline-delete/inline-delete.component.d.ts +1 -1
- package/lib/modules/page/page.component.d.ts +1 -1
- package/lib/modules/text-expand/text-expand.component.d.ts +1 -1
- package/lib/modules/text-expand-repeater/text-expand-repeater.component.d.ts +1 -1
- package/package.json +23 -31
- package/esm2020/lib/modules/action-button/action-button-adapter-service.mjs +0 -47
- package/esm2020/lib/modules/action-button/action-button-container.component.mjs +0 -139
- package/esm2020/lib/modules/action-button/action-button-icon.component.mjs +0 -43
- package/esm2020/lib/modules/action-button/action-button.component.mjs +0 -53
- package/esm2020/lib/modules/back-to-top/back-to-top.component.mjs +0 -30
- package/esm2020/lib/modules/back-to-top/back-to-top.directive.mjs +0 -118
- package/esm2020/lib/modules/card/card.component.mjs +0 -109
- package/esm2020/lib/modules/description-list/description-list-adapter-service.mjs +0 -47
- package/esm2020/lib/modules/description-list/description-list-description.component.mjs +0 -55
- package/esm2020/lib/modules/description-list/description-list.component.mjs +0 -98
- package/esm2020/lib/modules/description-list/description-list.service.mjs +0 -29
- package/esm2020/lib/modules/fluid-grid/column.component.mjs +0 -71
- package/esm2020/lib/modules/fluid-grid/fluid-grid.component.mjs +0 -42
- package/esm2020/lib/modules/format/format.component.mjs +0 -67
- package/esm2020/lib/modules/inline-delete/inline-delete-adapter.service.mjs +0 -122
- package/esm2020/lib/modules/inline-delete/inline-delete.component.mjs +0 -167
- package/esm2020/lib/modules/page/page-theme-adapter.service.mjs +0 -43
- package/esm2020/lib/modules/page/page.component.mjs +0 -52
- package/esm2020/lib/modules/page-summary/page-summary.component.mjs +0 -75
- package/esm2020/lib/modules/shared/sky-layout-resources.module.mjs +0 -60
- package/esm2020/lib/modules/text-expand/text-expand-adapter.service.mjs +0 -29
- package/esm2020/lib/modules/text-expand/text-expand.component.mjs +0 -306
- package/esm2020/lib/modules/text-expand-repeater/text-expand-repeater-adapter.service.mjs +0 -35
- package/esm2020/lib/modules/text-expand-repeater/text-expand-repeater.component.mjs +0 -214
- package/esm2020/testing/action-button-fixture.mjs +0 -51
- package/esm2020/testing/box/box-harness.mjs +0 -40
- package/esm2020/testing/card-fixture.mjs +0 -67
- package/esm2020/testing/page-summary-fixture.mjs +0 -34
- package/fesm2015/skyux-layout-testing.mjs +0 -198
- package/fesm2015/skyux-layout.mjs +0 -2996
- package/fesm2015/skyux-layout.mjs.map +0 -1
- package/fesm2020/skyux-layout-testing.mjs +0 -192
- package/fesm2020/skyux-layout-testing.mjs.map +0 -1
- package/fesm2020/skyux-layout.mjs +0 -2982
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/action-button/action-button-permalink.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/action-button/types/action-button-container-align-items-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/action-button/types/action-button-container-align-items.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/back-to-top/models/back-to-top-message-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/back-to-top/models/back-to-top-message.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/back-to-top/models/back-to-top-options.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/description-list/types/description-list-mode-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/description-list/types/description-list-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/fluid-grid/types/fluid-grid-gutter-size-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/format/format-item.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/inline-delete/inline-delete-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/page/page-layout-type.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/text-expand/text-expand-modal-context-token.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/text-expand/text-expand-modal-context.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modules/text-expand-repeater/types/text-expand-repeater-list-style-type.mjs +0 -0
- /package/{esm2020 → esm2022}/skyux-layout.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/box/box-harness.filters.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/skyux-layout-testing.mjs +0 -0
|
@@ -0,0 +1,2957 @@
|
|
|
1
|
+
import * as i5 from '@angular/cdk/observers';
|
|
2
|
+
import { ObserversModule } from '@angular/cdk/observers';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Injectable, EventEmitter, Component, ViewEncapsulation, SkipSelf, HostBinding, Input, Output, ElementRef, Optional, ContentChildren, ViewChild, HostListener, NgModule, ChangeDetectionStrategy, Directive, TemplateRef, Inject, inject, InjectionToken } from '@angular/core';
|
|
7
|
+
import * as i2 from '@angular/router';
|
|
8
|
+
import { RouterModule } from '@angular/router';
|
|
9
|
+
import * as i2$1 from '@skyux/indicators';
|
|
10
|
+
import { SkyIconModule, SkyWaitModule } from '@skyux/indicators';
|
|
11
|
+
import * as i3 from '@skyux/router';
|
|
12
|
+
import { SkyHrefModule } from '@skyux/router';
|
|
13
|
+
import * as i1$1 from '@skyux/theme';
|
|
14
|
+
import { SkyThemeModule } from '@skyux/theme';
|
|
15
|
+
import { Subject, BehaviorSubject, forkJoin } from 'rxjs';
|
|
16
|
+
import { takeUntil, take } from 'rxjs/operators';
|
|
17
|
+
import * as i1$2 from '@skyux/core';
|
|
18
|
+
import { SkyMediaBreakpoints, SkyDockModule, SkyTrimModule, SkyCoreAdapterService, SkyLogService } from '@skyux/core';
|
|
19
|
+
import * as i1$3 from '@skyux/i18n';
|
|
20
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
21
|
+
import * as i3$1 from '@angular/forms';
|
|
22
|
+
import { FormsModule } from '@angular/forms';
|
|
23
|
+
import * as i4 from '@skyux/forms';
|
|
24
|
+
import { SkyCheckboxModule } from '@skyux/forms';
|
|
25
|
+
import { trigger, transition, style, query, group, animate, state } from '@angular/animations';
|
|
26
|
+
import * as i1$4 from '@skyux/modals';
|
|
27
|
+
import { SkyModalModule } from '@skyux/modals';
|
|
28
|
+
|
|
29
|
+
const RESPONSIVE_CLASS_SM = 'sky-action-button-container-sm';
|
|
30
|
+
const RESPONSIVE_CLASS_MD = 'sky-action-button-container-md';
|
|
31
|
+
const RESPONSIVE_CLASS_LG = 'sky-action-button-container-lg';
|
|
32
|
+
const BREAKPOINT_MD = 912;
|
|
33
|
+
const BREAKPOINT_LG = 1378;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
class SkyActionButtonAdapterService {
|
|
38
|
+
#renderer;
|
|
39
|
+
constructor(rendererFactory) {
|
|
40
|
+
this.#renderer = rendererFactory.createRenderer(undefined, null);
|
|
41
|
+
}
|
|
42
|
+
getParentWidth(element) {
|
|
43
|
+
return element.nativeElement.parentElement?.getBoundingClientRect().width;
|
|
44
|
+
}
|
|
45
|
+
setResponsiveClass(element, width = 0) {
|
|
46
|
+
const el = element.nativeElement;
|
|
47
|
+
const className = this.#getResponsiveClassName(width);
|
|
48
|
+
this.#renderer.removeClass(el, RESPONSIVE_CLASS_SM);
|
|
49
|
+
this.#renderer.removeClass(el, RESPONSIVE_CLASS_MD);
|
|
50
|
+
this.#renderer.removeClass(el, RESPONSIVE_CLASS_LG);
|
|
51
|
+
this.#renderer.addClass(el, className);
|
|
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
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonAdapterService }); }
|
|
66
|
+
}
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonAdapterService, decorators: [{
|
|
68
|
+
type: Injectable
|
|
69
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Creates a button to present users with an option to move forward with tasks.
|
|
73
|
+
*/
|
|
74
|
+
class SkyActionButtonComponent {
|
|
75
|
+
#changeDetector;
|
|
76
|
+
constructor(changeDetector) {
|
|
77
|
+
this.hidden = false;
|
|
78
|
+
/**
|
|
79
|
+
* Fires when users select the action button.
|
|
80
|
+
*/
|
|
81
|
+
this.actionClick = new EventEmitter();
|
|
82
|
+
this.#changeDetector = changeDetector;
|
|
83
|
+
}
|
|
84
|
+
buttonClicked() {
|
|
85
|
+
this.actionClick.emit();
|
|
86
|
+
}
|
|
87
|
+
enterPress() {
|
|
88
|
+
this.actionClick.emit();
|
|
89
|
+
}
|
|
90
|
+
onSkyHrefDisplayChange($event) {
|
|
91
|
+
if (this.hidden === $event.userHasAccess) {
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
this.hidden = !$event.userHasAccess;
|
|
94
|
+
this.#changeDetector.markForCheck();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonComponent, deps: [{ token: i0.ChangeDetectorRef, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", 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.RouterLink, selector: "[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
|
+
}
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonComponent, decorators: [{
|
|
102
|
+
type: Component,
|
|
103
|
+
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"] }]
|
|
104
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
105
|
+
type: SkipSelf
|
|
106
|
+
}] }]; }, propDecorators: { hidden: [{
|
|
107
|
+
type: HostBinding,
|
|
108
|
+
args: ['hidden']
|
|
109
|
+
}], permalink: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], actionClick: [{
|
|
112
|
+
type: Output
|
|
113
|
+
}] } });
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Wraps action buttons to ensures that they have consistent height and spacing.
|
|
117
|
+
* @required
|
|
118
|
+
*/
|
|
119
|
+
class SkyActionButtonContainerComponent {
|
|
120
|
+
/**
|
|
121
|
+
* How to display the action buttons inside the action button container.
|
|
122
|
+
* Options are `"center"` or `"left"`.
|
|
123
|
+
* @default "center"
|
|
124
|
+
*/
|
|
125
|
+
set alignItems(value) {
|
|
126
|
+
this.#_alignItems = value ?? 'center';
|
|
127
|
+
}
|
|
128
|
+
get alignItems() {
|
|
129
|
+
return this.#_alignItems;
|
|
130
|
+
}
|
|
131
|
+
#ngUnsubscribe = new Subject();
|
|
132
|
+
#syncMaxHeightTimeout;
|
|
133
|
+
set #themeName(value) {
|
|
134
|
+
this.#_themeName = value;
|
|
135
|
+
this.#updateResponsiveClass();
|
|
136
|
+
this.#updateHeight();
|
|
137
|
+
}
|
|
138
|
+
#_alignItems = 'center';
|
|
139
|
+
#_themeName;
|
|
140
|
+
#viewInitialized = false;
|
|
141
|
+
#actionButtonAdapterService;
|
|
142
|
+
#changeDetector;
|
|
143
|
+
#coreAdapterService;
|
|
144
|
+
#hostElRef;
|
|
145
|
+
#themeSvc;
|
|
146
|
+
constructor(actionButtonAdapterService, changeDetector, coreAdapterService, hostElRef, themeSvc) {
|
|
147
|
+
this.#actionButtonAdapterService = actionButtonAdapterService;
|
|
148
|
+
this.#changeDetector = changeDetector;
|
|
149
|
+
this.#coreAdapterService = coreAdapterService;
|
|
150
|
+
this.#hostElRef = hostElRef;
|
|
151
|
+
this.#themeSvc = themeSvc;
|
|
152
|
+
}
|
|
153
|
+
ngOnInit() {
|
|
154
|
+
/* istanbul ignore else */
|
|
155
|
+
if (this.#themeSvc) {
|
|
156
|
+
this.#themeSvc.settingsChange
|
|
157
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
158
|
+
.subscribe((themeSettings) => {
|
|
159
|
+
this.#themeName = themeSettings.currentSettings.theme.name;
|
|
160
|
+
this.#changeDetector.markForCheck();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
// Wait for children components to complete rendering before container width is determined.
|
|
164
|
+
setTimeout(() => {
|
|
165
|
+
this.#updateResponsiveClass();
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
ngAfterViewInit() {
|
|
169
|
+
// Watch for dynamic action button changes and recalculate height.
|
|
170
|
+
/* istanbul ignore else */
|
|
171
|
+
if (this.actionButtons) {
|
|
172
|
+
this.actionButtons.changes
|
|
173
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
174
|
+
.subscribe(() => {
|
|
175
|
+
this.#updateHeight();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
this.#viewInitialized = true;
|
|
179
|
+
this.#updateHeight();
|
|
180
|
+
}
|
|
181
|
+
ngOnDestroy() {
|
|
182
|
+
this.#ngUnsubscribe.next();
|
|
183
|
+
this.#ngUnsubscribe.complete();
|
|
184
|
+
}
|
|
185
|
+
onContentChange() {
|
|
186
|
+
this.#updateHeight();
|
|
187
|
+
}
|
|
188
|
+
onWindowResize() {
|
|
189
|
+
this.#updateResponsiveClass();
|
|
190
|
+
}
|
|
191
|
+
#updateHeight(delay = 0) {
|
|
192
|
+
const ref = this.containerRef;
|
|
193
|
+
if (ref && this.#viewInitialized) {
|
|
194
|
+
this.#coreAdapterService.resetHeight(ref, '.sky-action-button');
|
|
195
|
+
if (this.#_themeName === 'modern') {
|
|
196
|
+
// Wait for children components to complete rendering before height is determined.
|
|
197
|
+
clearTimeout(this.#syncMaxHeightTimeout);
|
|
198
|
+
this.#syncMaxHeightTimeout = setTimeout(() => {
|
|
199
|
+
const selector = '.sky-action-button:not([hidden])';
|
|
200
|
+
const button = ref.nativeElement.querySelector(selector);
|
|
201
|
+
if (button && button.offsetHeight > 0) {
|
|
202
|
+
this.#coreAdapterService.syncMaxHeight(ref, selector);
|
|
203
|
+
}
|
|
204
|
+
else if (delay < 200) {
|
|
205
|
+
// Wait progressively longer between retries.
|
|
206
|
+
this.#updateHeight(delay + 50);
|
|
207
|
+
}
|
|
208
|
+
}, delay);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
#updateResponsiveClass() {
|
|
213
|
+
if (this.containerRef) {
|
|
214
|
+
const parentWidth = this.#actionButtonAdapterService.getParentWidth(this.#hostElRef);
|
|
215
|
+
this.#actionButtonAdapterService.setResponsiveClass(this.containerRef, parentWidth);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", 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 }); }
|
|
219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", 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;margin:calc(var(--sky-compat-action-button-flex-margin, 20px) * -1) 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;margin:calc(var(--sky-compat-action-button-flex-margin, 20px) * -1) 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:var(--sky-compat-action-button-flex-sm-padding, 0) 0;margin:calc(var(--sky-compat-action-button-flex-margin, 10px) * -1) 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:var(--sky-compat-action-button-flex-sm-padding, 0) 0;margin:calc(var(--sky-compat-action-button-flex-margin, 10px) * -1) 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 }); }
|
|
220
|
+
}
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonContainerComponent, decorators: [{
|
|
222
|
+
type: Component,
|
|
223
|
+
args: [{ selector: 'sky-action-button-container', providers: [SkyActionButtonAdapterService], encapsulation: ViewEncapsulation.None, 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;margin:calc(var(--sky-compat-action-button-flex-margin, 20px) * -1) 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;margin:calc(var(--sky-compat-action-button-flex-margin, 20px) * -1) 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:var(--sky-compat-action-button-flex-sm-padding, 0) 0;margin:calc(var(--sky-compat-action-button-flex-margin, 10px) * -1) 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:var(--sky-compat-action-button-flex-sm-padding, 0) 0;margin:calc(var(--sky-compat-action-button-flex-margin, 10px) * -1) 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"] }]
|
|
224
|
+
}], ctorParameters: function () { return [{ type: SkyActionButtonAdapterService }, { type: i0.ChangeDetectorRef }, { type: i1$2.SkyCoreAdapterService }, { type: i0.ElementRef }, { type: i1$1.SkyThemeService, decorators: [{
|
|
225
|
+
type: Optional
|
|
226
|
+
}] }]; }, propDecorators: { alignItems: [{
|
|
227
|
+
type: Input
|
|
228
|
+
}], actionButtons: [{
|
|
229
|
+
type: ContentChildren,
|
|
230
|
+
args: [SkyActionButtonComponent]
|
|
231
|
+
}], containerRef: [{
|
|
232
|
+
type: ViewChild,
|
|
233
|
+
args: ['container', {
|
|
234
|
+
read: ElementRef,
|
|
235
|
+
static: true,
|
|
236
|
+
}]
|
|
237
|
+
}], onWindowResize: [{
|
|
238
|
+
type: HostListener,
|
|
239
|
+
args: ['window:resize']
|
|
240
|
+
}] } });
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Specifies a description to display on an action button.
|
|
244
|
+
*/
|
|
245
|
+
class SkyActionButtonDetailsComponent {
|
|
246
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
247
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyActionButtonDetailsComponent, selector: "sky-action-button-details", ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
248
|
+
}
|
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonDetailsComponent, decorators: [{
|
|
250
|
+
type: Component,
|
|
251
|
+
args: [{ selector: 'sky-action-button-details', template: "<ng-content></ng-content>\n" }]
|
|
252
|
+
}] });
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Specifies a header to display on an action button.
|
|
256
|
+
*/
|
|
257
|
+
class SkyActionButtonHeaderComponent {
|
|
258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
259
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyActionButtonHeaderComponent, selector: "sky-action-button-header", ngImport: i0, template: "<div\n class=\"sky-action-button-header\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern',\n 'sky-font-heading-2': '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"], dependencies: [{ kind: "directive", type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }] }); }
|
|
260
|
+
}
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonHeaderComponent, decorators: [{
|
|
262
|
+
type: Component,
|
|
263
|
+
args: [{ selector: 'sky-action-button-header', template: "<div\n class=\"sky-action-button-header\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern',\n 'sky-font-heading-2': '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"] }]
|
|
264
|
+
}] });
|
|
265
|
+
|
|
266
|
+
const FONTSIZECLASS_SMALL = '2x';
|
|
267
|
+
const FONTSIZECLASS_LARGE = '3x';
|
|
268
|
+
/**
|
|
269
|
+
* Specifies an icon to display on the action button.
|
|
270
|
+
*/
|
|
271
|
+
class SkyActionButtonIconComponent {
|
|
272
|
+
#subscription;
|
|
273
|
+
constructor(mediaQueryService) {
|
|
274
|
+
this.fontSizeClass = FONTSIZECLASS_LARGE;
|
|
275
|
+
this.#subscription = mediaQueryService.subscribe((args) => {
|
|
276
|
+
if (args === SkyMediaBreakpoints.xs) {
|
|
277
|
+
this.fontSizeClass = FONTSIZECLASS_SMALL;
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
this.fontSizeClass = FONTSIZECLASS_LARGE;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
ngOnDestroy() {
|
|
285
|
+
/* istanbul ignore else */
|
|
286
|
+
/* sanity check */
|
|
287
|
+
if (this.#subscription) {
|
|
288
|
+
this.#subscription.unsubscribe();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonIconComponent, deps: [{ token: i1$2.SkyMediaQueryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
292
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", 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:#ebfbff;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:#ebfbff;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"] }] }); }
|
|
293
|
+
}
|
|
294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonIconComponent, decorators: [{
|
|
295
|
+
type: Component,
|
|
296
|
+
args: [{ selector: 'sky-action-button-icon', 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:#ebfbff;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:#ebfbff;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"] }]
|
|
297
|
+
}], ctorParameters: function () { return [{ type: i1$2.SkyMediaQueryService }]; }, propDecorators: { iconType: [{
|
|
298
|
+
type: Input
|
|
299
|
+
}] } });
|
|
300
|
+
|
|
301
|
+
class SkyActionButtonModule {
|
|
302
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
303
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonModule, declarations: [SkyActionButtonComponent,
|
|
304
|
+
SkyActionButtonContainerComponent,
|
|
305
|
+
SkyActionButtonDetailsComponent,
|
|
306
|
+
SkyActionButtonHeaderComponent,
|
|
307
|
+
SkyActionButtonIconComponent], imports: [CommonModule,
|
|
308
|
+
ObserversModule,
|
|
309
|
+
RouterModule,
|
|
310
|
+
SkyHrefModule,
|
|
311
|
+
SkyIconModule,
|
|
312
|
+
SkyThemeModule], exports: [SkyActionButtonComponent,
|
|
313
|
+
SkyActionButtonContainerComponent,
|
|
314
|
+
SkyActionButtonDetailsComponent,
|
|
315
|
+
SkyActionButtonHeaderComponent,
|
|
316
|
+
SkyActionButtonIconComponent] }); }
|
|
317
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonModule, imports: [CommonModule,
|
|
318
|
+
ObserversModule,
|
|
319
|
+
RouterModule,
|
|
320
|
+
SkyHrefModule,
|
|
321
|
+
SkyIconModule,
|
|
322
|
+
SkyThemeModule] }); }
|
|
323
|
+
}
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyActionButtonModule, decorators: [{
|
|
325
|
+
type: NgModule,
|
|
326
|
+
args: [{
|
|
327
|
+
declarations: [
|
|
328
|
+
SkyActionButtonComponent,
|
|
329
|
+
SkyActionButtonContainerComponent,
|
|
330
|
+
SkyActionButtonDetailsComponent,
|
|
331
|
+
SkyActionButtonHeaderComponent,
|
|
332
|
+
SkyActionButtonIconComponent,
|
|
333
|
+
],
|
|
334
|
+
imports: [
|
|
335
|
+
CommonModule,
|
|
336
|
+
ObserversModule,
|
|
337
|
+
RouterModule,
|
|
338
|
+
SkyHrefModule,
|
|
339
|
+
SkyIconModule,
|
|
340
|
+
SkyThemeModule,
|
|
341
|
+
],
|
|
342
|
+
exports: [
|
|
343
|
+
SkyActionButtonComponent,
|
|
344
|
+
SkyActionButtonContainerComponent,
|
|
345
|
+
SkyActionButtonDetailsComponent,
|
|
346
|
+
SkyActionButtonHeaderComponent,
|
|
347
|
+
SkyActionButtonIconComponent,
|
|
348
|
+
],
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
354
|
+
* The contents of this file were automatically generated by
|
|
355
|
+
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-layout' schematic.
|
|
356
|
+
* To update this file, simply rerun the command.
|
|
357
|
+
*/
|
|
358
|
+
const RESOURCES = {
|
|
359
|
+
'EN-US': {
|
|
360
|
+
skyux_back_to_top: { message: 'Back to top' },
|
|
361
|
+
skyux_card_checkbox_label: { message: 'Select card' },
|
|
362
|
+
skyux_definition_list_none_found: { message: 'None found.' },
|
|
363
|
+
skyux_description_list_none_found: { message: 'None found.' },
|
|
364
|
+
skyux_inline_delete_assistive_text: {
|
|
365
|
+
message: 'Are you sure you want to delete this item?',
|
|
366
|
+
},
|
|
367
|
+
skyux_inline_delete_cancel: { message: 'Cancel' },
|
|
368
|
+
skyux_inline_delete_confirm_deletion: { message: 'Confirm deletion' },
|
|
369
|
+
skyux_inline_delete_delete: { message: 'Delete' },
|
|
370
|
+
skyux_text_expand_close_text: { message: 'Close' },
|
|
371
|
+
skyux_text_expand_modal_title: { message: 'Expanded view' },
|
|
372
|
+
skyux_text_expand_see_less: { message: 'See less' },
|
|
373
|
+
skyux_text_expand_see_more: { message: 'See more' },
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
class SkyLayoutResourcesProvider {
|
|
377
|
+
getString(localeInfo, name) {
|
|
378
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Import into any component library module that needs to use resource strings.
|
|
383
|
+
*/
|
|
384
|
+
class SkyLayoutResourcesModule {
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyLayoutResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
386
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyLayoutResourcesModule, exports: [SkyI18nModule] }); }
|
|
387
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyLayoutResourcesModule, providers: [
|
|
388
|
+
{
|
|
389
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
390
|
+
useClass: SkyLayoutResourcesProvider,
|
|
391
|
+
multi: true,
|
|
392
|
+
},
|
|
393
|
+
], imports: [SkyI18nModule] }); }
|
|
394
|
+
}
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyLayoutResourcesModule, decorators: [{
|
|
396
|
+
type: NgModule,
|
|
397
|
+
args: [{
|
|
398
|
+
exports: [SkyI18nModule],
|
|
399
|
+
providers: [
|
|
400
|
+
{
|
|
401
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
402
|
+
useClass: SkyLayoutResourcesProvider,
|
|
403
|
+
multi: true,
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
}]
|
|
407
|
+
}] });
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* @internal
|
|
411
|
+
*/
|
|
412
|
+
class SkyBackToTopComponent {
|
|
413
|
+
get scrollToTopClick() {
|
|
414
|
+
return this.#_scrollToTopClick.asObservable();
|
|
415
|
+
}
|
|
416
|
+
#_scrollToTopClick = new Subject();
|
|
417
|
+
onScrollToTopClick() {
|
|
418
|
+
this.#_scrollToTopClick.next();
|
|
419
|
+
this.#_scrollToTopClick.complete();
|
|
420
|
+
}
|
|
421
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
422
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyBackToTopComponent, selector: "sky-back-to-top", ngImport: i0, template: "<div\n class=\"sky-back-to-top\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-3': 'modern'\n }\"\n>\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;padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-lg)}:host-context(.sky-theme-modern) .sky-back-to-top{padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-xl)}.sky-theme-modern .sky-back-to-top{padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-xl)}\n"], dependencies: [{ kind: "directive", type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
423
|
+
}
|
|
424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopComponent, decorators: [{
|
|
425
|
+
type: Component,
|
|
426
|
+
args: [{ selector: 'sky-back-to-top', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"sky-back-to-top\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-3': 'modern'\n }\"\n>\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;padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-lg)}:host-context(.sky-theme-modern) .sky-back-to-top{padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-xl)}.sky-theme-modern .sky-back-to-top{padding:var(--sky-margin-stacked-sm) var(--sky-margin-inline-xl)}\n"] }]
|
|
427
|
+
}] });
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @internal
|
|
431
|
+
*/
|
|
432
|
+
class SkyBackToTopDomAdapterService {
|
|
433
|
+
#ngUnsubscribe = new Subject();
|
|
434
|
+
#scrollableHostScrollEventUnsubscribe = new Subject();
|
|
435
|
+
#scrollableHostService;
|
|
436
|
+
#windowRef;
|
|
437
|
+
constructor(windowRef, scrollableHostService) {
|
|
438
|
+
this.#windowRef = windowRef;
|
|
439
|
+
this.#scrollableHostService = scrollableHostService;
|
|
440
|
+
}
|
|
441
|
+
ngOnDestroy() {
|
|
442
|
+
this.#ngUnsubscribe.next();
|
|
443
|
+
this.#ngUnsubscribe.complete();
|
|
444
|
+
this.#scrollableHostScrollEventUnsubscribe.next();
|
|
445
|
+
this.#scrollableHostScrollEventUnsubscribe.complete();
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* This event returns a boolean on scroll indicating whether the provided element is in view.
|
|
449
|
+
* @param elementRef The target element reference.
|
|
450
|
+
*/
|
|
451
|
+
elementInViewOnScroll(elementRef) {
|
|
452
|
+
const scrollableHostObservable = this.#scrollableHostService.watchScrollableHostScrollEvents(elementRef);
|
|
453
|
+
const isInitiallyInView = this.isElementScrolledInView(elementRef);
|
|
454
|
+
const returnedObservable = new BehaviorSubject(isInitiallyInView);
|
|
455
|
+
scrollableHostObservable
|
|
456
|
+
.pipe(takeUntil(this.#scrollableHostScrollEventUnsubscribe))
|
|
457
|
+
.subscribe(() => {
|
|
458
|
+
const isInView = this.isElementScrolledInView(elementRef);
|
|
459
|
+
returnedObservable.next(isInView);
|
|
460
|
+
});
|
|
461
|
+
return returnedObservable;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Scrolls the window or scrollable parent to the provided element.
|
|
465
|
+
* @param elementRef The target element reference.
|
|
466
|
+
*/
|
|
467
|
+
scrollToElement(elementRef) {
|
|
468
|
+
/* sanity check */
|
|
469
|
+
/* istanbul ignore if */
|
|
470
|
+
if (!elementRef || !elementRef.nativeElement) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const scrollableHost = this.#scrollableHostService.getScrollableHost(elementRef);
|
|
474
|
+
if (scrollableHost instanceof Window) {
|
|
475
|
+
// Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.
|
|
476
|
+
const bodyMarginOffset = parseInt(getComputedStyle(document.body).marginTop, 10);
|
|
477
|
+
const newOffsetTop = elementRef.nativeElement.offsetTop - bodyMarginOffset;
|
|
478
|
+
this.#windowRef.nativeWindow.scrollTo(elementRef.nativeElement.offsetLeft, newOffsetTop);
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
// Scroll to top of parent element.
|
|
482
|
+
scrollableHost.scrollTop =
|
|
483
|
+
scrollableHost.offsetTop - elementRef.nativeElement.offsetTop;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
isElementScrolledInView(element) {
|
|
487
|
+
const parentElement = this.#scrollableHostService.getScrollableHost(element);
|
|
488
|
+
if (!element.nativeElement.offsetParent) {
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
491
|
+
const buffer = 25;
|
|
492
|
+
const elementRect = element.nativeElement.getBoundingClientRect();
|
|
493
|
+
if (parentElement instanceof HTMLElement) {
|
|
494
|
+
const parentRect = parentElement.getBoundingClientRect();
|
|
495
|
+
return elementRect.top > parentRect.top - buffer;
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
return elementRect.top > -buffer;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopDomAdapterService, deps: [{ token: i1$2.SkyAppWindowRef }, { token: i1$2.SkyScrollableHostService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
502
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopDomAdapterService }); }
|
|
503
|
+
}
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopDomAdapterService, decorators: [{
|
|
505
|
+
type: Injectable
|
|
506
|
+
}], ctorParameters: function () { return [{ type: i1$2.SkyAppWindowRef }, { type: i1$2.SkyScrollableHostService }]; } });
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* The type of message to send to the back to top component.
|
|
510
|
+
*/
|
|
511
|
+
var SkyBackToTopMessageType;
|
|
512
|
+
(function (SkyBackToTopMessageType) {
|
|
513
|
+
/**
|
|
514
|
+
* Scrolls the element back to the top.
|
|
515
|
+
*/
|
|
516
|
+
SkyBackToTopMessageType[SkyBackToTopMessageType["BackToTop"] = 0] = "BackToTop";
|
|
517
|
+
})(SkyBackToTopMessageType || (SkyBackToTopMessageType = {}));
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Associates a button with an element on the page and displays that button
|
|
521
|
+
* to return to the element after users scroll away.
|
|
522
|
+
*/
|
|
523
|
+
class SkyBackToTopDirective {
|
|
524
|
+
/**
|
|
525
|
+
* Configuration options for the back to top component.
|
|
526
|
+
*/
|
|
527
|
+
set skyBackToTop(value) {
|
|
528
|
+
this.#buttonHidden = !!(value && value?.buttonHidden);
|
|
529
|
+
this.#handleBackToTopButton(this.#elementInView);
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* The observable to send commands to the back to top component.
|
|
533
|
+
* The commands respect the `SkyBackToTopMessage` type.
|
|
534
|
+
*/
|
|
535
|
+
set skyBackToTopMessageStream(value) {
|
|
536
|
+
if (this.#_skyBackToTopMessageStream) {
|
|
537
|
+
this.#_skyBackToTopMessageStream.unsubscribe();
|
|
538
|
+
}
|
|
539
|
+
this.#_skyBackToTopMessageStream = value;
|
|
540
|
+
this.#_skyBackToTopMessageStream
|
|
541
|
+
?.pipe(takeUntil(this.#ngUnsubscribe))
|
|
542
|
+
.subscribe((message) => this.#handleIncomingMessages(message));
|
|
543
|
+
}
|
|
544
|
+
#buttonHidden = false;
|
|
545
|
+
#dockItem;
|
|
546
|
+
#dockService;
|
|
547
|
+
#domAdapter;
|
|
548
|
+
#elementInView = false;
|
|
549
|
+
#elementRef;
|
|
550
|
+
#ngUnsubscribe = new Subject();
|
|
551
|
+
#_skyBackToTopMessageStream;
|
|
552
|
+
constructor(dockService, domAdapter, elementRef) {
|
|
553
|
+
this.#dockService = dockService;
|
|
554
|
+
this.#domAdapter = domAdapter;
|
|
555
|
+
this.#elementRef = elementRef;
|
|
556
|
+
}
|
|
557
|
+
ngAfterViewInit() {
|
|
558
|
+
this.#elementInView = this.#domAdapter.isElementScrolledInView(this.#elementRef);
|
|
559
|
+
this.#handleBackToTopButton(this.#elementInView);
|
|
560
|
+
this.#setBackToTopListeners();
|
|
561
|
+
}
|
|
562
|
+
ngOnDestroy() {
|
|
563
|
+
if (this.#dockItem) {
|
|
564
|
+
this.#dockItem.destroy();
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
#handleBackToTopButton(elementInView) {
|
|
568
|
+
// Add back to top button if user scrolls down and button is not hidden.
|
|
569
|
+
if (!this.#dockItem &&
|
|
570
|
+
elementInView !== undefined &&
|
|
571
|
+
!elementInView &&
|
|
572
|
+
!this.#buttonHidden) {
|
|
573
|
+
this.#addBackToTop();
|
|
574
|
+
}
|
|
575
|
+
// Remove back to top button if user scrolls back up.
|
|
576
|
+
if (elementInView || this.#buttonHidden) {
|
|
577
|
+
this.#destroyBackToTop();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
#addBackToTop() {
|
|
581
|
+
this.#dockItem = this.#dockService.insertComponent(SkyBackToTopComponent);
|
|
582
|
+
// Listen for clicks on the "back to top" button so we know when to scroll up.
|
|
583
|
+
this.#dockItem.componentInstance.scrollToTopClick
|
|
584
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
585
|
+
.subscribe(() => {
|
|
586
|
+
this.#domAdapter.scrollToElement(this.#elementRef);
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
#handleIncomingMessages(message) {
|
|
590
|
+
/* istanbul ignore else */
|
|
591
|
+
if (message.type === SkyBackToTopMessageType.BackToTop) {
|
|
592
|
+
this.#domAdapter.scrollToElement(this.#elementRef);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
#setBackToTopListeners() {
|
|
596
|
+
/* istanbul ignore else */
|
|
597
|
+
if (this.#elementRef) {
|
|
598
|
+
this.#domAdapter
|
|
599
|
+
.elementInViewOnScroll(this.#elementRef)
|
|
600
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
601
|
+
.subscribe((elementInView) => {
|
|
602
|
+
this.#elementInView = elementInView;
|
|
603
|
+
this.#handleBackToTopButton(elementInView);
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
#destroyBackToTop() {
|
|
608
|
+
/* istanbul ignore else */
|
|
609
|
+
if (this.#dockItem) {
|
|
610
|
+
this.#dockItem.destroy();
|
|
611
|
+
this.#dockItem = undefined;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopDirective, deps: [{ token: i1$2.SkyDockService }, { token: SkyBackToTopDomAdapterService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
615
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: SkyBackToTopDirective, selector: "[skyBackToTop]", inputs: { skyBackToTop: "skyBackToTop", skyBackToTopMessageStream: "skyBackToTopMessageStream" }, providers: [SkyBackToTopDomAdapterService], ngImport: i0 }); }
|
|
616
|
+
}
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopDirective, decorators: [{
|
|
618
|
+
type: Directive,
|
|
619
|
+
args: [{
|
|
620
|
+
selector: '[skyBackToTop]',
|
|
621
|
+
providers: [SkyBackToTopDomAdapterService],
|
|
622
|
+
}]
|
|
623
|
+
}], ctorParameters: function () { return [{ type: i1$2.SkyDockService }, { type: SkyBackToTopDomAdapterService }, { type: i0.ElementRef }]; }, propDecorators: { skyBackToTop: [{
|
|
624
|
+
type: Input
|
|
625
|
+
}], skyBackToTopMessageStream: [{
|
|
626
|
+
type: Input
|
|
627
|
+
}] } });
|
|
628
|
+
|
|
629
|
+
class SkyBackToTopModule {
|
|
630
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
631
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopModule, declarations: [SkyBackToTopComponent, SkyBackToTopDirective], imports: [CommonModule,
|
|
632
|
+
SkyDockModule,
|
|
633
|
+
SkyI18nModule,
|
|
634
|
+
SkyLayoutResourcesModule,
|
|
635
|
+
SkyThemeModule], exports: [SkyBackToTopComponent, SkyBackToTopDirective] }); }
|
|
636
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopModule, imports: [CommonModule,
|
|
637
|
+
SkyDockModule,
|
|
638
|
+
SkyI18nModule,
|
|
639
|
+
SkyLayoutResourcesModule,
|
|
640
|
+
SkyThemeModule] }); }
|
|
641
|
+
}
|
|
642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBackToTopModule, decorators: [{
|
|
643
|
+
type: NgModule,
|
|
644
|
+
args: [{
|
|
645
|
+
declarations: [SkyBackToTopComponent, SkyBackToTopDirective],
|
|
646
|
+
imports: [
|
|
647
|
+
CommonModule,
|
|
648
|
+
SkyDockModule,
|
|
649
|
+
SkyI18nModule,
|
|
650
|
+
SkyLayoutResourcesModule,
|
|
651
|
+
SkyThemeModule,
|
|
652
|
+
],
|
|
653
|
+
exports: [SkyBackToTopComponent, SkyBackToTopDirective],
|
|
654
|
+
}]
|
|
655
|
+
}] });
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Specifies the body content to display inside the box and provides padding around that content.
|
|
659
|
+
*/
|
|
660
|
+
class SkyBoxContentComponent {
|
|
661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
662
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyBoxContentComponent, selector: "sky-box-content", ngImport: i0, template: "<div class=\"sky-box-content\">\n <ng-content></ng-content>\n</div>\n" }); }
|
|
663
|
+
}
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxContentComponent, decorators: [{
|
|
665
|
+
type: Component,
|
|
666
|
+
args: [{ selector: 'sky-box-content', template: "<div class=\"sky-box-content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
667
|
+
}] });
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Specifies the controls to display in upper right corner of the box. These buttons typically let users edit the box content.
|
|
671
|
+
*/
|
|
672
|
+
class SkyBoxControlsComponent {
|
|
673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyBoxControlsComponent, selector: "sky-box-controls", ngImport: i0, template: "<div class=\"sky-box-controls\">\n <ng-content></ng-content>\n</div>\n" }); }
|
|
675
|
+
}
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxControlsComponent, decorators: [{
|
|
677
|
+
type: Component,
|
|
678
|
+
args: [{ selector: 'sky-box-controls', template: "<div class=\"sky-box-controls\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
679
|
+
}] });
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Specifies a header for the box.
|
|
683
|
+
*/
|
|
684
|
+
class SkyBoxHeaderComponent {
|
|
685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
686
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyBoxHeaderComponent, selector: "sky-box-header", ngImport: i0, template: "<div class=\"sky-box-header\">\n <span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n</div>\n", styles: ["sky-box-header{flex:1 0;order:0}sky-box-header .sky-box-header{padding:0 var(--sky-margin-inline-xl) 0 0}sky-box-header .sky-box-header h1,sky-box-header .sky-box-header h2,sky-box-header .sky-box-header h3,sky-box-header .sky-box-header h4,sky-box-header .sky-box-header h5,sky-box-header .sky-box-header h6{display:inline;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$2.λ4, selector: "[skyTrim]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
687
|
+
}
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxHeaderComponent, decorators: [{
|
|
689
|
+
type: Component,
|
|
690
|
+
args: [{ selector: 'sky-box-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"sky-box-header\">\n <span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n</div>\n", styles: ["sky-box-header{flex:1 0;order:0}sky-box-header .sky-box-header{padding:0 var(--sky-margin-inline-xl) 0 0}sky-box-header .sky-box-header h1,sky-box-header .sky-box-header h2,sky-box-header .sky-box-header h3,sky-box-header .sky-box-header h4,sky-box-header .sky-box-header h5,sky-box-header .sky-box-header h6{display:inline;margin:0}\n"] }]
|
|
691
|
+
}] });
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Provides a common look-and-feel for box content with options to display a common box header, specify body content, and display common box controls.
|
|
695
|
+
*/
|
|
696
|
+
class SkyBoxComponent {
|
|
697
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
698
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyBoxComponent, selector: "sky-box", inputs: { ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaRole: "ariaRole" }, ngImport: i0, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["sky-box{--sky-box-border-radius: initial;--sky-box-overflow: initial}.sky-theme-modern sky-box{--sky-box-border-radius: $sky-theme-modern-box-border-radius-default;--sky-box-overflow: hidden}sky-box{display:block}.sky-box{background-color:#fff;border-radius:var(--sky-box-border-radius);overflow:var(--sky-box-overflow)}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:var(--sky-padding-even-xl) var(--sky-padding-even-xl) 0 var(--sky-padding-even-xl)}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-controls{order:1;margin-left:auto}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:var(--sky-padding-even-xl)}\n"], dependencies: [{ kind: "directive", type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
699
|
+
}
|
|
700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxComponent, decorators: [{
|
|
701
|
+
type: Component,
|
|
702
|
+
args: [{ selector: 'sky-box', encapsulation: ViewEncapsulation.None, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: ["sky-box{--sky-box-border-radius: initial;--sky-box-overflow: initial}.sky-theme-modern sky-box{--sky-box-border-radius: $sky-theme-modern-box-border-radius-default;--sky-box-overflow: hidden}sky-box{display:block}.sky-box{background-color:#fff;border-radius:var(--sky-box-border-radius);overflow:var(--sky-box-overflow)}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:var(--sky-padding-even-xl) var(--sky-padding-even-xl) 0 var(--sky-padding-even-xl)}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-controls{order:1;margin-left:auto}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:var(--sky-padding-even-xl)}\n"] }]
|
|
703
|
+
}], propDecorators: { ariaLabel: [{
|
|
704
|
+
type: Input
|
|
705
|
+
}], ariaLabelledBy: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], ariaRole: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}] } });
|
|
710
|
+
|
|
711
|
+
class SkyBoxModule {
|
|
712
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
713
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxModule, declarations: [SkyBoxComponent,
|
|
714
|
+
SkyBoxHeaderComponent,
|
|
715
|
+
SkyBoxContentComponent,
|
|
716
|
+
SkyBoxControlsComponent], imports: [CommonModule, SkyThemeModule, SkyTrimModule], exports: [SkyBoxComponent,
|
|
717
|
+
SkyBoxHeaderComponent,
|
|
718
|
+
SkyBoxContentComponent,
|
|
719
|
+
SkyBoxControlsComponent] }); }
|
|
720
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxModule, imports: [CommonModule, SkyThemeModule, SkyTrimModule] }); }
|
|
721
|
+
}
|
|
722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyBoxModule, decorators: [{
|
|
723
|
+
type: NgModule,
|
|
724
|
+
args: [{
|
|
725
|
+
declarations: [
|
|
726
|
+
SkyBoxComponent,
|
|
727
|
+
SkyBoxHeaderComponent,
|
|
728
|
+
SkyBoxContentComponent,
|
|
729
|
+
SkyBoxControlsComponent,
|
|
730
|
+
],
|
|
731
|
+
imports: [CommonModule, SkyThemeModule, SkyTrimModule],
|
|
732
|
+
exports: [
|
|
733
|
+
SkyBoxComponent,
|
|
734
|
+
SkyBoxHeaderComponent,
|
|
735
|
+
SkyBoxContentComponent,
|
|
736
|
+
SkyBoxControlsComponent,
|
|
737
|
+
],
|
|
738
|
+
}]
|
|
739
|
+
}] });
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* @internal
|
|
743
|
+
*/
|
|
744
|
+
class SkyInlineDeleteAdapterService {
|
|
745
|
+
#element;
|
|
746
|
+
#focusableElements;
|
|
747
|
+
#parentEl;
|
|
748
|
+
#parentElClearListenerFn;
|
|
749
|
+
#renderer;
|
|
750
|
+
#coreAdapterService;
|
|
751
|
+
constructor(coreAdapterService, rendererFactory) {
|
|
752
|
+
this.#coreAdapterService = coreAdapterService;
|
|
753
|
+
this.#renderer = rendererFactory.createRenderer(undefined, null);
|
|
754
|
+
}
|
|
755
|
+
clearListeners() {
|
|
756
|
+
/* istanbul ignore else */
|
|
757
|
+
if (this.#parentElClearListenerFn) {
|
|
758
|
+
this.#parentElClearListenerFn();
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
setEl(element) {
|
|
762
|
+
this.#element = element;
|
|
763
|
+
this.#parentEl = element.parentElement;
|
|
764
|
+
/* istanbul ignore else */
|
|
765
|
+
if (this.#parentEl) {
|
|
766
|
+
this.#parentElClearListenerFn = this.#renderer.listen(this.#parentEl, 'focusin', (event) => {
|
|
767
|
+
if (this.#element) {
|
|
768
|
+
const target = event.target;
|
|
769
|
+
if (!this.#element.contains(target) && this.#parentEl !== target) {
|
|
770
|
+
event.preventDefault();
|
|
771
|
+
event.stopPropagation();
|
|
772
|
+
event.stopImmediatePropagation();
|
|
773
|
+
target.blur();
|
|
774
|
+
this.#focusNextElement(target, this.#isShift(event));
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
#focusNextElement(targetElement, shiftKey) {
|
|
781
|
+
const focusable = this.#getFocusableElements();
|
|
782
|
+
// If shift tab, go in the other direction
|
|
783
|
+
const modifier = shiftKey ? -1 : 1;
|
|
784
|
+
// Find the next navigable element that isn't waiting
|
|
785
|
+
const startingIndex = focusable.indexOf(targetElement);
|
|
786
|
+
let curIndex = startingIndex + modifier;
|
|
787
|
+
while (focusable[curIndex] &&
|
|
788
|
+
this.#isElementHiddenOrCovered(focusable[curIndex])) {
|
|
789
|
+
curIndex += modifier;
|
|
790
|
+
}
|
|
791
|
+
if (focusable[curIndex] &&
|
|
792
|
+
!this.#isElementHiddenOrCovered(focusable[curIndex])) {
|
|
793
|
+
focusable[curIndex].focus();
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
// Try wrapping the navigation
|
|
797
|
+
/* istanbul ignore next */
|
|
798
|
+
curIndex = modifier > 0 ? 0 : focusable.length - 1;
|
|
799
|
+
/* istanbul ignore next */
|
|
800
|
+
while (curIndex !== startingIndex &&
|
|
801
|
+
focusable[curIndex] &&
|
|
802
|
+
this.#isElementHiddenOrCovered(focusable[curIndex])) {
|
|
803
|
+
curIndex += modifier;
|
|
804
|
+
}
|
|
805
|
+
/* istanbul ignore else */
|
|
806
|
+
/* sanity check */
|
|
807
|
+
if (focusable[curIndex] &&
|
|
808
|
+
!this.#isElementHiddenOrCovered(focusable[curIndex])) {
|
|
809
|
+
focusable[curIndex].focus();
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
// No valid target, wipe focus
|
|
813
|
+
// This should never happen in practice due to the multiple inline delete buttons
|
|
814
|
+
if (document.activeElement && document.activeElement.blur) {
|
|
815
|
+
document.activeElement.blur();
|
|
816
|
+
}
|
|
817
|
+
document.body.focus();
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
// clear focusableElements list so that if things change between tabbing we know about it
|
|
821
|
+
this.#focusableElements = undefined;
|
|
822
|
+
}
|
|
823
|
+
#getFocusableElements() {
|
|
824
|
+
// Keep this cached so we can reduce queries
|
|
825
|
+
if (this.#focusableElements) {
|
|
826
|
+
return this.#focusableElements;
|
|
827
|
+
}
|
|
828
|
+
this.#focusableElements = this.#coreAdapterService.getFocusableChildren(document.body);
|
|
829
|
+
return this.#focusableElements;
|
|
830
|
+
}
|
|
831
|
+
#isElementHiddenOrCovered(element) {
|
|
832
|
+
// Check if the element is hidden by css, not within the inline delete, or a wait is covering it
|
|
833
|
+
return (this.#isElementHidden(element) ||
|
|
834
|
+
(!!this.#parentEl &&
|
|
835
|
+
this.#parentEl.contains(element) &&
|
|
836
|
+
(!this.#element?.contains(element) ||
|
|
837
|
+
this.#parentEl.querySelector('.sky-wait-mask') !== null)));
|
|
838
|
+
}
|
|
839
|
+
#isElementHidden(element) {
|
|
840
|
+
const style = window.getComputedStyle(element);
|
|
841
|
+
return style.display === 'none' || style.visibility === 'hidden';
|
|
842
|
+
}
|
|
843
|
+
#isShift(event) {
|
|
844
|
+
// Determine if shift+tab was used based on element order
|
|
845
|
+
const elements = this.#getFocusableElements().filter((elem) => !this.#isElementHidden(elem));
|
|
846
|
+
const previousInd = elements.indexOf(event.relatedTarget);
|
|
847
|
+
const currentInd = elements.indexOf(event.target);
|
|
848
|
+
/* istanbul ignore next */
|
|
849
|
+
return (previousInd === currentInd + 1 ||
|
|
850
|
+
(previousInd === 0 && currentInd === elements.length - 1) ||
|
|
851
|
+
previousInd > currentInd ||
|
|
852
|
+
!event.relatedTarget);
|
|
853
|
+
}
|
|
854
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteAdapterService, deps: [{ token: i1$2.SkyCoreAdapterService }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
855
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteAdapterService }); }
|
|
856
|
+
}
|
|
857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteAdapterService, decorators: [{
|
|
858
|
+
type: Injectable
|
|
859
|
+
}], ctorParameters: function () { return [{ type: i1$2.SkyCoreAdapterService }, { type: i0.RendererFactory2 }]; } });
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* The type of inline delete that is shown.
|
|
863
|
+
* @internal
|
|
864
|
+
*/
|
|
865
|
+
var SkyInlineDeleteType;
|
|
866
|
+
(function (SkyInlineDeleteType) {
|
|
867
|
+
/**
|
|
868
|
+
* The standard styling for inline deletes.
|
|
869
|
+
*/
|
|
870
|
+
SkyInlineDeleteType["Standard"] = "standard";
|
|
871
|
+
/**
|
|
872
|
+
* The styling for inline delete components which are used in card components.
|
|
873
|
+
*/
|
|
874
|
+
SkyInlineDeleteType["Card"] = "card";
|
|
875
|
+
})(SkyInlineDeleteType || (SkyInlineDeleteType = {}));
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Auto-incrementing integer used to generate unique ids for inline delete components.
|
|
879
|
+
*/
|
|
880
|
+
let nextId$2 = 0;
|
|
881
|
+
class SkyInlineDeleteComponent {
|
|
882
|
+
#adapterService;
|
|
883
|
+
#changeDetector;
|
|
884
|
+
#elRef;
|
|
885
|
+
constructor(adapterService, changeDetector, elRef) {
|
|
886
|
+
/**
|
|
887
|
+
* Whether the deletion is pending.
|
|
888
|
+
* @default false
|
|
889
|
+
*/
|
|
890
|
+
this.pending = false;
|
|
891
|
+
/**
|
|
892
|
+
* Fires when users click the cancel button.
|
|
893
|
+
*/
|
|
894
|
+
this.cancelTriggered = new EventEmitter();
|
|
895
|
+
/**
|
|
896
|
+
* Fires when users click the delete button.
|
|
897
|
+
*/
|
|
898
|
+
this.deleteTriggered = new EventEmitter();
|
|
899
|
+
this.animationState = 'shown';
|
|
900
|
+
this.assistiveTextId = `sky-inline-delete-assistive-text-${++nextId$2}`;
|
|
901
|
+
this.type = SkyInlineDeleteType.Standard;
|
|
902
|
+
this.#adapterService = adapterService;
|
|
903
|
+
this.#changeDetector = changeDetector;
|
|
904
|
+
this.#elRef = elRef;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Initialization lifecycle hook
|
|
908
|
+
* @internal
|
|
909
|
+
*/
|
|
910
|
+
ngOnInit() {
|
|
911
|
+
this.animationState = 'shown';
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Destruction lifecycle hook
|
|
915
|
+
* @internal
|
|
916
|
+
*/
|
|
917
|
+
ngOnDestroy() {
|
|
918
|
+
this.#adapterService.clearListeners();
|
|
919
|
+
this.cancelTriggered.complete();
|
|
920
|
+
this.deleteTriggered.complete();
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* @internal
|
|
924
|
+
*/
|
|
925
|
+
onCancelClick() {
|
|
926
|
+
this.animationState = 'hidden';
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* @internal
|
|
930
|
+
*/
|
|
931
|
+
onDeleteClick() {
|
|
932
|
+
this.deleteTriggered.emit();
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Sets the inline delete to one of its predefined types.
|
|
936
|
+
* @param type The inline delete type
|
|
937
|
+
* @internal
|
|
938
|
+
*/
|
|
939
|
+
setType(type) {
|
|
940
|
+
this.type = type;
|
|
941
|
+
this.#changeDetector.detectChanges();
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Handles actions that should be taken after the inline delete animates
|
|
945
|
+
* @param event The animation event
|
|
946
|
+
* @internal
|
|
947
|
+
*/
|
|
948
|
+
onAnimationDone(event) {
|
|
949
|
+
if (event.toState === 'hidden') {
|
|
950
|
+
this.cancelTriggered.emit();
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
this.deleteButton?.nativeElement.focus();
|
|
954
|
+
/* istanbul ignore else */
|
|
955
|
+
if (this.#elRef) {
|
|
956
|
+
this.#adapterService.setEl(this.#elRef.nativeElement);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteComponent, deps: [{ token: SkyInlineDeleteAdapterService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
961
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyInlineDeleteComponent, selector: "sky-inline-delete", inputs: { pending: "pending" }, outputs: { cancelTriggered: "cancelTriggered", deleteTriggered: "deleteTriggered" }, providers: [SkyCoreAdapterService, SkyInlineDeleteAdapterService], viewQueries: [{ propertyName: "deleteButton", first: true, predicate: ["delete"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"sky-inline-delete sky-inline-delete-{{ type }}\"\n role=\"alertdialog\"\n [@inlineDeleteAnimation]=\"animationState\"\n (@inlineDeleteAnimation.done)=\"onAnimationDone($event)\"\n [attr.aria-describedby]=\"assistiveTextId\"\n [attr.aria-label]=\"'skyux_inline_delete_confirm_deletion' | skyLibResources\"\n>\n <span class=\"sky-inline-delete-assistive-text\" [id]=\"assistiveTextId\">\n {{ 'skyux_inline_delete_assistive_text' | skyLibResources }}\n </span>\n <sky-wait class=\"sky-inline-delete-wait\" [isWaiting]=\"pending\"></sky-wait>\n <div class=\"sky-inline-delete-content\">\n <div class=\"sky-inline-delete-content-animation-container\">\n <button\n class=\"sky-btn sky-btn-danger sky-inline-delete-button\"\n type=\"button\"\n (click)=\"onDeleteClick()\"\n #delete\n >\n {{ 'skyux_inline_delete_delete' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n (click)=\"onCancelClick()\"\n >\n {{ 'skyux_inline_delete_cancel' | skyLibResources }}\n </button>\n </div>\n </div>\n</div>\n", styles: [".sky-inline-delete{position:absolute!important;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:999;border:2px solid #ef4044}.sky-inline-delete-assistive-text{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}.sky-inline-delete-button{margin-right:10px}.sky-inline-delete-card .sky-inline-delete-content{position:absolute;bottom:10px;text-align:center;width:100%}.sky-inline-delete-standard .sky-inline-delete-content{position:absolute;top:50%;transform:translateY(-50%);left:20px}.sky-inline-delete-wait{height:100%}\n"], dependencies: [{ kind: "component", type: i2$1.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking", "screenReaderCompletedText"] }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }], animations: [
|
|
962
|
+
trigger('inlineDeleteAnimation', [
|
|
963
|
+
transition('* => shown', [
|
|
964
|
+
style({
|
|
965
|
+
opacity: 0,
|
|
966
|
+
}),
|
|
967
|
+
query('.sky-inline-delete-content-animation-container', style({ transform: 'scale(0.0)' })),
|
|
968
|
+
group([
|
|
969
|
+
animate('300ms ease-in-out', style({ opacity: 1 })),
|
|
970
|
+
query('.sky-inline-delete-content-animation-container', animate('300ms ease-in-out', style({
|
|
971
|
+
transform: 'scale(1)',
|
|
972
|
+
}))),
|
|
973
|
+
]),
|
|
974
|
+
]),
|
|
975
|
+
transition(`shown <=> *`, [
|
|
976
|
+
query('.sky-inline-delete-content-animation-container', style({ transform: 'scale(1)' })),
|
|
977
|
+
group([
|
|
978
|
+
animate('300ms ease-in-out', style({
|
|
979
|
+
opacity: 0,
|
|
980
|
+
})),
|
|
981
|
+
query('.sky-inline-delete-content-animation-container', animate('300ms ease-in-out', style({
|
|
982
|
+
transform: 'scale(0.0)',
|
|
983
|
+
}))),
|
|
984
|
+
]),
|
|
985
|
+
]),
|
|
986
|
+
]),
|
|
987
|
+
] }); }
|
|
988
|
+
}
|
|
989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteComponent, decorators: [{
|
|
990
|
+
type: Component,
|
|
991
|
+
args: [{ selector: 'sky-inline-delete', animations: [
|
|
992
|
+
trigger('inlineDeleteAnimation', [
|
|
993
|
+
transition('* => shown', [
|
|
994
|
+
style({
|
|
995
|
+
opacity: 0,
|
|
996
|
+
}),
|
|
997
|
+
query('.sky-inline-delete-content-animation-container', style({ transform: 'scale(0.0)' })),
|
|
998
|
+
group([
|
|
999
|
+
animate('300ms ease-in-out', style({ opacity: 1 })),
|
|
1000
|
+
query('.sky-inline-delete-content-animation-container', animate('300ms ease-in-out', style({
|
|
1001
|
+
transform: 'scale(1)',
|
|
1002
|
+
}))),
|
|
1003
|
+
]),
|
|
1004
|
+
]),
|
|
1005
|
+
transition(`shown <=> *`, [
|
|
1006
|
+
query('.sky-inline-delete-content-animation-container', style({ transform: 'scale(1)' })),
|
|
1007
|
+
group([
|
|
1008
|
+
animate('300ms ease-in-out', style({
|
|
1009
|
+
opacity: 0,
|
|
1010
|
+
})),
|
|
1011
|
+
query('.sky-inline-delete-content-animation-container', animate('300ms ease-in-out', style({
|
|
1012
|
+
transform: 'scale(0.0)',
|
|
1013
|
+
}))),
|
|
1014
|
+
]),
|
|
1015
|
+
]),
|
|
1016
|
+
]),
|
|
1017
|
+
], providers: [SkyCoreAdapterService, SkyInlineDeleteAdapterService], template: "<div\n class=\"sky-inline-delete sky-inline-delete-{{ type }}\"\n role=\"alertdialog\"\n [@inlineDeleteAnimation]=\"animationState\"\n (@inlineDeleteAnimation.done)=\"onAnimationDone($event)\"\n [attr.aria-describedby]=\"assistiveTextId\"\n [attr.aria-label]=\"'skyux_inline_delete_confirm_deletion' | skyLibResources\"\n>\n <span class=\"sky-inline-delete-assistive-text\" [id]=\"assistiveTextId\">\n {{ 'skyux_inline_delete_assistive_text' | skyLibResources }}\n </span>\n <sky-wait class=\"sky-inline-delete-wait\" [isWaiting]=\"pending\"></sky-wait>\n <div class=\"sky-inline-delete-content\">\n <div class=\"sky-inline-delete-content-animation-container\">\n <button\n class=\"sky-btn sky-btn-danger sky-inline-delete-button\"\n type=\"button\"\n (click)=\"onDeleteClick()\"\n #delete\n >\n {{ 'skyux_inline_delete_delete' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n (click)=\"onCancelClick()\"\n >\n {{ 'skyux_inline_delete_cancel' | skyLibResources }}\n </button>\n </div>\n </div>\n</div>\n", styles: [".sky-inline-delete{position:absolute!important;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:999;border:2px solid #ef4044}.sky-inline-delete-assistive-text{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}.sky-inline-delete-button{margin-right:10px}.sky-inline-delete-card .sky-inline-delete-content{position:absolute;bottom:10px;text-align:center;width:100%}.sky-inline-delete-standard .sky-inline-delete-content{position:absolute;top:50%;transform:translateY(-50%);left:20px}.sky-inline-delete-wait{height:100%}\n"] }]
|
|
1018
|
+
}], ctorParameters: function () { return [{ type: SkyInlineDeleteAdapterService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { pending: [{
|
|
1019
|
+
type: Input
|
|
1020
|
+
}], cancelTriggered: [{
|
|
1021
|
+
type: Output
|
|
1022
|
+
}], deleteTriggered: [{
|
|
1023
|
+
type: Output
|
|
1024
|
+
}], deleteButton: [{
|
|
1025
|
+
type: ViewChild,
|
|
1026
|
+
args: ['delete', {
|
|
1027
|
+
read: ElementRef,
|
|
1028
|
+
static: false,
|
|
1029
|
+
}]
|
|
1030
|
+
}] } });
|
|
1031
|
+
|
|
1032
|
+
class SkyInlineDeleteModule {
|
|
1033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1034
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteModule, declarations: [SkyInlineDeleteComponent], imports: [CommonModule,
|
|
1035
|
+
SkyI18nModule,
|
|
1036
|
+
SkyLayoutResourcesModule,
|
|
1037
|
+
SkyWaitModule], exports: [SkyInlineDeleteComponent] }); }
|
|
1038
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteModule, imports: [CommonModule,
|
|
1039
|
+
SkyI18nModule,
|
|
1040
|
+
SkyLayoutResourcesModule,
|
|
1041
|
+
SkyWaitModule] }); }
|
|
1042
|
+
}
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyInlineDeleteModule, decorators: [{
|
|
1044
|
+
type: NgModule,
|
|
1045
|
+
args: [{
|
|
1046
|
+
declarations: [SkyInlineDeleteComponent],
|
|
1047
|
+
imports: [
|
|
1048
|
+
CommonModule,
|
|
1049
|
+
SkyI18nModule,
|
|
1050
|
+
SkyLayoutResourcesModule,
|
|
1051
|
+
SkyWaitModule,
|
|
1052
|
+
],
|
|
1053
|
+
exports: [SkyInlineDeleteComponent],
|
|
1054
|
+
}]
|
|
1055
|
+
}] });
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Specifies an action that users can perform on the card.
|
|
1059
|
+
* @deprecated
|
|
1060
|
+
*/
|
|
1061
|
+
class SkyCardActionsComponent {
|
|
1062
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyCardActionsComponent, selector: "sky-card-actions", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block;border-top:1px solid #e2e3e4;padding:7px 0}\n"] }); }
|
|
1064
|
+
}
|
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardActionsComponent, decorators: [{
|
|
1066
|
+
type: Component,
|
|
1067
|
+
args: [{ selector: 'sky-card-actions', template: "<ng-content></ng-content>\n", styles: [":host{display:block;border-top:1px solid #e2e3e4;padding:7px 0}\n"] }]
|
|
1068
|
+
}] });
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Specifies the content to display in the body of the card.
|
|
1072
|
+
* @deprecated
|
|
1073
|
+
*/
|
|
1074
|
+
class SkyCardContentComponent {
|
|
1075
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1076
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyCardContentComponent, selector: "sky-card-content", ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardContentComponent, decorators: [{
|
|
1079
|
+
type: Component,
|
|
1080
|
+
args: [{ selector: 'sky-card-content', template: "<ng-content></ng-content>\n" }]
|
|
1081
|
+
}] });
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Specifies a title to identify what the card represents.
|
|
1085
|
+
* @deprecated
|
|
1086
|
+
*/
|
|
1087
|
+
class SkyCardTitleComponent {
|
|
1088
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1089
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyCardTitleComponent, selector: "sky-card-title", ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
1090
|
+
}
|
|
1091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardTitleComponent, decorators: [{
|
|
1092
|
+
type: Component,
|
|
1093
|
+
args: [{ selector: 'sky-card-title', template: "<ng-content></ng-content>\n" }]
|
|
1094
|
+
}] });
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Creates a a small container to highlight important information.
|
|
1098
|
+
* @deprecated `SkyCardComponent` is deprecated. For other SKY UX components that group and list content, see the content containers guidelines. For more information, see https://developer.blackbaud.com/skyux/design/guidelines/content-containers.
|
|
1099
|
+
*/
|
|
1100
|
+
class SkyCardComponent {
|
|
1101
|
+
/**
|
|
1102
|
+
* The size of the card. The valid options are `"large"` and `"small"`.
|
|
1103
|
+
* @default "large"
|
|
1104
|
+
*/
|
|
1105
|
+
set size(value) {
|
|
1106
|
+
this.#_size = value ?? 'large';
|
|
1107
|
+
}
|
|
1108
|
+
get size() {
|
|
1109
|
+
return this.#_size;
|
|
1110
|
+
}
|
|
1111
|
+
#subscription;
|
|
1112
|
+
#_size;
|
|
1113
|
+
constructor(logger) {
|
|
1114
|
+
/**
|
|
1115
|
+
* Whether to display a checkbox to the right of the card title.
|
|
1116
|
+
* Users can select multiple checkboxes and perform actions on the selected cards.
|
|
1117
|
+
* @default false
|
|
1118
|
+
*/
|
|
1119
|
+
this.selectable = false;
|
|
1120
|
+
/**
|
|
1121
|
+
* Whether the card is selected. This only applies to card where
|
|
1122
|
+
* `selectable` is set to `true`.
|
|
1123
|
+
* @default false
|
|
1124
|
+
*/
|
|
1125
|
+
this.selected = false;
|
|
1126
|
+
/**
|
|
1127
|
+
* Fires when users select or deselect the card.
|
|
1128
|
+
*/
|
|
1129
|
+
this.selectedChange = new EventEmitter();
|
|
1130
|
+
this.showTitle = true;
|
|
1131
|
+
this.#_size = 'large';
|
|
1132
|
+
logger.deprecated('SkyCardComponent', {
|
|
1133
|
+
deprecationMajorVersion: 6,
|
|
1134
|
+
moreInfoUrl: 'https://developer.blackbaud.com/skyux/design/guidelines/content-containers',
|
|
1135
|
+
replacementRecommendation: 'For other SKY UX components that group and list content, see the content containers guidelines.',
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
ngAfterContentInit() {
|
|
1139
|
+
this.showTitle = !!this.titleComponent && this.titleComponent.length > 0;
|
|
1140
|
+
this.#subscription = this.titleComponent?.changes.subscribe(() => {
|
|
1141
|
+
this.showTitle = !!this.titleComponent && this.titleComponent.length > 0;
|
|
1142
|
+
});
|
|
1143
|
+
this.inlineDeleteComponent?.forEach((item) => {
|
|
1144
|
+
item.setType(SkyInlineDeleteType.Card);
|
|
1145
|
+
});
|
|
1146
|
+
this.inlineDeleteComponent?.changes.subscribe(() => {
|
|
1147
|
+
this.inlineDeleteComponent?.forEach((item) => {
|
|
1148
|
+
item.setType(SkyInlineDeleteType.Card);
|
|
1149
|
+
});
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
contentClick() {
|
|
1153
|
+
if (this.selectable) {
|
|
1154
|
+
this.selected = !this.selected;
|
|
1155
|
+
this.selectedChange.emit(this.selected);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
onCheckboxChange(newValue) {
|
|
1159
|
+
if (this.selectable && this.selected !== newValue) {
|
|
1160
|
+
this.selected = newValue;
|
|
1161
|
+
this.selectedChange.emit(this.selected);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
ngOnDestroy() {
|
|
1165
|
+
/* istanbul ignore else */
|
|
1166
|
+
/* sanity check */
|
|
1167
|
+
if (this.#subscription) {
|
|
1168
|
+
this.#subscription.unsubscribe();
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardComponent, deps: [{ token: i1$2.SkyLogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyCardComponent, selector: "sky-card", inputs: { size: "size", selectable: "selectable", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, queries: [{ propertyName: "inlineDeleteComponent", predicate: SkyInlineDeleteComponent }, { propertyName: "titleComponent", predicate: SkyCardTitleComponent }], ngImport: i0, template: "<section\n class=\"sky-card sky-shadow\"\n [ngClass]=\"\n {\n 'sky-card-small': size === 'small',\n 'sky-card-selectable': selectable,\n 'sky-card-selected': selectable && selected\n }\"\n>\n <ng-content select=\"sky-inline-delete\"></ng-content>\n <header>\n <div\n *ngIf=\"selectable || showTitle\"\n class=\"sky-card-header\"\n (click)=\"contentClick()\"\n >\n <div class=\"sky-card-heading-middle\">\n <h1 *ngIf=\"showTitle\" class=\"sky-card-title sky-section-heading\">\n <ng-content select=\"sky-card-title\"></ng-content>\n </h1>\n </div>\n <div *ngIf=\"selectable\" class=\"sky-card-check\">\n <sky-checkbox\n [label]=\"'skyux_card_checkbox_label' | skyLibResources\"\n [ngModel]=\"selected\"\n (click)=\"$event.stopPropagation()\"\n (ngModelChange)=\"onCheckboxChange($event)\"\n ></sky-checkbox>\n </div>\n </div>\n </header>\n <div\n class=\"sky-card-content sky-padding-even-default\"\n (click)=\"contentClick()\"\n >\n <ng-content select=\"sky-card-content\"></ng-content>\n </div>\n <div\n class=\"sky-card-actions\"\n [hidden]=\"actionsEl.children.length === 0\"\n #actionsEl\n >\n <ng-content select=\"sky-card-actions\"></ng-content>\n </div>\n</section>\n", styles: [".sky-card{background-color:#fff;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;display:inline-flex;flex-direction:column;height:350px;margin:0 10px 10px 0;transition:background-color .15s;vertical-align:top;width:350px;position:relative}.sky-card-small{height:250px;width:225px}.sky-card-selectable .sky-card-header,.sky-card-selectable .sky-card-content{cursor:pointer}.sky-card-selected{background-color:#f1eef6;transition:background-color .15s}.sky-card-header{align-items:center;display:flex;flex-shrink:0;margin:0;padding:10px 0 0}.sky-card-heading-left,.sky-card-heading-right{font-weight:400;max-width:34px}.sky-card-heading-left{padding-left:10px}.sky-card-heading-right{padding-right:10px}.sky-card-heading-middle{flex-grow:1;padding:0 10px;overflow:hidden}.sky-card-title{margin:0;line-height:1.428571429}.sky-card-check{flex-shrink:0;padding-right:10px}.sky-card-check .sky-check-wrapper{margin-bottom:2px}.sky-card-content{flex-grow:1;font-weight:400;margin:0;overflow:hidden}.sky-card-actions{bottom:0;flex-shrink:0;text-align:center}.sky-card-actions .sky-context-menu-btn{height:32px;width:32px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "indeterminate", "required"], outputs: ["change", "checkedChange", "disabledChange", "indeterminateChange"] }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
|
|
1173
|
+
}
|
|
1174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardComponent, decorators: [{
|
|
1175
|
+
type: Component,
|
|
1176
|
+
args: [{ selector: 'sky-card', template: "<section\n class=\"sky-card sky-shadow\"\n [ngClass]=\"\n {\n 'sky-card-small': size === 'small',\n 'sky-card-selectable': selectable,\n 'sky-card-selected': selectable && selected\n }\"\n>\n <ng-content select=\"sky-inline-delete\"></ng-content>\n <header>\n <div\n *ngIf=\"selectable || showTitle\"\n class=\"sky-card-header\"\n (click)=\"contentClick()\"\n >\n <div class=\"sky-card-heading-middle\">\n <h1 *ngIf=\"showTitle\" class=\"sky-card-title sky-section-heading\">\n <ng-content select=\"sky-card-title\"></ng-content>\n </h1>\n </div>\n <div *ngIf=\"selectable\" class=\"sky-card-check\">\n <sky-checkbox\n [label]=\"'skyux_card_checkbox_label' | skyLibResources\"\n [ngModel]=\"selected\"\n (click)=\"$event.stopPropagation()\"\n (ngModelChange)=\"onCheckboxChange($event)\"\n ></sky-checkbox>\n </div>\n </div>\n </header>\n <div\n class=\"sky-card-content sky-padding-even-default\"\n (click)=\"contentClick()\"\n >\n <ng-content select=\"sky-card-content\"></ng-content>\n </div>\n <div\n class=\"sky-card-actions\"\n [hidden]=\"actionsEl.children.length === 0\"\n #actionsEl\n >\n <ng-content select=\"sky-card-actions\"></ng-content>\n </div>\n</section>\n", styles: [".sky-card{background-color:#fff;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;display:inline-flex;flex-direction:column;height:350px;margin:0 10px 10px 0;transition:background-color .15s;vertical-align:top;width:350px;position:relative}.sky-card-small{height:250px;width:225px}.sky-card-selectable .sky-card-header,.sky-card-selectable .sky-card-content{cursor:pointer}.sky-card-selected{background-color:#f1eef6;transition:background-color .15s}.sky-card-header{align-items:center;display:flex;flex-shrink:0;margin:0;padding:10px 0 0}.sky-card-heading-left,.sky-card-heading-right{font-weight:400;max-width:34px}.sky-card-heading-left{padding-left:10px}.sky-card-heading-right{padding-right:10px}.sky-card-heading-middle{flex-grow:1;padding:0 10px;overflow:hidden}.sky-card-title{margin:0;line-height:1.428571429}.sky-card-check{flex-shrink:0;padding-right:10px}.sky-card-check .sky-check-wrapper{margin-bottom:2px}.sky-card-content{flex-grow:1;font-weight:400;margin:0;overflow:hidden}.sky-card-actions{bottom:0;flex-shrink:0;text-align:center}.sky-card-actions .sky-context-menu-btn{height:32px;width:32px}\n"] }]
|
|
1177
|
+
}], ctorParameters: function () { return [{ type: i1$2.SkyLogService }]; }, propDecorators: { size: [{
|
|
1178
|
+
type: Input
|
|
1179
|
+
}], selectable: [{
|
|
1180
|
+
type: Input
|
|
1181
|
+
}], selected: [{
|
|
1182
|
+
type: Input
|
|
1183
|
+
}], selectedChange: [{
|
|
1184
|
+
type: Output
|
|
1185
|
+
}], inlineDeleteComponent: [{
|
|
1186
|
+
type: ContentChildren,
|
|
1187
|
+
args: [SkyInlineDeleteComponent]
|
|
1188
|
+
}], titleComponent: [{
|
|
1189
|
+
type: ContentChildren,
|
|
1190
|
+
args: [SkyCardTitleComponent]
|
|
1191
|
+
}] } });
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* @deprecated `SkyCardModule` is deprecated. For other SKY UX components that group and list content, see the content containers guidelines. For more information, see https://developer.blackbaud.com/skyux/design/guidelines/content-containers.
|
|
1195
|
+
*/
|
|
1196
|
+
class SkyCardModule {
|
|
1197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1198
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyCardModule, declarations: [SkyCardActionsComponent,
|
|
1199
|
+
SkyCardComponent,
|
|
1200
|
+
SkyCardContentComponent,
|
|
1201
|
+
SkyCardTitleComponent], imports: [CommonModule,
|
|
1202
|
+
FormsModule,
|
|
1203
|
+
SkyCheckboxModule,
|
|
1204
|
+
SkyI18nModule,
|
|
1205
|
+
SkyLayoutResourcesModule,
|
|
1206
|
+
SkyInlineDeleteModule], exports: [SkyCardActionsComponent,
|
|
1207
|
+
SkyCardComponent,
|
|
1208
|
+
SkyCardContentComponent,
|
|
1209
|
+
SkyCardTitleComponent] }); }
|
|
1210
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardModule, imports: [CommonModule,
|
|
1211
|
+
FormsModule,
|
|
1212
|
+
SkyCheckboxModule,
|
|
1213
|
+
SkyI18nModule,
|
|
1214
|
+
SkyLayoutResourcesModule,
|
|
1215
|
+
SkyInlineDeleteModule] }); }
|
|
1216
|
+
}
|
|
1217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyCardModule, decorators: [{
|
|
1218
|
+
type: NgModule,
|
|
1219
|
+
args: [{
|
|
1220
|
+
declarations: [
|
|
1221
|
+
SkyCardActionsComponent,
|
|
1222
|
+
SkyCardComponent,
|
|
1223
|
+
SkyCardContentComponent,
|
|
1224
|
+
SkyCardTitleComponent,
|
|
1225
|
+
],
|
|
1226
|
+
imports: [
|
|
1227
|
+
CommonModule,
|
|
1228
|
+
FormsModule,
|
|
1229
|
+
SkyCheckboxModule,
|
|
1230
|
+
SkyI18nModule,
|
|
1231
|
+
SkyLayoutResourcesModule,
|
|
1232
|
+
SkyInlineDeleteModule,
|
|
1233
|
+
],
|
|
1234
|
+
exports: [
|
|
1235
|
+
SkyCardActionsComponent,
|
|
1236
|
+
SkyCardComponent,
|
|
1237
|
+
SkyCardContentComponent,
|
|
1238
|
+
SkyCardTitleComponent,
|
|
1239
|
+
],
|
|
1240
|
+
}]
|
|
1241
|
+
}] });
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Wraps the label-value pairs in the definition list.
|
|
1245
|
+
*/
|
|
1246
|
+
class SkyDefinitionListContentComponent {
|
|
1247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDefinitionListContentComponent, selector: "sky-definition-list-content", ngImport: i0, template: "<div class=\"sky-definition-list-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-definition-list-content{display:flex;flex-wrap:wrap;margin-bottom:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1249
|
+
}
|
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListContentComponent, decorators: [{
|
|
1251
|
+
type: Component,
|
|
1252
|
+
args: [{ selector: 'sky-definition-list-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-definition-list-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-definition-list-content{display:flex;flex-wrap:wrap;margin-bottom:5px}\n"] }]
|
|
1253
|
+
}] });
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Specifies a title for the definition list.
|
|
1257
|
+
*/
|
|
1258
|
+
class SkyDefinitionListHeadingComponent {
|
|
1259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListHeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDefinitionListHeadingComponent, selector: "sky-definition-list-heading", ngImport: i0, template: "<div class=\"sky-subsection-heading sky-definition-list-heading\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-definition-list-heading{margin-bottom:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1261
|
+
}
|
|
1262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListHeadingComponent, decorators: [{
|
|
1263
|
+
type: Component,
|
|
1264
|
+
args: [{ selector: 'sky-definition-list-heading', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-subsection-heading sky-definition-list-heading\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-definition-list-heading{margin-bottom:5px}\n"] }]
|
|
1265
|
+
}] });
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* @internal
|
|
1269
|
+
*/
|
|
1270
|
+
class SkyDefinitionListService {
|
|
1271
|
+
constructor() {
|
|
1272
|
+
this.labelWidth = new BehaviorSubject('');
|
|
1273
|
+
this.defaultValue = new BehaviorSubject('');
|
|
1274
|
+
}
|
|
1275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1276
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListService }); }
|
|
1277
|
+
}
|
|
1278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListService, decorators: [{
|
|
1279
|
+
type: Injectable
|
|
1280
|
+
}] });
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Specifies the label in a label-value pair.
|
|
1284
|
+
*/
|
|
1285
|
+
class SkyDefinitionListLabelComponent {
|
|
1286
|
+
constructor(service) {
|
|
1287
|
+
this.service = service;
|
|
1288
|
+
}
|
|
1289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListLabelComponent, deps: [{ token: SkyDefinitionListService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1290
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDefinitionListLabelComponent, selector: "sky-definition-list-label", ngImport: i0, template: "<div\n class=\"sky-field-label sky-definition-list-label\"\n [ngStyle]=\"{\n width: (service.labelWidth | async) || ''\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{flex:0 0 90px}.sky-definition-list-label{margin-right:10px;word-wrap:break-word}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1291
|
+
}
|
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListLabelComponent, decorators: [{
|
|
1293
|
+
type: Component,
|
|
1294
|
+
args: [{ selector: 'sky-definition-list-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"sky-field-label sky-definition-list-label\"\n [ngStyle]=\"{\n width: (service.labelWidth | async) || ''\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{flex:0 0 90px}.sky-definition-list-label{margin-right:10px;word-wrap:break-word}\n"] }]
|
|
1295
|
+
}], ctorParameters: function () { return [{ type: SkyDefinitionListService }]; } });
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Specifies the value in a label-value pair.
|
|
1299
|
+
*/
|
|
1300
|
+
class SkyDefinitionListValueComponent {
|
|
1301
|
+
constructor(service) {
|
|
1302
|
+
this.service = service;
|
|
1303
|
+
}
|
|
1304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListValueComponent, deps: [{ token: SkyDefinitionListService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDefinitionListValueComponent, selector: "sky-definition-list-value", ngImport: i0, template: "<div class=\"sky-definition-list-value\">\n <span #valueEl>\n <ng-content></ng-content>\n </span>\n <span class=\"sky-deemphasized\" *ngIf=\"!valueEl.textContent?.trim()\">\n {{\n (service.defaultValue | async) ||\n ('skyux_definition_list_none_found' | skyLibResources)\n }}\n </span>\n</div>\n", styles: [":host{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
|
|
1306
|
+
}
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListValueComponent, decorators: [{
|
|
1308
|
+
type: Component,
|
|
1309
|
+
args: [{ selector: 'sky-definition-list-value', template: "<div class=\"sky-definition-list-value\">\n <span #valueEl>\n <ng-content></ng-content>\n </span>\n <span class=\"sky-deemphasized\" *ngIf=\"!valueEl.textContent?.trim()\">\n {{\n (service.defaultValue | async) ||\n ('skyux_definition_list_none_found' | skyLibResources)\n }}\n </span>\n</div>\n", styles: [":host{flex:1}\n"] }]
|
|
1310
|
+
}], ctorParameters: function () { return [{ type: SkyDefinitionListService }]; } });
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Creates a definition list to display label-value pairs.
|
|
1314
|
+
*/
|
|
1315
|
+
class SkyDefinitionListComponent {
|
|
1316
|
+
/**
|
|
1317
|
+
* The width of the label portion of the definition list.
|
|
1318
|
+
* @default "90px"
|
|
1319
|
+
*/
|
|
1320
|
+
set labelWidth(value) {
|
|
1321
|
+
this.service.labelWidth.next(value);
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* The default value to display when no value is provided
|
|
1325
|
+
* for a label-value pair.
|
|
1326
|
+
* @default "None found"
|
|
1327
|
+
*/
|
|
1328
|
+
set defaultValue(value) {
|
|
1329
|
+
this.service.defaultValue.next(value);
|
|
1330
|
+
}
|
|
1331
|
+
constructor(service, logger) {
|
|
1332
|
+
this.service = service;
|
|
1333
|
+
logger.deprecated('SkyDefinitionListComponent', {
|
|
1334
|
+
deprecationMajorVersion: 6,
|
|
1335
|
+
moreInfoUrl: 'https://developer.blackbaud.com/skyux/components/description-list',
|
|
1336
|
+
replacementRecommendation: 'Use `SkyDescriptionListComponent` instead.',
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListComponent, deps: [{ token: SkyDefinitionListService }, { token: i1$2.SkyLogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1340
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDefinitionListComponent, selector: "sky-definition-list", inputs: { labelWidth: "labelWidth", defaultValue: "defaultValue" }, providers: [SkyDefinitionListService], ngImport: i0, template: "<div class=\"sky-definition-list\">\n <ng-content select=\"sky-definition-list-heading\"></ng-content>\n <ng-content select=\"sky-definition-list-content\"></ng-content>\n</div>\n", styles: [".sky-definition-list{margin-right:50px;margin-bottom:20px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1341
|
+
}
|
|
1342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListComponent, decorators: [{
|
|
1343
|
+
type: Component,
|
|
1344
|
+
args: [{ selector: 'sky-definition-list', providers: [SkyDefinitionListService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-definition-list\">\n <ng-content select=\"sky-definition-list-heading\"></ng-content>\n <ng-content select=\"sky-definition-list-content\"></ng-content>\n</div>\n", styles: [".sky-definition-list{margin-right:50px;margin-bottom:20px}\n"] }]
|
|
1345
|
+
}], ctorParameters: function () { return [{ type: SkyDefinitionListService }, { type: i1$2.SkyLogService }]; }, propDecorators: { labelWidth: [{
|
|
1346
|
+
type: Input
|
|
1347
|
+
}], defaultValue: [{
|
|
1348
|
+
type: Input
|
|
1349
|
+
}] } });
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* @deprecated Use `SkyDescriptionListModule` instead.
|
|
1353
|
+
*/
|
|
1354
|
+
class SkyDefinitionListModule {
|
|
1355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1356
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListModule, declarations: [SkyDefinitionListComponent,
|
|
1357
|
+
SkyDefinitionListContentComponent,
|
|
1358
|
+
SkyDefinitionListHeadingComponent,
|
|
1359
|
+
SkyDefinitionListLabelComponent,
|
|
1360
|
+
SkyDefinitionListValueComponent], imports: [CommonModule, SkyI18nModule, SkyLayoutResourcesModule], exports: [SkyDefinitionListComponent,
|
|
1361
|
+
SkyDefinitionListContentComponent,
|
|
1362
|
+
SkyDefinitionListHeadingComponent,
|
|
1363
|
+
SkyDefinitionListLabelComponent,
|
|
1364
|
+
SkyDefinitionListValueComponent] }); }
|
|
1365
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListModule, imports: [CommonModule, SkyI18nModule, SkyLayoutResourcesModule] }); }
|
|
1366
|
+
}
|
|
1367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDefinitionListModule, decorators: [{
|
|
1368
|
+
type: NgModule,
|
|
1369
|
+
args: [{
|
|
1370
|
+
declarations: [
|
|
1371
|
+
SkyDefinitionListComponent,
|
|
1372
|
+
SkyDefinitionListContentComponent,
|
|
1373
|
+
SkyDefinitionListHeadingComponent,
|
|
1374
|
+
SkyDefinitionListLabelComponent,
|
|
1375
|
+
SkyDefinitionListValueComponent,
|
|
1376
|
+
],
|
|
1377
|
+
imports: [CommonModule, SkyI18nModule, SkyLayoutResourcesModule],
|
|
1378
|
+
exports: [
|
|
1379
|
+
SkyDefinitionListComponent,
|
|
1380
|
+
SkyDefinitionListContentComponent,
|
|
1381
|
+
SkyDefinitionListHeadingComponent,
|
|
1382
|
+
SkyDefinitionListLabelComponent,
|
|
1383
|
+
SkyDefinitionListValueComponent,
|
|
1384
|
+
],
|
|
1385
|
+
}]
|
|
1386
|
+
}] });
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* @internal
|
|
1390
|
+
*/
|
|
1391
|
+
class SkyDescriptionListService {
|
|
1392
|
+
get defaultDescription() {
|
|
1393
|
+
return this.#_defaultDescription.asObservable();
|
|
1394
|
+
}
|
|
1395
|
+
#_defaultDescription = new BehaviorSubject('');
|
|
1396
|
+
ngOnDestroy() {
|
|
1397
|
+
this.#_defaultDescription.complete();
|
|
1398
|
+
}
|
|
1399
|
+
updateDefaultDescription(value) {
|
|
1400
|
+
this.#_defaultDescription.next(value);
|
|
1401
|
+
}
|
|
1402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1403
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListService }); }
|
|
1404
|
+
}
|
|
1405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListService, decorators: [{
|
|
1406
|
+
type: Injectable
|
|
1407
|
+
}] });
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Specifies the description in a term-description pair.
|
|
1411
|
+
*/
|
|
1412
|
+
class SkyDescriptionListDescriptionComponent {
|
|
1413
|
+
#changeDetector;
|
|
1414
|
+
#ngUnsubscribe = new Subject();
|
|
1415
|
+
#themeSvc;
|
|
1416
|
+
constructor(service, changeDetector, themeSvc) {
|
|
1417
|
+
this.service = service;
|
|
1418
|
+
this.#changeDetector = changeDetector;
|
|
1419
|
+
this.#themeSvc = themeSvc;
|
|
1420
|
+
}
|
|
1421
|
+
ngOnInit() {
|
|
1422
|
+
/* istanbul ignore else */
|
|
1423
|
+
if (this.#themeSvc) {
|
|
1424
|
+
this.#themeSvc.settingsChange
|
|
1425
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
1426
|
+
.subscribe((themeSettings) => {
|
|
1427
|
+
this.themeName = themeSettings.currentSettings.theme.name;
|
|
1428
|
+
this.#changeDetector.markForCheck();
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
ngOnDestroy() {
|
|
1433
|
+
this.#ngUnsubscribe.next();
|
|
1434
|
+
this.#ngUnsubscribe.complete();
|
|
1435
|
+
}
|
|
1436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListDescriptionComponent, deps: [{ token: SkyDescriptionListService }, { token: i0.ChangeDetectorRef }, { token: i1$1.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1437
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDescriptionListDescriptionComponent, selector: "sky-description-list-description", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["descriptionTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #descriptionTemplateRef>\n <span skyTrim class=\"sky-description-list-description\"\n ><ng-content></ng-content\n ></span>\n <span\n class=\"sky-description-list-default-value\"\n data-sky-id=\"sky-description-list-default-value\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern',\n 'sky-deemphasized': 'default'\n }\"\n >\n {{\n (service.defaultDescription | async) ||\n ('skyux_description_list_none_found' | skyLibResources)\n }}\n </span>\n</ng-template>\n", styles: [".sky-description-list-description:not(:empty)+.sky-description-list-default-value{display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "directive", type: i1$2.λ4, selector: "[skyTrim]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1438
|
+
}
|
|
1439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListDescriptionComponent, decorators: [{
|
|
1440
|
+
type: Component,
|
|
1441
|
+
args: [{ selector: 'sky-description-list-description', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #descriptionTemplateRef>\n <span skyTrim class=\"sky-description-list-description\"\n ><ng-content></ng-content\n ></span>\n <span\n class=\"sky-description-list-default-value\"\n data-sky-id=\"sky-description-list-default-value\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern',\n 'sky-deemphasized': 'default'\n }\"\n >\n {{\n (service.defaultDescription | async) ||\n ('skyux_description_list_none_found' | skyLibResources)\n }}\n </span>\n</ng-template>\n", styles: [".sky-description-list-description:not(:empty)+.sky-description-list-default-value{display:none}\n"] }]
|
|
1442
|
+
}], ctorParameters: function () { return [{ type: SkyDescriptionListService }, { type: i0.ChangeDetectorRef }, { type: i1$1.SkyThemeService, decorators: [{
|
|
1443
|
+
type: Optional
|
|
1444
|
+
}] }]; }, propDecorators: { templateRef: [{
|
|
1445
|
+
type: ViewChild,
|
|
1446
|
+
args: ['descriptionTemplateRef', {
|
|
1447
|
+
read: TemplateRef,
|
|
1448
|
+
static: true,
|
|
1449
|
+
}]
|
|
1450
|
+
}] } });
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Specifies the term in a term-description pair. To display a help button beside
|
|
1454
|
+
* the term, include a help button element in the sky-description-list-term element
|
|
1455
|
+
* and a sky-control-help CSS class on that element.
|
|
1456
|
+
*/
|
|
1457
|
+
class SkyDescriptionListTermComponent {
|
|
1458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListTermComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1459
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDescriptionListTermComponent, selector: "sky-description-list-term", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["termTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #termTemplateRef\n ><span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content></span\n></ng-template>\n", dependencies: [{ kind: "directive", type: i1$2.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1460
|
+
}
|
|
1461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListTermComponent, decorators: [{
|
|
1462
|
+
type: Component,
|
|
1463
|
+
args: [{ selector: 'sky-description-list-term', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #termTemplateRef\n ><span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content></span\n></ng-template>\n" }]
|
|
1464
|
+
}], propDecorators: { templateRef: [{
|
|
1465
|
+
type: ViewChild,
|
|
1466
|
+
args: ['termTemplateRef', {
|
|
1467
|
+
read: TemplateRef,
|
|
1468
|
+
static: true,
|
|
1469
|
+
}]
|
|
1470
|
+
}] } });
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* Wraps the term-description pairs in the description list.
|
|
1474
|
+
*/
|
|
1475
|
+
class SkyDescriptionListContentComponent {
|
|
1476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1477
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDescriptionListContentComponent, selector: "sky-description-list-content", queries: [{ propertyName: "termComponents", predicate: SkyDescriptionListTermComponent }, { propertyName: "descriptionComponents", predicate: SkyDescriptionListDescriptionComponent }], ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
1478
|
+
}
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListContentComponent, decorators: [{
|
|
1480
|
+
type: Component,
|
|
1481
|
+
args: [{ selector: 'sky-description-list-content', template: "<ng-content></ng-content>\n" }]
|
|
1482
|
+
}], propDecorators: { termComponents: [{
|
|
1483
|
+
type: ContentChildren,
|
|
1484
|
+
args: [SkyDescriptionListTermComponent]
|
|
1485
|
+
}], descriptionComponents: [{
|
|
1486
|
+
type: ContentChildren,
|
|
1487
|
+
args: [SkyDescriptionListDescriptionComponent]
|
|
1488
|
+
}] } });
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* @internal
|
|
1492
|
+
*/
|
|
1493
|
+
class SkyDescriptionListAdapterService {
|
|
1494
|
+
#renderer;
|
|
1495
|
+
constructor(rendererFactory) {
|
|
1496
|
+
this.#renderer = rendererFactory.createRenderer(undefined, null);
|
|
1497
|
+
}
|
|
1498
|
+
getWidth(elementRef) {
|
|
1499
|
+
return elementRef.nativeElement.clientWidth;
|
|
1500
|
+
}
|
|
1501
|
+
setResponsiveClass(element) {
|
|
1502
|
+
const nativeEl = element.nativeElement;
|
|
1503
|
+
const width = this.getWidth(element);
|
|
1504
|
+
const className = this.#getResponsiveClassName(width);
|
|
1505
|
+
this.#renderer.removeClass(nativeEl, 'sky-responsive-container-xs');
|
|
1506
|
+
this.#renderer.removeClass(nativeEl, 'sky-responsive-container-sm');
|
|
1507
|
+
this.#renderer.removeClass(nativeEl, 'sky-responsive-container-md');
|
|
1508
|
+
this.#renderer.addClass(nativeEl, className);
|
|
1509
|
+
}
|
|
1510
|
+
#getResponsiveClassName(width) {
|
|
1511
|
+
const xsBreakpointMaxPixels = 479;
|
|
1512
|
+
const smBreakpointMinPixels = 480;
|
|
1513
|
+
const smBreakpointMaxPixels = 767;
|
|
1514
|
+
if (width <= xsBreakpointMaxPixels) {
|
|
1515
|
+
return 'sky-responsive-container-xs';
|
|
1516
|
+
}
|
|
1517
|
+
else if (width >= smBreakpointMinPixels &&
|
|
1518
|
+
width <= smBreakpointMaxPixels) {
|
|
1519
|
+
return 'sky-responsive-container-sm';
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
return 'sky-responsive-container-md';
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1526
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListAdapterService }); }
|
|
1527
|
+
}
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListAdapterService, decorators: [{
|
|
1529
|
+
type: Injectable
|
|
1530
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Creates a description list to display term-description pairs.
|
|
1534
|
+
*/
|
|
1535
|
+
class SkyDescriptionListComponent {
|
|
1536
|
+
/**
|
|
1537
|
+
* The default description to display when no description is provided
|
|
1538
|
+
* for a term-description pair.
|
|
1539
|
+
* @default "None found"
|
|
1540
|
+
*/
|
|
1541
|
+
set defaultDescription(value) {
|
|
1542
|
+
this.#descriptionListService.updateDefaultDescription(value);
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* How to display term-description pairs within the description list.
|
|
1546
|
+
* @default "vertical"
|
|
1547
|
+
*/
|
|
1548
|
+
set mode(value) {
|
|
1549
|
+
this.#_mode = value || 'vertical';
|
|
1550
|
+
}
|
|
1551
|
+
get mode() {
|
|
1552
|
+
return this.#_mode;
|
|
1553
|
+
}
|
|
1554
|
+
#ngUnsubscribe = new Subject();
|
|
1555
|
+
#_mode = 'vertical';
|
|
1556
|
+
#adapterService;
|
|
1557
|
+
#changeDetector;
|
|
1558
|
+
#descriptionListService;
|
|
1559
|
+
constructor(adapterService, changeDetector, descriptionListService) {
|
|
1560
|
+
this.#adapterService = adapterService;
|
|
1561
|
+
this.#changeDetector = changeDetector;
|
|
1562
|
+
this.#descriptionListService = descriptionListService;
|
|
1563
|
+
}
|
|
1564
|
+
ngAfterContentInit() {
|
|
1565
|
+
// Wait for all content to render before detecting parent width.
|
|
1566
|
+
setTimeout(() => {
|
|
1567
|
+
this.#updateResponsiveClass();
|
|
1568
|
+
});
|
|
1569
|
+
// istanbul ignore else
|
|
1570
|
+
if (this.contentComponents) {
|
|
1571
|
+
this.contentComponents.changes
|
|
1572
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
1573
|
+
.subscribe(() => {
|
|
1574
|
+
this.#changeDetector.markForCheck();
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
ngOnDestroy() {
|
|
1579
|
+
this.#ngUnsubscribe.next();
|
|
1580
|
+
this.#ngUnsubscribe.complete();
|
|
1581
|
+
}
|
|
1582
|
+
onWindowResize() {
|
|
1583
|
+
this.#updateResponsiveClass();
|
|
1584
|
+
}
|
|
1585
|
+
#updateResponsiveClass() {
|
|
1586
|
+
if (this.elementRef) {
|
|
1587
|
+
this.#adapterService.setResponsiveClass(this.elementRef);
|
|
1588
|
+
this.#changeDetector.markForCheck();
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListComponent, deps: [{ token: SkyDescriptionListAdapterService }, { token: i0.ChangeDetectorRef }, { token: SkyDescriptionListService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1592
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyDescriptionListComponent, selector: "sky-description-list", inputs: { defaultDescription: "defaultDescription", listItemWidth: "listItemWidth", mode: "mode" }, host: { listeners: { "window:resize": "onWindowResize()" } }, providers: [SkyDescriptionListAdapterService, SkyDescriptionListService], queries: [{ propertyName: "contentComponents", predicate: SkyDescriptionListContentComponent }], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["descriptionListElement"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<dl\n class=\"sky-description-list\"\n [ngClass]=\"{\n 'sky-description-list-long-description-mode': mode === 'longDescription',\n 'sky-description-list-vertical-mode': mode === 'vertical',\n 'sky-description-list-horizontal-mode': mode === 'horizontal'\n }\"\n #descriptionListElement\n>\n <!--\n Wrapping div is for horizontal flexing. Also injecting children's templateRef directly\n to avoid adding non-semantic HTML tags to DOM\n -->\n <div\n *ngFor=\"let contentComponent of contentComponents\"\n class=\"sky-description-list-content\"\n [style.width]=\"mode === 'horizontal' ? listItemWidth : ''\"\n >\n <dt *ngFor=\"let termComponent of contentComponent?.termComponents\">\n <ng-container *ngIf=\"termComponent.templateRef\">\n <ng-container\n *ngTemplateOutlet=\"termComponent.templateRef\"\n ></ng-container>\n </ng-container>\n </dt>\n <dd\n *ngFor=\"\n let descriptionComponent of contentComponent?.descriptionComponents\n \"\n >\n <ng-container *ngIf=\"descriptionComponent.templateRef\">\n <ng-container\n *ngTemplateOutlet=\"descriptionComponent.templateRef\"\n ></ng-container>\n </ng-container>\n </dd>\n </div>\n</dl>\n", styles: [":host{display:block}.sky-description-list{margin:0;padding:0}.sky-description-list dt{color:#686c73;font-size:14px;font-weight:400;margin:0 0 3px;padding:0}.sky-description-list dd{margin:0;padding:0}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content{width:auto}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 15px}.sky-description-list.sky-description-list-horizontal-mode{display:flex;flex-wrap:wrap;margin:0 0 var(--sky-compat-description-list-margin-bottom, -15px) 0}.sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 15px;padding:0 60px 0 0;min-width:100px;width:auto}.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-xs .sky-description-list-content,.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-sm .sky-description-list-content{width:50%}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content{display:flex}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content:not(:last-child){margin:0 0 10px}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dt{color:#212327;font-size:16px;font-weight:600;margin:0 20px 0 0;width:25%;word-break:break-word}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dd{flex:1}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content{flex-direction:column}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dt{margin:0 0 3px;width:100%}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dd{margin:0 0 10px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode dt{color:#686c73;font-size:14px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode dd{font-size:16px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-horizontal-mode{margin:0 0 -20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode dt{color:inherit;font-weight:700;font-size:inherit}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode dd{font-size:16px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dt{margin:0 0 5px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dd{margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode dt{color:#686c73;font-size:14px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode dd{font-size:16px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-horizontal-mode{margin:0 0 -20px}.sky-theme-modern .sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode dt{color:inherit;font-weight:700;font-size:inherit}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode dd{font-size:16px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dt{margin:0 0 5px}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dd{margin:0 0 20px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1593
|
+
}
|
|
1594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListComponent, decorators: [{
|
|
1595
|
+
type: Component,
|
|
1596
|
+
args: [{ selector: 'sky-description-list', providers: [SkyDescriptionListAdapterService, SkyDescriptionListService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<dl\n class=\"sky-description-list\"\n [ngClass]=\"{\n 'sky-description-list-long-description-mode': mode === 'longDescription',\n 'sky-description-list-vertical-mode': mode === 'vertical',\n 'sky-description-list-horizontal-mode': mode === 'horizontal'\n }\"\n #descriptionListElement\n>\n <!--\n Wrapping div is for horizontal flexing. Also injecting children's templateRef directly\n to avoid adding non-semantic HTML tags to DOM\n -->\n <div\n *ngFor=\"let contentComponent of contentComponents\"\n class=\"sky-description-list-content\"\n [style.width]=\"mode === 'horizontal' ? listItemWidth : ''\"\n >\n <dt *ngFor=\"let termComponent of contentComponent?.termComponents\">\n <ng-container *ngIf=\"termComponent.templateRef\">\n <ng-container\n *ngTemplateOutlet=\"termComponent.templateRef\"\n ></ng-container>\n </ng-container>\n </dt>\n <dd\n *ngFor=\"\n let descriptionComponent of contentComponent?.descriptionComponents\n \"\n >\n <ng-container *ngIf=\"descriptionComponent.templateRef\">\n <ng-container\n *ngTemplateOutlet=\"descriptionComponent.templateRef\"\n ></ng-container>\n </ng-container>\n </dd>\n </div>\n</dl>\n", styles: [":host{display:block}.sky-description-list{margin:0;padding:0}.sky-description-list dt{color:#686c73;font-size:14px;font-weight:400;margin:0 0 3px;padding:0}.sky-description-list dd{margin:0;padding:0}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content{width:auto}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 15px}.sky-description-list.sky-description-list-horizontal-mode{display:flex;flex-wrap:wrap;margin:0 0 var(--sky-compat-description-list-margin-bottom, -15px) 0}.sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 15px;padding:0 60px 0 0;min-width:100px;width:auto}.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-xs .sky-description-list-content,.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-sm .sky-description-list-content{width:50%}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content{display:flex}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content:not(:last-child){margin:0 0 10px}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dt{color:#212327;font-size:16px;font-weight:600;margin:0 20px 0 0;width:25%;word-break:break-word}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dd{flex:1}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content{flex-direction:column}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dt{margin:0 0 3px;width:100%}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dd{margin:0 0 10px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode dt{color:#686c73;font-size:14px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-vertical-mode dd{font-size:16px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-horizontal-mode{margin:0 0 -20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 20px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode dt{color:inherit;font-weight:700;font-size:inherit}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode dd{font-size:16px;font-weight:400}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dt{margin:0 0 5px}:host-context(.sky-theme-modern) .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dd{margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode dt{color:#686c73;font-size:14px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-vertical-mode dd{font-size:16px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-horizontal-mode{margin:0 0 -20px}.sky-theme-modern .sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 20px}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode dt{color:inherit;font-weight:700;font-size:inherit}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode dd{font-size:16px;font-weight:400}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dt{margin:0 0 5px}.sky-theme-modern .sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs dd{margin:0 0 20px}\n"] }]
|
|
1597
|
+
}], ctorParameters: function () { return [{ type: SkyDescriptionListAdapterService }, { type: i0.ChangeDetectorRef }, { type: SkyDescriptionListService }]; }, propDecorators: { defaultDescription: [{
|
|
1598
|
+
type: Input
|
|
1599
|
+
}], listItemWidth: [{
|
|
1600
|
+
type: Input
|
|
1601
|
+
}], mode: [{
|
|
1602
|
+
type: Input
|
|
1603
|
+
}], contentComponents: [{
|
|
1604
|
+
type: ContentChildren,
|
|
1605
|
+
args: [SkyDescriptionListContentComponent]
|
|
1606
|
+
}], elementRef: [{
|
|
1607
|
+
type: ViewChild,
|
|
1608
|
+
args: ['descriptionListElement', {
|
|
1609
|
+
read: ElementRef,
|
|
1610
|
+
static: true,
|
|
1611
|
+
}]
|
|
1612
|
+
}], onWindowResize: [{
|
|
1613
|
+
type: HostListener,
|
|
1614
|
+
args: ['window:resize']
|
|
1615
|
+
}] } });
|
|
1616
|
+
|
|
1617
|
+
class SkyDescriptionListModule {
|
|
1618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1619
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListModule, declarations: [SkyDescriptionListComponent,
|
|
1620
|
+
SkyDescriptionListContentComponent,
|
|
1621
|
+
SkyDescriptionListTermComponent,
|
|
1622
|
+
SkyDescriptionListDescriptionComponent], imports: [CommonModule,
|
|
1623
|
+
SkyI18nModule,
|
|
1624
|
+
SkyLayoutResourcesModule,
|
|
1625
|
+
SkyThemeModule,
|
|
1626
|
+
SkyTrimModule], exports: [SkyDescriptionListComponent,
|
|
1627
|
+
SkyDescriptionListContentComponent,
|
|
1628
|
+
SkyDescriptionListTermComponent,
|
|
1629
|
+
SkyDescriptionListDescriptionComponent] }); }
|
|
1630
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListModule, imports: [CommonModule,
|
|
1631
|
+
SkyI18nModule,
|
|
1632
|
+
SkyLayoutResourcesModule,
|
|
1633
|
+
SkyThemeModule,
|
|
1634
|
+
SkyTrimModule] }); }
|
|
1635
|
+
}
|
|
1636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyDescriptionListModule, decorators: [{
|
|
1637
|
+
type: NgModule,
|
|
1638
|
+
args: [{
|
|
1639
|
+
declarations: [
|
|
1640
|
+
SkyDescriptionListComponent,
|
|
1641
|
+
SkyDescriptionListContentComponent,
|
|
1642
|
+
SkyDescriptionListTermComponent,
|
|
1643
|
+
SkyDescriptionListDescriptionComponent,
|
|
1644
|
+
],
|
|
1645
|
+
imports: [
|
|
1646
|
+
CommonModule,
|
|
1647
|
+
SkyI18nModule,
|
|
1648
|
+
SkyLayoutResourcesModule,
|
|
1649
|
+
SkyThemeModule,
|
|
1650
|
+
SkyTrimModule,
|
|
1651
|
+
],
|
|
1652
|
+
exports: [
|
|
1653
|
+
SkyDescriptionListComponent,
|
|
1654
|
+
SkyDescriptionListContentComponent,
|
|
1655
|
+
SkyDescriptionListTermComponent,
|
|
1656
|
+
SkyDescriptionListDescriptionComponent,
|
|
1657
|
+
],
|
|
1658
|
+
}]
|
|
1659
|
+
}] });
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* @deprecated Use `SkyDescriptionListModeType` instead.
|
|
1663
|
+
* @internal
|
|
1664
|
+
* How to display the term-description pairs within a description list.
|
|
1665
|
+
*/
|
|
1666
|
+
var SkyDescriptionListMode;
|
|
1667
|
+
(function (SkyDescriptionListMode) {
|
|
1668
|
+
/**
|
|
1669
|
+
* Displays term-description pairs side by side in a horizontal list.
|
|
1670
|
+
* This mode provides a responsive layout.
|
|
1671
|
+
*/
|
|
1672
|
+
SkyDescriptionListMode["horizontal"] = "horizontal";
|
|
1673
|
+
/**
|
|
1674
|
+
* Displays terms and descriptions side by side with the term on the left and the description
|
|
1675
|
+
* on the right. This mode includes room for long descriptions and uses a responsive layout
|
|
1676
|
+
* that stacks term-description pairs vertically.
|
|
1677
|
+
*/
|
|
1678
|
+
SkyDescriptionListMode["longDescription"] = "longDescription";
|
|
1679
|
+
/**
|
|
1680
|
+
* Displays term-description pairs in a vertical list.
|
|
1681
|
+
*/
|
|
1682
|
+
SkyDescriptionListMode["vertical"] = "vertical";
|
|
1683
|
+
})(SkyDescriptionListMode || (SkyDescriptionListMode = {}));
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Displays a column within a row of the fluid grid.
|
|
1687
|
+
*/
|
|
1688
|
+
class SkyColumnComponent {
|
|
1689
|
+
/**
|
|
1690
|
+
* The number of columns (1-12) on extra-small screens
|
|
1691
|
+
* (less than 768px). If you do not specify a value, the fluid grid displays
|
|
1692
|
+
* the column at the full width of the screen.
|
|
1693
|
+
* @default 12
|
|
1694
|
+
*/
|
|
1695
|
+
set screenXSmall(value) {
|
|
1696
|
+
this.#_screenXSmall = value ?? 12;
|
|
1697
|
+
}
|
|
1698
|
+
get screenXSmall() {
|
|
1699
|
+
return this.#_screenXSmall;
|
|
1700
|
+
}
|
|
1701
|
+
#_screenXSmall = 12;
|
|
1702
|
+
ngOnChanges(changes) {
|
|
1703
|
+
/* istanbul ignore else */
|
|
1704
|
+
if (changes['screenXSmall'] ||
|
|
1705
|
+
changes['screenSmall'] ||
|
|
1706
|
+
changes['screenMedium'] ||
|
|
1707
|
+
changes['screenLarge']) {
|
|
1708
|
+
this.classnames = this.getClassNames();
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
getClassNames() {
|
|
1712
|
+
const classnames = ['sky-column'];
|
|
1713
|
+
if (this.screenXSmall) {
|
|
1714
|
+
classnames.push(`sky-column-xs-${this.screenXSmall}`);
|
|
1715
|
+
}
|
|
1716
|
+
if (this.screenSmall) {
|
|
1717
|
+
classnames.push(`sky-column-sm-${this.screenSmall}`);
|
|
1718
|
+
}
|
|
1719
|
+
if (this.screenMedium) {
|
|
1720
|
+
classnames.push(`sky-column-md-${this.screenMedium}`);
|
|
1721
|
+
}
|
|
1722
|
+
if (this.screenLarge) {
|
|
1723
|
+
classnames.push(`sky-column-lg-${this.screenLarge}`);
|
|
1724
|
+
}
|
|
1725
|
+
return classnames.join(' ');
|
|
1726
|
+
}
|
|
1727
|
+
ngOnInit() {
|
|
1728
|
+
this.classnames = this.getClassNames();
|
|
1729
|
+
}
|
|
1730
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1731
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyColumnComponent, selector: "sky-column", inputs: { screenXSmall: "screenXSmall", screenSmall: "screenSmall", screenMedium: "screenMedium", screenLarge: "screenLarge" }, host: { properties: { "class": "this.classnames" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["sky-column.sky-column{padding-right:15px;padding-left:15px;width:100%;min-height:1px}.sky-theme-modern sky-column.sky-column{padding-right:30px;padding-left:30px}.sky-fluid-grid-gutter-size-small sky-column.sky-column{padding-right:5px;padding-left:5px}.sky-fluid-grid-gutter-size-medium sky-column.sky-column{padding-right:10px;padding-left:10px}.sky-theme-modern .sky-fluid-grid-gutter-size-small sky-column.sky-column{padding-right:10px;padding-left:10px}.sky-theme-modern .sky-fluid-grid-gutter-size-medium sky-column.sky-column{padding-right:15px;padding-left:15px}sky-column.sky-column-xs-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-xs-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-xs-3{width:25%}sky-column.sky-column-xs-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-xs-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-xs-6{width:50%}sky-column.sky-column-xs-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-xs-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-xs-9{width:75%}sky-column.sky-column-xs-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-xs-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-xs-12{width:100%}sky-column:not([class*=sky-column-xs-]){width:100%}.sky-responsive-container-xs sky-column.sky-column-xs-1,.sky-responsive-container-sm sky-column.sky-column-xs-1,.sky-responsive-container-md sky-column.sky-column-xs-1,.sky-responsive-container-lg sky-column.sky-column-xs-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-2,.sky-responsive-container-sm sky-column.sky-column-xs-2,.sky-responsive-container-md sky-column.sky-column-xs-2,.sky-responsive-container-lg sky-column.sky-column-xs-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-3,.sky-responsive-container-sm sky-column.sky-column-xs-3,.sky-responsive-container-md sky-column.sky-column-xs-3,.sky-responsive-container-lg sky-column.sky-column-xs-3{width:25%}.sky-responsive-container-xs sky-column.sky-column-xs-4,.sky-responsive-container-sm sky-column.sky-column-xs-4,.sky-responsive-container-md sky-column.sky-column-xs-4,.sky-responsive-container-lg sky-column.sky-column-xs-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-5,.sky-responsive-container-sm sky-column.sky-column-xs-5,.sky-responsive-container-md sky-column.sky-column-xs-5,.sky-responsive-container-lg sky-column.sky-column-xs-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-6,.sky-responsive-container-sm sky-column.sky-column-xs-6,.sky-responsive-container-md sky-column.sky-column-xs-6,.sky-responsive-container-lg sky-column.sky-column-xs-6{width:50%}.sky-responsive-container-xs sky-column.sky-column-xs-7,.sky-responsive-container-sm sky-column.sky-column-xs-7,.sky-responsive-container-md sky-column.sky-column-xs-7,.sky-responsive-container-lg sky-column.sky-column-xs-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-8,.sky-responsive-container-sm sky-column.sky-column-xs-8,.sky-responsive-container-md sky-column.sky-column-xs-8,.sky-responsive-container-lg sky-column.sky-column-xs-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-9,.sky-responsive-container-sm sky-column.sky-column-xs-9,.sky-responsive-container-md sky-column.sky-column-xs-9,.sky-responsive-container-lg sky-column.sky-column-xs-9{width:75%}.sky-responsive-container-xs sky-column.sky-column-xs-10,.sky-responsive-container-sm sky-column.sky-column-xs-10,.sky-responsive-container-md sky-column.sky-column-xs-10,.sky-responsive-container-lg sky-column.sky-column-xs-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-11,.sky-responsive-container-sm sky-column.sky-column-xs-11,.sky-responsive-container-md sky-column.sky-column-xs-11,.sky-responsive-container-lg sky-column.sky-column-xs-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-12,.sky-responsive-container-sm sky-column.sky-column-xs-12,.sky-responsive-container-md sky-column.sky-column-xs-12,.sky-responsive-container-lg sky-column.sky-column-xs-12{width:100%}.sky-responsive-container-xs sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-sm sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-md sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-lg sky-column:not([class*=sky-column-xs-]){width:100%}@media (min-width: 768px){sky-column.sky-column-sm-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-sm-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-sm-3{width:25%}sky-column.sky-column-sm-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-sm-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-sm-6{width:50%}sky-column.sky-column-sm-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-sm-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-sm-9{width:75%}sky-column.sky-column-sm-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-sm-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-sm-12{width:100%}}.sky-responsive-container-sm sky-column.sky-column-sm-1,.sky-responsive-container-md sky-column.sky-column-sm-1,.sky-responsive-container-lg sky-column.sky-column-sm-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-2,.sky-responsive-container-md sky-column.sky-column-sm-2,.sky-responsive-container-lg sky-column.sky-column-sm-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-3,.sky-responsive-container-md sky-column.sky-column-sm-3,.sky-responsive-container-lg sky-column.sky-column-sm-3{width:25%}.sky-responsive-container-sm sky-column.sky-column-sm-4,.sky-responsive-container-md sky-column.sky-column-sm-4,.sky-responsive-container-lg sky-column.sky-column-sm-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-5,.sky-responsive-container-md sky-column.sky-column-sm-5,.sky-responsive-container-lg sky-column.sky-column-sm-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-6,.sky-responsive-container-md sky-column.sky-column-sm-6,.sky-responsive-container-lg sky-column.sky-column-sm-6{width:50%}.sky-responsive-container-sm sky-column.sky-column-sm-7,.sky-responsive-container-md sky-column.sky-column-sm-7,.sky-responsive-container-lg sky-column.sky-column-sm-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-8,.sky-responsive-container-md sky-column.sky-column-sm-8,.sky-responsive-container-lg sky-column.sky-column-sm-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-9,.sky-responsive-container-md sky-column.sky-column-sm-9,.sky-responsive-container-lg sky-column.sky-column-sm-9{width:75%}.sky-responsive-container-sm sky-column.sky-column-sm-10,.sky-responsive-container-md sky-column.sky-column-sm-10,.sky-responsive-container-lg sky-column.sky-column-sm-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-11,.sky-responsive-container-md sky-column.sky-column-sm-11,.sky-responsive-container-lg sky-column.sky-column-sm-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-12,.sky-responsive-container-md sky-column.sky-column-sm-12,.sky-responsive-container-lg sky-column.sky-column-sm-12{width:100%}@media (min-width: 992px){sky-column.sky-column-md-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-md-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-md-3{width:25%}sky-column.sky-column-md-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-md-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-md-6{width:50%}sky-column.sky-column-md-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-md-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-md-9{width:75%}sky-column.sky-column-md-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-md-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-md-12{width:100%}}.sky-responsive-container-md sky-column.sky-column-md-1,.sky-responsive-container-lg sky-column.sky-column-md-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-2,.sky-responsive-container-lg sky-column.sky-column-md-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-3,.sky-responsive-container-lg sky-column.sky-column-md-3{width:25%}.sky-responsive-container-md sky-column.sky-column-md-4,.sky-responsive-container-lg sky-column.sky-column-md-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-5,.sky-responsive-container-lg sky-column.sky-column-md-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-6,.sky-responsive-container-lg sky-column.sky-column-md-6{width:50%}.sky-responsive-container-md sky-column.sky-column-md-7,.sky-responsive-container-lg sky-column.sky-column-md-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-8,.sky-responsive-container-lg sky-column.sky-column-md-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-9,.sky-responsive-container-lg sky-column.sky-column-md-9{width:75%}.sky-responsive-container-md sky-column.sky-column-md-10,.sky-responsive-container-lg sky-column.sky-column-md-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-11,.sky-responsive-container-lg sky-column.sky-column-md-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-12,.sky-responsive-container-lg sky-column.sky-column-md-12{width:100%}@media (min-width: 1200px){sky-column.sky-column-lg-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-lg-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-lg-3{width:25%}sky-column.sky-column-lg-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-lg-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-lg-6{width:50%}sky-column.sky-column-lg-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-lg-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-lg-9{width:75%}sky-column.sky-column-lg-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-lg-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-lg-12{width:100%}}.sky-responsive-container-lg sky-column.sky-column-lg-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-3{width:25%}.sky-responsive-container-lg sky-column.sky-column-lg-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-6{width:50%}.sky-responsive-container-lg sky-column.sky-column-lg-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-9{width:75%}.sky-responsive-container-lg sky-column.sky-column-lg-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-12{width:100%}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1732
|
+
}
|
|
1733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyColumnComponent, decorators: [{
|
|
1734
|
+
type: Component,
|
|
1735
|
+
args: [{ selector: 'sky-column', encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>\n", styles: ["sky-column.sky-column{padding-right:15px;padding-left:15px;width:100%;min-height:1px}.sky-theme-modern sky-column.sky-column{padding-right:30px;padding-left:30px}.sky-fluid-grid-gutter-size-small sky-column.sky-column{padding-right:5px;padding-left:5px}.sky-fluid-grid-gutter-size-medium sky-column.sky-column{padding-right:10px;padding-left:10px}.sky-theme-modern .sky-fluid-grid-gutter-size-small sky-column.sky-column{padding-right:10px;padding-left:10px}.sky-theme-modern .sky-fluid-grid-gutter-size-medium sky-column.sky-column{padding-right:15px;padding-left:15px}sky-column.sky-column-xs-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-xs-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-xs-3{width:25%}sky-column.sky-column-xs-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-xs-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-xs-6{width:50%}sky-column.sky-column-xs-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-xs-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-xs-9{width:75%}sky-column.sky-column-xs-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-xs-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-xs-12{width:100%}sky-column:not([class*=sky-column-xs-]){width:100%}.sky-responsive-container-xs sky-column.sky-column-xs-1,.sky-responsive-container-sm sky-column.sky-column-xs-1,.sky-responsive-container-md sky-column.sky-column-xs-1,.sky-responsive-container-lg sky-column.sky-column-xs-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-2,.sky-responsive-container-sm sky-column.sky-column-xs-2,.sky-responsive-container-md sky-column.sky-column-xs-2,.sky-responsive-container-lg sky-column.sky-column-xs-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-3,.sky-responsive-container-sm sky-column.sky-column-xs-3,.sky-responsive-container-md sky-column.sky-column-xs-3,.sky-responsive-container-lg sky-column.sky-column-xs-3{width:25%}.sky-responsive-container-xs sky-column.sky-column-xs-4,.sky-responsive-container-sm sky-column.sky-column-xs-4,.sky-responsive-container-md sky-column.sky-column-xs-4,.sky-responsive-container-lg sky-column.sky-column-xs-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-5,.sky-responsive-container-sm sky-column.sky-column-xs-5,.sky-responsive-container-md sky-column.sky-column-xs-5,.sky-responsive-container-lg sky-column.sky-column-xs-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-6,.sky-responsive-container-sm sky-column.sky-column-xs-6,.sky-responsive-container-md sky-column.sky-column-xs-6,.sky-responsive-container-lg sky-column.sky-column-xs-6{width:50%}.sky-responsive-container-xs sky-column.sky-column-xs-7,.sky-responsive-container-sm sky-column.sky-column-xs-7,.sky-responsive-container-md sky-column.sky-column-xs-7,.sky-responsive-container-lg sky-column.sky-column-xs-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-8,.sky-responsive-container-sm sky-column.sky-column-xs-8,.sky-responsive-container-md sky-column.sky-column-xs-8,.sky-responsive-container-lg sky-column.sky-column-xs-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-9,.sky-responsive-container-sm sky-column.sky-column-xs-9,.sky-responsive-container-md sky-column.sky-column-xs-9,.sky-responsive-container-lg sky-column.sky-column-xs-9{width:75%}.sky-responsive-container-xs sky-column.sky-column-xs-10,.sky-responsive-container-sm sky-column.sky-column-xs-10,.sky-responsive-container-md sky-column.sky-column-xs-10,.sky-responsive-container-lg sky-column.sky-column-xs-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-11,.sky-responsive-container-sm sky-column.sky-column-xs-11,.sky-responsive-container-md sky-column.sky-column-xs-11,.sky-responsive-container-lg sky-column.sky-column-xs-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-xs sky-column.sky-column-xs-12,.sky-responsive-container-sm sky-column.sky-column-xs-12,.sky-responsive-container-md sky-column.sky-column-xs-12,.sky-responsive-container-lg sky-column.sky-column-xs-12{width:100%}.sky-responsive-container-xs sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-sm sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-md sky-column:not([class*=sky-column-xs-]),.sky-responsive-container-lg sky-column:not([class*=sky-column-xs-]){width:100%}@media (min-width: 768px){sky-column.sky-column-sm-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-sm-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-sm-3{width:25%}sky-column.sky-column-sm-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-sm-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-sm-6{width:50%}sky-column.sky-column-sm-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-sm-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-sm-9{width:75%}sky-column.sky-column-sm-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-sm-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-sm-12{width:100%}}.sky-responsive-container-sm sky-column.sky-column-sm-1,.sky-responsive-container-md sky-column.sky-column-sm-1,.sky-responsive-container-lg sky-column.sky-column-sm-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-2,.sky-responsive-container-md sky-column.sky-column-sm-2,.sky-responsive-container-lg sky-column.sky-column-sm-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-3,.sky-responsive-container-md sky-column.sky-column-sm-3,.sky-responsive-container-lg sky-column.sky-column-sm-3{width:25%}.sky-responsive-container-sm sky-column.sky-column-sm-4,.sky-responsive-container-md sky-column.sky-column-sm-4,.sky-responsive-container-lg sky-column.sky-column-sm-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-5,.sky-responsive-container-md sky-column.sky-column-sm-5,.sky-responsive-container-lg sky-column.sky-column-sm-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-6,.sky-responsive-container-md sky-column.sky-column-sm-6,.sky-responsive-container-lg sky-column.sky-column-sm-6{width:50%}.sky-responsive-container-sm sky-column.sky-column-sm-7,.sky-responsive-container-md sky-column.sky-column-sm-7,.sky-responsive-container-lg sky-column.sky-column-sm-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-8,.sky-responsive-container-md sky-column.sky-column-sm-8,.sky-responsive-container-lg sky-column.sky-column-sm-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-9,.sky-responsive-container-md sky-column.sky-column-sm-9,.sky-responsive-container-lg sky-column.sky-column-sm-9{width:75%}.sky-responsive-container-sm sky-column.sky-column-sm-10,.sky-responsive-container-md sky-column.sky-column-sm-10,.sky-responsive-container-lg sky-column.sky-column-sm-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-11,.sky-responsive-container-md sky-column.sky-column-sm-11,.sky-responsive-container-lg sky-column.sky-column-sm-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-sm sky-column.sky-column-sm-12,.sky-responsive-container-md sky-column.sky-column-sm-12,.sky-responsive-container-lg sky-column.sky-column-sm-12{width:100%}@media (min-width: 992px){sky-column.sky-column-md-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-md-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-md-3{width:25%}sky-column.sky-column-md-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-md-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-md-6{width:50%}sky-column.sky-column-md-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-md-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-md-9{width:75%}sky-column.sky-column-md-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-md-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-md-12{width:100%}}.sky-responsive-container-md sky-column.sky-column-md-1,.sky-responsive-container-lg sky-column.sky-column-md-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-2,.sky-responsive-container-lg sky-column.sky-column-md-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-3,.sky-responsive-container-lg sky-column.sky-column-md-3{width:25%}.sky-responsive-container-md sky-column.sky-column-md-4,.sky-responsive-container-lg sky-column.sky-column-md-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-5,.sky-responsive-container-lg sky-column.sky-column-md-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-6,.sky-responsive-container-lg sky-column.sky-column-md-6{width:50%}.sky-responsive-container-md sky-column.sky-column-md-7,.sky-responsive-container-lg sky-column.sky-column-md-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-8,.sky-responsive-container-lg sky-column.sky-column-md-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-9,.sky-responsive-container-lg sky-column.sky-column-md-9{width:75%}.sky-responsive-container-md sky-column.sky-column-md-10,.sky-responsive-container-lg sky-column.sky-column-md-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-11,.sky-responsive-container-lg sky-column.sky-column-md-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-md sky-column.sky-column-md-12,.sky-responsive-container-lg sky-column.sky-column-md-12{width:100%}@media (min-width: 1200px){sky-column.sky-column-lg-1{width:calc(1 / 12 * 100%)}sky-column.sky-column-lg-2{width:calc(2 / 12 * 100%)}sky-column.sky-column-lg-3{width:25%}sky-column.sky-column-lg-4{width:calc(4 / 12 * 100%)}sky-column.sky-column-lg-5{width:calc(5 / 12 * 100%)}sky-column.sky-column-lg-6{width:50%}sky-column.sky-column-lg-7{width:calc(7 / 12 * 100%)}sky-column.sky-column-lg-8{width:calc(8 / 12 * 100%)}sky-column.sky-column-lg-9{width:75%}sky-column.sky-column-lg-10{width:calc(10 / 12 * 100%)}sky-column.sky-column-lg-11{width:calc(11 / 12 * 100%)}sky-column.sky-column-lg-12{width:100%}}.sky-responsive-container-lg sky-column.sky-column-lg-1{width:calc(1 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-2{width:calc(2 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-3{width:25%}.sky-responsive-container-lg sky-column.sky-column-lg-4{width:calc(4 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-5{width:calc(5 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-6{width:50%}.sky-responsive-container-lg sky-column.sky-column-lg-7{width:calc(7 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-8{width:calc(8 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-9{width:75%}.sky-responsive-container-lg sky-column.sky-column-lg-10{width:calc(10 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-11{width:calc(11 / 12 * 100%)}.sky-responsive-container-lg sky-column.sky-column-lg-12{width:100%}\n"] }]
|
|
1736
|
+
}], propDecorators: { screenXSmall: [{
|
|
1737
|
+
type: Input
|
|
1738
|
+
}], screenSmall: [{
|
|
1739
|
+
type: Input
|
|
1740
|
+
}], screenMedium: [{
|
|
1741
|
+
type: Input
|
|
1742
|
+
}], screenLarge: [{
|
|
1743
|
+
type: Input
|
|
1744
|
+
}], classnames: [{
|
|
1745
|
+
type: HostBinding,
|
|
1746
|
+
args: ['class']
|
|
1747
|
+
}] } });
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Wraps the fluid grid to ensure proper spacing. Without the wrapper, the
|
|
1751
|
+
* alignment, padding, and margins do not behave as expected.
|
|
1752
|
+
*/
|
|
1753
|
+
class SkyFluidGridComponent {
|
|
1754
|
+
constructor() {
|
|
1755
|
+
/**
|
|
1756
|
+
* Disables the outer left and right margin of the fluid grid container.
|
|
1757
|
+
* @default false
|
|
1758
|
+
*/
|
|
1759
|
+
this.disableMargin = false;
|
|
1760
|
+
this.#_gutterSize = 'large';
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* The type that defines the size of the padding
|
|
1764
|
+
* between columns.
|
|
1765
|
+
* @default "large"
|
|
1766
|
+
*/
|
|
1767
|
+
set gutterSize(value) {
|
|
1768
|
+
this.#_gutterSize = value ?? 'large';
|
|
1769
|
+
}
|
|
1770
|
+
get gutterSize() {
|
|
1771
|
+
return this.#_gutterSize;
|
|
1772
|
+
}
|
|
1773
|
+
#_gutterSize;
|
|
1774
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1775
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyFluidGridComponent, selector: "sky-fluid-grid", inputs: { disableMargin: "disableMargin", gutterSize: "gutterSize" }, ngImport: i0, template: "<div\n class=\"sky-fluid-grid\"\n [ngClass]=\"{\n 'sky-fluid-grid-gutter-size-small': gutterSize === 'small',\n 'sky-fluid-grid-gutter-size-medium': gutterSize === 'medium',\n 'sky-fluid-grid-gutter-size-large': gutterSize === 'large',\n 'sky-fluid-grid-no-margin': disableMargin\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sky-fluid-grid-gutter-size-small{padding-left:5px;padding-right:5px}.sky-fluid-grid-gutter-size-medium{padding-left:10px;padding-right:10px}.sky-fluid-grid-gutter-size-large{padding-left:15px;padding-right:15px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-small{padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-medium{padding-left:15px;padding-right:15px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-large{padding-left:30px;padding-right:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1776
|
+
}
|
|
1777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridComponent, decorators: [{
|
|
1778
|
+
type: Component,
|
|
1779
|
+
args: [{ selector: 'sky-fluid-grid', template: "<div\n class=\"sky-fluid-grid\"\n [ngClass]=\"{\n 'sky-fluid-grid-gutter-size-small': gutterSize === 'small',\n 'sky-fluid-grid-gutter-size-medium': gutterSize === 'medium',\n 'sky-fluid-grid-gutter-size-large': gutterSize === 'large',\n 'sky-fluid-grid-no-margin': disableMargin\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sky-fluid-grid-gutter-size-small{padding-left:5px;padding-right:5px}.sky-fluid-grid-gutter-size-medium{padding-left:10px;padding-right:10px}.sky-fluid-grid-gutter-size-large{padding-left:15px;padding-right:15px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-small{padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-medium{padding-left:15px;padding-right:15px}:host-context(.sky-theme-modern) .sky-fluid-grid-gutter-size-large{padding-left:30px;padding-right:30px}\n"] }]
|
|
1780
|
+
}], propDecorators: { disableMargin: [{
|
|
1781
|
+
type: Input
|
|
1782
|
+
}], gutterSize: [{
|
|
1783
|
+
type: Input
|
|
1784
|
+
}] } });
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* Displays a row within the `sky-fluid-grid` wrapper. Previously, you could display a row
|
|
1788
|
+
* without a wrapper, but we no longer officially support that option.
|
|
1789
|
+
*/
|
|
1790
|
+
class SkyRowComponent {
|
|
1791
|
+
constructor() {
|
|
1792
|
+
/**
|
|
1793
|
+
* Whether to reverse the display order for columns in the row.
|
|
1794
|
+
* @default false
|
|
1795
|
+
*/
|
|
1796
|
+
this.reverseColumnOrder = false;
|
|
1797
|
+
}
|
|
1798
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1799
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyRowComponent, selector: "sky-row", inputs: { reverseColumnOrder: "reverseColumnOrder" }, ngImport: i0, template: "<div class=\"sky-row\" [ngClass]=\"{ 'sky-row-reverse': reverseColumnOrder }\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-row{display:flex;flex-direction:row;flex-wrap:wrap;margin-left:-15px;margin-right:-15px}:host-context(.sky-fluid-grid-gutter-size-small) .sky-row{margin-left:-5px;margin-right:-5px}:host-context(.sky-fluid-grid-gutter-size-small.sky-fluid-grid-no-margin) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-fluid-grid-gutter-size-medium) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-fluid-grid-gutter-size-medium.sky-fluid-grid-no-margin) .sky-row{margin-left:-20px;margin-right:-20px}:host-context(.sky-fluid-grid-gutter-size-large) .sky-row{margin-left:-15px;margin-right:-15px}:host-context(.sky-fluid-grid-gutter-size-large.sky-fluid-grid-no-margin) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-small) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-small.sky-fluid-grid-no-margin) .sky-row{margin-left:-20px;margin-right:-20px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-medium) .sky-row{margin-left:-15px;margin-right:-15px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-medium.sky-fluid-grid-no-margin) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-large) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-large.sky-fluid-grid-no-margin) .sky-row{margin-left:-60px;margin-right:-60px}:host .sky-row.sky-row-reverse{flex-direction:row}:host-context(.sky-responsive-container-xs) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-sm) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-md) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-lg) .sky-row.sky-row-reverse{flex-direction:row}@media (min-width: 768px){:host .sky-row.sky-row-reverse{flex-direction:row-reverse}}:host-context(.sky-responsive-container-sm) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-md) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-lg) .sky-row.sky-row-reverse{flex-direction:row-reverse}:host-context(.sky-theme-modern) .sky-row{margin-left:-30px;margin-right:-30px}.sky-theme-modern .sky-row{margin-left:-30px;margin-right:-30px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1800
|
+
}
|
|
1801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyRowComponent, decorators: [{
|
|
1802
|
+
type: Component,
|
|
1803
|
+
args: [{ selector: 'sky-row', template: "<div class=\"sky-row\" [ngClass]=\"{ 'sky-row-reverse': reverseColumnOrder }\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-row{display:flex;flex-direction:row;flex-wrap:wrap;margin-left:-15px;margin-right:-15px}:host-context(.sky-fluid-grid-gutter-size-small) .sky-row{margin-left:-5px;margin-right:-5px}:host-context(.sky-fluid-grid-gutter-size-small.sky-fluid-grid-no-margin) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-fluid-grid-gutter-size-medium) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-fluid-grid-gutter-size-medium.sky-fluid-grid-no-margin) .sky-row{margin-left:-20px;margin-right:-20px}:host-context(.sky-fluid-grid-gutter-size-large) .sky-row{margin-left:-15px;margin-right:-15px}:host-context(.sky-fluid-grid-gutter-size-large.sky-fluid-grid-no-margin) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-small) .sky-row{margin-left:-10px;margin-right:-10px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-small.sky-fluid-grid-no-margin) .sky-row{margin-left:-20px;margin-right:-20px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-medium) .sky-row{margin-left:-15px;margin-right:-15px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-medium.sky-fluid-grid-no-margin) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-large) .sky-row{margin-left:-30px;margin-right:-30px}:host-context(.sky-theme-modern .sky-fluid-grid-gutter-size-large.sky-fluid-grid-no-margin) .sky-row{margin-left:-60px;margin-right:-60px}:host .sky-row.sky-row-reverse{flex-direction:row}:host-context(.sky-responsive-container-xs) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-sm) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-md) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-lg) .sky-row.sky-row-reverse{flex-direction:row}@media (min-width: 768px){:host .sky-row.sky-row-reverse{flex-direction:row-reverse}}:host-context(.sky-responsive-container-sm) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-md) .sky-row.sky-row-reverse,:host-context(.sky-responsive-container-lg) .sky-row.sky-row-reverse{flex-direction:row-reverse}:host-context(.sky-theme-modern) .sky-row{margin-left:-30px;margin-right:-30px}.sky-theme-modern .sky-row{margin-left:-30px;margin-right:-30px}\n"] }]
|
|
1804
|
+
}], propDecorators: { reverseColumnOrder: [{
|
|
1805
|
+
type: Input
|
|
1806
|
+
}] } });
|
|
1807
|
+
|
|
1808
|
+
class SkyFluidGridModule {
|
|
1809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1810
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridModule, declarations: [SkyRowComponent, SkyColumnComponent, SkyFluidGridComponent], imports: [CommonModule], exports: [SkyRowComponent, SkyColumnComponent, SkyFluidGridComponent] }); }
|
|
1811
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridModule, imports: [CommonModule] }); }
|
|
1812
|
+
}
|
|
1813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFluidGridModule, decorators: [{
|
|
1814
|
+
type: NgModule,
|
|
1815
|
+
args: [{
|
|
1816
|
+
imports: [CommonModule],
|
|
1817
|
+
declarations: [SkyRowComponent, SkyColumnComponent, SkyFluidGridComponent],
|
|
1818
|
+
exports: [SkyRowComponent, SkyColumnComponent, SkyFluidGridComponent],
|
|
1819
|
+
}]
|
|
1820
|
+
}] });
|
|
1821
|
+
|
|
1822
|
+
const tokenRegex = /(\{\d+\})/;
|
|
1823
|
+
class SkyFormatComponent {
|
|
1824
|
+
constructor() {
|
|
1825
|
+
this.itemsForDisplay = [];
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* The tokenized string that represents the template. Tokens use the `{n}` notation
|
|
1829
|
+
* where `n` is the ordinal of the item to replace the token.
|
|
1830
|
+
*/
|
|
1831
|
+
set text(value) {
|
|
1832
|
+
this.#_text = value;
|
|
1833
|
+
this.#updateItemsForDisplay();
|
|
1834
|
+
}
|
|
1835
|
+
get text() {
|
|
1836
|
+
return this.#_text;
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* An array of `TemplateRef` objects to be placed in the template, where the `nth`
|
|
1840
|
+
* item is placed at the `{n}` location in the template.
|
|
1841
|
+
*/
|
|
1842
|
+
set args(value) {
|
|
1843
|
+
this.#_args = value;
|
|
1844
|
+
this.#updateItemsForDisplay();
|
|
1845
|
+
}
|
|
1846
|
+
get args() {
|
|
1847
|
+
return this.#_args;
|
|
1848
|
+
}
|
|
1849
|
+
#_text;
|
|
1850
|
+
#_args;
|
|
1851
|
+
#updateItemsForDisplay() {
|
|
1852
|
+
this.itemsForDisplay = [];
|
|
1853
|
+
if (this.text && this.args) {
|
|
1854
|
+
const textParts = this.text.split(tokenRegex);
|
|
1855
|
+
for (const textPart of textParts) {
|
|
1856
|
+
// Disregard empty strings.
|
|
1857
|
+
if (textPart) {
|
|
1858
|
+
const item = {};
|
|
1859
|
+
if (tokenRegex.test(textPart)) {
|
|
1860
|
+
const valueIndex = +textPart.substring(1, textPart.length - 1);
|
|
1861
|
+
item.templateRef = this.args[valueIndex];
|
|
1862
|
+
}
|
|
1863
|
+
else {
|
|
1864
|
+
item.text = textPart;
|
|
1865
|
+
}
|
|
1866
|
+
this.itemsForDisplay.push(item);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1872
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyFormatComponent, selector: "sky-format", inputs: { text: "text", args: "args" }, ngImport: i0, template: "<ng-container *ngFor=\"let item of itemsForDisplay\">\n <ng-container *ngIf=\"item.text\">{{ item.text }}</ng-container>\n <ng-container *ngIf=\"!item.text && item.templateRef\">\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1873
|
+
}
|
|
1874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatComponent, decorators: [{
|
|
1875
|
+
type: Component,
|
|
1876
|
+
args: [{ selector: 'sky-format', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let item of itemsForDisplay\">\n <ng-container *ngIf=\"item.text\">{{ item.text }}</ng-container>\n <ng-container *ngIf=\"!item.text && item.templateRef\">\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\n </ng-container>\n</ng-container>\n" }]
|
|
1877
|
+
}], propDecorators: { text: [{
|
|
1878
|
+
type: Input
|
|
1879
|
+
}], args: [{
|
|
1880
|
+
type: Input
|
|
1881
|
+
}] } });
|
|
1882
|
+
|
|
1883
|
+
class SkyFormatModule {
|
|
1884
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1885
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatModule, declarations: [SkyFormatComponent], imports: [CommonModule], exports: [SkyFormatComponent] }); }
|
|
1886
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatModule, imports: [CommonModule] }); }
|
|
1887
|
+
}
|
|
1888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyFormatModule, decorators: [{
|
|
1889
|
+
type: NgModule,
|
|
1890
|
+
args: [{
|
|
1891
|
+
declarations: [SkyFormatComponent],
|
|
1892
|
+
imports: [CommonModule],
|
|
1893
|
+
exports: [SkyFormatComponent],
|
|
1894
|
+
}]
|
|
1895
|
+
}] });
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* @internal
|
|
1899
|
+
*/
|
|
1900
|
+
class SkyPageThemeAdapterService {
|
|
1901
|
+
#styleEl;
|
|
1902
|
+
#document;
|
|
1903
|
+
constructor(document) {
|
|
1904
|
+
this.#document = document;
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* We can't use ViewEncapsulation.None for this behavior because Angular does
|
|
1908
|
+
* not remove `style` tags from the HEAD element after route changes.
|
|
1909
|
+
* @see https://github.com/angular/angular/issues/16670
|
|
1910
|
+
*/
|
|
1911
|
+
addTheme() {
|
|
1912
|
+
if (!this.#styleEl) {
|
|
1913
|
+
this.#styleEl = this.#document.createElement('style');
|
|
1914
|
+
this.#styleEl.appendChild(this.#document.createTextNode('body:not(.sky-theme-modern) { background-color: #fff; }'));
|
|
1915
|
+
this.#document.head.appendChild(this.#styleEl);
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
removeTheme() {
|
|
1919
|
+
if (this.#styleEl) {
|
|
1920
|
+
this.#styleEl.remove();
|
|
1921
|
+
this.#styleEl = undefined;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageThemeAdapterService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1925
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageThemeAdapterService }); }
|
|
1926
|
+
}
|
|
1927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageThemeAdapterService, decorators: [{
|
|
1928
|
+
type: Injectable
|
|
1929
|
+
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
1930
|
+
type: Inject,
|
|
1931
|
+
args: [DOCUMENT]
|
|
1932
|
+
}] }]; } });
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Displays page contents using the specified layout.
|
|
1936
|
+
* @deprecated Use the `sky-page` component in `@skyux/pages` instead.
|
|
1937
|
+
*/
|
|
1938
|
+
class SkyPageComponent {
|
|
1939
|
+
/**
|
|
1940
|
+
* The page layout. Use `auto` to allow the page contents
|
|
1941
|
+
* to expand beyond the bottom of the browser window. Use `fit`
|
|
1942
|
+
* to constrain the page contents to the available viewport.
|
|
1943
|
+
*/
|
|
1944
|
+
set layout(value) {
|
|
1945
|
+
this.#_layout = value || 'auto';
|
|
1946
|
+
}
|
|
1947
|
+
get layout() {
|
|
1948
|
+
return this.#_layout;
|
|
1949
|
+
}
|
|
1950
|
+
#themeAdapter;
|
|
1951
|
+
#_layout = 'auto';
|
|
1952
|
+
#logger = inject(SkyLogService);
|
|
1953
|
+
constructor(themeAdapter) {
|
|
1954
|
+
this.#logger.deprecated('SkyPageComponent', {
|
|
1955
|
+
deprecationMajorVersion: 8,
|
|
1956
|
+
moreInfoUrl: 'https://developer.blackbaud.com/skyux/components/page',
|
|
1957
|
+
replacementRecommendation: 'Use the `sky-page` component in `@skyux/pages` instead.',
|
|
1958
|
+
});
|
|
1959
|
+
this.#themeAdapter = themeAdapter;
|
|
1960
|
+
}
|
|
1961
|
+
ngOnInit() {
|
|
1962
|
+
this.#themeAdapter.addTheme();
|
|
1963
|
+
}
|
|
1964
|
+
ngOnDestroy() {
|
|
1965
|
+
this.#themeAdapter.removeTheme();
|
|
1966
|
+
}
|
|
1967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageComponent, deps: [{ token: SkyPageThemeAdapterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1968
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageComponent, selector: "sky-page", inputs: { layout: "layout" }, providers: [SkyPageThemeAdapterService], ngImport: i0, template: "<div [ngClass]=\"'sky-layout-host-' + layout\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-layout-host-fit{position:absolute;left:var(--sky-viewport-left);top:var(--sky-viewport-top);right:var(--sky-viewport-right);bottom:var(--sky-viewport-bottom)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1969
|
+
}
|
|
1970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageComponent, decorators: [{
|
|
1971
|
+
type: Component,
|
|
1972
|
+
args: [{ selector: 'sky-page', providers: [SkyPageThemeAdapterService], template: "<div [ngClass]=\"'sky-layout-host-' + layout\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-layout-host-fit{position:absolute;left:var(--sky-viewport-left);top:var(--sky-viewport-top);right:var(--sky-viewport-right);bottom:var(--sky-viewport-bottom)}\n"] }]
|
|
1973
|
+
}], ctorParameters: function () { return [{ type: SkyPageThemeAdapterService }]; }, propDecorators: { layout: [{
|
|
1974
|
+
type: Input
|
|
1975
|
+
}] } });
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* @deprecated Use the SkyPageModule in `@skyux/pages` instead.
|
|
1979
|
+
*/
|
|
1980
|
+
class SkyPageModule {
|
|
1981
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1982
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyPageModule, declarations: [SkyPageComponent], imports: [CommonModule], exports: [SkyPageComponent] }); }
|
|
1983
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageModule, imports: [CommonModule] }); }
|
|
1984
|
+
}
|
|
1985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageModule, decorators: [{
|
|
1986
|
+
type: NgModule,
|
|
1987
|
+
args: [{
|
|
1988
|
+
declarations: [SkyPageComponent],
|
|
1989
|
+
imports: [CommonModule],
|
|
1990
|
+
exports: [SkyPageComponent],
|
|
1991
|
+
}]
|
|
1992
|
+
}] });
|
|
1993
|
+
|
|
1994
|
+
/**
|
|
1995
|
+
* Displays messages that require immediate attention as [alerts](https://developer.blackbaud.com/skyux/components/alert) within
|
|
1996
|
+
* the page summary.
|
|
1997
|
+
* @deprecated
|
|
1998
|
+
*/
|
|
1999
|
+
/* istanbul ignore next */
|
|
2000
|
+
/* Code coverage having problems with no statements in classes */
|
|
2001
|
+
class SkyPageSummaryAlertComponent {
|
|
2002
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2003
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryAlertComponent, selector: "sky-page-summary-alert", ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["::ng-deep .sky-alert{margin-top:0;margin-bottom:20px;line-height:initial}\n"] }); }
|
|
2004
|
+
}
|
|
2005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryAlertComponent, decorators: [{
|
|
2006
|
+
type: Component,
|
|
2007
|
+
args: [{ selector: 'sky-page-summary-alert', template: "<ng-content></ng-content>\n", styles: ["::ng-deep .sky-alert{margin-top:0;margin-bottom:20px;line-height:initial}\n"] }]
|
|
2008
|
+
}] });
|
|
2009
|
+
|
|
2010
|
+
/**
|
|
2011
|
+
* Displays content in the arbitrary section of the page summary.
|
|
2012
|
+
* @deprecated
|
|
2013
|
+
*/
|
|
2014
|
+
/* istanbul ignore next */
|
|
2015
|
+
/* Code coverage having problems with no statements in classes */
|
|
2016
|
+
class SkyPageSummaryContentComponent {
|
|
2017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2018
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryContentComponent, selector: "sky-page-summary-content", ngImport: i0, template: "<div class=\"sky-page-summary-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-page-summary-content{margin-top:20px}\n"] }); }
|
|
2019
|
+
}
|
|
2020
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryContentComponent, decorators: [{
|
|
2021
|
+
type: Component,
|
|
2022
|
+
args: [{ selector: 'sky-page-summary-content', template: "<div class=\"sky-page-summary-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-page-summary-content{margin-top:20px}\n"] }]
|
|
2023
|
+
}] });
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* Displays an image in the page summary to identify a record
|
|
2027
|
+
* or help users complete a core task.
|
|
2028
|
+
* @deprecated
|
|
2029
|
+
*/
|
|
2030
|
+
/* istanbul ignore next */
|
|
2031
|
+
/* Code coverage having problems with no statements in classes */
|
|
2032
|
+
class SkyPageSummaryImageComponent {
|
|
2033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryImageComponent, selector: "sky-page-summary-image", ngImport: i0, template: "<div class=\"sky-page-summary-image\">\n <ng-content></ng-content>\n</div>\n", styles: [":host .sky-page-summary-image{width:100px;margin-left:auto;margin-right:auto;margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-page-summary-image,:host-context(.sky-responsive-container-sm) .sky-page-summary-image,:host-context(.sky-responsive-container-md) .sky-page-summary-image,:host-context(.sky-responsive-container-lg) .sky-page-summary-image{width:100px;margin-left:auto;margin-right:auto;margin-bottom:10px}@media (min-width: 768px){:host .sky-page-summary-image{width:120px;flex:0 0 120px;margin:initial}}:host-context(.sky-responsive-container-sm) .sky-page-summary-image,:host-context(.sky-responsive-container-md) .sky-page-summary-image,:host-context(.sky-responsive-container-lg) .sky-page-summary-image{width:120px;flex:0 0 120px;margin:initial}\n"] }); }
|
|
2035
|
+
}
|
|
2036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryImageComponent, decorators: [{
|
|
2037
|
+
type: Component,
|
|
2038
|
+
args: [{ selector: 'sky-page-summary-image', template: "<div class=\"sky-page-summary-image\">\n <ng-content></ng-content>\n</div>\n", styles: [":host .sky-page-summary-image{width:100px;margin-left:auto;margin-right:auto;margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-page-summary-image,:host-context(.sky-responsive-container-sm) .sky-page-summary-image,:host-context(.sky-responsive-container-md) .sky-page-summary-image,:host-context(.sky-responsive-container-lg) .sky-page-summary-image{width:100px;margin-left:auto;margin-right:auto;margin-bottom:10px}@media (min-width: 768px){:host .sky-page-summary-image{width:120px;flex:0 0 120px;margin:initial}}:host-context(.sky-responsive-container-sm) .sky-page-summary-image,:host-context(.sky-responsive-container-md) .sky-page-summary-image,:host-context(.sky-responsive-container-lg) .sky-page-summary-image{width:120px;flex:0 0 120px;margin:initial}\n"] }]
|
|
2039
|
+
}] });
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* Highlights important information about a page in the key information section of the
|
|
2043
|
+
* page summary.
|
|
2044
|
+
* @deprecated
|
|
2045
|
+
*/
|
|
2046
|
+
class SkyPageSummaryKeyInfoComponent {
|
|
2047
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryKeyInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2048
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryKeyInfoComponent, selector: "sky-page-summary-key-info", ngImport: i0, template: "<div class=\"sky-page-summary-key-info\">\n <ng-content></ng-content>\n</div>\n", styles: [":host .sky-page-summary-key-info{margin-top:20px}:host-context(.sky-responsive-container-xs) .sky-page-summary-key-info,:host-context(.sky-responsive-container-sm) .sky-page-summary-key-info,:host-context(.sky-responsive-container-md) .sky-page-summary-key-info,:host-context(.sky-responsive-container-lg) .sky-page-summary-key-info{margin-top:20px}@media (min-width: 768px){:host .sky-page-summary-key-info{margin-top:initial}}:host-context(.sky-responsive-container-sm) .sky-page-summary-key-info,:host-context(.sky-responsive-container-md) .sky-page-summary-key-info,:host-context(.sky-responsive-container-lg) .sky-page-summary-key-info{margin-top:initial}.sky-page-summary-key-info ::ng-deep .sky-key-info{display:block}\n"] }); }
|
|
2049
|
+
}
|
|
2050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryKeyInfoComponent, decorators: [{
|
|
2051
|
+
type: Component,
|
|
2052
|
+
args: [{ selector: 'sky-page-summary-key-info', template: "<div class=\"sky-page-summary-key-info\">\n <ng-content></ng-content>\n</div>\n", styles: [":host .sky-page-summary-key-info{margin-top:20px}:host-context(.sky-responsive-container-xs) .sky-page-summary-key-info,:host-context(.sky-responsive-container-sm) .sky-page-summary-key-info,:host-context(.sky-responsive-container-md) .sky-page-summary-key-info,:host-context(.sky-responsive-container-lg) .sky-page-summary-key-info{margin-top:20px}@media (min-width: 768px){:host .sky-page-summary-key-info{margin-top:initial}}:host-context(.sky-responsive-container-sm) .sky-page-summary-key-info,:host-context(.sky-responsive-container-md) .sky-page-summary-key-info,:host-context(.sky-responsive-container-lg) .sky-page-summary-key-info{margin-top:initial}.sky-page-summary-key-info ::ng-deep .sky-key-info{display:block}\n"] }]
|
|
2053
|
+
}] });
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* Displays [labels](https://developer.blackbaud.com/skyux/components/label)
|
|
2057
|
+
* to highlight important status information about a page's content.
|
|
2058
|
+
* @deprecated
|
|
2059
|
+
*/
|
|
2060
|
+
/* istanbul ignore next */
|
|
2061
|
+
/* Code coverage having problems with no statements in classes */
|
|
2062
|
+
class SkyPageSummaryStatusComponent {
|
|
2063
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2064
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryStatusComponent, selector: "sky-page-summary-status", ngImport: i0, template: "<div class=\"sky-page-summary-status\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-page-summary-status{margin-top:10px}.sky-page-summary-status ::ng-deep .sky-label{margin-right:5px}\n"] }); }
|
|
2065
|
+
}
|
|
2066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryStatusComponent, decorators: [{
|
|
2067
|
+
type: Component,
|
|
2068
|
+
args: [{ selector: 'sky-page-summary-status', template: "<div class=\"sky-page-summary-status\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-page-summary-status{margin-top:10px}.sky-page-summary-status ::ng-deep .sky-label{margin-right:5px}\n"] }]
|
|
2069
|
+
}] });
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* Specifies a subtitle to identify the page content.
|
|
2073
|
+
* @deprecated
|
|
2074
|
+
*/
|
|
2075
|
+
/* istanbul ignore next */
|
|
2076
|
+
/* Code coverage having problems with no statements in classes */
|
|
2077
|
+
class SkyPageSummarySubtitleComponent {
|
|
2078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummarySubtitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2079
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummarySubtitleComponent, selector: "sky-page-summary-subtitle", ngImport: i0, template: "<p class=\"sky-page-summary-subtitle sky-emphasized\">\n <ng-content></ng-content>\n</p>\n", styles: [".sky-page-summary-subtitle{margin-top:0;margin-bottom:10px;line-height:1.1}\n"] }); }
|
|
2080
|
+
}
|
|
2081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummarySubtitleComponent, decorators: [{
|
|
2082
|
+
type: Component,
|
|
2083
|
+
args: [{ selector: 'sky-page-summary-subtitle', template: "<p class=\"sky-page-summary-subtitle sky-emphasized\">\n <ng-content></ng-content>\n</p>\n", styles: [".sky-page-summary-subtitle{margin-top:0;margin-bottom:10px;line-height:1.1}\n"] }]
|
|
2084
|
+
}] });
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* Specifies a title to identify the page content.
|
|
2088
|
+
* @deprecated
|
|
2089
|
+
*/
|
|
2090
|
+
/* istanbul ignore next */
|
|
2091
|
+
/* Code coverage having problems with no statements in classes */
|
|
2092
|
+
class SkyPageSummaryTitleComponent {
|
|
2093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2094
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryTitleComponent, selector: "sky-page-summary-title", ngImport: i0, template: "<h1 class=\"sky-page-summary-title sky-page-heading\">\n <ng-content></ng-content>\n</h1>\n", styles: [".sky-page-summary-title{margin-top:0;margin-bottom:5px}\n"] }); }
|
|
2095
|
+
}
|
|
2096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryTitleComponent, decorators: [{
|
|
2097
|
+
type: Component,
|
|
2098
|
+
args: [{ selector: 'sky-page-summary-title', template: "<h1 class=\"sky-page-summary-title sky-page-heading\">\n <ng-content></ng-content>\n</h1>\n", styles: [".sky-page-summary-title{margin-top:0;margin-bottom:5px}\n"] }]
|
|
2099
|
+
}] });
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* @internal
|
|
2103
|
+
*/
|
|
2104
|
+
class SkyPageSummaryAdapterService {
|
|
2105
|
+
updateKeyInfoLocation(elRef, isXS) {
|
|
2106
|
+
const el = elRef.nativeElement;
|
|
2107
|
+
const keyInfoContainerEl = el.querySelector('.sky-page-summary-key-info-container');
|
|
2108
|
+
if (isXS) {
|
|
2109
|
+
el.querySelector('.sky-page-summary-key-info-xs').appendChild(keyInfoContainerEl);
|
|
2110
|
+
}
|
|
2111
|
+
else {
|
|
2112
|
+
el.querySelector('.sky-page-summary-key-info-sm').appendChild(keyInfoContainerEl);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2116
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryAdapterService }); }
|
|
2117
|
+
}
|
|
2118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryAdapterService, decorators: [{
|
|
2119
|
+
type: Injectable
|
|
2120
|
+
}] });
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* Specifies the components to display in the page summary.
|
|
2124
|
+
* @deprecated `SkyPageSummaryComponent` is deprecated. For page templates and techniques to summarize page content, see the page design guidelines. For more information, see https://developer.blackbaud.com/skyux/design/guidelines/page-layouts.
|
|
2125
|
+
*/
|
|
2126
|
+
class SkyPageSummaryComponent {
|
|
2127
|
+
#breakpointSubscription;
|
|
2128
|
+
#ngUnsubscribe;
|
|
2129
|
+
#elRef;
|
|
2130
|
+
#adapter;
|
|
2131
|
+
#mediaQueryService;
|
|
2132
|
+
#changeDetectorRef;
|
|
2133
|
+
constructor(elRef, adapter, mediaQueryService, logger, changeDetector) {
|
|
2134
|
+
this.hasKeyInfo = false;
|
|
2135
|
+
this.#ngUnsubscribe = new Subject();
|
|
2136
|
+
this.#elRef = elRef;
|
|
2137
|
+
this.#adapter = adapter;
|
|
2138
|
+
this.#mediaQueryService = mediaQueryService;
|
|
2139
|
+
this.#changeDetectorRef = changeDetector;
|
|
2140
|
+
logger.deprecated('SkyPageSummaryComponent', {
|
|
2141
|
+
deprecationMajorVersion: 6,
|
|
2142
|
+
moreInfoUrl: 'https://developer.blackbaud.com/skyux/design/guidelines/page-layouts',
|
|
2143
|
+
replacementRecommendation: 'For page templates and techniques to summarize page content, see the page design guidelines.',
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
ngAfterViewInit() {
|
|
2147
|
+
this.#breakpointSubscription = this.#mediaQueryService.subscribe((args) => {
|
|
2148
|
+
this.#adapter.updateKeyInfoLocation(this.#elRef, args === SkyMediaBreakpoints.xs);
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
ngAfterContentInit() {
|
|
2152
|
+
if (this.keyInfoComponents) {
|
|
2153
|
+
this.hasKeyInfo = this.keyInfoComponents.length > 0;
|
|
2154
|
+
this.keyInfoComponents.changes
|
|
2155
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
2156
|
+
.subscribe(() => {
|
|
2157
|
+
this.hasKeyInfo =
|
|
2158
|
+
!!this.keyInfoComponents && this.keyInfoComponents.length > 0;
|
|
2159
|
+
this.#changeDetectorRef.markForCheck();
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
ngOnDestroy() {
|
|
2164
|
+
/* istanbul ignore else */
|
|
2165
|
+
/* sanity check */
|
|
2166
|
+
if (this.#breakpointSubscription) {
|
|
2167
|
+
this.#breakpointSubscription.unsubscribe();
|
|
2168
|
+
}
|
|
2169
|
+
this.#ngUnsubscribe.next();
|
|
2170
|
+
this.#ngUnsubscribe.complete();
|
|
2171
|
+
}
|
|
2172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryComponent, deps: [{ token: i0.ElementRef }, { token: SkyPageSummaryAdapterService }, { token: i1$2.SkyMediaQueryService }, { token: i1$2.SkyLogService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2173
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyPageSummaryComponent, selector: "sky-page-summary", providers: [SkyPageSummaryAdapterService], queries: [{ propertyName: "keyInfoComponents", predicate: SkyPageSummaryKeyInfoComponent, read: SkyPageSummaryKeyInfoComponent }], ngImport: i0, template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{ 'sky-page-summary-with-key-info': hasKeyInfo }\"\n>\n <ng-content select=\"sky-page-summary-alert\"></ng-content>\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\"></ng-content>\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\"></ng-content>\n <ng-content select=\"sky-page-summary-subtitle\"></ng-content>\n <ng-content select=\"sky-page-summary-status\"></ng-content>\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\"></ng-content>\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary{background-color:#fff;padding:20px 15px}.sky-page-summary-row{align-items:stretch;display:flex}:host .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}@media (min-width: 768px){:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host .sky-page-summary-left{align-items:stretch;display:flex}:host .sky-page-summary-data{flex-grow:1}}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{align-items:stretch;display:flex}:host-context(.sky-responsive-container-sm) .sky-page-summary-data,:host-context(.sky-responsive-container-md) .sky-page-summary-data,:host-context(.sky-responsive-container-lg) .sky-page-summary-data{flex-grow:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
2174
|
+
}
|
|
2175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryComponent, decorators: [{
|
|
2176
|
+
type: Component,
|
|
2177
|
+
args: [{ selector: 'sky-page-summary', providers: [SkyPageSummaryAdapterService], template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{ 'sky-page-summary-with-key-info': hasKeyInfo }\"\n>\n <ng-content select=\"sky-page-summary-alert\"></ng-content>\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\"></ng-content>\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\"></ng-content>\n <ng-content select=\"sky-page-summary-subtitle\"></ng-content>\n <ng-content select=\"sky-page-summary-status\"></ng-content>\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\"></ng-content>\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary{background-color:#fff;padding:20px 15px}.sky-page-summary-row{align-items:stretch;display:flex}:host .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}@media (min-width: 768px){:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host .sky-page-summary-left{align-items:stretch;display:flex}:host .sky-page-summary-data{flex-grow:1}}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{align-items:stretch;display:flex}:host-context(.sky-responsive-container-sm) .sky-page-summary-data,:host-context(.sky-responsive-container-md) .sky-page-summary-data,:host-context(.sky-responsive-container-lg) .sky-page-summary-data{flex-grow:1}\n"] }]
|
|
2178
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SkyPageSummaryAdapterService }, { type: i1$2.SkyMediaQueryService }, { type: i1$2.SkyLogService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { keyInfoComponents: [{
|
|
2179
|
+
type: ContentChildren,
|
|
2180
|
+
args: [SkyPageSummaryKeyInfoComponent, {
|
|
2181
|
+
read: SkyPageSummaryKeyInfoComponent,
|
|
2182
|
+
}]
|
|
2183
|
+
}] } });
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* @deprecated `SkyPageSummaryModule` is deprecated. For page templates and techniques to summarize page content, see the page design guidelines. For more information, see https://developer.blackbaud.com/skyux/design/guidelines/page-layouts.
|
|
2187
|
+
*/
|
|
2188
|
+
class SkyPageSummaryModule {
|
|
2189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2190
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryModule, declarations: [SkyPageSummaryAlertComponent,
|
|
2191
|
+
SkyPageSummaryComponent,
|
|
2192
|
+
SkyPageSummaryContentComponent,
|
|
2193
|
+
SkyPageSummaryImageComponent,
|
|
2194
|
+
SkyPageSummaryKeyInfoComponent,
|
|
2195
|
+
SkyPageSummaryStatusComponent,
|
|
2196
|
+
SkyPageSummarySubtitleComponent,
|
|
2197
|
+
SkyPageSummaryTitleComponent], imports: [CommonModule], exports: [SkyPageSummaryAlertComponent,
|
|
2198
|
+
SkyPageSummaryComponent,
|
|
2199
|
+
SkyPageSummaryContentComponent,
|
|
2200
|
+
SkyPageSummaryImageComponent,
|
|
2201
|
+
SkyPageSummaryKeyInfoComponent,
|
|
2202
|
+
SkyPageSummaryStatusComponent,
|
|
2203
|
+
SkyPageSummarySubtitleComponent,
|
|
2204
|
+
SkyPageSummaryTitleComponent] }); }
|
|
2205
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryModule, imports: [CommonModule] }); }
|
|
2206
|
+
}
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyPageSummaryModule, decorators: [{
|
|
2208
|
+
type: NgModule,
|
|
2209
|
+
args: [{
|
|
2210
|
+
declarations: [
|
|
2211
|
+
SkyPageSummaryAlertComponent,
|
|
2212
|
+
SkyPageSummaryComponent,
|
|
2213
|
+
SkyPageSummaryContentComponent,
|
|
2214
|
+
SkyPageSummaryImageComponent,
|
|
2215
|
+
SkyPageSummaryKeyInfoComponent,
|
|
2216
|
+
SkyPageSummaryStatusComponent,
|
|
2217
|
+
SkyPageSummarySubtitleComponent,
|
|
2218
|
+
SkyPageSummaryTitleComponent,
|
|
2219
|
+
],
|
|
2220
|
+
imports: [CommonModule],
|
|
2221
|
+
exports: [
|
|
2222
|
+
SkyPageSummaryAlertComponent,
|
|
2223
|
+
SkyPageSummaryComponent,
|
|
2224
|
+
SkyPageSummaryContentComponent,
|
|
2225
|
+
SkyPageSummaryImageComponent,
|
|
2226
|
+
SkyPageSummaryKeyInfoComponent,
|
|
2227
|
+
SkyPageSummaryStatusComponent,
|
|
2228
|
+
SkyPageSummarySubtitleComponent,
|
|
2229
|
+
SkyPageSummaryTitleComponent,
|
|
2230
|
+
],
|
|
2231
|
+
}]
|
|
2232
|
+
}] });
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* @internal
|
|
2236
|
+
*/
|
|
2237
|
+
const SKY_TEXT_EXPAND_MODAL_CONTEXT = new InjectionToken('SkyTextExpandModalContext');
|
|
2238
|
+
|
|
2239
|
+
/**
|
|
2240
|
+
* @internal
|
|
2241
|
+
*/
|
|
2242
|
+
class SkyTextExpandModalComponent {
|
|
2243
|
+
constructor(context, instance) {
|
|
2244
|
+
this.context = context;
|
|
2245
|
+
this.instance = instance;
|
|
2246
|
+
}
|
|
2247
|
+
close() {
|
|
2248
|
+
this.instance.close();
|
|
2249
|
+
}
|
|
2250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModalComponent, deps: [{ token: SKY_TEXT_EXPAND_MODAL_CONTEXT }, { token: i1$4.SkyModalInstance }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2251
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyTextExpandModalComponent, selector: "sky-text-expand-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>{{ context.header }}</sky-modal-header>\n <sky-modal-content class=\"sky-text-expand-modal-content\">{{\n context.text\n }}</sky-modal-content>\n <sky-modal-footer>\n <button class=\"sky-btn sky-btn-link\" (click)=\"close()\">\n {{ 'skyux_text_expand_close_text' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n", styles: [".sky-text-expand-ellipsis{letter-spacing:2px;white-space:nowrap}.sky-text-expand-space{white-space:normal}.sky-text-expand-see-more{white-space:nowrap;margin-left:5px}.sky-text-expand-text{margin:0;white-space:pre-wrap}.sky-text-expand-container{word-break:break-word;word-wrap:break-word;overflow:hidden;height:auto}.sky-text-expand-modal-content{white-space:pre-line;word-wrap:break-word}\n"], dependencies: [{ kind: "component", type: i1$4.λ5, selector: "sky-modal", inputs: ["formErrors", "ariaRole", "tiledBody", "ariaDescribedBy", "ariaLabelledBy"] }, { kind: "component", type: i1$4.λ2, selector: "sky-modal-content" }, { kind: "component", type: i1$4.λ3, selector: "sky-modal-footer" }, { kind: "component", type: i1$4.λ4, selector: "sky-modal-header" }, { kind: "pipe", type: i1$3.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
|
|
2252
|
+
}
|
|
2253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModalComponent, decorators: [{
|
|
2254
|
+
type: Component,
|
|
2255
|
+
args: [{ selector: 'sky-text-expand-modal', template: "<sky-modal>\n <sky-modal-header>{{ context.header }}</sky-modal-header>\n <sky-modal-content class=\"sky-text-expand-modal-content\">{{\n context.text\n }}</sky-modal-content>\n <sky-modal-footer>\n <button class=\"sky-btn sky-btn-link\" (click)=\"close()\">\n {{ 'skyux_text_expand_close_text' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n", styles: [".sky-text-expand-ellipsis{letter-spacing:2px;white-space:nowrap}.sky-text-expand-space{white-space:normal}.sky-text-expand-see-more{white-space:nowrap;margin-left:5px}.sky-text-expand-text{margin:0;white-space:pre-wrap}.sky-text-expand-container{word-break:break-word;word-wrap:break-word;overflow:hidden;height:auto}.sky-text-expand-modal-content{white-space:pre-line;word-wrap:break-word}\n"] }]
|
|
2256
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2257
|
+
type: Inject,
|
|
2258
|
+
args: [SKY_TEXT_EXPAND_MODAL_CONTEXT]
|
|
2259
|
+
}] }, { type: i1$4.SkyModalInstance }]; } });
|
|
2260
|
+
|
|
2261
|
+
/**
|
|
2262
|
+
* @internal
|
|
2263
|
+
*/
|
|
2264
|
+
class SkyTextExpandAdapterService {
|
|
2265
|
+
#renderer;
|
|
2266
|
+
constructor(rendererFactory) {
|
|
2267
|
+
this.#renderer = rendererFactory.createRenderer(undefined, null);
|
|
2268
|
+
}
|
|
2269
|
+
getContainerHeight(containerEl) {
|
|
2270
|
+
return containerEl.nativeElement.offsetHeight;
|
|
2271
|
+
}
|
|
2272
|
+
removeContainerMaxHeight(containerEl) {
|
|
2273
|
+
this.#renderer.removeStyle(containerEl.nativeElement, 'max-height');
|
|
2274
|
+
}
|
|
2275
|
+
setText(textEl, text) {
|
|
2276
|
+
textEl.nativeElement.textContent = text;
|
|
2277
|
+
}
|
|
2278
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2279
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandAdapterService }); }
|
|
2280
|
+
}
|
|
2281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandAdapterService, decorators: [{
|
|
2282
|
+
type: Injectable
|
|
2283
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* Auto-incrementing integer used to generate unique ids for text expand components.
|
|
2287
|
+
*/
|
|
2288
|
+
let nextId$1 = 0;
|
|
2289
|
+
class SkyTextExpandComponent {
|
|
2290
|
+
/**
|
|
2291
|
+
* The maximum number of text characters to display inline when users select the link
|
|
2292
|
+
* to expand the full text. If the text exceeds this limit, then the component expands
|
|
2293
|
+
* the full text in a modal instead.
|
|
2294
|
+
* @default 600
|
|
2295
|
+
*/
|
|
2296
|
+
set maxExpandedLength(value) {
|
|
2297
|
+
if (value) {
|
|
2298
|
+
this.#_maxExpandedLength = value;
|
|
2299
|
+
}
|
|
2300
|
+
else {
|
|
2301
|
+
this.#_maxExpandedLength = 600;
|
|
2302
|
+
}
|
|
2303
|
+
this.#setup(this.text);
|
|
2304
|
+
}
|
|
2305
|
+
get maxExpandedLength() {
|
|
2306
|
+
return this.#_maxExpandedLength;
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* The maximum number of newline characters to display inline when users select
|
|
2310
|
+
* the link to expand the full text. If the text exceeds this limit, then
|
|
2311
|
+
* the component expands the full text in a modal view instead.
|
|
2312
|
+
* @default 2
|
|
2313
|
+
*/
|
|
2314
|
+
set maxExpandedNewlines(value) {
|
|
2315
|
+
if (value) {
|
|
2316
|
+
this.#_maxExpandedNewlines = value;
|
|
2317
|
+
}
|
|
2318
|
+
else {
|
|
2319
|
+
this.#_maxExpandedNewlines = 2;
|
|
2320
|
+
}
|
|
2321
|
+
this.#setup(this.text);
|
|
2322
|
+
}
|
|
2323
|
+
get maxExpandedNewlines() {
|
|
2324
|
+
return this.#_maxExpandedNewlines;
|
|
2325
|
+
}
|
|
2326
|
+
/**
|
|
2327
|
+
* The number of text characters to display before truncating the text.
|
|
2328
|
+
* To avoid truncating text in the middle of a word, the component looks for a space
|
|
2329
|
+
* in the 10 characters before the last character.
|
|
2330
|
+
* @default 200
|
|
2331
|
+
*/
|
|
2332
|
+
set maxLength(value) {
|
|
2333
|
+
if (value) {
|
|
2334
|
+
this.#_maxLength = value;
|
|
2335
|
+
}
|
|
2336
|
+
else {
|
|
2337
|
+
this.#_maxLength = 200;
|
|
2338
|
+
}
|
|
2339
|
+
this.#setup(this.text);
|
|
2340
|
+
}
|
|
2341
|
+
get maxLength() {
|
|
2342
|
+
return this.#_maxLength;
|
|
2343
|
+
}
|
|
2344
|
+
/**
|
|
2345
|
+
* The text to truncate.
|
|
2346
|
+
*/
|
|
2347
|
+
set text(value) {
|
|
2348
|
+
this.#_text = value ?? '';
|
|
2349
|
+
this.#setup(this.#_text);
|
|
2350
|
+
}
|
|
2351
|
+
get text() {
|
|
2352
|
+
return this.#_text;
|
|
2353
|
+
}
|
|
2354
|
+
set textEl(value) {
|
|
2355
|
+
this.#_textEl = value;
|
|
2356
|
+
this.#setup(this.text);
|
|
2357
|
+
}
|
|
2358
|
+
get textEl() {
|
|
2359
|
+
return this.#_textEl;
|
|
2360
|
+
}
|
|
2361
|
+
#collapsedText;
|
|
2362
|
+
#newlineCount;
|
|
2363
|
+
#seeMoreText;
|
|
2364
|
+
#seeLessText;
|
|
2365
|
+
#textToShow;
|
|
2366
|
+
#_maxExpandedLength;
|
|
2367
|
+
#_maxExpandedNewlines;
|
|
2368
|
+
#_maxLength;
|
|
2369
|
+
#_text;
|
|
2370
|
+
#_textEl;
|
|
2371
|
+
#resources;
|
|
2372
|
+
#modalSvc;
|
|
2373
|
+
#textExpandAdapter;
|
|
2374
|
+
constructor(resources, modalSvc, textExpandAdapter) {
|
|
2375
|
+
/**
|
|
2376
|
+
* Whether to replace newline characters in truncated text with spaces.
|
|
2377
|
+
*/
|
|
2378
|
+
this.truncateNewlines = true;
|
|
2379
|
+
this.buttonText = '';
|
|
2380
|
+
this.contentSectionId = `sky-text-expand-content-${++nextId$1}`;
|
|
2381
|
+
this.expandable = false;
|
|
2382
|
+
this.isModal = false;
|
|
2383
|
+
this.transitionHeight = 1;
|
|
2384
|
+
this.#collapsedText = '';
|
|
2385
|
+
this.#newlineCount = 0;
|
|
2386
|
+
this.#seeMoreText = '';
|
|
2387
|
+
this.#seeLessText = '';
|
|
2388
|
+
this.#textToShow = '';
|
|
2389
|
+
this.#_maxExpandedLength = 600;
|
|
2390
|
+
this.#_maxExpandedNewlines = 2;
|
|
2391
|
+
this.#_maxLength = 200;
|
|
2392
|
+
this.#_text = '';
|
|
2393
|
+
this.#resources = resources;
|
|
2394
|
+
this.#modalSvc = modalSvc;
|
|
2395
|
+
this.#textExpandAdapter = textExpandAdapter;
|
|
2396
|
+
}
|
|
2397
|
+
textExpand() {
|
|
2398
|
+
if (this.isModal) {
|
|
2399
|
+
// Modal View
|
|
2400
|
+
/* istanbul ignore else */
|
|
2401
|
+
/* sanity check */
|
|
2402
|
+
if (!this.isExpanded) {
|
|
2403
|
+
this.#modalSvc.open(SkyTextExpandModalComponent, [
|
|
2404
|
+
{
|
|
2405
|
+
provide: SKY_TEXT_EXPAND_MODAL_CONTEXT,
|
|
2406
|
+
useValue: {
|
|
2407
|
+
header: this.expandModalTitle,
|
|
2408
|
+
text: this.text,
|
|
2409
|
+
},
|
|
2410
|
+
},
|
|
2411
|
+
]);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
else {
|
|
2415
|
+
// Normal View
|
|
2416
|
+
if (!this.isExpanded) {
|
|
2417
|
+
this.#animateText(true);
|
|
2418
|
+
}
|
|
2419
|
+
else {
|
|
2420
|
+
this.#animateText(false);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
animationEnd() {
|
|
2425
|
+
if (this.textEl && this.containerEl) {
|
|
2426
|
+
// Ensure the correct text is displayed
|
|
2427
|
+
this.#textExpandAdapter.setText(this.textEl, this.#textToShow);
|
|
2428
|
+
setTimeout(() => {
|
|
2429
|
+
if (this.containerEl) {
|
|
2430
|
+
// Set height back to auto so the browser can change the height as needed with window changes
|
|
2431
|
+
this.#textExpandAdapter.removeContainerMaxHeight(this.containerEl);
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
ngAfterContentInit() {
|
|
2437
|
+
forkJoin([
|
|
2438
|
+
this.#resources.getString('skyux_text_expand_see_more'),
|
|
2439
|
+
this.#resources.getString('skyux_text_expand_see_less'),
|
|
2440
|
+
])
|
|
2441
|
+
.pipe(take(1))
|
|
2442
|
+
.subscribe((resources) => {
|
|
2443
|
+
this.#seeMoreText = resources[0];
|
|
2444
|
+
this.#seeLessText = resources[1];
|
|
2445
|
+
this.#setup(this.text);
|
|
2446
|
+
/* istanbul ignore else */
|
|
2447
|
+
if (!this.expandModalTitle) {
|
|
2448
|
+
this.#resources
|
|
2449
|
+
.getString('skyux_text_expand_modal_title')
|
|
2450
|
+
.pipe(take(1))
|
|
2451
|
+
.subscribe((resource) => {
|
|
2452
|
+
this.expandModalTitle = resource;
|
|
2453
|
+
});
|
|
2454
|
+
}
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
#setup(value) {
|
|
2458
|
+
if (value) {
|
|
2459
|
+
this.#newlineCount = this.#getNewlineCount(value);
|
|
2460
|
+
this.#collapsedText = this.#getTruncatedText(value, this.maxLength);
|
|
2461
|
+
if (this.#collapsedText !== value) {
|
|
2462
|
+
this.buttonText = this.#seeMoreText;
|
|
2463
|
+
this.isExpanded = false;
|
|
2464
|
+
this.expandable = true;
|
|
2465
|
+
this.isModal =
|
|
2466
|
+
this.#newlineCount > this.maxExpandedNewlines ||
|
|
2467
|
+
this.text.length > this.maxExpandedLength;
|
|
2468
|
+
}
|
|
2469
|
+
else {
|
|
2470
|
+
this.expandable = false;
|
|
2471
|
+
}
|
|
2472
|
+
this.#textToShow = this.#collapsedText;
|
|
2473
|
+
}
|
|
2474
|
+
else {
|
|
2475
|
+
this.#textToShow = '';
|
|
2476
|
+
this.expandable = false;
|
|
2477
|
+
}
|
|
2478
|
+
if (this.textEl) {
|
|
2479
|
+
this.#textExpandAdapter.setText(this.textEl, this.#textToShow);
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
#getNewlineCount(value) {
|
|
2483
|
+
const matches = value.match(/\n/gi);
|
|
2484
|
+
if (matches) {
|
|
2485
|
+
return matches.length;
|
|
2486
|
+
}
|
|
2487
|
+
return 0;
|
|
2488
|
+
}
|
|
2489
|
+
#getTruncatedText(value, length) {
|
|
2490
|
+
let i;
|
|
2491
|
+
if (this.truncateNewlines) {
|
|
2492
|
+
value = value.replace(/\n+/gi, ' ');
|
|
2493
|
+
}
|
|
2494
|
+
// Jump ahead one character and see if it's a space, and if it isn't,
|
|
2495
|
+
// back up to the first space and break there so a word doesn't get cut
|
|
2496
|
+
// in half.
|
|
2497
|
+
if (length < value.length) {
|
|
2498
|
+
for (i = length; i > length - 10; i--) {
|
|
2499
|
+
if (/\s/.test(value.charAt(i))) {
|
|
2500
|
+
length = i;
|
|
2501
|
+
break;
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
return value.substring(0, length);
|
|
2506
|
+
}
|
|
2507
|
+
#animateText(expanding) {
|
|
2508
|
+
if (this.containerEl && this.textEl) {
|
|
2509
|
+
const adapter = this.#textExpandAdapter;
|
|
2510
|
+
const container = this.containerEl;
|
|
2511
|
+
if (expanding) {
|
|
2512
|
+
adapter.setText(this.textEl, this.text);
|
|
2513
|
+
this.#textToShow = this.text;
|
|
2514
|
+
}
|
|
2515
|
+
else {
|
|
2516
|
+
adapter.setText(this.textEl, this.#collapsedText);
|
|
2517
|
+
this.#textToShow = this.#collapsedText;
|
|
2518
|
+
}
|
|
2519
|
+
this.buttonText = expanding ? this.#seeLessText : this.#seeMoreText;
|
|
2520
|
+
// Measure the new height so we can animate to it.
|
|
2521
|
+
const newHeight = adapter.getContainerHeight(container);
|
|
2522
|
+
this.transitionHeight = newHeight;
|
|
2523
|
+
// Always show all text while animating so that the animation is smooth. The animation callback will set this back if needed.
|
|
2524
|
+
if (!expanding) {
|
|
2525
|
+
adapter.setText(this.textEl, this.text);
|
|
2526
|
+
}
|
|
2527
|
+
this.isExpanded = expanding;
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandComponent, deps: [{ token: i1$3.SkyLibResourcesService }, { token: i1$4.SkyModalService }, { token: SkyTextExpandAdapterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2531
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyTextExpandComponent, selector: "sky-text-expand", inputs: { expandModalTitle: "expandModalTitle", maxExpandedLength: "maxExpandedLength", maxExpandedNewlines: "maxExpandedNewlines", maxLength: "maxLength", text: "text", truncateNewlines: "truncateNewlines" }, providers: [SkyTextExpandAdapterService], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }, { propertyName: "textEl", first: true, predicate: ["text"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n class=\"sky-text-expand-container\"\n #container\n>\n <span class=\"sky-text-expand-text\" [id]=\"contentSectionId\" #text></span>\n <span class=\"sky-text-expand-ellipsis\" *ngIf=\"!isExpanded && expandable\"\n >...\n </span>\n <button\n *ngIf=\"expandable\"\n type=\"button\"\n class=\"sky-btn sky-btn-link-inline sky-text-expand-see-more\"\n [attr.aria-expanded]=\"isModal ? undefined : !!isExpanded\"\n [attr.aria-controls]=\"isModal ? undefined : contentSectionId\"\n [attr.aria-haspopup]=\"isModal ? 'dialog' : undefined\"\n (click)=\"textExpand()\"\n >\n {{ buttonText }}\n </button>\n</div>\n", styles: [".sky-text-expand-ellipsis{letter-spacing:2px;white-space:nowrap}.sky-text-expand-space{white-space:normal}.sky-text-expand-see-more{white-space:nowrap;margin-left:5px}.sky-text-expand-text{margin:0;white-space:pre-wrap}.sky-text-expand-container{word-break:break-word;word-wrap:break-word;overflow:hidden;height:auto}.sky-text-expand-modal-content{white-space:pre-line;word-wrap:break-word}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
2532
|
+
trigger('expansionAnimation', [
|
|
2533
|
+
transition(':enter', []),
|
|
2534
|
+
state('true', style({
|
|
2535
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2536
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2537
|
+
state('false', style({
|
|
2538
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2539
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2540
|
+
transition('true => false', animate('250ms ease')),
|
|
2541
|
+
transition('false => true', animate('250ms ease')),
|
|
2542
|
+
transition('void => *', []),
|
|
2543
|
+
]),
|
|
2544
|
+
] }); }
|
|
2545
|
+
}
|
|
2546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandComponent, decorators: [{
|
|
2547
|
+
type: Component,
|
|
2548
|
+
args: [{ animations: [
|
|
2549
|
+
trigger('expansionAnimation', [
|
|
2550
|
+
transition(':enter', []),
|
|
2551
|
+
state('true', style({
|
|
2552
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2553
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2554
|
+
state('false', style({
|
|
2555
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2556
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2557
|
+
transition('true => false', animate('250ms ease')),
|
|
2558
|
+
transition('false => true', animate('250ms ease')),
|
|
2559
|
+
transition('void => *', []),
|
|
2560
|
+
]),
|
|
2561
|
+
], selector: 'sky-text-expand', providers: [SkyTextExpandAdapterService], template: "<div\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n class=\"sky-text-expand-container\"\n #container\n>\n <span class=\"sky-text-expand-text\" [id]=\"contentSectionId\" #text></span>\n <span class=\"sky-text-expand-ellipsis\" *ngIf=\"!isExpanded && expandable\"\n >...\n </span>\n <button\n *ngIf=\"expandable\"\n type=\"button\"\n class=\"sky-btn sky-btn-link-inline sky-text-expand-see-more\"\n [attr.aria-expanded]=\"isModal ? undefined : !!isExpanded\"\n [attr.aria-controls]=\"isModal ? undefined : contentSectionId\"\n [attr.aria-haspopup]=\"isModal ? 'dialog' : undefined\"\n (click)=\"textExpand()\"\n >\n {{ buttonText }}\n </button>\n</div>\n", styles: [".sky-text-expand-ellipsis{letter-spacing:2px;white-space:nowrap}.sky-text-expand-space{white-space:normal}.sky-text-expand-see-more{white-space:nowrap;margin-left:5px}.sky-text-expand-text{margin:0;white-space:pre-wrap}.sky-text-expand-container{word-break:break-word;word-wrap:break-word;overflow:hidden;height:auto}.sky-text-expand-modal-content{white-space:pre-line;word-wrap:break-word}\n"] }]
|
|
2562
|
+
}], ctorParameters: function () { return [{ type: i1$3.SkyLibResourcesService }, { type: i1$4.SkyModalService }, { type: SkyTextExpandAdapterService }]; }, propDecorators: { expandModalTitle: [{
|
|
2563
|
+
type: Input
|
|
2564
|
+
}], maxExpandedLength: [{
|
|
2565
|
+
type: Input
|
|
2566
|
+
}], maxExpandedNewlines: [{
|
|
2567
|
+
type: Input
|
|
2568
|
+
}], maxLength: [{
|
|
2569
|
+
type: Input
|
|
2570
|
+
}], text: [{
|
|
2571
|
+
type: Input
|
|
2572
|
+
}], truncateNewlines: [{
|
|
2573
|
+
type: Input
|
|
2574
|
+
}], containerEl: [{
|
|
2575
|
+
type: ViewChild,
|
|
2576
|
+
args: ['container', {
|
|
2577
|
+
read: ElementRef,
|
|
2578
|
+
static: true,
|
|
2579
|
+
}]
|
|
2580
|
+
}], textEl: [{
|
|
2581
|
+
type: ViewChild,
|
|
2582
|
+
args: ['text', {
|
|
2583
|
+
read: ElementRef,
|
|
2584
|
+
static: true,
|
|
2585
|
+
}]
|
|
2586
|
+
}] } });
|
|
2587
|
+
|
|
2588
|
+
class SkyTextExpandModule {
|
|
2589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2590
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModule, declarations: [SkyTextExpandComponent, SkyTextExpandModalComponent], imports: [SkyI18nModule,
|
|
2591
|
+
SkyLayoutResourcesModule,
|
|
2592
|
+
SkyModalModule,
|
|
2593
|
+
CommonModule], exports: [SkyTextExpandComponent] }); }
|
|
2594
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModule, imports: [SkyI18nModule,
|
|
2595
|
+
SkyLayoutResourcesModule,
|
|
2596
|
+
SkyModalModule,
|
|
2597
|
+
CommonModule] }); }
|
|
2598
|
+
}
|
|
2599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandModule, decorators: [{
|
|
2600
|
+
type: NgModule,
|
|
2601
|
+
args: [{
|
|
2602
|
+
declarations: [SkyTextExpandComponent, SkyTextExpandModalComponent],
|
|
2603
|
+
imports: [
|
|
2604
|
+
SkyI18nModule,
|
|
2605
|
+
SkyLayoutResourcesModule,
|
|
2606
|
+
SkyModalModule,
|
|
2607
|
+
CommonModule,
|
|
2608
|
+
],
|
|
2609
|
+
exports: [SkyTextExpandComponent],
|
|
2610
|
+
}]
|
|
2611
|
+
}] });
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* @internal
|
|
2615
|
+
*/
|
|
2616
|
+
class SkyTextExpandRepeaterAdapterService {
|
|
2617
|
+
#renderer;
|
|
2618
|
+
constructor(rendererFactory) {
|
|
2619
|
+
this.#renderer = rendererFactory.createRenderer(undefined, null);
|
|
2620
|
+
}
|
|
2621
|
+
getItems(elRef) {
|
|
2622
|
+
return elRef.nativeElement.querySelectorAll('.sky-text-expand-repeater-item');
|
|
2623
|
+
}
|
|
2624
|
+
hideItem(item) {
|
|
2625
|
+
this.#renderer.setStyle(item, 'display', 'none');
|
|
2626
|
+
}
|
|
2627
|
+
showItem(item) {
|
|
2628
|
+
this.#renderer.removeStyle(item, 'display');
|
|
2629
|
+
}
|
|
2630
|
+
getContainerHeight(containerEl) {
|
|
2631
|
+
return containerEl.nativeElement.offsetHeight;
|
|
2632
|
+
}
|
|
2633
|
+
removeContainerMaxHeight(containerEl) {
|
|
2634
|
+
this.#renderer.removeStyle(containerEl.nativeElement, 'max-height');
|
|
2635
|
+
}
|
|
2636
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2637
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterAdapterService }); }
|
|
2638
|
+
}
|
|
2639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterAdapterService, decorators: [{
|
|
2640
|
+
type: Injectable
|
|
2641
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Auto-incrementing integer used to generate unique ids for text expand repeater components.
|
|
2645
|
+
*/
|
|
2646
|
+
let nextId = 0;
|
|
2647
|
+
class SkyTextExpandRepeaterComponent {
|
|
2648
|
+
/**
|
|
2649
|
+
* The data to truncate.
|
|
2650
|
+
*/
|
|
2651
|
+
set data(value) {
|
|
2652
|
+
this.#_data = value;
|
|
2653
|
+
// Wait for the dom to render the new items based on the updated data
|
|
2654
|
+
setTimeout(() => {
|
|
2655
|
+
this.#htmlItems = this.#textExpandRepeaterAdapter.getItems(this.#elRef);
|
|
2656
|
+
this.#setup(value);
|
|
2657
|
+
});
|
|
2658
|
+
}
|
|
2659
|
+
get data() {
|
|
2660
|
+
return this.#_data;
|
|
2661
|
+
}
|
|
2662
|
+
/**
|
|
2663
|
+
* The number of items to display before truncating the list. If not supplied, all items are shown.
|
|
2664
|
+
*/
|
|
2665
|
+
set maxItems(value) {
|
|
2666
|
+
this.#_maxItems = value;
|
|
2667
|
+
this.#setup(this.data);
|
|
2668
|
+
}
|
|
2669
|
+
get maxItems() {
|
|
2670
|
+
return this.#_maxItems;
|
|
2671
|
+
}
|
|
2672
|
+
#seeMoreText;
|
|
2673
|
+
#seeLessText;
|
|
2674
|
+
#htmlItems;
|
|
2675
|
+
#_data;
|
|
2676
|
+
#_maxItems;
|
|
2677
|
+
#resources;
|
|
2678
|
+
#elRef;
|
|
2679
|
+
#textExpandRepeaterAdapter;
|
|
2680
|
+
#changeDetector;
|
|
2681
|
+
constructor(resources, elRef, textExpandRepeaterAdapter, changeDetector) {
|
|
2682
|
+
/**
|
|
2683
|
+
* The style of bullet to use
|
|
2684
|
+
* @default "unordered"
|
|
2685
|
+
*/
|
|
2686
|
+
this.listStyle = 'unordered';
|
|
2687
|
+
this.buttonText = '';
|
|
2688
|
+
this.expandable = false;
|
|
2689
|
+
this.contentSectionId = `sky-text-expand-repeater-content-${++nextId}`;
|
|
2690
|
+
this.transitionHeight = 1;
|
|
2691
|
+
this.#seeMoreText = '';
|
|
2692
|
+
this.#seeLessText = '';
|
|
2693
|
+
this.#resources = resources;
|
|
2694
|
+
this.#elRef = elRef;
|
|
2695
|
+
this.#textExpandRepeaterAdapter = textExpandRepeaterAdapter;
|
|
2696
|
+
this.#changeDetector = changeDetector;
|
|
2697
|
+
}
|
|
2698
|
+
ngAfterViewInit() {
|
|
2699
|
+
forkJoin([
|
|
2700
|
+
this.#resources.getString('skyux_text_expand_see_more'),
|
|
2701
|
+
this.#resources.getString('skyux_text_expand_see_less'),
|
|
2702
|
+
])
|
|
2703
|
+
.pipe(take(1))
|
|
2704
|
+
.subscribe((resources) => {
|
|
2705
|
+
this.#seeMoreText = resources[0];
|
|
2706
|
+
this.#seeLessText = resources[1];
|
|
2707
|
+
/* sanity check */
|
|
2708
|
+
/* istanbul ignore else */
|
|
2709
|
+
if (!this.isExpanded) {
|
|
2710
|
+
this.buttonText = this.#seeMoreText;
|
|
2711
|
+
}
|
|
2712
|
+
else {
|
|
2713
|
+
this.buttonText = this.#seeLessText;
|
|
2714
|
+
}
|
|
2715
|
+
this.#changeDetector.detectChanges();
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
animationEnd() {
|
|
2719
|
+
// Ensure all items that should be hidden are hidden. This is because we need them shown during the animation window for visual purposes.
|
|
2720
|
+
if (!this.isExpanded) {
|
|
2721
|
+
this.#hideItems();
|
|
2722
|
+
}
|
|
2723
|
+
// This set timeout is needed as the `animationEnd` function is called by the angular animation callback prior to the animation setting the style on the element
|
|
2724
|
+
setTimeout(() => {
|
|
2725
|
+
if (this.containerEl) {
|
|
2726
|
+
// Set height back to auto so the browser can change the height as needed with window changes
|
|
2727
|
+
this.#textExpandRepeaterAdapter.removeContainerMaxHeight(this.containerEl);
|
|
2728
|
+
}
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
repeaterExpand() {
|
|
2732
|
+
if (!this.isExpanded) {
|
|
2733
|
+
this.#animateRepeater(true);
|
|
2734
|
+
}
|
|
2735
|
+
else {
|
|
2736
|
+
this.#animateRepeater(false);
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
#animateRepeater(expanding) {
|
|
2740
|
+
const adapter = this.#textExpandRepeaterAdapter;
|
|
2741
|
+
const container = this.containerEl;
|
|
2742
|
+
if (container) {
|
|
2743
|
+
if (expanding) {
|
|
2744
|
+
this.#showItems();
|
|
2745
|
+
}
|
|
2746
|
+
else {
|
|
2747
|
+
this.#hideItems();
|
|
2748
|
+
}
|
|
2749
|
+
const newHeight = adapter.getContainerHeight(container);
|
|
2750
|
+
this.transitionHeight = newHeight;
|
|
2751
|
+
if (!expanding) {
|
|
2752
|
+
this.buttonText = this.#seeMoreText;
|
|
2753
|
+
}
|
|
2754
|
+
else {
|
|
2755
|
+
this.buttonText = this.#seeLessText;
|
|
2756
|
+
}
|
|
2757
|
+
if (!expanding) {
|
|
2758
|
+
// Show all items during animation for visual purposes.
|
|
2759
|
+
this.#showItems();
|
|
2760
|
+
}
|
|
2761
|
+
this.isExpanded = expanding;
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
#setup(value) {
|
|
2765
|
+
if (value) {
|
|
2766
|
+
const length = value.length;
|
|
2767
|
+
if (this.maxItems && length > this.maxItems) {
|
|
2768
|
+
this.expandable = true;
|
|
2769
|
+
this.buttonText = this.#seeMoreText;
|
|
2770
|
+
this.#hideItems();
|
|
2771
|
+
if (this.containerEl) {
|
|
2772
|
+
this.transitionHeight =
|
|
2773
|
+
this.#textExpandRepeaterAdapter.getContainerHeight(this.containerEl);
|
|
2774
|
+
}
|
|
2775
|
+
this.isExpanded = false;
|
|
2776
|
+
}
|
|
2777
|
+
else {
|
|
2778
|
+
this.expandable = false;
|
|
2779
|
+
this.isExpanded = undefined;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
else {
|
|
2783
|
+
this.expandable = false;
|
|
2784
|
+
this.isExpanded = undefined;
|
|
2785
|
+
}
|
|
2786
|
+
this.#changeDetector.markForCheck();
|
|
2787
|
+
}
|
|
2788
|
+
#hideItems() {
|
|
2789
|
+
if (this.#htmlItems && this.maxItems) {
|
|
2790
|
+
for (let i = this.maxItems; i < this.#htmlItems.length; i++) {
|
|
2791
|
+
this.#textExpandRepeaterAdapter.hideItem(this.#htmlItems[i]);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
#showItems() {
|
|
2796
|
+
if (this.#htmlItems && this.maxItems) {
|
|
2797
|
+
for (let i = this.maxItems; i < this.#htmlItems.length; i++) {
|
|
2798
|
+
this.#textExpandRepeaterAdapter.showItem(this.#htmlItems[i]);
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterComponent, deps: [{ token: i1$3.SkyLibResourcesService }, { token: i0.ElementRef }, { token: SkyTextExpandRepeaterAdapterService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2803
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyTextExpandRepeaterComponent, selector: "sky-text-expand-repeater", inputs: { data: "data", itemTemplate: "itemTemplate", listStyle: "listStyle", maxItems: "maxItems" }, providers: [SkyTextExpandRepeaterAdapterService], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-text-expand-repeater\">\n <ul\n *ngIf=\"listStyle !== 'ordered'\"\n class=\"sky-text-expand-repeater-container\"\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n [id]=\"contentSectionId\"\n [ngClass]=\"{\n 'sky-text-expand-repeater-list-style-none': listStyle === 'unstyled'\n }\"\n #container\n >\n <ng-template [ngTemplateOutlet]=\"listItemTemplate\"></ng-template>\n </ul>\n <ol\n *ngIf=\"listStyle === 'ordered'\"\n class=\"sky-text-expand-repeater-container\"\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n [id]=\"contentSectionId\"\n #container\n >\n <ng-template [ngTemplateOutlet]=\"listItemTemplate\"></ng-template>\n </ol>\n <button\n *ngIf=\"expandable\"\n type=\"button\"\n class=\"sky-btn sky-btn-link-inline sky-text-expand-repeater-see-more\"\n [attr.aria-expanded]=\"!!isExpanded\"\n [attr.aria-controls]=\"contentSectionId\"\n (click)=\"repeaterExpand()\"\n [ngClass]=\"{\n 'sky-text-expand-repeater-see-more-list-style-none':\n listStyle === 'unstyled'\n }\"\n >\n {{ buttonText }}\n </button>\n</div>\n\n<ng-template let-item #defaultItemTemplate>\n {{ item }}\n</ng-template>\n\n<ng-template #listItemTemplate>\n <li *ngFor=\"let item of data\" class=\"sky-text-expand-repeater-item\">\n <ng-template\n [ngTemplateOutlet]=\"itemTemplate || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n </li>\n</ng-template>\n", styles: [":host{display:block}.sky-text-expand-repeater-container{overflow-y:hidden;height:auto;margin-bottom:0;margin-top:var(--sky-compat-text-expand-repeater-margin-top, 0)}.sky-text-expand-repeater-see-more{white-space:nowrap;margin-left:40px}.sky-text-expand-repeater-list-style-none{list-style-type:none;padding-left:0}.sky-text-expand-repeater-see-more-list-style-none{margin-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
2804
|
+
trigger('expansionAnimation', [
|
|
2805
|
+
transition(':enter', []),
|
|
2806
|
+
state('true', style({
|
|
2807
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2808
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2809
|
+
state('false', style({
|
|
2810
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2811
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2812
|
+
transition('true => false', animate('250ms ease')),
|
|
2813
|
+
transition('false => true', animate('250ms ease')),
|
|
2814
|
+
transition('void => *', []),
|
|
2815
|
+
]),
|
|
2816
|
+
] }); }
|
|
2817
|
+
}
|
|
2818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterComponent, decorators: [{
|
|
2819
|
+
type: Component,
|
|
2820
|
+
args: [{ animations: [
|
|
2821
|
+
trigger('expansionAnimation', [
|
|
2822
|
+
transition(':enter', []),
|
|
2823
|
+
state('true', style({
|
|
2824
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2825
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2826
|
+
state('false', style({
|
|
2827
|
+
maxHeight: '{{transitionHeight}}px',
|
|
2828
|
+
}), { params: { transitionHeight: 0 } }),
|
|
2829
|
+
transition('true => false', animate('250ms ease')),
|
|
2830
|
+
transition('false => true', animate('250ms ease')),
|
|
2831
|
+
transition('void => *', []),
|
|
2832
|
+
]),
|
|
2833
|
+
], selector: 'sky-text-expand-repeater', providers: [SkyTextExpandRepeaterAdapterService], template: "<div class=\"sky-text-expand-repeater\">\n <ul\n *ngIf=\"listStyle !== 'ordered'\"\n class=\"sky-text-expand-repeater-container\"\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n [id]=\"contentSectionId\"\n [ngClass]=\"{\n 'sky-text-expand-repeater-list-style-none': listStyle === 'unstyled'\n }\"\n #container\n >\n <ng-template [ngTemplateOutlet]=\"listItemTemplate\"></ng-template>\n </ul>\n <ol\n *ngIf=\"listStyle === 'ordered'\"\n class=\"sky-text-expand-repeater-container\"\n [@expansionAnimation]=\"{\n value: isExpanded,\n params: { transitionHeight: transitionHeight }\n }\"\n (@expansionAnimation.done)=\"animationEnd()\"\n [id]=\"contentSectionId\"\n #container\n >\n <ng-template [ngTemplateOutlet]=\"listItemTemplate\"></ng-template>\n </ol>\n <button\n *ngIf=\"expandable\"\n type=\"button\"\n class=\"sky-btn sky-btn-link-inline sky-text-expand-repeater-see-more\"\n [attr.aria-expanded]=\"!!isExpanded\"\n [attr.aria-controls]=\"contentSectionId\"\n (click)=\"repeaterExpand()\"\n [ngClass]=\"{\n 'sky-text-expand-repeater-see-more-list-style-none':\n listStyle === 'unstyled'\n }\"\n >\n {{ buttonText }}\n </button>\n</div>\n\n<ng-template let-item #defaultItemTemplate>\n {{ item }}\n</ng-template>\n\n<ng-template #listItemTemplate>\n <li *ngFor=\"let item of data\" class=\"sky-text-expand-repeater-item\">\n <ng-template\n [ngTemplateOutlet]=\"itemTemplate || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n </li>\n</ng-template>\n", styles: [":host{display:block}.sky-text-expand-repeater-container{overflow-y:hidden;height:auto;margin-bottom:0;margin-top:var(--sky-compat-text-expand-repeater-margin-top, 0)}.sky-text-expand-repeater-see-more{white-space:nowrap;margin-left:40px}.sky-text-expand-repeater-list-style-none{list-style-type:none;padding-left:0}.sky-text-expand-repeater-see-more-list-style-none{margin-left:0}\n"] }]
|
|
2834
|
+
}], ctorParameters: function () { return [{ type: i1$3.SkyLibResourcesService }, { type: i0.ElementRef }, { type: SkyTextExpandRepeaterAdapterService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
|
|
2835
|
+
type: Input
|
|
2836
|
+
}], itemTemplate: [{
|
|
2837
|
+
type: Input
|
|
2838
|
+
}], listStyle: [{
|
|
2839
|
+
type: Input
|
|
2840
|
+
}], maxItems: [{
|
|
2841
|
+
type: Input
|
|
2842
|
+
}], containerEl: [{
|
|
2843
|
+
type: ViewChild,
|
|
2844
|
+
args: ['container', {
|
|
2845
|
+
read: ElementRef,
|
|
2846
|
+
static: false,
|
|
2847
|
+
}]
|
|
2848
|
+
}] } });
|
|
2849
|
+
|
|
2850
|
+
class SkyTextExpandRepeaterModule {
|
|
2851
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2852
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterModule, declarations: [SkyTextExpandRepeaterComponent], imports: [SkyI18nModule, SkyLayoutResourcesModule, CommonModule], exports: [SkyTextExpandRepeaterComponent] }); }
|
|
2853
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterModule, imports: [SkyI18nModule, SkyLayoutResourcesModule, CommonModule] }); }
|
|
2854
|
+
}
|
|
2855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyTextExpandRepeaterModule, decorators: [{
|
|
2856
|
+
type: NgModule,
|
|
2857
|
+
args: [{
|
|
2858
|
+
declarations: [SkyTextExpandRepeaterComponent],
|
|
2859
|
+
imports: [SkyI18nModule, SkyLayoutResourcesModule, CommonModule],
|
|
2860
|
+
exports: [SkyTextExpandRepeaterComponent],
|
|
2861
|
+
}]
|
|
2862
|
+
}] });
|
|
2863
|
+
|
|
2864
|
+
/**
|
|
2865
|
+
* Specifies a container for an item in the toolbar.
|
|
2866
|
+
*/
|
|
2867
|
+
class SkyToolbarItemComponent {
|
|
2868
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2869
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyToolbarItemComponent, selector: "sky-toolbar-item", ngImport: i0, template: "<div class=\"sky-toolbar-item\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-toolbar-item{margin-right:5px;margin-bottom:5px}:host-context(.sky-theme-modern) .sky-toolbar-item{margin-bottom:0;margin-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn{padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled){background-color:transparent;border:none}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled):not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-toolbar-item{margin-bottom:0;margin-right:10px}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn{padding-left:10px;padding-right:10px}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled){background-color:transparent;border:none}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled):not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}\n"] }); }
|
|
2870
|
+
}
|
|
2871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarItemComponent, decorators: [{
|
|
2872
|
+
type: Component,
|
|
2873
|
+
args: [{ selector: 'sky-toolbar-item', template: "<div class=\"sky-toolbar-item\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-toolbar-item{margin-right:5px;margin-bottom:5px}:host-context(.sky-theme-modern) .sky-toolbar-item{margin-bottom:0;margin-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn{padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled){background-color:transparent;border:none}:host-context(.sky-theme-modern) .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled):not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-toolbar-item{margin-bottom:0;margin-right:10px}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn{padding-left:10px;padding-right:10px}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled){background-color:transparent;border:none}.sky-theme-modern .sky-toolbar-item ::ng-deep .sky-btn.sky-btn-default:not(:disabled):not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}\n"] }]
|
|
2874
|
+
}] });
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* Specifies a section to group items within the toolbar. The section displays items in a separate horizontal row.
|
|
2878
|
+
*/
|
|
2879
|
+
class SkyToolbarSectionComponent {
|
|
2880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2881
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyToolbarSectionComponent, selector: "sky-toolbar-section", ngImport: i0, template: "<div class=\"sky-toolbar-section\">\n <div class=\"sky-toolbar-section-items\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"sky-toolbar-view-actions\"></ng-content>\n</div>\n", styles: [".sky-toolbar-section{display:flex;flex-wrap:nowrap;padding:5px 10px 0;min-height:49px;align-items:center;position:relative;overflow-x:auto}.sky-toolbar-section-items{display:flex;flex-wrap:wrap;align-items:center}:host-context(.sky-theme-modern) .sky-toolbar-section{padding:10px 0}.sky-theme-modern .sky-toolbar-section{padding:10px 0}\n"] }); }
|
|
2882
|
+
}
|
|
2883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarSectionComponent, decorators: [{
|
|
2884
|
+
type: Component,
|
|
2885
|
+
args: [{ selector: 'sky-toolbar-section', template: "<div class=\"sky-toolbar-section\">\n <div class=\"sky-toolbar-section-items\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"sky-toolbar-view-actions\"></ng-content>\n</div>\n", styles: [".sky-toolbar-section{display:flex;flex-wrap:nowrap;padding:5px 10px 0;min-height:49px;align-items:center;position:relative;overflow-x:auto}.sky-toolbar-section-items{display:flex;flex-wrap:wrap;align-items:center}:host-context(.sky-theme-modern) .sky-toolbar-section{padding:10px 0}.sky-theme-modern .sky-toolbar-section{padding:10px 0}\n"] }]
|
|
2886
|
+
}] });
|
|
2887
|
+
|
|
2888
|
+
/**
|
|
2889
|
+
* Adds a section on the right side of the toolbar for items that substantially alter
|
|
2890
|
+
* the view of the content container. This includes simple filters and view switchers.
|
|
2891
|
+
*/
|
|
2892
|
+
class SkyToolbarViewActionsComponent {
|
|
2893
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarViewActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2894
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyToolbarViewActionsComponent, selector: "sky-toolbar-view-actions", ngImport: i0, template: "<div class=\"sky-toolbar-view-actions\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{margin-left:auto}.sky-toolbar-view-actions{display:flex;align-items:center;margin-bottom:5px}.sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions{margin-bottom:0}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-top:5px;margin-bottom:5px;margin-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep .sky-btn{background-color:transparent;border:none;padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep .sky-btn:not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-toolbar-view-actions{margin-bottom:0}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-top:5px;margin-bottom:5px;margin-right:10px}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep .sky-btn{background-color:transparent;border:none;padding-left:10px;padding-right:10px}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep .sky-btn:not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2895
|
+
}
|
|
2896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarViewActionsComponent, decorators: [{
|
|
2897
|
+
type: Component,
|
|
2898
|
+
args: [{ selector: 'sky-toolbar-view-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-toolbar-view-actions\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{margin-left:auto}.sky-toolbar-view-actions{display:flex;align-items:center;margin-bottom:5px}.sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions{margin-bottom:0}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-top:5px;margin-bottom:5px;margin-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep .sky-btn{background-color:transparent;border:none;padding-left:10px;padding-right:10px}:host-context(.sky-theme-modern) .sky-toolbar-view-actions ::ng-deep .sky-btn:not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-toolbar-view-actions{margin-bottom:0}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep>:not(:last-child){margin-top:5px;margin-bottom:5px;margin-right:10px}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep .sky-btn{background-color:transparent;border:none;padding-left:10px;padding-right:10px}.sky-theme-modern .sky-toolbar-view-actions ::ng-deep .sky-btn:not(:hover):not(:active):not(:focus){box-shadow:inset 0 0 0 1px transparent}\n"] }]
|
|
2899
|
+
}] });
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Displays actions for lists, records, and tiles.
|
|
2903
|
+
*/
|
|
2904
|
+
class SkyToolbarComponent {
|
|
2905
|
+
constructor() {
|
|
2906
|
+
this.hasSections = false;
|
|
2907
|
+
}
|
|
2908
|
+
set sectionComponents(value) {
|
|
2909
|
+
this.hasSections = !!value && value.length > 0;
|
|
2910
|
+
}
|
|
2911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SkyToolbarComponent, selector: "sky-toolbar", queries: [{ propertyName: "sectionComponents", predicate: SkyToolbarSectionComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"sky-toolbar-container\"\n [ngClass]=\"{ 'sky-toolbar-sectioned': hasSections }\"\n>\n <ng-content select=\"sky-toolbar-section\"></ng-content>\n <div class=\"sky-toolbar-items\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"sky-toolbar-view-actions\"></ng-content>\n</div>\n", styles: ["sky-toolbar+:host .sky-toolbar-container{border-top:none}.sky-toolbar-container{min-height:49px;background-color:#fff;padding:5px 10px 0;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;display:flex;flex-wrap:wrap;align-items:center;position:relative}.sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #cdcfd2}.sky-toolbar-container:not(.sky-toolbar-sectioned){flex-wrap:nowrap}.sky-toolbar-sectioned{display:block;padding:0}.sky-toolbar-items{display:flex;flex-wrap:wrap;align-items:center}:host-context(.sky-theme-modern .sky-viewkeeper-fixed) .sky-toolbar-container{background-color:#fcfcfc}:host-context(.sky-theme-modern.sky-theme-mode-dark .sky-viewkeeper-fixed) .sky-toolbar-container{background-color:#121212}:host-context(.sky-theme-modern) .sky-toolbar-container{background-color:transparent;border:none;padding:10px 0}:host-context(.sky-theme-modern) .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#fcfcfc}:host-context(.sky-theme-modern) .sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #d2d2d2}:host-context(.sky-theme-modern) .sky-toolbar-sectioned{padding:0}.sky-theme-modern .sky-toolbar-container{background-color:transparent;border:none;padding:10px 0}.sky-theme-modern .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#fcfcfc}.sky-theme-modern .sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #d2d2d2}.sky-theme-modern .sky-toolbar-sectioned{padding:0}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#121212}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
2913
|
+
}
|
|
2914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarComponent, decorators: [{
|
|
2915
|
+
type: Component,
|
|
2916
|
+
args: [{ selector: 'sky-toolbar', template: "<div\n class=\"sky-toolbar-container\"\n [ngClass]=\"{ 'sky-toolbar-sectioned': hasSections }\"\n>\n <ng-content select=\"sky-toolbar-section\"></ng-content>\n <div class=\"sky-toolbar-items\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"sky-toolbar-view-actions\"></ng-content>\n</div>\n", styles: ["sky-toolbar+:host .sky-toolbar-container{border-top:none}.sky-toolbar-container{min-height:49px;background-color:#fff;padding:5px 10px 0;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;display:flex;flex-wrap:wrap;align-items:center;position:relative}.sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #cdcfd2}.sky-toolbar-container:not(.sky-toolbar-sectioned){flex-wrap:nowrap}.sky-toolbar-sectioned{display:block;padding:0}.sky-toolbar-items{display:flex;flex-wrap:wrap;align-items:center}:host-context(.sky-theme-modern .sky-viewkeeper-fixed) .sky-toolbar-container{background-color:#fcfcfc}:host-context(.sky-theme-modern.sky-theme-mode-dark .sky-viewkeeper-fixed) .sky-toolbar-container{background-color:#121212}:host-context(.sky-theme-modern) .sky-toolbar-container{background-color:transparent;border:none;padding:10px 0}:host-context(.sky-theme-modern) .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#fcfcfc}:host-context(.sky-theme-modern) .sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #d2d2d2}:host-context(.sky-theme-modern) .sky-toolbar-sectioned{padding:0}.sky-theme-modern .sky-toolbar-container{background-color:transparent;border:none;padding:10px 0}.sky-theme-modern .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#fcfcfc}.sky-theme-modern .sky-toolbar-container ::ng-deep sky-toolbar-section:not(:first-child) .sky-toolbar-section{border-top:1px solid #d2d2d2}.sky-theme-modern .sky-toolbar-sectioned{padding:0}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toolbar-container.sky-viewkeeper-fixed{background-color:#121212}\n"] }]
|
|
2917
|
+
}], propDecorators: { sectionComponents: [{
|
|
2918
|
+
type: ContentChildren,
|
|
2919
|
+
args: [SkyToolbarSectionComponent, { descendants: true }]
|
|
2920
|
+
}] } });
|
|
2921
|
+
|
|
2922
|
+
class SkyToolbarModule {
|
|
2923
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2924
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarModule, declarations: [SkyToolbarComponent,
|
|
2925
|
+
SkyToolbarItemComponent,
|
|
2926
|
+
SkyToolbarSectionComponent,
|
|
2927
|
+
SkyToolbarViewActionsComponent], imports: [CommonModule], exports: [SkyToolbarComponent,
|
|
2928
|
+
SkyToolbarItemComponent,
|
|
2929
|
+
SkyToolbarSectionComponent,
|
|
2930
|
+
SkyToolbarViewActionsComponent] }); }
|
|
2931
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarModule, imports: [CommonModule] }); }
|
|
2932
|
+
}
|
|
2933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SkyToolbarModule, decorators: [{
|
|
2934
|
+
type: NgModule,
|
|
2935
|
+
args: [{
|
|
2936
|
+
declarations: [
|
|
2937
|
+
SkyToolbarComponent,
|
|
2938
|
+
SkyToolbarItemComponent,
|
|
2939
|
+
SkyToolbarSectionComponent,
|
|
2940
|
+
SkyToolbarViewActionsComponent,
|
|
2941
|
+
],
|
|
2942
|
+
imports: [CommonModule],
|
|
2943
|
+
exports: [
|
|
2944
|
+
SkyToolbarComponent,
|
|
2945
|
+
SkyToolbarItemComponent,
|
|
2946
|
+
SkyToolbarSectionComponent,
|
|
2947
|
+
SkyToolbarViewActionsComponent,
|
|
2948
|
+
],
|
|
2949
|
+
}]
|
|
2950
|
+
}] });
|
|
2951
|
+
|
|
2952
|
+
/**
|
|
2953
|
+
* Generated bundle index. Do not edit.
|
|
2954
|
+
*/
|
|
2955
|
+
|
|
2956
|
+
export { SkyActionButtonModule, SkyBackToTopMessageType, SkyBackToTopModule, SkyBoxModule, SkyCardModule, SkyDefinitionListModule, SkyDescriptionListMode, SkyDescriptionListModule, SkyFluidGridModule, SkyFormatModule, SkyInlineDeleteModule, SkyInlineDeleteType, SkyPageModule, SkyPageSummaryModule, SkyTextExpandModule, SkyTextExpandRepeaterModule, SkyToolbarModule, SkyActionButtonComponent as λ1, SkyCardActionsComponent as λ10, SkyCardContentComponent as λ11, SkyCardTitleComponent as λ12, SkyDefinitionListComponent as λ13, SkyDefinitionListContentComponent as λ14, SkyDefinitionListHeadingComponent as λ15, SkyDefinitionListLabelComponent as λ16, SkyDefinitionListValueComponent as λ17, SkyDescriptionListComponent as λ18, SkyDescriptionListTermComponent as λ19, SkyActionButtonContainerComponent as λ2, SkyDescriptionListDescriptionComponent as λ20, SkyDescriptionListContentComponent as λ21, SkyFluidGridComponent as λ22, SkyRowComponent as λ23, SkyColumnComponent as λ24, SkyFormatComponent as λ25, SkyPageComponent as λ26, SkyPageSummaryComponent as λ27, SkyPageSummaryAlertComponent as λ28, SkyPageSummaryContentComponent as λ29, SkyActionButtonDetailsComponent as λ3, SkyPageSummaryImageComponent as λ30, SkyPageSummaryKeyInfoComponent as λ31, SkyPageSummaryStatusComponent as λ32, SkyPageSummarySubtitleComponent as λ33, SkyPageSummaryTitleComponent as λ34, SkyTextExpandComponent as λ35, SkyTextExpandRepeaterComponent as λ36, SkyToolbarComponent as λ37, SkyToolbarSectionComponent as λ38, SkyToolbarItemComponent as λ39, SkyActionButtonHeaderComponent as λ4, SkyToolbarViewActionsComponent as λ40, SkyBoxComponent as λ41, SkyBoxHeaderComponent as λ42, SkyBoxContentComponent as λ43, SkyBoxControlsComponent as λ44, SkyActionButtonIconComponent as λ5, SkyBackToTopComponent as λ6, SkyBackToTopDirective as λ7, SkyInlineDeleteComponent as λ8, SkyCardComponent as λ9 };
|
|
2957
|
+
//# sourceMappingURL=skyux-layout.mjs.map
|