@platforma-open/milaboratories.sequence-properties.model 1.2.3 → 1.2.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.
package/dist/bundle.js CHANGED
@@ -25,14 +25,14 @@
25
25
  enumerable: true
26
26
  }) : target, mod));
27
27
  //#endregion
28
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/plugin_handle.js
28
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/plugin_handle.js
29
29
  const PLUGIN_OUTPUT_PREFIX = "plugin-output#";
30
30
  /** Construct the output key for a plugin output in the block outputs map. */
31
31
  function pluginOutputKey(handle, outputKey) {
32
32
  return `${PLUGIN_OUTPUT_PREFIX}${handle}#${outputKey}`;
33
33
  }
34
34
  //#endregion
35
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_storage.js
35
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/block_storage.js
36
36
  /**
37
37
  * Discriminator key for BlockStorage format detection.
38
38
  * This unique hash-based key identifies data as BlockStorage vs legacy formats.
@@ -274,7 +274,7 @@
274
274
  return pluginEntry.__data;
275
275
  }
276
276
  //#endregion
277
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_migrations.js
277
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/block_migrations.js
278
278
  /** Create a DataVersioned wrapper with correct shape */
279
279
  function makeVersionedData(version, data) {
280
280
  return {
@@ -769,7 +769,7 @@
769
769
  }
770
770
  };
771
771
  //#endregion
772
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/internal.js
772
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/internal.js
773
773
  /** Utility code helping to identify whether the code is running in actual UI environment */
774
774
  function isInUI() {
775
775
  return typeof globalThis.getPlatforma !== "undefined" || typeof globalThis.platforma !== "undefined";
@@ -839,7 +839,7 @@
839
839
  futureResolves.get(handle).push(onResolve);
840
840
  }
841
841
  //#endregion
842
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_storage_facade.js
842
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/block_storage_facade.js
843
843
  /**
844
844
  * All facade callback names as constants.
845
845
  * These are the source of truth - the interface is derived from these.
@@ -874,7 +874,7 @@
874
874
  for (const key of Object.values(BlockStorageFacadeCallbacks)) tryRegisterCallback(key, callbacks[key]);
875
875
  }
876
876
  //#endregion
877
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/config/actions.js
877
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/config/actions.js
878
878
  function getFromCfg(variable) {
879
879
  return {
880
880
  type: "GetFromCtx",
@@ -887,7 +887,7 @@
887
887
  getFromCfg("$staging");
888
888
  getFromCfg("$ui");
889
889
  //#endregion
890
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/future.js
890
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/future.js
891
891
  var FutureRef = class FutureRef {
892
892
  isResolved = false;
893
893
  resolvedValue;
@@ -4462,7 +4462,7 @@
4462
4462
  to: numberType().min(1)
4463
4463
  });
4464
4464
  //#endregion
4465
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/util.js
4465
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/util.js
4466
4466
  function assertNever(x) {
4467
4467
  throw new Error("Unexpected object: " + x);
4468
4468
  }
@@ -4474,7 +4474,7 @@
4474
4474
  return [...new Map(array.map((e) => [makeId(e), e])).values()];
4475
4475
  }
4476
4476
  //#endregion
4477
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.js
4477
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.js
4478
4478
  /**
4479
4479
  * Type guard function that checks if the given value is a valid DataInfo.
4480
4480
  *
@@ -4665,7 +4665,7 @@
4665
4665
  }
4666
4666
  }
4667
4667
  //#endregion
4668
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/errors.js
4668
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/errors.js
4669
4669
  var ServiceError = class extends Error {
4670
4670
  name = "ServiceError";
4671
4671
  };
@@ -4689,7 +4689,7 @@
4689
4689
  return new Error(stringifyValue(value));
4690
4690
  }
4691
4691
  //#endregion
4692
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/json.js
4692
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/json.js
4693
4693
  var import_canonicalize = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
4694
4694
  module.exports = function serialize(object) {
4695
4695
  if (typeof object === "number" && isNaN(object)) throw new Error("NaN is not allowed");
@@ -4722,7 +4722,7 @@
4722
4722
  }
4723
4723
  }
4724
4724
  //#endregion
4725
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js
4725
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js
4726
4726
  function readMetadata(metadata, key) {
4727
4727
  return metadata?.[key];
4728
4728
  }
@@ -5014,8 +5014,8 @@
5014
5014
  return query.name === target.name && matchDomain$1(query.domain, target.domain) && matchDomain$1(query.contextDomain, target.contextDomain);
5015
5015
  }
5016
5016
  //#endregion
5017
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
5018
- const booleanTypesSet = new Set([
5017
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
5018
+ const BOOLEAN_TYPES = new Set([
5019
5019
  "numericComparison",
5020
5020
  "stringEquals",
5021
5021
  "stringContains",
@@ -5028,7 +5028,7 @@
5028
5028
  "isIn"
5029
5029
  ]);
5030
5030
  function isBooleanExpression(expr) {
5031
- return booleanTypesSet.has(expr.type);
5031
+ return BOOLEAN_TYPES.has(expr.type);
5032
5032
  }
5033
5033
  /**
5034
5034
  * Recursively traverses a SpecQuery tree bottom-up, applying visitor callbacks.
@@ -5092,6 +5092,7 @@
5092
5092
  case "filter":
5093
5093
  case "sort":
5094
5094
  case "sliceAxes":
5095
+ case "transformColumns":
5095
5096
  result = {
5096
5097
  ...query,
5097
5098
  input: traverseQuerySpec(query.input, visitor)
@@ -5106,7 +5107,7 @@
5106
5107
  return traverseQuerySpec(query, { column: cb });
5107
5108
  }
5108
5109
  //#endregion
5109
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
5110
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
5110
5111
  function mapPTableDef(def, cb) {
5111
5112
  return {
5112
5113
  ...def,
@@ -5149,7 +5150,21 @@
5149
5150
  }
5150
5151
  }
5151
5152
  //#endregion
5152
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
5153
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_common.js
5154
+ function getPTableColumnId(spec) {
5155
+ switch (spec.type) {
5156
+ case "axis": return {
5157
+ type: "axis",
5158
+ id: spec.id
5159
+ };
5160
+ case "column": return {
5161
+ type: "column",
5162
+ id: spec.id
5163
+ };
5164
+ }
5165
+ }
5166
+ //#endregion
5167
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
5153
5168
  /**
5154
5169
  * Canonically serializes a {@link UniversalPColumnId} to a string.
5155
5170
  * @param id - The column identifier to serialize
@@ -5159,7 +5174,7 @@
5159
5174
  return (0, import_canonicalize.default)(id);
5160
5175
  }
5161
5176
  //#endregion
5162
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
5177
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
5163
5178
  function axisKey(axis) {
5164
5179
  return (0, import_canonicalize.default)(getAxisId(axis));
5165
5180
  }
@@ -5404,7 +5419,7 @@
5404
5419
  return typeof value === "object" && "anchor" in value;
5405
5420
  }
5406
5421
  //#endregion
5407
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
5422
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
5408
5423
  function isPColumnSpec(spec) {
5409
5424
  return spec.kind === "PColumn";
5410
5425
  }
@@ -5450,7 +5465,7 @@
5450
5465
  return [...columns.values()];
5451
5466
  }
5452
5467
  //#endregion
5453
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
5468
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
5454
5469
  /**
5455
5470
  * Determines if an axis ID matches an axis selector.
5456
5471
  *
@@ -5531,7 +5546,7 @@
5531
5546
  else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
5532
5547
  }
5533
5548
  //#endregion
5534
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/native_id.js
5549
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/native_id.js
5535
5550
  function deriveNativeId(spec) {
5536
5551
  const result = {
5537
5552
  kind: spec.kind,
@@ -5562,7 +5577,7 @@
5562
5577
  }
5563
5578
  createGetIncrementalId();
5564
5579
  //#endregion
5565
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
5580
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
5566
5581
  var LinkerMap = class LinkerMap {
5567
5582
  /** Graph of linkers connected by axes (single or grouped by parents) */
5568
5583
  data;
@@ -5740,11 +5755,11 @@
5740
5755
  }
5741
5756
  };
5742
5757
  //#endregion
5743
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.js
5758
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.js
5744
5759
  function assert() {}
5745
5760
  assert();
5746
5761
  //#endregion
5747
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.js
5762
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.js
5748
5763
  /**
5749
5764
  * Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
5750
5765
  * version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
@@ -5787,7 +5802,7 @@
5787
5802
  }
5788
5803
  }
5789
5804
  //#endregion
5790
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
5805
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
5791
5806
  function mapValueInVOE(voe, cb) {
5792
5807
  return voe.ok ? {
5793
5808
  ok: true,
@@ -5795,7 +5810,7 @@
5795
5810
  } : voe;
5796
5811
  }
5797
5812
  //#endregion
5798
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
5813
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
5799
5814
  const SERVICE_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
5800
5815
  const { service, isNodeService, isWasmService, isMainService, getServiceKind, getServiceModelMethods, getServiceUiMethods } = (() => {
5801
5816
  const typeMap = /* @__PURE__ */ new Map();
@@ -5834,7 +5849,7 @@
5834
5849
  };
5835
5850
  })();
5836
5851
  //#endregion
5837
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
5852
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
5838
5853
  const Services = {
5839
5854
  PFrameSpec: service()({
5840
5855
  type: "wasm",
@@ -5903,7 +5918,7 @@
5903
5918
  }
5904
5919
  Object.fromEntries(Object.keys(Services).map((key) => [`requires${key}`, true]));
5905
5920
  //#endregion
5906
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
5921
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.42.0/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
5907
5922
  function buildMethodMap(pick) {
5908
5923
  const result = {};
5909
5924
  for (const id of Object.values(Services)) result[id] = [...pick(id)];
@@ -5912,7 +5927,7 @@
5912
5927
  buildMethodMap(getServiceUiMethods);
5913
5928
  buildMethodMap(getServiceModelMethods);
5914
5929
  //#endregion
5915
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/accessor.js
5930
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/accessor.js
5916
5931
  function ifDef(value, cb) {
5917
5932
  return value === void 0 ? void 0 : cb(value);
5918
5933
  }
@@ -6123,11 +6138,11 @@
6123
6138
  }
6124
6139
  };
6125
6140
  //#endregion
6126
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/internal.js
6141
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/internal.js
6127
6142
  const StagingAccessorName = "staging";
6128
6143
  const MainAccessorName = "main";
6129
6144
  //#endregion
6130
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
6145
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
6131
6146
  function filterDataInfoEntries(dataInfoEntries, axisFilters) {
6132
6147
  const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
6133
6148
  const { type } = dataInfoEntries;
@@ -6222,7 +6237,7 @@
6222
6237
  return x == null;
6223
6238
  }
6224
6239
  //#endregion
6225
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
6240
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
6226
6241
  const DISTANCE_PENALTY = .001;
6227
6242
  const LABEL_TYPE = "__LABEL__";
6228
6243
  const LABEL_TYPE_FULL = "__LABEL__@1";
@@ -6260,18 +6275,22 @@
6260
6275
  for (let i = 0; i < includedCount; ++i) currentSet.add(mainTypes[i]);
6261
6276
  if (additionalType >= 0) currentSet.add(mainTypes[additionalType]);
6262
6277
  const candidateResult = build(currentSet, false);
6263
- if (candidateResult !== void 0 && countUniqueLabels(candidateResult) === values.length) return build(minimizeTypeSet(currentSet, records, stats, forceTraceElements, forcedSet, separator), false) ?? throwError("Failed to derive unique labels");
6278
+ if (candidateResult !== void 0 && countUniqueLabels(candidateResult) === values.length) {
6279
+ const minimized = minimizeTypeSet(currentSet, records, stats, forceTraceElements, forcedSet, separator);
6280
+ return dropRedundantLinkerSuffix(records, minimized, forceTraceElements, forcedSet, separator, build(minimized, false) ?? throwError("Failed to derive unique labels"));
6281
+ }
6264
6282
  additionalType++;
6265
6283
  if (additionalType >= mainTypes.length) {
6266
6284
  includedCount++;
6267
6285
  additionalType = includedCount;
6268
6286
  }
6269
6287
  }
6270
- return build(minimizeTypeSet(new Set([
6288
+ const minimized = minimizeTypeSet(new Set([
6271
6289
  ...forcedSet,
6272
6290
  ...mainTypes,
6273
6291
  ...secondaryTypes
6274
- ]), records, stats, forceTraceElements, forcedSet, separator), true) ?? throwError("Failed to derive unique labels");
6292
+ ]), records, stats, forceTraceElements, forcedSet, separator);
6293
+ return dropRedundantLinkerSuffix(records, minimized, forceTraceElements, forcedSet, separator, build(minimized, true) ?? throwError("Failed to derive unique labels"));
6275
6294
  }
6276
6295
  function extractEntryParts(entry) {
6277
6296
  if (!("spec" in entry && typeof entry.spec === "object")) return {
@@ -6404,36 +6423,67 @@
6404
6423
  secondaryTypes
6405
6424
  };
6406
6425
  }
6426
+ function renderRecordLabel(record, includedTypes, forceTraceElements, separator) {
6427
+ const traceParts = [];
6428
+ const anchorParts = [];
6429
+ let linkerLabel;
6430
+ let hitLabel;
6431
+ for (const ft of record.fullTrace) {
6432
+ if (!(includedTypes.has(ft.fullType) || forceTraceElements?.has(ft.type))) continue;
6433
+ if (ft.type === LINKER_TYPE) linkerLabel = ft.label;
6434
+ else if (ft.type === HIT_QUAL_TYPE) hitLabel = ft.label;
6435
+ else if (isAnchorQualType(ft.type)) anchorParts.push(ft.label);
6436
+ else traceParts.push(ft.label);
6437
+ }
6438
+ if (traceParts.length === 0 && anchorParts.length === 0 && linkerLabel === void 0 && hitLabel === void 0) return void 0;
6439
+ let label = traceParts.join(separator);
6440
+ const append = (part) => {
6441
+ label = label.length === 0 ? part : `${label} ${part}`;
6442
+ };
6443
+ if (linkerLabel !== void 0) append(linkerLabel);
6444
+ for (const a of anchorParts) append(a);
6445
+ if (hitLabel !== void 0) append(hitLabel);
6446
+ return label;
6447
+ }
6407
6448
  function buildLabels(records, includedTypes, forceTraceElements, separator, force) {
6408
6449
  const result = [];
6409
6450
  for (const r of records) {
6410
- const traceParts = [];
6411
- const anchorParts = [];
6412
- let linkerLabel;
6413
- let hitLabel;
6414
- for (const ft of r.fullTrace) {
6415
- if (!(includedTypes.has(ft.fullType) || forceTraceElements?.has(ft.type))) continue;
6416
- if (ft.type === LINKER_TYPE) linkerLabel = ft.label;
6417
- else if (ft.type === HIT_QUAL_TYPE) hitLabel = ft.label;
6418
- else if (isAnchorQualType(ft.type)) anchorParts.push(ft.label);
6419
- else traceParts.push(ft.label);
6420
- }
6421
- if (traceParts.length === 0 && anchorParts.length === 0 && linkerLabel === void 0 && hitLabel === void 0) {
6451
+ const rendered = renderRecordLabel(r, includedTypes, forceTraceElements, separator);
6452
+ if (rendered === void 0) {
6422
6453
  if (!force) return void 0;
6423
6454
  result.push("Unlabeled");
6424
6455
  continue;
6425
6456
  }
6426
- let label = traceParts.join(separator);
6427
- const append = (part) => {
6428
- label = label.length === 0 ? part : `${label} ${part}`;
6429
- };
6430
- if (linkerLabel !== void 0) append(linkerLabel);
6431
- for (const a of anchorParts) append(a);
6432
- if (hitLabel !== void 0) append(hitLabel);
6433
- result.push(label);
6457
+ result.push(rendered);
6434
6458
  }
6435
6459
  return result;
6436
6460
  }
6461
+ /**
6462
+ * Drop the "via …" linker suffix from records whose label is already unique without it.
6463
+ *
6464
+ * Global minimization may include `LINKER_TYPE_FULL` solely to resolve a collision between a
6465
+ * subset of records — but `buildLabels` then renders the suffix on every record that carries a
6466
+ * linker trace entry, including ones whose stem is already unique. We strip the suffix where it
6467
+ * isn't load-bearing while keeping the symmetric rendering required by `linkerForced` /
6468
+ * `forceTraceElements`.
6469
+ *
6470
+ * Rule: a record's linker suffix is redundant iff its stem (label rendered without LINKER) does
6471
+ * not appear anywhere else in the set.
6472
+ */
6473
+ function dropRedundantLinkerSuffix(records, globalTypeSet, forceTraceElements, forcedSet, separator, labels) {
6474
+ if (!globalTypeSet.has(LINKER_TYPE_FULL)) return labels;
6475
+ if (forcedSet.has(LINKER_TYPE_FULL) || forceTraceElements?.has(LINKER_TYPE)) return labels;
6476
+ const setWithoutLinker = new Set(globalTypeSet);
6477
+ setWithoutLinker.delete(LINKER_TYPE_FULL);
6478
+ const stems = records.map((r) => renderRecordLabel(r, setWithoutLinker, forceTraceElements, separator));
6479
+ const stemOccurrences = /* @__PURE__ */ new Map();
6480
+ for (const s of stems) if (s !== void 0) stemOccurrences.set(s, (stemOccurrences.get(s) ?? 0) + 1);
6481
+ return labels.map((label, i) => {
6482
+ const stem = stems[i];
6483
+ if (stem === void 0) return label;
6484
+ return stemOccurrences.get(stem) === 1 ? stem : label;
6485
+ });
6486
+ }
6437
6487
  function countUniqueLabels(result) {
6438
6488
  if (result === void 0) return 0;
6439
6489
  return new Set(result).size;
@@ -6453,7 +6503,7 @@
6453
6503
  return result;
6454
6504
  }
6455
6505
  //#endregion
6456
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/label.js
6506
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/util/label.js
6457
6507
  /** @deprecated Use deriveDistinctLabels */
6458
6508
  function deriveLabels(values, getSpec, options = {}) {
6459
6509
  return deriveDistinctLabels(values.map(getSpec), options).map((label, i) => ({
@@ -6462,7 +6512,7 @@
6462
6512
  }));
6463
6513
  }
6464
6514
  //#endregion
6465
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
6515
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
6466
6516
  const PCD_PREFIX = "PColumnData/";
6467
6517
  const RT_RESOURCE_MAP = PCD_PREFIX + "ResourceMap";
6468
6518
  const RT_RESOURCE_MAP_PARTITIONED = PCD_PREFIX + "Partitioned/ResourceMap";
@@ -6762,7 +6812,7 @@
6762
6812
  return columns.every(isPColumnReady);
6763
6813
  }
6764
6814
  //#endregion
6765
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
6815
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
6766
6816
  function isPColumnValues(value) {
6767
6817
  if (!Array.isArray(value)) return false;
6768
6818
  if (value.length === 0) return true;
@@ -7037,7 +7087,7 @@
7037
7087
  }
7038
7088
  };
7039
7089
  //#endregion
7040
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/block_services.js
7090
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/services/block_services.js
7041
7091
  /**
7042
7092
  * Services required by all V3 blocks by default.
7043
7093
  * Edit this when a new service should be available to all blocks.
@@ -7052,7 +7102,7 @@
7052
7102
  };
7053
7103
  resolveRequiredServices(BLOCK_SERVICE_FLAGS);
7054
7104
  //#endregion
7055
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
7105
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
7056
7106
  /**
7057
7107
  * Builds a ServiceProxy from a ServiceDispatch.
7058
7108
  * Each service method call is forwarded to dispatch.callServiceMethod.
@@ -7061,7 +7111,7 @@
7061
7111
  return ((serviceId) => Object.freeze(Object.fromEntries(dispatch.getServiceMethods(serviceId).map((method) => [method, (...args) => dispatch.callServiceMethod(serviceId, method, ...args)]))));
7062
7112
  }
7063
7113
  //#endregion
7064
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/get_services.js
7114
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/services/get_services.js
7065
7115
  const cachedServices = /* @__PURE__ */ new WeakMap();
7066
7116
  function getService(name) {
7067
7117
  const ctx = getCfgRenderCtx();
@@ -7075,7 +7125,7 @@
7075
7125
  })();
7076
7126
  }
7077
7127
  //#endregion
7078
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
7128
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
7079
7129
  function patchInSetFilters(filters) {
7080
7130
  const inSetToOrEqual = (predicate) => {
7081
7131
  if (predicate.operator !== "InSet") return predicate;
@@ -7113,7 +7163,7 @@
7113
7163
  return filters.map((filter) => mapFilter(filter, inSetToOrEqual));
7114
7164
  }
7115
7165
  //#endregion
7116
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/api.js
7166
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/render/api.js
7117
7167
  /**
7118
7168
  * Helper function to match domain objects
7119
7169
  * @param query Optional domain to match against
@@ -7564,26 +7614,26 @@
7564
7614
  }
7565
7615
  };
7566
7616
  //#endregion
7567
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/version.js
7568
- const PlatformaSDKVersion = "1.75.5";
7617
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/version.js
7618
+ const PlatformaSDKVersion = "1.77.0";
7569
7619
  //#endregion
7570
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/types.js
7620
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/bconfig/types.js
7571
7621
  function isConfigLambda(cfgOrFh) {
7572
7622
  return cfgOrFh.__renderLambda === true;
7573
7623
  }
7574
7624
  //#endregion
7575
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
7625
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
7576
7626
  function downgradeCfgOrLambda(data) {
7577
7627
  if (data === void 0) return void 0;
7578
7628
  if (isConfigLambda(data)) return data.handle;
7579
7629
  return data;
7580
7630
  }
7581
7631
  //#endregion
7582
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/plugin_model.js
7632
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/plugin_model.js
7583
7633
  /** Symbol for internal plugin model creation — not accessible to external consumers */
7584
7634
  const CREATE_PLUGIN_MODEL = Symbol("createPluginModel");
7585
7635
  //#endregion
7586
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
7636
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
7587
7637
  /**
7588
7638
  * BlockStorage Callback Implementations - wired to facade callbacks in BlockModelV3.done().
7589
7639
  *
@@ -7760,7 +7810,7 @@
7760
7810
  }
7761
7811
  }
7762
7812
  //#endregion
7763
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_model.js
7813
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/block_model.js
7764
7814
  /**
7765
7815
  * Merges two feature flag objects with type-aware logic:
7766
7816
  * - `supports*` (boolean): OR — `true` if either side is `true`
@@ -8022,13 +8072,12 @@
8022
8072
  const wrappedInputs = {};
8023
8073
  for (const [paramKey, paramFn] of Object.entries(inputs)) wrappedInputs[paramKey] = () => paramFn(new BlockRenderCtx());
8024
8074
  const outputs = model.outputs;
8025
- const { outputFlags } = model;
8026
8075
  for (const [outputKey, outputFn] of Object.entries(outputs)) {
8027
8076
  const key = pluginOutputKey(handle, outputKey);
8028
8077
  pluginOutputs[key] = createAndRegisterRenderLambda({
8029
8078
  handle: key,
8030
8079
  lambda: () => outputFn(new PluginRenderCtx(handle, wrappedInputs)),
8031
- withStatus: outputFlags[outputKey]?.withStatus
8080
+ withStatus: true
8032
8081
  });
8033
8082
  }
8034
8083
  }
@@ -8065,13 +8114,14 @@
8065
8114
  blockModelInfo: {
8066
8115
  outputs: Object.fromEntries(Object.entries(allOutputs).map(([key, value]) => [key, { withStatus: Boolean(isConfigLambda(value) && value.withStatus) }])),
8067
8116
  pluginIds: pluginHandles,
8068
- featureFlags: this.config.featureFlags
8117
+ featureFlags: this.config.featureFlags,
8118
+ pluginPublicOutputs: Object.fromEntries(pluginHandles.map((handle) => [handle, plugins[handle].model.publicOutputDef]))
8069
8119
  }
8070
8120
  };
8071
8121
  }
8072
8122
  };
8073
8123
  //#endregion
8074
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/pframe_utils/axes.js
8124
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/pframe_utils/axes.js
8075
8125
  /** Create id for column copy with added keys in axes domains */
8076
8126
  const colId = (id, domains, contextDomains) => {
8077
8127
  let wid = id.toString();
@@ -8177,7 +8227,7 @@
8177
8227
  })];
8178
8228
  }
8179
8229
  //#endregion
8180
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js
8230
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js
8181
8231
  function getAllRelatedColumns(ctx, predicate) {
8182
8232
  const columns = new PColumnCollection();
8183
8233
  columns.addColumnProvider(ctx.resultPool);
@@ -8235,7 +8285,7 @@
8235
8285
  return enrichCompatible(blockAxes, [...compatibleWithoutLabels, ...compatibleLabels]);
8236
8286
  }
8237
8287
  //#endregion
8238
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
8288
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
8239
8289
  function isHiddenFromGraphColumn(column) {
8240
8290
  return !!readAnnotationJson(column, Annotation.HideDataFromGraphs);
8241
8291
  }
@@ -8263,7 +8313,7 @@
8263
8313
  }));
8264
8314
  }
8265
8315
  //#endregion
8266
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/traverse.js
8316
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/filters/traverse.js
8267
8317
  /**
8268
8318
  * Recursively traverses a FilterSpec tree bottom-up, applying visitor callbacks.
8269
8319
  *
@@ -8302,7 +8352,7 @@
8302
8352
  });
8303
8353
  }
8304
8354
  //#endregion
8305
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
8355
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
8306
8356
  /** Parses a CanonicalizedJson<PTableColumnId> string into a SpecQueryExpression reference. */
8307
8357
  function resolveColumnRef(columnStr) {
8308
8358
  const parsed = JSON.parse(columnStr);
@@ -8543,15 +8593,14 @@
8543
8593
  case "inSet": return {
8544
8594
  type: "isIn",
8545
8595
  input: resolveColumnRef(filter.column),
8546
- set: filter.value
8596
+ set: filter.value,
8597
+ negate: false
8547
8598
  };
8548
8599
  case "notInSet": return {
8549
- type: "not",
8550
- input: {
8551
- type: "isIn",
8552
- input: resolveColumnRef(filter.column),
8553
- set: filter.value
8554
- }
8600
+ type: "isIn",
8601
+ input: resolveColumnRef(filter.column),
8602
+ set: filter.value,
8603
+ negate: true
8555
8604
  };
8556
8605
  case "isNA": return {
8557
8606
  type: "isNull",
@@ -8565,7 +8614,7 @@
8565
8614
  }
8566
8615
  };
8567
8616
  case "ifNa": return {
8568
- type: "ifNull",
8617
+ type: "fillNull",
8569
8618
  input: resolveColumnRef(filter.column),
8570
8619
  replacement: {
8571
8620
  type: "constant",
@@ -8616,7 +8665,7 @@
8616
8665
  return true;
8617
8666
  }
8618
8667
  //#endregion
8619
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/distill.js
8668
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/filters/distill.js
8620
8669
  /**
8621
8670
  * Strips non-FilterSpec metadata (whitelist approach) and removes
8622
8671
  * unfilled leaves (type is undefined or any required field is undefined).
@@ -8721,7 +8770,7 @@
8721
8770
  greaterThanColumnOrEqual: ["column", "rhs"]
8722
8771
  };
8723
8772
  //#endregion
8724
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
8773
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
8725
8774
  /** Upgrade PlDataTableStateV2 to the latest version */
8726
8775
  function upgradePlDataTableStateV2(state) {
8727
8776
  if (!state) return createPlDataTableStateV2();
@@ -8737,6 +8786,7 @@
8737
8786
  if (state.version === 3) state = createPlDataTableStateV2();
8738
8787
  if (state.version === 4) state = migrateV4toV6(state);
8739
8788
  if (state.version === 5) state = migrateV5toV6(state);
8789
+ if (state.version === 6) state = migrateV6toV7(state);
8740
8790
  return state;
8741
8791
  }
8742
8792
  /** Migrate v5 to v6: unwrap `{source, labeled}` colIds in gridState. */
@@ -8768,6 +8818,36 @@
8768
8818
  columnVisibility: gridState.columnVisibility ? { hiddenColIds: gridState.columnVisibility.hiddenColIds.map(unwrapAs) } : void 0
8769
8819
  };
8770
8820
  }
8821
+ /** Migrate v6 to v7: rewrite each colId from a full PTableColumnSpec to its
8822
+ * compact PTableColumnId (drops annotations/spec body, ~16× smaller per column). */
8823
+ function migrateV6toV7(state) {
8824
+ return {
8825
+ version: 7,
8826
+ stateCache: state.stateCache.map((entry) => ({
8827
+ ...entry,
8828
+ gridState: shrinkV6GridState(entry.gridState)
8829
+ })),
8830
+ pTableParams: state.pTableParams
8831
+ };
8832
+ }
8833
+ /** Convert a v6 fat colId (canonicalized PTableColumnSpec) to a v7 compact colId
8834
+ * (canonicalized PTableColumnId). The row-number sentinel is a string literal,
8835
+ * not a spec — pass it through unchanged. */
8836
+ function shrinkV6ColId(json) {
8837
+ const parsed = parseJsonSafely(json);
8838
+ if (!isNil(parsed) && typeof parsed === "object" && "type" in parsed && "id" in parsed) return canonicalizeJson(getPTableColumnId(parsed));
8839
+ return json;
8840
+ }
8841
+ function shrinkV6GridState(gridState) {
8842
+ return {
8843
+ columnOrder: gridState.columnOrder ? { orderedColIds: gridState.columnOrder.orderedColIds.map(shrinkV6ColId) } : void 0,
8844
+ sort: gridState.sort ? { sortModel: gridState.sort.sortModel.map((s) => ({
8845
+ colId: shrinkV6ColId(s.colId),
8846
+ sort: s.sort
8847
+ })) } : void 0,
8848
+ columnVisibility: gridState.columnVisibility ? { hiddenColIds: gridState.columnVisibility.hiddenColIds.map(shrinkV6ColId) } : void 0
8849
+ };
8850
+ }
8771
8851
  /** Migrate v4 state to v6: convert per-column filters to tree-based format (skips v5). */
8772
8852
  function migrateV4toV6(state) {
8773
8853
  let idCounter = 0;
@@ -8945,19 +9025,19 @@
8945
9025
  }
8946
9026
  function createPlDataTableStateV2() {
8947
9027
  return {
8948
- version: 6,
9028
+ version: 7,
8949
9029
  stateCache: [],
8950
9030
  pTableParams: createDefaultPTableParams()
8951
9031
  };
8952
9032
  }
8953
9033
  //#endregion
8954
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
9034
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
8955
9035
  /** Check if column is hidden by default */
8956
9036
  function isColumnOptional(spec) {
8957
9037
  return readAnnotation(spec, Annotation.Table.Visibility) === "optional";
8958
9038
  }
8959
9039
  //#endregion
8960
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/labels.js
9040
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/labels.js
8961
9041
  /** Get label columns matching the provided columns from the result pool */
8962
9042
  function getMatchingLabelColumns(columns, allLabelColumns) {
8963
9043
  const inputLabelColumns = [];
@@ -9011,7 +9091,7 @@
9011
9091
  return labelColumns;
9012
9092
  }
9013
9093
  //#endregion
9014
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
9094
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
9015
9095
  function createPTableDefV3(params) {
9016
9096
  let query = {
9017
9097
  type: params.primaryJoinType === "inner" ? "innerJoin" : "fullJoin",
@@ -9082,7 +9162,7 @@
9082
9162
  };
9083
9163
  }
9084
9164
  //#endregion
9085
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js
9165
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js
9086
9166
  function createPTableDefV2(params) {
9087
9167
  let coreColumns = params.columns;
9088
9168
  const secondaryColumns = [];
@@ -9101,7 +9181,7 @@
9101
9181
  });
9102
9182
  }
9103
9183
  //#endregion
9104
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js
9184
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.77.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js
9105
9185
  /**
9106
9186
  * Create p-table spec and handle given ui table state
9107
9187
  *