@platforma-open/milaboratories.sequence-properties.model 1.2.0 → 1.2.1

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.69.0/node_modules/@platforma-sdk/model/dist/plugin_handle.js
28
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/block_storage.js
35
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/block_migrations.js
277
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/internal.js
772
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/block_storage_facade.js
842
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/config/actions.js
877
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.69.0/node_modules/@platforma-sdk/model/dist/render/future.js
890
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/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.36.2/node_modules/@milaboratories/pl-model-common/dist/util.js
4465
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/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.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.js
4477
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/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.36.2/node_modules/@milaboratories/pl-model-common/dist/errors.js
4668
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/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.36.2/node_modules/@milaboratories/pl-model-common/dist/json.js
4692
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/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");
@@ -4714,8 +4714,15 @@
4714
4714
  function parseJson(value) {
4715
4715
  return JSON.parse(value);
4716
4716
  }
4717
+ function parseJsonSafely(value, fallback) {
4718
+ try {
4719
+ return JSON.parse(value);
4720
+ } catch {
4721
+ return fallback;
4722
+ }
4723
+ }
4717
4724
  //#endregion
4718
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js
4725
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js
4719
4726
  function readMetadata(metadata, key) {
4720
4727
  return metadata?.[key];
4721
4728
  }
@@ -4741,6 +4748,7 @@
4741
4748
  AxisNature: "pl7.app/axisNature",
4742
4749
  Alphabet: "pl7.app/alphabet",
4743
4750
  Description: "pl7.app/description",
4751
+ DataStatus: "pl7.app/dataStatus",
4744
4752
  DiscreteValues: "pl7.app/discreteValues",
4745
4753
  Format: "pl7.app/format",
4746
4754
  Graph: {
@@ -5003,7 +5011,7 @@
5003
5011
  return query.name === target.name && matchDomain$1(query.domain, target.domain) && matchDomain$1(query.contextDomain, target.contextDomain);
5004
5012
  }
5005
5013
  //#endregion
5006
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
5014
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
5007
5015
  const booleanTypesSet = new Set([
5008
5016
  "numericComparison",
5009
5017
  "stringEquals",
@@ -5094,17 +5102,8 @@
5094
5102
  function mapSpecQueryColumns(query, cb) {
5095
5103
  return traverseQuerySpec(query, { column: cb });
5096
5104
  }
5097
- /** Collects all column references from a SpecQuery tree. */
5098
- function collectSpecQueryColumns(query) {
5099
- const result = [];
5100
- traverseQuerySpec(query, { column: (c) => {
5101
- result.push(c);
5102
- return c;
5103
- } });
5104
- return result;
5105
- }
5106
5105
  //#endregion
5107
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
5106
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
5108
5107
  function mapPTableDef(def, cb) {
5109
5108
  return {
5110
5109
  ...def,
@@ -5147,7 +5146,7 @@
5147
5146
  }
5148
5147
  }
5149
5148
  //#endregion
5150
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
5149
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
5151
5150
  /**
5152
5151
  * Canonically serializes a {@link UniversalPColumnId} to a string.
5153
5152
  * @param id - The column identifier to serialize
@@ -5157,7 +5156,7 @@
5157
5156
  return (0, import_canonicalize.default)(id);
5158
5157
  }
5159
5158
  //#endregion
5160
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
5159
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
5161
5160
  function axisKey(axis) {
5162
5161
  return (0, import_canonicalize.default)(getAxisId(axis));
5163
5162
  }
@@ -5402,7 +5401,7 @@
5402
5401
  return typeof value === "object" && "anchor" in value;
5403
5402
  }
5404
5403
  //#endregion
5405
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
5404
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
5406
5405
  function isPColumnSpec(spec) {
5407
5406
  return spec.kind === "PColumn";
5408
5407
  }
@@ -5448,7 +5447,7 @@
5448
5447
  return [...columns.values()];
5449
5448
  }
5450
5449
  //#endregion
5451
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
5450
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
5452
5451
  /**
5453
5452
  * Determines if an axis ID matches an axis selector.
5454
5453
  *
@@ -5529,7 +5528,7 @@
5529
5528
  else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
5530
5529
  }
5531
5530
  //#endregion
5532
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/native_id.js
5531
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/native_id.js
5533
5532
  function deriveNativeId(spec) {
5534
5533
  const result = {
5535
5534
  kind: spec.kind,
@@ -5541,7 +5540,7 @@
5541
5540
  return (0, import_canonicalize.default)(result);
5542
5541
  }
5543
5542
  //#endregion
5544
- //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.1/node_modules/@milaboratories/helpers/dist/utils.js
5543
+ //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/utils.js
5545
5544
  function isNil$1(v) {
5546
5545
  return v === null || v === void 0;
5547
5546
  }
@@ -5573,32 +5572,51 @@
5573
5572
  const prototype = Object.getPrototypeOf(value);
5574
5573
  return prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null;
5575
5574
  }
5575
+ /**
5576
+ * Reads a property from a union-typed object where the key may exist only on some members of the union.
5577
+ *
5578
+ * `K` is constrained to keys of the union's intersection, so any key present on at least one union
5579
+ * member is accepted. The return type resolves to `T[K]` when `K` is a key of `T`, otherwise `undefined`
5580
+ * — matching the runtime behavior of reading a missing property.
5581
+ *
5582
+ * @param obj - source object (may be a union of shapes)
5583
+ * @param prop - property name, must be a key of at least one union member
5584
+ * @returns the property value if present, otherwise `undefined`
5585
+ */
5586
+ function getField(obj, prop) {
5587
+ return obj[prop];
5588
+ }
5576
5589
  //#endregion
5577
- //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.1/node_modules/@milaboratories/helpers/dist/error.js
5590
+ //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/error.js
5578
5591
  function throwError(v) {
5579
5592
  if (typeof v === "string") throw new Error(v);
5580
5593
  else throw v;
5581
5594
  }
5582
5595
  //#endregion
5583
- //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.1/node_modules/@milaboratories/helpers/dist/uniqId.js
5596
+ //#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/uniqId.js
5584
5597
  function createGetIncrementalId() {
5585
5598
  let idx = 0n;
5586
5599
  return () => idx++;
5587
5600
  }
5588
5601
  createGetIncrementalId();
5589
5602
  //#endregion
5590
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/discovered_column.js
5591
- function createDiscoveredPColumn(props) {
5592
- return JSON.parse(JSON.stringify(props));
5603
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/discovered_column.js
5604
+ function distillDiscoveredPColumn(props) {
5605
+ return {
5606
+ column: props.column,
5607
+ path: Array.isArray(props.path) && props.path.length > 0 ? props.path : void 0,
5608
+ columnQualifications: Array.isArray(props.columnQualifications) && props.columnQualifications.length > 0 ? props.columnQualifications : void 0,
5609
+ queriesQualifications: props.queriesQualifications && Object.keys(props.queriesQualifications).length > 0 ? props.queriesQualifications : void 0
5610
+ };
5593
5611
  }
5594
5612
  function createDiscoveredPColumnId(props) {
5595
- return stringifyDiscoveredPColumnId(createDiscoveredPColumn(props));
5613
+ return stringifyDiscoveredPColumnId(props);
5596
5614
  }
5597
5615
  function stringifyDiscoveredPColumnId(id) {
5598
- return canonicalizeJson(id);
5616
+ return canonicalizeJson(distillDiscoveredPColumn(id));
5599
5617
  }
5600
5618
  //#endregion
5601
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
5619
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
5602
5620
  var LinkerMap = class LinkerMap {
5603
5621
  /** Graph of linkers connected by axes (single or grouped by parents) */
5604
5622
  data;
@@ -5776,9 +5794,17 @@
5776
5794
  }
5777
5795
  };
5778
5796
  //#endregion
5779
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.js
5797
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.js
5780
5798
  function assert() {}
5781
5799
  assert();
5800
+ //#endregion
5801
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.js
5802
+ /**
5803
+ * Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
5804
+ * version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
5805
+ * older desktop apps.
5806
+ */
5807
+ const REQUIRES_PFRAMES_VERSION = 1001031;
5782
5808
  stringType().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
5783
5809
  objectType({
5784
5810
  __isRef: literalType(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -5815,7 +5841,7 @@
5815
5841
  }
5816
5842
  }
5817
5843
  //#endregion
5818
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
5844
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
5819
5845
  function mapValueInVOE(voe, cb) {
5820
5846
  return voe.ok ? {
5821
5847
  ok: true,
@@ -5823,7 +5849,7 @@
5823
5849
  } : voe;
5824
5850
  }
5825
5851
  //#endregion
5826
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/resource_types.js
5852
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/resource_types.js
5827
5853
  /** Well-known resource type names used across the platform. */
5828
5854
  const ResourceTypeName = {
5829
5855
  StreamManager: "StreamManager",
@@ -5858,12 +5884,13 @@
5858
5884
  Null: "Null",
5859
5885
  Binary: "binary",
5860
5886
  LSProvider: "LSProvider",
5887
+ WorkingDirectory: "WorkingDirectory",
5861
5888
  UserProject: "UserProject",
5862
5889
  Projects: "Projects",
5863
5890
  ClientRoot: "ClientRoot"
5864
5891
  };
5865
5892
  //#endregion
5866
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
5893
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
5867
5894
  const SERVICE_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
5868
5895
  const { service, isNodeService, isWasmService, isMainService, getServiceKind, getServiceModelMethods, getServiceUiMethods } = (() => {
5869
5896
  const typeMap = /* @__PURE__ */ new Map();
@@ -5902,7 +5929,7 @@
5902
5929
  };
5903
5930
  })();
5904
5931
  //#endregion
5905
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
5932
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
5906
5933
  const Services = {
5907
5934
  PFrameSpec: service()({
5908
5935
  type: "wasm",
@@ -5971,7 +5998,7 @@
5971
5998
  }
5972
5999
  Object.fromEntries(Object.keys(Services).map((key) => [`requires${key}`, true]));
5973
6000
  //#endregion
5974
- //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.36.2/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
6001
+ //#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
5975
6002
  function buildMethodMap(pick) {
5976
6003
  const result = {};
5977
6004
  for (const id of Object.values(Services)) result[id] = [...pick(id)];
@@ -5980,7 +6007,7 @@
5980
6007
  buildMethodMap(getServiceUiMethods);
5981
6008
  buildMethodMap(getServiceModelMethods);
5982
6009
  //#endregion
5983
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/accessor.js
6010
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/accessor.js
5984
6011
  function ifDef(value, cb) {
5985
6012
  return value === void 0 ? void 0 : cb(value);
5986
6013
  }
@@ -6191,11 +6218,11 @@
6191
6218
  }
6192
6219
  };
6193
6220
  //#endregion
6194
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/internal.js
6221
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/internal.js
6195
6222
  const StagingAccessorName = "staging";
6196
6223
  const MainAccessorName = "main";
6197
6224
  //#endregion
6198
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
6225
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
6199
6226
  function filterDataInfoEntries(dataInfoEntries, axisFilters) {
6200
6227
  const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
6201
6228
  const { type } = dataInfoEntries;
@@ -6294,7 +6321,7 @@
6294
6321
  return x == null;
6295
6322
  }
6296
6323
  //#endregion
6297
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
6324
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
6298
6325
  const DISTANCE_PENALTY = .001;
6299
6326
  const LABEL_TYPE = "__LABEL__";
6300
6327
  const LABEL_TYPE_FULL = "__LABEL__@1";
@@ -6428,7 +6455,7 @@
6428
6455
  });
6429
6456
  }
6430
6457
  }
6431
- if (qualifications !== void 0) {
6458
+ if (qualifications !== void 0 && qualifications.forQueries !== void 0) {
6432
6459
  for (const [anchorId, qs] of Object.entries(qualifications.forQueries)) {
6433
6460
  if (qs.length === 0) continue;
6434
6461
  const anchorText = isFunction(formatters?.anchorQualification) ? formatters.anchorQualification(anchorId, qs, spec, index) : `[${anchorId}: ${formatQualifications(qs)}]`;
@@ -6439,7 +6466,7 @@
6439
6466
  importance: -11
6440
6467
  });
6441
6468
  }
6442
- if (qualifications.forHit.length > 0) {
6469
+ if (qualifications.forHit !== void 0 && qualifications.forHit.length > 0) {
6443
6470
  const hitText = isFunction(formatters?.hitQualification) ? formatters.hitQualification(qualifications.forHit, spec, index) : `[${formatQualifications(qualifications.forHit)}]`;
6444
6471
  if (!isNil(hitText)) trace.push({
6445
6472
  type: HIT_QUAL_TYPE,
@@ -6525,7 +6552,7 @@
6525
6552
  return result;
6526
6553
  }
6527
6554
  //#endregion
6528
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/util/label.js
6555
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/label.js
6529
6556
  /** @deprecated Use deriveDistinctLabels */
6530
6557
  function deriveLabels(values, getSpec, options = {}) {
6531
6558
  return deriveDistinctLabels(values.map(getSpec), options).map((label, i) => ({
@@ -6534,7 +6561,7 @@
6534
6561
  }));
6535
6562
  }
6536
6563
  //#endregion
6537
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
6564
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
6538
6565
  const PCD_PREFIX = "PColumnData/";
6539
6566
  const RT_RESOURCE_MAP = PCD_PREFIX + "ResourceMap";
6540
6567
  const RT_RESOURCE_MAP_PARTITIONED = PCD_PREFIX + "Partitioned/ResourceMap";
@@ -6834,7 +6861,7 @@
6834
6861
  return columns.every(isPColumnReady);
6835
6862
  }
6836
6863
  //#endregion
6837
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
6864
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
6838
6865
  function isPColumnValues(value) {
6839
6866
  if (!Array.isArray(value)) return false;
6840
6867
  if (value.length === 0) return true;
@@ -7109,7 +7136,7 @@
7109
7136
  }
7110
7137
  };
7111
7138
  //#endregion
7112
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/services/block_services.js
7139
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/block_services.js
7113
7140
  /**
7114
7141
  * Services required by all V3 blocks by default.
7115
7142
  * Edit this when a new service should be available to all blocks.
@@ -7124,7 +7151,7 @@
7124
7151
  };
7125
7152
  resolveRequiredServices(BLOCK_SERVICE_FLAGS);
7126
7153
  //#endregion
7127
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
7154
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
7128
7155
  /**
7129
7156
  * Builds a ServiceProxy from a ServiceDispatch.
7130
7157
  * Each service method call is forwarded to dispatch.callServiceMethod.
@@ -7133,7 +7160,7 @@
7133
7160
  return ((serviceId) => Object.freeze(Object.fromEntries(dispatch.getServiceMethods(serviceId).map((method) => [method, (...args) => dispatch.callServiceMethod(serviceId, method, ...args)]))));
7134
7161
  }
7135
7162
  //#endregion
7136
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/services/get_services.js
7163
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/get_services.js
7137
7164
  const cachedServices = /* @__PURE__ */ new WeakMap();
7138
7165
  function getService(name) {
7139
7166
  const ctx = getCfgRenderCtx();
@@ -7147,7 +7174,7 @@
7147
7174
  })();
7148
7175
  }
7149
7176
  //#endregion
7150
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
7177
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
7151
7178
  function patchInSetFilters(filters) {
7152
7179
  const inSetToOrEqual = (predicate) => {
7153
7180
  if (predicate.operator !== "InSet") return predicate;
@@ -7185,7 +7212,7 @@
7185
7212
  return filters.map((filter) => mapFilter(filter, inSetToOrEqual));
7186
7213
  }
7187
7214
  //#endregion
7188
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/render/api.js
7215
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/api.js
7189
7216
  /**
7190
7217
  * Helper function to match domain objects
7191
7218
  * @param query Optional domain to match against
@@ -7207,7 +7234,7 @@
7207
7234
  return mapPObjectData(data, (d) => {
7208
7235
  if (d instanceof TreeNodeAccessor) return d.handle;
7209
7236
  else if (isDataInfo(d)) return mapDataInfo(d, (accessor) => accessor.handle);
7210
- else return d;
7237
+ else return d ?? [];
7211
7238
  });
7212
7239
  }
7213
7240
  var ResultPool = class {
@@ -7547,8 +7574,6 @@
7547
7574
  return def;
7548
7575
  }
7549
7576
  createPFrame(def) {
7550
- if (!allPColumnsReady(def)) return void 0;
7551
- this.verifyInlineAndExplicitColumnsSupport(def);
7552
7577
  return this.ctx.createPFrame(def.map((c) => transformPColumnData(c)));
7553
7578
  }
7554
7579
  createPTable(def) {
@@ -7572,17 +7597,7 @@
7572
7597
  return this.ctx.createPTable(mapPTableDef(rawDef, (po) => transformPColumnData(po)));
7573
7598
  }
7574
7599
  createPTableV2(def) {
7575
- const columns = collectSpecQueryColumns(def.query);
7576
- if (!allPColumnsReady(columns)) return void 0;
7577
- this.verifyInlineAndExplicitColumnsSupport(columns);
7578
- return this.ctx.createPTableV2(mapPTableDefV2(def, (po) => {
7579
- if (po.data === void 0) throw new Error("unreachable: column data undefined after readiness check");
7580
- return transformPColumnData({
7581
- id: po.id,
7582
- spec: po.spec,
7583
- data: po.data
7584
- });
7585
- }));
7600
+ return this.ctx.createPTableV2(mapPTableDefV2(def, (po) => transformPColumnData(po)));
7586
7601
  }
7587
7602
  /** @deprecated scheduled for removal from SDK */
7588
7603
  getBlockLabel(blockId) {
@@ -7648,26 +7663,26 @@
7648
7663
  }
7649
7664
  };
7650
7665
  //#endregion
7651
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/version.js
7652
- const PlatformaSDKVersion = "1.69.0";
7666
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/version.js
7667
+ const PlatformaSDKVersion = "1.75.5";
7653
7668
  //#endregion
7654
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/bconfig/types.js
7669
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/types.js
7655
7670
  function isConfigLambda(cfgOrFh) {
7656
7671
  return cfgOrFh.__renderLambda === true;
7657
7672
  }
7658
7673
  //#endregion
7659
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
7674
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
7660
7675
  function downgradeCfgOrLambda(data) {
7661
7676
  if (data === void 0) return void 0;
7662
7677
  if (isConfigLambda(data)) return data.handle;
7663
7678
  return data;
7664
7679
  }
7665
7680
  //#endregion
7666
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/plugin_model.js
7681
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/plugin_model.js
7667
7682
  /** Symbol for internal plugin model creation — not accessible to external consumers */
7668
7683
  const CREATE_PLUGIN_MODEL = Symbol("createPluginModel");
7669
7684
  //#endregion
7670
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
7685
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
7671
7686
  /**
7672
7687
  * BlockStorage Callback Implementations - wired to facade callbacks in BlockModelV3.done().
7673
7688
  *
@@ -7844,7 +7859,7 @@
7844
7859
  }
7845
7860
  }
7846
7861
  //#endregion
7847
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/block_model.js
7862
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_model.js
7848
7863
  /**
7849
7864
  * Merges two feature flag objects with type-aware logic:
7850
7865
  * - `supports*` (boolean): OR — `true` if either side is `true`
@@ -7874,6 +7889,7 @@
7874
7889
  requiresUIAPIVersion: 3,
7875
7890
  requiresModelAPIVersion: 2,
7876
7891
  requiresCreatePTable: 2,
7892
+ requiresPFramesVersion: REQUIRES_PFRAMES_VERSION,
7877
7893
  ...BLOCK_SERVICE_FLAGS
7878
7894
  };
7879
7895
  /** @deprecated Use FEATURE_FLAGS */
@@ -8154,7 +8170,7 @@
8154
8170
  }
8155
8171
  };
8156
8172
  //#endregion
8157
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/columns/column_selector.js
8173
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_selector.js
8158
8174
  function normalizeStringMatchers(input) {
8159
8175
  if (typeof input === "string") return [{
8160
8176
  type: "regex",
@@ -8198,7 +8214,7 @@
8198
8214
  return (Array.isArray(input) ? input : [input]).map(convertRelaxedColumnSelectorToMultiColumnSelector);
8199
8215
  }
8200
8216
  //#endregion
8201
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/columns/column_snapshot_provider.js
8217
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_snapshot_provider.js
8202
8218
  /**
8203
8219
  * Simple provider wrapping an array of PColumns.
8204
8220
  * Always complete, data status always 'ready'.
@@ -8209,8 +8225,8 @@
8209
8225
  this.columns = columns.map((col) => ({
8210
8226
  id: col.id,
8211
8227
  spec: col.spec,
8212
- dataStatus: "ready",
8213
- data: { get: () => col.data }
8228
+ data: { get: () => col.data },
8229
+ dataStatus: this.getStatus(col.data)
8214
8230
  }));
8215
8231
  }
8216
8232
  getAllColumns() {
@@ -8219,6 +8235,27 @@
8219
8235
  isColumnListComplete() {
8220
8236
  return true;
8221
8237
  }
8238
+ getStatus(d) {
8239
+ if (d == null) return "absent";
8240
+ if (typeof d === "function") return this.getStatus(d());
8241
+ if (d instanceof TreeNodeAccessor) {
8242
+ if (d.getIsReadyOrError()) return "ready";
8243
+ if (d.getIsFinal()) return "absent";
8244
+ return "computing";
8245
+ }
8246
+ if (isDataInfo(d)) {
8247
+ let ready = true;
8248
+ let final = true;
8249
+ visitDataInfo(d, (v) => {
8250
+ ready &&= v.getIsReadyOrError();
8251
+ final &&= v.getIsFinal();
8252
+ });
8253
+ if (ready) return "ready";
8254
+ if (final) return "absent";
8255
+ return "computing";
8256
+ }
8257
+ return "ready";
8258
+ }
8222
8259
  };
8223
8260
  /**
8224
8261
  * Provider wrapping an array of ColumnSnapshots.
@@ -8302,7 +8339,7 @@
8302
8339
  throw new Error("Unknown ColumnSource type");
8303
8340
  }
8304
8341
  //#endregion
8305
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/columns/column_collection_builder.js
8342
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_collection_builder.js
8306
8343
  /**
8307
8344
  * Mutable builder that accumulates column sources, then produces
8308
8345
  * a ColumnCollection (plain) or AnchoredColumnCollection (with anchors).
@@ -8406,10 +8443,7 @@
8406
8443
  const col = this.columnsMap.get(origId) ?? throwError(`Column with id ${origId} not found in collection`);
8407
8444
  const path = hit.path.map((step) => {
8408
8445
  if (step.type !== "linker") throw new Error(`Unexpected discover-columns step type: ${step.type}`);
8409
- return {
8410
- linker: this.columnsMap.get(step.linker.columnId) ?? throwError(`Linker column with id ${step.linker.columnId} not found in collection`),
8411
- qualifications: step.qualifications
8412
- };
8446
+ return { linker: this.columnsMap.get(step.linker.columnId) ?? throwError(`Linker column with id ${step.linker.columnId} not found in collection`) };
8413
8447
  });
8414
8448
  const variants = hit.mappingVariants.map((v) => ({
8415
8449
  path,
@@ -8487,7 +8521,7 @@
8487
8521
  excludeColumns: void 0,
8488
8522
  axes: [],
8489
8523
  maxHops: 0,
8490
- constraints: matchingModeToConstraints("exact")
8524
+ constraints: matchingModeToConstraints("related")
8491
8525
  });
8492
8526
  if (matched.hits.length === 0) throwError(`Anchor "${name}": no columns matched selector`);
8493
8527
  if (matched.hits.length > 1) throwError(`Anchor "${name}": selector is ambiguous and matched multiple columns; please refine the selector to match exactly one column`);
@@ -8501,9 +8535,10 @@
8501
8535
  return result;
8502
8536
  }
8503
8537
  function remapFromIdxToId(qualifications, anchors) {
8538
+ const forQueries = qualifications.forQueries.reduce((acc, qs, i) => anchors[i] && qs.length > 0 ? acc.set(anchors[i].id, qs) : acc, /* @__PURE__ */ new Map());
8504
8539
  return {
8505
- forQueries: qualifications.forQueries.reduce((acc, qs, i) => anchors[i] ? (acc[anchors[i].id] = qs, acc) : acc, {}),
8506
- forHit: qualifications.forHit
8540
+ forQueries: forQueries.size > 0 ? Object.fromEntries(forQueries) : void 0,
8541
+ forHit: qualifications.forHit.length > 0 ? qualifications.forHit : void 0
8507
8542
  };
8508
8543
  }
8509
8544
  function matchingModeToConstraints(mode) {
@@ -8529,23 +8564,20 @@
8529
8564
  }
8530
8565
  }
8531
8566
  //#endregion
8532
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/columns/ctx_column_sources.js
8567
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/ctx_column_sources.js
8533
8568
  /**
8534
- * Collect ColumnSnapshotProviders from all render context sources:
8535
- *
8536
- * - **resultPool** all upstream columns (always included)
8537
- * - **outputs** PFrame fields from block execution outputs
8538
- * - **prerun** — PFrame fields from prerun/staging results
8539
- *
8540
- * Returns an array of providers suitable for `ColumnCollectionBuilder.addSource()`.
8569
+ * Collect ColumnSnapshotProviders from `outputs`, `prerun`, and
8570
+ * `resultPool` in that order. Dedup keeps the first occurrence per
8571
+ * `NativePObjectId`, so a block re-publishing its own columns keeps
8572
+ * the `outputs`-rooted canonical id instead of the result-pool variant.
8541
8573
  */
8542
8574
  function collectCtxColumnSnapshotProviders(ctx) {
8543
8575
  const providers = [];
8544
- providers.push(new ResultPoolColumnSnapshotProvider(ctx.resultPool));
8545
8576
  const outputs = ctx.outputs;
8546
8577
  if (outputs) providers.push(...collectPFrameProviders(outputs));
8547
8578
  const prerun = ctx.prerun;
8548
8579
  if (prerun) providers.push(...collectPFrameProviders(prerun));
8580
+ providers.push(new ResultPoolColumnSnapshotProvider(ctx.resultPool));
8549
8581
  return providers;
8550
8582
  }
8551
8583
  /**
@@ -8605,7 +8637,7 @@
8605
8637
  }
8606
8638
  }
8607
8639
  //#endregion
8608
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/filters/traverse.js
8640
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/traverse.js
8609
8641
  /**
8610
8642
  * Recursively traverses a FilterSpec tree bottom-up, applying visitor callbacks.
8611
8643
  *
@@ -8644,7 +8676,7 @@
8644
8676
  });
8645
8677
  }
8646
8678
  //#endregion
8647
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
8679
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
8648
8680
  /** Parses a CanonicalizedJson<PTableColumnId> string into a SpecQueryExpression reference. */
8649
8681
  function resolveColumnRef(columnStr) {
8650
8682
  const parsed = JSON.parse(columnStr);
@@ -8958,7 +8990,7 @@
8958
8990
  return true;
8959
8991
  }
8960
8992
  //#endregion
8961
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/filters/distill.js
8993
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/distill.js
8962
8994
  /**
8963
8995
  * Strips non-FilterSpec metadata (whitelist approach) and removes
8964
8996
  * unfilled leaves (type is undefined or any required field is undefined).
@@ -9063,7 +9095,7 @@
9063
9095
  greaterThanColumnOrEqual: ["column", "rhs"]
9064
9096
  };
9065
9097
  //#endregion
9066
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
9098
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
9067
9099
  /** Upgrade PlDataTableStateV2 to the latest version */
9068
9100
  function upgradePlDataTableStateV2(state) {
9069
9101
  if (!state) return createPlDataTableStateV2();
@@ -9077,11 +9109,41 @@
9077
9109
  pTableParams: createDefaultPTableParams()
9078
9110
  };
9079
9111
  if (state.version === 3) state = createPlDataTableStateV2();
9080
- if (state.version === 4) state = migrateV4toV5(state);
9112
+ if (state.version === 4) state = migrateV4toV6(state);
9113
+ if (state.version === 5) state = migrateV5toV6(state);
9081
9114
  return state;
9082
9115
  }
9083
- /** Migrate v4 state to v5: convert per-column filters to tree-based format */
9084
- function migrateV4toV5(state) {
9116
+ /** Migrate v5 to v6: unwrap `{source, labeled}` colIds in gridState. */
9117
+ function migrateV5toV6(state) {
9118
+ return {
9119
+ version: 6,
9120
+ stateCache: state.stateCache.map((entry) => ({
9121
+ ...entry,
9122
+ gridState: unwrapV5GridState(entry.gridState)
9123
+ })),
9124
+ pTableParams: createDefaultPTableParams()
9125
+ };
9126
+ }
9127
+ /** Convert v5 wrapped colId JSON to bare PTableColumnSpec JSON, taking `.source`.
9128
+ * gridState colIds may include the row-number sentinel (a JSON-stringified
9129
+ * literal, not a wrapped spec) — those pass through unchanged. */
9130
+ function unwrapV5ColId(json) {
9131
+ const parsed = parseJsonSafely(json);
9132
+ return !isNil(parsed) && typeof parsed === "object" && "source" in parsed ? canonicalizeJson(parsed.source) : json;
9133
+ }
9134
+ function unwrapV5GridState(gridState) {
9135
+ const unwrapAs = (json) => unwrapV5ColId(json);
9136
+ return {
9137
+ columnOrder: gridState.columnOrder ? { orderedColIds: gridState.columnOrder.orderedColIds.map(unwrapAs) } : void 0,
9138
+ sort: gridState.sort ? { sortModel: gridState.sort.sortModel.map((s) => ({
9139
+ colId: unwrapAs(s.colId),
9140
+ sort: s.sort
9141
+ })) } : void 0,
9142
+ columnVisibility: gridState.columnVisibility ? { hiddenColIds: gridState.columnVisibility.hiddenColIds.map(unwrapAs) } : void 0
9143
+ };
9144
+ }
9145
+ /** Migrate v4 state to v6: convert per-column filters to tree-based format (skips v5). */
9146
+ function migrateV4toV6(state) {
9085
9147
  let idCounter = 0;
9086
9148
  const nextId = () => ++idCounter;
9087
9149
  const migratedCache = state.stateCache.map((entry) => {
@@ -9106,7 +9168,7 @@
9106
9168
  const oldSourceId = state.pTableParams.sourceId;
9107
9169
  const currentCache = oldSourceId ? migratedCache.find((e) => e.sourceId === oldSourceId) : void 0;
9108
9170
  return {
9109
- version: 5,
9171
+ version: 6,
9110
9172
  stateCache: migratedCache,
9111
9173
  pTableParams: currentCache && oldSourceId ? {
9112
9174
  sourceId: oldSourceId,
@@ -9257,13 +9319,13 @@
9257
9319
  }
9258
9320
  function createPlDataTableStateV2() {
9259
9321
  return {
9260
- version: 5,
9322
+ version: 6,
9261
9323
  stateCache: [],
9262
9324
  pTableParams: createDefaultPTableParams()
9263
9325
  };
9264
9326
  }
9265
9327
  //#endregion
9266
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_tooltips.js
9328
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_tooltips.js
9267
9329
  /** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
9268
9330
  function deriveDistinctTooltips(entries) {
9269
9331
  return entries.map(formatTooltip);
@@ -9282,7 +9344,6 @@
9282
9344
  return sections.join("\n\n");
9283
9345
  }
9284
9346
  const BULLET_1 = " • ";
9285
- const SUB_BULLET = " ";
9286
9347
  function formatHeader(entry) {
9287
9348
  const lines = [];
9288
9349
  if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
@@ -9295,8 +9356,6 @@
9295
9356
  path.forEach((step, i) => {
9296
9357
  const label = readAnnotation(step.linker.spec, Annotation.LinkLabel) ?? readAnnotation(step.linker.spec, Annotation.Label) ?? step.linker.spec.name;
9297
9358
  lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
9298
- const qs = formatAxisQualifications(step.qualifications);
9299
- if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
9300
9359
  });
9301
9360
  const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;
9302
9361
  lines.push(`${BULLET_1}hit column: ${hitName}`);
@@ -9304,6 +9363,7 @@
9304
9363
  }
9305
9364
  function formatAnchors(q) {
9306
9365
  if (isNil(q)) return void 0;
9366
+ if (isNil(q.forQueries)) return void 0;
9307
9367
  const ids = Object.keys(q.forQueries);
9308
9368
  if (ids.length === 0) return void 0;
9309
9369
  const lines = [];
@@ -9316,7 +9376,7 @@
9316
9376
  return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
9317
9377
  }
9318
9378
  function formatHit(q) {
9319
- if (isNil(q) || q.forHit.length === 0) return void 0;
9379
+ if (isNil(q) || isNil(q.forHit) || q.forHit.length === 0) return void 0;
9320
9380
  const rendered = formatAxisQualifications(q.forHit);
9321
9381
  if (rendered === void 0) return void 0;
9322
9382
  return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
@@ -9332,7 +9392,7 @@
9332
9392
  return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
9333
9393
  }
9334
9394
  //#endregion
9335
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
9395
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
9336
9396
  /** Check if column should be omitted from the table */
9337
9397
  function isColumnHidden(spec) {
9338
9398
  return readAnnotation(spec, Annotation.Table.Visibility) === "hidden";
@@ -9352,7 +9412,8 @@
9352
9412
  function getOrderPriority(col, orderByColId) {
9353
9413
  const rule = orderByColId?.get(col.id);
9354
9414
  if (rule !== void 0) return rule.priority;
9355
- return readAnnotationJson(col.spec, Annotation.Table.OrderPriority);
9415
+ const annotation = Number(readAnnotation(col.spec, Annotation.Table.OrderPriority));
9416
+ return isNaN(annotation) ? void 0 : annotation;
9356
9417
  }
9357
9418
  /**
9358
9419
  * Evaluate display rules against a set of columns and return a map of `colId → winning rule`
@@ -9434,6 +9495,20 @@
9434
9495
  };
9435
9496
  });
9436
9497
  }
9498
+ function withDataStatusAnnotations(columns) {
9499
+ return columns.map((col) => {
9500
+ return {
9501
+ ...col,
9502
+ spec: {
9503
+ ...col.spec,
9504
+ annotations: {
9505
+ ...col.spec.annotations,
9506
+ [Annotation.DataStatus]: col.dataStatus
9507
+ }
9508
+ }
9509
+ };
9510
+ });
9511
+ }
9437
9512
  /**
9438
9513
  * Writes effective display properties (OrderPriority, Visibility) from precomputed rule maps
9439
9514
  * into column annotations. Returns new column objects — originals are not mutated.
@@ -9496,10 +9571,7 @@
9496
9571
  const { columns, deriveLabelsOptions } = options;
9497
9572
  return deriveDistinctLabels(columns.map((c) => ({
9498
9573
  spec: c.spec,
9499
- linkerPath: c.linkerPath?.map((step) => ({
9500
- spec: step.linker.spec,
9501
- qualifications: step.qualifications
9502
- })),
9574
+ linkerPath: c.linkerPath?.map((step) => ({ spec: step.linker.spec })),
9503
9575
  qualifications: c.qualifications
9504
9576
  })), deriveLabelsOptions).reduce((acc, label, index) => (acc[columns[index].id] = label, acc), {});
9505
9577
  }
@@ -9507,11 +9579,12 @@
9507
9579
  function deriveAllTooltips(options) {
9508
9580
  const { columns } = options;
9509
9581
  const variantCountByOriginal = columns.reduce((acc, c) => {
9510
- return acc.set(c.originalId, (acc.get(c.originalId) ?? 0) + 1);
9582
+ return acc.set(getField(c, "originalId") ?? c.id, (acc.get(c.originalId ?? c.id) ?? 0) + 1);
9511
9583
  }, /* @__PURE__ */ new Map());
9512
9584
  const { entries } = columns.reduce(({ entries, variantSeen }, c) => {
9513
- const variantCount = variantCountByOriginal.get(c.originalId);
9514
- const variantIndex = (variantSeen.set(c.originalId, (variantSeen.get(c.originalId) ?? 0) + 1), variantSeen.get(c.originalId));
9585
+ const id = getField(c, "originalId") ?? c.id;
9586
+ const variantCount = variantCountByOriginal.get(id);
9587
+ const variantIndex = (variantSeen.set(id, (variantSeen.get(id) ?? 0) + 1), variantSeen.get(id));
9515
9588
  entries.push({
9516
9589
  spec: c.spec,
9517
9590
  linkerPath: c.linkerPath,
@@ -9531,7 +9604,7 @@
9531
9604
  return Object.fromEntries(tooltips.flatMap((t, i) => isNil(t) ? [] : [[columns[i].id, t]]));
9532
9605
  }
9533
9606
  //#endregion
9534
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
9607
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
9535
9608
  function createPTableDefV3(params) {
9536
9609
  let query = {
9537
9610
  type: params.primaryJoinType === "inner" ? "innerJoin" : "fullJoin",
@@ -9543,7 +9616,7 @@
9543
9616
  entry: query,
9544
9617
  qualifications: params.secondary.flatMap((g) => params.primary.flatMap((p) => g.primaryQualifications?.[p.column.id] ?? []))
9545
9618
  },
9546
- secondary: params.secondary.flatMap((g) => g.entries.map((e) => toLeaf(e.column, e.qualifications ?? [])))
9619
+ secondary: params.secondary.flatMap((g) => g.entries.map((e) => toJoinEntry(e)))
9547
9620
  };
9548
9621
  if (!isNil(params.filters)) {
9549
9622
  const nonEmpty = distillFilterSpec(params.filters);
@@ -9586,8 +9659,23 @@
9586
9659
  qualifications: qs
9587
9660
  };
9588
9661
  }
9662
+ function toJoinEntry(e) {
9663
+ const qs = e.qualifications ?? [];
9664
+ if (isNil(e.linkers) || e.linkers.length === 0) return toLeaf(e.column, qs);
9665
+ return {
9666
+ ...e.linkers.reduceRight((inner, linker) => ({
9667
+ entry: {
9668
+ type: "linkerJoin",
9669
+ linker: { column: linker },
9670
+ secondary: [inner]
9671
+ },
9672
+ qualifications: []
9673
+ }), toLeaf(e.column, [])),
9674
+ qualifications: qs
9675
+ };
9676
+ }
9589
9677
  //#endregion
9590
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/discoverColumns.js
9678
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/discoverColumns.js
9591
9679
  /** Discover columns from sources/anchors and normalize into a flat TableColumnVariant list. */
9592
9680
  function discoverTableColumnSnaphots(ctx, options) {
9593
9681
  const resolvedOptions = {
@@ -9599,7 +9687,52 @@
9599
9687
  const collection = new ColumnCollectionBuilder(ctx.getService("pframeSpec")).addSources(providers).build(resolvedOptions);
9600
9688
  if (collection === void 0) return void 0;
9601
9689
  try {
9602
- return mapToTableColumnVariants(collection.findColumnVariants({ ...resolvedOptions.selector ?? {} }), collection.getAnchors());
9690
+ return mapToTableColumnVariants(collection.findColumnVariants(resolvedOptions.selector), collection.getAnchors());
9691
+ } finally {
9692
+ collection.dispose();
9693
+ }
9694
+ }
9695
+ /**
9696
+ * Discover label columns matching the axes of the given value columns from
9697
+ * ctx providers. Returns label snapshots wrapped as direct TableColumnVariants
9698
+ * (path: [], empty qualifications, isPrimary: false).
9699
+ */
9700
+ function discoverLabelColumnVariants(ctx, columns) {
9701
+ if (columns.length === 0) return [];
9702
+ const collection = new ColumnCollectionBuilder(ctx.getService("pframeSpec")).addSources(collectCtxColumnSnapshotProviders(ctx)).addSource(columns.map((c) => c.column)).build({
9703
+ allowPartialColumnList: true,
9704
+ anchors: Object.fromEntries(columns.filter((col) => (col.path?.length ?? 0) === 0 && col.isPrimary).map((col, i) => [`anchor_${i}`, col.column.spec]))
9705
+ });
9706
+ try {
9707
+ const axes = columns.flatMap((col) => col.column.spec.axesSpec);
9708
+ return collection.findColumnVariants({
9709
+ include: axes.map((a) => ({
9710
+ name: {
9711
+ type: "exact",
9712
+ value: PColumnName.Label
9713
+ },
9714
+ axes: [{ name: {
9715
+ type: "exact",
9716
+ value: a.name
9717
+ } }]
9718
+ })),
9719
+ maxHops: columns.reduce((acc, c) => Math.max(acc, c.path?.length ?? 0), 0)
9720
+ }).map((variant) => ({
9721
+ ...variant,
9722
+ column: {
9723
+ ...variant.column,
9724
+ id: createDiscoveredPColumnId({
9725
+ column: variant.column.id,
9726
+ path: variant.path?.map((p) => ({
9727
+ type: "linker",
9728
+ column: p.linker.id
9729
+ })),
9730
+ columnQualifications: variant.qualifications?.forHit,
9731
+ queriesQualifications: variant.qualifications?.forQueries
9732
+ }),
9733
+ originalId: variant.column.id
9734
+ }
9735
+ }));
9603
9736
  } finally {
9604
9737
  collection.dispose();
9605
9738
  }
@@ -9625,13 +9758,12 @@
9625
9758
  column: {
9626
9759
  id: createDiscoveredPColumnId({
9627
9760
  column: snap.id,
9628
- path: variant.path.map((p) => ({
9761
+ path: variant.path?.map((p) => ({
9629
9762
  type: "linker",
9630
- column: p.linker.id,
9631
- qualifications: p.qualifications
9763
+ column: p.linker.id
9632
9764
  })),
9633
- columnQualifications: variant.qualifications.forHit,
9634
- queriesQualifications: variant.qualifications.forQueries
9765
+ columnQualifications: variant.qualifications?.forHit,
9766
+ queriesQualifications: variant.qualifications?.forQueries
9635
9767
  }),
9636
9768
  spec: snap.spec,
9637
9769
  data: snap.data,
@@ -9645,12 +9777,12 @@
9645
9777
  });
9646
9778
  }
9647
9779
  //#endregion
9648
- //#region ../node_modules/.pnpm/@platforma-sdk+model@1.69.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js
9780
+ //#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js
9649
9781
  function createPlDataTableV3(ctx, options) {
9650
9782
  const pframeSpec = ctx.getService("pframeSpec");
9651
9783
  const state = upgradePlDataTableStateV2(options.tableState);
9652
9784
  const primaryJoinType = options.primaryJoinType ?? "full";
9653
- const discovered = isPlainObject(options.columns) ? discoverTableColumnSnaphots(ctx, options.columns) : options.columns;
9785
+ const discovered = isPlainObject(options.columns) ? discoverTableColumnSnaphots(ctx, options.columns) : isNil$1(options.columns) ? options.columns : uniqueBy([...options.columns, ...discoverLabelColumnVariants(ctx, options.columns)], (c) => c.column.id);
9654
9786
  if (isNil$1(discovered) || discovered.length === 0) return void 0;
9655
9787
  const splited = splitDiscoveredColumns(discovered);
9656
9788
  const derivedLabels = deriveAllLabels({
@@ -9659,7 +9791,7 @@
9659
9791
  spec: dc.column.spec,
9660
9792
  linkerPath: dc.path,
9661
9793
  qualifications: dc.qualifications
9662
- })),
9794
+ })).filter((v) => !isColumnHidden(v.spec)),
9663
9795
  deriveLabelsOptions: {
9664
9796
  includeNativeLabel: true,
9665
9797
  ...options.labelsOptions
@@ -9667,7 +9799,7 @@
9667
9799
  });
9668
9800
  const derivedTooltips = deriveAllTooltips({ columns: discovered.map((dc) => ({
9669
9801
  id: dc.column.id,
9670
- originalId: dc.originalId,
9802
+ originalId: getField(dc, "originalId"),
9671
9803
  spec: dc.column.spec,
9672
9804
  linkerPath: dc.path,
9673
9805
  qualifications: dc.qualifications
@@ -9682,12 +9814,10 @@
9682
9814
  const primarySnapshots = annotated.direct.filter((c) => c.isPrimary);
9683
9815
  const secondarySnapshots = annotated.direct.filter((c) => !c.isPrimary);
9684
9816
  if (primarySnapshots.length === 0) return void 0;
9685
- const columnIsAvailable = createColumnValidationById([...annotated.direct.map((v) => v.column), ...annotated.linked.flatMap((lc) => [...lc.path.map((s) => s.linker), lc.column])]);
9817
+ const columnIsAvailable = createColumnValidationById([...annotated.direct.map((v) => v.column), ...annotated.linked.flatMap((lc) => [...(lc.path ?? []).map((s) => s.linker), lc.column])]);
9686
9818
  const remapedDefaultFilters = remapFilterColumnIds(options.filters, discovered);
9687
- const filters = concatFilters(state.pTableParams.filters, state.pTableParams.defaultFilters ?? remapedDefaultFilters);
9688
- validateFilters(filters, columnIsAvailable);
9689
- const sorting = resolveSorting(state.pTableParams.sorting, remapSortingColumnIds(options.sorting, discovered));
9690
- validateSorting(sorting, columnIsAvailable);
9819
+ const filters = filterFilters(concatFilters(state.pTableParams.filters, state.pTableParams.defaultFilters ?? remapedDefaultFilters), columnIsAvailable);
9820
+ const sorting = filterSorting(resolveSorting(state.pTableParams.sorting, remapSortingColumnIds(options.sorting, discovered)), columnIsAvailable);
9691
9821
  const primaryEntries = primarySnapshots.map((v) => ({ column: resolveSnapshot(v.column) }));
9692
9822
  const fullDef = createPTableDefV3({
9693
9823
  primaryJoinType,
@@ -9723,13 +9853,13 @@
9723
9853
  /** Split discovered columns into direct (no linker path) and linked (with linker path). */
9724
9854
  function splitDiscoveredColumns(columns) {
9725
9855
  return {
9726
- direct: columns.filter((dc) => dc.path.length === 0),
9727
- linked: columns.filter((dc) => dc.path.length > 0)
9856
+ direct: columns.filter((dc) => (dc.path?.length ?? 0) === 0),
9857
+ linked: columns.filter((dc) => (dc.path?.length ?? 0) > 0)
9728
9858
  };
9729
9859
  }
9730
9860
  /** All linker snapshots across the given linked columns, deduped by id. */
9731
9861
  function collectLinkerSnapshots(linked) {
9732
- return uniqueBy(linked.flatMap((lc) => lc.path.map((s) => s.linker)), (c) => c.id);
9862
+ return uniqueBy(linked.flatMap((lc) => (lc.path ?? []).map((s) => s.linker)), (c) => c.id);
9733
9863
  }
9734
9864
  /**
9735
9865
  * Annotate all column groups with derived labels and display-rule annotations.
@@ -9747,8 +9877,8 @@
9747
9877
  const visibilityByColId = evaluateRules(displayOptions?.visibility ?? [], allColumnsForRules, pframeSpec);
9748
9878
  const orderByColId = evaluateRules(displayOptions?.ordering ?? [], allColumnsForRules, pframeSpec);
9749
9879
  return {
9750
- direct: liftToVariantColumns(direct, flow((cols) => withLabelAnnotations(derivedLabels, cols), (cols) => withInfoAnnotations(derivedTooltips, cols), (cols) => withTableVisualAnnotations(visibilityByColId, orderByColId, cols))),
9751
- linked: liftToVariantColumns(linked, flow((cols) => withHidenAxesAnnotations(cols), (cols) => withLabelAnnotations(derivedLabels, cols), (cols) => withInfoAnnotations(derivedTooltips, cols), (cols) => withTableVisualAnnotations(visibilityByColId, orderByColId, cols))).map((lc) => ({
9880
+ direct: liftToVariantColumns(direct, flow((cols) => withDataStatusAnnotations(cols), (cols) => withLabelAnnotations(derivedLabels, cols), (cols) => withInfoAnnotations(derivedTooltips, cols), (cols) => withTableVisualAnnotations(visibilityByColId, orderByColId, cols))),
9881
+ linked: liftToVariantColumns(linked, flow((cols) => withDataStatusAnnotations(cols), (cols) => withHidenAxesAnnotations(cols), (cols) => withLabelAnnotations(derivedLabels, cols), (cols) => withInfoAnnotations(derivedTooltips, cols), (cols) => withTableVisualAnnotations(visibilityByColId, orderByColId, cols))).map((lc) => ({
9752
9882
  ...lc,
9753
9883
  path: annotateLinkerPath(derivedLabels, lc.path)
9754
9884
  }))
@@ -9764,7 +9894,7 @@
9764
9894
  }));
9765
9895
  }
9766
9896
  function annotateLinkerPath(derivedLabels, path) {
9767
- if (path.length === 0) return path;
9897
+ if (isNil$1(path) || path.length === 0) return path;
9768
9898
  const annotatedLinkers = withHidenAxesAnnotations(withLabelAnnotations(derivedLabels, path.map((s) => s.linker)));
9769
9899
  return path.map((s, i) => ({
9770
9900
  ...s,
@@ -9785,11 +9915,33 @@
9785
9915
  return validIdSet.has(id);
9786
9916
  };
9787
9917
  }
9788
- /** Validate that all column references in filters exist in the table. */
9789
- function validateFilters(filters, isValidColumnId) {
9790
- if (filters == null) return;
9791
- const firstInvalid = collectFilterSpecColumns(filters).find((col) => !isValidColumnId(col));
9792
- if (firstInvalid !== void 0) throw new Error(`Invalid filter column ${firstInvalid}: column reference does not match the table columns`);
9918
+ /** Drop filter leaves whose column references are not available in the table. */
9919
+ function filterFilters(filters, isValidColumnId) {
9920
+ if (isNil$1(filters)) return filters;
9921
+ const isLeafValid = (leaf) => {
9922
+ if (leaf.type === void 0) return true;
9923
+ if ("column" in leaf && !isValidColumnId(leaf.column)) return false;
9924
+ if ("rhs" in leaf && !isValidColumnId(leaf.rhs)) return false;
9925
+ return true;
9926
+ };
9927
+ const prune = (node) => {
9928
+ if (node.type === "and" || node.type === "or") {
9929
+ const kept = node.filters.map((f) => prune(f)).filter((f) => !isNil$1(f));
9930
+ return {
9931
+ type: node.type,
9932
+ filters: kept
9933
+ };
9934
+ }
9935
+ if (node.type === "not") {
9936
+ const inner = prune(node.filter);
9937
+ return isNil$1(inner) ? void 0 : {
9938
+ type: "not",
9939
+ filter: inner
9940
+ };
9941
+ }
9942
+ return isLeafValid(node) ? node : void 0;
9943
+ };
9944
+ return prune(filters);
9793
9945
  }
9794
9946
  /** Merge two filter trees into one AND-combined tree. Returns the non-nil one if the other is nil. */
9795
9947
  function concatFilters(a, b) {
@@ -9804,27 +9956,24 @@
9804
9956
  function resolveSorting(userSorting, defaultSorting) {
9805
9957
  return (isEmpty(userSorting) ? defaultSorting : userSorting) ?? [];
9806
9958
  }
9807
- /** Validate that all column references in sorting exist in the table. */
9808
- function validateSorting(sorting, isValidColumnId) {
9809
- const firstInvalid = sorting.find((s) => !isValidColumnId(canonicalizeJson(s.column)));
9810
- if (firstInvalid !== void 0) throw new Error(`Invalid sorting column ${JSON.stringify(firstInvalid.column)}: column reference does not match the table columns`);
9959
+ /** Drop sorting entries whose column is not available in the table. */
9960
+ function filterSorting(sorting, isValidColumnId) {
9961
+ return sorting.filter((s) => isValidColumnId(canonicalizeJson(s.column)));
9811
9962
  }
9812
9963
  function buildSecondaryGroups(direct, linked) {
9813
9964
  return [...direct.map((c) => ({
9814
9965
  entries: [{
9815
9966
  column: resolveSnapshot(c.column),
9816
- qualifications: c.qualifications.forHit
9967
+ qualifications: c.qualifications?.forHit
9817
9968
  }],
9818
- primaryQualifications: c.qualifications.forQueries
9969
+ primaryQualifications: c.qualifications?.forQueries
9819
9970
  })), ...linked.map((lc) => ({
9820
- entries: [...lc.path.map((s) => ({
9821
- column: resolveSnapshot(s.linker),
9822
- qualifications: s.qualifications
9823
- })), {
9971
+ entries: [{
9824
9972
  column: resolveSnapshot(lc.column),
9825
- qualifications: lc.qualifications.forHit
9973
+ linkers: lc.path?.map((s) => resolveSnapshot(s.linker)),
9974
+ qualifications: lc.qualifications?.forHit
9826
9975
  }],
9827
- primaryQualifications: lc.qualifications.forQueries
9976
+ primaryQualifications: lc.qualifications?.forQueries
9828
9977
  }))];
9829
9978
  }
9830
9979
  /** Determine which columns should be hidden based on state or optional-column defaults. */
@@ -9861,17 +10010,18 @@
9861
10010
  }
9862
10011
  /** Remap column references in sorting entries. */
9863
10012
  function remapSortingColumnIds(sorting, columns) {
9864
- return sorting?.map((s) => {
9865
- if (s.column.type === "axis") return s;
10013
+ return sorting?.flatMap((s) => {
10014
+ if (s.column.type === "axis") return [s];
9866
10015
  const id = s.column.id;
9867
- const column = columns.find((c) => (c.originalId ?? c.column.id) === id) ?? throwError(`Column ID "${id}" in sorting does not match any discovered column`);
9868
- return {
10016
+ const column = columns.find((c) => (getField(c, "originalId") ?? c.column.id) === id);
10017
+ if (column === void 0) return [];
10018
+ return [{
9869
10019
  ...s,
9870
10020
  column: {
9871
10021
  type: "column",
9872
10022
  id: column.column.id
9873
10023
  }
9874
- };
10024
+ }];
9875
10025
  });
9876
10026
  }
9877
10027
  /** Remap column references in a filter tree. */
@@ -9883,7 +10033,7 @@
9883
10033
  const originalId = parsed.id;
9884
10034
  return canonicalizeJson({
9885
10035
  type: "column",
9886
- id: (columns.find((c) => (c.originalId ?? c.column.id) === originalId) ?? throwError(`Column ID "${parsed.id}" in filters does not match any discovered column`)).column.id
10036
+ id: (columns.find((c) => (getField(c, "originalId") ?? c.column.id) === originalId) ?? throwError(`Column ID "${parsed.id}" in filters does not match any discovered column`)).column.id
9887
10037
  });
9888
10038
  };
9889
10039
  return traverseFilterSpec(filters, {
@@ -9962,12 +10112,12 @@
9962
10112
  //#endregion
9963
10113
  //#region src/dataModel.ts
9964
10114
  const DEFAULT_SCATTER_STATE = {
9965
- title: "",
10115
+ title: "Property Relationships",
9966
10116
  template: "dots",
9967
10117
  currentTab: null
9968
10118
  };
9969
10119
  const DEFAULT_HISTOGRAM_STATE = {
9970
- title: "",
10120
+ title: "Property Distribution",
9971
10121
  template: "bins",
9972
10122
  currentTab: null,
9973
10123
  layersSettings: { bins: { fillColor: "#99e099" } }
@@ -10004,7 +10154,7 @@
10004
10154
  const platforma$1 = BlockModelV3.create(blockDataModel).args((data) => {
10005
10155
  if (data.inputAnchor === void 0) throw new Error("Select an input dataset");
10006
10156
  return { inputAnchor: data.inputAnchor };
10007
- }).output("inputOptions", (ctx) => ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true })).output("inputSpec", (ctx) => ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : void 0).output("info", (ctx) => ctx.outputs?.resolve("info")?.getDataAsJson()).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).output("processingLog", (ctx) => ctx.outputs?.resolve("processingLog")?.getLogHandle()).outputWithStatus("propertiesTable", (ctx) => {
10157
+ }).output("inputOptions", (ctx) => ctx.resultPool.getOptions(inputAnchorSpecs)).output("inputSpec", (ctx) => ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : void 0).output("info", (ctx) => ctx.outputs?.resolve("info")?.getDataAsJson()).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).output("processingLog", (ctx) => ctx.outputs?.resolve("processingLog")?.getLogHandle()).outputWithStatus("propertiesTable", (ctx) => {
10008
10158
  if (ctx.data.inputAnchor === void 0) return void 0;
10009
10159
  const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
10010
10160
  if (ownCols === void 0) return void 0;
@@ -10069,12 +10219,12 @@
10069
10219
  {
10070
10220
  type: "link",
10071
10221
  href: "/scatter",
10072
- label: "Scatterplot"
10222
+ label: "Property Relationships"
10073
10223
  },
10074
10224
  {
10075
10225
  type: "link",
10076
10226
  href: "/histogram",
10077
- label: "Histogram"
10227
+ label: "Property Distribution"
10078
10228
  }
10079
10229
  ]).done();
10080
10230
  //#endregion