@platforma-sdk/model 1.42.1 → 1.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlSelectionModel.d.ts +2 -5
- package/dist/components/PlSelectionModel.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +212 -216
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/PlSelectionModel.ts +2 -14
- package/src/render/util/column_collection.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/model",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.4",
|
|
4
4
|
"description": "Platforma.bio SDK / Block Model",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"utility-types": "^3.11.0",
|
|
23
23
|
"canonicalize": "~2.1.0",
|
|
24
24
|
"zod": "~3.23.8",
|
|
25
|
-
"@milaboratories/pl-
|
|
26
|
-
"@milaboratories/pl-
|
|
25
|
+
"@milaboratories/pl-error-like": "^1.12.2",
|
|
26
|
+
"@milaboratories/pl-model-common": "^1.19.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"typescript": "~5.6.3",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@jest/globals": "^29.7.0",
|
|
34
34
|
"ts-jest": "^29.2.6",
|
|
35
35
|
"fast-json-patch": "^3.1.1",
|
|
36
|
-
"@platforma-sdk/eslint-config": "1.0.3",
|
|
37
36
|
"@milaboratories/build-configs": "1.0.5",
|
|
38
|
-
"@milaboratories/helpers": "^1.6.19"
|
|
37
|
+
"@milaboratories/helpers": "^1.6.19",
|
|
38
|
+
"@platforma-sdk/eslint-config": "1.0.3"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"type-check": "tsc --noEmit --composite false",
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { AxesSpec,
|
|
2
|
-
import { PTableNA } from '@milaboratories/pl-model-common';
|
|
1
|
+
import type { AxesSpec, PTableValueAxis } from '@milaboratories/pl-model-common';
|
|
3
2
|
|
|
4
3
|
/** Key is a set of all axes values, which means it is unique across rows */
|
|
5
|
-
export type PTableKey =
|
|
6
|
-
|
|
7
|
-
/** Readable axis value */
|
|
8
|
-
export type AxisValue = string | number | PTableAbsent;
|
|
4
|
+
export type PTableKey = PTableValueAxis[];
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
7
|
* Information on selected rows.
|
|
@@ -25,11 +21,3 @@ export function createPlSelectionModel(): PlSelectionModel {
|
|
|
25
21
|
selectedKeys: [],
|
|
26
22
|
};
|
|
27
23
|
}
|
|
28
|
-
|
|
29
|
-
export function mapPTableValueToAxisKey(value: PTableValue): AxisValue {
|
|
30
|
-
if (value === PTableNA) {
|
|
31
|
-
console.error('Axis value can never be N/A');
|
|
32
|
-
return ''; // @TODO: add proper handling
|
|
33
|
-
}
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
PColumnSpec,
|
|
7
7
|
PObjectId,
|
|
8
8
|
SUniversalPColumnId,
|
|
9
|
-
|
|
9
|
+
AxisFilterValue,
|
|
10
10
|
AxisFilterByIdx,
|
|
11
11
|
AnchoredPColumnSelector,
|
|
12
12
|
PartitionedDataInfoEntries,
|
|
@@ -80,7 +80,7 @@ export type PColumnEntryUniversal = PColumnEntryWithLabel & {
|
|
|
80
80
|
type AxisFilterInfo = {
|
|
81
81
|
axisIdx: number;
|
|
82
82
|
axisId: AxisId;
|
|
83
|
-
value:
|
|
83
|
+
value: AxisFilterValue;
|
|
84
84
|
label: string;
|
|
85
85
|
};
|
|
86
86
|
|
|
@@ -354,7 +354,7 @@ export class PColumnCollection {
|
|
|
354
354
|
const axisId = getAxisId(originalSpec.axesSpec[axisIdx]);
|
|
355
355
|
const axisLabelMap = axesLabels[sAxisIdx];
|
|
356
356
|
const label = axisLabelMap?.[value] ?? String(value);
|
|
357
|
-
return { axisIdx, axisId, value: value as
|
|
357
|
+
return { axisIdx, axisId, value: value as AxisFilterValue, label };
|
|
358
358
|
});
|
|
359
359
|
|
|
360
360
|
intermediateResults.push({
|