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

ngx-forge

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-forge - npm Package Compare versions

Comparing version 0.0.8-development to 0.0.9-development

4

bundles/ngx-forge.umd.js

@@ -641,4 +641,3 @@ (function (global, factory) {

exports.InputComponent,
exports.ProjectSelect,
exports.History
exports.ProjectSelect
];

@@ -658,2 +657,3 @@ exports.NgxForgeModule = (function () {

exports.AsciidocService,
exports.History,
{ provide: _angular_core.APP_INITIALIZER, useFactory: function (config) { return function () { return config.load(); }; }, deps: [exports.Config], multi: true }

@@ -660,0 +660,0 @@ ]

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("@angular/forms"),require("rxjs/Observable"),require("rxjs/Subject"),require("@angular/common"),require("@angular/http"),require("rxjs/add/operator/toPromise")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","@angular/forms","rxjs/Observable","rxjs/Subject","@angular/common","@angular/http","rxjs/add/operator/toPromise"],e):e(t["ngx-forge"]=t["ngx-forge"]||{},t.ng.core,t._angular_platformBrowser,t._angular_forms,t.Rx,t.Rx,t._angular_common,t.ng.http)}(this,function(t,e,n,o,r,i,c,u){"use strict";var s=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a=function(){function t(){this.state=new f}return Object.defineProperty(t.prototype,"messages",{get:function(){return this._messages||(this._messages=[]),this._messages},set:function(t){this._messages=t},enumerable:!0,configurable:!0}),t}(),p=function(){function t(){}return t}(),f=function(){function t(){}return t}(),l=function(){function t(t){t&&(this.name=t.name,this.value=t.value)}return t}(),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(l),d=function(){function t(){}return t}(),y=function(){function t(){}return t}(),g=function(){function t(t){this.message=t}return t}(),m=function(){function t(){}return t}(),v=function(){function t(){}return t}(),b=function(){function t(t,e){this.messageKey=t,this.message=e}return t}(),j=function(){function t(t){this.description=t}return t}(),O=function(){function t(){}return t}();!function(t){t[t.ERROR=0]="ERROR",t[t.WARN=1]="WARN",t[t.INFO=2]="INFO"}(t.Error||(t.Error={}));var R=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c};t.History=function(){function t(){this.state=[]}return t.prototype.add=function(t){this.state.push(t),t.stepIndex=this.stepIndex},t.prototype.done=function(){this.ready=!0},t.prototype.apply=function(t){if(null!=t){var e=JSON.parse(atob(t));if(e.inputs)for(var n=0,o=e.inputs;n<o.length;n++)for(var r=o[n],i=0,c=this.state;i<c.length;i++)for(var u=c[i],s=0,a=u.inputs;s<a.length;s++){var p=a[s];p.name===r.name&&(p.value=r.value)}}},t.prototype.get=function(t){return this.state[t-1]},Object.defineProperty(t.prototype,"currentGui",{get:function(){return this.ready?this.state[this.stepIndex-1]:new a},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stepIndex",{get:function(){return Math.max(0,this.state.length)},enumerable:!0,configurable:!0}),t.prototype.resetTo=function(t){this.ready=!1,this.state.splice(t,this.state.length)},t.prototype.convert=function(t){void 0===t&&(t=this.stepIndex-1);var e=new a;e.stepIndex=t,e.inputs=[];for(var n=0,o=this.state;n<o.length;n++){var r=o[n],i=r.inputs;if(i){var c=this.convertToSubmittable(i);e.inputs=e.inputs.concat(c)}}return e},t.prototype.toString=function(){return btoa(JSON.stringify(this.convert()))},t.prototype.convertToSubmittable=function(t){var e=[];if(t)for(var n=0,o=t;n<o.length;n++){var r=o[n];e.push(new h(r))}return e},t}(),t.History=R([e.Injectable()],t.History);var S=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},_=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},I=[],P=require("asciidoctor.js")();t.AsciidocService=function(){function t(t,e){this.domSanitizer=t,this.history=e,this.defaultOptions={safe:"unsafe",sourceHighlighter:"highlightjs"}}return t.prototype.generateHtml=function(t){if(!I.hasOwnProperty(t))return console.warn("docId: '"+t+"' not valid"),"";var e="";return this.history.convert().inputs.forEach(function(t){e+=":"+t.name+": "+t.value+"\n"}),P.convert(e+I["document-attributes"]+I[t],this.defaultOptions)},t.prototype.generateSafeHtml=function(t){return this.domSanitizer.bypassSecurityTrustHtml(this.generateHtml(t))},t}(),t.AsciidocService=S([e.Injectable(),_("design:paramtypes",[n.DomSanitizer,t.History])],t.AsciidocService);var x=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},w=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.AsciidocComponent=function(){function t(t){this.asciidoc=t,this.defaultOptions={safe:"unsafe",sourceHighlighter:"highlightjs"}}return t.prototype.generate=function(){return this.asciidoc.generateSafeHtml(this.docId)},t}(),x([e.Input(),w("design:type",String)],t.AsciidocComponent.prototype,"docId",void 0),t.AsciidocComponent=x([e.Component({selector:"la-asciidoc",template:"<span [innerHtml]='generate()'></span>"}),w("design:paramtypes",[t.AsciidocService])],t.AsciidocComponent);var A=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),C=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},E=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.InputComponent=F=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.keyUp=new i.Subject,e.searchMultiSelectSettings={enableSearch:!0,checkedStyle:"glyphicon",showUncheckAll:!0},e}return A(e,t),e.prototype.ngOnInit=function(){var t=this;this.changeOnKey&&this.keyUp.debounceTime(1e3).distinctUntilChanged().flatMap(function(t){return r.Observable.of(t).delay(500)}).subscribe(function(e){t.onChange(e)})},e.prototype.writeValue=function(e){e&&e.value&&(this.input.value=e.value),t.prototype.writeValue.call(this,e)},e.prototype.change=function(){this.changeOnKey||this.onChange(this.input.value)},e.prototype.messageForInput=function(t){var e;if(!this.messages)return null;for(var n=0,o=this.messages;n<o.length;n++){var r=o[n];r.input===t&&(e=r)}return e},e.prototype.convertToOptions=function(t){for(var e=[],n=0,o=t;n<o.length;n++){var r=o[n];e.push({id:r,name:r})}return e},e}(o.DefaultValueAccessor),C([e.Input("ngModel"),E("design:type",h)],t.InputComponent.prototype,"input",void 0),C([e.Input(),E("design:type",Array)],t.InputComponent.prototype,"messages",void 0),C([e.Input(),E("design:type",Boolean)],t.InputComponent.prototype,"changeOnKey",void 0),t.InputComponent=F=C([e.Component({selector:"la-input",templateUrl:"input.component.html",styleUrls:["input.component.scss"],providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return F}),multi:!0}]})],t.InputComponent);var F,H=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e}(h),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e}(Option),U=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),D=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},T=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},q={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return t.ProjectSelect}),multi:!0};t.ProjectSelect=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return U(e,t),e.prototype.writeValue=function(t){void 0!==t&&(this.model=t)},e.prototype.className=function(t){var e=t.id.indexOf(" ");return e=e===-1?t.id.indexOf("."):e,t.id.substr(0,e).replace(/\./,"-")},e.prototype.isSelected=function(t){return this.model===t.id},e.prototype.setSelected=function(t){this.model=t.id,this.onChange(this.model)},e}(o.DefaultValueAccessor),D([e.Input(),T("design:type",h)],t.ProjectSelect.prototype,"input",void 0),t.ProjectSelect=D([e.Component({selector:"ob-project-select",providers:[q],templateUrl:"./project-select.component.html",styleUrls:["./project-select.component.less"]})],t.ProjectSelect);var V=function(){function t(){}return t}();V=D([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:[t.ProjectSelect],declarations:[t.ProjectSelect]})],V);var L=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},k=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.Config=function(){function t(t){this.http=t}return t.prototype.load=function(t){var e=this;return void 0===t&&(t="settings.json"),this.http.get(t).toPromise().then(function(t){e.settings=t.json()}).catch(function(){return console.log("settings.json not found ignoring")})},t.prototype.set=function(t){this.settings=t},t.prototype.get=function(t){return this.settings[t]},t}(),t.Config=L([e.Injectable(),k("design:paramtypes",[u.Http])],t.Config);var G=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},K=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.ForgeService=function(){function t(t,e){this.http=t,this.config=e,this.apiUrl=e.get("backend_url")}return t.prototype.version=function(){return this.http.get(this.apiUrl+"/version",this.options()).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.commandInfo=function(t){return this.http.get(this.apiUrl+"/commands/"+t,this.options()).retryWhen(function(t){return t.delay(3e3).scan(function(t,e,n){if(n)throw e})}).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.validate=function(t,e){return this.post(e.convert(),"/commands/"+t+"/validate")},t.prototype.nextStep=function(t,e){return this.post(e.convert(e.stepIndex),"/commands/"+t+"/next")},t.prototype.executeStep=function(t,e){return this.post(e.convert(e.stepIndex),"/commands/"+t+"/execute")},t.prototype.action=function(t){return this.post(t,"action")},t.prototype.loadGui=function(t,e){return 0===e.stepIndex?this.commandInfo(t):this.nextStep(t,e)},t.prototype.upload=function(t,e){return this.http.post(this.apiUrl+"/commands/"+t+"/missioncontrol",e.convert(),this.options()).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.downloadZip=function(t,e){var n=document.createElement("form");n.setAttribute("method","POST"),n.setAttribute("action",this.apiUrl+"/commands/"+t+"/zip"),n.appendChild(this.createFormInput("stepIndex",String(e.stepIndex)));for(var o=1;o<=e.stepIndex;o++){var r=e.get(o).inputs;if(r)for(var i=0,c=r;i<c.length;i++){var u=c[i];if(u.value instanceof Array)for(var s=0,a=u.value;s<a.length;s++){var p=a[s];n.appendChild(this.createFormInput(u.name,p))}else n.appendChild(this.createFormInput(u.name,u.value))}}document.body.appendChild(n),n.submit()},t.prototype.createFormInput=function(t,e){var n=document.createElement("input");return n.setAttribute("type","hidden"),n.setAttribute("name",t),n.setAttribute("value",e),n},t.prototype.post=function(t,e){return this.http.post(this.apiUrl+e,t,this.options()).retryWhen(function(t){return t.delay(3e3).scan(function(t,e,n){if(n)throw e})}).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.handleError=function(t){return console.error("An error occurred",t),t.statusText?Promise.reject(t.json()):Promise.reject(t.message||"Error calling service")},t.prototype.options=function(){var t=new u.Headers;return this.filters&&t.append("X-LAUNCHPAD_BACKEND_LABEL_FILTERS",this.filters),{headers:t}},t}(),t.ForgeService=G([e.Injectable(),K("design:paramtypes",[u.Http,t.Config])],t.ForgeService);var z=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},B=[t.AsciidocComponent,t.InputComponent,t.ProjectSelect,t.History];t.NgxForgeModule=function(){function t(){}return t}(),t.NgxForgeModule=z([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:B,declarations:B,providers:[t.ForgeService,t.AsciidocService,{provide:e.APP_INITIALIZER,useFactory:function(t){return function(){return t.load()}},deps:[t.Config],multi:!0}]})],t.NgxForgeModule),t.Gui=a,t.MetaData=p,t.State=f,t.SubmittableInput=l,t.Input=h,t.Option=d,t.DownloadFile=y,t.Result=g,t.StatusResult=m,t.StatusEvent=v,t.StatusMessage=b,t.Message=j,t.Version=O,t.OpenshiftIOInput=M,t.OpenshiftIOOption=N,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("@angular/forms"),require("rxjs/Observable"),require("rxjs/Subject"),require("@angular/common"),require("@angular/http"),require("rxjs/add/operator/toPromise")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","@angular/forms","rxjs/Observable","rxjs/Subject","@angular/common","@angular/http","rxjs/add/operator/toPromise"],e):e(t["ngx-forge"]=t["ngx-forge"]||{},t.ng.core,t._angular_platformBrowser,t._angular_forms,t.Rx,t.Rx,t._angular_common,t.ng.http)}(this,function(t,e,n,o,r,i,c,u){"use strict";var s=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a=function(){function t(){this.state=new f}return Object.defineProperty(t.prototype,"messages",{get:function(){return this._messages||(this._messages=[]),this._messages},set:function(t){this._messages=t},enumerable:!0,configurable:!0}),t}(),p=function(){function t(){}return t}(),f=function(){function t(){}return t}(),l=function(){function t(t){t&&(this.name=t.name,this.value=t.value)}return t}(),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(l),d=function(){function t(){}return t}(),y=function(){function t(){}return t}(),g=function(){function t(t){this.message=t}return t}(),m=function(){function t(){}return t}(),v=function(){function t(){}return t}(),b=function(){function t(t,e){this.messageKey=t,this.message=e}return t}(),j=function(){function t(t){this.description=t}return t}(),O=function(){function t(){}return t}();!function(t){t[t.ERROR=0]="ERROR",t[t.WARN=1]="WARN",t[t.INFO=2]="INFO"}(t.Error||(t.Error={}));var R=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c};t.History=function(){function t(){this.state=[]}return t.prototype.add=function(t){this.state.push(t),t.stepIndex=this.stepIndex},t.prototype.done=function(){this.ready=!0},t.prototype.apply=function(t){if(null!=t){var e=JSON.parse(atob(t));if(e.inputs)for(var n=0,o=e.inputs;n<o.length;n++)for(var r=o[n],i=0,c=this.state;i<c.length;i++)for(var u=c[i],s=0,a=u.inputs;s<a.length;s++){var p=a[s];p.name===r.name&&(p.value=r.value)}}},t.prototype.get=function(t){return this.state[t-1]},Object.defineProperty(t.prototype,"currentGui",{get:function(){return this.ready?this.state[this.stepIndex-1]:new a},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stepIndex",{get:function(){return Math.max(0,this.state.length)},enumerable:!0,configurable:!0}),t.prototype.resetTo=function(t){this.ready=!1,this.state.splice(t,this.state.length)},t.prototype.convert=function(t){void 0===t&&(t=this.stepIndex-1);var e=new a;e.stepIndex=t,e.inputs=[];for(var n=0,o=this.state;n<o.length;n++){var r=o[n],i=r.inputs;if(i){var c=this.convertToSubmittable(i);e.inputs=e.inputs.concat(c)}}return e},t.prototype.toString=function(){return btoa(JSON.stringify(this.convert()))},t.prototype.convertToSubmittable=function(t){var e=[];if(t)for(var n=0,o=t;n<o.length;n++){var r=o[n];e.push(new h(r))}return e},t}(),t.History=R([e.Injectable()],t.History);var S=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},_=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},I=[],P=require("asciidoctor.js")();t.AsciidocService=function(){function t(t,e){this.domSanitizer=t,this.history=e,this.defaultOptions={safe:"unsafe",sourceHighlighter:"highlightjs"}}return t.prototype.generateHtml=function(t){if(!I.hasOwnProperty(t))return console.warn("docId: '"+t+"' not valid"),"";var e="";return this.history.convert().inputs.forEach(function(t){e+=":"+t.name+": "+t.value+"\n"}),P.convert(e+I["document-attributes"]+I[t],this.defaultOptions)},t.prototype.generateSafeHtml=function(t){return this.domSanitizer.bypassSecurityTrustHtml(this.generateHtml(t))},t}(),t.AsciidocService=S([e.Injectable(),_("design:paramtypes",[n.DomSanitizer,t.History])],t.AsciidocService);var x=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},w=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.AsciidocComponent=function(){function t(t){this.asciidoc=t,this.defaultOptions={safe:"unsafe",sourceHighlighter:"highlightjs"}}return t.prototype.generate=function(){return this.asciidoc.generateSafeHtml(this.docId)},t}(),x([e.Input(),w("design:type",String)],t.AsciidocComponent.prototype,"docId",void 0),t.AsciidocComponent=x([e.Component({selector:"la-asciidoc",template:"<span [innerHtml]='generate()'></span>"}),w("design:paramtypes",[t.AsciidocService])],t.AsciidocComponent);var A=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),C=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},E=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.InputComponent=F=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.keyUp=new i.Subject,e.searchMultiSelectSettings={enableSearch:!0,checkedStyle:"glyphicon",showUncheckAll:!0},e}return A(e,t),e.prototype.ngOnInit=function(){var t=this;this.changeOnKey&&this.keyUp.debounceTime(1e3).distinctUntilChanged().flatMap(function(t){return r.Observable.of(t).delay(500)}).subscribe(function(e){t.onChange(e)})},e.prototype.writeValue=function(e){e&&e.value&&(this.input.value=e.value),t.prototype.writeValue.call(this,e)},e.prototype.change=function(){this.changeOnKey||this.onChange(this.input.value)},e.prototype.messageForInput=function(t){var e;if(!this.messages)return null;for(var n=0,o=this.messages;n<o.length;n++){var r=o[n];r.input===t&&(e=r)}return e},e.prototype.convertToOptions=function(t){for(var e=[],n=0,o=t;n<o.length;n++){var r=o[n];e.push({id:r,name:r})}return e},e}(o.DefaultValueAccessor),C([e.Input("ngModel"),E("design:type",h)],t.InputComponent.prototype,"input",void 0),C([e.Input(),E("design:type",Array)],t.InputComponent.prototype,"messages",void 0),C([e.Input(),E("design:type",Boolean)],t.InputComponent.prototype,"changeOnKey",void 0),t.InputComponent=F=C([e.Component({selector:"la-input",templateUrl:"input.component.html",styleUrls:["input.component.scss"],providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return F}),multi:!0}]})],t.InputComponent);var F,H=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e}(h),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e}(Option),U=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),D=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},T=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},q={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return t.ProjectSelect}),multi:!0};t.ProjectSelect=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return U(e,t),e.prototype.writeValue=function(t){void 0!==t&&(this.model=t)},e.prototype.className=function(t){var e=t.id.indexOf(" ");return e=e===-1?t.id.indexOf("."):e,t.id.substr(0,e).replace(/\./,"-")},e.prototype.isSelected=function(t){return this.model===t.id},e.prototype.setSelected=function(t){this.model=t.id,this.onChange(this.model)},e}(o.DefaultValueAccessor),D([e.Input(),T("design:type",h)],t.ProjectSelect.prototype,"input",void 0),t.ProjectSelect=D([e.Component({selector:"ob-project-select",providers:[q],templateUrl:"./project-select.component.html",styleUrls:["./project-select.component.less"]})],t.ProjectSelect);var V=function(){function t(){}return t}();V=D([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:[t.ProjectSelect],declarations:[t.ProjectSelect]})],V);var L=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},k=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.Config=function(){function t(t){this.http=t}return t.prototype.load=function(t){var e=this;return void 0===t&&(t="settings.json"),this.http.get(t).toPromise().then(function(t){e.settings=t.json()}).catch(function(){return console.log("settings.json not found ignoring")})},t.prototype.set=function(t){this.settings=t},t.prototype.get=function(t){return this.settings[t]},t}(),t.Config=L([e.Injectable(),k("design:paramtypes",[u.Http])],t.Config);var G=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},K=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.ForgeService=function(){function t(t,e){this.http=t,this.config=e,this.apiUrl=e.get("backend_url")}return t.prototype.version=function(){return this.http.get(this.apiUrl+"/version",this.options()).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.commandInfo=function(t){return this.http.get(this.apiUrl+"/commands/"+t,this.options()).retryWhen(function(t){return t.delay(3e3).scan(function(t,e,n){if(n)throw e})}).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.validate=function(t,e){return this.post(e.convert(),"/commands/"+t+"/validate")},t.prototype.nextStep=function(t,e){return this.post(e.convert(e.stepIndex),"/commands/"+t+"/next")},t.prototype.executeStep=function(t,e){return this.post(e.convert(e.stepIndex),"/commands/"+t+"/execute")},t.prototype.action=function(t){return this.post(t,"action")},t.prototype.loadGui=function(t,e){return 0===e.stepIndex?this.commandInfo(t):this.nextStep(t,e)},t.prototype.upload=function(t,e){return this.http.post(this.apiUrl+"/commands/"+t+"/missioncontrol",e.convert(),this.options()).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.downloadZip=function(t,e){var n=document.createElement("form");n.setAttribute("method","POST"),n.setAttribute("action",this.apiUrl+"/commands/"+t+"/zip"),n.appendChild(this.createFormInput("stepIndex",String(e.stepIndex)));for(var o=1;o<=e.stepIndex;o++){var r=e.get(o).inputs;if(r)for(var i=0,c=r;i<c.length;i++){var u=c[i];if(u.value instanceof Array)for(var s=0,a=u.value;s<a.length;s++){var p=a[s];n.appendChild(this.createFormInput(u.name,p))}else n.appendChild(this.createFormInput(u.name,u.value))}}document.body.appendChild(n),n.submit()},t.prototype.createFormInput=function(t,e){var n=document.createElement("input");return n.setAttribute("type","hidden"),n.setAttribute("name",t),n.setAttribute("value",e),n},t.prototype.post=function(t,e){return this.http.post(this.apiUrl+e,t,this.options()).retryWhen(function(t){return t.delay(3e3).scan(function(t,e,n){if(n)throw e})}).toPromise().then(function(t){return t.json()}).catch(this.handleError)},t.prototype.handleError=function(t){return console.error("An error occurred",t),t.statusText?Promise.reject(t.json()):Promise.reject(t.message||"Error calling service")},t.prototype.options=function(){var t=new u.Headers;return this.filters&&t.append("X-LAUNCHPAD_BACKEND_LABEL_FILTERS",this.filters),{headers:t}},t}(),t.ForgeService=G([e.Injectable(),K("design:paramtypes",[u.Http,t.Config])],t.ForgeService);var z=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},B=[t.AsciidocComponent,t.InputComponent,t.ProjectSelect];t.NgxForgeModule=function(){function t(){}return t}(),t.NgxForgeModule=z([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:B,declarations:B,providers:[t.ForgeService,t.AsciidocService,t.History,{provide:e.APP_INITIALIZER,useFactory:function(t){return function(){return t.load()}},deps:[t.Config],multi:!0}]})],t.NgxForgeModule),t.Gui=a,t.MetaData=p,t.State=f,t.SubmittableInput=l,t.Input=h,t.Option=d,t.DownloadFile=y,t.Result=g,t.StatusResult=m,t.StatusEvent=v,t.StatusMessage=b,t.Message=j,t.Version=O,t.OpenshiftIOInput=M,t.OpenshiftIOOption=N,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -20,4 +20,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

InputComponent,
ProjectSelect,
History
ProjectSelect
];

@@ -37,2 +36,3 @@ var NgxForgeModule = (function () {

AsciidocService,
History,
{ provide: APP_INITIALIZER, useFactory: function (config) { return function () { return config.load(); }; }, deps: [Config], multi: true }

@@ -39,0 +39,0 @@ ]

{
"name": "ngx-forge",
"version": "0.0.8-development",
"version": "0.0.9-development",
"description": "Forge services for Angular v2 and up",

@@ -5,0 +5,0 @@ "main": "bundles/ngx-forge.umd.js",

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