@foblex/m-render 3.0.0 → 3.0.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.
|
@@ -2104,6 +2104,13 @@ class ExternalComponent {
|
|
|
2104
2104
|
};
|
|
2105
2105
|
} });
|
|
2106
2106
|
iframeUrl = computed(() => this.data().iframeUrl, ...(ngDevMode ? [{ debugName: "iframeUrl" }] : []));
|
|
2107
|
+
iframeResourceUrl = computed(() => {
|
|
2108
|
+
const url = this.iframeUrl();
|
|
2109
|
+
if (!url) {
|
|
2110
|
+
return undefined;
|
|
2111
|
+
}
|
|
2112
|
+
return this._sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
2113
|
+
}, ...(ngDevMode ? [{ debugName: "iframeResourceUrl" }] : []));
|
|
2107
2114
|
hasContent = computed(() => !!this.data().selector || !!this.data().iframeUrl, ...(ngDevMode ? [{ debugName: "hasContent" }] : []));
|
|
2108
2115
|
canToggleFullscreen = computed(() => {
|
|
2109
2116
|
return this._isBrowser
|
|
@@ -2118,6 +2125,7 @@ class ExternalComponent {
|
|
|
2118
2125
|
_isBrowser = inject(IS_BROWSER_PLATFORM);
|
|
2119
2126
|
_mediatr = inject(Mediatr);
|
|
2120
2127
|
_viewContainerRef = viewChild.required('container', { read: ViewContainerRef });
|
|
2128
|
+
_sanitizer = inject(DomSanitizer);
|
|
2121
2129
|
ngOnInit() {
|
|
2122
2130
|
const selector = this.data().selector;
|
|
2123
2131
|
if (selector) {
|
|
@@ -2150,7 +2158,7 @@ class ExternalComponent {
|
|
|
2150
2158
|
return this._document.fullscreenElement === this._hostElement.nativeElement;
|
|
2151
2159
|
}
|
|
2152
2160
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ExternalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2153
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: ExternalComponent, isStandalone: true, selector: "external-component", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "document:fullscreenchange": "onFullscreenChange()" }, properties: { "style.height": "data().height", "class.f-example-view-fullscreen": "isFullscreen()" }, classAttribute: "f-example-view" }, viewQueries: [{ propertyName: "_viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (canToggleFullscreen()) {\n <button class=\"f-fullscreen-button\"\n type=\"button\"\n [class.exit]=\"isFullscreen()\"\n [attr.aria-label]=\"fullscreenLabel()\"\n [attr.title]=\"fullscreenLabel()\"\n (click)=\"toggleFullscreen()\"></button>\n}\n\n@if (
|
|
2161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: ExternalComponent, isStandalone: true, selector: "external-component", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "document:fullscreenchange": "onFullscreenChange()" }, properties: { "style.height": "data().height", "class.f-example-view-fullscreen": "isFullscreen()" }, classAttribute: "f-example-view" }, viewQueries: [{ propertyName: "_viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (canToggleFullscreen()) {\n <button class=\"f-fullscreen-button\"\n type=\"button\"\n [class.exit]=\"isFullscreen()\"\n [attr.aria-label]=\"fullscreenLabel()\"\n [attr.title]=\"fullscreenLabel()\"\n (click)=\"toggleFullscreen()\"></button>\n}\n\n@if (iframeResourceUrl()) {\n <iframe class=\"f-example-iframe\"\n [src]=\"iframeResourceUrl()\"\n loading=\"lazy\"\n referrerpolicy=\"no-referrer\"\n allow=\"fullscreen\"\n allowfullscreen></iframe>\n}\n\n<ng-container #container />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2154
2162
|
}
|
|
2155
2163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ExternalComponent, decorators: [{
|
|
2156
2164
|
type: Component,
|
|
@@ -2158,7 +2166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
2158
2166
|
class: 'f-example-view',
|
|
2159
2167
|
'[style.height]': 'data().height',
|
|
2160
2168
|
'[class.f-example-view-fullscreen]': 'isFullscreen()',
|
|
2161
|
-
}, template: "@if (canToggleFullscreen()) {\n <button class=\"f-fullscreen-button\"\n type=\"button\"\n [class.exit]=\"isFullscreen()\"\n [attr.aria-label]=\"fullscreenLabel()\"\n [attr.title]=\"fullscreenLabel()\"\n (click)=\"toggleFullscreen()\"></button>\n}\n\n@if (
|
|
2169
|
+
}, template: "@if (canToggleFullscreen()) {\n <button class=\"f-fullscreen-button\"\n type=\"button\"\n [class.exit]=\"isFullscreen()\"\n [attr.aria-label]=\"fullscreenLabel()\"\n [attr.title]=\"fullscreenLabel()\"\n (click)=\"toggleFullscreen()\"></button>\n}\n\n@if (iframeResourceUrl()) {\n <iframe class=\"f-example-iframe\"\n [src]=\"iframeResourceUrl()\"\n loading=\"lazy\"\n referrerpolicy=\"no-referrer\"\n allow=\"fullscreen\"\n allowfullscreen></iframe>\n}\n\n<ng-container #container />\n" }]
|
|
2162
2170
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], _viewContainerRef: [{ type: i0.ViewChild, args: ['container', { ...{ read: ViewContainerRef }, isSignal: true }] }], onFullscreenChange: [{
|
|
2163
2171
|
type: HostListener,
|
|
2164
2172
|
args: ['document:fullscreenchange']
|