@platforma-sdk/model 1.33.10 → 1.33.16
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/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +246 -239
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/PFrameForGraphs.ts +28 -9
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PlatformaSDKVersion = "1.33.
|
|
1
|
+
export declare const PlatformaSDKVersion = "1.33.16";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/model",
|
|
3
|
-
"version": "1.33.
|
|
3
|
+
"version": "1.33.16",
|
|
4
4
|
"description": "Platforma.bio SDK / Block Model",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"canonicalize": "~2.1.0",
|
|
23
23
|
"zod": "~3.23.8",
|
|
24
|
-
"@milaboratories/pl-model-common": "^1.15.
|
|
24
|
+
"@milaboratories/pl-model-common": "^1.15.4",
|
|
25
25
|
"@milaboratories/pl-error-like": "^1.12.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"jest": "^29.7.0",
|
|
32
32
|
"@jest/globals": "^29.7.0",
|
|
33
33
|
"ts-jest": "^29.2.6",
|
|
34
|
-
"@
|
|
35
|
-
"@platforma-
|
|
34
|
+
"@platforma-sdk/eslint-config": "1.0.3",
|
|
35
|
+
"@milaboratories/platforma-build-configs": "1.0.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"type-check": "node ./scripts/save-package-version.cjs && tsc --noEmit --composite false",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
AxisId,
|
|
3
|
-
|
|
2
|
+
AxisId,
|
|
3
|
+
CanonicalizedJson,
|
|
4
4
|
PColumn,
|
|
5
5
|
PColumnSpec,
|
|
6
|
-
PColumnValues,
|
|
7
6
|
PFrameHandle,
|
|
8
7
|
PObjectId,
|
|
9
8
|
} from '@milaboratories/pl-model-common';
|
|
@@ -215,33 +214,53 @@ export function createPFrameForGraphs<A, U>(
|
|
|
215
214
|
columns.addColumns(blockColumns);
|
|
216
215
|
|
|
217
216
|
// all possible axes from block columns
|
|
217
|
+
const blockAxes = new Map<CanonicalizedJson<AxisId>, AxisId>();
|
|
218
|
+
// axes from block columns and compatible result pool columns
|
|
218
219
|
const allAxes = new Map<CanonicalizedJson<AxisId>, AxisId>();
|
|
219
220
|
for (const c of blockColumns) {
|
|
220
221
|
for (const id of c.spec.axesSpec) {
|
|
221
222
|
const aid = getAxisId(id);
|
|
223
|
+
blockAxes.set(canonicalizeJson(aid), aid);
|
|
222
224
|
allAxes.set(canonicalizeJson(aid), aid);
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
// all linker columns always go to pFrame - even it's impossible to use some of them they all are hidden
|
|
227
229
|
const linkerColumns = columns.getColumns((spec) => isLinkerColumn(spec)) ?? [];
|
|
228
|
-
const availableWithLinkersAxes = getAvailableWithLinkersAxes(linkerColumns,
|
|
229
|
-
const labelColumns = columns.getColumns(isLabelColumn) ?? [];
|
|
230
|
+
const availableWithLinkersAxes = getAvailableWithLinkersAxes(linkerColumns, blockAxes);
|
|
230
231
|
|
|
231
232
|
// all possible axes from connected linkers
|
|
232
233
|
for (const item of availableWithLinkersAxes) {
|
|
234
|
+
blockAxes.set(...item);
|
|
233
235
|
allAxes.set(...item);
|
|
234
236
|
}
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
// all compatible with block columns but without label columns
|
|
239
|
+
const compatibleWithoutLabels = (columns.getColumns([...blockAxes.values()]
|
|
237
240
|
.map((ax) => ({
|
|
238
241
|
axes: [ax],
|
|
239
242
|
partialAxesMatch: true,
|
|
240
|
-
}))) ?? []).filter((column) => !isLabelColumn(column.spec));
|
|
241
|
-
|
|
243
|
+
})), {dontWaitAllData: true, overrideLabelAnnotation: false}) ?? []).filter((column) => !isLabelColumn(column.spec));
|
|
244
|
+
|
|
245
|
+
// extend axes set for label columns request
|
|
246
|
+
for (const c of compatibleWithoutLabels) {
|
|
247
|
+
for (const id of c.spec.axesSpec) {
|
|
248
|
+
const aid = getAxisId(id);
|
|
249
|
+
allAxes.set(canonicalizeJson(aid), aid);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// label columns must be compatible with full set of axes - block axes and axes from compatible columns from result pool
|
|
254
|
+
const compatibleLabels = (columns.getColumns([...allAxes.values()]
|
|
255
|
+
.map((ax) => ({
|
|
256
|
+
axes: [ax],
|
|
257
|
+
partialAxesMatch: true,
|
|
258
|
+
})), {dontWaitAllData: true, overrideLabelAnnotation: false}) ?? []).filter((column) => isLabelColumn(column.spec));
|
|
259
|
+
|
|
260
|
+
const compatible = [...compatibleWithoutLabels, ...compatibleLabels];
|
|
242
261
|
|
|
243
262
|
// additional columns are duplicates with extra fields in domains for compatibility if there are ones with partial match
|
|
244
|
-
const extendedColumns = enrichCompatible(
|
|
263
|
+
const extendedColumns = enrichCompatible(blockAxes, compatible);
|
|
245
264
|
|
|
246
265
|
// if at least one column is not yet ready, we can't show the table
|
|
247
266
|
if (
|