bimplus-webclient 0.1.40-ifcjs-0 → 0.1.41

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,2026 @@
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 r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,c=void 0,c=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===n(c)?c:String(c)),o)}var i,c}e.r(t),e.d(t,{BimExplorer:()=>M,BimFilesIsoSelect:()=>_e,BimFilesSelect:()=>se,BimModelsIsoSelect:()=>De,BimModelsSelect:()=>he,BimObjectProperties:()=>X,BimPortal:()=>S,BimTaskList:()=>C,BimTaskProperties:()=>F,ExportManager:()=>re,ExternalClient:()=>o,ModelViewer:()=>Ce,getUrlParameter:()=>Ae});var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._messageHandlers={},this._errorHandler=null,this._clientName=t}var t,n,o;return t=e,(n=[{key:"initialize",value:function(){var e=this;console.log("ExternalClient initialized"),window.addEventListener("message",(function(t){var n=t.data;""===n?e.errorReceived({error:"External client got an empty message !"}):e.messageReceived(JSON.parse(n))}))}},{key:"addMessageHandler",value:function(e,t){this._messageHandlers[e]=t}},{key:"removeMessageHandler",value:function(e){delete this._messageHandlers[e]}},{key:"messageReceived",value:function(e){var t=this._messageHandlers[e.message];t&&t(e.data)}},{key:"addErrorHandler",value:function(e){this._errorHandler=e}},{key:"removeErrorHandler",value:function(){this._errorHandler=null}},{key:"errorReceived",value:function(e){var t=this._errorHandler;t&&t(e)}},{key:"sendMessage",value:function(e,t,n){var r=document.getElementById(e);return!(null==r||!r.contentWindow||(r.contentWindow.postMessage(JSON.stringify({messageType:"bimplusMessageIn",message:t,data:n}),"*"),0))}},{key:"getClientName",value:function(){return this._clientName}}])&&r(t.prototype,n),o&&r(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}var s=l((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===f(i)?i:String(i)),r)}var o,i}u(s,"embedded","?embedded=1"),u(s,"url",(function(e){var t="https://portal";return e&&("dev"===e&&(t+="-dev"),"stage"===e&&(t+="-stage")),t+=".bimplus.net/"})),u(s,"token",(function(e){return"&token="+e})),u(s,"client",(function(e){return e?"&external_client=PostMessage:"+e.getClientName():""})),u(s,"source",(function(e){return e&&"string"==typeof e?"&source="+e:""})),u(s,"teamId",(function(e){return e?"&team_id="+e:""})),u(s,"projectId",(function(e){return e?"&project_id="+e:""}));var p=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._client=n,this._domId=t,this._env=r,this._token=o}var t,n,r;return t=e,(n=[{key:"sendMessage",value:function(e,t){if(!this._client){var n="Error for SendMessage. Client not defined.";throw console.error(n),ReferenceError(n)}this._client.sendMessage(this._domId,e,t)}},{key:"getDOMElementId",value:function(){return this._domId}},{key:"initMessageHandlers",value:function(){}},{key:"loadIFrame",value:function(e){var t=document.getElementById(this._domId);if(!t){var n="DOM element not found: "+this._domId;throw console.error(n),ReferenceError(n)}t.src=e}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===y(i)?i:String(i)),r)}var o,i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},v.apply(this,arguments)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(i,e);var t,n,r,o=m(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onTeamChanged=null,c.onProjectSelected=null,c.onAttachmentSelected=null,c.onAttachmentSelectedDetails=null,c}return t=i,(n=[{key:"getUrl",value:function(){return s.url(this._env)+s.embedded+s.token(this._token)+s.client(this._client)}},{key:"load",value:function(){var e=this.getUrl();this.loadIFrame(e),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;v(g(i.prototype),"initMessageHandlers",this).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(null!=t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(null!=t&&t.id?t.id:t)}))}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===O(i)?i:String(i)),r)}var o,i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=k(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},w.apply(this,arguments)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(i,e);var t,n,r,o=P(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onObjectSelected=null,c.onObjectsSelected=null,c.onIssueSelected=null,c.onPinSelected=null,c.onCheckAlive=null,c.onDataLoaded=null,c.onClickedHyperlink=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t){return(this._env&&"localhost"===this._env?"http://127.0.0.1:4200/":s.url(this._env))+"#/viewer"+s.embedded+s.token(this._token)+s.client(this._client)+"&project_id="+t+"&team_id="+e}},{key:"load",value:function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;w(k(i.prototype),"initMessageHandlers",this).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)}))}},{key:"resetView",value:function(){this.sendMessage("ResetView")}},{key:"centerObject",value:function(e,t){this.sendMessage("CenterObject",{id:e,flyTo:t})}},{key:"selectPin",value:function(e){this.sendMessage("PinSelected",{id:e})}},{key:"selectObjects",value:function(e,t,n,r){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:r})}},{key:"isolateObjects",value:function(e){this.sendMessage("ObjectsIsolated",{ids:e})}},{key:"checkAlive",value:function(){this.sendMessage("CheckAlive",{})}},{key:"selectStructure",value:function(e,t,n,r,o,i){this.sendMessage("StructureSelected",{id:e,visibleNodes:t,showAll:n,expandAll:r,hideUnreferencedTopology:o,isolate:i})}},{key:"selectIssue",value:function(e){this.sendMessage("IssueSelected",{id:e})}},{key:"colorizeObjects",value:function(e,t){this.sendMessage("ColorizeObjects",{ids:e,color:t})}}])&&j(t.prototype,n),r&&j(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===R(i)?i:String(i)),r)}var o,i}function H(){return H="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},H.apply(this,arguments)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(i,e);var t,n,r,o=T(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onObjectSelected=null,c.onObjectsSelected=null,c.onIssueSelected=null,c.onCheckAlive=null,c.onDataLoaded=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t,n){return s.url(this._env)+"viewer/"+s.embedded+"&destination=EMBEDDED_ISSUE_LIST"+s.source(n)+s.token(this._token)+s.client(this._client)+"/#/embeddedissuelist?project_id="+t+"&team_id="+e}},{key:"load",value:function(e,t,n){var r=this.getUrl(e,t,n);this.loadIFrame(r),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;H(I(i.prototype),"initMessageHandlers",this).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()}))}},{key:"selectObjects",value:function(e,t,n,r){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:r})}},{key:"checkAlive",value:function(){this.sendMessage("CheckAlive",{})}},{key:"selectIssue",value:function(e){this.sendMessage("IssueSelected",{id:e})}}])&&E(t.prototype,n),r&&E(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===A(i)?i:String(i)),r)}var o,i}function B(){return B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=L(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},B.apply(this,arguments)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(i,e);var t,n,r,o=N(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onObjectSelected=null,c.onObjectsSelected=null,c.onIssueSelected=null,c.onPinSelected=null,c.onCheckAlive=null,c.onDataLoaded=null,c.onClickedHyperlink=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t,n,r){return s.url(this._env)+"viewer/"+s.embedded+"&destination=EMBEDDED_ISSUE"+s.source(r)+s.token(this._token)+s.client(this._client)+"/#/embeddedissue?project_id="+t+"&issue_id="+n+"&team_id="+e}},{key:"load",value:function(e,t,n,r){var o=this.getUrl(e,t,n,r);this.loadIFrame(o),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;B(L(i.prototype),"initMessageHandlers",this).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)}))}},{key:"selectPin",value:function(e){this.sendMessage("PinSelected",{id:e})}},{key:"selectObjects",value:function(e,t,n,r){this.sendMessage("ObjectsSelected",{ids:e,multiSelect:t,isolate:n,blockProperties:r})}},{key:"checkAlive",value:function(){this.sendMessage("CheckAlive",{})}},{key:"selectIssue",value:function(e){this.sendMessage("IssueSelected",{id:e})}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function V(){return V="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=K(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},V.apply(this,arguments)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return G(e)}(this,n)}}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function Q(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W(t)?t:String(t)}var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(i,e);var t,n,r,o=q(i);function i(e,t,n,r){var c,l,u,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),c=o.call(this,e,n,r,t),l=G(c),a=function(e,t,n){var r=s.url(this._env);return r+="viewer/#/objproperties"+s.embedded+s.token(this._token)+s.client(this._client)+"&project_id="+t+"&team_id="+e+"&object_id="+n},(u=Q(u="getUrl"))in l?Object.defineProperty(l,u,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[u]=a,c}return t=i,(n=[{key:"load",value:function(e,t,n){var r=this.getUrl(e,t,n);this.loadIFrame(r),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){V(K(i.prototype),"initMessageHandlers",this).call(this)}}])&&z(t.prototype,n),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Y(i)?i:String(i)),r)}var o,i}function $(){return $="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ne(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},$.apply(this,arguments)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ne(e);if(t){var o=ne(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(i,e);var t,n,r,o=te(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,t,n,r)).onExportStarted=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t){var n=this._env&&"localhost"===this._env?"http://127.0.0.1:4200/":s.url(this._env)+"export-manager/";return n+="#/viewer"+s.embedded+s.token(this._token)+s.client(this._client)+"&project_id="+t+"&team_id="+e}},{key:"initMessageHandlers",value:function(){var e=this;$(ne(i.prototype),"initMessageHandlers",this).call(this),this._client.addMessageHandler("ExportStarted",(function(t){e.onExportStarted&&e.onExportStarted(t.id)}))}}])&&Z(t.prototype,n),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(M);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===oe(i)?i:String(i)),r)}var o,i}function ce(){return ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ae(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ce.apply(this,arguments)}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}var se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&le(e,t)}(i,e);var t,n,r,o=ue(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onAttachmentSelected=null,c.onAttachmentSelectedDetails=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t){var n=s.url(this._env);return n+=s.embedded+s.token(this._token)+s.client(this._client)+"/#/project/"+e+"/"+t+"/files/select"}},{key:"load",value:function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;ce(ae(i.prototype),"initMessageHandlers",this).call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(null!=t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(null!=t&&t.id?t.id:t)}))}}])&&ie(t.prototype,n),r&&ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==fe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===fe(i)?i:String(i)),r)}var o,i}function pe(){return pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ve(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},pe.apply(this,arguments)}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}function be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var o=ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function ve(e){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ve(e)}var he=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(i,e);var t,n,r,o=be(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onModelSelected=null,c.onModelSelectedDetails=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t){var n=s.url(this._env);return n+=s.embedded+s.token(this._token)+s.client(this._client)+"/#/project/"+e+"/"+t+"/models/select"}},{key:"load",value:function(e,t){var n=this.getUrl(e,t);this.loadIFrame(n),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;pe(ve(i.prototype),"initMessageHandlers",this).call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(null!=t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(null!=t&&t.id?t.id:t)}))}}])&&de(t.prototype,n),r&&de(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===me(i)?i:String(i)),r)}var o,i}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=we(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Se.apply(this,arguments)}function Oe(e,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oe(e,t)}function je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=we(e);if(t){var o=we(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var _e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(i,e);var t,n,r,o=je(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onAttachmentSelected=null,c.onAttachmentSelectedDetails=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t,n){var r=n||s.url(this._env);return r+=s.embedded+s.token(this._token)+s.client(this._client)+"/#/project/"+e+"/"+t+"/files/isoselect"}},{key:"load",value:function(e,t,n){var r=this.getUrl(e,t,n);this.loadIFrame(r),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;Se(we(i.prototype),"initMessageHandlers",this).call(this),this._client.addMessageHandler("AttachmentSelected",(function(t){e.onAttachmentSelected&&e.onAttachmentSelected(null!=t&&t.id?t.id:t)})),this._client.addMessageHandler("AttachmentSelectedDetails",(function(t){e.onAttachmentSelectedDetails&&e.onAttachmentSelectedDetails(null!=t&&t.id?t.id:t)}))}}])&&ge(t.prototype,n),r&&ge(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Pe(i)?i:String(i)),r)}var o,i}function Me(){return Me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=He(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Me.apply(this,arguments)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var o=He(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(i,e);var t,n,r,o=Ee(i);function i(e,t,n,r){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this,e,n,r,t)).onModelSelected=null,c.onModelSelectedDetails=null,c}return t=i,(n=[{key:"getUrl",value:function(e,t,n){var r=n||s.url(this._env);return r+=s.embedded+s.token(this._token)+s.client(this._client)+"/#/project/"+e+"/"+t+"/models/isoselect"}},{key:"load",value:function(e,t,n){var r=this.getUrl(e,t,n);this.loadIFrame(r),this.initMessageHandlers()}},{key:"initMessageHandlers",value:function(){var e=this;Me(He(i.prototype),"initMessageHandlers",this).call(this),this._client.addMessageHandler("ModelSelected",(function(t){e.onModelSelected&&e.onModelSelected(null!=t&&t.id?t.id:t)})),this._client.addMessageHandler("ModelSelectedDetails",(function(t){e.onModelSelectedDetails&&e.onModelSelectedDetails(null!=t&&t.id?t.id:t)}))}}])&&ke(t.prototype,n),r&&ke(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Te(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Te(i)?i:String(i)),r)}var o,i}var Ce=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.viewerUri=t&&"dev"!==t&&"stage"!==t&&"prod"!==t?t:s.url(t)+"/ifcjs/viewer/#/modelviewer"}var t,n,r;return t=e,(n=[{key:"openFileUriWindow",value:function(e,t,n,r){var o=this.viewerUri+"?fileUri="+encodeURIComponent(e)+s.teamId(n)+s.projectId(r);return window.open(o,t)}},{key:"openBufferDataWindow",value:function(e,t,n,r){var o=this.viewerUri+"?awaitDataMessage=true"+s.teamId(n)+s.projectId(r),i=window.open(o,t);if(i)return window.addEventListener("message",(function t(n){"WatingForData"===n.data&&i&&window&&(i.postMessage(e,"*",[e]),window.removeEventListener("message",t))}),!1),i;alert("Could not open preview window. Please enable popups in your browser to use this feature")}}])&&Ie(t.prototype,n),r&&Ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ae=function(e){var t,n,r=decodeURIComponent(window.location.search.substring(1)).split("&");for(n=0;n<r.length;n++)if((t=r[n].split("="))[0]===e)return void 0===t[1]||t[1]};return t})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["add"] = factory();
8
+ else
9
+ root["add"] = factory();
10
+ })(self, () => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ "./src/BimExplorer.js":
16
+ /*!****************************!*\
17
+ !*** ./src/BimExplorer.js ***!
18
+ \****************************/
19
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
+
21
+ __webpack_require__.r(__webpack_exports__);
22
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23
+ /* harmony export */ BimExplorer: () => (/* binding */ BimExplorer)
24
+ /* harmony export */ });
25
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
26
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
27
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
28
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
30
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
32
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
33
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
34
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
35
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
38
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
40
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
42
+
43
+
44
+
45
+ /**
46
+ * @namespace BimExplorer
47
+ * @param {string} domId DOM Element Id of the containing iframe
48
+ * @param {string} token a valid bimplus accesstoken
49
+ * @param {Object} client The external client to connect with
50
+ * @param {string} env environment to use: dev, stage or prod
51
+ */
52
+ var BimExplorer = /*#__PURE__*/function (_WebControl) {
53
+ _inherits(BimExplorer, _WebControl);
54
+ var _super = _createSuper(BimExplorer);
55
+ function BimExplorer(domId, token, client, env) {
56
+ var _this;
57
+ _classCallCheck(this, BimExplorer);
58
+ _this = _super.call(this, domId, client, env, token);
59
+
60
+ /**
61
+ * Callback for object selected
62
+ * @memberof BimExplorer
63
+ */
64
+ _this.onObjectSelected = null;
65
+
66
+ /**
67
+ * Callback for multiple objects selected
68
+ * @memberof BimExplorer
69
+ */
70
+ _this.onObjectsSelected = null;
71
+
72
+ /**
73
+ * Callback for issue selected
74
+ * @memberof BimExplorer
75
+ */
76
+ _this.onIssueSelected = null;
77
+
78
+ /**
79
+ * Callback for issue pin selected
80
+ * @memberof BimExplorer
81
+ */
82
+ _this.onPinSelected = null;
83
+
84
+ /**
85
+ * Callback for check alive message response
86
+ * @memberof BimExplorer
87
+ */
88
+ _this.onCheckAlive = null;
89
+
90
+ /**
91
+ * Callback for data loading finished
92
+ * @memberof BimExplorer
93
+ */
94
+ _this.onDataLoaded = null;
95
+
96
+ /**
97
+ * Callback for clicked hyperlink
98
+ * @memberof BimExplorer
99
+ */
100
+ _this.onClickedHyperlink = null;
101
+ return _this;
102
+ }
103
+
104
+ /**
105
+ * get the remote url of the Bim Portal
106
+ * @memberof BimExplorer
107
+ * @param {string} teamId Team id
108
+ * @param {string} projectId Project id
109
+ * @return {string} url to embedded bim explorer
110
+ */
111
+ _createClass(BimExplorer, [{
112
+ key: "getUrl",
113
+ value: function getUrl(teamId, projectId) {
114
+ var url = (this._env && this._env === "localhost" ? "http://127.0.0.1:4200/" : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env)) + "#/viewer" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "&project_id=" + projectId + "&team_id=" + teamId;
115
+ return url;
116
+ }
117
+
118
+ /**
119
+ * Load the Bim Explorer into the bound iframe, loading the passed project
120
+ * @memberof BimExplorer
121
+ * @param {string} teamId Team id
122
+ * @param {string} projectId Project id
123
+ */
124
+ }, {
125
+ key: "load",
126
+ value: function load(teamId, projectId) {
127
+ var explorerUrl = this.getUrl(teamId, projectId);
128
+ this.loadIFrame(explorerUrl);
129
+ this.initMessageHandlers();
130
+ }
131
+
132
+ /**
133
+ * Registration of the message handlers - used internally
134
+ * @memberof BimExplorer
135
+ */
136
+ }, {
137
+ key: "initMessageHandlers",
138
+ value: function initMessageHandlers() {
139
+ var _this2 = this;
140
+ _get(_getPrototypeOf(BimExplorer.prototype), "initMessageHandlers", this).call(this);
141
+ this._client.addMessageHandler("PinSelected", function (msg) {
142
+ if (_this2.onPinSelected) {
143
+ _this2.onPinSelected(msg.id);
144
+ }
145
+ });
146
+ this._client.addMessageHandler("ObjectSelected", function (msg) {
147
+ if (_this2.onObjectSelected) {
148
+ _this2.onObjectSelected(msg.Id, msg.multiSelect, msg.selected);
149
+ }
150
+ });
151
+ this._client.addMessageHandler("ObjectsSelected", function (msg) {
152
+ if (_this2.onObjectsSelected) {
153
+ _this2.onObjectsSelected(msg.ids, msg.multiSelect, msg.selected);
154
+ }
155
+ });
156
+ this._client.addMessageHandler("IssueSelected", function (msg) {
157
+ if (_this2.onIssueSelected) {
158
+ _this2.onIssueSelected(msg.id);
159
+ }
160
+ });
161
+ this._client.addMessageHandler("CheckAlive", function (msg) {
162
+ if (_this2.onCheckAlive) {
163
+ _this2.onCheckAlive(msg.client);
164
+ }
165
+ });
166
+ this._client.addMessageHandler("DataLoaded", function () {
167
+ if (_this2.onDataLoaded) {
168
+ _this2.onDataLoaded();
169
+ }
170
+ });
171
+ this._client.addMessageHandler("ClickedHyperlink", function (msg) {
172
+ if (_this2.onClickedHyperlink) {
173
+ _this2.onClickedHyperlink(msg.url);
174
+ }
175
+ });
176
+ }
177
+
178
+ /**
179
+ * Reset the view
180
+ * @memberof BimExplorer
181
+ */
182
+ }, {
183
+ key: "resetView",
184
+ value: function resetView() {
185
+ this.sendMessage('ResetView');
186
+ }
187
+
188
+ /**
189
+ * Zoom to a given object
190
+ * @memberof BimExplorer
191
+ * @param {string} objectId Object to zoom to
192
+ * @param {boolean} flyTo Animated zoom or jump to object
193
+ */
194
+ }, {
195
+ key: "centerObject",
196
+ value: function centerObject(objectId, flyTo) {
197
+ this.sendMessage('CenterObject', {
198
+ id: objectId,
199
+ flyTo: flyTo
200
+ });
201
+ }
202
+
203
+ /**
204
+ * Select an issue pin
205
+ * @memberof BimExplorer
206
+ * @param {string} id Pin to select
207
+ */
208
+ }, {
209
+ key: "selectPin",
210
+ value: function selectPin(id) {
211
+ this.sendMessage('PinSelected', {
212
+ id: id
213
+ });
214
+ }
215
+
216
+ /**
217
+ * Select objects
218
+ * @memberof BimExplorer
219
+ * @param {Array} ids Ids of the objects to select
220
+ * @param {boolean} multiSelect Switch on/off multiselect mode (simulate ctrl-key)
221
+ * @param {boolean} isolate Isolate the selected objects
222
+ * @param {boolean} blockProperties Disable the opening of the object properties panel
223
+ */
224
+ }, {
225
+ key: "selectObjects",
226
+ value: function selectObjects(ids, multiSelect, isolate, blockProperties) {
227
+ this.sendMessage('ObjectsSelected', {
228
+ ids: ids,
229
+ multiSelect: multiSelect,
230
+ isolate: isolate,
231
+ blockProperties: blockProperties
232
+ });
233
+ }
234
+
235
+ /**
236
+ * Isolate objects
237
+ * @memberof BimExplorer
238
+ * @param {Array} ids Ids of the objects to isolate
239
+ */
240
+ }, {
241
+ key: "isolateObjects",
242
+ value: function isolateObjects(ids) {
243
+ this.sendMessage('ObjectsIsolated', {
244
+ ids: ids
245
+ });
246
+ }
247
+
248
+ /**
249
+ * Check if Explorer is connected and alive
250
+ * @memberof BimExplorer
251
+ */
252
+ }, {
253
+ key: "checkAlive",
254
+ value: function checkAlive() {
255
+ this.sendMessage('CheckAlive', {});
256
+ }
257
+
258
+ /**
259
+ * Select an exsisting structure
260
+ * @memberof BimExplorer
261
+ * @param {string} id Id of the structure
262
+ * @param {Array} visibleNodes Array of the visible node ids
263
+ * @param {boolean} showAll Set all nodes to visible
264
+ * @param {boolean} expandAll Expand the entire structure tree
265
+ * @param {boolean} hideUnreferencedTopology Hide all objects which are not assigned to the structure
266
+ * @param {boolean} isolate Switch on isolation mode for the visible assigned structure objects
267
+ */
268
+ }, {
269
+ key: "selectStructure",
270
+ value: function selectStructure(id, visibleNodes, showAll, expandAll, hideUnreferencedTopology, isolate) {
271
+ this.sendMessage('StructureSelected', {
272
+ id: id,
273
+ visibleNodes: visibleNodes,
274
+ showAll: showAll,
275
+ expandAll: expandAll,
276
+ hideUnreferencedTopology: hideUnreferencedTopology,
277
+ isolate: isolate
278
+ });
279
+ }
280
+
281
+ /**
282
+ * Select issue
283
+ * @memberof BimExplorer
284
+ * @param {string} id Id of the issue to select
285
+ */
286
+ }, {
287
+ key: "selectIssue",
288
+ value: function selectIssue(id) {
289
+ this.sendMessage('IssueSelected', {
290
+ id: id
291
+ });
292
+ }
293
+
294
+ /**
295
+ * Colorize objects
296
+ * @memberof BimExplorer
297
+ * @param {Array} ids Ids of the objects to isolate
298
+ * @param {string} color RGB css color code string
299
+ */
300
+ }, {
301
+ key: "colorizeObjects",
302
+ value: function colorizeObjects(ids, color) {
303
+ this.sendMessage('ColorizeObjects', {
304
+ ids: ids,
305
+ color: color
306
+ });
307
+ }
308
+ }]);
309
+ return BimExplorer;
310
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
311
+
312
+ /***/ }),
313
+
314
+ /***/ "./src/BimFilesIsoSelect.js":
315
+ /*!**********************************!*\
316
+ !*** ./src/BimFilesIsoSelect.js ***!
317
+ \**********************************/
318
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
319
+
320
+ __webpack_require__.r(__webpack_exports__);
321
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
322
+ /* harmony export */ BimFilesIsoSelect: () => (/* binding */ BimFilesIsoSelect)
323
+ /* harmony export */ });
324
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
325
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
326
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
327
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
328
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
329
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
330
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
331
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
332
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
333
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
334
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
335
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
336
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
337
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
338
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
339
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
340
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
341
+
342
+
343
+
344
+ /**
345
+ * @namespace BimFilesIsoSelect
346
+ * @param {string} domId DOM Element Id of the containing iframe
347
+ * @param {string} token a valid bimplus accesstoken
348
+ * @param {Object} client The external client to connect with
349
+ * @param {string} env environment to use: dev, stage or prod
350
+ */
351
+ var BimFilesIsoSelect = /*#__PURE__*/function (_WebControl) {
352
+ _inherits(BimFilesIsoSelect, _WebControl);
353
+ var _super = _createSuper(BimFilesIsoSelect);
354
+ function BimFilesIsoSelect(domId, token, client, env) {
355
+ var _this;
356
+ _classCallCheck(this, BimFilesIsoSelect);
357
+ _this = _super.call(this, domId, client, env, token);
358
+
359
+ /**
360
+ * Callback for attachment selected
361
+ * @memberof BimFilesIsoSelect
362
+ */
363
+ _this.onAttachmentSelected = null;
364
+
365
+ /**
366
+ * Callback for attachment selected with all details
367
+ * @memberof BimFilesIsoSelect
368
+ */
369
+ _this.onAttachmentSelectedDetails = null;
370
+ return _this;
371
+ }
372
+
373
+ /**
374
+ * get the remote url of the Documents module
375
+ * @memberof BimFilesIsoSelect
376
+ * @param {string} teamSlug Team slug
377
+ * @param {string} projectId Project id
378
+ * @param {string} baseUrl url which will be used instead of url computed by internal logic
379
+ * @return {string} url to documents module
380
+ */
381
+ _createClass(BimFilesIsoSelect, [{
382
+ key: "getUrl",
383
+ value: function getUrl(teamSlug, projectId, baseUrl) {
384
+ var url = baseUrl ? baseUrl : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
385
+ url += _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/project/" + teamSlug + "/" + projectId + "/files/isoselect";
386
+ return url;
387
+ }
388
+
389
+ /**
390
+ * Load the Documents module into the bound iframe, loading the passed project
391
+ * @memberof BimFilesIsoSelect
392
+ * @param {string} teamSlug Team slug
393
+ * @param {string} projectId Project id
394
+ */
395
+ }, {
396
+ key: "load",
397
+ value: function load(teamSlug, projectId, baseUrl) {
398
+ var iframeUrl = this.getUrl(teamSlug, projectId, baseUrl);
399
+ this.loadIFrame(iframeUrl);
400
+ this.initMessageHandlers();
401
+ }
402
+ }, {
403
+ key: "initMessageHandlers",
404
+ value: function initMessageHandlers() {
405
+ var _this2 = this;
406
+ _get(_getPrototypeOf(BimFilesIsoSelect.prototype), "initMessageHandlers", this).call(this);
407
+
408
+ // Add message handler for attachment selected event
409
+ this._client.addMessageHandler("AttachmentSelected", function (msg) {
410
+ if (_this2.onAttachmentSelected) {
411
+ _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
412
+ }
413
+ });
414
+
415
+ // Add message handler for attachment selected details event
416
+ this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
417
+ if (_this2.onAttachmentSelectedDetails) {
418
+ _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
419
+ }
420
+ });
421
+ }
422
+ }]);
423
+ return BimFilesIsoSelect;
424
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
425
+
426
+ /***/ }),
427
+
428
+ /***/ "./src/BimFilesOverlaySelect.js":
429
+ /*!**************************************!*\
430
+ !*** ./src/BimFilesOverlaySelect.js ***!
431
+ \**************************************/
432
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
433
+
434
+ __webpack_require__.r(__webpack_exports__);
435
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
436
+ /* harmony export */ BimFilesOverlaySelect: () => (/* binding */ BimFilesOverlaySelect)
437
+ /* harmony export */ });
438
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
439
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
440
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
441
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
442
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
443
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
444
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
445
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
446
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
447
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
448
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
449
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
450
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
451
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
452
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
453
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
454
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
455
+
456
+
457
+
458
+ /**
459
+ * @namespace BimFilesOverlaySelect
460
+ * @param {string} domId DOM Element Id of the containing iframe
461
+ * @param {string} token a valid bimplus accesstoken
462
+ * @param {Object} client The external client to connect with
463
+ * @param {string} env environment to use: dev, stage or prod
464
+ */
465
+ var BimFilesOverlaySelect = /*#__PURE__*/function (_WebControl) {
466
+ _inherits(BimFilesOverlaySelect, _WebControl);
467
+ var _super = _createSuper(BimFilesOverlaySelect);
468
+ function BimFilesOverlaySelect(domId, token, client, env) {
469
+ var _this;
470
+ _classCallCheck(this, BimFilesOverlaySelect);
471
+ _this = _super.call(this, domId, client, env, token);
472
+
473
+ /**
474
+ * Callback for attachment selected
475
+ * @memberof BimFilesOverlaySelect
476
+ */
477
+ _this.onAttachmentSelected = null;
478
+
479
+ /**
480
+ * Callback for attachment selected with all details
481
+ * @memberof BimFilesOverlaySelect
482
+ */
483
+ _this.onAttachmentSelectedDetails = null;
484
+ return _this;
485
+ }
486
+
487
+ /**
488
+ * get the remote url of the Documents module
489
+ * @memberof BimFilesOverlaySelect
490
+ * @param {string} teamSlug Team slug
491
+ * @param {string} projectId Project id
492
+ * @return {string} url to documents module
493
+ */
494
+ _createClass(BimFilesOverlaySelect, [{
495
+ key: "getUrl",
496
+ value: function getUrl(teamSlug, projectId) {
497
+ var url = "https://localhost:9001";
498
+ //let url = UrlBuilder.url(this._env);
499
+ url += _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/project/" + teamSlug + "/" + projectId + "/files/overlayselect";
500
+ return url;
501
+ }
502
+
503
+ /**
504
+ * Load the Documents module into the bound iframe, loading the passed project
505
+ * @memberof BimFilesOverlaySelect
506
+ * @param {string} teamSlug Team slug
507
+ * @param {string} projectId Project id
508
+ */
509
+ }, {
510
+ key: "load",
511
+ value: function load(teamSlug, projectId) {
512
+ var iframeUrl = this.getUrl(teamSlug, projectId);
513
+ this.loadIFrame(iframeUrl);
514
+ this.initMessageHandlers();
515
+ }
516
+ }, {
517
+ key: "initMessageHandlers",
518
+ value: function initMessageHandlers() {
519
+ var _this2 = this;
520
+ _get(_getPrototypeOf(BimFilesOverlaySelect.prototype), "initMessageHandlers", this).call(this);
521
+
522
+ // Add message handler for attachment selected event
523
+ this._client.addMessageHandler("AttachmentSelected", function (msg) {
524
+ if (_this2.onAttachmentSelected) {
525
+ _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
526
+ }
527
+ });
528
+
529
+ // Add message handler for attachment selected details event
530
+ this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
531
+ if (_this2.onAttachmentSelectedDetails) {
532
+ _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
533
+ }
534
+ });
535
+ }
536
+ }]);
537
+ return BimFilesOverlaySelect;
538
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
539
+
540
+ /***/ }),
541
+
542
+ /***/ "./src/BimFilesSelect.js":
543
+ /*!*******************************!*\
544
+ !*** ./src/BimFilesSelect.js ***!
545
+ \*******************************/
546
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
547
+
548
+ __webpack_require__.r(__webpack_exports__);
549
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
550
+ /* harmony export */ BimFilesSelect: () => (/* binding */ BimFilesSelect)
551
+ /* harmony export */ });
552
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
553
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
554
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
555
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
556
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
557
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
558
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
559
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
560
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
561
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
562
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
563
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
564
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
565
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
566
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
567
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
568
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
569
+
570
+
571
+
572
+ /**
573
+ * @namespace BimFilesSelect
574
+ * @param {string} domId DOM Element Id of the containing iframe
575
+ * @param {string} token a valid bimplus accesstoken
576
+ * @param {Object} client The external client to connect with
577
+ * @param {string} env environment to use: dev, stage or prod
578
+ */
579
+ var BimFilesSelect = /*#__PURE__*/function (_WebControl) {
580
+ _inherits(BimFilesSelect, _WebControl);
581
+ var _super = _createSuper(BimFilesSelect);
582
+ function BimFilesSelect(domId, token, client, env) {
583
+ var _this;
584
+ _classCallCheck(this, BimFilesSelect);
585
+ _this = _super.call(this, domId, client, env, token);
586
+
587
+ /**
588
+ * Callback for attachment selected
589
+ * @memberof BimFilesSelect
590
+ */
591
+ _this.onAttachmentSelected = null;
592
+
593
+ /**
594
+ * Callback for attachment selected with all details
595
+ * @memberof BimFilesSelect
596
+ */
597
+ _this.onAttachmentSelectedDetails = null;
598
+ return _this;
599
+ }
600
+
601
+ /**
602
+ * get the remote url of the Documents module
603
+ * @memberof BimFilesSelect
604
+ * @param {string} teamSlug Team slug
605
+ * @param {string} projectId Project id
606
+ * @return {string} url to documents module
607
+ */
608
+ _createClass(BimFilesSelect, [{
609
+ key: "getUrl",
610
+ value: function getUrl(teamSlug, projectId) {
611
+ var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
612
+ url += _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/project/" + teamSlug + "/" + projectId + "/files/select";
613
+ return url;
614
+ }
615
+
616
+ /**
617
+ * Load the Documents module into the bound iframe, loading the passed project
618
+ * @memberof BimFilesSelect
619
+ * @param {string} teamSlug Team slug
620
+ * @param {string} projectId Project id
621
+ */
622
+ }, {
623
+ key: "load",
624
+ value: function load(teamSlug, projectId) {
625
+ var iframeUrl = this.getUrl(teamSlug, projectId);
626
+ this.loadIFrame(iframeUrl);
627
+ this.initMessageHandlers();
628
+ }
629
+ }, {
630
+ key: "initMessageHandlers",
631
+ value: function initMessageHandlers() {
632
+ var _this2 = this;
633
+ _get(_getPrototypeOf(BimFilesSelect.prototype), "initMessageHandlers", this).call(this);
634
+
635
+ // Add message handler for attachment selected event
636
+ this._client.addMessageHandler("AttachmentSelected", function (msg) {
637
+ if (_this2.onAttachmentSelected) {
638
+ _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
639
+ }
640
+ });
641
+
642
+ // Add message handler for attachment selected details event
643
+ this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
644
+ if (_this2.onAttachmentSelectedDetails) {
645
+ _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
646
+ }
647
+ });
648
+ }
649
+ }]);
650
+ return BimFilesSelect;
651
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
652
+
653
+ /***/ }),
654
+
655
+ /***/ "./src/BimModelsIsoSelect.js":
656
+ /*!***********************************!*\
657
+ !*** ./src/BimModelsIsoSelect.js ***!
658
+ \***********************************/
659
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
660
+
661
+ __webpack_require__.r(__webpack_exports__);
662
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
663
+ /* harmony export */ BimModelsIsoSelect: () => (/* binding */ BimModelsIsoSelect)
664
+ /* harmony export */ });
665
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
666
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
667
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
668
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
669
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
670
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
671
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
672
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
673
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
674
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
675
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
676
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
677
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
678
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
679
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
680
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
681
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
682
+
683
+
684
+
685
+ /**
686
+ * @namespace BimModelsIsoSelect
687
+ * @param {string} domId DOM Element Id of the containing iframe
688
+ * @param {string} token a valid bimplus accesstoken
689
+ * @param {Object} client The external client to connect with
690
+ * @param {string} env environment to use: dev, stage or prod
691
+ */
692
+ var BimModelsIsoSelect = /*#__PURE__*/function (_WebControl) {
693
+ _inherits(BimModelsIsoSelect, _WebControl);
694
+ var _super = _createSuper(BimModelsIsoSelect);
695
+ function BimModelsIsoSelect(domId, token, client, env) {
696
+ var _this;
697
+ _classCallCheck(this, BimModelsIsoSelect);
698
+ _this = _super.call(this, domId, client, env, token);
699
+
700
+ /**
701
+ * Callback for model selected
702
+ * @memberof BimModelsIsoSelect
703
+ */
704
+ _this.onModelSelected = null;
705
+
706
+ /**
707
+ * Callback for model selected with all details
708
+ * @memberof BimModelsIsoSelect
709
+ */
710
+ _this.onModelSelectedDetails = null;
711
+ return _this;
712
+ }
713
+
714
+ /**
715
+ * get the remote url of the Models module
716
+ * @memberof BimModelsIsoSelect
717
+ * @param {string} teamSlug Team slug
718
+ * @param {string} projectId Project id
719
+ * @param {string} baseUrl url which will be used instead of url computed by internal logic
720
+ * @return {string} url to models module
721
+ */
722
+ _createClass(BimModelsIsoSelect, [{
723
+ key: "getUrl",
724
+ value: function getUrl(teamSlug, projectId, baseUrl) {
725
+ var url = baseUrl ? baseUrl : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
726
+ url += _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/project/" + teamSlug + "/" + projectId + "/models/isoselect";
727
+ return url;
728
+ }
729
+
730
+ /**
731
+ * Load the Models module into the bound iframe, loading the passed project
732
+ * @memberof BimModelsIsoSelect
733
+ * @param {string} teamSlug Team slug
734
+ * @param {string} projectId Project id
735
+ */
736
+ }, {
737
+ key: "load",
738
+ value: function load(teamSlug, projectId, baseUrl) {
739
+ var iframeUrl = this.getUrl(teamSlug, projectId, baseUrl);
740
+ this.loadIFrame(iframeUrl);
741
+ this.initMessageHandlers();
742
+ }
743
+ }, {
744
+ key: "initMessageHandlers",
745
+ value: function initMessageHandlers() {
746
+ var _this2 = this;
747
+ _get(_getPrototypeOf(BimModelsIsoSelect.prototype), "initMessageHandlers", this).call(this);
748
+
749
+ // Add message handler for model selected event
750
+ this._client.addMessageHandler("ModelSelected", function (msg) {
751
+ if (_this2.onModelSelected) {
752
+ _this2.onModelSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
753
+ }
754
+ });
755
+
756
+ // Add message handler for model selected details event
757
+ this._client.addMessageHandler("ModelSelectedDetails", function (msg) {
758
+ if (_this2.onModelSelectedDetails) {
759
+ _this2.onModelSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
760
+ }
761
+ });
762
+ }
763
+ }]);
764
+ return BimModelsIsoSelect;
765
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
766
+
767
+ /***/ }),
768
+
769
+ /***/ "./src/BimModelsSelect.js":
770
+ /*!********************************!*\
771
+ !*** ./src/BimModelsSelect.js ***!
772
+ \********************************/
773
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
774
+
775
+ __webpack_require__.r(__webpack_exports__);
776
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
777
+ /* harmony export */ BimModelsSelect: () => (/* binding */ BimModelsSelect)
778
+ /* harmony export */ });
779
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
780
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
781
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
782
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
783
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
784
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
785
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
786
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
787
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
788
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
789
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
790
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
791
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
792
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
793
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
794
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
795
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
796
+
797
+
798
+
799
+ /**
800
+ * @namespace BimModelsSelect
801
+ * @param {string} domId DOM Element Id of the containing iframe
802
+ * @param {string} token a valid bimplus accesstoken
803
+ * @param {Object} client The external client to connect with
804
+ * @param {string} env environment to use: dev, stage or prod
805
+ */
806
+ var BimModelsSelect = /*#__PURE__*/function (_WebControl) {
807
+ _inherits(BimModelsSelect, _WebControl);
808
+ var _super = _createSuper(BimModelsSelect);
809
+ function BimModelsSelect(domId, token, client, env) {
810
+ var _this;
811
+ _classCallCheck(this, BimModelsSelect);
812
+ _this = _super.call(this, domId, client, env, token);
813
+
814
+ /**
815
+ * Callback for model selected
816
+ * @memberof BimModelsSelect
817
+ */
818
+ _this.onModelSelected = null;
819
+
820
+ /**
821
+ * Callback for model selected with all details
822
+ * @memberof BimModelsSelect
823
+ */
824
+ _this.onModelSelectedDetails = null;
825
+ return _this;
826
+ }
827
+
828
+ /**
829
+ * get the remote url of the Models module
830
+ * @memberof BimModelsSelect
831
+ * @param {string} teamSlug Team slug
832
+ * @param {string} projectId Project id
833
+ * @return {string} url to models module
834
+ */
835
+ _createClass(BimModelsSelect, [{
836
+ key: "getUrl",
837
+ value: function getUrl(teamSlug, projectId) {
838
+ var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
839
+ url += _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/project/" + teamSlug + "/" + projectId + "/models/select";
840
+ return url;
841
+ }
842
+
843
+ /**
844
+ * Load the Models module into the bound iframe, loading the passed project
845
+ * @memberof BimModelsSelect
846
+ * @param {string} teamSlug Team slug
847
+ * @param {string} projectId Project id
848
+ */
849
+ }, {
850
+ key: "load",
851
+ value: function load(teamSlug, projectId) {
852
+ var iframeUrl = this.getUrl(teamSlug, projectId);
853
+ this.loadIFrame(iframeUrl);
854
+ this.initMessageHandlers();
855
+ }
856
+ }, {
857
+ key: "initMessageHandlers",
858
+ value: function initMessageHandlers() {
859
+ var _this2 = this;
860
+ _get(_getPrototypeOf(BimModelsSelect.prototype), "initMessageHandlers", this).call(this);
861
+
862
+ // Add message handler for model selected event
863
+ this._client.addMessageHandler("ModelSelected", function (msg) {
864
+ if (_this2.onModelSelected) {
865
+ _this2.onModelSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
866
+ }
867
+ });
868
+
869
+ // Add message handler for model selected details event
870
+ this._client.addMessageHandler("ModelSelectedDetails", function (msg) {
871
+ if (_this2.onModelSelectedDetails) {
872
+ _this2.onModelSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
873
+ }
874
+ });
875
+ }
876
+ }]);
877
+ return BimModelsSelect;
878
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
879
+
880
+ /***/ }),
881
+
882
+ /***/ "./src/BimObjectProperties.js":
883
+ /*!************************************!*\
884
+ !*** ./src/BimObjectProperties.js ***!
885
+ \************************************/
886
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
887
+
888
+ __webpack_require__.r(__webpack_exports__);
889
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
890
+ /* harmony export */ BimObjectProperties: () => (/* binding */ BimObjectProperties)
891
+ /* harmony export */ });
892
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
893
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
894
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
895
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
896
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
897
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
898
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
899
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
900
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
901
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
902
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
903
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
904
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
905
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
906
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
907
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
908
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
909
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
910
+
911
+
912
+
913
+ /**
914
+ * @namespace BimExplorer
915
+ * @param {string} domId DOM Element Id of the containing iframe
916
+ * @param {string} token a valid bimplus accesstoken
917
+ * @param {Object} client The external client to connect with
918
+ * @param {string} env environment to use: dev, stage or prod
919
+ */
920
+ var BimObjectProperties = /*#__PURE__*/function (_WebControl) {
921
+ _inherits(BimObjectProperties, _WebControl);
922
+ var _super = _createSuper(BimObjectProperties);
923
+ function BimObjectProperties(domId, token, client, env) {
924
+ var _this;
925
+ _classCallCheck(this, BimObjectProperties);
926
+ _this = _super.call(this, domId, client, env, token);
927
+ /**
928
+ * get the remote url of the Bim Portal
929
+ * @memberof BimExplorer
930
+ * @param {string} teamId Team id
931
+ * @param {string} projectId Project id
932
+ * @return {string} url to embedded bim explorer
933
+ */
934
+ _defineProperty(_assertThisInitialized(_this), "getUrl", function (teamId, projectId, objectId) {
935
+ var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
936
+ url += "viewer/#/objproperties" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "&project_id=" + projectId + "&team_id=" + teamId + "&object_id=" + objectId;
937
+ return url;
938
+ });
939
+ return _this;
940
+ }
941
+ _createClass(BimObjectProperties, [{
942
+ key: "load",
943
+ value:
944
+ /**
945
+ * Load the Object Properties into the bound iframe
946
+ * @memberof BimExplorer
947
+ * @param {string} teamId Team id
948
+ * @param {string} projectId Project id
949
+ * @param {string} objectId Object id
950
+ */
951
+ function load(teamId, projectId, objectId) {
952
+ var explorerUrl = this.getUrl(teamId, projectId, objectId);
953
+ this.loadIFrame(explorerUrl);
954
+ this.initMessageHandlers();
955
+ }
956
+ }, {
957
+ key: "initMessageHandlers",
958
+ value: function initMessageHandlers() {
959
+ _get(_getPrototypeOf(BimObjectProperties.prototype), "initMessageHandlers", this).call(this);
960
+ }
961
+ }]);
962
+ return BimObjectProperties;
963
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
964
+
965
+ /***/ }),
966
+
967
+ /***/ "./src/BimPortal.js":
968
+ /*!**************************!*\
969
+ !*** ./src/BimPortal.js ***!
970
+ \**************************/
971
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
972
+
973
+ __webpack_require__.r(__webpack_exports__);
974
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
975
+ /* harmony export */ BimPortal: () => (/* binding */ BimPortal)
976
+ /* harmony export */ });
977
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
978
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
979
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
980
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
981
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
982
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
983
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
984
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
985
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
986
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
987
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
988
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
989
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
990
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
991
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
992
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
993
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
994
+
995
+
996
+
997
+ /**
998
+ * @namespace BimPortal
999
+ * @param {string} domId DOM Element Id of the containing iframe
1000
+ * @param {string} token a valid bimplus accesstoken
1001
+ * @param {Object} client The external client to connect with
1002
+ * @param {string} env environment to use: dev, stage or prod
1003
+ */
1004
+ var BimPortal = /*#__PURE__*/function (_WebControl) {
1005
+ _inherits(BimPortal, _WebControl);
1006
+ var _super = _createSuper(BimPortal);
1007
+ function BimPortal(domId, token, client, env) {
1008
+ var _this;
1009
+ _classCallCheck(this, BimPortal);
1010
+ _this = _super.call(this, domId, client, env, token);
1011
+
1012
+ /**
1013
+ * Callback for changed team
1014
+ * @memberof BimPortal
1015
+ */
1016
+ _this.onTeamChanged = null;
1017
+
1018
+ /**
1019
+ * Callback for changed project
1020
+ * @memberof BimPortal
1021
+ */
1022
+ _this.onProjectSelected = null;
1023
+
1024
+ /**
1025
+ * Callback for attachment selected
1026
+ * @memberof BimPortal
1027
+ */
1028
+ _this.onAttachmentSelected = null;
1029
+
1030
+ /**
1031
+ * Callback for attachment selected with all details
1032
+ * @memberof BimPortal
1033
+ */
1034
+ _this.onAttachmentSelectedDetails = null;
1035
+ return _this;
1036
+ }
1037
+
1038
+ /**
1039
+ * get the remote url of the Bim Portal
1040
+ * @memberof BimPortal
1041
+ * @return {string} url to embedded bim portal
1042
+ */
1043
+ _createClass(BimPortal, [{
1044
+ key: "getUrl",
1045
+ value: function getUrl() {
1046
+ return _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client);
1047
+ }
1048
+
1049
+ /**
1050
+ * Load the Bim Portal into the bound iframe
1051
+ * @memberof BimPortal
1052
+ */
1053
+ }, {
1054
+ key: "load",
1055
+ value: function load() {
1056
+ var url = this.getUrl();
1057
+ this.loadIFrame(url);
1058
+ this.initMessageHandlers();
1059
+ }
1060
+ }, {
1061
+ key: "initMessageHandlers",
1062
+ value: function initMessageHandlers() {
1063
+ var _this2 = this;
1064
+ _get(_getPrototypeOf(BimPortal.prototype), "initMessageHandlers", this).call(this);
1065
+
1066
+ // Add message handler for team changed event
1067
+ this._client.addMessageHandler("TeamChanged", function (msg) {
1068
+ if (_this2.onTeamChanged) {
1069
+ _this2.onTeamChanged(msg.id);
1070
+ }
1071
+ });
1072
+
1073
+ // Add message handler for project selected event
1074
+ this._client.addMessageHandler("ProjectSelected", function (msg) {
1075
+ if (_this2.onProjectSelected) {
1076
+ _this2.onProjectSelected(msg.id);
1077
+ }
1078
+ });
1079
+
1080
+ // Add message handler for attachment selected event
1081
+ this._client.addMessageHandler("AttachmentSelected", function (msg) {
1082
+ if (_this2.onAttachmentSelected) {
1083
+ _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
1084
+ }
1085
+ });
1086
+
1087
+ // Add message handler for attachment selected details event
1088
+ this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
1089
+ if (_this2.onAttachmentSelectedDetails) {
1090
+ _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
1091
+ }
1092
+ });
1093
+ }
1094
+ }]);
1095
+ return BimPortal;
1096
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1097
+
1098
+ /***/ }),
1099
+
1100
+ /***/ "./src/BimTaskList.js":
1101
+ /*!****************************!*\
1102
+ !*** ./src/BimTaskList.js ***!
1103
+ \****************************/
1104
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1105
+
1106
+ __webpack_require__.r(__webpack_exports__);
1107
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1108
+ /* harmony export */ BimTaskList: () => (/* binding */ BimTaskList)
1109
+ /* harmony export */ });
1110
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1111
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
1112
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1113
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1114
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1115
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1116
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1117
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1118
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
1119
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1120
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
1121
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1122
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1123
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
1124
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1125
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1126
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1127
+
1128
+
1129
+
1130
+ /**
1131
+ * @namespace BimTaskList
1132
+ * @param {string} domId DOM Element Id of the containing iframe
1133
+ * @param {string} token a valid bimplus accesstoken
1134
+ * @param {Object} client The external client to connect with
1135
+ * @param {string} env environment to use: dev, stage or prod
1136
+ */
1137
+ var BimTaskList = /*#__PURE__*/function (_WebControl) {
1138
+ _inherits(BimTaskList, _WebControl);
1139
+ var _super = _createSuper(BimTaskList);
1140
+ function BimTaskList(domId, token, client, env) {
1141
+ var _this;
1142
+ _classCallCheck(this, BimTaskList);
1143
+ _this = _super.call(this, domId, client, env, token);
1144
+
1145
+ /**
1146
+ * Callback for object selected
1147
+ * @memberof BimTaskList
1148
+ */
1149
+ _this.onObjectSelected = null;
1150
+
1151
+ /**
1152
+ * Callback for multiple objects selected
1153
+ * @memberof BimTaskList
1154
+ */
1155
+ _this.onObjectsSelected = null;
1156
+
1157
+ /**
1158
+ * Callback for issue selected
1159
+ * @memberof BimTaskList
1160
+ */
1161
+ _this.onIssueSelected = null;
1162
+
1163
+ /**
1164
+ * Callback for check alive message response
1165
+ * @memberof BimTaskList
1166
+ */
1167
+ _this.onCheckAlive = null;
1168
+
1169
+ /**
1170
+ * Callback for data loading finished
1171
+ * @memberof BimTaskList
1172
+ */
1173
+ _this.onDataLoaded = null;
1174
+ return _this;
1175
+ }
1176
+
1177
+ /**
1178
+ * get the remote url of the task list control
1179
+ * @memberof BimTaskList
1180
+ * @param {string} teamId Team id
1181
+ * @param {string} projectId Project id
1182
+ * @param {string} source source identification / application id + version info
1183
+ * @return {string} url to embedded task list
1184
+ */
1185
+ _createClass(BimTaskList, [{
1186
+ key: "getUrl",
1187
+ value: function getUrl(teamId, projectId, source) {
1188
+ var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env) + "viewer/" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + "&destination=EMBEDDED_ISSUE_LIST" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.source(source) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/embeddedissuelist?project_id=" + projectId + "&team_id=" + teamId;
1189
+ return url;
1190
+ }
1191
+
1192
+ /**
1193
+ * Load the Bim TaskList into the bound iframe, loading the passed project
1194
+ * @memberof BimTaskList
1195
+ * @param {string} teamId Team id
1196
+ * @param {string} projectId Project id
1197
+ * @param {string} source source identification / application id + version info
1198
+ */
1199
+ }, {
1200
+ key: "load",
1201
+ value: function load(teamId, projectId, source) {
1202
+ var iframeUrl = this.getUrl(teamId, projectId, source);
1203
+ this.loadIFrame(iframeUrl);
1204
+ this.initMessageHandlers();
1205
+ }
1206
+ }, {
1207
+ key: "initMessageHandlers",
1208
+ value: function initMessageHandlers() {
1209
+ var _this2 = this;
1210
+ _get(_getPrototypeOf(BimTaskList.prototype), "initMessageHandlers", this).call(this);
1211
+ this._client.addMessageHandler("ObjectSelected", function (msg) {
1212
+ if (_this2.onObjectSelected) {
1213
+ _this2.onObjectSelected(msg.Id, msg.multiSelect, msg.selected);
1214
+ }
1215
+ });
1216
+ this._client.addMessageHandler("ObjectsSelected", function (msg) {
1217
+ if (_this2.onObjectsSelected) {
1218
+ _this2.onObjectsSelected(msg.ids, msg.multiSelect, msg.selected);
1219
+ }
1220
+ });
1221
+ this._client.addMessageHandler("IssueSelected", function (msg) {
1222
+ if (_this2.onIssueSelected) {
1223
+ _this2.onIssueSelected(msg.id);
1224
+ }
1225
+ });
1226
+ this._client.addMessageHandler("CheckAlive", function (msg) {
1227
+ if (_this2.onCheckAlive) {
1228
+ _this2.onCheckAlive(msg.client);
1229
+ }
1230
+ });
1231
+ this._client.addMessageHandler("DataLoaded", function () {
1232
+ if (_this2.onDataLoaded) {
1233
+ _this2.onDataLoaded();
1234
+ }
1235
+ });
1236
+ }
1237
+
1238
+ /**
1239
+ * Select objects
1240
+ * @memberof BimTaskList
1241
+ * @param {Array} ids Ids of the objects to select
1242
+ * @param {boolean} multiSelect Switch on/off multiselect mode (simulate ctrl-key)
1243
+ * @param {boolean} isolate Isolate the selected objects
1244
+ * @param {boolean} blockProperties Disable the opening of the object properties panel
1245
+ */
1246
+ }, {
1247
+ key: "selectObjects",
1248
+ value: function selectObjects(ids, multiSelect, isolate, blockProperties) {
1249
+ this.sendMessage('ObjectsSelected', {
1250
+ ids: ids,
1251
+ multiSelect: multiSelect,
1252
+ isolate: isolate,
1253
+ blockProperties: blockProperties
1254
+ });
1255
+ }
1256
+
1257
+ /**
1258
+ * Check if BimTaskList is connected and alive
1259
+ * @memberof BimTaskList
1260
+ */
1261
+ }, {
1262
+ key: "checkAlive",
1263
+ value: function checkAlive() {
1264
+ this.sendMessage('CheckAlive', {});
1265
+ }
1266
+
1267
+ /**
1268
+ * Select issue
1269
+ * @memberof BimTaskList
1270
+ * @param {string} id Id of the issue to select
1271
+ */
1272
+ }, {
1273
+ key: "selectIssue",
1274
+ value: function selectIssue(id) {
1275
+ this.sendMessage('IssueSelected', {
1276
+ id: id
1277
+ });
1278
+ }
1279
+ }]);
1280
+ return BimTaskList;
1281
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1282
+
1283
+ /***/ }),
1284
+
1285
+ /***/ "./src/BimTaskProperties.js":
1286
+ /*!**********************************!*\
1287
+ !*** ./src/BimTaskProperties.js ***!
1288
+ \**********************************/
1289
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1290
+
1291
+ __webpack_require__.r(__webpack_exports__);
1292
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1293
+ /* harmony export */ BimTaskProperties: () => (/* binding */ BimTaskProperties)
1294
+ /* harmony export */ });
1295
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1296
+ /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
1297
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1298
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1299
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1300
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1301
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1302
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1303
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
1304
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1305
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
1306
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1307
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1308
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
1309
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1310
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1311
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1312
+
1313
+
1314
+
1315
+ /**
1316
+ * @namespace BimTaskProperties
1317
+ * @param {string} domId DOM Element Id of the containing iframe
1318
+ * @param {string} token a valid bimplus accesstoken
1319
+ * @param {Object} client The external client to connect with
1320
+ * @param {string} env environment to use: dev, stage or prod
1321
+ */
1322
+ var BimTaskProperties = /*#__PURE__*/function (_WebControl) {
1323
+ _inherits(BimTaskProperties, _WebControl);
1324
+ var _super = _createSuper(BimTaskProperties);
1325
+ function BimTaskProperties(domId, token, client, env) {
1326
+ var _this;
1327
+ _classCallCheck(this, BimTaskProperties);
1328
+ _this = _super.call(this, domId, client, env, token);
1329
+
1330
+ /**
1331
+ * Callback for object selected
1332
+ * @memberof BimTaskProperties
1333
+ */
1334
+ _this.onObjectSelected = null;
1335
+
1336
+ /**
1337
+ * Callback for multiple objects selected
1338
+ * @memberof BimTaskProperties
1339
+ */
1340
+ _this.onObjectsSelected = null;
1341
+
1342
+ /**
1343
+ * Callback for issue selected
1344
+ * @memberof BimTaskProperties
1345
+ */
1346
+ _this.onIssueSelected = null;
1347
+
1348
+ /**
1349
+ * Callback for issue pin selected
1350
+ * @memberof BimTaskProperties
1351
+ */
1352
+ _this.onPinSelected = null;
1353
+
1354
+ /**
1355
+ * Callback for check alive message response
1356
+ * @memberof BimTaskProperties
1357
+ */
1358
+ _this.onCheckAlive = null;
1359
+
1360
+ /**
1361
+ * Callback for data loading finished
1362
+ * @memberof BimTaskProperties
1363
+ */
1364
+ _this.onDataLoaded = null;
1365
+
1366
+ /**
1367
+ * Callback for clicked hyperlink
1368
+ * @memberof BimTaskProperties
1369
+ */
1370
+ _this.onClickedHyperlink = null;
1371
+ return _this;
1372
+ }
1373
+
1374
+ /**
1375
+ * get the remote url of the task properties control
1376
+ * @memberof BimTaskProperties
1377
+ * @param {string} teamId Team id
1378
+ * @param {string} projectId Project id
1379
+ * @param {string} issueId Task id
1380
+ * @param {string} source source identification / application id + version info
1381
+ * @return {string} url to embedded task properties
1382
+ */
1383
+ _createClass(BimTaskProperties, [{
1384
+ key: "getUrl",
1385
+ value: function getUrl(teamId, projectId, issueId, source) {
1386
+ var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env) + "viewer/" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + "&destination=EMBEDDED_ISSUE" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.source(source) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "/#/embeddedissue?project_id=" + projectId + "&issue_id=" + issueId + "&team_id=" + teamId;
1387
+ return url;
1388
+ }
1389
+
1390
+ /**
1391
+ * Load the Bim TaskProperties into the bound iframe, loading the passed project
1392
+ * @memberof BimTaskProperties
1393
+ * @param {string} teamId Team id
1394
+ * @param {string} projectId Project id
1395
+ * @param {string} issueId Task id
1396
+ * @param {string} source source identification / application id + version info
1397
+ */
1398
+ }, {
1399
+ key: "load",
1400
+ value: function load(teamId, projectId, issueId, source) {
1401
+ var iframeUrl = this.getUrl(teamId, projectId, issueId, source);
1402
+ this.loadIFrame(iframeUrl);
1403
+ this.initMessageHandlers();
1404
+ }
1405
+ }, {
1406
+ key: "initMessageHandlers",
1407
+ value: function initMessageHandlers() {
1408
+ var _this2 = this;
1409
+ _get(_getPrototypeOf(BimTaskProperties.prototype), "initMessageHandlers", this).call(this);
1410
+ this._client.addMessageHandler("PinSelected", function (msg) {
1411
+ if (_this2.onPinSelected) {
1412
+ _this2.onPinSelected(msg.id);
1413
+ }
1414
+ });
1415
+ this._client.addMessageHandler("ObjectSelected", function (msg) {
1416
+ if (_this2.onObjectSelected) {
1417
+ _this2.onObjectSelected(msg.Id, msg.multiSelect, msg.selected);
1418
+ }
1419
+ });
1420
+ this._client.addMessageHandler("ObjectsSelected", function (msg) {
1421
+ if (_this2.onObjectsSelected) {
1422
+ _this2.onObjectsSelected(msg.ids, msg.multiSelect, msg.selected);
1423
+ }
1424
+ });
1425
+ this._client.addMessageHandler("IssueSelected", function (msg) {
1426
+ if (_this2.onIssueSelected) {
1427
+ _this2.onIssueSelected(msg.id);
1428
+ }
1429
+ });
1430
+ this._client.addMessageHandler("CheckAlive", function (msg) {
1431
+ if (_this2.onCheckAlive) {
1432
+ _this2.onCheckAlive(msg.client);
1433
+ }
1434
+ });
1435
+ this._client.addMessageHandler("DataLoaded", function () {
1436
+ if (_this2.onDataLoaded) {
1437
+ _this2.onDataLoaded();
1438
+ }
1439
+ });
1440
+ this._client.addMessageHandler("ClickedHyperlink", function (msg) {
1441
+ if (_this2.onClickedHyperlink) {
1442
+ _this2.onClickedHyperlink(msg.url);
1443
+ }
1444
+ });
1445
+ }
1446
+
1447
+ /**
1448
+ * Select an issue pin
1449
+ * @memberof BimTaskProperties
1450
+ * @param {string} id Pin to select
1451
+ */
1452
+ }, {
1453
+ key: "selectPin",
1454
+ value: function selectPin(id) {
1455
+ this.sendMessage('PinSelected', {
1456
+ id: id
1457
+ });
1458
+ }
1459
+
1460
+ /**
1461
+ * Select objects
1462
+ * @memberof BimTaskProperties
1463
+ * @param {Array} ids Ids of the objects to select
1464
+ * @param {boolean} multiSelect Switch on/off multiselect mode (simulate ctrl-key)
1465
+ * @param {boolean} isolate Isolate the selected objects
1466
+ * @param {boolean} blockProperties Disable the opening of the object properties panel
1467
+ */
1468
+ }, {
1469
+ key: "selectObjects",
1470
+ value: function selectObjects(ids, multiSelect, isolate, blockProperties) {
1471
+ this.sendMessage('ObjectsSelected', {
1472
+ ids: ids,
1473
+ multiSelect: multiSelect,
1474
+ isolate: isolate,
1475
+ blockProperties: blockProperties
1476
+ });
1477
+ }
1478
+
1479
+ /**
1480
+ * Check if BimTaskProperties is connected and alive
1481
+ * @memberof BimTaskProperties
1482
+ */
1483
+ }, {
1484
+ key: "checkAlive",
1485
+ value: function checkAlive() {
1486
+ this.sendMessage('CheckAlive', {});
1487
+ }
1488
+
1489
+ /**
1490
+ * Select issue
1491
+ * @memberof BimTaskProperties
1492
+ * @param {string} id Id of the issue to select
1493
+ */
1494
+ }, {
1495
+ key: "selectIssue",
1496
+ value: function selectIssue(id) {
1497
+ this.sendMessage('IssueSelected', {
1498
+ id: id
1499
+ });
1500
+ }
1501
+ }]);
1502
+ return BimTaskProperties;
1503
+ }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1504
+
1505
+ /***/ }),
1506
+
1507
+ /***/ "./src/ExportManager.js":
1508
+ /*!******************************!*\
1509
+ !*** ./src/ExportManager.js ***!
1510
+ \******************************/
1511
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1512
+
1513
+ __webpack_require__.r(__webpack_exports__);
1514
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1515
+ /* harmony export */ ExportManager: () => (/* binding */ ExportManager)
1516
+ /* harmony export */ });
1517
+ /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1518
+ /* harmony import */ var _BimExplorer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BimExplorer */ "./src/BimExplorer.js");
1519
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1520
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1521
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1522
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1523
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1524
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1525
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
1526
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1527
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
1528
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1529
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1530
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
1531
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1532
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1533
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1534
+
1535
+
1536
+
1537
+ /**
1538
+ * @namespace ExportManager
1539
+ * @param {string} domId DOM Element Id of the containing iframe
1540
+ * @param {string} token a valid bimplus accesstoken
1541
+ * @param {Object} client The external client to connect with
1542
+ * @param {string} env environment to use: dev, stage or prod
1543
+ */
1544
+ var ExportManager = /*#__PURE__*/function (_BimExplorer) {
1545
+ _inherits(ExportManager, _BimExplorer);
1546
+ var _super = _createSuper(ExportManager);
1547
+ function ExportManager(domId, token, client, env) {
1548
+ var _this;
1549
+ _classCallCheck(this, ExportManager);
1550
+ _this = _super.call(this, domId, token, client, env);
1551
+
1552
+ /**
1553
+ * Callback for started export
1554
+ * @memberof ExportManager
1555
+ */
1556
+ _this.onExportStarted = null;
1557
+ return _this;
1558
+ }
1559
+
1560
+ /**
1561
+ * get the remote url of the Export Manager
1562
+ * @memberof ExportManager
1563
+ * @param {string} teamId Team id
1564
+ * @param {string} projectId Project id
1565
+ * @return {string} url to embedded bim explorer
1566
+ */
1567
+ _createClass(ExportManager, [{
1568
+ key: "getUrl",
1569
+ value: function getUrl(teamId, projectId) {
1570
+ var url = this._env && this._env === "localhost" ? "http://127.0.0.1:4200/" : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env) + "export-manager/";
1571
+ url += "#/viewer" + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.embedded + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.token(this._token) + _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.client(this._client) + "&project_id=" + projectId + "&team_id=" + teamId;
1572
+ return url;
1573
+ }
1574
+ }, {
1575
+ key: "initMessageHandlers",
1576
+ value: function initMessageHandlers() {
1577
+ var _this2 = this;
1578
+ _get(_getPrototypeOf(ExportManager.prototype), "initMessageHandlers", this).call(this);
1579
+
1580
+ // Add message handler for object selected event
1581
+ this._client.addMessageHandler("ExportStarted", function (msg) {
1582
+ if (_this2.onExportStarted) {
1583
+ _this2.onExportStarted(msg.id);
1584
+ }
1585
+ });
1586
+ }
1587
+ }]);
1588
+ return ExportManager;
1589
+ }(_BimExplorer__WEBPACK_IMPORTED_MODULE_1__.BimExplorer);
1590
+
1591
+ /***/ }),
1592
+
1593
+ /***/ "./src/ExternalClient.js":
1594
+ /*!*******************************!*\
1595
+ !*** ./src/ExternalClient.js ***!
1596
+ \*******************************/
1597
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1598
+
1599
+ __webpack_require__.r(__webpack_exports__);
1600
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1601
+ /* harmony export */ ExternalClient: () => (/* binding */ ExternalClient)
1602
+ /* harmony export */ });
1603
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1604
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1605
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1606
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1607
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1608
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1609
+ /**
1610
+ * @namespace ExternalClient
1611
+ * @param {string} clientName client id
1612
+ */
1613
+ var ExternalClient = /*#__PURE__*/function () {
1614
+ function ExternalClient(clientName) {
1615
+ _classCallCheck(this, ExternalClient);
1616
+ this._messageHandlers = {};
1617
+ this._errorHandler = null;
1618
+ this._clientName = clientName;
1619
+ }
1620
+
1621
+ /**
1622
+ * initialize and start listening to incomming messages
1623
+ * @memberof ExternalClient
1624
+ */
1625
+ _createClass(ExternalClient, [{
1626
+ key: "initialize",
1627
+ value: function initialize() {
1628
+ var self = this;
1629
+ console.log("ExternalClient initialized");
1630
+ window.addEventListener('message', function (e) {
1631
+ // Print info of message send by Renderer/Explorer
1632
+ // console.log(`ExternalClient received a message from origin: ${e.origin}\n data: ${e.data}`, e);
1633
+
1634
+ var data = e.data;
1635
+ if (data === "") {
1636
+ self.errorReceived({
1637
+ error: "External client got an empty message !"
1638
+ });
1639
+ } else {
1640
+ self.messageReceived(JSON.parse(data));
1641
+ }
1642
+ });
1643
+ }
1644
+
1645
+ /**
1646
+ * add a message handler
1647
+ * @memberof ExternalClient
1648
+ * @param {string} message message id
1649
+ * @param {function} handler handler function
1650
+ */
1651
+ }, {
1652
+ key: "addMessageHandler",
1653
+ value: function addMessageHandler(message, handler) {
1654
+ this._messageHandlers[message] = handler;
1655
+ }
1656
+
1657
+ /**
1658
+ * remove a message handler
1659
+ * @memberof ExternalClient
1660
+ * @param {string} message message id
1661
+ */
1662
+ }, {
1663
+ key: "removeMessageHandler",
1664
+ value: function removeMessageHandler(message) {
1665
+ delete this._messageHandlers[message];
1666
+ }
1667
+
1668
+ /**
1669
+ * Handle a received messages
1670
+ * @memberof ExternalClient
1671
+ * @param {Object} message message object
1672
+ */
1673
+ }, {
1674
+ key: "messageReceived",
1675
+ value: function messageReceived(message) {
1676
+ var handler = this._messageHandlers[message.message];
1677
+ if (handler) {
1678
+ handler(message.data);
1679
+ }
1680
+ }
1681
+
1682
+ /**
1683
+ * add an error handler
1684
+ * @memberof ExternalClient
1685
+ * @param {function} handler handler function
1686
+ */
1687
+ }, {
1688
+ key: "addErrorHandler",
1689
+ value: function addErrorHandler(handler) {
1690
+ this._errorHandler = handler;
1691
+ }
1692
+
1693
+ /**
1694
+ * remove error handler
1695
+ * @memberof ExternalClient
1696
+ */
1697
+ }, {
1698
+ key: "removeErrorHandler",
1699
+ value: function removeErrorHandler() {
1700
+ this._errorHandler = null;
1701
+ }
1702
+
1703
+ /**
1704
+ * Handle a received messages
1705
+ * @memberof ExternalClient
1706
+ * @param {Object} error error object
1707
+ */
1708
+ }, {
1709
+ key: "errorReceived",
1710
+ value: function errorReceived(error) {
1711
+ var handler = this._errorHandler;
1712
+ if (handler) {
1713
+ handler(error);
1714
+ }
1715
+ }
1716
+
1717
+ /**
1718
+ * Send a message to bimplus web application
1719
+ * @memberof ExternalClient
1720
+ * @param {string} elemId DOM Element Id of the containing iframe
1721
+ * @param {string} message Message name
1722
+ * @param {Object} data message data
1723
+ */
1724
+ }, {
1725
+ key: "sendMessage",
1726
+ value: function sendMessage(elemId, message, data) {
1727
+ var elem = document.getElementById(elemId);
1728
+ if (elem !== null && elem !== void 0 && elem.contentWindow) {
1729
+ // SendMessage called for origin
1730
+ // console.log (`ExternalClient post message:${message} origin: ${window.location.origin}`);
1731
+
1732
+ elem.contentWindow.postMessage(JSON.stringify({
1733
+ messageType: 'bimplusMessageIn',
1734
+ message: message,
1735
+ data: data
1736
+ }), "*");
1737
+ return true;
1738
+ }
1739
+ return false;
1740
+ }
1741
+
1742
+ /**
1743
+ * get the client id
1744
+ * @memberof ExternalClient
1745
+ * @return {string} connected client id
1746
+ */
1747
+ }, {
1748
+ key: "getClientName",
1749
+ value: function getClientName() {
1750
+ return this._clientName;
1751
+ }
1752
+ }]);
1753
+ return ExternalClient;
1754
+ }();
1755
+
1756
+ /***/ }),
1757
+
1758
+ /***/ "./src/UrlBuilder.js":
1759
+ /*!***************************!*\
1760
+ !*** ./src/UrlBuilder.js ***!
1761
+ \***************************/
1762
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1763
+
1764
+ __webpack_require__.r(__webpack_exports__);
1765
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1766
+ /* harmony export */ UrlBuilder: () => (/* binding */ UrlBuilder)
1767
+ /* harmony export */ });
1768
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1769
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1770
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1771
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1772
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1773
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1774
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1775
+ /**
1776
+ * @namespace UrlBuilder
1777
+ */
1778
+ var UrlBuilder = /*#__PURE__*/_createClass(function UrlBuilder() {
1779
+ _classCallCheck(this, UrlBuilder);
1780
+ });
1781
+ /**
1782
+ * Create embedded query parameter
1783
+ * @memberof UrlBuilder
1784
+ * @return {string} embedded query parameter
1785
+ */
1786
+ _defineProperty(UrlBuilder, "embedded", "?embedded=1");
1787
+ /**
1788
+ * Create portal URL depending on environment (DEV/STAGE/PROD)
1789
+ * @memberof UrlBuilder
1790
+ * @param {string} env Current environment
1791
+ * @return {string} url to portal
1792
+ */
1793
+ _defineProperty(UrlBuilder, "url", function (env) {
1794
+ var url = "https://portal";
1795
+ if (env) {
1796
+ if (env === "dev") {
1797
+ url += "-dev";
1798
+ }
1799
+ if (env === "stage") {
1800
+ url += "-stage";
1801
+ }
1802
+ }
1803
+ url += ".bimplus.net/";
1804
+ return url;
1805
+ });
1806
+ /**
1807
+ * Create token
1808
+ * @memberof UrlBuilder
1809
+ * @param {string} token Token
1810
+ * @return {string} token string
1811
+ */
1812
+ _defineProperty(UrlBuilder, "token", function (token) {
1813
+ return "&token=" + token;
1814
+ });
1815
+ /**
1816
+ * Create external client
1817
+ * @memberof UrlBuilder
1818
+ * @param {string} client Client
1819
+ * @return {string} client string
1820
+ */
1821
+ _defineProperty(UrlBuilder, "client", function (client) {
1822
+ return client ? "&external_client=PostMessage:" + client.getClientName() : "";
1823
+ });
1824
+ /**
1825
+ * Create source
1826
+ * @memberof UrlBuilder
1827
+ * @param {string} source Source
1828
+ * @return {string} source string
1829
+ */
1830
+ _defineProperty(UrlBuilder, "source", function (source) {
1831
+ return source && typeof source === "string" ? "&source=" + source : "";
1832
+ });
1833
+
1834
+ /***/ }),
1835
+
1836
+ /***/ "./src/WebControl.js":
1837
+ /*!***************************!*\
1838
+ !*** ./src/WebControl.js ***!
1839
+ \***************************/
1840
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1841
+
1842
+ __webpack_require__.r(__webpack_exports__);
1843
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1844
+ /* harmony export */ WebControl: () => (/* binding */ WebControl)
1845
+ /* harmony export */ });
1846
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1847
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1848
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1849
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1850
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1851
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1852
+ var WebControl = /*#__PURE__*/function () {
1853
+ function WebControl(domId, client, env, token) {
1854
+ _classCallCheck(this, WebControl);
1855
+ this._client = client;
1856
+ this._domId = domId;
1857
+ this._env = env;
1858
+ this._token = token;
1859
+ }
1860
+ _createClass(WebControl, [{
1861
+ key: "sendMessage",
1862
+ value: function sendMessage(message, data) {
1863
+ if (this._client) {
1864
+ this._client.sendMessage(this._domId, message, data);
1865
+ } else {
1866
+ var errorMsg = "Error for SendMessage. Client not defined.";
1867
+ console.error(errorMsg);
1868
+ throw ReferenceError(errorMsg);
1869
+ }
1870
+ }
1871
+ }, {
1872
+ key: "getDOMElementId",
1873
+ value: function getDOMElementId() {
1874
+ return this._domId;
1875
+ }
1876
+ }, {
1877
+ key: "initMessageHandlers",
1878
+ value: function initMessageHandlers() {
1879
+ return; // must be implemented in derived class
1880
+ }
1881
+ }, {
1882
+ key: "loadIFrame",
1883
+ value: function loadIFrame(url) {
1884
+ var iframe = document.getElementById(this._domId);
1885
+ if (iframe) {
1886
+ iframe.src = url;
1887
+ } else {
1888
+ var errorMsg = "DOM element not found: " + this._domId;
1889
+ console.error(errorMsg);
1890
+ throw ReferenceError(errorMsg);
1891
+ }
1892
+ }
1893
+ }]);
1894
+ return WebControl;
1895
+ }();
1896
+
1897
+ /***/ })
1898
+
1899
+ /******/ });
1900
+ /************************************************************************/
1901
+ /******/ // The module cache
1902
+ /******/ var __webpack_module_cache__ = {};
1903
+ /******/
1904
+ /******/ // The require function
1905
+ /******/ function __webpack_require__(moduleId) {
1906
+ /******/ // Check if module is in cache
1907
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1908
+ /******/ if (cachedModule !== undefined) {
1909
+ /******/ return cachedModule.exports;
1910
+ /******/ }
1911
+ /******/ // Create a new module (and put it into the cache)
1912
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1913
+ /******/ // no module.id needed
1914
+ /******/ // no module.loaded needed
1915
+ /******/ exports: {}
1916
+ /******/ };
1917
+ /******/
1918
+ /******/ // Execute the module function
1919
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1920
+ /******/
1921
+ /******/ // Return the exports of the module
1922
+ /******/ return module.exports;
1923
+ /******/ }
1924
+ /******/
1925
+ /************************************************************************/
1926
+ /******/ /* webpack/runtime/define property getters */
1927
+ /******/ (() => {
1928
+ /******/ // define getter functions for harmony exports
1929
+ /******/ __webpack_require__.d = (exports, definition) => {
1930
+ /******/ for(var key in definition) {
1931
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1932
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1933
+ /******/ }
1934
+ /******/ }
1935
+ /******/ };
1936
+ /******/ })();
1937
+ /******/
1938
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1939
+ /******/ (() => {
1940
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1941
+ /******/ })();
1942
+ /******/
1943
+ /******/ /* webpack/runtime/make namespace object */
1944
+ /******/ (() => {
1945
+ /******/ // define __esModule on exports
1946
+ /******/ __webpack_require__.r = (exports) => {
1947
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1948
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1949
+ /******/ }
1950
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1951
+ /******/ };
1952
+ /******/ })();
1953
+ /******/
1954
+ /************************************************************************/
1955
+ var __webpack_exports__ = {};
1956
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1957
+ (() => {
1958
+ /*!**************************!*\
1959
+ !*** ./src/WebClient.js ***!
1960
+ \**************************/
1961
+ __webpack_require__.r(__webpack_exports__);
1962
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1963
+ /* harmony export */ BimExplorer: () => (/* reexport safe */ _BimExplorer__WEBPACK_IMPORTED_MODULE_2__.BimExplorer),
1964
+ /* harmony export */ BimFilesIsoSelect: () => (/* reexport safe */ _BimFilesIsoSelect__WEBPACK_IMPORTED_MODULE_10__.BimFilesIsoSelect),
1965
+ /* harmony export */ BimFilesOverlaySelect: () => (/* reexport safe */ _BimFilesOverlaySelect__WEBPACK_IMPORTED_MODULE_8__.BimFilesOverlaySelect),
1966
+ /* harmony export */ BimFilesSelect: () => (/* reexport safe */ _BimFilesSelect__WEBPACK_IMPORTED_MODULE_7__.BimFilesSelect),
1967
+ /* harmony export */ BimModelsIsoSelect: () => (/* reexport safe */ _BimModelsIsoSelect__WEBPACK_IMPORTED_MODULE_11__.BimModelsIsoSelect),
1968
+ /* harmony export */ BimModelsSelect: () => (/* reexport safe */ _BimModelsSelect__WEBPACK_IMPORTED_MODULE_9__.BimModelsSelect),
1969
+ /* harmony export */ BimObjectProperties: () => (/* reexport safe */ _BimObjectProperties__WEBPACK_IMPORTED_MODULE_5__.BimObjectProperties),
1970
+ /* harmony export */ BimPortal: () => (/* reexport safe */ _BimPortal__WEBPACK_IMPORTED_MODULE_1__.BimPortal),
1971
+ /* harmony export */ BimTaskList: () => (/* reexport safe */ _BimTaskList__WEBPACK_IMPORTED_MODULE_3__.BimTaskList),
1972
+ /* harmony export */ BimTaskProperties: () => (/* reexport safe */ _BimTaskProperties__WEBPACK_IMPORTED_MODULE_4__.BimTaskProperties),
1973
+ /* harmony export */ ExportManager: () => (/* reexport safe */ _ExportManager__WEBPACK_IMPORTED_MODULE_6__.ExportManager),
1974
+ /* harmony export */ ExternalClient: () => (/* reexport safe */ _ExternalClient__WEBPACK_IMPORTED_MODULE_0__.ExternalClient),
1975
+ /* harmony export */ getUrlParameter: () => (/* binding */ getUrlParameter)
1976
+ /* harmony export */ });
1977
+ /* harmony import */ var _ExternalClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExternalClient */ "./src/ExternalClient.js");
1978
+ /* harmony import */ var _BimPortal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BimPortal */ "./src/BimPortal.js");
1979
+ /* harmony import */ var _BimExplorer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BimExplorer */ "./src/BimExplorer.js");
1980
+ /* harmony import */ var _BimTaskList__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BimTaskList */ "./src/BimTaskList.js");
1981
+ /* harmony import */ var _BimTaskProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BimTaskProperties */ "./src/BimTaskProperties.js");
1982
+ /* harmony import */ var _BimObjectProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BimObjectProperties */ "./src/BimObjectProperties.js");
1983
+ /* harmony import */ var _ExportManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ExportManager */ "./src/ExportManager.js");
1984
+ /* harmony import */ var _BimFilesSelect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BimFilesSelect */ "./src/BimFilesSelect.js");
1985
+ /* harmony import */ var _BimFilesOverlaySelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BimFilesOverlaySelect */ "./src/BimFilesOverlaySelect.js");
1986
+ /* harmony import */ var _BimModelsSelect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BimModelsSelect */ "./src/BimModelsSelect.js");
1987
+ /* harmony import */ var _BimFilesIsoSelect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./BimFilesIsoSelect */ "./src/BimFilesIsoSelect.js");
1988
+ /* harmony import */ var _BimModelsIsoSelect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./BimModelsIsoSelect */ "./src/BimModelsIsoSelect.js");
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+
2001
+
2002
+ /**
2003
+ * get the current page url parameter
2004
+ * @param {string} sParam Paramter name
2005
+ * @return {string} Paramter value
2006
+ */
2007
+ var getUrlParameter = function getUrlParameter(sParam) {
2008
+ var sPageURL = decodeURIComponent(window.location.search.substring(1)),
2009
+ sURLVariables = sPageURL.split('&'),
2010
+ sParameterName,
2011
+ i;
2012
+ for (i = 0; i < sURLVariables.length; i++) {
2013
+ sParameterName = sURLVariables[i].split('=');
2014
+ if (sParameterName[0] === sParam) {
2015
+ return sParameterName[1] === undefined ? true : sParameterName[1];
2016
+ }
2017
+ }
2018
+ };
2019
+
2020
+ })();
2021
+
2022
+ /******/ return __webpack_exports__;
2023
+ /******/ })()
2024
+ ;
2025
+ });
2026
+ //# sourceMappingURL=bimplus-webclient.js.map