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

angular-render-html-once

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-render-html-once - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

2

angular-render-html-once.metadata.json

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

{"__symbolic":"module","version":4,"metadata":{"RenderHtmlOnceComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"render-html-once","template":""}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":5}}]}],"htmlContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":12,"character":55,"context":{"typeName":"Element"},"module":"./lib/render-html-once.component"}]}]}],"ngOnInit":[{"__symbolic":"method"}]},"statics":{"alreadyRendered":{}}},"RenderHtmlOnceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"exports":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"imports":[]}]}],"members":{}}},"origins":{"RenderHtmlOnceComponent":"./lib/render-html-once.component","RenderHtmlOnceModule":"./lib/render-html-once.module"},"importAs":"angular-render-html-once"}
{"__symbolic":"module","version":4,"metadata":{"RenderHtmlOnceComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"render-html-once","template":""}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"htmlContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":55,"context":{"typeName":"Element"},"module":"./lib/render-html-once.component"}]}]}],"ngOnInit":[{"__symbolic":"method"}]},"statics":{"alreadyRendered":{},"enabled":true}},"RenderHtmlOnceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"exports":[{"__symbolic":"reference","name":"RenderHtmlOnceComponent"}],"imports":[]}]}],"members":{}}},"origins":{"RenderHtmlOnceComponent":"./lib/render-html-once.component","RenderHtmlOnceModule":"./lib/render-html-once.module"},"importAs":"angular-render-html-once"}

@@ -23,2 +23,5 @@ (function (global, factory) {

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
/** @type {?} */

@@ -43,2 +46,5 @@ var cacheHit = RenderHtmlOnceComponent.alreadyRendered[this.id];

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
if (window && window.document && window.document.getElementsByTagName) {

@@ -63,3 +69,22 @@ /** @type {?} */

};
/**
* @return {?}
*/
RenderHtmlOnceComponent.enable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = true;
};
/**
* @return {?}
*/
RenderHtmlOnceComponent.disable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = false;
};
RenderHtmlOnceComponent.alreadyRendered = {};
RenderHtmlOnceComponent.enabled = true;
RenderHtmlOnceComponent.decorators = [

@@ -87,2 +112,7 @@ { type: core.Component, args: [{

RenderHtmlOnceComponent.alreadyRendered;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.enabled;
/** @type {?} */

@@ -89,0 +119,0 @@ RenderHtmlOnceComponent.prototype.id;

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-render-html-once",["exports","@angular/core"],n):n((e=e||self)["angular-render-html-once"]={},e.ng.core)}(this,(function(e,n){"use strict";var t=function(){function e(e){this.hostElement=e}return e.prototype.ngOnInit=function(){var n=e.alreadyRendered[this.id];if(n)for(;n.childNodes.length;)this.hostElement.nativeElement.appendChild(n.firstChild);else this.hostElement.nativeElement.innerHTML=this.htmlContent;e.alreadyRendered[this.id]=this.hostElement.nativeElement},e.registerServerSideRenderedComponents=function(){if(window&&window.document&&window.document.getElementsByTagName)for(var n=window.document.getElementsByTagName("render-html-once"),t=0;t<n.length;++t){var r=n[t];e.alreadyRendered[r.id]=r}},e.clearCache=function(){e.alreadyRendered={}},e.alreadyRendered={},e.decorators=[{type:n.Component,args:[{selector:"render-html-once",template:""}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={id:[{type:n.Input}],htmlContent:[{type:n.Input}]},e}();var r=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[t],exports:[t],imports:[]}]}],e}();e.RenderHtmlOnceComponent=t,e.RenderHtmlOnceModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("angular-render-html-once",["exports","@angular/core"],n):n((e=e||self)["angular-render-html-once"]={},e.ng.core)}(this,(function(e,n){"use strict";var t=function(){function e(e){this.hostElement=e}return e.prototype.ngOnInit=function(){if(e.enabled){var n=e.alreadyRendered[this.id];if(n)for(;n.childNodes.length;)this.hostElement.nativeElement.appendChild(n.firstChild);else this.hostElement.nativeElement.innerHTML=this.htmlContent;e.alreadyRendered[this.id]=this.hostElement.nativeElement}},e.registerServerSideRenderedComponents=function(){if(e.enabled&&window&&window.document&&window.document.getElementsByTagName)for(var n=window.document.getElementsByTagName("render-html-once"),t=0;t<n.length;++t){var r=n[t];e.alreadyRendered[r.id]=r}},e.clearCache=function(){e.alreadyRendered={}},e.enable=function(){e.enabled=!0},e.disable=function(){e.enabled=!1},e.alreadyRendered={},e.enabled=!0,e.decorators=[{type:n.Component,args:[{selector:"render-html-once",template:""}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={id:[{type:n.Input}],htmlContent:[{type:n.Input}]},e}();var r=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[t],exports:[t],imports:[]}]}],e}();e.RenderHtmlOnceComponent=t,e.RenderHtmlOnceModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=angular-render-html-once.umd.min.js.map

@@ -18,2 +18,5 @@ /**

ngOnInit() {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
/** @type {?} */

@@ -35,2 +38,5 @@ const cacheHit = RenderHtmlOnceComponent.alreadyRendered[this.id];

static registerServerSideRenderedComponents() {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
if (window && window.document && window.document.getElementsByTagName) {

@@ -52,4 +58,17 @@ /** @type {?} */

}
/**
* @return {?}
*/
static enable() {
RenderHtmlOnceComponent.enabled = true;
}
/**
* @return {?}
*/
static disable() {
RenderHtmlOnceComponent.enabled = false;
}
}
RenderHtmlOnceComponent.alreadyRendered = {};
RenderHtmlOnceComponent.enabled = true;
RenderHtmlOnceComponent.decorators = [

@@ -75,2 +94,7 @@ { type: Component, args: [{

RenderHtmlOnceComponent.alreadyRendered;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.enabled;
/** @type {?} */

@@ -86,2 +110,2 @@ RenderHtmlOnceComponent.prototype.id;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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aW5kb3cuZG9jdW1lbnQgJiYgd2luZG93LmRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBlbGVtZW50cyA9IHdpbmRvdy5kb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncmVuZGVyLWh0bWwtb25jZScpO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBlbGVtZW50c1tpXTtcbiAgICAgICAgICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5hbHJlYWR5UmVuZGVyZWRbZWxlbWVudC5pZF0gPSBlbGVtZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBjbGVhckNhY2hlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5hbHJlYWR5UmVuZGVyZWQgPSB7fTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGVuYWJsZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuZW5hYmxlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBkaXNhYmxlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5lbmFibGVkID0gZmFsc2U7XG4gICAgfVxufVxuIl19

@@ -18,2 +18,5 @@ /**

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
/** @type {?} */

@@ -38,2 +41,5 @@ var cacheHit = RenderHtmlOnceComponent.alreadyRendered[this.id];

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
if (window && window.document && window.document.getElementsByTagName) {

@@ -58,3 +64,22 @@ /** @type {?} */

};
/**
* @return {?}
*/
RenderHtmlOnceComponent.enable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = true;
};
/**
* @return {?}
*/
RenderHtmlOnceComponent.disable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = false;
};
RenderHtmlOnceComponent.alreadyRendered = {};
RenderHtmlOnceComponent.enabled = true;
RenderHtmlOnceComponent.decorators = [

@@ -83,2 +108,7 @@ { type: Component, args: [{

RenderHtmlOnceComponent.alreadyRendered;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.enabled;
/** @type {?} */

@@ -94,2 +124,2 @@ RenderHtmlOnceComponent.prototype.id;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlbmRlci1odG1sLW9uY2UvIiwic291cmNlcyI6WyJsaWIvcmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7QUFFbkU7SUFVSSxpQ0FBMkIsV0FBZ0M7UUFBaEMsZ0JBQVcsR0FBWCxXQUFXLENBQXFCO0lBQUcsQ0FBQzs7OztJQUV4RCwwQ0FBUTs7O0lBQWY7O1lBQ1UsUUFBUSxHQUFHLHVCQUF1QixDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDO1FBQ2pFLElBQUksUUFBUSxFQUFFO1lBQ1YsT0FBTyxRQUFRLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRTtnQkFDL0IsSUFBSSxDQUFDLFdBQVcsQ0FBQyxhQUFhLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxVQUFVLENBQUMsQ0FBQzthQUNuRTtTQUNKO2FBQU07WUFDS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W50Lm5hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gdGhpcy5odG1sQ29udGVudDtcbiAgICAgICAgfVxuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5hbHJlYWR5UmVuZGVyZWRbdGhpcy5pZF0gPSB0aGlzLmhvc3RFbGVtZW50Lm5hdGl2ZUVsZW1lbnQ7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyByZWdpc3RlclNlcnZlclNpZGVSZW5kZXJlZENvbXBvbmVudHMoKTogdm9pZCB7XG4gICAgICAgIGlmICh3aW5kb3cgJiYgd2luZG93LmRvY3VtZW50ICYmIHdpbmRvdy5kb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPSB3aW5kb3cuZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3JlbmRlci1odG1sLW9uY2UnKTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gZWxlbWVudHNbaV07XG4gICAgICAgICAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuYWxyZWFkeVJlbmRlcmVkW2VsZW1lbnQuaWRdID0gZWxlbWVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBzdGF0aWMgY2xlYXJDYWNoZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuYWxyZWFkeVJlbmRlcmVkID0ge307XG4gICAgfVxufVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWh0bWwtb25jZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXJlbmRlci1odG1sLW9uY2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iAgICBwdWJsaWMgc3RhdGljIGVuYWJsZSgpOiB2b2lkIHtcbiAgICAgICAgUmVuZGVySHRtbE9uY2VDb21wb25lbnQuZW5hYmxlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBkaXNhYmxlKCk6IHZvaWQge1xuICAgICAgICBSZW5kZXJIdG1sT25jZUNvbXBvbmVudC5lbmFibGVkID0gZmFsc2U7XG4gICAgfVxufVxuIl19

@@ -19,2 +19,5 @@ import { Component, ElementRef, Input, NgModule } from '@angular/core';

ngOnInit() {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
/** @type {?} */

@@ -36,2 +39,5 @@ const cacheHit = RenderHtmlOnceComponent.alreadyRendered[this.id];

static registerServerSideRenderedComponents() {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
if (window && window.document && window.document.getElementsByTagName) {

@@ -53,4 +59,17 @@ /** @type {?} */

}
/**
* @return {?}
*/
static enable() {
RenderHtmlOnceComponent.enabled = true;
}
/**
* @return {?}
*/
static disable() {
RenderHtmlOnceComponent.enabled = false;
}
}
RenderHtmlOnceComponent.alreadyRendered = {};
RenderHtmlOnceComponent.enabled = true;
RenderHtmlOnceComponent.decorators = [

@@ -76,2 +95,7 @@ { type: Component, args: [{

RenderHtmlOnceComponent.alreadyRendered;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.enabled;
/** @type {?} */

@@ -78,0 +102,0 @@ RenderHtmlOnceComponent.prototype.id;

@@ -19,2 +19,5 @@ import { Component, ElementRef, Input, NgModule } from '@angular/core';

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
/** @type {?} */

@@ -39,2 +42,5 @@ var cacheHit = RenderHtmlOnceComponent.alreadyRendered[this.id];

function () {
if (!RenderHtmlOnceComponent.enabled) {
return;
}
if (window && window.document && window.document.getElementsByTagName) {

@@ -59,3 +65,22 @@ /** @type {?} */

};
/**
* @return {?}
*/
RenderHtmlOnceComponent.enable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = true;
};
/**
* @return {?}
*/
RenderHtmlOnceComponent.disable = /**
* @return {?}
*/
function () {
RenderHtmlOnceComponent.enabled = false;
};
RenderHtmlOnceComponent.alreadyRendered = {};
RenderHtmlOnceComponent.enabled = true;
RenderHtmlOnceComponent.decorators = [

@@ -83,2 +108,7 @@ { type: Component, args: [{

RenderHtmlOnceComponent.alreadyRendered;
/**
* @type {?}
* @private
*/
RenderHtmlOnceComponent.enabled;
/** @type {?} */

@@ -85,0 +115,0 @@ RenderHtmlOnceComponent.prototype.id;

@@ -5,2 +5,3 @@ import { ElementRef, OnInit } from '@angular/core';

private static alreadyRendered;
private static enabled;
id: string;

@@ -12,2 +13,4 @@ htmlContent: string;

static clearCache(): void;
static enable(): void;
static disable(): void;
}
{
"name": "angular-render-html-once",
"version": "1.0.4",
"version": "1.1.0",
"description": "Anuglar helper component for HTML string that should be rendered once and maintaned later",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/bushee/angular-render-html-once",

@@ -11,2 +11,5 @@ # angular-render-html-once

#### enabing/disabling
One-time rendering is enabled by default. If you wish to disable it permanently, use `RenderHtmlOnceComponent.disable()` static method - it will prevent from caching/using cache from now on. Complementary static method `RenderHtmlOnce.enable()` will enable it again.
#### bootstrap _(optional)_

@@ -13,0 +16,0 @@ Call no-argument static method `RenderHtmlOnceComponent.registerServerSideRenderedComponents()` wherever applicable (eg. in your application module's constructor) to have it scan for any server-side rendered components that could be already used.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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