bimplus-webclient 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.add=t():e.add=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{BimExplorer:()=>o,BimFilesIsoSelect:()=>u,BimFilesSelect:()=>r,BimModelsIsoSelect:()=>h,BimModelsSelect:()=>p,BimObjectProperties:()=>a,BimPortal:()=>i,BimTaskList:()=>l,BimTaskProperties:()=>d,ExportManager:()=>c,ExternalClient:()=>n,getUrlParameter:()=>g});var n=function e(t){this._messageHandlers={},this._clientName=t,e.prototype.initialize=function(){var e=this;window.addEventListener("message",(function(t){var n=t.data;""===n&&(n="{}"),e.messageReceived(JSON.parse(n))}))},e.prototype.addMessageHandler=function(e,t){this._messageHandlers[e]=t},e.prototype.removeMessageHandler=function(e){delete this._messageHandlers[e]},e.prototype.messageReceived=function(e){var t=this._messageHandlers[e.message];t&&t(e.data)},e.prototype.sendMessage=function(e,t,n){var s=document.getElementById(e);s&&s.contentWindow&&s.contentWindow.postMessage(JSON.stringify({messageType:"bimplusMessageIn",message:t,data:n}),"*")},e.prototype.getClientName=function(){return this._clientName}},s=function e(t,n){this._client=n,this._domId=t,e.prototype.sendMessage=function(e,t){this._client&&this._client.sendMessage(this._domId,e,t)},e.prototype.getDOMElementId=function(){return this._domId},e.prototype.initMessageHandlers=function(){},e.prototype.loadIFrame=function(e){var t=document.getElementById(this._domId);t?t.src=e:console.error("DOM Element not found: "+this._domId)}},i=function e(t,n,i,o){s.call(this,t,i),this.onTeamChanged=null,this.onProjectSelected=null,this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(){var e="https://portal";o&&("dev"===o&&(e+="-dev"),"stage"===o&&(e+="-stage"));var t=i?"&external_client=PostMessage:"+i.getClientName():"";return e+=".bimplus.net/?embedded=1&token="+n+t},e.prototype.load=function(){var e=this.getUrl();this.loadIFrame(e),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("TeamChanged",(function(t){e.onTeamChanged&&e.onTeamChanged(t.id)})),this._client.addMessageHandler("ProjectSelected",(function(t){e.onProjectSelected&&e.onProjectSelected(t.id)})),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};i.prototype=new s,i.prototype.constructor=s;var o=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onPinSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,this.onClickedHyperlink=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"),"localhost"===o&&(s="http://127.0.0.1:4200"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=o&&"localhost"===o?"/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e:".bimplus.net/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("PinSelected",(function(t){e.onPinSelected&&e.onPinSelected(t.id)})),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()})),this._client.addMessageHandler("ClickedHyperlink",(function(t){e.onClickedHyperlink&&e.onClickedHyperlink(t.url)}))},e.prototype.resetView=function(){this.sendMessage("ResetView")},e.prototype.centerObject=function(e,t){this.sendMessage("CenterObject",{id:e,flyTo:t})},e.prototype.selectPin=function(e){this.sendMessage("PinSelected",{id:e})},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.isolateObjects=function(e){this.sendMessage("ObjectsIsolated",{ids:e})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectStructure=function(e,t,n,s,i,o){this.sendMessage("StructureSelected",{id:e,visibleNodes:t,showAll:n,expandAll:s,hideUnreferencedTopology:i,isolate:o})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})},e.prototype.colorizeObjects=function(e,t){this.sendMessage("ColorizeObjects",{ids:e,color:t})}};o.prototype=new s,o.prototype.constructor=s;var l=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,e.prototype.getUrl=function(e,t,s){var l="https://portal";o&&("dev"===o&&(l+="-dev"),"stage"===o&&(l+="-stage"));var d=i?"&external_client=PostMessage:"+i.getClientName():"";return l+=".bimplus.net/viewer/?destination=EMBEDDED_ISSUE_LIST"+(s&&"string"==typeof s?"&source="+s:"")+"&embedded=1&token="+n+d+"/#/embeddedissuelist?project_id="+t+"&team_id="+e},e.prototype.load=function(e,t,n){var s=this.getUrl(e,t,n);this.loadIFrame(s),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()}))},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})}};l.prototype=new s,l.prototype.constructor=s;var d=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onPinSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,this.onClickedHyperlink=null,e.prototype.getUrl=function(e,t,s,l){var d="https://portal";o&&("dev"===o&&(d+="-dev"),"stage"===o&&(d+="-stage"));var a=i?"&external_client=PostMessage:"+i.getClientName():"";return d+=".bimplus.net/viewer/?destination=EMBEDDED_ISSUE"+(l&&"string"==typeof l?"&source="+l:"")+"&embedded=1&token="+n+a+"/#/embeddedissue?project_id="+t+"&issue_id="+s+"&team_id="+e},e.prototype.load=function(e,t,n,s){var i=this.getUrl(e,t,n,s);this.loadIFrame(i),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("PinSelected",(function(t){e.onPinSelected&&e.onPinSelected(t.id)})),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()})),this._client.addMessageHandler("ClickedHyperlink",(function(t){e.onClickedHyperlink&&e.onClickedHyperlink(t.url)}))},e.prototype.selectPin=function(e){this.sendMessage("PinSelected",{id:e})},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})}};d.prototype=new s,d.prototype.constructor=s;var a=function e(t,n,i,o){s.call(this,t,i),e.prototype.getUrl=function(e,t,s){var l="https://portal";o&&("dev"===o&&(l+="-dev"),"stage"===o&&(l+="-stage"));var d=i?"&external_client=PostMessage:"+i.getClientName():"";return l+=".bimplus.net/viewer/#/objproperties?embedded=1&token="+n+d+"&project_id="+t+"&team_id="+e+"&object_id="+s},e.prototype.initMessageHandlers=function(){s.prototype.initMessageHandlers.call(this)},e.prototype.load=function(e,t,n){var s=this.getUrl(e,t,n);this.loadIFrame(s),this.initMessageHandlers()}};a.prototype=new s,a.prototype.constructor=s;var c=function e(t,n,s,i){o.call(this,t,n,s,i),this.onExportStarted=null,e.prototype.getUrl=function(e,t){var o="https://portal";i&&("dev"===i&&(o+="-dev"),"stage"===i&&(o+="-stage"),"localhost"===i&&(o="http://127.0.0.1:4200"));var l=s?"&external_client=PostMessage:"+s.getClientName():"";return o+=i&&"localhost"===i?"/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e:".bimplus.net/export-manager/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e},e.prototype.initMessageHandlers=function(){var e=this;o.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ExportStarted",(function(t){e.onExportStarted&&e.onExportStarted(t.id)}))}};c.prototype=new o,c.prototype.constructor=o;var r=function e(t,n,i,o){s.call(this,t,i),this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/files/select"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};r.prototype=new s,r.prototype.constructor=s;var p=function e(t,n,i,o){s.call(this,t,i),this.onModelSelected=null,this.onModelSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/models/select"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(t&&t.id?t.id:t)}))}};p.prototype=new s,p.prototype.constructor=s;var u=function e(t,n,i,o){s.call(this,t,i),this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/files/isoselect"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};u.prototype=new s,u.prototype.constructor=s;var h=function e(t,n,i,o){s.call(this,t,i),this.onModelSelected=null,this.onModelSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/models/isoselect"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(t&&t.id?t.id:t)}))}};h.prototype=new s,h.prototype.constructor=s;var g=function(e){var t,n,s=decodeURIComponent(window.location.search.substring(1)).split("&");for(n=0;n<s.length;n++)if((t=s[n].split("="))[0]===e)return void 0===t[1]||t[1]};return t})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.add=t():e.add=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{BimExplorer:()=>o,BimFilesIsoSelect:()=>u,BimFilesSelect:()=>r,BimModelsIsoSelect:()=>h,BimModelsSelect:()=>p,BimObjectProperties:()=>a,BimPortal:()=>i,BimTaskList:()=>l,BimTaskProperties:()=>d,ExportManager:()=>c,ExternalClient:()=>n,getUrlParameter:()=>g});var n=function e(t){this._messageHandlers={},this._clientName=t,e.prototype.initialize=function(){var e=this;window.addEventListener("message",(function(t){var n=t.data;""===n&&(n="{}"),e.messageReceived(JSON.parse(n))}))},e.prototype.addMessageHandler=function(e,t){this._messageHandlers[e]=t},e.prototype.removeMessageHandler=function(e){delete this._messageHandlers[e]},e.prototype.messageReceived=function(e){var t=this._messageHandlers[e.message];t&&t(e.data)},e.prototype.sendMessage=function(e,t,n){var s=document.getElementById(e);s&&s.contentWindow&&s.contentWindow.postMessage(JSON.stringify({messageType:"bimplusMessageIn",message:t,data:n}),"*")},e.prototype.getClientName=function(){return this._clientName}},s=function e(t,n){this._client=n,this._domId=t,e.prototype.sendMessage=function(e,t){this._client&&this._client.sendMessage(this._domId,e,t)},e.prototype.getDOMElementId=function(){return this._domId},e.prototype.initMessageHandlers=function(){},e.prototype.loadIFrame=function(e){var t=document.getElementById(this._domId);t?t.src=e:console.error("DOM Element not found: "+this._domId)}},i=function e(t,n,i,o){s.call(this,t,i),this.onTeamChanged=null,this.onProjectSelected=null,this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(){var e="https://portal";o&&("dev"===o&&(e+="-dev"),"stage"===o&&(e+="-stage"));var t=i?"&external_client=PostMessage:"+i.getClientName():"";return e+=".bimplus.net/?embedded=1&token="+n+t},e.prototype.load=function(){var e=this.getUrl();this.loadIFrame(e),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("TeamChanged",(function(t){e.onTeamChanged&&e.onTeamChanged(t.id)})),this._client.addMessageHandler("ProjectSelected",(function(t){e.onProjectSelected&&e.onProjectSelected(t.id)})),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};i.prototype=new s,i.prototype.constructor=s;var o=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onPinSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,this.onClickedHyperlink=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"),"localhost"===o&&(s="http://127.0.0.1:4200"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=o&&"localhost"===o?"/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e:".bimplus.net/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("PinSelected",(function(t){e.onPinSelected&&e.onPinSelected(t.id)})),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()})),this._client.addMessageHandler("ClickedHyperlink",(function(t){e.onClickedHyperlink&&e.onClickedHyperlink(t.url)}))},e.prototype.resetView=function(){this.sendMessage("ResetView")},e.prototype.centerObject=function(e,t){this.sendMessage("CenterObject",{id:e,flyTo:t})},e.prototype.selectPin=function(e){this.sendMessage("PinSelected",{id:e})},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.isolateObjects=function(e){this.sendMessage("ObjectsIsolated",{ids:e})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectStructure=function(e,t,n,s,i,o){this.sendMessage("StructureSelected",{id:e,visibleNodes:t,showAll:n,expandAll:s,hideUnreferencedTopology:i,isolate:o})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})},e.prototype.colorizeObjects=function(e,t){this.sendMessage("ColorizeObjects",{ids:e,color:t})}};o.prototype=new s,o.prototype.constructor=s;var l=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,e.prototype.getUrl=function(e,t,s){var l="https://portal";o&&("dev"===o&&(l+="-dev"),"stage"===o&&(l+="-stage"));var d=i?"&external_client=PostMessage:"+i.getClientName():"";return l+=".bimplus.net/viewer/?destination=EMBEDDED_ISSUE_LIST"+(s&&"string"==typeof s?"&source="+s:"")+"&embedded=1&token="+n+d+"/#/embeddedissuelist?project_id="+t+"&team_id="+e},e.prototype.load=function(e,t,n){var s=this.getUrl(e,t,n);this.loadIFrame(s),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()}))},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})}};l.prototype=new s,l.prototype.constructor=s;var d=function e(t,n,i,o){s.call(this,t,i),this.onObjectSelected=null,this.onObjectsSelected=null,this.onIssueSelected=null,this.onPinSelected=null,this.onCheckAlive=null,this.onDataLoaded=null,this.onClickedHyperlink=null,e.prototype.getUrl=function(e,t,s,l){var d="https://portal";o&&("dev"===o&&(d+="-dev"),"stage"===o&&(d+="-stage"));var a=i?"&external_client=PostMessage:"+i.getClientName():"";return d+=".bimplus.net/viewer/?destination=EMBEDDED_ISSUE"+(l&&"string"==typeof l?"&source="+l:"")+"&embedded=1&token="+n+a+"/#/embeddedissue?project_id="+t+"&issue_id="+s+"&team_id="+e},e.prototype.load=function(e,t,n,s){var i=this.getUrl(e,t,n,s);this.loadIFrame(i),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("PinSelected",(function(t){e.onPinSelected&&e.onPinSelected(t.id)})),this._client.addMessageHandler("ObjectSelected",(function(t){e.onObjectSelected&&e.onObjectSelected(t.Id,t.multiSelect,t.selected)})),this._client.addMessageHandler("ObjectsSelected",(function(t){e.onObjectsSelected&&e.onObjectsSelected(t.ids,t.multiSelect,t.selected)})),this._client.addMessageHandler("IssueSelected",(function(t){e.onIssueSelected&&e.onIssueSelected(t.id)})),this._client.addMessageHandler("CheckAlive",(function(t){e.onCheckAlive&&e.onCheckAlive(t.client)})),this._client.addMessageHandler("DataLoaded",(function(){e.onDataLoaded&&e.onDataLoaded()})),this._client.addMessageHandler("ClickedHyperlink",(function(t){e.onClickedHyperlink&&e.onClickedHyperlink(t.url)}))},e.prototype.selectPin=function(e){this.sendMessage("PinSelected",{id:e})},e.prototype.selectObjects=function(e,t,n,s){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:s})},e.prototype.checkAlive=function(){this.sendMessage("CheckAlive",{})},e.prototype.selectIssue=function(e){this.sendMessage("IssueSelected",{id:e})}};d.prototype=new s,d.prototype.constructor=s;var a=function e(t,n,i,o){s.call(this,t,i),e.prototype.getUrl=function(e,t,s){var l="https://portal";o&&("dev"===o&&(l+="-dev"),"stage"===o&&(l+="-stage"));var d=i?"&external_client=PostMessage:"+i.getClientName():"";return l+=".bimplus.net/viewer/#/objproperties?embedded=1&token="+n+d+"&project_id="+t+"&team_id="+e+"&object_id="+s},e.prototype.initMessageHandlers=function(){s.prototype.initMessageHandlers.call(this)},e.prototype.load=function(e,t,n){var s=this.getUrl(e,t,n);this.loadIFrame(s),this.initMessageHandlers()}};a.prototype=new s,a.prototype.constructor=s;var c=function e(t,n,s,i){o.call(this,t,n,s,i),this.onExportStarted=null,e.prototype.getUrl=function(e,t){var o="https://portal";i&&("dev"===i&&(o+="-dev"),"stage"===i&&(o+="-stage"),"localhost"===i&&(o="http://127.0.0.1:4200"));var l=s?"&external_client=PostMessage:"+s.getClientName():"";return o+=i&&"localhost"===i?"/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e:".bimplus.net/export-manager/#/viewer?embedded=1&token="+n+l+"&project_id="+t+"&team_id="+e},e.prototype.initMessageHandlers=function(){var e=this;o.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ExportStarted",(function(t){e.onExportStarted&&e.onExportStarted(t.id)}))}};c.prototype=new o,c.prototype.constructor=o;var r=function e(t,n,i,o){s.call(this,t,i),this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/files/select"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};r.prototype=new s,r.prototype.constructor=s;var p=function e(t,n,i,o){s.call(this,t,i),this.onModelSelected=null,this.onModelSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/models/select"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(t&&t.id?t.id:t)}))}};p.prototype=new s,p.prototype.constructor=s;var u=function e(t,n,i,o){s.call(this,t,i),this.onAttachmentSelected=null,this.onAttachmentSelectedDetails=null,e.prototype.getUrl=function(e,t,s){var l="https://portal";o&&("dev"===o&&(l+="-dev"),"stage"===o&&(l+="-stage"));var d=i?"&external_client=PostMessage:"+i.getClientName():"";return(s||l+".bimplus.net/")+"?embedded=1&token="+n+d+"/#/project/"+e+"/"+t+"/files/isoselect"},e.prototype.load=function(e,t,n){var s=this.getUrl(e,t,n);this.loadIFrame(s),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(t&&t.id?t.id:t)}))}};u.prototype=new s,u.prototype.constructor=s;var h=function e(t,n,i,o){s.call(this,t,i),this.onModelSelected=null,this.onModelSelectedDetails=null,e.prototype.getUrl=function(e,t){var s="https://portal";o&&("dev"===o&&(s+="-dev"),"stage"===o&&(s+="-stage"));var l=i?"&external_client=PostMessage:"+i.getClientName():"";return s+=".bimplus.net/?embedded=1&token="+n+l+"/#/project/"+e+"/"+t+"/models/isoselect"},e.prototype.load=function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()},e.prototype.initMessageHandlers=function(){var e=this;s.prototype.initMessageHandlers.call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(t&&t.id?t.id:t)}))}};h.prototype=new s,h.prototype.constructor=s;var g=function(e){var t,n,s=decodeURIComponent(window.location.search.substring(1)).split("&");for(n=0;n<s.length;n++)if((t=s[n].split("="))[0]===e)return void 0===t[1]||t[1]};return t})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimplus-webclient",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "bim+ web client",
5
5
  "main": "dist/bimplus-webclient.js",
6
6
  "license": "MIT",