protvista-uniprot 4.3.3 → 4.3.4

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.
@@ -60211,10 +60211,21 @@ let cm = class extends p2(m2(vv)) {
60211
60211
  font-weight: bold;
60212
60212
  }
60213
60213
 
60214
+ .structure-viewer-message-content {
60215
+ white-space: pre-wrap;
60216
+ line-height: normal;
60217
+ }
60218
+
60214
60219
  .structure-viewer-messages > button {
60215
- font-size: 50%;
60220
+ font-size: 75%;
60216
60221
  font-weight: bold;
60217
- margin-inline-start: 1ch;
60222
+ position: absolute;
60223
+ top: -2px;
60224
+ right: 0px;
60225
+ border: none;
60226
+ background: transparent;
60227
+ cursor: pointer;
60228
+ padding: 0px 3px;
60218
60229
  }
60219
60230
  </style>
60220
60231
  <div id="molstar-parent" class="structure-viewer-container">
@@ -60223,7 +60234,11 @@ let cm = class extends p2(m2(vv)) {
60223
60234
  style="position: absolute; top: 0; left: 0; right: 0; bottom: 0"
60224
60235
  ></canvas>
60225
60236
  ${this.message ? uae`<div class="structure-viewer-messages">
60226
- <span>${(e = this.message) === null || e === void 0 ? void 0 : e.title}:</span> ${(t = this.message) === null || t === void 0 ? void 0 : t.content}
60237
+ <span>${(e = this.message) === null || e === void 0 ? void 0 : e.title}</span>:
60238
+ <span
60239
+ class="structure-viewer-message-content"
60240
+ .innerHTML=${(t = this.message) === null || t === void 0 ? void 0 : t.content}
60241
+ ></span>
60227
60242
  <button
60228
60243
  type="button"
60229
60244
  title="close message"
@@ -60301,23 +60316,28 @@ let cm = class extends p2(m2(vv)) {
60301
60316
  this.message = null;
60302
60317
  }
60303
60318
  updateHighlight(e) {
60304
- if (!e?.length || e.some((i) => !Number.isInteger(i.position))) return;
60319
+ if (!e?.length || e.some((a) => !Number.isInteger(a.position))) return;
60305
60320
  let t;
60306
- if (this.isAF()) t = e.map((i) => ({ start: i.position, end: i.position, entity: 1, chain: i.chain }));
60321
+ if (this.isAF()) t = e.map((a) => ({ start: a.position, end: a.position, entity: 1, chain: a.chain }));
60307
60322
  else try {
60308
- t = e.flatMap((i) => {
60309
- var a;
60310
- return Jpe(i.position, i.position, "PDB_UP", (a = this.selectedMolecule) === null || a === void 0 ? void 0 : a.mappings).filter((o) => o.chain === i.chain);
60323
+ t = e.flatMap((a) => {
60324
+ var o;
60325
+ return Jpe(a.position, a.position, "PDB_UP", (o = this.selectedMolecule) === null || o === void 0 ? void 0 : o.mappings).filter((s) => s.chain === a.chain);
60311
60326
  }).filter(Boolean);
60312
- } catch (i) {
60313
- if (i instanceof ME) return void this.showMessage("Error", i.message);
60314
- throw i;
60327
+ } catch (a) {
60328
+ if (a instanceof ME) return void this.showMessage("Error", a.message);
60329
+ throw a;
60315
60330
  }
60316
60331
  if (!t.length) return void this.showMessage("Error", "Residue outside of sequence range");
60317
- const r = t.map((i) => `${i.start}:${i.end}`).join(",");
60332
+ const r = t.map((a) => `${a.start}:${a.end}`).join(",");
60318
60333
  this.highlight = r;
60319
- const n = new CustomEvent("change", { detail: { highlight: r }, bubbles: !0, cancelable: !0 });
60320
- this.dispatchEvent(n);
60334
+ const n = t.map((a, o) => {
60335
+ const s = e[o].position, u = a.start === a.end ? a.start : `${a.start}:${a.end}`;
60336
+ return `<span data-article-id="structure_section#description-of-structure-table-contents">Chain</span>: ${a.chain}, <span data-article-id="structure_section#description-of-structure-table-contents">Position</span>: ${s} <br /><b>${this["protein-accession"]}</b>: ${u}`;
60337
+ }).join("");
60338
+ this.showMessage(`${this["structure-id"]}`, n);
60339
+ const i = new CustomEvent("change", { detail: { highlight: r }, bubbles: !0, cancelable: !0 });
60340
+ this.dispatchEvent(i);
60321
60341
  }
60322
60342
  highlightChain() {
60323
60343
  var e, t, r, n;
@@ -60332,7 +60352,7 @@ let cm = class extends p2(m2(vv)) {
60332
60352
  if (a instanceof ME) return (t = ec(this, Es, "f")) === null || t === void 0 || t.clearHighlight(), void this.showMessage("Error", a.message);
60333
60353
  throw a;
60334
60354
  }
60335
- i?.length ? ((n = ec(this, Es, "f")) === null || n === void 0 || n.highlight(i), this.clearMessage()) : (r = ec(this, Es, "f")) === null || r === void 0 || r.clearHighlight();
60355
+ i?.length ? (n = ec(this, Es, "f")) === null || n === void 0 || n.highlight(i) : (r = ec(this, Es, "f")) === null || r === void 0 || r.clearHighlight();
60336
60356
  }
60337
60357
  };
60338
60358
  Es = /* @__PURE__ */ new WeakMap(), J0([ZT({ type: String })], cm.prototype, "protein-accession", void 0), J0([ZT({ type: String })], cm.prototype, "structure-id", void 0), J0([ZT({ type: String })], cm.prototype, "custom-download-url", void 0), J0([ZT({ type: String })], cm.prototype, "color-theme", void 0), J0([lae()], cm.prototype, "selectedMolecule", void 0), J0([lae()], cm.prototype, "message", void 0), cm = J0([e$("nightingale-structure")], cm);