Socket
Socket
Sign inDemoInstall

@angular-extensions/elements

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-extensions/elements - npm Package Compare versions

Comparing version 12.4.2 to 12.5.0

20

bundles/angular-extensions-elements-testing.umd.js

@@ -39,5 +39,5 @@ (function (global, factory) {

}());
LazyElementTestingDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementTestingDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementTestingDirective, decorators: [{
LazyElementTestingDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementTestingDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementTestingDirective, decorators: [{
type: i0.Directive,

@@ -59,5 +59,5 @@ args: [{

}());
LazyElementDynamicTestingDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDynamicTestingDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDynamicTestingDirective, decorators: [{
LazyElementDynamicTestingDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDynamicTestingDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDynamicTestingDirective, decorators: [{
type: i0.Directive,

@@ -74,7 +74,7 @@ args: [{

}());
LazyElementsTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsTestingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementsTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsTestingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementDynamicTestingDirective], exports: [LazyElementTestingDirective, LazyElementDynamicTestingDirective] });
LazyElementsTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsTestingModule });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsTestingModule, decorators: [{
LazyElementsTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsTestingModule });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsTestingModule, decorators: [{
type: i0.NgModule,

@@ -81,0 +81,0 @@ args: [{

@@ -516,5 +516,5 @@ (function (global, factory) {

}());
LazyElementsLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsLoaderService, deps: [{ token: i0__namespace.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsLoaderService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsLoaderService, decorators: [{
LazyElementsLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsLoaderService, deps: [{ token: i0__namespace.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsLoaderService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsLoaderService, decorators: [{
type: i0.Injectable,

@@ -547,5 +547,10 @@ args: [{

this.subscription = rxjs.Subscription.EMPTY;
this.url$ = new rxjs.BehaviorSubject(null);
}
LazyElementDirective.prototype.ngOnChanges = function (changes) {
if (changes.url) {
this.url$.next(this.url);
}
};
LazyElementDirective.prototype.ngOnInit = function () {
var _this = this;
// There's no sense to execute the below logic on the Node.js side since the JavaScript

@@ -558,2 +563,16 @@ // will not be loaded on the server-side (Angular will only append the script to body).

}
this.setupUrlListener();
};
LazyElementDirective.prototype.ngOnDestroy = function () {
this.subscription.unsubscribe();
};
LazyElementDirective.prototype.destroyEmbeddedView = function () {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
};
LazyElementDirective.prototype.setupUrlListener = function () {
var _this = this;
var tpl = this.template;

@@ -567,20 +586,17 @@ var elementTag = tpl._declarationTContainer

var loadingComponent = elementConfig.loadingComponent || options.loadingComponent;
if (this.loadingTemplateRef) {
this.vcr.createEmbeddedView(this.loadingTemplateRef);
}
else if (loadingComponent) {
var factory = this.cfr.resolveComponentFactory(loadingComponent);
this.vcr.createComponent(factory);
}
var loadElement$ = rxjs.from(this.elementsLoaderService.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(operators.mergeMap(function () { return customElements.whenDefined(elementTag); }))
.subscribe({
next: function () {
this.subscription = this.url$
.pipe(
// This is used to coalesce changes since the `url$` subject might emit multiple values initially, e.g.
// `null` (initial value) and the url itself (when the `url` binding is provided).
// The `animationFrameScheduler` is used to prevent the frame drop.
operators.debounceTime(0, rxjs.animationFrameScheduler), operators.switchMap(function (url) {
if (_this.loadingTemplateRef) {
_this.vcr.createEmbeddedView(_this.loadingTemplateRef);
}
else if (loadingComponent) {
var factory = _this.cfr.resolveComponentFactory(loadingComponent);
_this.vcr.createComponent(factory);
}
return rxjs.from(_this.elementsLoaderService.loadElement(url, elementTag, _this.isModule, _this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)).pipe(operators.catchError(function () {
_this.vcr.clear();
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.cdr.markForCheck();
},
error: function () {
_this.vcr.clear();
var errorComponent = elementConfig.errorComponent || options.errorComponent;

@@ -599,20 +615,18 @@ if (_this.errorTemplateRef) {

}
return rxjs.EMPTY;
}));
}), operators.mergeMap(function () { return customElements.whenDefined(elementTag); }))
.subscribe({
next: function () {
_this.vcr.clear();
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.cdr.markForCheck();
},
});
};
LazyElementDirective.prototype.ngOnDestroy = function () {
this.subscription.unsubscribe();
};
LazyElementDirective.prototype.destroyEmbeddedView = function () {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
};
return LazyElementDirective;
}());
LazyElementDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDirective, deps: [{ token: i0.PLATFORM_ID }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }, { token: LazyElementsLoaderService }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDirective, decorators: [{
LazyElementDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDirective, deps: [{ token: i0.PLATFORM_ID }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }, { token: LazyElementsLoaderService }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, usesOnChanges: true, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDirective, decorators: [{
type: i0.Directive,

@@ -730,5 +744,5 @@ args: [{

}());
LazyElementDynamicDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDynamicDirective, deps: [{ token: i0.PLATFORM_ID }, { token: common.DOCUMENT }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.TemplateRef }, { token: LazyElementsLoaderService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementDynamicDirective, decorators: [{
LazyElementDynamicDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDynamicDirective, deps: [{ token: i0.PLATFORM_ID }, { token: common.DOCUMENT }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.TemplateRef }, { token: LazyElementsLoaderService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementDynamicDirective, decorators: [{
type: i0.Directive,

@@ -815,6 +829,6 @@ args: [{

}());
LazyElementsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsModule, deps: [{ token: LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [common.CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsModule, providers: [], imports: [[common.CommonModule]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: LazyElementsModule, decorators: [{
LazyElementsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsModule, deps: [{ token: LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [common.CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsModule, providers: [], imports: [[common.CommonModule]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0__namespace, type: LazyElementsModule, decorators: [{
type: i0.NgModule,

@@ -821,0 +835,0 @@ args: [{

@@ -91,5 +91,5 @@ import { Directive, Inject, Input, PLATFORM_ID, } from '@angular/core';

}
LazyElementDynamicDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicDirective, deps: [{ token: PLATFORM_ID }, { token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.TemplateRef }, { token: i1.LazyElementsLoaderService }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicDirective, decorators: [{
LazyElementDynamicDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicDirective, deps: [{ token: PLATFORM_ID }, { token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.TemplateRef }, { token: i1.LazyElementsLoaderService }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicDirective, decorators: [{
type: Directive,

@@ -96,0 +96,0 @@ args: [{

import { Directive, Inject, Input, PLATFORM_ID, } from '@angular/core';
import { isPlatformServer } from '@angular/common';
import { from, Subscription } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { animationFrameScheduler, BehaviorSubject, EMPTY, from, Subscription, } from 'rxjs';
import { catchError, debounceTime, mergeMap, switchMap } from 'rxjs/operators';
import * as i0 from "@angular/core";

@@ -18,3 +18,9 @@ import * as i1 from "../lazy-elements-loader.service";

this.subscription = Subscription.EMPTY;
this.url$ = new BehaviorSubject(null);
}
ngOnChanges(changes) {
if (changes.url) {
this.url$.next(this.url);
}
}
ngOnInit() {

@@ -28,2 +34,15 @@ // There's no sense to execute the below logic on the Node.js side since the JavaScript

}
this.setupUrlListener();
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
}
setupUrlListener() {
const tpl = this.template;

@@ -37,20 +56,17 @@ const elementTag = tpl._declarationTContainer

const loadingComponent = elementConfig.loadingComponent || options.loadingComponent;
if (this.loadingTemplateRef) {
this.vcr.createEmbeddedView(this.loadingTemplateRef);
}
else if (loadingComponent) {
const factory = this.cfr.resolveComponentFactory(loadingComponent);
this.vcr.createComponent(factory);
}
const loadElement$ = from(this.elementsLoaderService.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(mergeMap(() => customElements.whenDefined(elementTag)))
.subscribe({
next: () => {
this.subscription = this.url$
.pipe(
// This is used to coalesce changes since the `url$` subject might emit multiple values initially, e.g.
// `null` (initial value) and the url itself (when the `url` binding is provided).
// The `animationFrameScheduler` is used to prevent the frame drop.
debounceTime(0, animationFrameScheduler), switchMap((url) => {
if (this.loadingTemplateRef) {
this.vcr.createEmbeddedView(this.loadingTemplateRef);
}
else if (loadingComponent) {
const factory = this.cfr.resolveComponentFactory(loadingComponent);
this.vcr.createComponent(factory);
}
return from(this.elementsLoaderService.loadElement(url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)).pipe(catchError(() => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
},
error: () => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;

@@ -69,19 +85,17 @@ if (this.errorTemplateRef) {

}
return EMPTY;
}));
}), mergeMap(() => customElements.whenDefined(elementTag)))
.subscribe({
next: () => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
}
}
LazyElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDirective, deps: [{ token: PLATFORM_ID }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1.LazyElementsLoaderService }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDirective, decorators: [{
LazyElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDirective, deps: [{ token: PLATFORM_ID }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1.LazyElementsLoaderService }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, usesOnChanges: true, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDirective, decorators: [{
type: Directive,

@@ -110,2 +124,2 @@ args: [{

}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1lbGVtZW50LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VsZW1lbnRzL3NyYy9saWIvbGF6eS1lbGVtZW50cy9sYXp5LWVsZW1lbnQvbGF6eS1lbGVt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4ge1xuICAgICAgICAgIHRoaXMudmNyLmNsZWFyKCk7XG4gICAgICAgICAgdGhpcy52aWV3UmVmID0gdGhpcy52Y3IuY3JlYXRlRW1iZWRkZWRWaWV3KHRoaXMudGVtcGxhdGUpO1xuICAgICAgICAgIHRoaXMuY2RyLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICB9LFxuICAgICAgICBlcnJvcjogKCkgPT4ge1xuICAgICAgICAgIHRoaXMudmNyLmNsZWFyKCk7XG4gICAgICAgICAgY29uc3QgZXJyb3JDb21wb25lbnQgPVxuICAgICAgICAgICAgZWxlbWVudENvbmZpZy5lcnJvckNvbXBvbmVudCB8fCBvcHRpb25zLmVycm9yQ29tcG9uZW50O1xuICAgICAgICAgIGlmICh0aGlzLmVycm9yVGVtcGxhdGVSZWYpIHtcbiAgICAgICAgICAgIHRoaXMudmNyLmNyZWF0ZUVtYmVkZGVkVmlldyh0aGlzLmVycm9yVGVtcGxhdGVSZWYpO1xuICAgICAgICAgICAgdGhpcy5jZHIubWFya0ZvckNoZWNrKCk7XG4gICAgICAgICAgfSBlbHNlIGlmIChlcnJvckNvbXBvbmVudCkge1xuICAgICAgICAgICAgY29uc3QgZmFjdG9yeSA9IHRoaXMuY2ZyLnJlc29sdmVDb21wb25lbnRGYWN0b3J5KGVycm9yQ29tcG9uZW50KTtcbiAgICAgICAgICAgIHRoaXMudmNyLmNyZWF0ZUNvbXBvbmVudChmYWN0b3J5KTtcbiAgICAgICAgICAgIHRoaXMuY2RyLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgIH0gZWxzZSBpZiAobmdEZXZNb2RlKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFxuICAgICAgICAgICAgICBgJHtMT0dfUFJFRklYfSAtIExvYWRpbmcgb2YgZWxlbWVudCA8JHtlbGVtZW50VGFnfT4gZmFpbGVkLCBwbGVhc2UgcHJvdmlkZSA8bmctdGVtcGxhdGUgI2Vycm9yPkxvYWRpbmcgZmFpbGVkLi4uP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xvYWRpbmdUZW1wbGF0ZVJlZik7XG4gICAgICAgICAgfSBlbHNlIGlmIChsb2FkaW5nQ29tcG9uZW50KSB7XG4gICAgICAgICAgICBjb25zdCBmYWN0b3J5ID0gdGhpcy5jZnIucmVzb2x2ZUNvbXBvbmVudEZhY3RvcnkobG9hZGluZ0NvbXBvbmVudCk7XG4gICAgICAgICAgICB0aGlzLnZjci5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGZyb20oXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnRzTG9hZGVyU2VydmljZS5sb2FkRWxlbWVudChcbiAgICAgICAgICAgICAgdXJsLFxuICAgICAgICAgICAgICBlbGVtZW50VGFnLFxuICAgICAgICAgICAgICB0aGlzLmlzTW9kdWxlLFxuICAgICAgICAgICAgICB0aGlzLmltcG9ydE1hcCxcbiAgICAgICAgICAgICAgZWxlbWVudENvbmZpZz8uaG9va3NcbiAgICAgICAgICAgIClcbiAgICAgICAgICApLnBpcGUoXG4gICAgICAgICAgICBjYXRjaEVycm9yKCgpID0+IHtcbiAgICAgICAgICAgICAgdGhpcy52Y3IuY2xlYXIoKTtcbiAgICAgICAgICAgICAgY29uc3QgZXJyb3JDb21wb25lbnQgPVxuICAgICAgICAgICAgICAgIGVsZW1lbnRDb25maWcuZXJyb3JDb21wb25lbnQgfHwgb3B0aW9ucy5lcnJvckNvbXBvbmVudDtcbiAgICAgICAgICAgICAgaWYgKHRoaXMuZXJyb3JUZW1wbGF0ZVJlZikge1xuICAgICAgICAgICAgICAgIHRoaXMudmNyLmNyZWF0ZUVtYmVkZGVkVmlldyh0aGlzLmVycm9yVGVtcGxhdGVSZWYpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2RyLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yQ29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZmFjdG9yeSA9XG4gICAgICAgICAgICAgICAgICB0aGlzLmNmci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShlcnJvckNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgdGhpcy52Y3IuY3JlYXRlQ29tcG9uZW50KGZhY3RvcnkpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2RyLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5nRGV2TW9kZSkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXG4gICAgICAgICAgICAgICAgICBgJHtMT0dfUFJFRklYfSAtIExvYWRpbmcgb2YgZWxlbWVudCA8JHtlbGVtZW50VGFnfT4gZmFpbGVkLCBwbGVhc2UgcHJvdmlkZSA8bmctdGVtcGxhdGUgI2Vycm9yPkxvYWRpbmcgZmFpbGVkLi4uPC9uZy10ZW1wbGF0ZT4gYW5kIHJlZmVyZW5jZSBpdCBpbiAqYXhMYXp5RWxlbWVudD1cImVycm9yVGVtcGxhdGU6IGVycm9yXCIgdG8gZGlzcGxheSBjdXN0b21pemVkIGVycm9yIG1lc3NhZ2UgaW4gcGxhY2Ugb2YgZWxlbWVudGBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJldHVybiBFTVBUWTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgKTtcbiAgICAgICAgfSksXG4gICAgICAgIG1lcmdlTWFwKCgpID0+IGN1c3RvbUVsZW1lbnRzLndoZW5EZWZpbmVkKGVsZW1lbnRUYWcpKVxuICAgICAgKVxuICAgICAgLnN1YnNjcmliZSh7XG4gICAgICAgIG5leHQ6ICgpID0+IHtcbiAgICAgICAgICB0aGlzLnZjci5jbGVhcigpO1xuICAgICAgICAgIHRoaXMudmlld1JlZiA9IHRoaXMudmNyLmNyZWF0ZUVtYmVkZGVkVmlldyh0aGlzLnRlbXBsYXRlKTtcbiAgICAgICAgICB0aGlzLmNkci5tYXJrRm9yQ2hlY2soKTtcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICB9XG59XG4iXX0=

@@ -149,5 +149,5 @@ import { __awaiter } from "tslib";

}
LazyElementsLoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, deps: [{ token: i0.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, decorators: [{
LazyElementsLoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, deps: [{ token: i0.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, decorators: [{
type: Injectable,

@@ -154,0 +154,0 @@ args: [{

@@ -57,6 +57,6 @@ import { Inject, NgModule, Optional, SkipSelf, } from '@angular/core';

}
LazyElementsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, deps: [{ token: i1.LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, providers: [], imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, decorators: [{
LazyElementsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, deps: [{ token: i1.LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, providers: [], imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, decorators: [{
type: NgModule,

@@ -63,0 +63,0 @@ args: [{

@@ -12,5 +12,5 @@ import { Directive, } from '@angular/core';

}
LazyElementDynamicTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicTestingDirective, decorators: [{
LazyElementDynamicTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicTestingDirective, decorators: [{
type: Directive,

@@ -17,0 +17,0 @@ args: [{

@@ -12,5 +12,5 @@ import { Directive, } from '@angular/core';

}
LazyElementTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementTestingDirective, decorators: [{
LazyElementTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementTestingDirective, decorators: [{
type: Directive,

@@ -17,0 +17,0 @@ args: [{

@@ -7,7 +7,7 @@ import { NgModule } from '@angular/core';

}
LazyElementsTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementsTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementDynamicTestingDirective], exports: [LazyElementTestingDirective, LazyElementDynamicTestingDirective] });
LazyElementsTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, decorators: [{
LazyElementsTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, decorators: [{
type: NgModule,

@@ -14,0 +14,0 @@ args: [{

@@ -13,5 +13,5 @@ import * as i0 from '@angular/core';

}
LazyElementTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementTestingDirective, decorators: [{
LazyElementTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementTestingDirective, selector: "[axLazyElement]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementTestingDirective, decorators: [{
type: Directive,

@@ -32,5 +32,5 @@ args: [{

}
LazyElementDynamicTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicTestingDirective, decorators: [{
LazyElementDynamicTestingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicTestingDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicTestingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicTestingDirective, selector: "[axLazyElementDynamic]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicTestingDirective, decorators: [{
type: Directive,

@@ -44,7 +44,7 @@ args: [{

}
LazyElementsTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementsTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, declarations: [LazyElementTestingDirective,
LazyElementDynamicTestingDirective], exports: [LazyElementTestingDirective, LazyElementDynamicTestingDirective] });
LazyElementsTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsTestingModule, decorators: [{
LazyElementsTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsTestingModule, decorators: [{
type: NgModule,

@@ -51,0 +51,0 @@ args: [{

import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Inject, Optional, PLATFORM_ID, Directive, Input, SkipSelf, NgModule } from '@angular/core';
import { isPlatformServer, DOCUMENT, CommonModule } from '@angular/common';
import { Subscription, from } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { Subscription, BehaviorSubject, animationFrameScheduler, from, EMPTY } from 'rxjs';
import { debounceTime, switchMap, catchError, mergeMap } from 'rxjs/operators';
import { __awaiter } from 'tslib';

@@ -160,5 +160,5 @@

}
LazyElementsLoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, deps: [{ token: i0.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsLoaderService, decorators: [{
LazyElementsLoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, deps: [{ token: i0.ErrorHandler }, { token: LAZY_ELEMENTS_REGISTRY }, { token: LAZY_ELEMENT_ROOT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
LazyElementsLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsLoaderService, decorators: [{
type: Injectable,

@@ -189,3 +189,9 @@ args: [{

this.subscription = Subscription.EMPTY;
this.url$ = new BehaviorSubject(null);
}
ngOnChanges(changes) {
if (changes.url) {
this.url$.next(this.url);
}
}
ngOnInit() {

@@ -199,2 +205,15 @@ // There's no sense to execute the below logic on the Node.js side since the JavaScript

}
this.setupUrlListener();
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
}
setupUrlListener() {
const tpl = this.template;

@@ -208,20 +227,17 @@ const elementTag = tpl._declarationTContainer

const loadingComponent = elementConfig.loadingComponent || options.loadingComponent;
if (this.loadingTemplateRef) {
this.vcr.createEmbeddedView(this.loadingTemplateRef);
}
else if (loadingComponent) {
const factory = this.cfr.resolveComponentFactory(loadingComponent);
this.vcr.createComponent(factory);
}
const loadElement$ = from(this.elementsLoaderService.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(mergeMap(() => customElements.whenDefined(elementTag)))
.subscribe({
next: () => {
this.subscription = this.url$
.pipe(
// This is used to coalesce changes since the `url$` subject might emit multiple values initially, e.g.
// `null` (initial value) and the url itself (when the `url` binding is provided).
// The `animationFrameScheduler` is used to prevent the frame drop.
debounceTime(0, animationFrameScheduler), switchMap((url) => {
if (this.loadingTemplateRef) {
this.vcr.createEmbeddedView(this.loadingTemplateRef);
}
else if (loadingComponent) {
const factory = this.cfr.resolveComponentFactory(loadingComponent);
this.vcr.createComponent(factory);
}
return from(this.elementsLoaderService.loadElement(url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)).pipe(catchError(() => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
},
error: () => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;

@@ -240,19 +256,17 @@ if (this.errorTemplateRef) {

}
return EMPTY;
}));
}), mergeMap(() => customElements.whenDefined(elementTag)))
.subscribe({
next: () => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {
if (this.viewRef && !this.viewRef.destroyed) {
this.viewRef.detach();
this.viewRef.destroy();
this.viewRef = null;
}
}
}
LazyElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDirective, deps: [{ token: PLATFORM_ID }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: LazyElementsLoaderService }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDirective, decorators: [{
LazyElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDirective, deps: [{ token: PLATFORM_ID }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: LazyElementsLoaderService }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDirective, selector: "[axLazyElement]", inputs: { url: ["axLazyElement", "url"], loadingTemplateRef: ["axLazyElementLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementModule", "isModule"], importMap: ["axLazyElementImportMap", "importMap"] }, usesOnChanges: true, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDirective, decorators: [{
type: Directive,

@@ -366,5 +380,5 @@ args: [{

}
LazyElementDynamicDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicDirective, deps: [{ token: PLATFORM_ID }, { token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.TemplateRef }, { token: LazyElementsLoaderService }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementDynamicDirective, decorators: [{
LazyElementDynamicDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicDirective, deps: [{ token: PLATFORM_ID }, { token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.TemplateRef }, { token: LazyElementsLoaderService }], target: i0.ɵɵFactoryTarget.Directive });
LazyElementDynamicDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.0", type: LazyElementDynamicDirective, selector: "[axLazyElementDynamic]", inputs: { tag: ["axLazyElementDynamic", "tag"], url: ["axLazyElementDynamicUrl", "url"], loadingTemplateRef: ["axLazyElementDynamicLoadingTemplate", "loadingTemplateRef"], errorTemplateRef: ["axLazyElementDynamicErrorTemplate", "errorTemplateRef"], isModule: ["axLazyElementDynamicModule", "isModule"], importMap: ["axLazyElementDynamicImportMap", "importMap"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementDynamicDirective, decorators: [{
type: Directive,

@@ -448,6 +462,6 @@ args: [{

}
LazyElementsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, deps: [{ token: LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, providers: [], imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0, type: LazyElementsModule, decorators: [{
LazyElementsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, deps: [{ token: LazyElementsLoaderService }, { token: LAZY_ELEMENT_CONFIGS, optional: true }, { token: LAZY_ELEMENT_ROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
LazyElementsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, declarations: [LazyElementDirective, LazyElementDynamicDirective], imports: [CommonModule], exports: [LazyElementDirective, LazyElementDynamicDirective] });
LazyElementsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, providers: [], imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.0", ngImport: i0, type: LazyElementsModule, decorators: [{
type: NgModule,

@@ -454,0 +468,0 @@ args: [{

@@ -1,5 +0,5 @@

import { ChangeDetectorRef, ComponentFactoryResolver, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
import { ChangeDetectorRef, ComponentFactoryResolver, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
import { LazyElementsLoaderService } from '../lazy-elements-loader.service';
import * as i0 from "@angular/core";
export declare class LazyElementDirective implements OnInit, OnDestroy {
export declare class LazyElementDirective implements OnChanges, OnInit, OnDestroy {
private platformId;

@@ -18,8 +18,11 @@ private vcr;

private subscription;
private url$;
constructor(platformId: string, vcr: ViewContainerRef, template: TemplateRef<any>, elementsLoaderService: LazyElementsLoaderService, cfr: ComponentFactoryResolver, cdr: ChangeDetectorRef);
ngOnChanges(changes: SimpleChanges): void;
ngOnInit(): void;
ngOnDestroy(): void;
destroyEmbeddedView(): void;
private setupUrlListener;
static ɵfac: i0.ɵɵFactoryDeclaration<LazyElementDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<LazyElementDirective, "[axLazyElement]", never, { "url": "axLazyElement"; "loadingTemplateRef": "axLazyElementLoadingTemplate"; "errorTemplateRef": "axLazyElementErrorTemplate"; "isModule": "axLazyElementModule"; "importMap": "axLazyElementImportMap"; }, {}, never>;
}
{
"name": "@angular-extensions/elements",
"version": "12.4.2",
"version": "12.5.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": ">=12",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc