@platforma-sdk/model 1.13.0 → 1.13.5
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/PlDataTable.d.ts +1 -1
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +432 -423
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +5 -5
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/index.d.ts +1 -0
- package/dist/render/util/index.d.ts.map +1 -1
- package/dist/render/util/label.d.ts +4 -0
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/PlDataTable.ts +6 -2
- package/src/render/api.ts +6 -6
- package/src/render/util/index.ts +2 -1
- package/src/render/util/label.ts +11 -7
package/dist/render/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxisId, Option, PColumn, PColumnSpec, PFrameDef, PFrameHandle, PObject, PObjectSpec, PSpecPredicate, PTableDef, PTableHandle, PTableRecordFilter, PTableSorting,
|
|
1
|
+
import { AxisId, Option, PColumn, PColumnSpec, PFrameDef, PFrameHandle, PObject, PObjectSpec, PSpecPredicate, PTableDef, PTableHandle, PTableRecordFilter, PTableSorting, PlRef, ResultCollection, ValueOrError } from '@milaboratories/pl-model-common';
|
|
2
2
|
import { Optional } from 'utility-types';
|
|
3
3
|
import { TreeNodeAccessor } from './accessor';
|
|
4
4
|
import { FutureRef } from './future';
|
|
@@ -10,7 +10,7 @@ export declare class ResultPool {
|
|
|
10
10
|
*/
|
|
11
11
|
calculateOptions(predicate: PSpecPredicate): Option[];
|
|
12
12
|
private defaultLabelFn;
|
|
13
|
-
getOptions(predicate: (spec: PObjectSpec) => boolean, label?: ((spec: PObjectSpec, ref:
|
|
13
|
+
getOptions(predicate: (spec: PObjectSpec) => boolean, label?: ((spec: PObjectSpec, ref: PlRef) => string) | LabelDerivationOps): Option[];
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated use getData()
|
|
16
16
|
*/
|
|
@@ -30,18 +30,18 @@ export declare class ResultPool {
|
|
|
30
30
|
* @param ref a Ref
|
|
31
31
|
* @returns data associated with the ref
|
|
32
32
|
*/
|
|
33
|
-
getDataByRef(ref:
|
|
33
|
+
getDataByRef(ref: PlRef): PObject<TreeNodeAccessor> | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Returns data associated with the ref ensuring that it is a p-column.
|
|
36
36
|
* @param ref a Ref
|
|
37
37
|
* @returns p-column associated with the ref
|
|
38
38
|
*/
|
|
39
|
-
getPColumnByRef(ref:
|
|
39
|
+
getPColumnByRef(ref: PlRef): PColumn<TreeNodeAccessor> | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* @param ref a Ref
|
|
42
42
|
* @returns object spec associated with the ref
|
|
43
43
|
*/
|
|
44
|
-
getSpecByRef(ref:
|
|
44
|
+
getSpecByRef(ref: PlRef): PObjectSpec | undefined;
|
|
45
45
|
/**
|
|
46
46
|
* @param spec object specification
|
|
47
47
|
* @returns array of data objects with compatible specs
|
package/dist/render/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/render/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/render/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,aAAa,E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B,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;KAC3B,GAAG,YAAY;IA2BhB,iDAAiD;IAC1C,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAItC,wBAAwB,IAAI,MAAM,GAAG,SAAS;CAKtD;AAED,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,CAC7E,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,KAC3B,GAAG,CAAC;AAET,MAAM,MAAM,eAAe,CAAC,CAAC,IAC3B,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GACxB,CAAC,GACD,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GACtE,CAAC,GACD;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,CAAC;AAEtD,MAAM,MAAM,yBAAyB,CAAC,EAAE,SAAS,QAAQ,IAAI,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAC7F,eAAe,CAAC,CAAC,CAAC,GAClB,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/render/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -7,8 +7,12 @@ export type RecordsWithLabel<T> = {
|
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
export type LabelDerivationOps = {
|
|
10
|
+
/** Force inclusion of native column label */
|
|
10
11
|
includeNativeLabel?: boolean;
|
|
12
|
+
/** Separator to use between label parts (" / " by default) */
|
|
11
13
|
separator?: string;
|
|
14
|
+
/** If true, label will be added as suffix (at the end of the generated label). By default label added as a prefix. */
|
|
15
|
+
addLabelAsSuffix?: boolean;
|
|
12
16
|
};
|
|
13
17
|
export declare const TraceEntry: z.ZodObject<{
|
|
14
18
|
type: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/render/util/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/render/util/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;EAKrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;WAAsB,CAAC;AACzC,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAQ1C,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EAAE,EACX,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,WAAW,EACtC,GAAG,GAAE,kBAAuB,GAC3B,gBAAgB,CAAC,CAAC,CAAC,EAAE,CA4GvB"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PlatformaSDKVersion = "1.13.
|
|
1
|
+
export declare const PlatformaSDKVersion = "1.13.5";
|
|
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.13.
|
|
3
|
+
"version": "1.13.5",
|
|
4
4
|
"description": "Platforma.bio SDK / Block Model",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"zod": "^3.23.8",
|
|
23
|
-
"@milaboratories/pl-model-common": "^1.6.
|
|
23
|
+
"@milaboratories/pl-model-common": "^1.6.4"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"typescript": "~5.5.4",
|
|
@@ -280,14 +280,14 @@ export function createPlDataTable<A, U>(
|
|
|
280
280
|
columns: PColumn<TreeNodeAccessor>[],
|
|
281
281
|
tableState?: PlDataTableState,
|
|
282
282
|
filters?: PTableRecordFilter[]
|
|
283
|
-
): PTableHandle {
|
|
283
|
+
): PTableHandle | undefined {
|
|
284
284
|
const allLabelCols = ctx.resultPool
|
|
285
285
|
.getData()
|
|
286
286
|
.entries.map((d) => d.obj)
|
|
287
287
|
.filter(isPColumn)
|
|
288
288
|
.filter((p) => p.spec.name === 'pl7.app/label' && p.spec.axesSpec.length === 1);
|
|
289
289
|
|
|
290
|
-
const labelColumns = new Map<PObjectId, PColumn<TreeNodeAccessor
|
|
290
|
+
const labelColumns = new Map<PObjectId, PColumn<TreeNodeAccessor>>();
|
|
291
291
|
for (const col of columns) {
|
|
292
292
|
for (const axis of col.spec.axesSpec) {
|
|
293
293
|
const axisId = getAxisId(axis);
|
|
@@ -299,6 +299,10 @@ export function createPlDataTable<A, U>(
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
// if at least one column is not yet ready, we can't show the table
|
|
303
|
+
if ([...columns, ...labelColumns.values()].find((a) => !a.data.getIsReadyOrError()))
|
|
304
|
+
return undefined;
|
|
305
|
+
|
|
302
306
|
return ctx.createPTable({
|
|
303
307
|
src: {
|
|
304
308
|
type: 'outer',
|
package/src/render/api.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
PTableHandle,
|
|
13
13
|
PTableRecordFilter,
|
|
14
14
|
PTableSorting,
|
|
15
|
-
|
|
15
|
+
PlRef,
|
|
16
16
|
ResultCollection,
|
|
17
17
|
ValueOrError,
|
|
18
18
|
ensurePColumn,
|
|
@@ -39,12 +39,12 @@ export class ResultPool {
|
|
|
39
39
|
return this.ctx.calculateOptions(predicate);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
private defaultLabelFn = (spec: PObjectSpec, ref:
|
|
42
|
+
private defaultLabelFn = (spec: PObjectSpec, ref: PlRef) =>
|
|
43
43
|
spec.annotations?.['pl7.app/label'] ?? `Unlabelled`;
|
|
44
44
|
|
|
45
45
|
public getOptions(
|
|
46
46
|
predicate: (spec: PObjectSpec) => boolean,
|
|
47
|
-
label?: ((spec: PObjectSpec, ref:
|
|
47
|
+
label?: ((spec: PObjectSpec, ref: PlRef) => string) | LabelDerivationOps
|
|
48
48
|
): Option[] {
|
|
49
49
|
const filtered = this.getSpecs().entries.filter((s) => predicate(s.obj));
|
|
50
50
|
if (typeof label === 'object' || typeof label === 'undefined') {
|
|
@@ -122,7 +122,7 @@ export class ResultPool {
|
|
|
122
122
|
* @param ref a Ref
|
|
123
123
|
* @returns data associated with the ref
|
|
124
124
|
*/
|
|
125
|
-
public getDataByRef(ref:
|
|
125
|
+
public getDataByRef(ref: PlRef): PObject<TreeNodeAccessor> | undefined {
|
|
126
126
|
// @TODO remove after 1 Jan 2025; forward compatibility
|
|
127
127
|
if (typeof this.ctx.getDataFromResultPoolByRef === 'undefined')
|
|
128
128
|
return this.getData().entries.find(
|
|
@@ -139,7 +139,7 @@ export class ResultPool {
|
|
|
139
139
|
* @param ref a Ref
|
|
140
140
|
* @returns p-column associated with the ref
|
|
141
141
|
*/
|
|
142
|
-
public getPColumnByRef(ref:
|
|
142
|
+
public getPColumnByRef(ref: PlRef): PColumn<TreeNodeAccessor> | undefined {
|
|
143
143
|
const data = this.getDataByRef(ref);
|
|
144
144
|
if (!data) return undefined;
|
|
145
145
|
return ensurePColumn(data);
|
|
@@ -149,7 +149,7 @@ export class ResultPool {
|
|
|
149
149
|
* @param ref a Ref
|
|
150
150
|
* @returns object spec associated with the ref
|
|
151
151
|
*/
|
|
152
|
-
public getSpecByRef(ref:
|
|
152
|
+
public getSpecByRef(ref: PlRef): PObjectSpec | undefined {
|
|
153
153
|
// @TODO remove after 1 Jan 2025; forward compatibility
|
|
154
154
|
if (typeof this.ctx.getSpecFromResultPoolByRef === 'undefined')
|
|
155
155
|
return this.getSpecs().entries.find(
|
package/src/render/util/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './resource_map'
|
|
1
|
+
export * from './resource_map';
|
|
2
|
+
export * from './label';
|
package/src/render/util/label.ts
CHANGED
|
@@ -10,8 +10,12 @@ export type RecordsWithLabel<T> = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export type LabelDerivationOps = {
|
|
13
|
+
/** Force inclusion of native column label */
|
|
13
14
|
includeNativeLabel?: boolean;
|
|
15
|
+
/** Separator to use between label parts (" / " by default) */
|
|
14
16
|
separator?: string;
|
|
17
|
+
/** If true, label will be added as suffix (at the end of the generated label). By default label added as a prefix. */
|
|
18
|
+
addLabelAsSuffix?: boolean;
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
export const TraceEntry = z.object({
|
|
@@ -48,7 +52,11 @@ export function deriveLabels<T>(
|
|
|
48
52
|
const traceStr = spec.annotations?.[PAnnotationTrace];
|
|
49
53
|
const trace = (traceStr ? Trace.safeParse(JSON.parse(traceStr)).data : undefined) ?? [];
|
|
50
54
|
|
|
51
|
-
if (label)
|
|
55
|
+
if (label) {
|
|
56
|
+
const labelEntry = { label, type: LabelType, importance: -2 };
|
|
57
|
+
if (ops.addLabelAsSuffix) trace.push(labelEntry);
|
|
58
|
+
else trace.splice(0, 0, labelEntry);
|
|
59
|
+
}
|
|
52
60
|
|
|
53
61
|
const fullTrace: FullTrace = [];
|
|
54
62
|
|
|
@@ -123,18 +131,14 @@ export function deriveLabels<T>(
|
|
|
123
131
|
let additinalType = 0;
|
|
124
132
|
while (includedTypes < mainTypes.length) {
|
|
125
133
|
const currentSet = new Set<string>();
|
|
134
|
+
if (ops.includeNativeLabel) currentSet.add(LabelTypeFull);
|
|
126
135
|
for (let i = 0; i < includedTypes; ++i) currentSet.add(mainTypes[i]);
|
|
127
136
|
currentSet.add(mainTypes[additinalType]);
|
|
128
137
|
|
|
129
138
|
const candidateResult = calculate(currentSet);
|
|
130
139
|
|
|
131
140
|
// checking if labels uniquely separate our records
|
|
132
|
-
if (new Set(candidateResult.map((c) => c.label)).size === values.length)
|
|
133
|
-
if (ops.includeNativeLabel) {
|
|
134
|
-
currentSet.add(LabelTypeFull);
|
|
135
|
-
return calculate(currentSet);
|
|
136
|
-
} else return candidateResult;
|
|
137
|
-
}
|
|
141
|
+
if (new Set(candidateResult.map((c) => c.label)).size === values.length) return candidateResult;
|
|
138
142
|
|
|
139
143
|
additinalType++;
|
|
140
144
|
if (additinalType == mainTypes.length) {
|