@platforma-open/milaboratories.sequence-properties.model 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +14 -14
- package/.turbo/turbo-check.log +5 -3
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +521 -176
- package/dist/bundle.js.map +1 -1
- package/dist/dataModel.cjs +2 -2
- package/dist/dataModel.cjs.map +1 -1
- package/dist/dataModel.js +2 -2
- package/dist/dataModel.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +6 -6
- package/src/dataModel.ts +2 -2
- package/src/index.ts +11 -9
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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: {
|
|
@@ -4965,6 +4973,9 @@
|
|
|
4965
4973
|
Sequence: "pl7.app/vdj/sequence"
|
|
4966
4974
|
}
|
|
4967
4975
|
};
|
|
4976
|
+
function isLabelColumn(column) {
|
|
4977
|
+
return column.axesSpec.length === 1 && column.name === PColumnName.Label;
|
|
4978
|
+
}
|
|
4968
4979
|
/** Get column id and spec from a column */
|
|
4969
4980
|
function getColumnIdAndSpec(column) {
|
|
4970
4981
|
return {
|
|
@@ -5003,7 +5014,7 @@
|
|
|
5003
5014
|
return query.name === target.name && matchDomain$1(query.domain, target.domain) && matchDomain$1(query.contextDomain, target.contextDomain);
|
|
5004
5015
|
}
|
|
5005
5016
|
//#endregion
|
|
5006
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5017
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
|
|
5007
5018
|
const booleanTypesSet = new Set([
|
|
5008
5019
|
"numericComparison",
|
|
5009
5020
|
"stringEquals",
|
|
@@ -5094,17 +5105,8 @@
|
|
|
5094
5105
|
function mapSpecQueryColumns(query, cb) {
|
|
5095
5106
|
return traverseQuerySpec(query, { column: cb });
|
|
5096
5107
|
}
|
|
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
5108
|
//#endregion
|
|
5107
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5109
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
|
|
5108
5110
|
function mapPTableDef(def, cb) {
|
|
5109
5111
|
return {
|
|
5110
5112
|
...def,
|
|
@@ -5147,7 +5149,7 @@
|
|
|
5147
5149
|
}
|
|
5148
5150
|
}
|
|
5149
5151
|
//#endregion
|
|
5150
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5152
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
|
|
5151
5153
|
/**
|
|
5152
5154
|
* Canonically serializes a {@link UniversalPColumnId} to a string.
|
|
5153
5155
|
* @param id - The column identifier to serialize
|
|
@@ -5157,7 +5159,7 @@
|
|
|
5157
5159
|
return (0, import_canonicalize.default)(id);
|
|
5158
5160
|
}
|
|
5159
5161
|
//#endregion
|
|
5160
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5162
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
|
|
5161
5163
|
function axisKey(axis) {
|
|
5162
5164
|
return (0, import_canonicalize.default)(getAxisId(axis));
|
|
5163
5165
|
}
|
|
@@ -5402,7 +5404,7 @@
|
|
|
5402
5404
|
return typeof value === "object" && "anchor" in value;
|
|
5403
5405
|
}
|
|
5404
5406
|
//#endregion
|
|
5405
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5407
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
|
|
5406
5408
|
function isPColumnSpec(spec) {
|
|
5407
5409
|
return spec.kind === "PColumn";
|
|
5408
5410
|
}
|
|
@@ -5448,7 +5450,7 @@
|
|
|
5448
5450
|
return [...columns.values()];
|
|
5449
5451
|
}
|
|
5450
5452
|
//#endregion
|
|
5451
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5453
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
|
|
5452
5454
|
/**
|
|
5453
5455
|
* Determines if an axis ID matches an axis selector.
|
|
5454
5456
|
*
|
|
@@ -5529,7 +5531,7 @@
|
|
|
5529
5531
|
else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
|
|
5530
5532
|
}
|
|
5531
5533
|
//#endregion
|
|
5532
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
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
|
|
5533
5535
|
function deriveNativeId(spec) {
|
|
5534
5536
|
const result = {
|
|
5535
5537
|
kind: spec.kind,
|
|
@@ -5541,7 +5543,7 @@
|
|
|
5541
5543
|
return (0, import_canonicalize.default)(result);
|
|
5542
5544
|
}
|
|
5543
5545
|
//#endregion
|
|
5544
|
-
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.
|
|
5546
|
+
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/utils.js
|
|
5545
5547
|
function isNil$1(v) {
|
|
5546
5548
|
return v === null || v === void 0;
|
|
5547
5549
|
}
|
|
@@ -5573,32 +5575,51 @@
|
|
|
5573
5575
|
const prototype = Object.getPrototypeOf(value);
|
|
5574
5576
|
return prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null;
|
|
5575
5577
|
}
|
|
5578
|
+
/**
|
|
5579
|
+
* Reads a property from a union-typed object where the key may exist only on some members of the union.
|
|
5580
|
+
*
|
|
5581
|
+
* `K` is constrained to keys of the union's intersection, so any key present on at least one union
|
|
5582
|
+
* member is accepted. The return type resolves to `T[K]` when `K` is a key of `T`, otherwise `undefined`
|
|
5583
|
+
* — matching the runtime behavior of reading a missing property.
|
|
5584
|
+
*
|
|
5585
|
+
* @param obj - source object (may be a union of shapes)
|
|
5586
|
+
* @param prop - property name, must be a key of at least one union member
|
|
5587
|
+
* @returns the property value if present, otherwise `undefined`
|
|
5588
|
+
*/
|
|
5589
|
+
function getField(obj, prop) {
|
|
5590
|
+
return obj[prop];
|
|
5591
|
+
}
|
|
5576
5592
|
//#endregion
|
|
5577
|
-
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.
|
|
5593
|
+
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/error.js
|
|
5578
5594
|
function throwError(v) {
|
|
5579
5595
|
if (typeof v === "string") throw new Error(v);
|
|
5580
5596
|
else throw v;
|
|
5581
5597
|
}
|
|
5582
5598
|
//#endregion
|
|
5583
|
-
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.
|
|
5599
|
+
//#region ../node_modules/.pnpm/@milaboratories+helpers@1.14.2/node_modules/@milaboratories/helpers/dist/uniqId.js
|
|
5584
5600
|
function createGetIncrementalId() {
|
|
5585
5601
|
let idx = 0n;
|
|
5586
5602
|
return () => idx++;
|
|
5587
5603
|
}
|
|
5588
5604
|
createGetIncrementalId();
|
|
5589
5605
|
//#endregion
|
|
5590
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5591
|
-
function
|
|
5592
|
-
return
|
|
5606
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/discovered_column.js
|
|
5607
|
+
function distillDiscoveredPColumn(props) {
|
|
5608
|
+
return {
|
|
5609
|
+
column: props.column,
|
|
5610
|
+
path: Array.isArray(props.path) && props.path.length > 0 ? props.path : void 0,
|
|
5611
|
+
columnQualifications: Array.isArray(props.columnQualifications) && props.columnQualifications.length > 0 ? props.columnQualifications : void 0,
|
|
5612
|
+
queriesQualifications: props.queriesQualifications && Object.keys(props.queriesQualifications).length > 0 ? props.queriesQualifications : void 0
|
|
5613
|
+
};
|
|
5593
5614
|
}
|
|
5594
5615
|
function createDiscoveredPColumnId(props) {
|
|
5595
|
-
return stringifyDiscoveredPColumnId(
|
|
5616
|
+
return stringifyDiscoveredPColumnId(props);
|
|
5596
5617
|
}
|
|
5597
5618
|
function stringifyDiscoveredPColumnId(id) {
|
|
5598
|
-
return canonicalizeJson(id);
|
|
5619
|
+
return canonicalizeJson(distillDiscoveredPColumn(id));
|
|
5599
5620
|
}
|
|
5600
5621
|
//#endregion
|
|
5601
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5622
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
|
|
5602
5623
|
var LinkerMap = class LinkerMap {
|
|
5603
5624
|
/** Graph of linkers connected by axes (single or grouped by parents) */
|
|
5604
5625
|
data;
|
|
@@ -5776,9 +5797,17 @@
|
|
|
5776
5797
|
}
|
|
5777
5798
|
};
|
|
5778
5799
|
//#endregion
|
|
5779
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5800
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/driver.js
|
|
5780
5801
|
function assert() {}
|
|
5781
5802
|
assert();
|
|
5803
|
+
//#endregion
|
|
5804
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.js
|
|
5805
|
+
/**
|
|
5806
|
+
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
5807
|
+
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
5808
|
+
* older desktop apps.
|
|
5809
|
+
*/
|
|
5810
|
+
const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
5782
5811
|
stringType().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
5783
5812
|
objectType({
|
|
5784
5813
|
__isRef: literalType(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
@@ -5815,7 +5844,7 @@
|
|
|
5815
5844
|
}
|
|
5816
5845
|
}
|
|
5817
5846
|
//#endregion
|
|
5818
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5847
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
|
|
5819
5848
|
function mapValueInVOE(voe, cb) {
|
|
5820
5849
|
return voe.ok ? {
|
|
5821
5850
|
ok: true,
|
|
@@ -5823,7 +5852,7 @@
|
|
|
5823
5852
|
} : voe;
|
|
5824
5853
|
}
|
|
5825
5854
|
//#endregion
|
|
5826
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5855
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/resource_types.js
|
|
5827
5856
|
/** Well-known resource type names used across the platform. */
|
|
5828
5857
|
const ResourceTypeName = {
|
|
5829
5858
|
StreamManager: "StreamManager",
|
|
@@ -5858,12 +5887,13 @@
|
|
|
5858
5887
|
Null: "Null",
|
|
5859
5888
|
Binary: "binary",
|
|
5860
5889
|
LSProvider: "LSProvider",
|
|
5890
|
+
WorkingDirectory: "WorkingDirectory",
|
|
5861
5891
|
UserProject: "UserProject",
|
|
5862
5892
|
Projects: "Projects",
|
|
5863
5893
|
ClientRoot: "ClientRoot"
|
|
5864
5894
|
};
|
|
5865
5895
|
//#endregion
|
|
5866
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5896
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
|
|
5867
5897
|
const SERVICE_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
|
|
5868
5898
|
const { service, isNodeService, isWasmService, isMainService, getServiceKind, getServiceModelMethods, getServiceUiMethods } = (() => {
|
|
5869
5899
|
const typeMap = /* @__PURE__ */ new Map();
|
|
@@ -5902,7 +5932,7 @@
|
|
|
5902
5932
|
};
|
|
5903
5933
|
})();
|
|
5904
5934
|
//#endregion
|
|
5905
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5935
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
|
|
5906
5936
|
const Services = {
|
|
5907
5937
|
PFrameSpec: service()({
|
|
5908
5938
|
type: "wasm",
|
|
@@ -5971,7 +6001,7 @@
|
|
|
5971
6001
|
}
|
|
5972
6002
|
Object.fromEntries(Object.keys(Services).map((key) => [`requires${key}`, true]));
|
|
5973
6003
|
//#endregion
|
|
5974
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6004
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.41.2/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
|
|
5975
6005
|
function buildMethodMap(pick) {
|
|
5976
6006
|
const result = {};
|
|
5977
6007
|
for (const id of Object.values(Services)) result[id] = [...pick(id)];
|
|
@@ -5980,7 +6010,7 @@
|
|
|
5980
6010
|
buildMethodMap(getServiceUiMethods);
|
|
5981
6011
|
buildMethodMap(getServiceModelMethods);
|
|
5982
6012
|
//#endregion
|
|
5983
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6013
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/accessor.js
|
|
5984
6014
|
function ifDef(value, cb) {
|
|
5985
6015
|
return value === void 0 ? void 0 : cb(value);
|
|
5986
6016
|
}
|
|
@@ -6191,11 +6221,11 @@
|
|
|
6191
6221
|
}
|
|
6192
6222
|
};
|
|
6193
6223
|
//#endregion
|
|
6194
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6224
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/internal.js
|
|
6195
6225
|
const StagingAccessorName = "staging";
|
|
6196
6226
|
const MainAccessorName = "main";
|
|
6197
6227
|
//#endregion
|
|
6198
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6228
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
|
|
6199
6229
|
function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
6200
6230
|
const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
|
|
6201
6231
|
const { type } = dataInfoEntries;
|
|
@@ -6294,7 +6324,7 @@
|
|
|
6294
6324
|
return x == null;
|
|
6295
6325
|
}
|
|
6296
6326
|
//#endregion
|
|
6297
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6327
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
|
|
6298
6328
|
const DISTANCE_PENALTY = .001;
|
|
6299
6329
|
const LABEL_TYPE = "__LABEL__";
|
|
6300
6330
|
const LABEL_TYPE_FULL = "__LABEL__@1";
|
|
@@ -6428,7 +6458,7 @@
|
|
|
6428
6458
|
});
|
|
6429
6459
|
}
|
|
6430
6460
|
}
|
|
6431
|
-
if (qualifications !== void 0) {
|
|
6461
|
+
if (qualifications !== void 0 && qualifications.forQueries !== void 0) {
|
|
6432
6462
|
for (const [anchorId, qs] of Object.entries(qualifications.forQueries)) {
|
|
6433
6463
|
if (qs.length === 0) continue;
|
|
6434
6464
|
const anchorText = isFunction(formatters?.anchorQualification) ? formatters.anchorQualification(anchorId, qs, spec, index) : `[${anchorId}: ${formatQualifications(qs)}]`;
|
|
@@ -6439,7 +6469,7 @@
|
|
|
6439
6469
|
importance: -11
|
|
6440
6470
|
});
|
|
6441
6471
|
}
|
|
6442
|
-
if (qualifications.forHit.length > 0) {
|
|
6472
|
+
if (qualifications.forHit !== void 0 && qualifications.forHit.length > 0) {
|
|
6443
6473
|
const hitText = isFunction(formatters?.hitQualification) ? formatters.hitQualification(qualifications.forHit, spec, index) : `[${formatQualifications(qualifications.forHit)}]`;
|
|
6444
6474
|
if (!isNil(hitText)) trace.push({
|
|
6445
6475
|
type: HIT_QUAL_TYPE,
|
|
@@ -6525,7 +6555,7 @@
|
|
|
6525
6555
|
return result;
|
|
6526
6556
|
}
|
|
6527
6557
|
//#endregion
|
|
6528
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6558
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/label.js
|
|
6529
6559
|
/** @deprecated Use deriveDistinctLabels */
|
|
6530
6560
|
function deriveLabels(values, getSpec, options = {}) {
|
|
6531
6561
|
return deriveDistinctLabels(values.map(getSpec), options).map((label, i) => ({
|
|
@@ -6534,7 +6564,7 @@
|
|
|
6534
6564
|
}));
|
|
6535
6565
|
}
|
|
6536
6566
|
//#endregion
|
|
6537
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6567
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
|
|
6538
6568
|
const PCD_PREFIX = "PColumnData/";
|
|
6539
6569
|
const RT_RESOURCE_MAP = PCD_PREFIX + "ResourceMap";
|
|
6540
6570
|
const RT_RESOURCE_MAP_PARTITIONED = PCD_PREFIX + "Partitioned/ResourceMap";
|
|
@@ -6834,7 +6864,7 @@
|
|
|
6834
6864
|
return columns.every(isPColumnReady);
|
|
6835
6865
|
}
|
|
6836
6866
|
//#endregion
|
|
6837
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6867
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
|
|
6838
6868
|
function isPColumnValues(value) {
|
|
6839
6869
|
if (!Array.isArray(value)) return false;
|
|
6840
6870
|
if (value.length === 0) return true;
|
|
@@ -7109,7 +7139,7 @@
|
|
|
7109
7139
|
}
|
|
7110
7140
|
};
|
|
7111
7141
|
//#endregion
|
|
7112
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7142
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/block_services.js
|
|
7113
7143
|
/**
|
|
7114
7144
|
* Services required by all V3 blocks by default.
|
|
7115
7145
|
* Edit this when a new service should be available to all blocks.
|
|
@@ -7124,7 +7154,7 @@
|
|
|
7124
7154
|
};
|
|
7125
7155
|
resolveRequiredServices(BLOCK_SERVICE_FLAGS);
|
|
7126
7156
|
//#endregion
|
|
7127
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7157
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
|
|
7128
7158
|
/**
|
|
7129
7159
|
* Builds a ServiceProxy from a ServiceDispatch.
|
|
7130
7160
|
* Each service method call is forwarded to dispatch.callServiceMethod.
|
|
@@ -7133,7 +7163,7 @@
|
|
|
7133
7163
|
return ((serviceId) => Object.freeze(Object.fromEntries(dispatch.getServiceMethods(serviceId).map((method) => [method, (...args) => dispatch.callServiceMethod(serviceId, method, ...args)]))));
|
|
7134
7164
|
}
|
|
7135
7165
|
//#endregion
|
|
7136
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7166
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/services/get_services.js
|
|
7137
7167
|
const cachedServices = /* @__PURE__ */ new WeakMap();
|
|
7138
7168
|
function getService(name) {
|
|
7139
7169
|
const ctx = getCfgRenderCtx();
|
|
@@ -7147,7 +7177,7 @@
|
|
|
7147
7177
|
})();
|
|
7148
7178
|
}
|
|
7149
7179
|
//#endregion
|
|
7150
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7180
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
|
|
7151
7181
|
function patchInSetFilters(filters) {
|
|
7152
7182
|
const inSetToOrEqual = (predicate) => {
|
|
7153
7183
|
if (predicate.operator !== "InSet") return predicate;
|
|
@@ -7185,7 +7215,7 @@
|
|
|
7185
7215
|
return filters.map((filter) => mapFilter(filter, inSetToOrEqual));
|
|
7186
7216
|
}
|
|
7187
7217
|
//#endregion
|
|
7188
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7218
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/render/api.js
|
|
7189
7219
|
/**
|
|
7190
7220
|
* Helper function to match domain objects
|
|
7191
7221
|
* @param query Optional domain to match against
|
|
@@ -7207,7 +7237,7 @@
|
|
|
7207
7237
|
return mapPObjectData(data, (d) => {
|
|
7208
7238
|
if (d instanceof TreeNodeAccessor) return d.handle;
|
|
7209
7239
|
else if (isDataInfo(d)) return mapDataInfo(d, (accessor) => accessor.handle);
|
|
7210
|
-
else return d;
|
|
7240
|
+
else return d ?? [];
|
|
7211
7241
|
});
|
|
7212
7242
|
}
|
|
7213
7243
|
var ResultPool = class {
|
|
@@ -7547,8 +7577,6 @@
|
|
|
7547
7577
|
return def;
|
|
7548
7578
|
}
|
|
7549
7579
|
createPFrame(def) {
|
|
7550
|
-
if (!allPColumnsReady(def)) return void 0;
|
|
7551
|
-
this.verifyInlineAndExplicitColumnsSupport(def);
|
|
7552
7580
|
return this.ctx.createPFrame(def.map((c) => transformPColumnData(c)));
|
|
7553
7581
|
}
|
|
7554
7582
|
createPTable(def) {
|
|
@@ -7572,17 +7600,7 @@
|
|
|
7572
7600
|
return this.ctx.createPTable(mapPTableDef(rawDef, (po) => transformPColumnData(po)));
|
|
7573
7601
|
}
|
|
7574
7602
|
createPTableV2(def) {
|
|
7575
|
-
|
|
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
|
-
}));
|
|
7603
|
+
return this.ctx.createPTableV2(mapPTableDefV2(def, (po) => transformPColumnData(po)));
|
|
7586
7604
|
}
|
|
7587
7605
|
/** @deprecated scheduled for removal from SDK */
|
|
7588
7606
|
getBlockLabel(blockId) {
|
|
@@ -7648,26 +7666,26 @@
|
|
|
7648
7666
|
}
|
|
7649
7667
|
};
|
|
7650
7668
|
//#endregion
|
|
7651
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7652
|
-
const PlatformaSDKVersion = "1.
|
|
7669
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/version.js
|
|
7670
|
+
const PlatformaSDKVersion = "1.75.5";
|
|
7653
7671
|
//#endregion
|
|
7654
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7672
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/types.js
|
|
7655
7673
|
function isConfigLambda(cfgOrFh) {
|
|
7656
7674
|
return cfgOrFh.__renderLambda === true;
|
|
7657
7675
|
}
|
|
7658
7676
|
//#endregion
|
|
7659
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7677
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
|
|
7660
7678
|
function downgradeCfgOrLambda(data) {
|
|
7661
7679
|
if (data === void 0) return void 0;
|
|
7662
7680
|
if (isConfigLambda(data)) return data.handle;
|
|
7663
7681
|
return data;
|
|
7664
7682
|
}
|
|
7665
7683
|
//#endregion
|
|
7666
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7684
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/plugin_model.js
|
|
7667
7685
|
/** Symbol for internal plugin model creation — not accessible to external consumers */
|
|
7668
7686
|
const CREATE_PLUGIN_MODEL = Symbol("createPluginModel");
|
|
7669
7687
|
//#endregion
|
|
7670
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7688
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
|
|
7671
7689
|
/**
|
|
7672
7690
|
* BlockStorage Callback Implementations - wired to facade callbacks in BlockModelV3.done().
|
|
7673
7691
|
*
|
|
@@ -7844,7 +7862,7 @@
|
|
|
7844
7862
|
}
|
|
7845
7863
|
}
|
|
7846
7864
|
//#endregion
|
|
7847
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7865
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/block_model.js
|
|
7848
7866
|
/**
|
|
7849
7867
|
* Merges two feature flag objects with type-aware logic:
|
|
7850
7868
|
* - `supports*` (boolean): OR — `true` if either side is `true`
|
|
@@ -7874,6 +7892,7 @@
|
|
|
7874
7892
|
requiresUIAPIVersion: 3,
|
|
7875
7893
|
requiresModelAPIVersion: 2,
|
|
7876
7894
|
requiresCreatePTable: 2,
|
|
7895
|
+
requiresPFramesVersion: REQUIRES_PFRAMES_VERSION,
|
|
7877
7896
|
...BLOCK_SERVICE_FLAGS
|
|
7878
7897
|
};
|
|
7879
7898
|
/** @deprecated Use FEATURE_FLAGS */
|
|
@@ -8154,7 +8173,199 @@
|
|
|
8154
8173
|
}
|
|
8155
8174
|
};
|
|
8156
8175
|
//#endregion
|
|
8157
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8176
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/pframe_utils/axes.js
|
|
8177
|
+
/** Create id for column copy with added keys in axes domains */
|
|
8178
|
+
const colId = (id, domains, contextDomains) => {
|
|
8179
|
+
let wid = id.toString();
|
|
8180
|
+
domains?.forEach((domain) => {
|
|
8181
|
+
if (domain) for (const [k, v] of Object.entries(domain)) {
|
|
8182
|
+
wid += k;
|
|
8183
|
+
wid += v;
|
|
8184
|
+
}
|
|
8185
|
+
});
|
|
8186
|
+
contextDomains?.forEach((contextDomain) => {
|
|
8187
|
+
if (contextDomain) for (const [k, v] of Object.entries(contextDomain)) {
|
|
8188
|
+
wid += k;
|
|
8189
|
+
wid += v;
|
|
8190
|
+
}
|
|
8191
|
+
});
|
|
8192
|
+
return wid;
|
|
8193
|
+
};
|
|
8194
|
+
/** All combinations with 1 key from each list */
|
|
8195
|
+
function getKeysCombinations(idsLists) {
|
|
8196
|
+
if (!idsLists.length) return [];
|
|
8197
|
+
let result = [[]];
|
|
8198
|
+
idsLists.forEach((list) => {
|
|
8199
|
+
const nextResult = [];
|
|
8200
|
+
list.forEach((key) => {
|
|
8201
|
+
nextResult.push(...result.map((resultItem) => [...resultItem, key]));
|
|
8202
|
+
});
|
|
8203
|
+
result = nextResult;
|
|
8204
|
+
});
|
|
8205
|
+
return result;
|
|
8206
|
+
}
|
|
8207
|
+
function getAvailableWithLinkersAxes(linkerColumns, blockAxes) {
|
|
8208
|
+
const availableAxes = LinkerMap.fromColumns(linkerColumns.map(getColumnIdAndSpec)).getReachableByLinkersAxesFromAxesNormalized([...blockAxes.values()], (linkerKeyId, sourceAxisId) => matchAxisId(sourceAxisId, linkerKeyId));
|
|
8209
|
+
return new Map(availableAxes.map((axisSpec) => {
|
|
8210
|
+
return [canonicalizeJson(getAxisId(axisSpec)), axisSpec];
|
|
8211
|
+
}));
|
|
8212
|
+
}
|
|
8213
|
+
/** Add columns with fully compatible axes created from partial compatible ones */
|
|
8214
|
+
function enrichCompatible(blockAxes, columns) {
|
|
8215
|
+
return columns.flatMap((column) => getAdditionalColumnsForColumn(blockAxes, column));
|
|
8216
|
+
}
|
|
8217
|
+
function getAdditionalColumnsForColumn(blockAxes, column) {
|
|
8218
|
+
const columnAxesIds = column.spec.axesSpec.map(getAxisId);
|
|
8219
|
+
if (columnAxesIds.every((id) => blockAxes.has(canonicalizeJson(id)))) return [column];
|
|
8220
|
+
const secondaryIdsVariants = getKeysCombinations(columnAxesIds.map((id) => {
|
|
8221
|
+
const result = [];
|
|
8222
|
+
for (const [_, mainId] of blockAxes) if (matchAxisId(mainId, id) && !matchAxisId(id, mainId)) result.push(mainId);
|
|
8223
|
+
return result;
|
|
8224
|
+
}));
|
|
8225
|
+
const allAddedDomainValues = /* @__PURE__ */ new Set();
|
|
8226
|
+
const addedNotToAllVariantsDomainValues = /* @__PURE__ */ new Set();
|
|
8227
|
+
const addedByVariantsDomainValues = secondaryIdsVariants.map((idsList) => {
|
|
8228
|
+
const addedSet = /* @__PURE__ */ new Set();
|
|
8229
|
+
idsList.map((axisId, idx) => {
|
|
8230
|
+
const d1 = column.spec.axesSpec[idx].domain;
|
|
8231
|
+
const d2 = axisId.domain;
|
|
8232
|
+
Object.entries(d2 ?? {}).forEach(([key, value]) => {
|
|
8233
|
+
if (d1?.[key] === void 0) {
|
|
8234
|
+
const item = JSON.stringify([key, value]);
|
|
8235
|
+
addedSet.add(item);
|
|
8236
|
+
allAddedDomainValues.add(item);
|
|
8237
|
+
}
|
|
8238
|
+
});
|
|
8239
|
+
const cd1 = column.spec.axesSpec[idx].contextDomain;
|
|
8240
|
+
const cd2 = axisId.contextDomain;
|
|
8241
|
+
Object.entries(cd2 ?? {}).forEach(([key, value]) => {
|
|
8242
|
+
if (cd1?.[key] === void 0) {
|
|
8243
|
+
const item = JSON.stringify(["ctx:" + key, value]);
|
|
8244
|
+
addedSet.add(item);
|
|
8245
|
+
allAddedDomainValues.add(item);
|
|
8246
|
+
}
|
|
8247
|
+
});
|
|
8248
|
+
return {
|
|
8249
|
+
...axisId,
|
|
8250
|
+
annotations: column.spec.axesSpec[idx].annotations
|
|
8251
|
+
};
|
|
8252
|
+
});
|
|
8253
|
+
return addedSet;
|
|
8254
|
+
});
|
|
8255
|
+
[...allAddedDomainValues].forEach((addedPart) => {
|
|
8256
|
+
if (addedByVariantsDomainValues.some((s) => !s.has(addedPart))) addedNotToAllVariantsDomainValues.add(addedPart);
|
|
8257
|
+
});
|
|
8258
|
+
return [column, ...secondaryIdsVariants.map((idsList, idx) => {
|
|
8259
|
+
const id = colId(column.id, idsList.map((id) => id.domain), idsList.map((id) => id.contextDomain));
|
|
8260
|
+
const label = readAnnotation(column.spec, Annotation.Label) ?? "";
|
|
8261
|
+
const labelDomainPart = [...addedByVariantsDomainValues[idx]].filter((str) => addedNotToAllVariantsDomainValues.has(str)).sort().map((v) => JSON.parse(v)?.[1]).join(" / ");
|
|
8262
|
+
const annotations = {
|
|
8263
|
+
...column.spec.annotations,
|
|
8264
|
+
[Annotation.Graph.IsVirtual]: stringifyJson(true)
|
|
8265
|
+
};
|
|
8266
|
+
if (label || labelDomainPart) annotations[Annotation.Label] = label && labelDomainPart ? label + " / " + labelDomainPart : label + labelDomainPart;
|
|
8267
|
+
return {
|
|
8268
|
+
...column,
|
|
8269
|
+
id,
|
|
8270
|
+
spec: {
|
|
8271
|
+
...column.spec,
|
|
8272
|
+
axesSpec: idsList.map((axisId, idx) => ({
|
|
8273
|
+
...axisId,
|
|
8274
|
+
annotations: column.spec.axesSpec[idx].annotations
|
|
8275
|
+
})),
|
|
8276
|
+
annotations
|
|
8277
|
+
}
|
|
8278
|
+
};
|
|
8279
|
+
})];
|
|
8280
|
+
}
|
|
8281
|
+
//#endregion
|
|
8282
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js
|
|
8283
|
+
function getAllRelatedColumns(ctx, predicate) {
|
|
8284
|
+
const columns = new PColumnCollection();
|
|
8285
|
+
columns.addColumnProvider(ctx.resultPool);
|
|
8286
|
+
const allColumns = columns.getColumns(predicate, {
|
|
8287
|
+
dontWaitAllData: true,
|
|
8288
|
+
overrideLabelAnnotation: false
|
|
8289
|
+
}) ?? [];
|
|
8290
|
+
return enrichCompatible(new Map(allColumns.flatMap((column) => getNormalizedAxesList(column.spec.axesSpec)).map((axisSpec) => {
|
|
8291
|
+
return [canonicalizeJson(getAxisId(axisSpec)), axisSpec];
|
|
8292
|
+
})), allColumns);
|
|
8293
|
+
}
|
|
8294
|
+
function getRelatedColumns(ctx, { columns: rootColumns, predicate }) {
|
|
8295
|
+
const columns = new PColumnCollection();
|
|
8296
|
+
columns.addColumnProvider(ctx.resultPool);
|
|
8297
|
+
columns.addColumns(rootColumns);
|
|
8298
|
+
const blockAxes = /* @__PURE__ */ new Map();
|
|
8299
|
+
const allAxes = /* @__PURE__ */ new Map();
|
|
8300
|
+
for (const c of rootColumns) for (const spec of getNormalizedAxesList(c.spec.axesSpec)) {
|
|
8301
|
+
const aid = getAxisId(spec);
|
|
8302
|
+
blockAxes.set(canonicalizeJson(aid), spec);
|
|
8303
|
+
allAxes.set(canonicalizeJson(aid), spec);
|
|
8304
|
+
}
|
|
8305
|
+
const availableWithLinkersAxes = getAvailableWithLinkersAxes(columns.getColumns((spec) => predicate(spec) && isLinkerColumn(spec), { dontWaitAllData: true }) ?? [], blockAxes);
|
|
8306
|
+
for (const item of availableWithLinkersAxes) {
|
|
8307
|
+
blockAxes.set(...item);
|
|
8308
|
+
allAxes.set(...item);
|
|
8309
|
+
}
|
|
8310
|
+
const blockAxesArr = Array.from(blockAxes.values());
|
|
8311
|
+
let compatibleWithoutLabels = (columns.getColumns((spec) => predicate(spec) && spec.axesSpec.some((axisSpec) => {
|
|
8312
|
+
const axisId = getAxisId(axisSpec);
|
|
8313
|
+
return blockAxesArr.some((selectorAxisSpec) => matchAxisId(getAxisId(selectorAxisSpec), axisId));
|
|
8314
|
+
}), {
|
|
8315
|
+
dontWaitAllData: true,
|
|
8316
|
+
overrideLabelAnnotation: false
|
|
8317
|
+
}) ?? []).filter((column) => !isLabelColumn(column.spec));
|
|
8318
|
+
for (const c of compatibleWithoutLabels) for (const spec of getNormalizedAxesList(c.spec.axesSpec)) {
|
|
8319
|
+
const aid = getAxisId(spec);
|
|
8320
|
+
allAxes.set(canonicalizeJson(aid), spec);
|
|
8321
|
+
}
|
|
8322
|
+
const allAxesArr = Array.from(allAxes.values());
|
|
8323
|
+
compatibleWithoutLabels = (columns.getColumns((spec) => predicate(spec) && spec.axesSpec.every((axisSpec) => {
|
|
8324
|
+
const axisId = getAxisId(axisSpec);
|
|
8325
|
+
return allAxesArr.some((selectorAxisSpec) => matchAxisId(getAxisId(selectorAxisSpec), axisId));
|
|
8326
|
+
}), {
|
|
8327
|
+
dontWaitAllData: true,
|
|
8328
|
+
overrideLabelAnnotation: false
|
|
8329
|
+
}) ?? []).filter((column) => !isLabelColumn(column.spec));
|
|
8330
|
+
const compatibleLabels = (columns.getColumns((spec) => predicate(spec) && spec.axesSpec.some((axisSpec) => {
|
|
8331
|
+
const axisId = getAxisId(axisSpec);
|
|
8332
|
+
return allAxesArr.some((selectorAxisSpec) => matchAxisId(getAxisId(selectorAxisSpec), axisId));
|
|
8333
|
+
}), {
|
|
8334
|
+
dontWaitAllData: true,
|
|
8335
|
+
overrideLabelAnnotation: false
|
|
8336
|
+
}) ?? []).filter((column) => isLabelColumn(column.spec));
|
|
8337
|
+
return enrichCompatible(blockAxes, [...compatibleWithoutLabels, ...compatibleLabels]);
|
|
8338
|
+
}
|
|
8339
|
+
//#endregion
|
|
8340
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
|
|
8341
|
+
function isHiddenFromGraphColumn(column) {
|
|
8342
|
+
return !!readAnnotationJson(column, Annotation.HideDataFromGraphs);
|
|
8343
|
+
}
|
|
8344
|
+
function isHiddenFromUIColumn(column) {
|
|
8345
|
+
return !!readAnnotationJson(column, Annotation.HideDataFromUi);
|
|
8346
|
+
}
|
|
8347
|
+
/**
|
|
8348
|
+
The aim of createPFrameForGraphs: to create pframe with block’s columns and all compatible columns from result pool
|
|
8349
|
+
(including linker columns and all label columns).
|
|
8350
|
+
Block’s columns are added to pframe as is.
|
|
8351
|
+
Other columns are added basing on set of axes of block’s columns, considering available with linker columns.
|
|
8352
|
+
Compatible columns must have at least one axis from block’s axes set. This axis of the compatible column from
|
|
8353
|
+
result pool must satisfy matchAxisId (it can have less domain keys than in block’s axis, but without conflicting values
|
|
8354
|
+
among existing ones).
|
|
8355
|
+
In requests to pframe (calculateTableData) columns must have strictly the same axes. For compatibility in case
|
|
8356
|
+
of partially matched axis we add to pframe a copy of this column with modified axis (with filled missed domains)
|
|
8357
|
+
and modified label (with added domain values in case if more than one copy with different domains exist).
|
|
8358
|
+
*/
|
|
8359
|
+
function createPFrameForGraphs(ctx, blockColumns) {
|
|
8360
|
+
const suitableSpec = (spec) => !isHiddenFromUIColumn(spec) && !isHiddenFromGraphColumn(spec);
|
|
8361
|
+
if (!blockColumns) return ctx.createPFrame(getAllRelatedColumns(ctx, suitableSpec));
|
|
8362
|
+
return ctx.createPFrame(getRelatedColumns(ctx, {
|
|
8363
|
+
columns: blockColumns,
|
|
8364
|
+
predicate: suitableSpec
|
|
8365
|
+
}));
|
|
8366
|
+
}
|
|
8367
|
+
//#endregion
|
|
8368
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_selector.js
|
|
8158
8369
|
function normalizeStringMatchers(input) {
|
|
8159
8370
|
if (typeof input === "string") return [{
|
|
8160
8371
|
type: "regex",
|
|
@@ -8198,7 +8409,7 @@
|
|
|
8198
8409
|
return (Array.isArray(input) ? input : [input]).map(convertRelaxedColumnSelectorToMultiColumnSelector);
|
|
8199
8410
|
}
|
|
8200
8411
|
//#endregion
|
|
8201
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8412
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_snapshot_provider.js
|
|
8202
8413
|
/**
|
|
8203
8414
|
* Simple provider wrapping an array of PColumns.
|
|
8204
8415
|
* Always complete, data status always 'ready'.
|
|
@@ -8209,8 +8420,8 @@
|
|
|
8209
8420
|
this.columns = columns.map((col) => ({
|
|
8210
8421
|
id: col.id,
|
|
8211
8422
|
spec: col.spec,
|
|
8212
|
-
|
|
8213
|
-
|
|
8423
|
+
data: { get: () => col.data },
|
|
8424
|
+
dataStatus: this.getStatus(col.data)
|
|
8214
8425
|
}));
|
|
8215
8426
|
}
|
|
8216
8427
|
getAllColumns() {
|
|
@@ -8219,6 +8430,27 @@
|
|
|
8219
8430
|
isColumnListComplete() {
|
|
8220
8431
|
return true;
|
|
8221
8432
|
}
|
|
8433
|
+
getStatus(d) {
|
|
8434
|
+
if (d == null) return "absent";
|
|
8435
|
+
if (typeof d === "function") return this.getStatus(d());
|
|
8436
|
+
if (d instanceof TreeNodeAccessor) {
|
|
8437
|
+
if (d.getIsReadyOrError()) return "ready";
|
|
8438
|
+
if (d.getIsFinal()) return "absent";
|
|
8439
|
+
return "computing";
|
|
8440
|
+
}
|
|
8441
|
+
if (isDataInfo(d)) {
|
|
8442
|
+
let ready = true;
|
|
8443
|
+
let final = true;
|
|
8444
|
+
visitDataInfo(d, (v) => {
|
|
8445
|
+
ready &&= v.getIsReadyOrError();
|
|
8446
|
+
final &&= v.getIsFinal();
|
|
8447
|
+
});
|
|
8448
|
+
if (ready) return "ready";
|
|
8449
|
+
if (final) return "absent";
|
|
8450
|
+
return "computing";
|
|
8451
|
+
}
|
|
8452
|
+
return "ready";
|
|
8453
|
+
}
|
|
8222
8454
|
};
|
|
8223
8455
|
/**
|
|
8224
8456
|
* Provider wrapping an array of ColumnSnapshots.
|
|
@@ -8302,7 +8534,7 @@
|
|
|
8302
8534
|
throw new Error("Unknown ColumnSource type");
|
|
8303
8535
|
}
|
|
8304
8536
|
//#endregion
|
|
8305
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8537
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/column_collection_builder.js
|
|
8306
8538
|
/**
|
|
8307
8539
|
* Mutable builder that accumulates column sources, then produces
|
|
8308
8540
|
* a ColumnCollection (plain) or AnchoredColumnCollection (with anchors).
|
|
@@ -8406,10 +8638,7 @@
|
|
|
8406
8638
|
const col = this.columnsMap.get(origId) ?? throwError(`Column with id ${origId} not found in collection`);
|
|
8407
8639
|
const path = hit.path.map((step) => {
|
|
8408
8640
|
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
|
-
};
|
|
8641
|
+
return { linker: this.columnsMap.get(step.linker.columnId) ?? throwError(`Linker column with id ${step.linker.columnId} not found in collection`) };
|
|
8413
8642
|
});
|
|
8414
8643
|
const variants = hit.mappingVariants.map((v) => ({
|
|
8415
8644
|
path,
|
|
@@ -8487,7 +8716,7 @@
|
|
|
8487
8716
|
excludeColumns: void 0,
|
|
8488
8717
|
axes: [],
|
|
8489
8718
|
maxHops: 0,
|
|
8490
|
-
constraints: matchingModeToConstraints("
|
|
8719
|
+
constraints: matchingModeToConstraints("related")
|
|
8491
8720
|
});
|
|
8492
8721
|
if (matched.hits.length === 0) throwError(`Anchor "${name}": no columns matched selector`);
|
|
8493
8722
|
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 +8730,10 @@
|
|
|
8501
8730
|
return result;
|
|
8502
8731
|
}
|
|
8503
8732
|
function remapFromIdxToId(qualifications, anchors) {
|
|
8733
|
+
const forQueries = qualifications.forQueries.reduce((acc, qs, i) => anchors[i] && qs.length > 0 ? acc.set(anchors[i].id, qs) : acc, /* @__PURE__ */ new Map());
|
|
8504
8734
|
return {
|
|
8505
|
-
forQueries:
|
|
8506
|
-
forHit: qualifications.forHit
|
|
8735
|
+
forQueries: forQueries.size > 0 ? Object.fromEntries(forQueries) : void 0,
|
|
8736
|
+
forHit: qualifications.forHit.length > 0 ? qualifications.forHit : void 0
|
|
8507
8737
|
};
|
|
8508
8738
|
}
|
|
8509
8739
|
function matchingModeToConstraints(mode) {
|
|
@@ -8529,23 +8759,20 @@
|
|
|
8529
8759
|
}
|
|
8530
8760
|
}
|
|
8531
8761
|
//#endregion
|
|
8532
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8762
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/columns/ctx_column_sources.js
|
|
8533
8763
|
/**
|
|
8534
|
-
* Collect ColumnSnapshotProviders from
|
|
8535
|
-
*
|
|
8536
|
-
*
|
|
8537
|
-
*
|
|
8538
|
-
* - **prerun** — PFrame fields from prerun/staging results
|
|
8539
|
-
*
|
|
8540
|
-
* Returns an array of providers suitable for `ColumnCollectionBuilder.addSource()`.
|
|
8764
|
+
* Collect ColumnSnapshotProviders from `outputs`, `prerun`, and
|
|
8765
|
+
* `resultPool` in that order. Dedup keeps the first occurrence per
|
|
8766
|
+
* `NativePObjectId`, so a block re-publishing its own columns keeps
|
|
8767
|
+
* the `outputs`-rooted canonical id instead of the result-pool variant.
|
|
8541
8768
|
*/
|
|
8542
8769
|
function collectCtxColumnSnapshotProviders(ctx) {
|
|
8543
8770
|
const providers = [];
|
|
8544
|
-
providers.push(new ResultPoolColumnSnapshotProvider(ctx.resultPool));
|
|
8545
8771
|
const outputs = ctx.outputs;
|
|
8546
8772
|
if (outputs) providers.push(...collectPFrameProviders(outputs));
|
|
8547
8773
|
const prerun = ctx.prerun;
|
|
8548
8774
|
if (prerun) providers.push(...collectPFrameProviders(prerun));
|
|
8775
|
+
providers.push(new ResultPoolColumnSnapshotProvider(ctx.resultPool));
|
|
8549
8776
|
return providers;
|
|
8550
8777
|
}
|
|
8551
8778
|
/**
|
|
@@ -8605,7 +8832,7 @@
|
|
|
8605
8832
|
}
|
|
8606
8833
|
}
|
|
8607
8834
|
//#endregion
|
|
8608
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8835
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/traverse.js
|
|
8609
8836
|
/**
|
|
8610
8837
|
* Recursively traverses a FilterSpec tree bottom-up, applying visitor callbacks.
|
|
8611
8838
|
*
|
|
@@ -8644,7 +8871,7 @@
|
|
|
8644
8871
|
});
|
|
8645
8872
|
}
|
|
8646
8873
|
//#endregion
|
|
8647
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8874
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
|
|
8648
8875
|
/** Parses a CanonicalizedJson<PTableColumnId> string into a SpecQueryExpression reference. */
|
|
8649
8876
|
function resolveColumnRef(columnStr) {
|
|
8650
8877
|
const parsed = JSON.parse(columnStr);
|
|
@@ -8958,7 +9185,7 @@
|
|
|
8958
9185
|
return true;
|
|
8959
9186
|
}
|
|
8960
9187
|
//#endregion
|
|
8961
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9188
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/filters/distill.js
|
|
8962
9189
|
/**
|
|
8963
9190
|
* Strips non-FilterSpec metadata (whitelist approach) and removes
|
|
8964
9191
|
* unfilled leaves (type is undefined or any required field is undefined).
|
|
@@ -9063,7 +9290,7 @@
|
|
|
9063
9290
|
greaterThanColumnOrEqual: ["column", "rhs"]
|
|
9064
9291
|
};
|
|
9065
9292
|
//#endregion
|
|
9066
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9293
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
|
|
9067
9294
|
/** Upgrade PlDataTableStateV2 to the latest version */
|
|
9068
9295
|
function upgradePlDataTableStateV2(state) {
|
|
9069
9296
|
if (!state) return createPlDataTableStateV2();
|
|
@@ -9077,11 +9304,41 @@
|
|
|
9077
9304
|
pTableParams: createDefaultPTableParams()
|
|
9078
9305
|
};
|
|
9079
9306
|
if (state.version === 3) state = createPlDataTableStateV2();
|
|
9080
|
-
if (state.version === 4) state =
|
|
9307
|
+
if (state.version === 4) state = migrateV4toV6(state);
|
|
9308
|
+
if (state.version === 5) state = migrateV5toV6(state);
|
|
9081
9309
|
return state;
|
|
9082
9310
|
}
|
|
9083
|
-
/** Migrate
|
|
9084
|
-
function
|
|
9311
|
+
/** Migrate v5 to v6: unwrap `{source, labeled}` colIds in gridState. */
|
|
9312
|
+
function migrateV5toV6(state) {
|
|
9313
|
+
return {
|
|
9314
|
+
version: 6,
|
|
9315
|
+
stateCache: state.stateCache.map((entry) => ({
|
|
9316
|
+
...entry,
|
|
9317
|
+
gridState: unwrapV5GridState(entry.gridState)
|
|
9318
|
+
})),
|
|
9319
|
+
pTableParams: createDefaultPTableParams()
|
|
9320
|
+
};
|
|
9321
|
+
}
|
|
9322
|
+
/** Convert v5 wrapped colId JSON to bare PTableColumnSpec JSON, taking `.source`.
|
|
9323
|
+
* gridState colIds may include the row-number sentinel (a JSON-stringified
|
|
9324
|
+
* literal, not a wrapped spec) — those pass through unchanged. */
|
|
9325
|
+
function unwrapV5ColId(json) {
|
|
9326
|
+
const parsed = parseJsonSafely(json);
|
|
9327
|
+
return !isNil(parsed) && typeof parsed === "object" && "source" in parsed ? canonicalizeJson(parsed.source) : json;
|
|
9328
|
+
}
|
|
9329
|
+
function unwrapV5GridState(gridState) {
|
|
9330
|
+
const unwrapAs = (json) => unwrapV5ColId(json);
|
|
9331
|
+
return {
|
|
9332
|
+
columnOrder: gridState.columnOrder ? { orderedColIds: gridState.columnOrder.orderedColIds.map(unwrapAs) } : void 0,
|
|
9333
|
+
sort: gridState.sort ? { sortModel: gridState.sort.sortModel.map((s) => ({
|
|
9334
|
+
colId: unwrapAs(s.colId),
|
|
9335
|
+
sort: s.sort
|
|
9336
|
+
})) } : void 0,
|
|
9337
|
+
columnVisibility: gridState.columnVisibility ? { hiddenColIds: gridState.columnVisibility.hiddenColIds.map(unwrapAs) } : void 0
|
|
9338
|
+
};
|
|
9339
|
+
}
|
|
9340
|
+
/** Migrate v4 state to v6: convert per-column filters to tree-based format (skips v5). */
|
|
9341
|
+
function migrateV4toV6(state) {
|
|
9085
9342
|
let idCounter = 0;
|
|
9086
9343
|
const nextId = () => ++idCounter;
|
|
9087
9344
|
const migratedCache = state.stateCache.map((entry) => {
|
|
@@ -9106,7 +9363,7 @@
|
|
|
9106
9363
|
const oldSourceId = state.pTableParams.sourceId;
|
|
9107
9364
|
const currentCache = oldSourceId ? migratedCache.find((e) => e.sourceId === oldSourceId) : void 0;
|
|
9108
9365
|
return {
|
|
9109
|
-
version:
|
|
9366
|
+
version: 6,
|
|
9110
9367
|
stateCache: migratedCache,
|
|
9111
9368
|
pTableParams: currentCache && oldSourceId ? {
|
|
9112
9369
|
sourceId: oldSourceId,
|
|
@@ -9257,13 +9514,13 @@
|
|
|
9257
9514
|
}
|
|
9258
9515
|
function createPlDataTableStateV2() {
|
|
9259
9516
|
return {
|
|
9260
|
-
version:
|
|
9517
|
+
version: 6,
|
|
9261
9518
|
stateCache: [],
|
|
9262
9519
|
pTableParams: createDefaultPTableParams()
|
|
9263
9520
|
};
|
|
9264
9521
|
}
|
|
9265
9522
|
//#endregion
|
|
9266
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9523
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_tooltips.js
|
|
9267
9524
|
/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
|
|
9268
9525
|
function deriveDistinctTooltips(entries) {
|
|
9269
9526
|
return entries.map(formatTooltip);
|
|
@@ -9282,7 +9539,6 @@
|
|
|
9282
9539
|
return sections.join("\n\n");
|
|
9283
9540
|
}
|
|
9284
9541
|
const BULLET_1 = " • ";
|
|
9285
|
-
const SUB_BULLET = " ";
|
|
9286
9542
|
function formatHeader(entry) {
|
|
9287
9543
|
const lines = [];
|
|
9288
9544
|
if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
|
|
@@ -9295,8 +9551,6 @@
|
|
|
9295
9551
|
path.forEach((step, i) => {
|
|
9296
9552
|
const label = readAnnotation(step.linker.spec, Annotation.LinkLabel) ?? readAnnotation(step.linker.spec, Annotation.Label) ?? step.linker.spec.name;
|
|
9297
9553
|
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
9554
|
});
|
|
9301
9555
|
const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;
|
|
9302
9556
|
lines.push(`${BULLET_1}hit column: ${hitName}`);
|
|
@@ -9304,6 +9558,7 @@
|
|
|
9304
9558
|
}
|
|
9305
9559
|
function formatAnchors(q) {
|
|
9306
9560
|
if (isNil(q)) return void 0;
|
|
9561
|
+
if (isNil(q.forQueries)) return void 0;
|
|
9307
9562
|
const ids = Object.keys(q.forQueries);
|
|
9308
9563
|
if (ids.length === 0) return void 0;
|
|
9309
9564
|
const lines = [];
|
|
@@ -9316,7 +9571,7 @@
|
|
|
9316
9571
|
return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
|
|
9317
9572
|
}
|
|
9318
9573
|
function formatHit(q) {
|
|
9319
|
-
if (isNil(q) || q.forHit.length === 0) return void 0;
|
|
9574
|
+
if (isNil(q) || isNil(q.forHit) || q.forHit.length === 0) return void 0;
|
|
9320
9575
|
const rendered = formatAxisQualifications(q.forHit);
|
|
9321
9576
|
if (rendered === void 0) return void 0;
|
|
9322
9577
|
return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
|
|
@@ -9332,7 +9587,7 @@
|
|
|
9332
9587
|
return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
|
|
9333
9588
|
}
|
|
9334
9589
|
//#endregion
|
|
9335
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9590
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
|
|
9336
9591
|
/** Check if column should be omitted from the table */
|
|
9337
9592
|
function isColumnHidden(spec) {
|
|
9338
9593
|
return readAnnotation(spec, Annotation.Table.Visibility) === "hidden";
|
|
@@ -9352,7 +9607,8 @@
|
|
|
9352
9607
|
function getOrderPriority(col, orderByColId) {
|
|
9353
9608
|
const rule = orderByColId?.get(col.id);
|
|
9354
9609
|
if (rule !== void 0) return rule.priority;
|
|
9355
|
-
|
|
9610
|
+
const annotation = Number(readAnnotation(col.spec, Annotation.Table.OrderPriority));
|
|
9611
|
+
return isNaN(annotation) ? void 0 : annotation;
|
|
9356
9612
|
}
|
|
9357
9613
|
/**
|
|
9358
9614
|
* Evaluate display rules against a set of columns and return a map of `colId → winning rule`
|
|
@@ -9434,6 +9690,20 @@
|
|
|
9434
9690
|
};
|
|
9435
9691
|
});
|
|
9436
9692
|
}
|
|
9693
|
+
function withDataStatusAnnotations(columns) {
|
|
9694
|
+
return columns.map((col) => {
|
|
9695
|
+
return {
|
|
9696
|
+
...col,
|
|
9697
|
+
spec: {
|
|
9698
|
+
...col.spec,
|
|
9699
|
+
annotations: {
|
|
9700
|
+
...col.spec.annotations,
|
|
9701
|
+
[Annotation.DataStatus]: col.dataStatus
|
|
9702
|
+
}
|
|
9703
|
+
}
|
|
9704
|
+
};
|
|
9705
|
+
});
|
|
9706
|
+
}
|
|
9437
9707
|
/**
|
|
9438
9708
|
* Writes effective display properties (OrderPriority, Visibility) from precomputed rule maps
|
|
9439
9709
|
* into column annotations. Returns new column objects — originals are not mutated.
|
|
@@ -9496,10 +9766,7 @@
|
|
|
9496
9766
|
const { columns, deriveLabelsOptions } = options;
|
|
9497
9767
|
return deriveDistinctLabels(columns.map((c) => ({
|
|
9498
9768
|
spec: c.spec,
|
|
9499
|
-
linkerPath: c.linkerPath?.map((step) => ({
|
|
9500
|
-
spec: step.linker.spec,
|
|
9501
|
-
qualifications: step.qualifications
|
|
9502
|
-
})),
|
|
9769
|
+
linkerPath: c.linkerPath?.map((step) => ({ spec: step.linker.spec })),
|
|
9503
9770
|
qualifications: c.qualifications
|
|
9504
9771
|
})), deriveLabelsOptions).reduce((acc, label, index) => (acc[columns[index].id] = label, acc), {});
|
|
9505
9772
|
}
|
|
@@ -9507,11 +9774,12 @@
|
|
|
9507
9774
|
function deriveAllTooltips(options) {
|
|
9508
9775
|
const { columns } = options;
|
|
9509
9776
|
const variantCountByOriginal = columns.reduce((acc, c) => {
|
|
9510
|
-
return acc.set(c.
|
|
9777
|
+
return acc.set(getField(c, "originalId") ?? c.id, (acc.get(c.originalId ?? c.id) ?? 0) + 1);
|
|
9511
9778
|
}, /* @__PURE__ */ new Map());
|
|
9512
9779
|
const { entries } = columns.reduce(({ entries, variantSeen }, c) => {
|
|
9513
|
-
const
|
|
9514
|
-
const
|
|
9780
|
+
const id = getField(c, "originalId") ?? c.id;
|
|
9781
|
+
const variantCount = variantCountByOriginal.get(id);
|
|
9782
|
+
const variantIndex = (variantSeen.set(id, (variantSeen.get(id) ?? 0) + 1), variantSeen.get(id));
|
|
9515
9783
|
entries.push({
|
|
9516
9784
|
spec: c.spec,
|
|
9517
9785
|
linkerPath: c.linkerPath,
|
|
@@ -9531,7 +9799,7 @@
|
|
|
9531
9799
|
return Object.fromEntries(tooltips.flatMap((t, i) => isNil(t) ? [] : [[columns[i].id, t]]));
|
|
9532
9800
|
}
|
|
9533
9801
|
//#endregion
|
|
9534
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9802
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
|
|
9535
9803
|
function createPTableDefV3(params) {
|
|
9536
9804
|
let query = {
|
|
9537
9805
|
type: params.primaryJoinType === "inner" ? "innerJoin" : "fullJoin",
|
|
@@ -9543,7 +9811,7 @@
|
|
|
9543
9811
|
entry: query,
|
|
9544
9812
|
qualifications: params.secondary.flatMap((g) => params.primary.flatMap((p) => g.primaryQualifications?.[p.column.id] ?? []))
|
|
9545
9813
|
},
|
|
9546
|
-
secondary: params.secondary.flatMap((g) => g.entries.map((e) =>
|
|
9814
|
+
secondary: params.secondary.flatMap((g) => g.entries.map((e) => toJoinEntry(e)))
|
|
9547
9815
|
};
|
|
9548
9816
|
if (!isNil(params.filters)) {
|
|
9549
9817
|
const nonEmpty = distillFilterSpec(params.filters);
|
|
@@ -9586,8 +9854,23 @@
|
|
|
9586
9854
|
qualifications: qs
|
|
9587
9855
|
};
|
|
9588
9856
|
}
|
|
9857
|
+
function toJoinEntry(e) {
|
|
9858
|
+
const qs = e.qualifications ?? [];
|
|
9859
|
+
if (isNil(e.linkers) || e.linkers.length === 0) return toLeaf(e.column, qs);
|
|
9860
|
+
return {
|
|
9861
|
+
...e.linkers.reduceRight((inner, linker) => ({
|
|
9862
|
+
entry: {
|
|
9863
|
+
type: "linkerJoin",
|
|
9864
|
+
linker: { column: linker },
|
|
9865
|
+
secondary: [inner]
|
|
9866
|
+
},
|
|
9867
|
+
qualifications: []
|
|
9868
|
+
}), toLeaf(e.column, [])),
|
|
9869
|
+
qualifications: qs
|
|
9870
|
+
};
|
|
9871
|
+
}
|
|
9589
9872
|
//#endregion
|
|
9590
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9873
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/discoverColumns.js
|
|
9591
9874
|
/** Discover columns from sources/anchors and normalize into a flat TableColumnVariant list. */
|
|
9592
9875
|
function discoverTableColumnSnaphots(ctx, options) {
|
|
9593
9876
|
const resolvedOptions = {
|
|
@@ -9599,7 +9882,52 @@
|
|
|
9599
9882
|
const collection = new ColumnCollectionBuilder(ctx.getService("pframeSpec")).addSources(providers).build(resolvedOptions);
|
|
9600
9883
|
if (collection === void 0) return void 0;
|
|
9601
9884
|
try {
|
|
9602
|
-
return mapToTableColumnVariants(collection.findColumnVariants(
|
|
9885
|
+
return mapToTableColumnVariants(collection.findColumnVariants(resolvedOptions.selector), collection.getAnchors());
|
|
9886
|
+
} finally {
|
|
9887
|
+
collection.dispose();
|
|
9888
|
+
}
|
|
9889
|
+
}
|
|
9890
|
+
/**
|
|
9891
|
+
* Discover label columns matching the axes of the given value columns from
|
|
9892
|
+
* ctx providers. Returns label snapshots wrapped as direct TableColumnVariants
|
|
9893
|
+
* (path: [], empty qualifications, isPrimary: false).
|
|
9894
|
+
*/
|
|
9895
|
+
function discoverLabelColumnVariants(ctx, columns) {
|
|
9896
|
+
if (columns.length === 0) return [];
|
|
9897
|
+
const collection = new ColumnCollectionBuilder(ctx.getService("pframeSpec")).addSources(collectCtxColumnSnapshotProviders(ctx)).addSource(columns.map((c) => c.column)).build({
|
|
9898
|
+
allowPartialColumnList: true,
|
|
9899
|
+
anchors: Object.fromEntries(columns.filter((col) => (col.path?.length ?? 0) === 0 && col.isPrimary).map((col, i) => [`anchor_${i}`, col.column.spec]))
|
|
9900
|
+
});
|
|
9901
|
+
try {
|
|
9902
|
+
const axes = columns.flatMap((col) => col.column.spec.axesSpec);
|
|
9903
|
+
return collection.findColumnVariants({
|
|
9904
|
+
include: axes.map((a) => ({
|
|
9905
|
+
name: {
|
|
9906
|
+
type: "exact",
|
|
9907
|
+
value: PColumnName.Label
|
|
9908
|
+
},
|
|
9909
|
+
axes: [{ name: {
|
|
9910
|
+
type: "exact",
|
|
9911
|
+
value: a.name
|
|
9912
|
+
} }]
|
|
9913
|
+
})),
|
|
9914
|
+
maxHops: columns.reduce((acc, c) => Math.max(acc, c.path?.length ?? 0), 0)
|
|
9915
|
+
}).map((variant) => ({
|
|
9916
|
+
...variant,
|
|
9917
|
+
column: {
|
|
9918
|
+
...variant.column,
|
|
9919
|
+
id: createDiscoveredPColumnId({
|
|
9920
|
+
column: variant.column.id,
|
|
9921
|
+
path: variant.path?.map((p) => ({
|
|
9922
|
+
type: "linker",
|
|
9923
|
+
column: p.linker.id
|
|
9924
|
+
})),
|
|
9925
|
+
columnQualifications: variant.qualifications?.forHit,
|
|
9926
|
+
queriesQualifications: variant.qualifications?.forQueries
|
|
9927
|
+
}),
|
|
9928
|
+
originalId: variant.column.id
|
|
9929
|
+
}
|
|
9930
|
+
}));
|
|
9603
9931
|
} finally {
|
|
9604
9932
|
collection.dispose();
|
|
9605
9933
|
}
|
|
@@ -9625,13 +9953,12 @@
|
|
|
9625
9953
|
column: {
|
|
9626
9954
|
id: createDiscoveredPColumnId({
|
|
9627
9955
|
column: snap.id,
|
|
9628
|
-
path: variant.path
|
|
9956
|
+
path: variant.path?.map((p) => ({
|
|
9629
9957
|
type: "linker",
|
|
9630
|
-
column: p.linker.id
|
|
9631
|
-
qualifications: p.qualifications
|
|
9958
|
+
column: p.linker.id
|
|
9632
9959
|
})),
|
|
9633
|
-
columnQualifications: variant.qualifications
|
|
9634
|
-
queriesQualifications: variant.qualifications
|
|
9960
|
+
columnQualifications: variant.qualifications?.forHit,
|
|
9961
|
+
queriesQualifications: variant.qualifications?.forQueries
|
|
9635
9962
|
}),
|
|
9636
9963
|
spec: snap.spec,
|
|
9637
9964
|
data: snap.data,
|
|
@@ -9645,12 +9972,12 @@
|
|
|
9645
9972
|
});
|
|
9646
9973
|
}
|
|
9647
9974
|
//#endregion
|
|
9648
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9975
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.75.5/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js
|
|
9649
9976
|
function createPlDataTableV3(ctx, options) {
|
|
9650
9977
|
const pframeSpec = ctx.getService("pframeSpec");
|
|
9651
9978
|
const state = upgradePlDataTableStateV2(options.tableState);
|
|
9652
9979
|
const primaryJoinType = options.primaryJoinType ?? "full";
|
|
9653
|
-
const discovered = isPlainObject(options.columns) ? discoverTableColumnSnaphots(ctx, options.columns) : options.columns;
|
|
9980
|
+
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
9981
|
if (isNil$1(discovered) || discovered.length === 0) return void 0;
|
|
9655
9982
|
const splited = splitDiscoveredColumns(discovered);
|
|
9656
9983
|
const derivedLabels = deriveAllLabels({
|
|
@@ -9659,7 +9986,7 @@
|
|
|
9659
9986
|
spec: dc.column.spec,
|
|
9660
9987
|
linkerPath: dc.path,
|
|
9661
9988
|
qualifications: dc.qualifications
|
|
9662
|
-
})),
|
|
9989
|
+
})).filter((v) => !isColumnHidden(v.spec)),
|
|
9663
9990
|
deriveLabelsOptions: {
|
|
9664
9991
|
includeNativeLabel: true,
|
|
9665
9992
|
...options.labelsOptions
|
|
@@ -9667,7 +9994,7 @@
|
|
|
9667
9994
|
});
|
|
9668
9995
|
const derivedTooltips = deriveAllTooltips({ columns: discovered.map((dc) => ({
|
|
9669
9996
|
id: dc.column.id,
|
|
9670
|
-
originalId: dc
|
|
9997
|
+
originalId: getField(dc, "originalId"),
|
|
9671
9998
|
spec: dc.column.spec,
|
|
9672
9999
|
linkerPath: dc.path,
|
|
9673
10000
|
qualifications: dc.qualifications
|
|
@@ -9682,12 +10009,10 @@
|
|
|
9682
10009
|
const primarySnapshots = annotated.direct.filter((c) => c.isPrimary);
|
|
9683
10010
|
const secondarySnapshots = annotated.direct.filter((c) => !c.isPrimary);
|
|
9684
10011
|
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])]);
|
|
10012
|
+
const columnIsAvailable = createColumnValidationById([...annotated.direct.map((v) => v.column), ...annotated.linked.flatMap((lc) => [...(lc.path ?? []).map((s) => s.linker), lc.column])]);
|
|
9686
10013
|
const remapedDefaultFilters = remapFilterColumnIds(options.filters, discovered);
|
|
9687
|
-
const filters = concatFilters(state.pTableParams.filters, state.pTableParams.defaultFilters ?? remapedDefaultFilters);
|
|
9688
|
-
|
|
9689
|
-
const sorting = resolveSorting(state.pTableParams.sorting, remapSortingColumnIds(options.sorting, discovered));
|
|
9690
|
-
validateSorting(sorting, columnIsAvailable);
|
|
10014
|
+
const filters = filterFilters(concatFilters(state.pTableParams.filters, state.pTableParams.defaultFilters ?? remapedDefaultFilters), columnIsAvailable);
|
|
10015
|
+
const sorting = filterSorting(resolveSorting(state.pTableParams.sorting, remapSortingColumnIds(options.sorting, discovered)), columnIsAvailable);
|
|
9691
10016
|
const primaryEntries = primarySnapshots.map((v) => ({ column: resolveSnapshot(v.column) }));
|
|
9692
10017
|
const fullDef = createPTableDefV3({
|
|
9693
10018
|
primaryJoinType,
|
|
@@ -9723,13 +10048,13 @@
|
|
|
9723
10048
|
/** Split discovered columns into direct (no linker path) and linked (with linker path). */
|
|
9724
10049
|
function splitDiscoveredColumns(columns) {
|
|
9725
10050
|
return {
|
|
9726
|
-
direct: columns.filter((dc) => dc.path
|
|
9727
|
-
linked: columns.filter((dc) => dc.path
|
|
10051
|
+
direct: columns.filter((dc) => (dc.path?.length ?? 0) === 0),
|
|
10052
|
+
linked: columns.filter((dc) => (dc.path?.length ?? 0) > 0)
|
|
9728
10053
|
};
|
|
9729
10054
|
}
|
|
9730
10055
|
/** All linker snapshots across the given linked columns, deduped by id. */
|
|
9731
10056
|
function collectLinkerSnapshots(linked) {
|
|
9732
|
-
return uniqueBy(linked.flatMap((lc) => lc.path.map((s) => s.linker)), (c) => c.id);
|
|
10057
|
+
return uniqueBy(linked.flatMap((lc) => (lc.path ?? []).map((s) => s.linker)), (c) => c.id);
|
|
9733
10058
|
}
|
|
9734
10059
|
/**
|
|
9735
10060
|
* Annotate all column groups with derived labels and display-rule annotations.
|
|
@@ -9747,8 +10072,8 @@
|
|
|
9747
10072
|
const visibilityByColId = evaluateRules(displayOptions?.visibility ?? [], allColumnsForRules, pframeSpec);
|
|
9748
10073
|
const orderByColId = evaluateRules(displayOptions?.ordering ?? [], allColumnsForRules, pframeSpec);
|
|
9749
10074
|
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) => ({
|
|
10075
|
+
direct: liftToVariantColumns(direct, flow((cols) => withDataStatusAnnotations(cols), (cols) => withLabelAnnotations(derivedLabels, cols), (cols) => withInfoAnnotations(derivedTooltips, cols), (cols) => withTableVisualAnnotations(visibilityByColId, orderByColId, cols))),
|
|
10076
|
+
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
10077
|
...lc,
|
|
9753
10078
|
path: annotateLinkerPath(derivedLabels, lc.path)
|
|
9754
10079
|
}))
|
|
@@ -9764,7 +10089,7 @@
|
|
|
9764
10089
|
}));
|
|
9765
10090
|
}
|
|
9766
10091
|
function annotateLinkerPath(derivedLabels, path) {
|
|
9767
|
-
if (path.length === 0) return path;
|
|
10092
|
+
if (isNil$1(path) || path.length === 0) return path;
|
|
9768
10093
|
const annotatedLinkers = withHidenAxesAnnotations(withLabelAnnotations(derivedLabels, path.map((s) => s.linker)));
|
|
9769
10094
|
return path.map((s, i) => ({
|
|
9770
10095
|
...s,
|
|
@@ -9785,11 +10110,33 @@
|
|
|
9785
10110
|
return validIdSet.has(id);
|
|
9786
10111
|
};
|
|
9787
10112
|
}
|
|
9788
|
-
/**
|
|
9789
|
-
function
|
|
9790
|
-
if (filters
|
|
9791
|
-
const
|
|
9792
|
-
|
|
10113
|
+
/** Drop filter leaves whose column references are not available in the table. */
|
|
10114
|
+
function filterFilters(filters, isValidColumnId) {
|
|
10115
|
+
if (isNil$1(filters)) return filters;
|
|
10116
|
+
const isLeafValid = (leaf) => {
|
|
10117
|
+
if (leaf.type === void 0) return true;
|
|
10118
|
+
if ("column" in leaf && !isValidColumnId(leaf.column)) return false;
|
|
10119
|
+
if ("rhs" in leaf && !isValidColumnId(leaf.rhs)) return false;
|
|
10120
|
+
return true;
|
|
10121
|
+
};
|
|
10122
|
+
const prune = (node) => {
|
|
10123
|
+
if (node.type === "and" || node.type === "or") {
|
|
10124
|
+
const kept = node.filters.map((f) => prune(f)).filter((f) => !isNil$1(f));
|
|
10125
|
+
return {
|
|
10126
|
+
type: node.type,
|
|
10127
|
+
filters: kept
|
|
10128
|
+
};
|
|
10129
|
+
}
|
|
10130
|
+
if (node.type === "not") {
|
|
10131
|
+
const inner = prune(node.filter);
|
|
10132
|
+
return isNil$1(inner) ? void 0 : {
|
|
10133
|
+
type: "not",
|
|
10134
|
+
filter: inner
|
|
10135
|
+
};
|
|
10136
|
+
}
|
|
10137
|
+
return isLeafValid(node) ? node : void 0;
|
|
10138
|
+
};
|
|
10139
|
+
return prune(filters);
|
|
9793
10140
|
}
|
|
9794
10141
|
/** Merge two filter trees into one AND-combined tree. Returns the non-nil one if the other is nil. */
|
|
9795
10142
|
function concatFilters(a, b) {
|
|
@@ -9804,27 +10151,24 @@
|
|
|
9804
10151
|
function resolveSorting(userSorting, defaultSorting) {
|
|
9805
10152
|
return (isEmpty(userSorting) ? defaultSorting : userSorting) ?? [];
|
|
9806
10153
|
}
|
|
9807
|
-
/**
|
|
9808
|
-
function
|
|
9809
|
-
|
|
9810
|
-
if (firstInvalid !== void 0) throw new Error(`Invalid sorting column ${JSON.stringify(firstInvalid.column)}: column reference does not match the table columns`);
|
|
10154
|
+
/** Drop sorting entries whose column is not available in the table. */
|
|
10155
|
+
function filterSorting(sorting, isValidColumnId) {
|
|
10156
|
+
return sorting.filter((s) => isValidColumnId(canonicalizeJson(s.column)));
|
|
9811
10157
|
}
|
|
9812
10158
|
function buildSecondaryGroups(direct, linked) {
|
|
9813
10159
|
return [...direct.map((c) => ({
|
|
9814
10160
|
entries: [{
|
|
9815
10161
|
column: resolveSnapshot(c.column),
|
|
9816
|
-
qualifications: c.qualifications
|
|
10162
|
+
qualifications: c.qualifications?.forHit
|
|
9817
10163
|
}],
|
|
9818
|
-
primaryQualifications: c.qualifications
|
|
10164
|
+
primaryQualifications: c.qualifications?.forQueries
|
|
9819
10165
|
})), ...linked.map((lc) => ({
|
|
9820
|
-
entries: [
|
|
9821
|
-
column: resolveSnapshot(s.linker),
|
|
9822
|
-
qualifications: s.qualifications
|
|
9823
|
-
})), {
|
|
10166
|
+
entries: [{
|
|
9824
10167
|
column: resolveSnapshot(lc.column),
|
|
9825
|
-
|
|
10168
|
+
linkers: lc.path?.map((s) => resolveSnapshot(s.linker)),
|
|
10169
|
+
qualifications: lc.qualifications?.forHit
|
|
9826
10170
|
}],
|
|
9827
|
-
primaryQualifications: lc.qualifications
|
|
10171
|
+
primaryQualifications: lc.qualifications?.forQueries
|
|
9828
10172
|
}))];
|
|
9829
10173
|
}
|
|
9830
10174
|
/** Determine which columns should be hidden based on state or optional-column defaults. */
|
|
@@ -9861,17 +10205,18 @@
|
|
|
9861
10205
|
}
|
|
9862
10206
|
/** Remap column references in sorting entries. */
|
|
9863
10207
|
function remapSortingColumnIds(sorting, columns) {
|
|
9864
|
-
return sorting?.
|
|
9865
|
-
if (s.column.type === "axis") return s;
|
|
10208
|
+
return sorting?.flatMap((s) => {
|
|
10209
|
+
if (s.column.type === "axis") return [s];
|
|
9866
10210
|
const id = s.column.id;
|
|
9867
|
-
const column = columns.find((c) => (c
|
|
9868
|
-
return
|
|
10211
|
+
const column = columns.find((c) => (getField(c, "originalId") ?? c.column.id) === id);
|
|
10212
|
+
if (column === void 0) return [];
|
|
10213
|
+
return [{
|
|
9869
10214
|
...s,
|
|
9870
10215
|
column: {
|
|
9871
10216
|
type: "column",
|
|
9872
10217
|
id: column.column.id
|
|
9873
10218
|
}
|
|
9874
|
-
};
|
|
10219
|
+
}];
|
|
9875
10220
|
});
|
|
9876
10221
|
}
|
|
9877
10222
|
/** Remap column references in a filter tree. */
|
|
@@ -9883,7 +10228,7 @@
|
|
|
9883
10228
|
const originalId = parsed.id;
|
|
9884
10229
|
return canonicalizeJson({
|
|
9885
10230
|
type: "column",
|
|
9886
|
-
id: (columns.find((c) => (c
|
|
10231
|
+
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
10232
|
});
|
|
9888
10233
|
};
|
|
9889
10234
|
return traverseFilterSpec(filters, {
|
|
@@ -9962,12 +10307,12 @@
|
|
|
9962
10307
|
//#endregion
|
|
9963
10308
|
//#region src/dataModel.ts
|
|
9964
10309
|
const DEFAULT_SCATTER_STATE = {
|
|
9965
|
-
title: "",
|
|
10310
|
+
title: "Property Relationships",
|
|
9966
10311
|
template: "dots",
|
|
9967
10312
|
currentTab: null
|
|
9968
10313
|
};
|
|
9969
10314
|
const DEFAULT_HISTOGRAM_STATE = {
|
|
9970
|
-
title: "",
|
|
10315
|
+
title: "Property Distribution",
|
|
9971
10316
|
template: "bins",
|
|
9972
10317
|
currentTab: null,
|
|
9973
10318
|
layersSettings: { bins: { fillColor: "#99e099" } }
|
|
@@ -10004,7 +10349,7 @@
|
|
|
10004
10349
|
const platforma$1 = BlockModelV3.create(blockDataModel).args((data) => {
|
|
10005
10350
|
if (data.inputAnchor === void 0) throw new Error("Select an input dataset");
|
|
10006
10351
|
return { inputAnchor: data.inputAnchor };
|
|
10007
|
-
}).output("inputOptions", (ctx) => ctx.resultPool.getOptions(inputAnchorSpecs
|
|
10352
|
+
}).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
10353
|
if (ctx.data.inputAnchor === void 0) return void 0;
|
|
10009
10354
|
const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
|
|
10010
10355
|
if (ownCols === void 0) return void 0;
|
|
@@ -10036,7 +10381,7 @@
|
|
|
10036
10381
|
},
|
|
10037
10382
|
visibility: "default"
|
|
10038
10383
|
}, {
|
|
10039
|
-
match: (spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
|
|
10384
|
+
match: (spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true" && spec.annotations?.["pl7.app/isOutput"] !== "true",
|
|
10040
10385
|
visibility: "optional"
|
|
10041
10386
|
}] }
|
|
10042
10387
|
});
|
|
@@ -10052,7 +10397,7 @@
|
|
|
10052
10397
|
anchor: "main",
|
|
10053
10398
|
idx: 1
|
|
10054
10399
|
}] }]) ?? []).filter((c) => !c.spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties")) : [];
|
|
10055
|
-
return ctx
|
|
10400
|
+
return createPFrameForGraphs(ctx, [...pCols, ...upstreamMeta]);
|
|
10056
10401
|
}).output("propertiesPfCols", (ctx) => {
|
|
10057
10402
|
const pCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
|
|
10058
10403
|
if (pCols === void 0) return void 0;
|
|
@@ -10069,12 +10414,12 @@
|
|
|
10069
10414
|
{
|
|
10070
10415
|
type: "link",
|
|
10071
10416
|
href: "/scatter",
|
|
10072
|
-
label: "
|
|
10417
|
+
label: "Property Relationships"
|
|
10073
10418
|
},
|
|
10074
10419
|
{
|
|
10075
10420
|
type: "link",
|
|
10076
10421
|
href: "/histogram",
|
|
10077
|
-
label: "
|
|
10422
|
+
label: "Property Distribution"
|
|
10078
10423
|
}
|
|
10079
10424
|
]).done();
|
|
10080
10425
|
//#endregion
|