bimplus-webclient 0.1.42 → 0.1.44

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,2025 +1 @@
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 = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
498
- 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";
499
- return url;
500
- }
501
-
502
- /**
503
- * Load the Documents module into the bound iframe, loading the passed project
504
- * @memberof BimFilesOverlaySelect
505
- * @param {string} teamSlug Team slug
506
- * @param {string} projectId Project id
507
- */
508
- }, {
509
- key: "load",
510
- value: function load(teamSlug, projectId) {
511
- var iframeUrl = this.getUrl(teamSlug, projectId);
512
- this.loadIFrame(iframeUrl);
513
- this.initMessageHandlers();
514
- }
515
- }, {
516
- key: "initMessageHandlers",
517
- value: function initMessageHandlers() {
518
- var _this2 = this;
519
- _get(_getPrototypeOf(BimFilesOverlaySelect.prototype), "initMessageHandlers", this).call(this);
520
-
521
- // Add message handler for attachment selected event
522
- this._client.addMessageHandler("AttachmentSelected", function (msg) {
523
- if (_this2.onAttachmentSelected) {
524
- _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
525
- }
526
- });
527
-
528
- // Add message handler for attachment selected details event
529
- this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
530
- if (_this2.onAttachmentSelectedDetails) {
531
- _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
532
- }
533
- });
534
- }
535
- }]);
536
- return BimFilesOverlaySelect;
537
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
538
-
539
- /***/ }),
540
-
541
- /***/ "./src/BimFilesSelect.js":
542
- /*!*******************************!*\
543
- !*** ./src/BimFilesSelect.js ***!
544
- \*******************************/
545
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
546
-
547
- __webpack_require__.r(__webpack_exports__);
548
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
549
- /* harmony export */ BimFilesSelect: () => (/* binding */ BimFilesSelect)
550
- /* harmony export */ });
551
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
552
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
553
- 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); }
554
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
555
- 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); } }
556
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
557
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
558
- 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); }
559
- 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); }
560
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
561
- 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); }
562
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
563
- 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); }; }
564
- 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); }
565
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
566
- 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; } }
567
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
568
-
569
-
570
-
571
- /**
572
- * @namespace BimFilesSelect
573
- * @param {string} domId DOM Element Id of the containing iframe
574
- * @param {string} token a valid bimplus accesstoken
575
- * @param {Object} client The external client to connect with
576
- * @param {string} env environment to use: dev, stage or prod
577
- */
578
- var BimFilesSelect = /*#__PURE__*/function (_WebControl) {
579
- _inherits(BimFilesSelect, _WebControl);
580
- var _super = _createSuper(BimFilesSelect);
581
- function BimFilesSelect(domId, token, client, env) {
582
- var _this;
583
- _classCallCheck(this, BimFilesSelect);
584
- _this = _super.call(this, domId, client, env, token);
585
-
586
- /**
587
- * Callback for attachment selected
588
- * @memberof BimFilesSelect
589
- */
590
- _this.onAttachmentSelected = null;
591
-
592
- /**
593
- * Callback for attachment selected with all details
594
- * @memberof BimFilesSelect
595
- */
596
- _this.onAttachmentSelectedDetails = null;
597
- return _this;
598
- }
599
-
600
- /**
601
- * get the remote url of the Documents module
602
- * @memberof BimFilesSelect
603
- * @param {string} teamSlug Team slug
604
- * @param {string} projectId Project id
605
- * @return {string} url to documents module
606
- */
607
- _createClass(BimFilesSelect, [{
608
- key: "getUrl",
609
- value: function getUrl(teamSlug, projectId) {
610
- var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
611
- 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";
612
- return url;
613
- }
614
-
615
- /**
616
- * Load the Documents module into the bound iframe, loading the passed project
617
- * @memberof BimFilesSelect
618
- * @param {string} teamSlug Team slug
619
- * @param {string} projectId Project id
620
- */
621
- }, {
622
- key: "load",
623
- value: function load(teamSlug, projectId) {
624
- var iframeUrl = this.getUrl(teamSlug, projectId);
625
- this.loadIFrame(iframeUrl);
626
- this.initMessageHandlers();
627
- }
628
- }, {
629
- key: "initMessageHandlers",
630
- value: function initMessageHandlers() {
631
- var _this2 = this;
632
- _get(_getPrototypeOf(BimFilesSelect.prototype), "initMessageHandlers", this).call(this);
633
-
634
- // Add message handler for attachment selected event
635
- this._client.addMessageHandler("AttachmentSelected", function (msg) {
636
- if (_this2.onAttachmentSelected) {
637
- _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
638
- }
639
- });
640
-
641
- // Add message handler for attachment selected details event
642
- this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
643
- if (_this2.onAttachmentSelectedDetails) {
644
- _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
645
- }
646
- });
647
- }
648
- }]);
649
- return BimFilesSelect;
650
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
651
-
652
- /***/ }),
653
-
654
- /***/ "./src/BimModelsIsoSelect.js":
655
- /*!***********************************!*\
656
- !*** ./src/BimModelsIsoSelect.js ***!
657
- \***********************************/
658
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
659
-
660
- __webpack_require__.r(__webpack_exports__);
661
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
662
- /* harmony export */ BimModelsIsoSelect: () => (/* binding */ BimModelsIsoSelect)
663
- /* harmony export */ });
664
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
665
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
666
- 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); }
667
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
668
- 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); } }
669
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
670
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
671
- 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); }
672
- 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); }
673
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
674
- 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); }
675
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
676
- 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); }; }
677
- 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); }
678
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
679
- 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; } }
680
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
681
-
682
-
683
-
684
- /**
685
- * @namespace BimModelsIsoSelect
686
- * @param {string} domId DOM Element Id of the containing iframe
687
- * @param {string} token a valid bimplus accesstoken
688
- * @param {Object} client The external client to connect with
689
- * @param {string} env environment to use: dev, stage or prod
690
- */
691
- var BimModelsIsoSelect = /*#__PURE__*/function (_WebControl) {
692
- _inherits(BimModelsIsoSelect, _WebControl);
693
- var _super = _createSuper(BimModelsIsoSelect);
694
- function BimModelsIsoSelect(domId, token, client, env) {
695
- var _this;
696
- _classCallCheck(this, BimModelsIsoSelect);
697
- _this = _super.call(this, domId, client, env, token);
698
-
699
- /**
700
- * Callback for model selected
701
- * @memberof BimModelsIsoSelect
702
- */
703
- _this.onModelSelected = null;
704
-
705
- /**
706
- * Callback for model selected with all details
707
- * @memberof BimModelsIsoSelect
708
- */
709
- _this.onModelSelectedDetails = null;
710
- return _this;
711
- }
712
-
713
- /**
714
- * get the remote url of the Models module
715
- * @memberof BimModelsIsoSelect
716
- * @param {string} teamSlug Team slug
717
- * @param {string} projectId Project id
718
- * @param {string} baseUrl url which will be used instead of url computed by internal logic
719
- * @return {string} url to models module
720
- */
721
- _createClass(BimModelsIsoSelect, [{
722
- key: "getUrl",
723
- value: function getUrl(teamSlug, projectId, baseUrl) {
724
- var url = baseUrl ? baseUrl : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
725
- 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";
726
- return url;
727
- }
728
-
729
- /**
730
- * Load the Models module into the bound iframe, loading the passed project
731
- * @memberof BimModelsIsoSelect
732
- * @param {string} teamSlug Team slug
733
- * @param {string} projectId Project id
734
- */
735
- }, {
736
- key: "load",
737
- value: function load(teamSlug, projectId, baseUrl) {
738
- var iframeUrl = this.getUrl(teamSlug, projectId, baseUrl);
739
- this.loadIFrame(iframeUrl);
740
- this.initMessageHandlers();
741
- }
742
- }, {
743
- key: "initMessageHandlers",
744
- value: function initMessageHandlers() {
745
- var _this2 = this;
746
- _get(_getPrototypeOf(BimModelsIsoSelect.prototype), "initMessageHandlers", this).call(this);
747
-
748
- // Add message handler for model selected event
749
- this._client.addMessageHandler("ModelSelected", function (msg) {
750
- if (_this2.onModelSelected) {
751
- _this2.onModelSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
752
- }
753
- });
754
-
755
- // Add message handler for model selected details event
756
- this._client.addMessageHandler("ModelSelectedDetails", function (msg) {
757
- if (_this2.onModelSelectedDetails) {
758
- _this2.onModelSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
759
- }
760
- });
761
- }
762
- }]);
763
- return BimModelsIsoSelect;
764
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
765
-
766
- /***/ }),
767
-
768
- /***/ "./src/BimModelsSelect.js":
769
- /*!********************************!*\
770
- !*** ./src/BimModelsSelect.js ***!
771
- \********************************/
772
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
773
-
774
- __webpack_require__.r(__webpack_exports__);
775
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
776
- /* harmony export */ BimModelsSelect: () => (/* binding */ BimModelsSelect)
777
- /* harmony export */ });
778
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
779
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
780
- 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); }
781
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
782
- 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); } }
783
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
784
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
785
- 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); }
786
- 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); }
787
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
788
- 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); }
789
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
790
- 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); }; }
791
- 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); }
792
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
793
- 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; } }
794
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
795
-
796
-
797
-
798
- /**
799
- * @namespace BimModelsSelect
800
- * @param {string} domId DOM Element Id of the containing iframe
801
- * @param {string} token a valid bimplus accesstoken
802
- * @param {Object} client The external client to connect with
803
- * @param {string} env environment to use: dev, stage or prod
804
- */
805
- var BimModelsSelect = /*#__PURE__*/function (_WebControl) {
806
- _inherits(BimModelsSelect, _WebControl);
807
- var _super = _createSuper(BimModelsSelect);
808
- function BimModelsSelect(domId, token, client, env) {
809
- var _this;
810
- _classCallCheck(this, BimModelsSelect);
811
- _this = _super.call(this, domId, client, env, token);
812
-
813
- /**
814
- * Callback for model selected
815
- * @memberof BimModelsSelect
816
- */
817
- _this.onModelSelected = null;
818
-
819
- /**
820
- * Callback for model selected with all details
821
- * @memberof BimModelsSelect
822
- */
823
- _this.onModelSelectedDetails = null;
824
- return _this;
825
- }
826
-
827
- /**
828
- * get the remote url of the Models module
829
- * @memberof BimModelsSelect
830
- * @param {string} teamSlug Team slug
831
- * @param {string} projectId Project id
832
- * @return {string} url to models module
833
- */
834
- _createClass(BimModelsSelect, [{
835
- key: "getUrl",
836
- value: function getUrl(teamSlug, projectId) {
837
- var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
838
- 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";
839
- return url;
840
- }
841
-
842
- /**
843
- * Load the Models module into the bound iframe, loading the passed project
844
- * @memberof BimModelsSelect
845
- * @param {string} teamSlug Team slug
846
- * @param {string} projectId Project id
847
- */
848
- }, {
849
- key: "load",
850
- value: function load(teamSlug, projectId) {
851
- var iframeUrl = this.getUrl(teamSlug, projectId);
852
- this.loadIFrame(iframeUrl);
853
- this.initMessageHandlers();
854
- }
855
- }, {
856
- key: "initMessageHandlers",
857
- value: function initMessageHandlers() {
858
- var _this2 = this;
859
- _get(_getPrototypeOf(BimModelsSelect.prototype), "initMessageHandlers", this).call(this);
860
-
861
- // Add message handler for model selected event
862
- this._client.addMessageHandler("ModelSelected", function (msg) {
863
- if (_this2.onModelSelected) {
864
- _this2.onModelSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
865
- }
866
- });
867
-
868
- // Add message handler for model selected details event
869
- this._client.addMessageHandler("ModelSelectedDetails", function (msg) {
870
- if (_this2.onModelSelectedDetails) {
871
- _this2.onModelSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
872
- }
873
- });
874
- }
875
- }]);
876
- return BimModelsSelect;
877
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
878
-
879
- /***/ }),
880
-
881
- /***/ "./src/BimObjectProperties.js":
882
- /*!************************************!*\
883
- !*** ./src/BimObjectProperties.js ***!
884
- \************************************/
885
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
886
-
887
- __webpack_require__.r(__webpack_exports__);
888
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
889
- /* harmony export */ BimObjectProperties: () => (/* binding */ BimObjectProperties)
890
- /* harmony export */ });
891
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
892
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
893
- 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); }
894
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
895
- 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); } }
896
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
897
- 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); }
898
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
899
- 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); }
900
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
901
- 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); }; }
902
- 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); }
903
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
904
- 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; } }
905
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
906
- 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; }
907
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
908
- 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); }
909
-
910
-
911
-
912
- /**
913
- * @namespace BimExplorer
914
- * @param {string} domId DOM Element Id of the containing iframe
915
- * @param {string} token a valid bimplus accesstoken
916
- * @param {Object} client The external client to connect with
917
- * @param {string} env environment to use: dev, stage or prod
918
- */
919
- var BimObjectProperties = /*#__PURE__*/function (_WebControl) {
920
- _inherits(BimObjectProperties, _WebControl);
921
- var _super = _createSuper(BimObjectProperties);
922
- function BimObjectProperties(domId, token, client, env) {
923
- var _this;
924
- _classCallCheck(this, BimObjectProperties);
925
- _this = _super.call(this, domId, client, env, token);
926
- /**
927
- * get the remote url of the Bim Portal
928
- * @memberof BimExplorer
929
- * @param {string} teamId Team id
930
- * @param {string} projectId Project id
931
- * @return {string} url to embedded bim explorer
932
- */
933
- _defineProperty(_assertThisInitialized(_this), "getUrl", function (teamId, projectId, objectId) {
934
- var url = _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env);
935
- 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;
936
- return url;
937
- });
938
- return _this;
939
- }
940
- _createClass(BimObjectProperties, [{
941
- key: "load",
942
- value:
943
- /**
944
- * Load the Object Properties into the bound iframe
945
- * @memberof BimExplorer
946
- * @param {string} teamId Team id
947
- * @param {string} projectId Project id
948
- * @param {string} objectId Object id
949
- */
950
- function load(teamId, projectId, objectId) {
951
- var explorerUrl = this.getUrl(teamId, projectId, objectId);
952
- this.loadIFrame(explorerUrl);
953
- this.initMessageHandlers();
954
- }
955
- }, {
956
- key: "initMessageHandlers",
957
- value: function initMessageHandlers() {
958
- _get(_getPrototypeOf(BimObjectProperties.prototype), "initMessageHandlers", this).call(this);
959
- }
960
- }]);
961
- return BimObjectProperties;
962
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
963
-
964
- /***/ }),
965
-
966
- /***/ "./src/BimPortal.js":
967
- /*!**************************!*\
968
- !*** ./src/BimPortal.js ***!
969
- \**************************/
970
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
971
-
972
- __webpack_require__.r(__webpack_exports__);
973
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
974
- /* harmony export */ BimPortal: () => (/* binding */ BimPortal)
975
- /* harmony export */ });
976
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
977
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
978
- 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); }
979
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
980
- 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); } }
981
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
982
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
983
- 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); }
984
- 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); }
985
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
986
- 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); }
987
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
988
- 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); }; }
989
- 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); }
990
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
991
- 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; } }
992
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
993
-
994
-
995
-
996
- /**
997
- * @namespace BimPortal
998
- * @param {string} domId DOM Element Id of the containing iframe
999
- * @param {string} token a valid bimplus accesstoken
1000
- * @param {Object} client The external client to connect with
1001
- * @param {string} env environment to use: dev, stage or prod
1002
- */
1003
- var BimPortal = /*#__PURE__*/function (_WebControl) {
1004
- _inherits(BimPortal, _WebControl);
1005
- var _super = _createSuper(BimPortal);
1006
- function BimPortal(domId, token, client, env) {
1007
- var _this;
1008
- _classCallCheck(this, BimPortal);
1009
- _this = _super.call(this, domId, client, env, token);
1010
-
1011
- /**
1012
- * Callback for changed team
1013
- * @memberof BimPortal
1014
- */
1015
- _this.onTeamChanged = null;
1016
-
1017
- /**
1018
- * Callback for changed project
1019
- * @memberof BimPortal
1020
- */
1021
- _this.onProjectSelected = null;
1022
-
1023
- /**
1024
- * Callback for attachment selected
1025
- * @memberof BimPortal
1026
- */
1027
- _this.onAttachmentSelected = null;
1028
-
1029
- /**
1030
- * Callback for attachment selected with all details
1031
- * @memberof BimPortal
1032
- */
1033
- _this.onAttachmentSelectedDetails = null;
1034
- return _this;
1035
- }
1036
-
1037
- /**
1038
- * get the remote url of the Bim Portal
1039
- * @memberof BimPortal
1040
- * @return {string} url to embedded bim portal
1041
- */
1042
- _createClass(BimPortal, [{
1043
- key: "getUrl",
1044
- value: function getUrl() {
1045
- 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);
1046
- }
1047
-
1048
- /**
1049
- * Load the Bim Portal into the bound iframe
1050
- * @memberof BimPortal
1051
- */
1052
- }, {
1053
- key: "load",
1054
- value: function load() {
1055
- var url = this.getUrl();
1056
- this.loadIFrame(url);
1057
- this.initMessageHandlers();
1058
- }
1059
- }, {
1060
- key: "initMessageHandlers",
1061
- value: function initMessageHandlers() {
1062
- var _this2 = this;
1063
- _get(_getPrototypeOf(BimPortal.prototype), "initMessageHandlers", this).call(this);
1064
-
1065
- // Add message handler for team changed event
1066
- this._client.addMessageHandler("TeamChanged", function (msg) {
1067
- if (_this2.onTeamChanged) {
1068
- _this2.onTeamChanged(msg.id);
1069
- }
1070
- });
1071
-
1072
- // Add message handler for project selected event
1073
- this._client.addMessageHandler("ProjectSelected", function (msg) {
1074
- if (_this2.onProjectSelected) {
1075
- _this2.onProjectSelected(msg.id);
1076
- }
1077
- });
1078
-
1079
- // Add message handler for attachment selected event
1080
- this._client.addMessageHandler("AttachmentSelected", function (msg) {
1081
- if (_this2.onAttachmentSelected) {
1082
- _this2.onAttachmentSelected(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
1083
- }
1084
- });
1085
-
1086
- // Add message handler for attachment selected details event
1087
- this._client.addMessageHandler("AttachmentSelectedDetails", function (msg) {
1088
- if (_this2.onAttachmentSelectedDetails) {
1089
- _this2.onAttachmentSelectedDetails(msg !== null && msg !== void 0 && msg.id ? msg.id : msg);
1090
- }
1091
- });
1092
- }
1093
- }]);
1094
- return BimPortal;
1095
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1096
-
1097
- /***/ }),
1098
-
1099
- /***/ "./src/BimTaskList.js":
1100
- /*!****************************!*\
1101
- !*** ./src/BimTaskList.js ***!
1102
- \****************************/
1103
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1104
-
1105
- __webpack_require__.r(__webpack_exports__);
1106
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1107
- /* harmony export */ BimTaskList: () => (/* binding */ BimTaskList)
1108
- /* harmony export */ });
1109
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1110
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
1111
- 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); }
1112
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1113
- 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); } }
1114
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1115
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1116
- 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); }
1117
- 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); }
1118
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1119
- 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); }
1120
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1121
- 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); }; }
1122
- 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); }
1123
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1124
- 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; } }
1125
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1126
-
1127
-
1128
-
1129
- /**
1130
- * @namespace BimTaskList
1131
- * @param {string} domId DOM Element Id of the containing iframe
1132
- * @param {string} token a valid bimplus accesstoken
1133
- * @param {Object} client The external client to connect with
1134
- * @param {string} env environment to use: dev, stage or prod
1135
- */
1136
- var BimTaskList = /*#__PURE__*/function (_WebControl) {
1137
- _inherits(BimTaskList, _WebControl);
1138
- var _super = _createSuper(BimTaskList);
1139
- function BimTaskList(domId, token, client, env) {
1140
- var _this;
1141
- _classCallCheck(this, BimTaskList);
1142
- _this = _super.call(this, domId, client, env, token);
1143
-
1144
- /**
1145
- * Callback for object selected
1146
- * @memberof BimTaskList
1147
- */
1148
- _this.onObjectSelected = null;
1149
-
1150
- /**
1151
- * Callback for multiple objects selected
1152
- * @memberof BimTaskList
1153
- */
1154
- _this.onObjectsSelected = null;
1155
-
1156
- /**
1157
- * Callback for issue selected
1158
- * @memberof BimTaskList
1159
- */
1160
- _this.onIssueSelected = null;
1161
-
1162
- /**
1163
- * Callback for check alive message response
1164
- * @memberof BimTaskList
1165
- */
1166
- _this.onCheckAlive = null;
1167
-
1168
- /**
1169
- * Callback for data loading finished
1170
- * @memberof BimTaskList
1171
- */
1172
- _this.onDataLoaded = null;
1173
- return _this;
1174
- }
1175
-
1176
- /**
1177
- * get the remote url of the task list control
1178
- * @memberof BimTaskList
1179
- * @param {string} teamId Team id
1180
- * @param {string} projectId Project id
1181
- * @param {string} source source identification / application id + version info
1182
- * @return {string} url to embedded task list
1183
- */
1184
- _createClass(BimTaskList, [{
1185
- key: "getUrl",
1186
- value: function getUrl(teamId, projectId, source) {
1187
- 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;
1188
- return url;
1189
- }
1190
-
1191
- /**
1192
- * Load the Bim TaskList into the bound iframe, loading the passed project
1193
- * @memberof BimTaskList
1194
- * @param {string} teamId Team id
1195
- * @param {string} projectId Project id
1196
- * @param {string} source source identification / application id + version info
1197
- */
1198
- }, {
1199
- key: "load",
1200
- value: function load(teamId, projectId, source) {
1201
- var iframeUrl = this.getUrl(teamId, projectId, source);
1202
- this.loadIFrame(iframeUrl);
1203
- this.initMessageHandlers();
1204
- }
1205
- }, {
1206
- key: "initMessageHandlers",
1207
- value: function initMessageHandlers() {
1208
- var _this2 = this;
1209
- _get(_getPrototypeOf(BimTaskList.prototype), "initMessageHandlers", this).call(this);
1210
- this._client.addMessageHandler("ObjectSelected", function (msg) {
1211
- if (_this2.onObjectSelected) {
1212
- _this2.onObjectSelected(msg.Id, msg.multiSelect, msg.selected);
1213
- }
1214
- });
1215
- this._client.addMessageHandler("ObjectsSelected", function (msg) {
1216
- if (_this2.onObjectsSelected) {
1217
- _this2.onObjectsSelected(msg.ids, msg.multiSelect, msg.selected);
1218
- }
1219
- });
1220
- this._client.addMessageHandler("IssueSelected", function (msg) {
1221
- if (_this2.onIssueSelected) {
1222
- _this2.onIssueSelected(msg.id);
1223
- }
1224
- });
1225
- this._client.addMessageHandler("CheckAlive", function (msg) {
1226
- if (_this2.onCheckAlive) {
1227
- _this2.onCheckAlive(msg.client);
1228
- }
1229
- });
1230
- this._client.addMessageHandler("DataLoaded", function () {
1231
- if (_this2.onDataLoaded) {
1232
- _this2.onDataLoaded();
1233
- }
1234
- });
1235
- }
1236
-
1237
- /**
1238
- * Select objects
1239
- * @memberof BimTaskList
1240
- * @param {Array} ids Ids of the objects to select
1241
- * @param {boolean} multiSelect Switch on/off multiselect mode (simulate ctrl-key)
1242
- * @param {boolean} isolate Isolate the selected objects
1243
- * @param {boolean} blockProperties Disable the opening of the object properties panel
1244
- */
1245
- }, {
1246
- key: "selectObjects",
1247
- value: function selectObjects(ids, multiSelect, isolate, blockProperties) {
1248
- this.sendMessage('ObjectsSelected', {
1249
- ids: ids,
1250
- multiSelect: multiSelect,
1251
- isolate: isolate,
1252
- blockProperties: blockProperties
1253
- });
1254
- }
1255
-
1256
- /**
1257
- * Check if BimTaskList is connected and alive
1258
- * @memberof BimTaskList
1259
- */
1260
- }, {
1261
- key: "checkAlive",
1262
- value: function checkAlive() {
1263
- this.sendMessage('CheckAlive', {});
1264
- }
1265
-
1266
- /**
1267
- * Select issue
1268
- * @memberof BimTaskList
1269
- * @param {string} id Id of the issue to select
1270
- */
1271
- }, {
1272
- key: "selectIssue",
1273
- value: function selectIssue(id) {
1274
- this.sendMessage('IssueSelected', {
1275
- id: id
1276
- });
1277
- }
1278
- }]);
1279
- return BimTaskList;
1280
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1281
-
1282
- /***/ }),
1283
-
1284
- /***/ "./src/BimTaskProperties.js":
1285
- /*!**********************************!*\
1286
- !*** ./src/BimTaskProperties.js ***!
1287
- \**********************************/
1288
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1289
-
1290
- __webpack_require__.r(__webpack_exports__);
1291
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1292
- /* harmony export */ BimTaskProperties: () => (/* binding */ BimTaskProperties)
1293
- /* harmony export */ });
1294
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1295
- /* harmony import */ var _WebControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WebControl */ "./src/WebControl.js");
1296
- 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); }
1297
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1298
- 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); } }
1299
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1300
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1301
- 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); }
1302
- 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); }
1303
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1304
- 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); }
1305
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1306
- 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); }; }
1307
- 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); }
1308
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1309
- 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; } }
1310
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1311
-
1312
-
1313
-
1314
- /**
1315
- * @namespace BimTaskProperties
1316
- * @param {string} domId DOM Element Id of the containing iframe
1317
- * @param {string} token a valid bimplus accesstoken
1318
- * @param {Object} client The external client to connect with
1319
- * @param {string} env environment to use: dev, stage or prod
1320
- */
1321
- var BimTaskProperties = /*#__PURE__*/function (_WebControl) {
1322
- _inherits(BimTaskProperties, _WebControl);
1323
- var _super = _createSuper(BimTaskProperties);
1324
- function BimTaskProperties(domId, token, client, env) {
1325
- var _this;
1326
- _classCallCheck(this, BimTaskProperties);
1327
- _this = _super.call(this, domId, client, env, token);
1328
-
1329
- /**
1330
- * Callback for object selected
1331
- * @memberof BimTaskProperties
1332
- */
1333
- _this.onObjectSelected = null;
1334
-
1335
- /**
1336
- * Callback for multiple objects selected
1337
- * @memberof BimTaskProperties
1338
- */
1339
- _this.onObjectsSelected = null;
1340
-
1341
- /**
1342
- * Callback for issue selected
1343
- * @memberof BimTaskProperties
1344
- */
1345
- _this.onIssueSelected = null;
1346
-
1347
- /**
1348
- * Callback for issue pin selected
1349
- * @memberof BimTaskProperties
1350
- */
1351
- _this.onPinSelected = null;
1352
-
1353
- /**
1354
- * Callback for check alive message response
1355
- * @memberof BimTaskProperties
1356
- */
1357
- _this.onCheckAlive = null;
1358
-
1359
- /**
1360
- * Callback for data loading finished
1361
- * @memberof BimTaskProperties
1362
- */
1363
- _this.onDataLoaded = null;
1364
-
1365
- /**
1366
- * Callback for clicked hyperlink
1367
- * @memberof BimTaskProperties
1368
- */
1369
- _this.onClickedHyperlink = null;
1370
- return _this;
1371
- }
1372
-
1373
- /**
1374
- * get the remote url of the task properties control
1375
- * @memberof BimTaskProperties
1376
- * @param {string} teamId Team id
1377
- * @param {string} projectId Project id
1378
- * @param {string} issueId Task id
1379
- * @param {string} source source identification / application id + version info
1380
- * @return {string} url to embedded task properties
1381
- */
1382
- _createClass(BimTaskProperties, [{
1383
- key: "getUrl",
1384
- value: function getUrl(teamId, projectId, issueId, source) {
1385
- 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;
1386
- return url;
1387
- }
1388
-
1389
- /**
1390
- * Load the Bim TaskProperties into the bound iframe, loading the passed project
1391
- * @memberof BimTaskProperties
1392
- * @param {string} teamId Team id
1393
- * @param {string} projectId Project id
1394
- * @param {string} issueId Task id
1395
- * @param {string} source source identification / application id + version info
1396
- */
1397
- }, {
1398
- key: "load",
1399
- value: function load(teamId, projectId, issueId, source) {
1400
- var iframeUrl = this.getUrl(teamId, projectId, issueId, source);
1401
- this.loadIFrame(iframeUrl);
1402
- this.initMessageHandlers();
1403
- }
1404
- }, {
1405
- key: "initMessageHandlers",
1406
- value: function initMessageHandlers() {
1407
- var _this2 = this;
1408
- _get(_getPrototypeOf(BimTaskProperties.prototype), "initMessageHandlers", this).call(this);
1409
- this._client.addMessageHandler("PinSelected", function (msg) {
1410
- if (_this2.onPinSelected) {
1411
- _this2.onPinSelected(msg.id);
1412
- }
1413
- });
1414
- this._client.addMessageHandler("ObjectSelected", function (msg) {
1415
- if (_this2.onObjectSelected) {
1416
- _this2.onObjectSelected(msg.Id, msg.multiSelect, msg.selected);
1417
- }
1418
- });
1419
- this._client.addMessageHandler("ObjectsSelected", function (msg) {
1420
- if (_this2.onObjectsSelected) {
1421
- _this2.onObjectsSelected(msg.ids, msg.multiSelect, msg.selected);
1422
- }
1423
- });
1424
- this._client.addMessageHandler("IssueSelected", function (msg) {
1425
- if (_this2.onIssueSelected) {
1426
- _this2.onIssueSelected(msg.id);
1427
- }
1428
- });
1429
- this._client.addMessageHandler("CheckAlive", function (msg) {
1430
- if (_this2.onCheckAlive) {
1431
- _this2.onCheckAlive(msg.client);
1432
- }
1433
- });
1434
- this._client.addMessageHandler("DataLoaded", function () {
1435
- if (_this2.onDataLoaded) {
1436
- _this2.onDataLoaded();
1437
- }
1438
- });
1439
- this._client.addMessageHandler("ClickedHyperlink", function (msg) {
1440
- if (_this2.onClickedHyperlink) {
1441
- _this2.onClickedHyperlink(msg.url);
1442
- }
1443
- });
1444
- }
1445
-
1446
- /**
1447
- * Select an issue pin
1448
- * @memberof BimTaskProperties
1449
- * @param {string} id Pin to select
1450
- */
1451
- }, {
1452
- key: "selectPin",
1453
- value: function selectPin(id) {
1454
- this.sendMessage('PinSelected', {
1455
- id: id
1456
- });
1457
- }
1458
-
1459
- /**
1460
- * Select objects
1461
- * @memberof BimTaskProperties
1462
- * @param {Array} ids Ids of the objects to select
1463
- * @param {boolean} multiSelect Switch on/off multiselect mode (simulate ctrl-key)
1464
- * @param {boolean} isolate Isolate the selected objects
1465
- * @param {boolean} blockProperties Disable the opening of the object properties panel
1466
- */
1467
- }, {
1468
- key: "selectObjects",
1469
- value: function selectObjects(ids, multiSelect, isolate, blockProperties) {
1470
- this.sendMessage('ObjectsSelected', {
1471
- ids: ids,
1472
- multiSelect: multiSelect,
1473
- isolate: isolate,
1474
- blockProperties: blockProperties
1475
- });
1476
- }
1477
-
1478
- /**
1479
- * Check if BimTaskProperties is connected and alive
1480
- * @memberof BimTaskProperties
1481
- */
1482
- }, {
1483
- key: "checkAlive",
1484
- value: function checkAlive() {
1485
- this.sendMessage('CheckAlive', {});
1486
- }
1487
-
1488
- /**
1489
- * Select issue
1490
- * @memberof BimTaskProperties
1491
- * @param {string} id Id of the issue to select
1492
- */
1493
- }, {
1494
- key: "selectIssue",
1495
- value: function selectIssue(id) {
1496
- this.sendMessage('IssueSelected', {
1497
- id: id
1498
- });
1499
- }
1500
- }]);
1501
- return BimTaskProperties;
1502
- }(_WebControl__WEBPACK_IMPORTED_MODULE_1__.WebControl);
1503
-
1504
- /***/ }),
1505
-
1506
- /***/ "./src/ExportManager.js":
1507
- /*!******************************!*\
1508
- !*** ./src/ExportManager.js ***!
1509
- \******************************/
1510
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1511
-
1512
- __webpack_require__.r(__webpack_exports__);
1513
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1514
- /* harmony export */ ExportManager: () => (/* binding */ ExportManager)
1515
- /* harmony export */ });
1516
- /* harmony import */ var _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./UrlBuilder */ "./src/UrlBuilder.js");
1517
- /* harmony import */ var _BimExplorer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BimExplorer */ "./src/BimExplorer.js");
1518
- 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); }
1519
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1520
- 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); } }
1521
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1522
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1523
- 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); }
1524
- 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); }
1525
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
1526
- 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); }
1527
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1528
- 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); }; }
1529
- 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); }
1530
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1531
- 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; } }
1532
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1533
-
1534
-
1535
-
1536
- /**
1537
- * @namespace ExportManager
1538
- * @param {string} domId DOM Element Id of the containing iframe
1539
- * @param {string} token a valid bimplus accesstoken
1540
- * @param {Object} client The external client to connect with
1541
- * @param {string} env environment to use: dev, stage or prod
1542
- */
1543
- var ExportManager = /*#__PURE__*/function (_BimExplorer) {
1544
- _inherits(ExportManager, _BimExplorer);
1545
- var _super = _createSuper(ExportManager);
1546
- function ExportManager(domId, token, client, env) {
1547
- var _this;
1548
- _classCallCheck(this, ExportManager);
1549
- _this = _super.call(this, domId, token, client, env);
1550
-
1551
- /**
1552
- * Callback for started export
1553
- * @memberof ExportManager
1554
- */
1555
- _this.onExportStarted = null;
1556
- return _this;
1557
- }
1558
-
1559
- /**
1560
- * get the remote url of the Export Manager
1561
- * @memberof ExportManager
1562
- * @param {string} teamId Team id
1563
- * @param {string} projectId Project id
1564
- * @return {string} url to embedded bim explorer
1565
- */
1566
- _createClass(ExportManager, [{
1567
- key: "getUrl",
1568
- value: function getUrl(teamId, projectId) {
1569
- var url = this._env && this._env === "localhost" ? "http://127.0.0.1:4200/" : _UrlBuilder__WEBPACK_IMPORTED_MODULE_0__.UrlBuilder.url(this._env) + "export-manager/";
1570
- 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;
1571
- return url;
1572
- }
1573
- }, {
1574
- key: "initMessageHandlers",
1575
- value: function initMessageHandlers() {
1576
- var _this2 = this;
1577
- _get(_getPrototypeOf(ExportManager.prototype), "initMessageHandlers", this).call(this);
1578
-
1579
- // Add message handler for object selected event
1580
- this._client.addMessageHandler("ExportStarted", function (msg) {
1581
- if (_this2.onExportStarted) {
1582
- _this2.onExportStarted(msg.id);
1583
- }
1584
- });
1585
- }
1586
- }]);
1587
- return ExportManager;
1588
- }(_BimExplorer__WEBPACK_IMPORTED_MODULE_1__.BimExplorer);
1589
-
1590
- /***/ }),
1591
-
1592
- /***/ "./src/ExternalClient.js":
1593
- /*!*******************************!*\
1594
- !*** ./src/ExternalClient.js ***!
1595
- \*******************************/
1596
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1597
-
1598
- __webpack_require__.r(__webpack_exports__);
1599
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1600
- /* harmony export */ ExternalClient: () => (/* binding */ ExternalClient)
1601
- /* harmony export */ });
1602
- 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); }
1603
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1604
- 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); } }
1605
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1606
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1607
- 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); }
1608
- /**
1609
- * @namespace ExternalClient
1610
- * @param {string} clientName client id
1611
- */
1612
- var ExternalClient = /*#__PURE__*/function () {
1613
- function ExternalClient(clientName) {
1614
- _classCallCheck(this, ExternalClient);
1615
- this._messageHandlers = {};
1616
- this._errorHandler = null;
1617
- this._clientName = clientName;
1618
- }
1619
-
1620
- /**
1621
- * initialize and start listening to incomming messages
1622
- * @memberof ExternalClient
1623
- */
1624
- _createClass(ExternalClient, [{
1625
- key: "initialize",
1626
- value: function initialize() {
1627
- var self = this;
1628
- console.log("ExternalClient initialized");
1629
- window.addEventListener('message', function (e) {
1630
- // Print info of message send by Renderer/Explorer
1631
- // console.log(`ExternalClient received a message from origin: ${e.origin}\n data: ${e.data}`, e);
1632
-
1633
- var data = e.data;
1634
- if (data === "") {
1635
- self.errorReceived({
1636
- error: "External client got an empty message !"
1637
- });
1638
- } else {
1639
- self.messageReceived(JSON.parse(data));
1640
- }
1641
- });
1642
- }
1643
-
1644
- /**
1645
- * add a message handler
1646
- * @memberof ExternalClient
1647
- * @param {string} message message id
1648
- * @param {function} handler handler function
1649
- */
1650
- }, {
1651
- key: "addMessageHandler",
1652
- value: function addMessageHandler(message, handler) {
1653
- this._messageHandlers[message] = handler;
1654
- }
1655
-
1656
- /**
1657
- * remove a message handler
1658
- * @memberof ExternalClient
1659
- * @param {string} message message id
1660
- */
1661
- }, {
1662
- key: "removeMessageHandler",
1663
- value: function removeMessageHandler(message) {
1664
- delete this._messageHandlers[message];
1665
- }
1666
-
1667
- /**
1668
- * Handle a received messages
1669
- * @memberof ExternalClient
1670
- * @param {Object} message message object
1671
- */
1672
- }, {
1673
- key: "messageReceived",
1674
- value: function messageReceived(message) {
1675
- var handler = this._messageHandlers[message.message];
1676
- if (handler) {
1677
- handler(message.data);
1678
- }
1679
- }
1680
-
1681
- /**
1682
- * add an error handler
1683
- * @memberof ExternalClient
1684
- * @param {function} handler handler function
1685
- */
1686
- }, {
1687
- key: "addErrorHandler",
1688
- value: function addErrorHandler(handler) {
1689
- this._errorHandler = handler;
1690
- }
1691
-
1692
- /**
1693
- * remove error handler
1694
- * @memberof ExternalClient
1695
- */
1696
- }, {
1697
- key: "removeErrorHandler",
1698
- value: function removeErrorHandler() {
1699
- this._errorHandler = null;
1700
- }
1701
-
1702
- /**
1703
- * Handle a received messages
1704
- * @memberof ExternalClient
1705
- * @param {Object} error error object
1706
- */
1707
- }, {
1708
- key: "errorReceived",
1709
- value: function errorReceived(error) {
1710
- var handler = this._errorHandler;
1711
- if (handler) {
1712
- handler(error);
1713
- }
1714
- }
1715
-
1716
- /**
1717
- * Send a message to bimplus web application
1718
- * @memberof ExternalClient
1719
- * @param {string} elemId DOM Element Id of the containing iframe
1720
- * @param {string} message Message name
1721
- * @param {Object} data message data
1722
- */
1723
- }, {
1724
- key: "sendMessage",
1725
- value: function sendMessage(elemId, message, data) {
1726
- var elem = document.getElementById(elemId);
1727
- if (elem !== null && elem !== void 0 && elem.contentWindow) {
1728
- // SendMessage called for origin
1729
- // console.log (`ExternalClient post message:${message} origin: ${window.location.origin}`);
1730
-
1731
- elem.contentWindow.postMessage(JSON.stringify({
1732
- messageType: 'bimplusMessageIn',
1733
- message: message,
1734
- data: data
1735
- }), "*");
1736
- return true;
1737
- }
1738
- return false;
1739
- }
1740
-
1741
- /**
1742
- * get the client id
1743
- * @memberof ExternalClient
1744
- * @return {string} connected client id
1745
- */
1746
- }, {
1747
- key: "getClientName",
1748
- value: function getClientName() {
1749
- return this._clientName;
1750
- }
1751
- }]);
1752
- return ExternalClient;
1753
- }();
1754
-
1755
- /***/ }),
1756
-
1757
- /***/ "./src/UrlBuilder.js":
1758
- /*!***************************!*\
1759
- !*** ./src/UrlBuilder.js ***!
1760
- \***************************/
1761
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1762
-
1763
- __webpack_require__.r(__webpack_exports__);
1764
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1765
- /* harmony export */ UrlBuilder: () => (/* binding */ UrlBuilder)
1766
- /* harmony export */ });
1767
- 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); }
1768
- 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); } }
1769
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1770
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1771
- 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; }
1772
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1773
- 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); }
1774
- /**
1775
- * @namespace UrlBuilder
1776
- */
1777
- var UrlBuilder = /*#__PURE__*/_createClass(function UrlBuilder() {
1778
- _classCallCheck(this, UrlBuilder);
1779
- });
1780
- /**
1781
- * Create embedded query parameter
1782
- * @memberof UrlBuilder
1783
- * @return {string} embedded query parameter
1784
- */
1785
- _defineProperty(UrlBuilder, "embedded", "?embedded=1");
1786
- /**
1787
- * Create portal URL depending on environment (DEV/STAGE/PROD)
1788
- * @memberof UrlBuilder
1789
- * @param {string} env Current environment
1790
- * @return {string} url to portal
1791
- */
1792
- _defineProperty(UrlBuilder, "url", function (env) {
1793
- var url = "https://portal";
1794
- if (env) {
1795
- if (env === "dev") {
1796
- url += "-dev";
1797
- }
1798
- if (env === "stage") {
1799
- url += "-stage";
1800
- }
1801
- }
1802
- url += ".bimplus.net/";
1803
- return url;
1804
- });
1805
- /**
1806
- * Create token
1807
- * @memberof UrlBuilder
1808
- * @param {string} token Token
1809
- * @return {string} token string
1810
- */
1811
- _defineProperty(UrlBuilder, "token", function (token) {
1812
- return "&token=" + token;
1813
- });
1814
- /**
1815
- * Create external client
1816
- * @memberof UrlBuilder
1817
- * @param {string} client Client
1818
- * @return {string} client string
1819
- */
1820
- _defineProperty(UrlBuilder, "client", function (client) {
1821
- return client ? "&external_client=PostMessage:" + client.getClientName() : "";
1822
- });
1823
- /**
1824
- * Create source
1825
- * @memberof UrlBuilder
1826
- * @param {string} source Source
1827
- * @return {string} source string
1828
- */
1829
- _defineProperty(UrlBuilder, "source", function (source) {
1830
- return source && typeof source === "string" ? "&source=" + source : "";
1831
- });
1832
-
1833
- /***/ }),
1834
-
1835
- /***/ "./src/WebControl.js":
1836
- /*!***************************!*\
1837
- !*** ./src/WebControl.js ***!
1838
- \***************************/
1839
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1840
-
1841
- __webpack_require__.r(__webpack_exports__);
1842
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1843
- /* harmony export */ WebControl: () => (/* binding */ WebControl)
1844
- /* harmony export */ });
1845
- 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); }
1846
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1847
- 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); } }
1848
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1849
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1850
- 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); }
1851
- var WebControl = /*#__PURE__*/function () {
1852
- function WebControl(domId, client, env, token) {
1853
- _classCallCheck(this, WebControl);
1854
- this._client = client;
1855
- this._domId = domId;
1856
- this._env = env;
1857
- this._token = token;
1858
- }
1859
- _createClass(WebControl, [{
1860
- key: "sendMessage",
1861
- value: function sendMessage(message, data) {
1862
- if (this._client) {
1863
- this._client.sendMessage(this._domId, message, data);
1864
- } else {
1865
- var errorMsg = "Error for SendMessage. Client not defined.";
1866
- console.error(errorMsg);
1867
- throw ReferenceError(errorMsg);
1868
- }
1869
- }
1870
- }, {
1871
- key: "getDOMElementId",
1872
- value: function getDOMElementId() {
1873
- return this._domId;
1874
- }
1875
- }, {
1876
- key: "initMessageHandlers",
1877
- value: function initMessageHandlers() {
1878
- return; // must be implemented in derived class
1879
- }
1880
- }, {
1881
- key: "loadIFrame",
1882
- value: function loadIFrame(url) {
1883
- var iframe = document.getElementById(this._domId);
1884
- if (iframe) {
1885
- iframe.src = url;
1886
- } else {
1887
- var errorMsg = "DOM element not found: " + this._domId;
1888
- console.error(errorMsg);
1889
- throw ReferenceError(errorMsg);
1890
- }
1891
- }
1892
- }]);
1893
- return WebControl;
1894
- }();
1895
-
1896
- /***/ })
1897
-
1898
- /******/ });
1899
- /************************************************************************/
1900
- /******/ // The module cache
1901
- /******/ var __webpack_module_cache__ = {};
1902
- /******/
1903
- /******/ // The require function
1904
- /******/ function __webpack_require__(moduleId) {
1905
- /******/ // Check if module is in cache
1906
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1907
- /******/ if (cachedModule !== undefined) {
1908
- /******/ return cachedModule.exports;
1909
- /******/ }
1910
- /******/ // Create a new module (and put it into the cache)
1911
- /******/ var module = __webpack_module_cache__[moduleId] = {
1912
- /******/ // no module.id needed
1913
- /******/ // no module.loaded needed
1914
- /******/ exports: {}
1915
- /******/ };
1916
- /******/
1917
- /******/ // Execute the module function
1918
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1919
- /******/
1920
- /******/ // Return the exports of the module
1921
- /******/ return module.exports;
1922
- /******/ }
1923
- /******/
1924
- /************************************************************************/
1925
- /******/ /* webpack/runtime/define property getters */
1926
- /******/ (() => {
1927
- /******/ // define getter functions for harmony exports
1928
- /******/ __webpack_require__.d = (exports, definition) => {
1929
- /******/ for(var key in definition) {
1930
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1931
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1932
- /******/ }
1933
- /******/ }
1934
- /******/ };
1935
- /******/ })();
1936
- /******/
1937
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1938
- /******/ (() => {
1939
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1940
- /******/ })();
1941
- /******/
1942
- /******/ /* webpack/runtime/make namespace object */
1943
- /******/ (() => {
1944
- /******/ // define __esModule on exports
1945
- /******/ __webpack_require__.r = (exports) => {
1946
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1947
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1948
- /******/ }
1949
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1950
- /******/ };
1951
- /******/ })();
1952
- /******/
1953
- /************************************************************************/
1954
- var __webpack_exports__ = {};
1955
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1956
- (() => {
1957
- /*!**************************!*\
1958
- !*** ./src/WebClient.js ***!
1959
- \**************************/
1960
- __webpack_require__.r(__webpack_exports__);
1961
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1962
- /* harmony export */ BimExplorer: () => (/* reexport safe */ _BimExplorer__WEBPACK_IMPORTED_MODULE_2__.BimExplorer),
1963
- /* harmony export */ BimFilesIsoSelect: () => (/* reexport safe */ _BimFilesIsoSelect__WEBPACK_IMPORTED_MODULE_10__.BimFilesIsoSelect),
1964
- /* harmony export */ BimFilesOverlaySelect: () => (/* reexport safe */ _BimFilesOverlaySelect__WEBPACK_IMPORTED_MODULE_8__.BimFilesOverlaySelect),
1965
- /* harmony export */ BimFilesSelect: () => (/* reexport safe */ _BimFilesSelect__WEBPACK_IMPORTED_MODULE_7__.BimFilesSelect),
1966
- /* harmony export */ BimModelsIsoSelect: () => (/* reexport safe */ _BimModelsIsoSelect__WEBPACK_IMPORTED_MODULE_11__.BimModelsIsoSelect),
1967
- /* harmony export */ BimModelsSelect: () => (/* reexport safe */ _BimModelsSelect__WEBPACK_IMPORTED_MODULE_9__.BimModelsSelect),
1968
- /* harmony export */ BimObjectProperties: () => (/* reexport safe */ _BimObjectProperties__WEBPACK_IMPORTED_MODULE_5__.BimObjectProperties),
1969
- /* harmony export */ BimPortal: () => (/* reexport safe */ _BimPortal__WEBPACK_IMPORTED_MODULE_1__.BimPortal),
1970
- /* harmony export */ BimTaskList: () => (/* reexport safe */ _BimTaskList__WEBPACK_IMPORTED_MODULE_3__.BimTaskList),
1971
- /* harmony export */ BimTaskProperties: () => (/* reexport safe */ _BimTaskProperties__WEBPACK_IMPORTED_MODULE_4__.BimTaskProperties),
1972
- /* harmony export */ ExportManager: () => (/* reexport safe */ _ExportManager__WEBPACK_IMPORTED_MODULE_6__.ExportManager),
1973
- /* harmony export */ ExternalClient: () => (/* reexport safe */ _ExternalClient__WEBPACK_IMPORTED_MODULE_0__.ExternalClient),
1974
- /* harmony export */ getUrlParameter: () => (/* binding */ getUrlParameter)
1975
- /* harmony export */ });
1976
- /* harmony import */ var _ExternalClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExternalClient */ "./src/ExternalClient.js");
1977
- /* harmony import */ var _BimPortal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BimPortal */ "./src/BimPortal.js");
1978
- /* harmony import */ var _BimExplorer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BimExplorer */ "./src/BimExplorer.js");
1979
- /* harmony import */ var _BimTaskList__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BimTaskList */ "./src/BimTaskList.js");
1980
- /* harmony import */ var _BimTaskProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BimTaskProperties */ "./src/BimTaskProperties.js");
1981
- /* harmony import */ var _BimObjectProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BimObjectProperties */ "./src/BimObjectProperties.js");
1982
- /* harmony import */ var _ExportManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ExportManager */ "./src/ExportManager.js");
1983
- /* harmony import */ var _BimFilesSelect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BimFilesSelect */ "./src/BimFilesSelect.js");
1984
- /* harmony import */ var _BimFilesOverlaySelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BimFilesOverlaySelect */ "./src/BimFilesOverlaySelect.js");
1985
- /* harmony import */ var _BimModelsSelect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BimModelsSelect */ "./src/BimModelsSelect.js");
1986
- /* harmony import */ var _BimFilesIsoSelect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./BimFilesIsoSelect */ "./src/BimFilesIsoSelect.js");
1987
- /* harmony import */ var _BimModelsIsoSelect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./BimModelsIsoSelect */ "./src/BimModelsIsoSelect.js");
1988
-
1989
-
1990
-
1991
-
1992
-
1993
-
1994
-
1995
-
1996
-
1997
-
1998
-
1999
-
2000
-
2001
- /**
2002
- * get the current page url parameter
2003
- * @param {string} sParam Paramter name
2004
- * @return {string} Paramter value
2005
- */
2006
- var getUrlParameter = function getUrlParameter(sParam) {
2007
- var sPageURL = decodeURIComponent(window.location.search.substring(1)),
2008
- sURLVariables = sPageURL.split('&'),
2009
- sParameterName,
2010
- i;
2011
- for (i = 0; i < sURLVariables.length; i++) {
2012
- sParameterName = sURLVariables[i].split('=');
2013
- if (sParameterName[0] === sParam) {
2014
- return sParameterName[1] === undefined ? true : sParameterName[1];
2015
- }
2016
- }
2017
- };
2018
-
2019
- })();
2020
-
2021
- /******/ return __webpack_exports__;
2022
- /******/ })()
2023
- ;
2024
- });
2025
- //# sourceMappingURL=bimplus-webclient.js.map
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:()=>De,BimFilesOverlaySelect:()=>he,BimFilesSelect:()=>se,BimModelsIsoSelect:()=>Ue,BimModelsSelect:()=>_e,BimObjectProperties:()=>X,BimPortal:()=>S,BimTaskList:()=>A,BimTaskProperties:()=>F,ExportManager:()=>re,ExternalClient:()=>o,ModelViewer:()=>Fe,getUrlParameter:()=>We});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;if(""===n)e.errorReceived({error:"External client got an empty message !"});else{var r;try{r=JSON.parse(n)}catch(t){return void e.errorReceived({error:"External client got an invalid message json payload !"})}e.messageReceived(r)}}))}},{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 A=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 C(e){return C="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},C(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"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===C(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"===C(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)).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/overlayselect"}},{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("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)}))}}])&&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)).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;Se(we(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)}))}}])&&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)).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;Me(He(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)}))}}])&&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}function Ae(){return Ae="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=Be(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}},Ae.apply(this,arguments)}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function xe(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=Be(e);if(t){var o=Be(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Te(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 Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}var Ue=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&&Ce(e,t)}(i,e);var t,n,r,o=xe(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;Ae(Be(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)}))}}])&&Ie(t.prototype,n),r&&Ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(p);function Ne(e){return Ne="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},Ne(e)}function Le(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"!==Ne(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Ne(i)?i:String(i)),r)}var o,i}var Fe=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)+"/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")}}])&&Le(t.prototype,n),r&&Le(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),We=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})()));