@festo-ui/angular 3.1.0-pre-20220321.2 → 3.1.0-pre-20220323.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/esm2020/lib/components/accordion/accordion-header/accordion-header.component.mjs +11 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.mjs +15 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.mjs +28 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item.component.mjs +143 -0
- package/esm2020/lib/components/accordion/accordion.component.mjs +59 -0
- package/esm2020/lib/components/accordion/index.mjs +6 -0
- package/esm2020/lib/components/components.module.mjs +31 -5
- package/esm2020/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.mjs +5 -2
- package/fesm2015/festo-ui-angular.mjs +272 -7
- package/fesm2015/festo-ui-angular.mjs.map +1 -1
- package/fesm2020/festo-ui-angular.mjs +270 -7
- package/fesm2020/festo-ui-angular.mjs.map +1 -1
- package/lib/components/accordion/accordion-header/accordion-header.component.d.ts +5 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.d.ts +6 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.d.ts +15 -0
- package/lib/components/accordion/accordion-item/accordion-item.component.d.ts +34 -0
- package/lib/components/accordion/accordion.component.d.ts +24 -0
- package/lib/components/accordion/index.d.ts +5 -0
- package/lib/components/components.module.d.ts +11 -5
- package/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.d.ts +2 -1
- package/package.json +1 -1
- package/scss/base/components/accordion/accordion-header/accordion-header.component.scss +12 -0
- package/scss/base/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.scss +109 -0
- package/scss/base/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.scss +9 -0
- package/scss/base/components/accordion/accordion-item/accordion-item.component.scss +71 -0
- package/scss/base/components/accordion/accordion.component.scss +6 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ContentChild, Directive, ViewChild, ContentChildren, TemplateRef, Injector, Injectable, HostListener, ChangeDetectionStrategy, Inject, Pipe, NgModule, forwardRef, HostBinding, Optional,
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ContentChild, Directive, ViewChild, ContentChildren, TemplateRef, Injector, Injectable, HostListener, ChangeDetectionStrategy, Inject, Pipe, SimpleChange, NgModule, forwardRef, HostBinding, Optional, ViewContainerRef, LOCALE_ID, SecurityContext } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule, formatDate } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/router';
|
|
@@ -338,15 +338,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
338
338
|
class StepHorizontalComponent {
|
|
339
339
|
constructor() {
|
|
340
340
|
this.isActive = false;
|
|
341
|
+
this.title = '';
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
344
|
StepHorizontalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: StepHorizontalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
344
|
-
StepHorizontalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: StepHorizontalComponent, selector: "fng-step-horizontal", inputs: { isActive: "isActive" }, ngImport: i0, template: "<div class=\"overflow-hidden\" [class.hidden]=\"!isActive\">\n <div class=\"fng-moving-container\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".overflow-hidden{overflow:hidden}@keyframes stepperAnimation{0%{transform:translate(100%)}to{transform:translate(0)}}.fng-moving-container{animation-name:stepperAnimation;animation-duration:.3s;animation-timing-function:ease}.hidden{display:none}\n"] });
|
|
345
|
+
StepHorizontalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: StepHorizontalComponent, selector: "fng-step-horizontal", inputs: { isActive: "isActive", title: "title" }, ngImport: i0, template: "<div class=\"overflow-hidden\" [class.hidden]=\"!isActive\">\n <div class=\"fng-moving-container\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".overflow-hidden{overflow:hidden}@keyframes stepperAnimation{0%{transform:translate(100%)}to{transform:translate(0)}}.fng-moving-container{animation-name:stepperAnimation;animation-duration:.3s;animation-timing-function:ease}.hidden{display:none}\n"] });
|
|
345
346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: StepHorizontalComponent, decorators: [{
|
|
346
347
|
type: Component,
|
|
347
348
|
args: [{ selector: 'fng-step-horizontal', template: "<div class=\"overflow-hidden\" [class.hidden]=\"!isActive\">\n <div class=\"fng-moving-container\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".overflow-hidden{overflow:hidden}@keyframes stepperAnimation{0%{transform:translate(100%)}to{transform:translate(0)}}.fng-moving-container{animation-name:stepperAnimation;animation-duration:.3s;animation-timing-function:ease}.hidden{display:none}\n"] }]
|
|
348
349
|
}], propDecorators: { isActive: [{
|
|
349
350
|
type: Input
|
|
351
|
+
}], title: [{
|
|
352
|
+
type: Input
|
|
350
353
|
}] } });
|
|
351
354
|
|
|
352
355
|
class StepperHorizontalComponent {
|
|
@@ -1795,6 +1798,248 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1795
1798
|
args: [MobileFlyoutPageComponent]
|
|
1796
1799
|
}] } });
|
|
1797
1800
|
|
|
1801
|
+
class AccordionItemBodyComponent {
|
|
1802
|
+
constructor() {
|
|
1803
|
+
// parentId will be set by accordion item this body belongs to
|
|
1804
|
+
this.id = '';
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
AccordionItemBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1808
|
+
AccordionItemBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AccordionItemBodyComponent, selector: "fng-accordion-item-body", ngImport: i0, template: "<div\n role=\"region\"\n [attr.id]=\"id + '-body'\"\n [attr.aria-labelledby]=\"id + '-header'\"\n class=\"fng-accordion-item-body\"\n>\n <ng-content></ng-content>\n <div class=\"fng-accordion-item-body-spacer-bottom\"></div>\n</div>\n", styles: ["@charset \"UTF-8\";.fng-accordion-item-body{overflow:hidden;transition:height .3s cubic-bezier(.4,0,.2,1);height:0px}.fng-accordion-item-body>:first-child:not(.fng-accordion-item-body-spacer-bottom):not(.fng-accordion){margin-top:0!important;padding-top:0!important}.fng-accordion-item-body>:not(.fng-accordion){margin-right:0}.fng-accordion-item-body-content{margin-right:64px}.fng-accordion-item-body-spacer-bottom{margin-top:24px;height:0;width:0}.fng-accordion-item-body .fng-accordion{margin-top:64px;margin-bottom:24px}.fng-accordion-item-body .fng-accordion-item-link{display:block;top:8px}.fng-accordion-item-body .fng-accordion-item-header{padding-top:32px;padding-right:32px}.fng-accordion-item-body .fng-accordion-item:after{top:8px;right:0px;color:var(--fwe-caerul);font-family:festo_icons-16;font-size:24px;content:\"\\e900\";height:24px;line-height:24px}.fng-accordion-item-body .fng-accordion-item--expanded:before{background-color:transparent}@media (min-width: 600px){.fng-accordion-item-body>:not(.fng-accordion){margin-right:64px}.fng-accordion-item-body .fng-accordion-item-header{padding-top:24px;padding-right:168px}.fng-accordion-item-body .fng-accordion-item-link{font-size:16px;top:24px;max-width:128px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fng-accordion-item-body .fng-accordion-item:after{top:27px}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemBodyComponent, decorators: [{
|
|
1810
|
+
type: Component,
|
|
1811
|
+
args: [{ selector: 'fng-accordion-item-body', encapsulation: ViewEncapsulation.None, template: "<div\n role=\"region\"\n [attr.id]=\"id + '-body'\"\n [attr.aria-labelledby]=\"id + '-header'\"\n class=\"fng-accordion-item-body\"\n>\n <ng-content></ng-content>\n <div class=\"fng-accordion-item-body-spacer-bottom\"></div>\n</div>\n", styles: ["@charset \"UTF-8\";.fng-accordion-item-body{overflow:hidden;transition:height .3s cubic-bezier(.4,0,.2,1);height:0px}.fng-accordion-item-body>:first-child:not(.fng-accordion-item-body-spacer-bottom):not(.fng-accordion){margin-top:0!important;padding-top:0!important}.fng-accordion-item-body>:not(.fng-accordion){margin-right:0}.fng-accordion-item-body-content{margin-right:64px}.fng-accordion-item-body-spacer-bottom{margin-top:24px;height:0;width:0}.fng-accordion-item-body .fng-accordion{margin-top:64px;margin-bottom:24px}.fng-accordion-item-body .fng-accordion-item-link{display:block;top:8px}.fng-accordion-item-body .fng-accordion-item-header{padding-top:32px;padding-right:32px}.fng-accordion-item-body .fng-accordion-item:after{top:8px;right:0px;color:var(--fwe-caerul);font-family:festo_icons-16;font-size:24px;content:\"\\e900\";height:24px;line-height:24px}.fng-accordion-item-body .fng-accordion-item--expanded:before{background-color:transparent}@media (min-width: 600px){.fng-accordion-item-body>:not(.fng-accordion){margin-right:64px}.fng-accordion-item-body .fng-accordion-item-header{padding-top:24px;padding-right:168px}.fng-accordion-item-body .fng-accordion-item-link{font-size:16px;top:24px;max-width:128px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fng-accordion-item-body .fng-accordion-item:after{top:27px}}\n"] }]
|
|
1812
|
+
}] });
|
|
1813
|
+
|
|
1814
|
+
var AccordionHeaderActions;
|
|
1815
|
+
(function (AccordionHeaderActions) {
|
|
1816
|
+
AccordionHeaderActions["Toggle"] = "toggle";
|
|
1817
|
+
})(AccordionHeaderActions || (AccordionHeaderActions = {}));
|
|
1818
|
+
class AccordionItemHeaderComponent {
|
|
1819
|
+
constructor() {
|
|
1820
|
+
// parentId will be set by accordion item this header belongs to
|
|
1821
|
+
this.id = '';
|
|
1822
|
+
this.actions = new Subject();
|
|
1823
|
+
this.actions$ = this.actions.asObservable();
|
|
1824
|
+
}
|
|
1825
|
+
ngOnDestroy() {
|
|
1826
|
+
this.actions.complete();
|
|
1827
|
+
}
|
|
1828
|
+
toggle() {
|
|
1829
|
+
this.actions.next(AccordionHeaderActions.Toggle);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
AccordionItemHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1833
|
+
AccordionItemHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AccordionItemHeaderComponent, selector: "fng-accordion-item-header", ngImport: i0, template: "<div\n class=\"fng-accordion-item-header\"\n role=\"button\"\n tabindex=\"0\"\n [attr.id]=\"id + '-header'\"\n [attr.aria-expanded]=\"\"\n [attr.aria-controls]=\"id + '-body'\"\n (click)=\"toggle()\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion-item-header{display:flex;align-items:center;padding:24px 64px 24px 0;min-height:48px;cursor:pointer}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemHeaderComponent, decorators: [{
|
|
1835
|
+
type: Component,
|
|
1836
|
+
args: [{ selector: 'fng-accordion-item-header', encapsulation: ViewEncapsulation.None, template: "<div\n class=\"fng-accordion-item-header\"\n role=\"button\"\n tabindex=\"0\"\n [attr.id]=\"id + '-header'\"\n [attr.aria-expanded]=\"\"\n [attr.aria-controls]=\"id + '-body'\"\n (click)=\"toggle()\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion-item-header{display:flex;align-items:center;padding:24px 64px 24px 0;min-height:48px;cursor:pointer}\n"] }]
|
|
1837
|
+
}] });
|
|
1838
|
+
|
|
1839
|
+
class AccordionItemComponent {
|
|
1840
|
+
constructor(elementRef, renderer, cd) {
|
|
1841
|
+
this.elementRef = elementRef;
|
|
1842
|
+
this.renderer = renderer;
|
|
1843
|
+
this.cd = cd;
|
|
1844
|
+
this.componentId = `accordion-item-${++AccordionItemComponent.nextId}`;
|
|
1845
|
+
this.expanded = false;
|
|
1846
|
+
this._linkText = '';
|
|
1847
|
+
// parentId will be set by accordion this item belongs to
|
|
1848
|
+
this.parentId = '';
|
|
1849
|
+
this.pristine = true;
|
|
1850
|
+
}
|
|
1851
|
+
get linkText() {
|
|
1852
|
+
var _a, _b;
|
|
1853
|
+
if (this.expanded === true) {
|
|
1854
|
+
this._linkText = ((_a = this === null || this === void 0 ? void 0 : this.accordion) === null || _a === void 0 ? void 0 : _a.showLess) || '';
|
|
1855
|
+
}
|
|
1856
|
+
else {
|
|
1857
|
+
this._linkText = ((_b = this === null || this === void 0 ? void 0 : this.accordion) === null || _b === void 0 ? void 0 : _b.showMore) || '';
|
|
1858
|
+
}
|
|
1859
|
+
return this._linkText;
|
|
1860
|
+
}
|
|
1861
|
+
ngAfterViewInit() {
|
|
1862
|
+
const element = this.elementRef.nativeElement;
|
|
1863
|
+
this.element = element.querySelector('.fng-accordion-item-body');
|
|
1864
|
+
}
|
|
1865
|
+
ngOnChanges(changes) {
|
|
1866
|
+
var _a, _b;
|
|
1867
|
+
if (((_a = changes === null || changes === void 0 ? void 0 : changes.accordion) === null || _a === void 0 ? void 0 : _a.currentValue) != null) {
|
|
1868
|
+
const accordion = changes.accordion.currentValue;
|
|
1869
|
+
this.accordion = accordion;
|
|
1870
|
+
if (this.accordion) {
|
|
1871
|
+
this.subscribeToAccordionActions();
|
|
1872
|
+
this.subscribeToAccordionItemHeaderActions();
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
if (((_b = changes === null || changes === void 0 ? void 0 : changes.parentId) === null || _b === void 0 ? void 0 : _b.currentValue) != null) {
|
|
1876
|
+
const parentId = changes.parentId.currentValue;
|
|
1877
|
+
this.id = `${parentId}-${this.componentId}`;
|
|
1878
|
+
this.header.id = this.id;
|
|
1879
|
+
this.body.id = this.id;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
toggle() {
|
|
1883
|
+
// save the new expanded state in another var, because it may be overwritten when closeAll is called
|
|
1884
|
+
const newExpandedState = !this.expanded;
|
|
1885
|
+
const changeExpandedState = () => {
|
|
1886
|
+
this.expanded = newExpandedState;
|
|
1887
|
+
if (this.expanded === true) {
|
|
1888
|
+
this.expandItem();
|
|
1889
|
+
}
|
|
1890
|
+
else {
|
|
1891
|
+
this.collapseItem();
|
|
1892
|
+
}
|
|
1893
|
+
};
|
|
1894
|
+
// if the accordion allows only one expanded item at once we first have to close all items
|
|
1895
|
+
if (this.accordion != null && this.accordion.multi === false) {
|
|
1896
|
+
this.accordion.closeAll();
|
|
1897
|
+
/// run in new macrotask to avoid render issues when transitioning to new expanded state
|
|
1898
|
+
setTimeout(() => {
|
|
1899
|
+
changeExpandedState();
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
else {
|
|
1903
|
+
changeExpandedState();
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
collapseItem() {
|
|
1907
|
+
// get the height of item body regardless of its actual size
|
|
1908
|
+
const itemHeight = this.element.scrollHeight;
|
|
1909
|
+
// set the actual item height as style to avoid transition from height: auto
|
|
1910
|
+
this.renderer.setStyle(this.element, 'height', itemHeight + 'px');
|
|
1911
|
+
setTimeout(() => {
|
|
1912
|
+
this.renderer.setStyle(this.element, 'height', 0 + 'px');
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
expandItem() {
|
|
1916
|
+
// if the item was expanded once, we have to rerun change detection before expanding again
|
|
1917
|
+
// because the content inside may have changed
|
|
1918
|
+
if (this.pristine === false) {
|
|
1919
|
+
this.cd.detectChanges();
|
|
1920
|
+
}
|
|
1921
|
+
// get the height of item body regardless of its actual size
|
|
1922
|
+
const itemHeight = this.element.scrollHeight;
|
|
1923
|
+
this.renderer.setStyle(this.element, 'height', itemHeight + 'px');
|
|
1924
|
+
setTimeout(() => {
|
|
1925
|
+
this.renderer.setStyle(this.element, 'height', null);
|
|
1926
|
+
this.pristine = false;
|
|
1927
|
+
}, 300);
|
|
1928
|
+
}
|
|
1929
|
+
handleAction(action) {
|
|
1930
|
+
switch (action) {
|
|
1931
|
+
case AccordionActions.OpenAll:
|
|
1932
|
+
this.expanded = true;
|
|
1933
|
+
this.expandItem();
|
|
1934
|
+
break;
|
|
1935
|
+
case AccordionActions.CloseAll:
|
|
1936
|
+
if (this.expanded === true) {
|
|
1937
|
+
this.expanded = false;
|
|
1938
|
+
this.collapseItem();
|
|
1939
|
+
}
|
|
1940
|
+
break;
|
|
1941
|
+
case AccordionHeaderActions.Toggle:
|
|
1942
|
+
this.toggle();
|
|
1943
|
+
break;
|
|
1944
|
+
default:
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
subscribeToAccordionActions() {
|
|
1949
|
+
if (this.accordionSubscription != null) {
|
|
1950
|
+
this.accordionSubscription.unsubscribe();
|
|
1951
|
+
}
|
|
1952
|
+
this.accordionSubscription = this.accordion.actions$.subscribe(action => {
|
|
1953
|
+
this.handleAction(action);
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
subscribeToAccordionItemHeaderActions() {
|
|
1957
|
+
if (this.accordionItemHeaderSubscription != null) {
|
|
1958
|
+
this.accordionItemHeaderSubscription.unsubscribe();
|
|
1959
|
+
}
|
|
1960
|
+
this.accordionItemHeaderSubscription = this.header.actions$.subscribe(action => {
|
|
1961
|
+
this.handleAction(action);
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
AccordionItemComponent.nextId = 0;
|
|
1966
|
+
AccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1967
|
+
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AccordionItemComponent, selector: "fng-accordion-item", queries: [{ propertyName: "header", first: true, predicate: AccordionItemHeaderComponent, descendants: true }, { propertyName: "body", first: true, predicate: AccordionItemBodyComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"fng-accordion-item\"\n [class.fng-accordion-item--collapsed]=\"!expanded\"\n [class.fng-accordion-item--expanded]=\"expanded === true\"\n>\n <ng-content></ng-content>\n <div class=\"fng-accordion-item-link\">{{ linkText }}</div>\n</div>\n", styles: ["@charset \"UTF-8\";.fng-accordion-item{position:relative;padding:0 16px 0 24px;border-top:1px solid var(--fwe-gray-100);border-bottom:1px solid var(--fwe-gray-100)}.fng-accordion-item-link{position:absolute;top:24px;right:32px;color:var(--fwe-caerul);font-size:14px;pointer-events:none;display:none}.fng-accordion-item:before{position:absolute;top:0;left:0;display:block;content:\"\";width:4px;height:0px;background-color:var(--fwe-caerul)}.fng-accordion-item:after{position:absolute;top:16px;right:16px;display:block;font-family:festo_icons-32;font-size:32px;content:\"\\e900\";height:32px;line-height:32px;transition:transform .2s ease;pointer-events:none}.fng-accordion-item--expanded .fng-accordion-item-header{font-weight:700}.fng-accordion-item--expanded .fng-accordion-item-body{height:auto}.fng-accordion-item--expanded:after{transform:rotate(-180deg)}.fng-accordion-item--expanded:before{height:100%}.fng-accordion-item--collapsed .fng-accordion-item-body{height:0px}.fng-accordion-item--collapsed .fng-accordion-item-header{font-weight:400}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
1969
|
+
type: Component,
|
|
1970
|
+
args: [{ selector: 'fng-accordion-item', encapsulation: ViewEncapsulation.None, template: "<div\n class=\"fng-accordion-item\"\n [class.fng-accordion-item--collapsed]=\"!expanded\"\n [class.fng-accordion-item--expanded]=\"expanded === true\"\n>\n <ng-content></ng-content>\n <div class=\"fng-accordion-item-link\">{{ linkText }}</div>\n</div>\n", styles: ["@charset \"UTF-8\";.fng-accordion-item{position:relative;padding:0 16px 0 24px;border-top:1px solid var(--fwe-gray-100);border-bottom:1px solid var(--fwe-gray-100)}.fng-accordion-item-link{position:absolute;top:24px;right:32px;color:var(--fwe-caerul);font-size:14px;pointer-events:none;display:none}.fng-accordion-item:before{position:absolute;top:0;left:0;display:block;content:\"\";width:4px;height:0px;background-color:var(--fwe-caerul)}.fng-accordion-item:after{position:absolute;top:16px;right:16px;display:block;font-family:festo_icons-32;font-size:32px;content:\"\\e900\";height:32px;line-height:32px;transition:transform .2s ease;pointer-events:none}.fng-accordion-item--expanded .fng-accordion-item-header{font-weight:700}.fng-accordion-item--expanded .fng-accordion-item-body{height:auto}.fng-accordion-item--expanded:after{transform:rotate(-180deg)}.fng-accordion-item--expanded:before{height:100%}.fng-accordion-item--collapsed .fng-accordion-item-body{height:0px}.fng-accordion-item--collapsed .fng-accordion-item-header{font-weight:400}\n"] }]
|
|
1971
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { header: [{
|
|
1972
|
+
type: ContentChild,
|
|
1973
|
+
args: [AccordionItemHeaderComponent]
|
|
1974
|
+
}], body: [{
|
|
1975
|
+
type: ContentChild,
|
|
1976
|
+
args: [AccordionItemBodyComponent]
|
|
1977
|
+
}] } });
|
|
1978
|
+
|
|
1979
|
+
var AccordionActions;
|
|
1980
|
+
(function (AccordionActions) {
|
|
1981
|
+
AccordionActions["OpenAll"] = "openAll";
|
|
1982
|
+
AccordionActions["CloseAll"] = "closeAll";
|
|
1983
|
+
})(AccordionActions || (AccordionActions = {}));
|
|
1984
|
+
class AccordionComponent {
|
|
1985
|
+
constructor() {
|
|
1986
|
+
this.componentId = `accordion-${++AccordionComponent.nextId}`;
|
|
1987
|
+
this.actions = new Subject();
|
|
1988
|
+
this.actions$ = this.actions.asObservable();
|
|
1989
|
+
// if the accordion should only allow one expanded item at once this property can be set to false
|
|
1990
|
+
this.multi = true;
|
|
1991
|
+
this.showMore = 'Show more';
|
|
1992
|
+
this.showLess = 'Show less';
|
|
1993
|
+
}
|
|
1994
|
+
ngAfterViewInit() {
|
|
1995
|
+
this.items.forEach(item => {
|
|
1996
|
+
item.ngOnChanges({
|
|
1997
|
+
parentId: new SimpleChange(null, this.componentId, null),
|
|
1998
|
+
accordion: new SimpleChange(null, this, null)
|
|
1999
|
+
});
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
ngOnDestroy() {
|
|
2003
|
+
this.actions.complete();
|
|
2004
|
+
}
|
|
2005
|
+
openAll() {
|
|
2006
|
+
if (this.multi) {
|
|
2007
|
+
this.actions.next(AccordionActions.OpenAll);
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
closeAll() {
|
|
2011
|
+
this.actions.next(AccordionActions.CloseAll);
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
AccordionComponent.nextId = 0;
|
|
2015
|
+
AccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2016
|
+
AccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AccordionComponent, selector: "fng-accordion", inputs: { multi: ["fngAccordionKeepItemsOpen", "multi"], showMore: ["fngAccordionShowMoreText", "showMore"], showLess: ["fngAccordionShowLessText", "showLess"] }, queries: [{ propertyName: "items", predicate: AccordionItemComponent }], ngImport: i0, template: "<div class=\"fng-accordion\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion{background-color:var(--fwe-white);border-bottom:1px solid var(--fwe-gray-100)}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
2017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
2018
|
+
type: Component,
|
|
2019
|
+
args: [{ selector: 'fng-accordion', encapsulation: ViewEncapsulation.None, template: "<div class=\"fng-accordion\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion{background-color:var(--fwe-white);border-bottom:1px solid var(--fwe-gray-100)}\n"] }]
|
|
2020
|
+
}], propDecorators: { multi: [{
|
|
2021
|
+
type: Input,
|
|
2022
|
+
args: ['fngAccordionKeepItemsOpen']
|
|
2023
|
+
}], showMore: [{
|
|
2024
|
+
type: Input,
|
|
2025
|
+
args: ['fngAccordionShowMoreText']
|
|
2026
|
+
}], showLess: [{
|
|
2027
|
+
type: Input,
|
|
2028
|
+
args: ['fngAccordionShowLessText']
|
|
2029
|
+
}], items: [{
|
|
2030
|
+
type: ContentChildren,
|
|
2031
|
+
args: [AccordionItemComponent]
|
|
2032
|
+
}] } });
|
|
2033
|
+
|
|
2034
|
+
class AccordionHeaderComponent {
|
|
2035
|
+
}
|
|
2036
|
+
AccordionHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2037
|
+
AccordionHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AccordionHeaderComponent, selector: "fng-accordion-header", ngImport: i0, template: "<div class=\"fng-accordion-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion-header{display:flex;align-items:center;height:48px;padding:0 16px 0 24px;font-size:14px;font-weight:700;color:var(--fwe-text);border-bottom:1px solid var(--fwe-gray-100)}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
2038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AccordionHeaderComponent, decorators: [{
|
|
2039
|
+
type: Component,
|
|
2040
|
+
args: [{ selector: 'fng-accordion-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"fng-accordion-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-accordion-header{display:flex;align-items:center;height:48px;padding:0 16px 0 24px;font-size:14px;font-weight:700;color:var(--fwe-text);border-bottom:1px solid var(--fwe-gray-100)}\n"] }]
|
|
2041
|
+
}] });
|
|
2042
|
+
|
|
1798
2043
|
class FestoAngularComponentsModule {
|
|
1799
2044
|
}
|
|
1800
2045
|
FestoAngularComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: FestoAngularComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1826,7 +2071,12 @@ FestoAngularComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.
|
|
|
1826
2071
|
MobileFlyoutPageComponent,
|
|
1827
2072
|
MobileFlyoutItemComponent,
|
|
1828
2073
|
SafeHtmlPipe,
|
|
1829
|
-
ClickOutsideDirective
|
|
2074
|
+
ClickOutsideDirective,
|
|
2075
|
+
AccordionComponent,
|
|
2076
|
+
AccordionHeaderComponent,
|
|
2077
|
+
AccordionItemComponent,
|
|
2078
|
+
AccordionItemHeaderComponent,
|
|
2079
|
+
AccordionItemBodyComponent], imports: [RouterModule, CommonModule, OverlayModule, PortalModule], exports: [ButtonComponent,
|
|
1830
2080
|
LinkButtonComponent,
|
|
1831
2081
|
BreadcrumbComponent,
|
|
1832
2082
|
LoadingIndicatorComponent,
|
|
@@ -1854,7 +2104,12 @@ FestoAngularComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.
|
|
|
1854
2104
|
ClickOutsideDirective,
|
|
1855
2105
|
MobileFlyoutComponent,
|
|
1856
2106
|
MobileFlyoutPageComponent,
|
|
1857
|
-
MobileFlyoutItemComponent
|
|
2107
|
+
MobileFlyoutItemComponent,
|
|
2108
|
+
AccordionComponent,
|
|
2109
|
+
AccordionHeaderComponent,
|
|
2110
|
+
AccordionItemComponent,
|
|
2111
|
+
AccordionItemHeaderComponent,
|
|
2112
|
+
AccordionItemBodyComponent] });
|
|
1858
2113
|
FestoAngularComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: FestoAngularComponentsModule, providers: [], imports: [[RouterModule, CommonModule, OverlayModule, PortalModule]] });
|
|
1859
2114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: FestoAngularComponentsModule, decorators: [{
|
|
1860
2115
|
type: NgModule,
|
|
@@ -1888,7 +2143,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1888
2143
|
MobileFlyoutPageComponent,
|
|
1889
2144
|
MobileFlyoutItemComponent,
|
|
1890
2145
|
SafeHtmlPipe,
|
|
1891
|
-
ClickOutsideDirective
|
|
2146
|
+
ClickOutsideDirective,
|
|
2147
|
+
AccordionComponent,
|
|
2148
|
+
AccordionHeaderComponent,
|
|
2149
|
+
AccordionItemComponent,
|
|
2150
|
+
AccordionItemHeaderComponent,
|
|
2151
|
+
AccordionItemBodyComponent
|
|
1892
2152
|
],
|
|
1893
2153
|
imports: [RouterModule, CommonModule, OverlayModule, PortalModule],
|
|
1894
2154
|
exports: [
|
|
@@ -1920,7 +2180,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1920
2180
|
ClickOutsideDirective,
|
|
1921
2181
|
MobileFlyoutComponent,
|
|
1922
2182
|
MobileFlyoutPageComponent,
|
|
1923
|
-
MobileFlyoutItemComponent
|
|
2183
|
+
MobileFlyoutItemComponent,
|
|
2184
|
+
AccordionComponent,
|
|
2185
|
+
AccordionHeaderComponent,
|
|
2186
|
+
AccordionItemComponent,
|
|
2187
|
+
AccordionItemHeaderComponent,
|
|
2188
|
+
AccordionItemBodyComponent
|
|
1924
2189
|
],
|
|
1925
2190
|
providers: [],
|
|
1926
2191
|
bootstrap: [PopoverComponent]
|
|
@@ -5710,5 +5975,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
5710
5975
|
* Generated bundle index. Do not edit.
|
|
5711
5976
|
*/
|
|
5712
5977
|
|
|
5713
|
-
export { AlertComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ChipComponent, ChipContainerComponent, ChipTextPipe, ChipType, ClickOutsideDirective, ColorIndicatorComponent, ColorPickerComponent, ConfirmComponent, ContainerHostDirective as ContainerHost, DatePickerComponent, DateRangePickerComponent, FestoAngularComponentsModule, FestoAngularContentModule, FestoAngularFormsModule, FestoAngularLayoutModule, FestoAngularModalsModule, FestoAngularModule, FestoAngularSnackbarModule, IconComponent, LegendComponent, LegendDirective, LinkButtonComponent, LoadingIndicatorComponent, MobileFlyoutComponent, MobileFlyoutItemComponent, MobileFlyoutPageComponent, ModalService, PREDEFINED_COLORS, PaginationComponent, PaginationType, PopoverComponent, PopoverContentComponent, PopoverContentDirective, PopoverContentTypes, PopoverMenuComponent, PopoverPosition, PopoverTypes, ProgressComponent, PromptComponent, RadioChange, RadioComponent, RadioGroupDirective, SafeHtmlPipe, ScrollableDirective, SearchInputComponent, SearchSuggestion, SegmentComponent, SegmentControlComponent, SelectComponent, SelectOptionComponent, SliderComponent, SnackbarComponent, SnackbarContainerComponent, SnackbarContainerDirective, SnackbarService, StepHorizontalComponent, StepVerticalComponent, StepperHorizontalComponent, StepperVerticalComponent, SwitchComponent, TabPaneComponent, TableHeaderCellDirective, TabsComponent, TextAreaComponent, TextEditorComponent, TextInputComponent, TimePickerComponent, TimePickerDropdownComponent, TooltipDirective, ValueAccessorBaseDirective as ValueAccessorBase };
|
|
5978
|
+
export { AccordionActions, AccordionComponent, AccordionHeaderActions, AccordionHeaderComponent, AccordionItemBodyComponent, AccordionItemComponent, AccordionItemHeaderComponent, AlertComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ChipComponent, ChipContainerComponent, ChipTextPipe, ChipType, ClickOutsideDirective, ColorIndicatorComponent, ColorPickerComponent, ConfirmComponent, ContainerHostDirective as ContainerHost, DatePickerComponent, DateRangePickerComponent, FestoAngularComponentsModule, FestoAngularContentModule, FestoAngularFormsModule, FestoAngularLayoutModule, FestoAngularModalsModule, FestoAngularModule, FestoAngularSnackbarModule, IconComponent, LegendComponent, LegendDirective, LinkButtonComponent, LoadingIndicatorComponent, MobileFlyoutComponent, MobileFlyoutItemComponent, MobileFlyoutPageComponent, ModalService, PREDEFINED_COLORS, PaginationComponent, PaginationType, PopoverComponent, PopoverContentComponent, PopoverContentDirective, PopoverContentTypes, PopoverMenuComponent, PopoverPosition, PopoverTypes, ProgressComponent, PromptComponent, RadioChange, RadioComponent, RadioGroupDirective, SafeHtmlPipe, ScrollableDirective, SearchInputComponent, SearchSuggestion, SegmentComponent, SegmentControlComponent, SelectComponent, SelectOptionComponent, SliderComponent, SnackbarComponent, SnackbarContainerComponent, SnackbarContainerDirective, SnackbarService, StepHorizontalComponent, StepVerticalComponent, StepperHorizontalComponent, StepperVerticalComponent, SwitchComponent, TabPaneComponent, TableHeaderCellDirective, TabsComponent, TextAreaComponent, TextEditorComponent, TextInputComponent, TimePickerComponent, TimePickerDropdownComponent, TooltipDirective, ValueAccessorBaseDirective as ValueAccessorBase };
|
|
5714
5979
|
//# sourceMappingURL=festo-ui-angular.mjs.map
|