@festo-ui/angular 9.0.0-dev.732 → 9.0.0-dev.734
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.
|
@@ -754,10 +754,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
754
754
|
}] } });
|
|
755
755
|
|
|
756
756
|
class PopoverRef {
|
|
757
|
-
constructor(overlay, content, data) {
|
|
757
|
+
constructor(overlay, content, data, popoverType) {
|
|
758
758
|
this.overlay = overlay;
|
|
759
759
|
this.content = content;
|
|
760
760
|
this.data = data;
|
|
761
|
+
this.popoverType = popoverType;
|
|
761
762
|
this.afterClosed = new Subject();
|
|
762
763
|
this.afterClosed$ = this.afterClosed.asObservable();
|
|
763
764
|
overlay.backdropClick().subscribe(() => {
|
|
@@ -791,6 +792,7 @@ class FngPopoverComponent {
|
|
|
791
792
|
}
|
|
792
793
|
ngOnInit() {
|
|
793
794
|
this.content = this.popoverRef.content;
|
|
795
|
+
this.popoverType = this.popoverRef.popoverType;
|
|
794
796
|
if ('string' === typeof this.content) {
|
|
795
797
|
this.type = FngPopoverContentTypes.Text;
|
|
796
798
|
}
|
|
@@ -802,11 +804,11 @@ class FngPopoverComponent {
|
|
|
802
804
|
}
|
|
803
805
|
}
|
|
804
806
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FngPopoverComponent, deps: [{ token: PopoverRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
805
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FngPopoverComponent, isStandalone: true, selector: "fng-popover", ngImport: i0, template: "<div class=\"fwe-popover-container\">\n <div class=\"fwe-triangle\"></div>\n <div class=\"fwe-popover\">\n @switch (type) {\n @case ('text') {\n <div class=\"fwe-popover-content\" [innerHTML]=\"content\"></div>\n }\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"content; context: context\"></ng-container>\n }\n @case ('component') {\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\n }\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FngPopoverComponent, isStandalone: true, selector: "fng-popover", ngImport: i0, template: "<div class=\"fwe-popover-container\">\n <div class=\"fwe-triangle\"></div>\n <div class=\"fwe-popover\" \n [class.fwe-popover--legend]=\"popoverType === 'legend'\"\n [class.fwe-popover--menu]=\"popoverType === 'menu'\">\n @switch (type) {\n @case ('text') {\n <div class=\"fwe-popover-content\" [innerHTML]=\"content\"></div>\n }\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"content; context: context\"></ng-container>\n }\n @case ('component') {\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\n }\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
806
808
|
}
|
|
807
809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FngPopoverComponent, decorators: [{
|
|
808
810
|
type: Component,
|
|
809
|
-
args: [{ selector: 'fng-popover', imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"fwe-popover-container\">\n <div class=\"fwe-triangle\"></div>\n <div class=\"fwe-popover\">\n @switch (type) {\n @case ('text') {\n <div class=\"fwe-popover-content\" [innerHTML]=\"content\"></div>\n }\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"content; context: context\"></ng-container>\n }\n @case ('component') {\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\n }\n }\n </div>\n</div>\n" }]
|
|
811
|
+
args: [{ selector: 'fng-popover', imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"fwe-popover-container\">\n <div class=\"fwe-triangle\"></div>\n <div class=\"fwe-popover\" \n [class.fwe-popover--legend]=\"popoverType === 'legend'\"\n [class.fwe-popover--menu]=\"popoverType === 'menu'\">\n @switch (type) {\n @case ('text') {\n <div class=\"fwe-popover-content\" [innerHTML]=\"content\"></div>\n }\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"content; context: context\"></ng-container>\n }\n @case ('component') {\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\n }\n }\n </div>\n</div>\n" }]
|
|
810
812
|
}], ctorParameters: () => [{ type: PopoverRef }] });
|
|
811
813
|
|
|
812
814
|
const defaultPositions = {
|
|
@@ -877,7 +879,8 @@ class FngPopoverService {
|
|
|
877
879
|
}
|
|
878
880
|
const overlayConfig = this.getOverlayConfig({ origin, options });
|
|
879
881
|
const overlayRef = this.overlay.create(overlayConfig);
|
|
880
|
-
const
|
|
882
|
+
const popoverType = null != options.type ? options.type : this.defaultOptions.type;
|
|
883
|
+
const popoverRef = new PopoverRef(overlayRef, content, data, popoverType);
|
|
881
884
|
const injector = this.createInjector(popoverRef, this.injector);
|
|
882
885
|
overlayRef.attach(new ComponentPortal(FngPopoverComponent, null, injector));
|
|
883
886
|
return popoverRef;
|
|
@@ -1007,11 +1010,11 @@ class FngLegendComponent {
|
|
|
1007
1010
|
this.popoverRef?.close();
|
|
1008
1011
|
}
|
|
1009
1012
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FngLegendComponent, deps: [{ token: FngPopoverService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1010
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FngLegendComponent, isStandalone: true, selector: "fng-legend", inputs: { items: "items", options: "options" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true }], ngImport: i0, template: "<ng-template #tpl>\n
|
|
1013
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FngLegendComponent, isStandalone: true, selector: "fng-legend", inputs: { items: "items", options: "options" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true }], ngImport: i0, template: "<ng-template #tpl>\n @for (item of items; track item) {\n <dl class=\"fwe-popover-legend-content\">\n <dt>{{ item?.name }}</dt>\n <dd>{{ item?.text }}</dd>\n </dl>\n }\n</ng-template>", encapsulation: i0.ViewEncapsulation.None }); }
|
|
1011
1014
|
}
|
|
1012
1015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FngLegendComponent, decorators: [{
|
|
1013
1016
|
type: Component,
|
|
1014
|
-
args: [{ selector: 'fng-legend', imports: [], encapsulation: ViewEncapsulation.None, template: "<ng-template #tpl>\n
|
|
1017
|
+
args: [{ selector: 'fng-legend', imports: [], encapsulation: ViewEncapsulation.None, template: "<ng-template #tpl>\n @for (item of items; track item) {\n <dl class=\"fwe-popover-legend-content\">\n <dt>{{ item?.name }}</dt>\n <dd>{{ item?.text }}</dd>\n </dl>\n }\n</ng-template>" }]
|
|
1015
1018
|
}], ctorParameters: () => [{ type: FngPopoverService }], propDecorators: { items: [{
|
|
1016
1019
|
type: Input
|
|
1017
1020
|
}], options: [{
|