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

ng2-vizabi

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-vizabi - npm Package Compare versions

Comparing version 0.19.1 to 0.19.2

164

bundles/ng2-vizabi.umd.js

@@ -99,5 +99,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};

@@ -125,10 +122,10 @@ var urlon = __webpack_require__(3);

};
VizabiService = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
__metadata('design:paramtypes', [])
], VizabiService);
return VizabiService;
}());
VizabiService = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])()
], VizabiService);
/***/ }),

@@ -152,5 +149,2 @@ /* 2 */

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};

@@ -163,18 +157,18 @@

}
VizabiModule = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
declarations: [
__WEBPACK_IMPORTED_MODULE_2__vizabi_directive__["a" /* VizabiDirective */]
],
exports: [
__WEBPACK_IMPORTED_MODULE_2__vizabi_directive__["a" /* VizabiDirective */]
],
providers: [__WEBPACK_IMPORTED_MODULE_1__vizabi_service__["a" /* VizabiService */]]
}),
__metadata('design:paramtypes', [])
], VizabiModule);
return VizabiModule;
}());
VizabiModule = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
declarations: [
__WEBPACK_IMPORTED_MODULE_2__vizabi_directive__["a" /* VizabiDirective */]
],
exports: [
__WEBPACK_IMPORTED_MODULE_2__vizabi_directive__["a" /* VizabiDirective */]
],
providers: [__WEBPACK_IMPORTED_MODULE_1__vizabi_service__["a" /* VizabiService */]]
})
], VizabiModule);
/***/ }),

@@ -466,68 +460,70 @@ /* 3 */

};
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Number)
], VizabiDirective.prototype, "order", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Object)
], VizabiDirective.prototype, "readerModuleObject", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', String)
], VizabiDirective.prototype, "readerGetMethod", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Array)
], VizabiDirective.prototype, "readerParams", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', String)
], VizabiDirective.prototype, "readerName", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Object)
], VizabiDirective.prototype, "model", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', String)
], VizabiDirective.prototype, "modelHash", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Object)
], VizabiDirective.prototype, "extResources", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', String)
], VizabiDirective.prototype, "chartType", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata('design:type', Boolean)
], VizabiDirective.prototype, "stopUrlRedirect", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata('design:type', __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onClick", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata('design:type', __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onCreated", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata('design:type', __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onChanged", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])('additionalItems'),
__metadata('design:type', Array)
], VizabiDirective.prototype, "additionalItems", null);
VizabiDirective = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Directive"])({
selector: 'vizabi'
}),
__metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"], __WEBPACK_IMPORTED_MODULE_1__vizabi_service__["a" /* VizabiService */]])
], VizabiDirective);
return VizabiDirective;
}());
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Number)
], VizabiDirective.prototype, "order", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "readerModuleObject", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", String)
], VizabiDirective.prototype, "readerGetMethod", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Array)
], VizabiDirective.prototype, "readerParams", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", String)
], VizabiDirective.prototype, "readerName", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "model", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", String)
], VizabiDirective.prototype, "modelHash", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "extResources", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", String)
], VizabiDirective.prototype, "chartType", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", Boolean)
], VizabiDirective.prototype, "stopUrlRedirect", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onClick", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onCreated", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
__metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
], VizabiDirective.prototype, "onChanged", void 0);
__decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])('additionalItems'),
__metadata("design:type", Array),
__metadata("design:paramtypes", [Array])
], VizabiDirective.prototype, "additionalItems", null);
VizabiDirective = __decorate([
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Directive"])({
selector: 'vizabi'
}),
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"], __WEBPACK_IMPORTED_MODULE_1__vizabi_service__["a" /* VizabiService */]])
], VizabiDirective);
/***/ }),

@@ -534,0 +530,0 @@ /* 5 */

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],e):"object"==typeof exports?exports["ng2-vizabi.umd.min"]=e(require("@angular/core")):t["ng2-vizabi.umd.min"]=e(t["@angular/core"])}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=5)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(0);i.n(n);i.d(e,"a",function(){return s});var r=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a},o=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},a=i(3),s=function(){function t(){}return t.prototype.modelToString=function(t){return t=t||{},a.stringify(t)},t.prototype.stringToModel=function(t){if(t=t||"_")try{return a.parse(t)}catch(t){return console.error("Urlon Exception:",t),{}}return{}},t=r([i.i(n.Injectable)(),o("design:paramtypes",[])],t)}()},function(t,e,i){"use strict";var n=i(0),r=(i.n(n),i(1)),o=i(4);i.d(e,"a",function(){return r.a}),i.d(e,"b",function(){return o.a}),i.d(e,"c",function(){return c});var a=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},c=function(){function t(){}return t=a([i.i(n.NgModule)({declarations:[o.a],exports:[o.a],providers:[r.a]}),s("design:paramtypes",[])],t)}()},function(t,e,i){URLON={stringify:function(t){function e(t){return encodeURI(t.replace(/([=:&@_;\/])/g,"/$1"))}function i(t){if("number"==typeof t||t===!0||t===!1||null===t)return":"+t;if(t instanceof Array){for(var n=[],r=0;r<t.length;++r)n.push(i(t[r]));return"@"+n.join("&")+";"}if("object"==typeof t){var n=[];for(var o in t)n.push(e(o)+i(t[o]));return"_"+n.join("&")+";"}return"="+e((null!==t?void 0!==t?t:"undefined":"null").toString())}return i(t).replace(/;+$/g,"")},parse:function(t){function e(){for(var e="";n!==t.length;++n){if("/"===t.charAt(n)){if(n+=1,n===t.length){e+=";";break}}else if(t.charAt(n).match(/[=:&@_;]/))break;e+=t.charAt(n)}return e}function i(){var r=t.charAt(n++);if("="===r)return e();if(":"===r){var o=e();return"true"===o||"false"!==o&&(o=parseFloat(o),isNaN(o)?null:o)}if("@"===r){var a=[];t:if(!(n>=t.length||";"===t.charAt(n)))for(;;){if(a.push(i()),n>=t.length||";"===t.charAt(n))break t;n+=1}return n+=1,a}if("_"===r){var a={};t:if(!(n>=t.length||";"===t.charAt(n)))for(;;){var s=e();if(a[s]=i(),n>=t.length||";"===t.charAt(n))break t;n+=1}return n+=1,a}throw"Unexpected char "+r}var n=0;return t=decodeURI(t),i()}},e.stringify=URLON.stringify,e.parse=URLON.parse},function(t,e,i){"use strict";var n=i(0),r=(i.n(n),i(1));i.d(e,"a",function(){return s});var o=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=function(){function t(t,e){this.element=t,this.vService=e,this.onClick=new n.EventEmitter,this.onCreated=new n.EventEmitter,this.onChanged=new n.EventEmitter,this._additionalItems=[]}return Object.defineProperty(t.prototype,"additionalItems",{get:function(){return this._additionalItems},set:function(t){if(this._additionalItems=t,this.component&&this.component.instance&&this._additionalItems&&this._additionalItems.length>0){for(var e=this.component.instance.getModel(),i=0,n=this._additionalItems;i<n.length;i++){var r=n[i],o=r.path.split(/[\\\/]/),a=o[o.length-1],s="data_"+a;e[s]||(e[s]=r)}Vizabi._instances[this.component.instance._id]=null,this.component.instance.clear(),this.component.instance=Vizabi(this.chartType,this.view,e),this.onChanged.emit({order:this.order,type:this.chartType,minInitialModel:this.minInitialModel,component:this.component.instance})}},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;if(this.minInitialModel=Vizabi.utils.deepClone(this.model),this.stopUrlRedirect=this.stopUrlRedirect||!1,this.component={instance:null},this.order=this.order||1,this.createView(),this.readerProcessing(),this.setExtResources(),this.modelHashProcessing(),this.persistentChangeProcessing(),this._additionalItems&&this._additionalItems.length>0)for(var e=0,i=this.additionalItems;e<i.length;e++){var n=i[e],r="data_"+n.path;this.model[r]||(this.model[r]=n)}this.component.instance=Vizabi(this.chartType,this.view,this.model),this.onCreated.emit({order:this.order,type:this.chartType,model:this.model,component:this.component.instance}),["vzb-tool-stage","vzb-tool-dialogs","vzb-tool-buttonlist"].forEach(function(e){var i=[].slice.call(document.getElementsByClassName(e));i.forEach(function(e){e.addEventListener("click",function(e){t.onClick.emit(e)})})})},t.prototype.ngOnDestroy=function(){Object.keys(Vizabi._instances).forEach(function(t){Vizabi._instances[t]=null}),this.component.instance.clear(),this.view.remove()},t.prototype.createView=function(){this.view=document.createElement("div"),this.view.style.height="100%",this.element.nativeElement.appendChild(this.view)},t.prototype.readerProcessing=function(){if(this.readerModuleObject&&this.readerGetMethod&&this.readerName&&this.readerParams&&this.readerModuleObject[this.readerGetMethod]){var t=this.readerModuleObject[this.readerGetMethod].apply(this,this.readerParams);Vizabi.Reader.extend(this.readerName,t)}},t.prototype.modelHashProcessing=function(){if(this.modelHash){var t=encodeURI(decodeURIComponent(this.modelHash)),e=this.vService.stringToModel(t);Vizabi.utils.deepExtend(this.model,e)}},t.prototype.persistentChangeProcessing=function(){this.model.bind=this.model.bind||{},this.model.bind.ready=this.onPersistentChange.bind(this),this.model.bind.persistentChange=this.onPersistentChange.bind(this)},t.prototype.onPersistentChange=function(){var t=this.component.instance.getPersistentMinimalModel(this.minInitialModel),e=this.vService.modelToString(t);if(e==this.modelState)return!1;this.modelState=e,!this.stopUrlRedirect&&window&&window.location&&(window.location.hash=this.vService.modelToString(t));var i=Vizabi.utils.deepClone(this.component.instance.getModel());this.onChanged.emit({order:this.order,type:this.chartType,modelDiff:t,minInitialModel:this.minInitialModel,modelFull:i})},t.prototype.setExtResources=function(){this.extResources&&(Vizabi._globals.ext_resources=this.extResources)},o([i.i(n.Input)(),a("design:type",Number)],t.prototype,"order",void 0),o([i.i(n.Input)(),a("design:type",Object)],t.prototype,"readerModuleObject",void 0),o([i.i(n.Input)(),a("design:type",String)],t.prototype,"readerGetMethod",void 0),o([i.i(n.Input)(),a("design:type",Array)],t.prototype,"readerParams",void 0),o([i.i(n.Input)(),a("design:type",String)],t.prototype,"readerName",void 0),o([i.i(n.Input)(),a("design:type",Object)],t.prototype,"model",void 0),o([i.i(n.Input)(),a("design:type",String)],t.prototype,"modelHash",void 0),o([i.i(n.Input)(),a("design:type",Object)],t.prototype,"extResources",void 0),o([i.i(n.Input)(),a("design:type",String)],t.prototype,"chartType",void 0),o([i.i(n.Input)(),a("design:type",Boolean)],t.prototype,"stopUrlRedirect",void 0),o([i.i(n.Output)(),a("design:type",n.EventEmitter)],t.prototype,"onClick",void 0),o([i.i(n.Output)(),a("design:type",n.EventEmitter)],t.prototype,"onCreated",void 0),o([i.i(n.Output)(),a("design:type",n.EventEmitter)],t.prototype,"onChanged",void 0),o([i.i(n.Input)("additionalItems"),a("design:type",Array)],t.prototype,"additionalItems",null),t=o([i.i(n.Directive)({selector:"vizabi"}),a("design:paramtypes",[n.ElementRef,r.a])],t)}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2);i.d(e,"VizabiService",function(){return n.a}),i.d(e,"VizabiDirective",function(){return n.b}),i.d(e,"VizabiModule",function(){return n.c})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],t):"object"==typeof exports?exports["ng2-vizabi.umd.min"]=t(require("@angular/core")):e["ng2-vizabi.umd.min"]=t(e["@angular/core"])}(this,function(e){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=5)}([function(t,i){t.exports=e},function(e,t,i){"use strict";var n=i(0);i.n(n);i.d(t,"a",function(){return s});var r=this&&this.__decorate||function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},o=i(3),s=function(){function e(){}return e.prototype.modelToString=function(e){return e=e||{},o.stringify(e)},e.prototype.stringToModel=function(e){if(e=e||"_")try{return o.parse(e)}catch(e){return console.error("Urlon Exception:",e),{}}return{}},e}();s=r([i.i(n.Injectable)()],s)},function(e,t,i){"use strict";var n=i(0),r=(i.n(n),i(1)),o=i(4);i.d(t,"a",function(){return r.a}),i.d(t,"b",function(){return o.a}),i.d(t,"c",function(){return a});var s=this&&this.__decorate||function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},a=function(){function e(){}return e}();a=s([i.i(n.NgModule)({declarations:[o.a],exports:[o.a],providers:[r.a]})],a)},function(e,t,i){URLON={stringify:function(e){function t(e){return encodeURI(e.replace(/([=:&@_;\/])/g,"/$1"))}function i(e){if("number"==typeof e||e===!0||e===!1||null===e)return":"+e;if(e instanceof Array){for(var n=[],r=0;r<e.length;++r)n.push(i(e[r]));return"@"+n.join("&")+";"}if("object"==typeof e){var n=[];for(var o in e)n.push(t(o)+i(e[o]));return"_"+n.join("&")+";"}return"="+t((null!==e?void 0!==e?e:"undefined":"null").toString())}return i(e).replace(/;+$/g,"")},parse:function(e){function t(){for(var t="";n!==e.length;++n){if("/"===e.charAt(n)){if(n+=1,n===e.length){t+=";";break}}else if(e.charAt(n).match(/[=:&@_;]/))break;t+=e.charAt(n)}return t}function i(){var r=e.charAt(n++);if("="===r)return t();if(":"===r){var o=t();return"true"===o||"false"!==o&&(o=parseFloat(o),isNaN(o)?null:o)}if("@"===r){var s=[];e:if(!(n>=e.length||";"===e.charAt(n)))for(;;){if(s.push(i()),n>=e.length||";"===e.charAt(n))break e;n+=1}return n+=1,s}if("_"===r){var s={};e:if(!(n>=e.length||";"===e.charAt(n)))for(;;){var a=t();if(s[a]=i(),n>=e.length||";"===e.charAt(n))break e;n+=1}return n+=1,s}throw"Unexpected char "+r}var n=0;return e=decodeURI(e),i()}},t.stringify=URLON.stringify,t.parse=URLON.parse},function(e,t,i){"use strict";var n=i(0),r=(i.n(n),i(1));i.d(t,"a",function(){return a});var o=this&&this.__decorate||function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function e(e,t){this.element=e,this.vService=t,this.onClick=new n.EventEmitter,this.onCreated=new n.EventEmitter,this.onChanged=new n.EventEmitter,this._additionalItems=[]}return Object.defineProperty(e.prototype,"additionalItems",{get:function(){return this._additionalItems},set:function(e){if(this._additionalItems=e,this.component&&this.component.instance&&this._additionalItems&&this._additionalItems.length>0){for(var t=this.component.instance.getModel(),i=0,n=this._additionalItems;i<n.length;i++){var r=n[i],o=r.path.split(/[\\/]/),s=o[o.length-1],a="data_"+s;t[a]||(t[a]=r)}Vizabi._instances[this.component.instance._id]=null,this.component.instance.clear(),this.component.instance=Vizabi(this.chartType,this.view,t),this.onChanged.emit({order:this.order,type:this.chartType,minInitialModel:this.minInitialModel,component:this.component.instance})}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(this.minInitialModel=Vizabi.utils.deepClone(this.model),this.stopUrlRedirect=this.stopUrlRedirect||!1,this.component={instance:null},this.order=this.order||1,this.createView(),this.readerProcessing(),this.setExtResources(),this.modelHashProcessing(),this.persistentChangeProcessing(),this._additionalItems&&this._additionalItems.length>0)for(var t=0,i=this.additionalItems;t<i.length;t++){var n=i[t],r="data_"+n.path;this.model[r]||(this.model[r]=n)}this.component.instance=Vizabi(this.chartType,this.view,this.model),this.onCreated.emit({order:this.order,type:this.chartType,model:this.model,component:this.component.instance}),["vzb-tool-stage","vzb-tool-dialogs","vzb-tool-buttonlist"].forEach(function(t){var i=[].slice.call(document.getElementsByClassName(t));i.forEach(function(t){t.addEventListener("click",function(t){e.onClick.emit(t)})})})},e.prototype.ngOnDestroy=function(){Object.keys(Vizabi._instances).forEach(function(e){Vizabi._instances[e]=null}),this.component.instance.clear(),this.view.remove()},e.prototype.createView=function(){this.view=document.createElement("div"),this.view.style.height="100%",this.element.nativeElement.appendChild(this.view)},e.prototype.readerProcessing=function(){if(this.readerModuleObject&&this.readerGetMethod&&this.readerName&&this.readerParams&&this.readerModuleObject[this.readerGetMethod]){var e=this.readerModuleObject[this.readerGetMethod].apply(this,this.readerParams);Vizabi.Reader.extend(this.readerName,e)}},e.prototype.modelHashProcessing=function(){if(this.modelHash){var e=encodeURI(decodeURIComponent(this.modelHash)),t=this.vService.stringToModel(e);Vizabi.utils.deepExtend(this.model,t)}},e.prototype.persistentChangeProcessing=function(){this.model.bind=this.model.bind||{},this.model.bind.ready=this.onPersistentChange.bind(this),this.model.bind.persistentChange=this.onPersistentChange.bind(this)},e.prototype.onPersistentChange=function(){var e=this.component.instance.getPersistentMinimalModel(this.minInitialModel),t=this.vService.modelToString(e);if(t==this.modelState)return!1;this.modelState=t,!this.stopUrlRedirect&&window&&window.location&&(window.location.hash=this.vService.modelToString(e));var i=Vizabi.utils.deepClone(this.component.instance.getModel());this.onChanged.emit({order:this.order,type:this.chartType,modelDiff:e,minInitialModel:this.minInitialModel,modelFull:i})},e.prototype.setExtResources=function(){this.extResources&&(Vizabi._globals.ext_resources=this.extResources)},e}();o([i.i(n.Input)(),s("design:type",Number)],a.prototype,"order",void 0),o([i.i(n.Input)(),s("design:type",Object)],a.prototype,"readerModuleObject",void 0),o([i.i(n.Input)(),s("design:type",String)],a.prototype,"readerGetMethod",void 0),o([i.i(n.Input)(),s("design:type",Array)],a.prototype,"readerParams",void 0),o([i.i(n.Input)(),s("design:type",String)],a.prototype,"readerName",void 0),o([i.i(n.Input)(),s("design:type",Object)],a.prototype,"model",void 0),o([i.i(n.Input)(),s("design:type",String)],a.prototype,"modelHash",void 0),o([i.i(n.Input)(),s("design:type",Object)],a.prototype,"extResources",void 0),o([i.i(n.Input)(),s("design:type",String)],a.prototype,"chartType",void 0),o([i.i(n.Input)(),s("design:type",Boolean)],a.prototype,"stopUrlRedirect",void 0),o([i.i(n.Output)(),s("design:type",n.EventEmitter)],a.prototype,"onClick",void 0),o([i.i(n.Output)(),s("design:type",n.EventEmitter)],a.prototype,"onCreated",void 0),o([i.i(n.Output)(),s("design:type",n.EventEmitter)],a.prototype,"onChanged",void 0),o([i.i(n.Input)("additionalItems"),s("design:type",Array),s("design:paramtypes",[Array])],a.prototype,"additionalItems",null),a=o([i.i(n.Directive)({selector:"vizabi"}),s("design:paramtypes",[n.ElementRef,r.a])],a)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2);i.d(t,"VizabiService",function(){return n.a}),i.d(t,"VizabiDirective",function(){return n.b}),i.d(t,"VizabiModule",function(){return n.c})}])});
{
"main": "bundles/ng2-vizabi.umd.js",
"version": "0.19.1",
"version": "0.19.2",
"description": "angular2 vizabi component",

@@ -29,5 +29,5 @@ "module": "index.js",

},
"_id": "ng2-vizabi@0.19.1",
"_id": "ng2-vizabi@0.19.2",
"devDependencies": {},
"dependencies": {}
}

@@ -0,4 +1,13 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { EventEmitter, Input, Output, Directive, ElementRef } from '@angular/core';
import { VizabiService } from './vizabi.service';
export var VizabiDirective = (function () {
var VizabiDirective = (function () {
function VizabiDirective(element, vService) {

@@ -140,30 +149,68 @@ this.element = element;

};
VizabiDirective.decorators = [
{ type: Directive, args: [{
selector: 'vizabi'
},] },
];
/** @nocollapse */
VizabiDirective.ctorParameters = function () { return [
{ type: ElementRef, },
{ type: VizabiService, },
]; };
VizabiDirective.propDecorators = {
'order': [{ type: Input },],
'readerModuleObject': [{ type: Input },],
'readerGetMethod': [{ type: Input },],
'readerParams': [{ type: Input },],
'readerName': [{ type: Input },],
'model': [{ type: Input },],
'modelHash': [{ type: Input },],
'extResources': [{ type: Input },],
'chartType': [{ type: Input },],
'stopUrlRedirect': [{ type: Input },],
'onClick': [{ type: Output },],
'onCreated': [{ type: Output },],
'onChanged': [{ type: Output },],
'additionalItems': [{ type: Input, args: ['additionalItems',] },],
};
return VizabiDirective;
}());
__decorate([
Input(),
__metadata("design:type", Number)
], VizabiDirective.prototype, "order", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "readerModuleObject", void 0);
__decorate([
Input(),
__metadata("design:type", String)
], VizabiDirective.prototype, "readerGetMethod", void 0);
__decorate([
Input(),
__metadata("design:type", Array)
], VizabiDirective.prototype, "readerParams", void 0);
__decorate([
Input(),
__metadata("design:type", String)
], VizabiDirective.prototype, "readerName", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "model", void 0);
__decorate([
Input(),
__metadata("design:type", String)
], VizabiDirective.prototype, "modelHash", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], VizabiDirective.prototype, "extResources", void 0);
__decorate([
Input(),
__metadata("design:type", String)
], VizabiDirective.prototype, "chartType", void 0);
__decorate([
Input(),
__metadata("design:type", Boolean)
], VizabiDirective.prototype, "stopUrlRedirect", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], VizabiDirective.prototype, "onClick", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], VizabiDirective.prototype, "onCreated", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], VizabiDirective.prototype, "onChanged", void 0);
__decorate([
Input('additionalItems'),
__metadata("design:type", Array),
__metadata("design:paramtypes", [Array])
], VizabiDirective.prototype, "additionalItems", null);
VizabiDirective = __decorate([
Directive({
selector: 'vizabi'
}),
__metadata("design:paramtypes", [ElementRef, VizabiService])
], VizabiDirective);
export { VizabiDirective };
//# sourceMappingURL=vizabi.directive.js.map

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

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { NgModule } from '@angular/core';

@@ -5,20 +11,19 @@ import { VizabiService } from './vizabi.service';

export { VizabiService, VizabiDirective };
export var VizabiModule = (function () {
var VizabiModule = (function () {
function VizabiModule() {
}
VizabiModule.decorators = [
{ type: NgModule, args: [{
declarations: [
VizabiDirective
],
exports: [
VizabiDirective
],
providers: [VizabiService]
},] },
];
/** @nocollapse */
VizabiModule.ctorParameters = function () { return []; };
return VizabiModule;
}());
VizabiModule = __decorate([
NgModule({
declarations: [
VizabiDirective
],
exports: [
VizabiDirective
],
providers: [VizabiService]
})
], VizabiModule);
export { VizabiModule };
//# sourceMappingURL=vizabi.js.map

@@ -0,4 +1,10 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Injectable } from '@angular/core';
var urlon = require('URLON');
export var VizabiService = (function () {
var VizabiService = (function () {
function VizabiService() {

@@ -23,9 +29,8 @@ }

};
VizabiService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
VizabiService.ctorParameters = function () { return []; };
return VizabiService;
}());
VizabiService = __decorate([
Injectable()
], VizabiService);
export { VizabiService };
//# sourceMappingURL=vizabi.service.js.map

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