Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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.0.0 to 12.1.0

124

bundles/angular-extensions-elements.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('@angular-extensions/elements', ['exports', '@angular/core', '@angular/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['angular-extensions'] = global['angular-extensions'] || {}, global['angular-extensions'].elements = {}), global.ng.core, global.ng.common));
}(this, (function (exports, i0, common) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs'), require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define('@angular-extensions/elements', ['exports', '@angular/core', '@angular/common', 'rxjs', 'rxjs/operators'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['angular-extensions'] = global['angular-extensions'] || {}, global['angular-extensions'].elements = {}), global.ng.core, global.ng.common, global.rxjs, global.rxjs.operators));
}(this, (function (exports, i0, common, rxjs, operators) { 'use strict';

@@ -522,2 +522,3 @@ function _interopNamespace(e) {

this.viewRef = null;
this.subscription = rxjs.Subscription.EMPTY;
}

@@ -541,27 +542,32 @@ LazyElementDirective.prototype.ngOnInit = function () {

}
this.elementsLoaderService
.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(function () { return customElements.whenDefined(elementTag); })
.then(function () {
_this.vcr.clear();
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.cdr.markForCheck();
})
.catch(function (err) {
_this.vcr.clear();
var errorComponent = elementConfig.errorComponent || options.errorComponent;
if (_this.errorTemplateRef) {
_this.vcr.createEmbeddedView(_this.errorTemplateRef);
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.vcr.clear();
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.cdr.markForCheck();
}
else if (errorComponent) {
var factory = _this.cfr.resolveComponentFactory(errorComponent);
_this.vcr.createComponent(factory);
_this.cdr.markForCheck();
}
else {
console.error(LOG_PREFIX$1 + " - Loading of element <" + elementTag + "> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement=\"errorTemplate: error\" to display customized error message in place of element");
}
},
error: function () {
_this.vcr.clear();
var errorComponent = elementConfig.errorComponent || options.errorComponent;
if (_this.errorTemplateRef) {
_this.vcr.createEmbeddedView(_this.errorTemplateRef);
_this.cdr.markForCheck();
}
else if (errorComponent) {
var factory = _this.cfr.resolveComponentFactory(errorComponent);
_this.vcr.createComponent(factory);
_this.cdr.markForCheck();
}
else {
console.error(LOG_PREFIX$1 + " - Loading of element <" + elementTag + "> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement=\"errorTemplate: error\" to display customized error message in place of element");
}
},
});
};
LazyElementDirective.prototype.ngOnDestroy = function () {
this.subscription.unsubscribe();
};
LazyElementDirective.prototype.destroyEmbeddedView = function () {

@@ -612,2 +618,3 @@ if (this.viewRef && !this.viewRef.destroyed) {

this.viewRef = null;
this.subscription = rxjs.Subscription.EMPTY;
}

@@ -630,35 +637,40 @@ LazyElementDynamicDirective.prototype.ngOnInit = function () {

}
this.elementsLoaderService
.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(function () { return customElements.whenDefined(_this.tag); })
.then(function () {
_this.vcr.clear();
var originalCreateElement = _this.renderer.createElement;
_this.renderer.createElement = function (name, namespace) {
if (name === 'ax-lazy-element') {
name = _this.tag;
var loadElement$ = rxjs.from(this.elementsLoaderService.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(operators.mergeMap(function () { return customElements.whenDefined(_this.tag); }))
.subscribe({
next: function () {
_this.vcr.clear();
var originalCreateElement = _this.renderer.createElement;
_this.renderer.createElement = function (name, namespace) {
if (name === 'ax-lazy-element') {
name = _this.tag;
}
return _this.document.createElement(name);
};
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.renderer.createElement = originalCreateElement;
_this.cdr.markForCheck();
},
error: function (error) {
var errorComponent = elementConfig.errorComponent || options.errorComponent;
_this.vcr.clear();
if (_this.errorTemplateRef) {
_this.vcr.createEmbeddedView(_this.errorTemplateRef);
_this.cdr.markForCheck();
}
return _this.document.createElement(name);
};
_this.viewRef = _this.vcr.createEmbeddedView(_this.template);
_this.renderer.createElement = originalCreateElement;
_this.cdr.markForCheck();
})
.catch(function (error) {
var errorComponent = elementConfig.errorComponent || options.errorComponent;
_this.vcr.clear();
if (_this.errorTemplateRef) {
_this.vcr.createEmbeddedView(_this.errorTemplateRef);
_this.cdr.markForCheck();
}
else if (errorComponent) {
var factory = _this.cfr.resolveComponentFactory(errorComponent);
_this.vcr.createComponent(factory);
_this.cdr.markForCheck();
}
else {
console.error(LOG_PREFIX + " - Loading of element <" + _this.tag + "> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic=\"errorTemplate: error\" to display customized error message in place of element\n\n", error);
}
else if (errorComponent) {
var factory = _this.cfr.resolveComponentFactory(errorComponent);
_this.vcr.createComponent(factory);
_this.cdr.markForCheck();
}
else {
console.error(LOG_PREFIX + " - Loading of element <" + _this.tag + "> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic=\"errorTemplate: error\" to display customized error message in place of element\n\n", error);
}
},
});
};
LazyElementDynamicDirective.prototype.ngOnDestroy = function () {
this.subscription.unsubscribe();
};
LazyElementDynamicDirective.prototype.destroyEmbeddedView = function () {

@@ -665,0 +677,0 @@ if (this.viewRef && !this.viewRef.destroyed) {

import { Directive, Inject, Input, } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { from, Subscription } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import * as i0 from "@angular/core";

@@ -17,2 +19,3 @@ import * as i1 from "../lazy-elements-loader.service";

this.viewRef = null;
this.subscription = Subscription.EMPTY;
}

@@ -34,35 +37,40 @@ ngOnInit() {

}
this.elementsLoaderService
.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(() => customElements.whenDefined(this.tag))
.then(() => {
this.vcr.clear();
const originalCreateElement = this.renderer.createElement;
this.renderer.createElement = (name, namespace) => {
if (name === 'ax-lazy-element') {
name = this.tag;
const loadElement$ = from(this.elementsLoaderService.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(mergeMap(() => customElements.whenDefined(this.tag)))
.subscribe({
next: () => {
this.vcr.clear();
const originalCreateElement = this.renderer.createElement;
this.renderer.createElement = (name, namespace) => {
if (name === 'ax-lazy-element') {
name = this.tag;
}
return this.document.createElement(name);
};
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.renderer.createElement = originalCreateElement;
this.cdr.markForCheck();
},
error: (error) => {
const errorComponent = elementConfig.errorComponent || options.errorComponent;
this.vcr.clear();
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
return this.document.createElement(name);
};
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.renderer.createElement = originalCreateElement;
this.cdr.markForCheck();
})
.catch((error) => {
const errorComponent = elementConfig.errorComponent || options.errorComponent;
this.vcr.clear();
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${this.tag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic="errorTemplate: error" to display customized error message in place of element\n\n`, error);
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${this.tag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic="errorTemplate: error" to display customized error message in place of element\n\n`, error);
}
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {

@@ -105,2 +113,2 @@ if (this.viewRef && !this.viewRef.destroyed) {

}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1lbGVtZW50LWR5bmFtaWMuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZWxlbWVudHMvc3JjL2xpYi9sYXp5LWVsZW1lbnRzL2xhenktZWxlbWVudC1keW5hbWljL2xhenktZWxlbWVudC1keW5hbWljLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBR0wsU0FBUyxFQUVULE1BQU0sRUFDTixLQUFLLEdBS04sTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDOzs7QUFPM0MsTUFBTSxVQUFVLEdBQUcsOEJBQThCLENBQUM7QUFFbEQsZUFBZTtBQUlmLE1BQU0sT0FBTywyQkFBMkI7SUFZdEMsWUFDNEIsUUF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AgICAgICAgICB0aGlzLnZjci5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSk7XG4gICAgICAgICAgdGhpcy5jZHIubWFya0ZvckNoZWNrKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihcbiAgICAgICAgICAgIGAke0xPR19QUkVGSVh9IC0gTG9hZGluZyBvZiBlbGVtZW50IDwke3RoaXMudGFnfT4gZmFpbGVkLCBwbGVhc2UgcHJvdmlkZSA8bmctdGVtcGxhdGUgI2Vycm9yPkxvYWRpbmcgZmFpbGVkLi4uPC9uZy10ZW1wbGF0ZT4gYW5kIHJlZmVyZW5jZSBpdCBpbiAqYXhMYXp5RWxlbWVudER5bmFtaWM9XCJlcnJvclRlbXBsYXRlOiBlcnJvclwiIHRvIGRpc3BsYXkgY3VzdG9taXplZCBlcnJvciBtZXNzYWdlIGluIHBsYWNlIG9mIGVsZW1lbnRcXG5cXG5gLFxuICAgICAgICAgICAgZXJyb3JcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgfVxuXG4gIGRlc3Ryb3lFbWJlZGRlZFZpZXcoKSB7XG4gICAgaWYgKHRoaXMudmlld1JlZiAmJiAhdGhpcy52aWV3UmVmLmRlc3Ryb3llZCkge1xuICAgICAgdGhpcy52aWV3UmVmLmRldGFjaCgpO1xuICAgICAgdGhpcy52aWV3UmVmLmRlc3Ryb3koKTtcbiAgICAgIHRoaXMudmlld1JlZiA9IG51bGw7XG4gICAgfVxuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1lbGVtZW50LWR5bmFtaWMuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZWxlbWVudHMvc3JjL2xpYi9sYXp5LWVsZW1lbnRzL2xhenktZWxlbWVudC1keW5hbWljL2xhenktZW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Mudmlld1JlZi5kZXN0cm95KCk7XG4gICAgICB0aGlzLnZpZXdSZWYgPSBudWxsO1xuICAgIH1cbiAgfVxufVxuIl19
import { Directive, Input, } from '@angular/core';
import { from, Subscription } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import * as i0 from "@angular/core";

@@ -13,2 +15,3 @@ import * as i1 from "../lazy-elements-loader.service";

this.viewRef = null;
this.subscription = Subscription.EMPTY;
}

@@ -31,27 +34,32 @@ ngOnInit() {

}
this.elementsLoaderService
.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(() => customElements.whenDefined(elementTag))
.then(() => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
})
.catch((err) => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
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.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${elementTag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement="errorTemplate: error" to display customized error message in place of element`);
}
},
error: () => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${elementTag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement="errorTemplate: error" to display customized error message in place of element`);
}
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {

@@ -88,2 +96,2 @@ if (this.viewRef && !this.viewRef.destroyed) {

}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1lbGVtZW50LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VsZW1lbnRzL3NyYy9saWIvbGF6eS1lbGVtZW50cy9sYXp5LWVsZW1lbnQvbGF6eS1lbGVtZW50LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBR0wsU0FBUyxFQUVULEtBQUssR0FJTixNQUFNLGVBQWUsQ0FBQzs7O0FBT3ZCLE1BQU0sVUFBVSxHQUFHLDhCQUE4QixDQUFDO0FBS2xELE1BQU0sT0FBTyxvQkFBb0I7SUFTL0IsWUFDVSxHQUFxQixFQUNyQixRQUEwQixFQUMxQixxQkFBZ0QsRUFDaEQsR0FBNkIsRUFDN0IsR0FBc0I7UUFKdEIsUUFBRyxHQUFILEdBQUcsQ0FBa0I7UUFDckIsYUFBUSxHQUFSLFFBQVEsQ0FBa0I7UUFDMUIsMEJBQXFCLEdBQXJCLHFCQUFxQixDQUEyQjtRQUNoRCxRQUFHLEdBQUgsR0FBRyxDQUEwQjtRQUM3QixRQUFHLEdBQUgsR0FBRyxDQUFtQjtRQVB4QixZQUFPLEdBQXlCLElBQUksQ0FBQztJQVExQyxDQUFDO0lBRUosUUFBUTtRQUNOLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxRQUFlLENBQUM7UUFDakMsTUFBTSxVQUFVLEdBQUcsR0FBRyxDQUFDLHNCQU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ICAgICAgICB9IGVsc2UgaWYgKGVycm9yQ29tcG9uZW50KSB7XG4gICAgICAgICAgY29uc3QgZmFjdG9yeSA9IHRoaXMuY2ZyLnJlc29sdmVDb21wb25lbnRGYWN0b3J5KGVycm9yQ29tcG9uZW50KTtcbiAgICAgICAgICB0aGlzLnZjci5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSk7XG4gICAgICAgICAgdGhpcy5jZHIubWFya0ZvckNoZWNrKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihcbiAgICAgICAgICAgIGAke0xPR19QUkVGSVh9IC0gTG9hZGluZyBvZiBlbGVtZW50IDwke2VsZW1lbnRUYWd9PiBmYWlsZWQsIHBsZWFzZSBwcm92aWRlIDxuZy10ZW1wbGF0ZSAjZXJyb3I+TG9hZGluZyBmYWlsZWQuLi48L25nLXRlbXBsYXRlPiBhbmQgcmVmZXJlbmNlIGl0IGluICpheExhenlFbGVtZW50PVwiZXJyb3JUZW1wbGF0ZTogZXJyb3JcIiB0byBkaXNwbGF5IGN1c3RvbWl6ZWQgZXJyb3IgbWVzc2FnZSBpbiBwbGFjZSBvZiBlbGVtZW50YFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICB9XG5cbiAgZGVzdHJveUVtYmVkZGVkVmlldygpIHtcbiAgICBpZiAodGhpcy52aWV3UmVmICYmICF0aGlzLnZpZXdSZWYuZGVzdHJveWVkKSB7XG4gICAgICB0aGlzLnZpZXdSZWYuZGV0YWNoKCk7XG4gICAgICB0aGlzLnZpZXdSZWYuZGVzdHJveSgpO1xuICAgICAgdGhpcy52aWV3UmVmID0gbnVsbDtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1lbGVtZW50LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL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pdCBpbiAqYXhMYXp5RWxlbWVudD1cImVycm9yVGVtcGxhdGU6IGVycm9yXCIgdG8gZGlzcGxheSBjdXN0b21pemVkIGVycm9yIG1lc3NhZ2UgaW4gcGxhY2Ugb2YgZWxlbWVudGBcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgfSk7XG4gIH1cblxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICB0aGlzLnN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICB9XG5cbiAgZGVzdHJveUVtYmVkZGVkVmlldygpIHtcbiAgICBpZiAodGhpcy52aWV3UmVmICYmICF0aGlzLnZpZXdSZWYuZGVzdHJveWVkKSB7XG4gICAgICB0aGlzLnZpZXdSZWYuZGV0YWNoKCk7XG4gICAgICB0aGlzLnZpZXdSZWYuZGVzdHJveSgpO1xuICAgICAgdGhpcy52aWV3UmVmID0gbnVsbDtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Inject, Optional, Directive, Input, SkipSelf, NgModule } from '@angular/core';
import { DOCUMENT, CommonModule } from '@angular/common';
import { Subscription, from } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { __awaiter } from 'tslib';

@@ -166,2 +168,3 @@

this.viewRef = null;
this.subscription = Subscription.EMPTY;
}

@@ -184,27 +187,32 @@ ngOnInit() {

}
this.elementsLoaderService
.loadElement(this.url, elementTag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(() => customElements.whenDefined(elementTag))
.then(() => {
this.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
})
.catch((err) => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
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.vcr.clear();
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX$1} - Loading of element <${elementTag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement="errorTemplate: error" to display customized error message in place of element`);
}
},
error: () => {
this.vcr.clear();
const errorComponent = elementConfig.errorComponent || options.errorComponent;
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX$1} - Loading of element <${elementTag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElement="errorTemplate: error" to display customized error message in place of element`);
}
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {

@@ -254,2 +262,3 @@ if (this.viewRef && !this.viewRef.destroyed) {

this.viewRef = null;
this.subscription = Subscription.EMPTY;
}

@@ -271,35 +280,40 @@ ngOnInit() {

}
this.elementsLoaderService
.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks)
.then(() => customElements.whenDefined(this.tag))
.then(() => {
this.vcr.clear();
const originalCreateElement = this.renderer.createElement;
this.renderer.createElement = (name, namespace) => {
if (name === 'ax-lazy-element') {
name = this.tag;
const loadElement$ = from(this.elementsLoaderService.loadElement(this.url, this.tag, this.isModule, this.importMap, elementConfig === null || elementConfig === void 0 ? void 0 : elementConfig.hooks));
this.subscription = loadElement$
.pipe(mergeMap(() => customElements.whenDefined(this.tag)))
.subscribe({
next: () => {
this.vcr.clear();
const originalCreateElement = this.renderer.createElement;
this.renderer.createElement = (name, namespace) => {
if (name === 'ax-lazy-element') {
name = this.tag;
}
return this.document.createElement(name);
};
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.renderer.createElement = originalCreateElement;
this.cdr.markForCheck();
},
error: (error) => {
const errorComponent = elementConfig.errorComponent || options.errorComponent;
this.vcr.clear();
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
return this.document.createElement(name);
};
this.viewRef = this.vcr.createEmbeddedView(this.template);
this.renderer.createElement = originalCreateElement;
this.cdr.markForCheck();
})
.catch((error) => {
const errorComponent = elementConfig.errorComponent || options.errorComponent;
this.vcr.clear();
if (this.errorTemplateRef) {
this.vcr.createEmbeddedView(this.errorTemplateRef);
this.cdr.markForCheck();
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${this.tag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic="errorTemplate: error" to display customized error message in place of element\n\n`, error);
}
else if (errorComponent) {
const factory = this.cfr.resolveComponentFactory(errorComponent);
this.vcr.createComponent(factory);
this.cdr.markForCheck();
}
else {
console.error(`${LOG_PREFIX} - Loading of element <${this.tag}> failed, please provide <ng-template #error>Loading failed...</ng-template> and reference it in *axLazyElementDynamic="errorTemplate: error" to display customized error message in place of element\n\n`, error);
}
},
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
destroyEmbeddedView() {

@@ -306,0 +320,0 @@ if (this.viewRef && !this.viewRef.destroyed) {

@@ -1,6 +0,6 @@

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

@@ -20,4 +20,6 @@ private renderer;

private viewRef;
private subscription;
constructor(document: Document, renderer: Renderer2, vcr: ViewContainerRef, cfr: ComponentFactoryResolver, cdr: ChangeDetectorRef, template: TemplateRef<any>, elementsLoaderService: LazyElementsLoaderService);
ngOnInit(): void;
ngOnDestroy(): void;
destroyEmbeddedView(): void;

@@ -24,0 +26,0 @@ static ɵfac: i0.ɵɵFactoryDeclaration<LazyElementDynamicDirective, never>;

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

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

@@ -16,4 +16,6 @@ private template;

private viewRef;
private subscription;
constructor(vcr: ViewContainerRef, template: TemplateRef<any>, elementsLoaderService: LazyElementsLoaderService, cfr: ComponentFactoryResolver, cdr: ChangeDetectorRef);
ngOnInit(): void;
ngOnDestroy(): void;
destroyEmbeddedView(): void;

@@ -20,0 +22,0 @@ static ɵfac: i0.ɵɵFactoryDeclaration<LazyElementDirective, never>;

{
"name": "@angular-extensions/elements",
"version": "12.0.0",
"version": "12.1.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