@platforma-open/milaboratories.top-antibodies 4.4.1 → 4.4.2

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.
@@ -3,6 +3,6 @@
3
3
  "id": {
4
4
  "organization": "milaboratories",
5
5
  "name": "top-antibodies",
6
- "version": "4.4.1"
6
+ "version": "4.4.2"
7
7
  }
8
8
  }
package/block-pack/ui.tgz CHANGED
Binary file
package/dist/index.js CHANGED
@@ -13791,6 +13791,39 @@ function anchorInitializedId(ref) {
13791
13791
  const id = createGlobalPObjectId(ref.blockId, ref.name);
13792
13792
  return isGlobalPObjectId(id) ? id : void 0;
13793
13793
  }
13794
+ /**
13795
+ * Reads a stored defaults-init slot in either shape it has had: the
13796
+ * `{ anchor, preset }` object, or the older `JSON.stringify(anchor) + "::" +
13797
+ * preset` string.
13798
+ *
13799
+ * Stored data has been seen holding the string even after the `Ver_2026_08_20`
13800
+ * migration split it, and the kind rejects the string, so a template exported
13801
+ * from such a block cannot be applied. Everything that hands the slot on reads
13802
+ * it through here.
13803
+ *
13804
+ * The string is split at the LAST `"::"`: a block id or column name can itself
13805
+ * contain a colon, so a leftmost split would cut the anchor JSON in half. The
13806
+ * tail is the preset — `"none"` when none was selected.
13807
+ *
13808
+ * Either way the anchor is re-minted through `anchorInitializedId` rather than
13809
+ * carried over verbatim: the old string was written with `JSON.stringify`, whose
13810
+ * key order is whatever the object happened to have, and the UI and relocation
13811
+ * both compare against the canonical form. An anchor that does not parse as a
13812
+ * reference drops the whole slot: an unreadable anchor is worse than none, and
13813
+ * absent is exactly what "not initialized" means.
13814
+ */
13815
+ function readInitializedForAnchor(stored) {
13816
+ const parts = initializedSlotParts(stored);
13817
+ if (parts === void 0) return void 0;
13818
+ const parsed = parseJsonSafely(parts.anchor);
13819
+ if (!isPlRef(parsed) || typeof parsed.blockId !== "string" || typeof parsed.name !== "string") return void 0;
13820
+ const anchor = anchorInitializedId(parsed);
13821
+ if (anchor === void 0) return void 0;
13822
+ return {
13823
+ anchor,
13824
+ preset: parts.preset
13825
+ };
13826
+ }
13794
13827
  /** Underlying primary `PlRef` from `data.input` — undefined when no dataset is picked. */
13795
13828
  function getInputAnchorRef(data) {
13796
13829
  return data.input?.primary.column;
@@ -14196,6 +14229,27 @@ function computePresets(scores, defaultFilters, anchorRef, anchorSpec) {
14196
14229
  function getDefaultBlockLabel(data) {
14197
14230
  return data.datasetLabel || "Select dataset";
14198
14231
  }
14232
+ /** The anchor and preset halves of a stored defaults-init slot, still unparsed. */
14233
+ function initializedSlotParts(stored) {
14234
+ if (typeof stored === "string") {
14235
+ const separator = stored.lastIndexOf("::");
14236
+ if (separator < 0) return {
14237
+ anchor: stored,
14238
+ preset: "none"
14239
+ };
14240
+ return {
14241
+ anchor: stored.slice(0, separator),
14242
+ preset: stored.slice(separator + 2)
14243
+ };
14244
+ }
14245
+ if (typeof stored !== "object" || stored === null) return void 0;
14246
+ if (!("anchor" in stored) || !("preset" in stored)) return void 0;
14247
+ const { anchor, preset } = stored;
14248
+ return typeof anchor === "string" && typeof preset === "string" ? {
14249
+ anchor,
14250
+ preset
14251
+ } : void 0;
14252
+ }
14199
14253
  //#endregion
14200
14254
  //#region ../model/dist/converters.js
14201
14255
  function convertRankingOrderUI(rankingOrder) {
@@ -14422,36 +14476,6 @@ const defaultSelectionPlotState = () => ({
14422
14476
  * option.
14423
14477
  */
14424
14478
  const REMOVED_IN_VIVO_SCORE_COLUMN_ID = "pl7.app/vdj/inVivoScore";
14425
- /**
14426
- * Reshapes one stored `JSON.stringify(anchor) + "::" + preset` guard value into
14427
- * the two-field slot.
14428
- *
14429
- * Split at the LAST `"::"`: a block id or column name can itself contain a colon,
14430
- * so a leftmost split would cut the anchor JSON in half. The tail is the preset —
14431
- * `"none"` when none was selected.
14432
- *
14433
- * The head is re-minted through `anchorInitializedId` — the block's one
14434
- * `createGlobalPObjectId` call site — rather than carried over verbatim. The old value was written with `JSON.stringify`, whose key order is
14435
- * whatever the object happened to have; the UI now computes its key the same
14436
- * canonical way, and relocation re-emits the stored value canonically too, so a
14437
- * verbatim head could stop matching. A head that does not parse as a reference
14438
- * drops the whole slot: an unreadable anchor is worse than none, and absent is
14439
- * exactly what "not initialized" means.
14440
- */
14441
- function splitInitializedForAnchor(stored) {
14442
- if (stored === void 0) return void 0;
14443
- const separator = stored.lastIndexOf("::");
14444
- const head = separator < 0 ? stored : stored.slice(0, separator);
14445
- const preset = separator < 0 ? "none" : stored.slice(separator + 2);
14446
- const parsed = parseJsonSafely(head);
14447
- if (!isPlRef(parsed) || typeof parsed.blockId !== "string" || typeof parsed.name !== "string") return void 0;
14448
- const anchor = anchorInitializedId(parsed);
14449
- if (anchor === void 0) return void 0;
14450
- return {
14451
- anchor,
14452
- preset
14453
- };
14454
- }
14455
14479
  const blockDataModel = new DataModelBuilder({ kind }).from("Ver_2026_02_25").upgradeLegacy(({ args, uiState }) => ({
14456
14480
  defaultBlockLabel: args.defaultBlockLabel,
14457
14481
  customBlockLabel: args.customBlockLabel,
@@ -14502,8 +14526,12 @@ const blockDataModel = new DataModelBuilder({ kind }).from("Ver_2026_02_25").upg
14502
14526
  };
14503
14527
  }).migrate("Ver_2026_08_20", (prev) => ({
14504
14528
  ...prev,
14505
- filtersInitializedForAnchor: splitInitializedForAnchor(prev.filtersInitializedForAnchor),
14506
- rankingsInitializedForAnchor: splitInitializedForAnchor(prev.rankingsInitializedForAnchor)
14529
+ filtersInitializedForAnchor: readInitializedForAnchor(prev.filtersInitializedForAnchor),
14530
+ rankingsInitializedForAnchor: readInitializedForAnchor(prev.rankingsInitializedForAnchor)
14531
+ })).migrate("Ver_2026_09_28", (prev) => ({
14532
+ ...prev,
14533
+ filtersInitializedForAnchor: readInitializedForAnchor(prev.filtersInitializedForAnchor),
14534
+ rankingsInitializedForAnchor: readInitializedForAnchor(prev.rankingsInitializedForAnchor)
14507
14535
  })).init(({ params }) => ({
14508
14536
  defaultBlockLabel: params?.defaultBlockLabel ?? getDefaultBlockLabel({}),
14509
14537
  customBlockLabel: params?.customBlockLabel ?? "",
@@ -14658,8 +14686,8 @@ const platforma$1 = BlockModelV3.create({
14658
14686
  rankingOrder: convertRankingOrderUI(data.rankingOrder),
14659
14687
  filters: convertFilterUI(data.filters),
14660
14688
  diversificationColumn: data.diversificationColumn,
14661
- filtersInitializedForAnchor: data.filtersInitializedForAnchor,
14662
- rankingsInitializedForAnchor: data.rankingsInitializedForAnchor,
14689
+ filtersInitializedForAnchor: readInitializedForAnchor(data.filtersInitializedForAnchor),
14690
+ rankingsInitializedForAnchor: readInitializedForAnchor(data.rankingsInitializedForAnchor),
14663
14691
  defaultBlockLabel: data.defaultBlockLabel,
14664
14692
  customBlockLabel: data.customBlockLabel
14665
14693
  })).args((data) => {