@bullhorn/connect
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -78,2 +78,3 @@ export declare enum AppBridgeHandler { | ||
refresh(packet?: object): Promise<boolean>; | ||
ping(): Promise<boolean>; | ||
/** | ||
@@ -80,0 +81,0 @@ * Fires or responds to a pin event |
@@ -1,1 +0,1 @@ | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.bhconnect={})}(this,function(i){"use strict";(L=i.AppBridgeHandler||(i.AppBridgeHandler={}))[L.HTTP=0]="HTTP",L[L.OPEN=1]="OPEN",L[L.OPEN_LIST=2]="OPEN_LIST",L[L.CLOSE=3]="CLOSE",L[L.REFRESH=4]="REFRESH",L[L.PIN=5]="PIN",L[L.REGISTER=6]="REGISTER",L[L.UPDATE=7]="UPDATE",L[L.REQUEST_DATA=8]="REQUEST_DATA",L[L.CALLBACK=9]="CALLBACK",L[L.PING=10]="PING";var o="get",s="post",a="put",c="delete",u="register",p="open",h="openList",d="close",f="refresh",l="pin",r="ping",b="update",_="httpGET",y="httpPOST",v="httpPUT",w="httpDELETE",E="customEvent",g="requestData",m="callback",t=(e.prototype.create=function(t){return new n(t)},e);function e(){}var n=(Object.defineProperty(T.prototype,"tracing",{set:function(t){this._tracing=t},enumerable:!0,configurable:!0}),T.prototype.handle=function(t,r){this._handlers[t]=r},T.prototype._trace=function(t,r){this._tracing&&console.log("["+(this.traceName||this.id)+'] "'+t+'"',r)},T.prototype._setupHandlers=function(){var e=this;postRobot.on(u,function(t){return e._trace(u,t),e._registeredFrames.push(t),e.register(t.data).then(function(t){return{windowName:t}})}),postRobot.on(b,function(t){return e._trace(b,t),e.update(t.data).then(function(t){return{success:t}})}),postRobot.on(p,function(t){return e._trace(p,t),e.open(t.data).then(function(t){return{success:t}})}),postRobot.on(h,function(t){return e._trace(h,t),e.openList(t.data).then(function(t){return{success:t}})}),postRobot.on(d,function(r){e._trace(d,r);var t=e._registeredFrames.findIndex(function(t){return t.data.id===r.data.id});return-1!==t&&e._registeredFrames.splice(t,1),e.close(r.data).then(function(t){return{success:t}})}),postRobot.on(f,function(t){return e._trace(f,t),e.refresh(t.data).then(function(t){return{success:t}})}),postRobot.on(l,function(t){return e._trace(l,t),e.pin(t.data).then(function(t){return{success:t}})}),postRobot.on(r,function(t){return e._trace(r,t),e.httpGET("ping").then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(g,function(t){return e._trace(g,t),e.requestData(t.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(m,function(t){return e._trace(m,t),e.callback(t.data).then(function(t){return{success:t}})}),postRobot.on(_,function(t){return e._trace(_,t),e.httpGET(t.data.relativeURL).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(y,function(t){return e._trace(y,t),e.httpPOST(t.data.relativeURL,t.data.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(v,function(t){return e._trace(v,t),e.httpPUT(t.data.relativeURL,t.data.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(w,function(t){return e._trace(w,t),e.httpDELETE(t.data.relativeURL).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(E,function(r){e._trace(E,r),e._eventListeners[r.data.event]&&e._eventListeners[r.data.event].forEach(function(t){t(r.data.data)}),0<e._registeredFrames.length&&e._registeredFrames.forEach(function(t){postRobot.send(t.source,E,r.data)})})},T.prototype.open=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.OPEN]?n._handlers[i.AppBridgeHandler.OPEN](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(p,t).then(function(t){n._trace(p+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.openList=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.OPEN_LIST]?n._handlers[i.AppBridgeHandler.OPEN_LIST](t,function(t){t?r(!0):e(!1)}):(Object.assign({},{type:"List",entityType:t.type,keywords:t.keywords,criteria:t.criteria}),postRobot.sendToParent(h,t).then(function(t){n._trace(h+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.update=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.UPDATE]?n._handlers[i.AppBridgeHandler.UPDATE](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(b,t).then(function(t){n._trace(b+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.close=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.CLOSE]?o._handlers[i.AppBridgeHandler.CLOSE](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - close(packet) is deprecated! Please just use close()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(d,t).then(function(t){o._trace(d+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.refresh=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.REFRESH]?o._handlers[i.AppBridgeHandler.REFRESH](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - refresh(packet) is deprecated! Please just use refresh()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(f,t).then(function(t){o._trace(f+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.pin=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.PIN]?o._handlers[i.AppBridgeHandler.PIN](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - pin(packet) is deprecated! Please just use pin()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(l,t).then(function(t){o._trace(l+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.requestData=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.REQUEST_DATA]?n._handlers[i.AppBridgeHandler.REQUEST_DATA](t,function(t){t?r({data:t}):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(g,t).then(function(t){n._trace(g+" (callback)",t),t.data?r({data:t.data.data}):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.callback=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.CALLBACK]?n._handlers[i.AppBridgeHandler.CALLBACK](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(m,t).then(function(t){n._trace(m+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.register=function(e){var n=this;return void 0===e&&(e={}),new Promise(function(r,t){n._handlers[i.AppBridgeHandler.REGISTER]?n._handlers[i.AppBridgeHandler.REGISTER](e,function(t){r(t||null)}):(Object.assign(e,{id:n.id}),postRobot.sendToParent(u,e).then(function(t){n._trace(u+" (callback)",t),t.data?(n.windowName=t.data.windowName,r(t.data.windowName)):r(null)}).catch(function(t){n._trace(u+" - FAILED - (no parent)",t),r(null)}))})},T.prototype.httpGET=function(t){var n=this;return new Promise(function(e,r){n._handlers[i.AppBridgeHandler.HTTP]?n._handlers[i.AppBridgeHandler.HTTP]({verb:o,relativeURL:t},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(_,{relativeURL:t}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpPOST=function(t,n){var o=this;return new Promise(function(e,r){o._handlers[i.AppBridgeHandler.HTTP]?o._handlers[i.AppBridgeHandler.HTTP]({verb:s,relativeURL:t,data:n},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(y,{relativeURL:t,data:n}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpPUT=function(t,n){var o=this;return new Promise(function(e,r){o._handlers[i.AppBridgeHandler.HTTP]?o._handlers[i.AppBridgeHandler.HTTP]({verb:a,relativeURL:t,data:n},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(v,{relativeURL:t,data:n}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpDELETE=function(t){var n=this;return new Promise(function(e,r){n._handlers[i.AppBridgeHandler.HTTP]?n._handlers[i.AppBridgeHandler.HTTP]({verb:c,relativeURL:t},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(w,{relativeURL:t}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.fireEvent=function(t,n){return new Promise(function(r,e){postRobot.sendToParent(E,{event:t,data:n}).then(function(t){r(t)}).catch(function(t){e(null)})})},T.prototype.fireEventToChildren=function(r,e){0<this._registeredFrames.length&&this._registeredFrames.forEach(function(t){postRobot.send(t.source,E,{event:r,eventType:r,data:e})})},T.prototype.fireEventToChild=function(t,r,e){t instanceof HTMLIFrameElement&&(t=t.contentWindow),postRobot.send(t,E,{event:r,data:e})},T.prototype.addEventListener=function(t,r){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(r)},T);function T(t){if(void 0===t&&(t="AppBridge"),this.id=""+Date.now(),this._registeredFrames=[],this._handlers={},this._tracing=!1,this._eventListeners={},this.traceName=t,postRobot){postRobot.CONFIG.LOG_LEVEL="error";try{this._setupHandlers()}catch(t){}}}var P=function(t,r){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};var R="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t,r){return t(r={exports:{}},r.exports),r.exports}var A="undefined"!=typeof window&&window,O="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,x=A||void 0!==R&&R||O,L=x;!function(){if(!x)throw new Error("RxJS could not find any global context (window, self, global)")}();var H={root:L};var j={isFunction:function(t){return"function"==typeof t}},B={isArray:Array.isArray||function(t){return t&&"number"==typeof t.length}};var U,N={isObject:function(t){return null!=t&&"object"==typeof t}},k={errorObject:{e:{}}};function C(){try{return U.apply(this,arguments)}catch(t){return k.errorObject.e=t,k.errorObject}}var F,D={tryCatch:function(t){return U=t,C}};function I(t){F.call(this),this.errors=t;t=Error.call(this,t?t.length+" errors occurred during unsubscription:\n "+t.map(function(t,r){return r+1+") "+t.toString()}).join("\n "):"");this.name=t.name="UnsubscriptionError",this.stack=t.stack,this.message=t.message}var G={UnsubscriptionError:(F=Error,(R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)})(I,F),I)};function $(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}function M(t){return t.reduce(function(t,r){return t.concat(r instanceof G.UnsubscriptionError?r.errors:r)},[])}var V,O={Subscription:($.prototype.unsubscribe=function(){var t,r=!1;if(!this.closed){var e=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=n?n.length:0;e;)e.remove(this),e=++s<a&&n[s]||null;if(j.isFunction(o)&&D.tryCatch(o).call(this)===k.errorObject&&(r=!0,t=t||(k.errorObject.e instanceof G.UnsubscriptionError?M(k.errorObject.e.errors):[k.errorObject.e])),B.isArray(i))for(s=-1,a=i.length;++s<a;){var c=i[s];N.isObject(c)&&D.tryCatch(c.unsubscribe).call(c)===k.errorObject&&(r=!0,t=t||[],(c=k.errorObject.e)instanceof G.UnsubscriptionError?t=t.concat(M(c.errors)):t.push(c))}if(r)throw new G.UnsubscriptionError(t)}},$.prototype.add=function(t){if(!t||t===$.EMPTY)return $.EMPTY;if(t===this)return this;var r,e=t;switch(typeof t){case"function":e=new $(t);case"object":if(e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;"function"!=typeof e._addParent&&(r=e,(e=new $)._subscriptions=[r]);break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(e),e._addParent(this),e},$.prototype.remove=function(t){var r=this._subscriptions;!r||-1!==(t=r.indexOf(t))&&r.splice(t,1)},$.prototype._addParent=function(t){var r=this._parent,e=this._parents;r&&r!==t?e?-1===e.indexOf(t)&&e.push(t):this._parents=[t]:this._parent=t},$.EMPTY=((A=new $).closed=!0,A),$)},K={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}},Q=S(function(t,r){var e=H.root.Symbol;r.rxSubscriber="function"==typeof e&&"function"==typeof e.for?e.for("rxSubscriber"):"@@rxSubscriber",r.$$rxSubscriber=r.rxSubscriber}),L=(Q.rxSubscriber,Q.$$rxSubscriber,R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),q=(L(W,V=O.Subscription),W.prototype[Q.rxSubscriber]=function(){return this},W.create=function(t,r,e){e=new W(t,r,e);return e.syncErrorThrowable=!1,e},W.prototype.next=function(t){this.isStopped||this._next(t)},W.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},W.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},W.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,V.prototype.unsubscribe.call(this))},W.prototype._next=function(t){this.destination.next(t)},W.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},W.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},W.prototype._unsubscribeAndRecycle=function(){var t=this._parent,r=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=r,this},W);function W(t,r,e){switch(V.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=K;break;case 1:if(!t){this.destination=K;break}if("object"==typeof t){(n=t)instanceof q||"syncErrorThrowable"in n&&n[Q.rxSubscriber]?(n=t[Q.rxSubscriber](),this.syncErrorThrowable=n.syncErrorThrowable,(this.destination=n).add(this)):(this.syncErrorThrowable=!0,this.destination=new J(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new J(this,t,r,e)}var n}var Y,A=q,J=(L(z,Y=q),z.prototype.next=function(t){var r;!this.isStopped&&this._next&&((r=this._parentSubscriber).syncErrorThrowable?this.__tryOrSetError(r,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t))},z.prototype.error=function(t){if(!this.isStopped){var r=this._parentSubscriber;if(this._error)r.syncErrorThrowable?this.__tryOrSetError(r,this._error,t):this.__tryOrUnsub(this._error,t),this.unsubscribe();else{if(!r.syncErrorThrowable)throw this.unsubscribe(),t;r.syncErrorValue=t,r.syncErrorThrown=!0,this.unsubscribe()}}},z.prototype.complete=function(){var t,r,e=this;this.isStopped||(t=this._parentSubscriber,this._complete&&(r=function(){return e._complete.call(e._context)},t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r)),this.unsubscribe())},z.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(t){throw this.unsubscribe(),t}},z.prototype.__tryOrSetError=function(r,t,e){try{t.call(this._context,e)}catch(t){return r.syncErrorValue=t,r.syncErrorThrown=!0}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z);function z(t,r,e,n){var o;Y.call(this),this._parentSubscriber=t;t=this;j.isFunction(r)?o=r:r&&(o=r.next,e=r.error,n=r.complete,r!==K&&(t=Object.create(r),j.isFunction(t.unsubscribe)&&this.add(t.unsubscribe.bind(t)),t.unsubscribe=this.unsubscribe.bind(this))),this._context=t,this._next=o,this._error=e,this._complete=n}var X={Subscriber:A};var Z={toSubscriber:function(t,r,e){if(t){if(t instanceof X.Subscriber)return t;if(t[Q.rxSubscriber])return t[Q.rxSubscriber]()}return t||r||e?new X.Subscriber(t,r,e):new X.Subscriber(K)}},O=S(function(t,r){function e(t){var r,t=t.Symbol;return"function"==typeof t?t.observable?r=t.observable:(r=t("observable"),t.observable=r):r="@@observable",r}r.getSymbolObservable=e,r.observable=e(H.root),r.$$observable=r.observable});O.getSymbolObservable,O.observable,O.$$observable;var tt={noop:function(){}};function rt(r){return r?1===r.length?r[0]:function(t){return r.reduce(function(t,r){return r(t)},t)}:tt.noop}var et={pipe:function(){for(var t=[],r=0;r<arguments.length;r++)t[+r]=arguments[r];return rt(t)},pipeFromArray:rt};function nt(t){this._isScalar=!1,t&&(this._subscribe=t)}L={Observable:(nt.prototype.lift=function(t){var r=new nt;return r.source=this,r.operator=t,r},nt.prototype.subscribe=function(t,r,e){var n=this.operator,e=Z.toSubscriber(t,r,e);if(n?n.call(e,this.source):e.add(this.source||!e.syncErrorThrowable?this._subscribe(e):this._trySubscribe(e)),e.syncErrorThrowable&&(e.syncErrorThrowable=!1,e.syncErrorThrown))throw e.syncErrorValue;return e},nt.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.syncErrorThrown=!0,r.syncErrorValue=t,r.error(t)}},nt.prototype.forEach=function(n,t){var o=this;if(t||(H.root.Rx&&H.root.Rx.config&&H.root.Rx.config.Promise?t=H.root.Rx.config.Promise:H.root.Promise&&(t=H.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var e=o.subscribe(function(t){if(e)try{n(t)}catch(t){r(t),e.unsubscribe()}else n(t)},r,t)})},nt.prototype._subscribe=function(t){return this.source.subscribe(t)},nt.prototype[O.observable]=function(){return this},nt.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[+r]=arguments[r];return 0===t.length?this:et.pipeFromArray(t)(this)},nt.prototype.toPromise=function(t){var n=this;if(t||(H.root.Rx&&H.root.Rx.config&&H.root.Rx.config.Promise?t=H.root.Rx.config.Promise:H.root.Promise&&(t=H.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var e;n.subscribe(function(t){return e=t},function(t){return r(t)},function(){return t(e)})})},nt.create=function(t){return new nt(t)},nt)},A=R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)};var O=function(r,e){return function(t){if("function"!=typeof r)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return t.lift(new ot(r,e))}},ot=(it.prototype.call=function(t,r){return r.subscribe(new at(t,this.project,this.thisArg))},it);function it(t,r){this.project=t,this.thisArg=r}var st,R=ot,at=(st=X.Subscriber,A(ct,st),ct.prototype._next=function(t){var r;try{r=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(r)},ct);function ct(t,r,e){st.call(this,t),this.project=r,this.count=0,this.thisArg=e||this}var ut={map:O,MapOperator:R};R={map:function(t,r){return ut.map(t,r)(this)}};L.Observable.prototype.map=R.map;pt.prototype.create=function(t){return new lt(t,this.http)},R=pt;function pt(t){this.http=t}var ht,dt,ft,lt=(P(dt=_t,ft=ht=n),dt.prototype=null===ft?Object.create(ft):(bt.prototype=ft.prototype,new bt),_t.prototype._setupHandlers=function(){},_t.prototype.httpGET=function(t){return this.http.get(this.baseURL+"/"+t,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpPOST=function(t,r){return this.http.post(this.baseURL+"/"+t,r,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpPUT=function(t,r){return this.http.put(this.baseURL+"/"+t,r,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpDELETE=function(t){return this.http.delete(this.baseURL+"/"+t,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.getCookie=function(t){if(document)for(var r=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(r))return o.substring(r.length,o.length)}return!1},_t);function bt(){this.constructor=dt}function _t(t,r){void 0===t&&(t="DevAppBridge");t=ht.call(this,t)||this;t.http=r;r=t.getCookie("UlEncodedIdentity");return r&&r.length&&(r=JSON.parse(decodeURIComponent(r)).sessions.reduce(function(t,r){return t[r.name]=r.value.endpoint,t},{}),t.baseURL=r.rest),t}i.AppBridgeService=t,i.AppBridge=n,i.DevAppBridgeService=R,i.DevAppBridge=lt,Object.defineProperty(i,"__esModule",{value:!0})}); | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.bhconnect={})}(this,function(i){"use strict";(L=i.AppBridgeHandler||(i.AppBridgeHandler={}))[L.HTTP=0]="HTTP",L[L.OPEN=1]="OPEN",L[L.OPEN_LIST=2]="OPEN_LIST",L[L.CLOSE=3]="CLOSE",L[L.REFRESH=4]="REFRESH",L[L.PIN=5]="PIN",L[L.REGISTER=6]="REGISTER",L[L.UPDATE=7]="UPDATE",L[L.REQUEST_DATA=8]="REQUEST_DATA",L[L.CALLBACK=9]="CALLBACK",L[L.PING=10]="PING";var o="get",s="post",a="put",c="delete",u="register",p="open",d="openList",h="close",f="refresh",l="pin",n="ping",b="update",_="httpGET",y="httpPOST",v="httpPUT",w="httpDELETE",E="customEvent",g="requestData",m="callback",t=(r.prototype.create=function(t){return new e(t)},r);function r(){}var e=(Object.defineProperty(T.prototype,"tracing",{set:function(t){this._tracing=t},enumerable:!0,configurable:!0}),T.prototype.handle=function(t,r){this._handlers[t]=r},T.prototype._trace=function(t,r){this._tracing&&console.log("["+(this.traceName||this.id)+'] "'+t+'"',r)},T.prototype._setupHandlers=function(){var e=this;postRobot.on(u,function(t){return e._trace(u,t),e._registeredFrames.push(t),e.register(t.data).then(function(t){return{windowName:t}})}),postRobot.on(b,function(t){return e._trace(b,t),e.update(t.data).then(function(t){return{success:t}})}),postRobot.on(p,function(t){return e._trace(p,t),e.open(t.data).then(function(t){return{success:t}})}),postRobot.on(d,function(t){return e._trace(d,t),e.openList(t.data).then(function(t){return{success:t}})}),postRobot.on(h,function(r){e._trace(h,r);var t=e._registeredFrames.findIndex(function(t){return t.data.id===r.data.id});return-1!==t&&e._registeredFrames.splice(t,1),e.close(r.data).then(function(t){return{success:t}})}),postRobot.on(f,function(t){return e._trace(f,t),e.refresh(t.data).then(function(t){return{success:t}})}),postRobot.on(l,function(t){return e._trace(l,t),e.pin(t.data).then(function(t){return{success:t}})}),postRobot.on(n,function(t){return e._trace(n,t),e.httpGET("ping").then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(g,function(t){return e._trace(g,t),e.requestData(t.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(m,function(t){return e._trace(m,t),e.callback(t.data).then(function(t){return{success:t}})}),postRobot.on(_,function(t){return e._trace(_,t),e.httpGET(t.data.relativeURL).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(y,function(t){return e._trace(y,t),e.httpPOST(t.data.relativeURL,t.data.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(v,function(t){return e._trace(v,t),e.httpPUT(t.data.relativeURL,t.data.data).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(w,function(t){return e._trace(w,t),e.httpDELETE(t.data.relativeURL).then(function(t){return{data:t.data,error:t.error}})}),postRobot.on(E,function(r){e._trace(E,r),e._eventListeners[r.data.event]&&e._eventListeners[r.data.event].forEach(function(t){t(r.data.data)}),0<e._registeredFrames.length&&e._registeredFrames.forEach(function(t){postRobot.send(t.source,E,r.data)})})},T.prototype.open=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.OPEN]?n._handlers[i.AppBridgeHandler.OPEN](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(p,t).then(function(t){n._trace(p+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.openList=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.OPEN_LIST]?n._handlers[i.AppBridgeHandler.OPEN_LIST](t,function(t){t?r(!0):e(!1)}):(Object.assign({},{type:"List",entityType:t.type,keywords:t.keywords,criteria:t.criteria}),postRobot.sendToParent(d,t).then(function(t){n._trace(d+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.update=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.UPDATE]?n._handlers[i.AppBridgeHandler.UPDATE](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(b,t).then(function(t){n._trace(b+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.close=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.CLOSE]?o._handlers[i.AppBridgeHandler.CLOSE](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - close(packet) is deprecated! Please just use close()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(h,t).then(function(t){o._trace(h+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.refresh=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.REFRESH]?o._handlers[i.AppBridgeHandler.REFRESH](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - refresh(packet) is deprecated! Please just use refresh()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(f,t).then(function(t){o._trace(f+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.ping=function(){var t=this;return new Promise(function(e,r){t._handlers[i.AppBridgeHandler.PING]?t._handlers[i.AppBridgeHandler.PING]({},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(n,{}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.pin=function(n){var o=this;return new Promise(function(r,e){var t;o._handlers[i.AppBridgeHandler.PIN]?o._handlers[i.AppBridgeHandler.PIN](n,function(t){t?r(!0):e(!1)}):(n&&console.info("[AppBridge] - pin(packet) is deprecated! Please just use pin()!"),t={id:o.id,windowName:o.windowName},postRobot.sendToParent(l,t).then(function(t){o._trace(l+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.requestData=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.REQUEST_DATA]?n._handlers[i.AppBridgeHandler.REQUEST_DATA](t,function(t){t?r({data:t}):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(g,t).then(function(t){n._trace(g+" (callback)",t),t.data?r({data:t.data.data}):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.callback=function(t){var n=this;return new Promise(function(r,e){n._handlers[i.AppBridgeHandler.CALLBACK]?n._handlers[i.AppBridgeHandler.CALLBACK](t,function(t){t?r(!0):e(!1)}):(Object.assign(t,{id:n.id,windowName:n.windowName}),postRobot.sendToParent(m,t).then(function(t){n._trace(m+" (callback)",t),t.data?r(!0):e(!1)}).catch(function(t){e(!1)}))})},T.prototype.register=function(e){var n=this;return void 0===e&&(e={}),new Promise(function(r,t){n._handlers[i.AppBridgeHandler.REGISTER]?n._handlers[i.AppBridgeHandler.REGISTER](e,function(t){r(t||null)}):(Object.assign(e,{id:n.id}),postRobot.sendToParent(u,e).then(function(t){n._trace(u+" (callback)",t),t.data?(n.windowName=t.data.windowName,r(t.data.windowName)):r(null)}).catch(function(t){n._trace(u+" - FAILED - (no parent)",t),r(null)}))})},T.prototype.httpGET=function(t){var n=this;return new Promise(function(e,r){n._handlers[i.AppBridgeHandler.HTTP]?n._handlers[i.AppBridgeHandler.HTTP]({verb:o,relativeURL:t},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(_,{relativeURL:t}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpPOST=function(t,n){var o=this;return new Promise(function(e,r){o._handlers[i.AppBridgeHandler.HTTP]?o._handlers[i.AppBridgeHandler.HTTP]({verb:s,relativeURL:t,data:n},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(y,{relativeURL:t,data:n}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpPUT=function(t,n){var o=this;return new Promise(function(e,r){o._handlers[i.AppBridgeHandler.HTTP]?o._handlers[i.AppBridgeHandler.HTTP]({verb:a,relativeURL:t,data:n},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(v,{relativeURL:t,data:n}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.httpDELETE=function(t){var n=this;return new Promise(function(e,r){n._handlers[i.AppBridgeHandler.HTTP]?n._handlers[i.AppBridgeHandler.HTTP]({verb:c,relativeURL:t},function(t,r){e({data:t,error:r})}):postRobot.sendToParent(w,{relativeURL:t}).then(function(t){e({data:t.data.data,error:t.data.error})}).catch(function(t){r(null)})})},T.prototype.fireEvent=function(t,n){return new Promise(function(r,e){postRobot.sendToParent(E,{event:t,data:n}).then(function(t){r(t)}).catch(function(t){e(null)})})},T.prototype.fireEventToChildren=function(r,e){0<this._registeredFrames.length&&this._registeredFrames.forEach(function(t){postRobot.send(t.source,E,{event:r,eventType:r,data:e})})},T.prototype.fireEventToChild=function(t,r,e){t instanceof HTMLIFrameElement&&(t=t.contentWindow),postRobot.send(t,E,{event:r,data:e})},T.prototype.addEventListener=function(t,r){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(r)},T);function T(t){if(void 0===t&&(t="AppBridge"),this.id=""+Date.now(),this._registeredFrames=[],this._handlers={},this._tracing=!1,this._eventListeners={},this.traceName=t,postRobot){postRobot.CONFIG.LOG_LEVEL="error";try{this._setupHandlers()}catch(t){}}}var P=function(t,r){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};var R="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t,r){return t(r={exports:{}},r.exports),r.exports}var A="undefined"!=typeof window&&window,O="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,x=A||void 0!==R&&R||O,L=x;!function(){if(!x)throw new Error("RxJS could not find any global context (window, self, global)")}();var H={root:L};var B={isFunction:function(t){return"function"==typeof t}},j={isArray:Array.isArray||function(t){return t&&"number"==typeof t.length}};var U,N={isObject:function(t){return null!=t&&"object"==typeof t}},k={errorObject:{e:{}}};function C(){try{return U.apply(this,arguments)}catch(t){return k.errorObject.e=t,k.errorObject}}var I,F={tryCatch:function(t){return U=t,C}};function D(t){I.call(this),this.errors=t;t=Error.call(this,t?t.length+" errors occurred during unsubscription:\n "+t.map(function(t,r){return r+1+") "+t.toString()}).join("\n "):"");this.name=t.name="UnsubscriptionError",this.stack=t.stack,this.message=t.message}var G={UnsubscriptionError:(I=Error,(R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)})(D,I),D)};function $(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}function M(t){return t.reduce(function(t,r){return t.concat(r instanceof G.UnsubscriptionError?r.errors:r)},[])}var V,O={Subscription:($.prototype.unsubscribe=function(){var t,r=!1;if(!this.closed){var e=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=n?n.length:0;e;)e.remove(this),e=++s<a&&n[s]||null;if(B.isFunction(o)&&F.tryCatch(o).call(this)===k.errorObject&&(r=!0,t=t||(k.errorObject.e instanceof G.UnsubscriptionError?M(k.errorObject.e.errors):[k.errorObject.e])),j.isArray(i))for(s=-1,a=i.length;++s<a;){var c=i[s];N.isObject(c)&&F.tryCatch(c.unsubscribe).call(c)===k.errorObject&&(r=!0,t=t||[],(c=k.errorObject.e)instanceof G.UnsubscriptionError?t=t.concat(M(c.errors)):t.push(c))}if(r)throw new G.UnsubscriptionError(t)}},$.prototype.add=function(t){if(!t||t===$.EMPTY)return $.EMPTY;if(t===this)return this;var r,e=t;switch(typeof t){case"function":e=new $(t);case"object":if(e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;"function"!=typeof e._addParent&&(r=e,(e=new $)._subscriptions=[r]);break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(e),e._addParent(this),e},$.prototype.remove=function(t){var r=this._subscriptions;!r||-1!==(t=r.indexOf(t))&&r.splice(t,1)},$.prototype._addParent=function(t){var r=this._parent,e=this._parents;r&&r!==t?e?-1===e.indexOf(t)&&e.push(t):this._parents=[t]:this._parent=t},$.EMPTY=((A=new $).closed=!0,A),$)},K={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}},Q=S(function(t,r){var e=H.root.Symbol;r.rxSubscriber="function"==typeof e&&"function"==typeof e.for?e.for("rxSubscriber"):"@@rxSubscriber",r.$$rxSubscriber=r.rxSubscriber}),L=(Q.rxSubscriber,Q.$$rxSubscriber,R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),q=(L(W,V=O.Subscription),W.prototype[Q.rxSubscriber]=function(){return this},W.create=function(t,r,e){e=new W(t,r,e);return e.syncErrorThrowable=!1,e},W.prototype.next=function(t){this.isStopped||this._next(t)},W.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},W.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},W.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,V.prototype.unsubscribe.call(this))},W.prototype._next=function(t){this.destination.next(t)},W.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},W.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},W.prototype._unsubscribeAndRecycle=function(){var t=this._parent,r=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=r,this},W);function W(t,r,e){switch(V.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=K;break;case 1:if(!t){this.destination=K;break}if("object"==typeof t){(n=t)instanceof q||"syncErrorThrowable"in n&&n[Q.rxSubscriber]?(n=t[Q.rxSubscriber](),this.syncErrorThrowable=n.syncErrorThrowable,(this.destination=n).add(this)):(this.syncErrorThrowable=!0,this.destination=new J(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new J(this,t,r,e)}var n}var Y,A=q,J=(L(z,Y=q),z.prototype.next=function(t){var r;!this.isStopped&&this._next&&((r=this._parentSubscriber).syncErrorThrowable?this.__tryOrSetError(r,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t))},z.prototype.error=function(t){if(!this.isStopped){var r=this._parentSubscriber;if(this._error)r.syncErrorThrowable?this.__tryOrSetError(r,this._error,t):this.__tryOrUnsub(this._error,t),this.unsubscribe();else{if(!r.syncErrorThrowable)throw this.unsubscribe(),t;r.syncErrorValue=t,r.syncErrorThrown=!0,this.unsubscribe()}}},z.prototype.complete=function(){var t,r,e=this;this.isStopped||(t=this._parentSubscriber,this._complete&&(r=function(){return e._complete.call(e._context)},t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r)),this.unsubscribe())},z.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(t){throw this.unsubscribe(),t}},z.prototype.__tryOrSetError=function(r,t,e){try{t.call(this._context,e)}catch(t){return r.syncErrorValue=t,r.syncErrorThrown=!0}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z);function z(t,r,e,n){var o;Y.call(this),this._parentSubscriber=t;t=this;B.isFunction(r)?o=r:r&&(o=r.next,e=r.error,n=r.complete,r!==K&&(t=Object.create(r),B.isFunction(t.unsubscribe)&&this.add(t.unsubscribe.bind(t)),t.unsubscribe=this.unsubscribe.bind(this))),this._context=t,this._next=o,this._error=e,this._complete=n}var X={Subscriber:A};var Z={toSubscriber:function(t,r,e){if(t){if(t instanceof X.Subscriber)return t;if(t[Q.rxSubscriber])return t[Q.rxSubscriber]()}return t||r||e?new X.Subscriber(t,r,e):new X.Subscriber(K)}},O=S(function(t,r){function e(t){var r,t=t.Symbol;return"function"==typeof t?t.observable?r=t.observable:(r=t("observable"),t.observable=r):r="@@observable",r}r.getSymbolObservable=e,r.observable=e(H.root),r.$$observable=r.observable});O.getSymbolObservable,O.observable,O.$$observable;var tt={noop:function(){}};function rt(r){return r?1===r.length?r[0]:function(t){return r.reduce(function(t,r){return r(t)},t)}:tt.noop}var et={pipe:function(){for(var t=[],r=0;r<arguments.length;r++)t[+r]=arguments[r];return rt(t)},pipeFromArray:rt};function nt(t){this._isScalar=!1,t&&(this._subscribe=t)}L={Observable:(nt.prototype.lift=function(t){var r=new nt;return r.source=this,r.operator=t,r},nt.prototype.subscribe=function(t,r,e){var n=this.operator,e=Z.toSubscriber(t,r,e);if(n?n.call(e,this.source):e.add(this.source||!e.syncErrorThrowable?this._subscribe(e):this._trySubscribe(e)),e.syncErrorThrowable&&(e.syncErrorThrowable=!1,e.syncErrorThrown))throw e.syncErrorValue;return e},nt.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.syncErrorThrown=!0,r.syncErrorValue=t,r.error(t)}},nt.prototype.forEach=function(n,t){var o=this;if(t||(H.root.Rx&&H.root.Rx.config&&H.root.Rx.config.Promise?t=H.root.Rx.config.Promise:H.root.Promise&&(t=H.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var e=o.subscribe(function(t){if(e)try{n(t)}catch(t){r(t),e.unsubscribe()}else n(t)},r,t)})},nt.prototype._subscribe=function(t){return this.source.subscribe(t)},nt.prototype[O.observable]=function(){return this},nt.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[+r]=arguments[r];return 0===t.length?this:et.pipeFromArray(t)(this)},nt.prototype.toPromise=function(t){var n=this;if(t||(H.root.Rx&&H.root.Rx.config&&H.root.Rx.config.Promise?t=H.root.Rx.config.Promise:H.root.Promise&&(t=H.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var e;n.subscribe(function(t){return e=t},function(t){return r(t)},function(){return t(e)})})},nt.create=function(t){return new nt(t)},nt)},A=R&&R.__extends||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);function n(){this.constructor=t}t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)};var O=function(r,e){return function(t){if("function"!=typeof r)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return t.lift(new ot(r,e))}},ot=(it.prototype.call=function(t,r){return r.subscribe(new at(t,this.project,this.thisArg))},it);function it(t,r){this.project=t,this.thisArg=r}var st,R=ot,at=(st=X.Subscriber,A(ct,st),ct.prototype._next=function(t){var r;try{r=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(r)},ct);function ct(t,r,e){st.call(this,t),this.project=r,this.count=0,this.thisArg=e||this}var ut={map:O,MapOperator:R};R={map:function(t,r){return ut.map(t,r)(this)}};L.Observable.prototype.map=R.map;pt.prototype.create=function(t){return new lt(t,this.http)},R=pt;function pt(t){this.http=t}var dt,ht,ft,lt=(P(ht=_t,ft=dt=e),ht.prototype=null===ft?Object.create(ft):(bt.prototype=ft.prototype,new bt),_t.prototype._setupHandlers=function(){},_t.prototype.httpGET=function(t){return this.http.get(this.baseURL+"/"+t,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpPOST=function(t,r){return this.http.post(this.baseURL+"/"+t,r,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpPUT=function(t,r){return this.http.put(this.baseURL+"/"+t,r,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.httpDELETE=function(t){return this.http.delete(this.baseURL+"/"+t,{withCredentials:!0}).map(function(t){return{data:t.json()}}).toPromise()},_t.prototype.getCookie=function(t){if(document)for(var r=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(r))return o.substring(r.length,o.length)}return!1},_t);function bt(){this.constructor=ht}function _t(t,r){void 0===t&&(t="DevAppBridge");t=dt.call(this,t)||this;t.http=r;r=t.getCookie("UlEncodedIdentity");return r&&r.length&&(r=JSON.parse(decodeURIComponent(r)).sessions.reduce(function(t,r){return t[r.name]=r.value.endpoint,t},{}),t.baseURL=r.rest),t}i.AppBridgeService=t,i.AppBridge=e,i.DevAppBridgeService=R,i.DevAppBridge=lt,Object.defineProperty(i,"__esModule",{value:!0})}); |
{ | ||
"name": "@bullhorn/connect", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Connector for intercommunication between bullhorn apps", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180642
4054