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

panel

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

panel - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

31

build/component.js

@@ -118,2 +118,3 @@ 'use strict';

this.el.appendChild(this.loop.target);
this.initialized = true;

@@ -124,4 +125,2 @@ if (Object.keys(this.getConfig('routes')).length) {

}
this.initialized = true;
}

@@ -165,2 +164,9 @@ }, {

}, {
key: 'logError',
value: function logError() {
var _console;
(_console = console).error.apply(_console, arguments);
}
}, {
key: 'navigate',

@@ -188,2 +194,11 @@ value: function navigate() {

}, {
key: 'toString',
value: function toString() {
try {
return this.tagName + '#' + this.panelID;
} catch (e) {
return 'UNKNOWN COMPONENT';
}
}
}, {
key: 'update',

@@ -243,6 +258,10 @@ value: function update() {

if (this.shouldUpdate(state)) {
this._rendered = this.getConfig('template')(Object.assign({}, state, {
$component: this,
$helpers: this.getConfig('helpers')
}));
try {
this._rendered = this.getConfig('template')(Object.assign({}, state, {
$component: this,
$helpers: this.getConfig('helpers')
}));
} catch (e) {
this.logError('Error while rendering ' + this.toString(), this, e);
}
}

@@ -249,0 +268,0 @@ return this._rendered || EMPTY_DIV;

27

lib/component.js

@@ -75,2 +75,3 @@ import MainLoop from 'main-loop';

this.el.appendChild(this.loop.target);
this.initialized = true;

@@ -81,4 +82,2 @@ if (Object.keys(this.getConfig('routes')).length) {

}
this.initialized = true;
}

@@ -115,2 +114,6 @@

logError() {
console.error(...arguments);
}
navigate() {

@@ -131,2 +134,10 @@ this.$panelRoot.router.navigate(...arguments);

toString() {
try {
return `${this.tagName}#${this.panelID}`;
} catch(e) {
return 'UNKNOWN COMPONENT';
}
}
update(stateUpdate={}) {

@@ -160,6 +171,10 @@ if (!this.initialized) {

if (this.shouldUpdate(state)) {
this._rendered = this.getConfig('template')(Object.assign({}, state, {
$component: this,
$helpers: this.getConfig('helpers'),
}));
try {
this._rendered = this.getConfig('template')(Object.assign({}, state, {
$component: this,
$helpers: this.getConfig('helpers'),
}));
} catch(e) {
this.logError(`Error while rendering ${this.toString()}`, this, e);
}
}

@@ -166,0 +181,0 @@ return this._rendered || EMPTY_DIV;

{
"name": "panel",
"version": "0.8.3",
"version": "0.8.4",
"description": "Web Components with Virtual DOM: lightweight composable web apps",

@@ -11,4 +11,4 @@ "main": "build/index.js",

"test": "npm run build-test && npm run test-local",
"test-local": "wct --plugin local",
"test-sauce": "wct --plugin sauce"
"test-local": "wct --plugin local test/index.html",
"test-sauce": "wct --plugin sauce test/index.html"
},

@@ -42,6 +42,2 @@ "repository": {

"babel-preset-es2015": "^6.6.0",
"expect.js": "^0.3.1",
"min-document": "^2.18.0",
"mocha": "^2.4.5",
"raf": "^3.2.0",
"web-component-tester": "4.2.2",

@@ -48,0 +44,0 @@ "webcomponents.js": "0.7.22",

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