@abi-software/scaffoldvuer 1.8.1-beta.0 → 1.8.1-isan.0

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.
@@ -33415,7 +33415,7 @@ const PU = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33415
33415
  return v;
33416
33416
  }
33417
33417
  function h(v, m, x) {
33418
- return m = f(m), m in v ? Object.defineProperty(v, m, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : v[m] = x, v;
33418
+ return (m = f(m)) in v ? Object.defineProperty(v, m, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : v[m] = x, v;
33419
33419
  }
33420
33420
  function f(v) {
33421
33421
  var m = g(v, "string");
@@ -34035,7 +34035,7 @@ void main() {
34035
34035
  return T;
34036
34036
  }
34037
34037
  function h(T, w, E) {
34038
- return w = f(w), w in T ? Object.defineProperty(T, w, { value: E, enumerable: !0, configurable: !0, writable: !0 }) : T[w] = E, T;
34038
+ return (w = f(w)) in T ? Object.defineProperty(T, w, { value: E, enumerable: !0, configurable: !0, writable: !0 }) : T[w] = E, T;
34039
34039
  }
34040
34040
  function f(T) {
34041
34041
  var w = g(T, "string");
@@ -34744,7 +34744,7 @@ void main() {
34744
34744
  return M;
34745
34745
  }
34746
34746
  function h(M, T, w) {
34747
- return T = f(T), T in M ? Object.defineProperty(M, T, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : M[T] = w, M;
34747
+ return (T = f(T)) in M ? Object.defineProperty(M, T, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : M[T] = w, M;
34748
34748
  }
34749
34749
  function f(M) {
34750
34750
  var T = g(M, "string");
@@ -39307,7 +39307,7 @@ const kw = uz("main", {
39307
39307
  data: function() {
39308
39308
  return {
39309
39309
  display: !1,
39310
- annotationEntry: {},
39310
+ annotationEntry: [],
39311
39311
  ElIconDelete: Cn(Xc)
39312
39312
  };
39313
39313
  },
@@ -39323,14 +39323,14 @@ const kw = uz("main", {
39323
39323
  if (this.visible && this.label && this.label !== "") {
39324
39324
  if (this.display = !0, this.annotationDisplay) {
39325
39325
  const n = this.region ? this.region + "/" : "";
39326
- this.annotationEntry = {
39326
+ this.annotationEntry.push({
39327
39327
  featureId: n + this.label,
39328
39328
  resourceId: this.scaffoldUrl,
39329
39329
  resource: this.scaffoldUrl
39330
- };
39330
+ });
39331
39331
  }
39332
39332
  } else
39333
- this.display = !1, this.annotationEntry = {};
39333
+ this.display = !1, this.annotationEntry = [];
39334
39334
  },
39335
39335
  hideTriggered: function() {
39336
39336
  this.$emit("tooltip-hide");
@@ -39445,7 +39445,7 @@ function mz(n, e, t, i, r, s) {
39445
39445
  }, 8, ["visible", "onHide"])
39446
39446
  ], 4);
39447
39447
  }
39448
- const Gw = /* @__PURE__ */ xr(hz, [["render", mz], ["__scopeId", "data-v-e665391a"]]);
39448
+ const Gw = /* @__PURE__ */ xr(hz, [["render", mz], ["__scopeId", "data-v-ff89610b"]]);
39449
39449
  /*! js-cookie v3.0.5 | MIT */
39450
39450
  function Ic(n) {
39451
39451
  for (var e = 1; e < arguments.length; e++) {
@@ -42085,8 +42085,8 @@ const kz = {
42085
42085
  },
42086
42086
  openMapRef: void 0,
42087
42087
  backgroundIconRef: void 0,
42088
- offlineAnnotate: !1,
42089
- offlineAnnotation: Qt([]),
42088
+ offlineAnnotationEnabled: !1,
42089
+ offlineAnnotations: Qt([]),
42090
42090
  authorisedUser: void 0,
42091
42091
  toolbarOptions: [
42092
42092
  "Delete",
@@ -42230,10 +42230,10 @@ const kz = {
42230
42230
  * local annotation list.
42231
42231
  */
42232
42232
  removeFromOfflineAnnotation: function(n, e) {
42233
- for (let t = 0; t < this.offlineAnnotation.length; t++) {
42234
- const i = this.offlineAnnotation[t];
42233
+ for (let t = 0; t < this.offlineAnnotations.length; t++) {
42234
+ const i = this.offlineAnnotations[t];
42235
42235
  if (i.region === n && i.group === e) {
42236
- this.offlineAnnotation.splice(t, 1);
42236
+ this.offlineAnnotations.splice(t, 1);
42237
42237
  return;
42238
42238
  }
42239
42239
  }
@@ -42245,7 +42245,7 @@ const kz = {
42245
42245
  zincObjectRemoved: function(n) {
42246
42246
  if (this.$module.scene) {
42247
42247
  const e = n.region.getFullPath(), t = n.groupName;
42248
- n.region.findObjectsWithGroupName(t, !1).length === 0 && (this.$_searchIndex.removeZincObject(n, n.uuid), this.offlineAnnotate && this.removeFromOfflineAnnotation(e, t));
42248
+ n.region.findObjectsWithGroupName(t, !1).length === 0 && (this.$_searchIndex.removeZincObject(n, n.uuid), this.offlineAnnotationEnabled && this.removeFromOfflineAnnotation(e, t));
42249
42249
  }
42250
42250
  },
42251
42251
  /**
@@ -42315,10 +42315,10 @@ const kz = {
42315
42315
  this.url,
42316
42316
  i
42317
42317
  );
42318
- if (this.existDrawnFeatures = Qt(this.existDrawnFeatures.filter((s) => s.id !== r.item.id)), this.existDrawnFeatures.push(r.feature), this.offlineAnnotate) {
42318
+ if (this.existDrawnFeatures = Qt(this.existDrawnFeatures.filter((s) => s.id !== r.item.id)), this.existDrawnFeatures.push(r.feature), this.offlineAnnotationEnabled) {
42319
42319
  r.group = e;
42320
42320
  let s = n;
42321
- s.slice(-1) === "/" && (s = s.slice(0, -1)), r.region = s, this.offlineAnnotation = JSON.parse(sessionStorage.getItem("offline-annotation")) || [], this.removeFromOfflineAnnotation(s, e), this.offlineAnnotation.push(r), sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotation));
42321
+ s.slice(-1) === "/" && (s = s.slice(0, -1)), r.region = s, this.offlineAnnotations = JSON.parse(sessionStorage.getItem("offline-annotation")) || [], this.removeFromOfflineAnnotation(s, e), this.offlineAnnotations.push(r), sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotations));
42322
42322
  }
42323
42323
  this.$emit("userPrimitivesUpdated", { region: n, group: e, zincObject: t });
42324
42324
  },
@@ -42393,7 +42393,7 @@ const kz = {
42393
42393
  this.url,
42394
42394
  "Deleted"
42395
42395
  );
42396
- i && (this.existDrawnFeatures = Qt(this.existDrawnFeatures.filter((s) => s.id !== i.item.id)), this.$module.scene.getRootRegion().findChildFromPath(e).removeZincObject(this._editingZincObject), this.offlineAnnotate && sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotation)));
42396
+ i && (this.existDrawnFeatures = Qt(this.existDrawnFeatures.filter((s) => s.id !== i.item.id)), this.$module.scene.getRootRegion().findChildFromPath(e).removeZincObject(this._editingZincObject), this.offlineAnnotationEnabled && sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotations)));
42397
42397
  }
42398
42398
  this.cancelCreate();
42399
42399
  },
@@ -42561,7 +42561,7 @@ const kz = {
42561
42561
  }
42562
42562
  },
42563
42563
  activateAnnotationMode: function(n, e) {
42564
- if (this.authorisedUser || this.offlineAnnotate)
42564
+ if (this.authorisedUser || this.offlineAnnotationEnabled)
42565
42565
  if (this.createData.toBeDeleted = !1, this.createData.shape !== "" || this.createData.editingIndex > -1)
42566
42566
  n.length > 0 && e.identifiers[0].coords && (this.createData.x = e.identifiers[0].coords.x, this.createData.y = e.identifiers[0].coords.y, this.draw(e.identifiers));
42567
42567
  else {
@@ -42812,11 +42812,11 @@ const kz = {
42812
42812
  const i = jv(this.$module.scene, n);
42813
42813
  if (i && i.objects.length > 0)
42814
42814
  if (this.annotationSidebar) {
42815
- const s = {
42815
+ const s = [{
42816
42816
  featureId: (this.tData.region ? this.tData.region + "/" : "") + this.tData.label,
42817
42817
  resourceId: this.url,
42818
42818
  resource: this.url
42819
- };
42819
+ }];
42820
42820
  this.$emit("annotation-open", {
42821
42821
  annotationEntry: s,
42822
42822
  createData: this.createData,
@@ -42844,12 +42844,12 @@ const kz = {
42844
42844
  const r = i[0].region.getFullPath() + "/";
42845
42845
  this.$module.scene.getRootRegion().findChildFromPath(r).removeZincObject(i[0]);
42846
42846
  }
42847
- }), this.$refs.scaffoldTreeControls.removeRegion("__annotation"), this.offlineAnnotation = n;
42847
+ }), this.$refs.scaffoldTreeControls.removeRegion("__annotation"), this.offlineAnnotations = n;
42848
42848
  },
42849
42849
  addAnnotationFeature: async function() {
42850
42850
  let n;
42851
- if (this.offlineAnnotate)
42852
- this.offlineAnnotation = JSON.parse(sessionStorage.getItem("offline-annotation")) || [], n = this.offlineAnnotation.filter((e) => e.resource === this.url).map((e) => e.feature);
42851
+ if (this.offlineAnnotationEnabled)
42852
+ this.offlineAnnotations = JSON.parse(sessionStorage.getItem("offline-annotation")) || [], n = this.offlineAnnotations.filter((e) => e.resource === this.url).map((e) => e.feature);
42853
42853
  else {
42854
42854
  n = [];
42855
42855
  const e = await Zv(this.annotator, this.userToken, this.url);
@@ -42865,7 +42865,7 @@ const kz = {
42865
42865
  */
42866
42866
  changeViewingMode: function(n) {
42867
42867
  this.$module && (n && (this.viewingMode = n), this.clearAnnotationFeature(), this.viewingMode === "Annotation" ? (this.loading = !0, this.annotator.authenticate(this.userToken).then((e) => {
42868
- e.name && e.email && e.canUpdate ? (this.authorisedUser = e, this.offlineAnnotate = !1) : (this.authorisedUser = void 0, this.offlineAnnotate = !0), this.addAnnotationFeature(), this.loading = !1;
42868
+ e.name && e.email && e.canUpdate ? (this.authorisedUser = e, this.offlineAnnotationEnabled = !1) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = !0), this.addAnnotationFeature(), this.loading = !1;
42869
42869
  })) : this.viewingMode === "Exploration" && (this.activeDrawTool = void 0, this.activeDrawMode = void 0, this.createData.shape = ""), this.viewingMode === "Exploration" || this.viewingMode === "Annotation" && this.createData.shape === "" ? this.$module.selectObjectOnPick = !0 : this.$module.selectObjectOnPick = !1, this.cancelCreate());
42870
42870
  },
42871
42871
  /**
@@ -42988,7 +42988,7 @@ const kz = {
42988
42988
  } else n.region && n.region !== "" && this.viewRegion(n.region);
42989
42989
  n.visibility && this.$nextTick(() => {
42990
42990
  this.$refs.scaffoldTreeControls.setState(n.visibility);
42991
- }), n.background && this.backgroundChangeCallback(n.background), n.offlineAnnotation && n.offlineAnnotation.expiry > (/* @__PURE__ */ new Date()).getTime() && sessionStorage.setItem("offline-annotation", n.offlineAnnotation.value), n.viewingMode && this.changeViewingMode(n.viewingMode);
42991
+ }), n.background && this.backgroundChangeCallback(n.background), n.offlineAnnotations && sessionStorage.setItem("offline-annotation", n.offlineAnnotations), n.viewingMode && this.changeViewingMode(n.viewingMode);
42992
42992
  const e = n.search;
42993
42993
  e && e.group && (e.isSearch ? this.search(e.group, !0) : this.changeActiveByName(e.group, e.region, !0));
42994
42994
  }
@@ -43000,7 +43000,7 @@ const kz = {
43000
43000
  },
43001
43001
  setURLFinishCallback: function(n) {
43002
43002
  return () => {
43003
- this.offlineAnnotation.length = 0, this.updateSettingsfromScene(), this.$module.updateTime(0.01), this.$module.updateTime(0), this.$module.unsetFinishDownloadCallback(), this.addRegionsToSearchIndex(), this.$emit("on-ready"), this.setMarkers(), this._boundingBoxGeo = this.$module.scene.addBoundingBoxPrimitive(
43003
+ this.offlineAnnotations.length = 0, this.updateSettingsfromScene(), this.$module.updateTime(0.01), this.$module.updateTime(0), this.$module.unsetFinishDownloadCallback(), this.addRegionsToSearchIndex(), this.$emit("on-ready"), this.setMarkers(), this._boundingBoxGeo = this.$module.scene.addBoundingBoxPrimitive(
43004
43004
  "_helper",
43005
43005
  "boundingBox",
43006
43006
  4251856,
@@ -43034,17 +43034,7 @@ const kz = {
43034
43034
  let e = this.$module.scene.getZincCameraControls();
43035
43035
  n.viewport = e.getCurrentViewport();
43036
43036
  }
43037
- if (this.lastSelected && this.lastSelected.group && (n.search = { ...this.lastSelected }), this.offlineAnnotate) {
43038
- if (!sessionStorage.getItem("offline-annotation-expiry")) {
43039
- const e = (/* @__PURE__ */ new Date()).getTime() + 864e5;
43040
- sessionStorage.setItem("offline-annotation-expiry", e);
43041
- }
43042
- n.offlineAnnotation = {
43043
- expiry: sessionStorage.getItem("offline-annotation-expiry"),
43044
- value: sessionStorage.getItem("offline-annotation")
43045
- };
43046
- }
43047
- return n;
43037
+ return this.lastSelected && this.lastSelected.group && (n.search = { ...this.lastSelected }), this.offlineAnnotationEnabled && (n.offlineAnnotations = sessionStorage.getItem("offline-annotation")), n;
43048
43038
  },
43049
43039
  /**
43050
43040
  * Function used for importing the states of the scene. This exported states
@@ -43061,7 +43051,7 @@ const kz = {
43061
43051
  background: n.background,
43062
43052
  viewingMode: this.viewingMode,
43063
43053
  search: n.search,
43064
- offlineAnnotation: n.offlineAnnotation
43054
+ offlineAnnotations: n.offlineAnnotations
43065
43055
  }) : (n.background || n.search || n.viewport || n.viewingMode || n.visibility) && (this.isReady && this.$module.scene ? this.restoreSettings(n) : this.$module.setFinishDownloadCallback(
43066
43056
  this.setURLFinishCallback({
43067
43057
  background: n.background,
@@ -43069,7 +43059,7 @@ const kz = {
43069
43059
  viewport: n.viewport,
43070
43060
  visibility: n.visibility,
43071
43061
  search: n.search,
43072
- offlineAnnotation: n.offlineAnnotation
43062
+ offlineAnnotations: n.offlineAnnotations
43073
43063
  })
43074
43064
  )));
43075
43065
  },
@@ -43085,23 +43075,23 @@ const kz = {
43085
43075
  /**
43086
43076
  * Return a copy of the local annotations list.
43087
43077
  * This list is used for storing user created annotation
43088
- * when offlineAnnotate is set to true.
43078
+ * when offlineAnnotationEnabled is set to true.
43089
43079
  *
43090
43080
  * @public
43091
43081
  */
43092
43082
  getOfflineAnnotations: function() {
43093
- return [...this.offlineAnnotation];
43083
+ return [...this.offlineAnnotations];
43094
43084
  },
43095
43085
  /**
43096
43086
  * Import local annotations. The annotations will only
43097
- * be imported when offlineAnnotate is set to
43087
+ * be imported when offlineAnnotationEnabled is set to
43098
43088
  * true;
43099
43089
  *
43100
43090
  * @public
43101
43091
  * @arg {Array} `annotationsList`
43102
43092
  */
43103
43093
  importOfflineAnnotations: function(n) {
43104
- if (this.offlineAnnotate) {
43094
+ if (this.offlineAnnotationEnabled) {
43105
43095
  n.forEach((t) => {
43106
43096
  const i = t.group, r = t.region;
43107
43097
  let s = r.slice(-1) === "/" ? r : r + "/";
@@ -43112,8 +43102,8 @@ const kz = {
43112
43102
  });
43113
43103
  const e = n.map((t) => t.feature);
43114
43104
  Xv(this.$module.scene, e), n.forEach((t) => {
43115
- this.offlineAnnotation.push({ ...t });
43116
- }), sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotation));
43105
+ this.offlineAnnotations.push({ ...t });
43106
+ }), sessionStorage.setItem("offline-annotation", JSON.stringify(this.offlineAnnotations));
43117
43107
  }
43118
43108
  },
43119
43109
  /**
@@ -43137,7 +43127,7 @@ const kz = {
43137
43127
  viewURL: this.viewURL,
43138
43128
  viewport: e == null ? void 0 : e.viewport,
43139
43129
  visibility: e == null ? void 0 : e.visibility,
43140
- offlineAnnotation: e == null ? void 0 : e.offlineAnnotation
43130
+ offlineAnnotations: e == null ? void 0 : e.offlineAnnotations
43141
43131
  })
43142
43132
  ), this.fileFormat === "gltf" ? this.$module.loadGLTFFromURL(n, "scene", !0) : this.$module.loadOrgansFromURL(
43143
43133
  n,
@@ -43237,7 +43227,7 @@ function e4(n, e, t, i, r, s) {
43237
43227
  onKeydown: e[4] || (e[4] = pi((...E) => s.backgroundChangeCallback && s.backgroundChangeCallback(...E), ["66"]))
43238
43228
  }, null, 544),
43239
43229
  Pt(Ue("div", null, [
43240
- n.viewingMode === "Annotation" && (n.authorisedUser || n.offlineAnnotate) ? (ye(), Ge(c, {
43230
+ n.viewingMode === "Annotation" && (n.authorisedUser || n.offlineAnnotationEnabled) ? (ye(), Ge(c, {
43241
43231
  key: 0,
43242
43232
  toolbarOptions: n.toolbarOptions,
43243
43233
  activeDrawTool: n.activeDrawTool,
@@ -43568,7 +43558,7 @@ function e4(n, e, t, i, r, s) {
43568
43558
  ]),
43569
43559
  _: 1
43570
43560
  }),
43571
- n.viewingMode === "Annotation" && n.offlineAnnotate ? (ye(), Ge(y, {
43561
+ n.viewingMode === "Annotation" && n.offlineAnnotationEnabled ? (ye(), Ge(y, {
43572
43562
  key: 0,
43573
43563
  class: "viewing-mode-description"
43574
43564
  }, {
@@ -43669,7 +43659,7 @@ function e4(n, e, t, i, r, s) {
43669
43659
  [w, n.loading]
43670
43660
  ]);
43671
43661
  }
43672
- const r4 = /* @__PURE__ */ xr(kz, [["render", e4], ["__scopeId", "data-v-f401de06"]]);
43662
+ const r4 = /* @__PURE__ */ xr(kz, [["render", e4], ["__scopeId", "data-v-75fe03ee"]]);
43673
43663
  export {
43674
43664
  r4 as ScaffoldVuer
43675
43665
  };