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.5-development to 0.0.6-development

15

bundles/ngx-forge.umd.js

@@ -215,3 +215,3 @@ (function (global, factory) {

var asciidoctor = require('asciidoctor.js')();
var AsciidocService = (function () {
exports.AsciidocService = (function () {
function AsciidocService(domSanitizer, history) {

@@ -242,6 +242,6 @@ this.domSanitizer = domSanitizer;

}());
AsciidocService = __decorate$1([
exports.AsciidocService = __decorate$1([
_angular_core.Injectable(),
__metadata$1("design:paramtypes", [_angular_platformBrowser.DomSanitizer, exports.History])
], AsciidocService);
], exports.AsciidocService);

@@ -279,3 +279,3 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {

}),
__metadata("design:paramtypes", [AsciidocService])
__metadata("design:paramtypes", [exports.AsciidocService])
], exports.AsciidocComponent);

@@ -552,2 +552,8 @@

};
ForgeService.prototype.executeStep = function (command, history) {
return this.post(history.convert(history.stepIndex), "/commands/" + command + "/execute");
};
ForgeService.prototype.action = function (gui) {
return this.post(gui, 'action');
};
ForgeService.prototype.loadGui = function (command, history) {

@@ -638,2 +644,3 @@ if (history.stepIndex === 0) {

exports.AsciidocComponent,
exports.AsciidocService,
exports.InputComponent,

@@ -640,0 +647,0 @@ exports.ProjectSelect,

@@ -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 _=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},P=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},S=[],I=require("asciidoctor.js")(),x=function(){function t(t,e){this.domSanitizer=t,this.history=e,this.defaultOptions={safe:"unsafe",sourceHighlighter:"highlightjs"}}return t.prototype.generateHtml=function(t){if(!S.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"}),I.convert(e+S["document-attributes"]+S[t],this.defaultOptions)},t.prototype.generateSafeHtml=function(t){return this.domSanitizer.bypassSecurityTrustHtml(this.generateHtml(t))},t}();x=_([e.Injectable(),P("design:paramtypes",[n.DomSanitizer,t.History])],x);var w=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},C=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}(),w([e.Input(),C("design:type",String)],t.AsciidocComponent.prototype,"docId",void 0),t.AsciidocComponent=w([e.Component({selector:"la-asciidoc",template:"<span [innerHtml]='generate()'></span>"}),C("design:paramtypes",[x])],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)}}(),E=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},F=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};t.InputComponent=H=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),E([e.Input("ngModel"),F("design:type",h)],t.InputComponent.prototype,"input",void 0),E([e.Input(),F("design:type",Array)],t.InputComponent.prototype,"messages",void 0),E([e.Input(),F("design:type",Boolean)],t.InputComponent.prototype,"changeOnKey",void 0),t.InputComponent=H=E([e.Component({selector:"la-input",templateUrl:"input.component.html",styleUrls:["input.component.scss"],providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return H}),multi:!0}]})],t.InputComponent);var H,M=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)}}(),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(h),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(Option),D=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)}}(),q=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)},V={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 D(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),q([e.Input(),T("design:type",h)],t.ProjectSelect.prototype,"input",void 0),t.ProjectSelect=q([e.Component({selector:"ob-project-select",providers:[V],templateUrl:"./project-select.component.html",styleUrls:["./project-select.component.less"]})],t.ProjectSelect);var L=function(){function t(){}return t}();L=q([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:[t.ProjectSelect],declarations:[t.ProjectSelect]})],L);var k=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},G=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=k([e.Injectable(),G("design:paramtypes",[u.Http])],t.Config);var K=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},z=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.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=K([e.Injectable(),z("design:paramtypes",[u.Http,t.Config])],t.ForgeService);var B=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=[t.AsciidocComponent,t.InputComponent,t.ProjectSelect,t.Config,t.ForgeService,t.History];t.NgxForgeModule=function(){function t(){}return t}(),t.NgxForgeModule=B([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:W,declarations:W})],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=U,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)},P=[],I=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(!P.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"}),I.convert(e+P["document-attributes"]+P[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 C=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(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 C(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),A([e.Input("ngModel"),E("design:type",h)],t.InputComponent.prototype,"input",void 0),A([e.Input(),E("design:type",Array)],t.InputComponent.prototype,"messages",void 0),A([e.Input(),E("design:type",Boolean)],t.InputComponent.prototype,"changeOnKey",void 0),t.InputComponent=F=A([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),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e}(Option),N=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},q=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},T={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 N(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(),q("design:type",h)],t.ProjectSelect.prototype,"input",void 0),t.ProjectSelect=D([e.Component({selector:"ob-project-select",providers:[T],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.AsciidocService,t.InputComponent,t.ProjectSelect,t.Config,t.ForgeService,t.History];t.NgxForgeModule=function(){function t(){}return t}(),t.NgxForgeModule=z([e.NgModule({imports:[c.CommonModule,o.FormsModule],exports:B,declarations:B})],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=U,Object.defineProperty(t,"__esModule",{value:!0})});
export { AsciidocComponent } from './src/app/asciidoc/asciidoc.component';
export { AsciidocService } from './src/app/asciidoc/asciidoc.service';
export { InputComponent } from './src/app/input/input.component';

@@ -3,0 +4,0 @@ export * from './src/app/model/base.model';

export { AsciidocComponent } from './src/app/asciidoc/asciidoc.component';
export { AsciidocService } from './src/app/asciidoc/asciidoc.service';
export { InputComponent } from './src/app/input/input.component';

@@ -3,0 +4,0 @@ export * from './src/app/model/base.model';

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

import { History } from './src/app/service/history.component';
import { AsciidocService } from './src/app/asciidoc/asciidoc.service';
var classes = [
AsciidocComponent,
AsciidocService,
InputComponent,

@@ -20,0 +22,0 @@ ProjectSelect,

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

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

import { Http } from '@angular/http';
export declare class Config {
private http;
private settings;
protected settings: any;
constructor(http: Http);

@@ -6,0 +6,0 @@ load(settingsLocation?: string): Promise<any>;

@@ -16,2 +16,4 @@ import 'rxjs/add/operator/toPromise';

nextStep(command: string, history: History): Promise<Gui>;
executeStep(command: string, history: History): Promise<Gui>;
action(gui: Gui): Promise<Gui>;
loadGui(command: string, history: History): Promise<Gui>;

@@ -18,0 +20,0 @@ upload(command: string, history: History): Promise<StatusResult>;

@@ -40,2 +40,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

};
ForgeService.prototype.executeStep = function (command, history) {
return this.post(history.convert(history.stepIndex), "/commands/" + command + "/execute");
};
ForgeService.prototype.action = function (gui) {
return this.post(gui, 'action');
};
ForgeService.prototype.loadGui = function (command, history) {

@@ -42,0 +48,0 @@ if (history.stepIndex === 0) {

import { Gui } from '../model/base.model';
export declare class History {
private state;
private ready;
state: Gui[];
ready: boolean;
add(gui: Gui): void;

@@ -6,0 +6,0 @@ done(): void;

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

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