@milaboratories/pl-model-common 1.25.1 → 1.25.3
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/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/author_marker.d.ts +9 -6
- package/dist/base32_encode.cjs +40 -46
- package/dist/base32_encode.cjs.map +1 -1
- package/dist/base32_encode.js +40 -45
- package/dist/base32_encode.js.map +1 -1
- package/dist/base64.cjs +5 -4
- package/dist/base64.cjs.map +1 -1
- package/dist/base64.d.ts +10 -6
- package/dist/base64.js +5 -3
- package/dist/base64.js.map +1 -1
- package/dist/block_state.d.ts +21 -23
- package/dist/bmodel/block_config.cjs +9 -10
- package/dist/bmodel/block_config.cjs.map +1 -1
- package/dist/bmodel/block_config.d.ts +53 -72
- package/dist/bmodel/block_config.js +9 -9
- package/dist/bmodel/block_config.js.map +1 -1
- package/dist/bmodel/code.cjs +7 -6
- package/dist/bmodel/code.cjs.map +1 -1
- package/dist/bmodel/code.d.ts +17 -13
- package/dist/bmodel/code.js +6 -4
- package/dist/bmodel/code.js.map +1 -1
- package/dist/bmodel/container.d.ts +46 -44
- package/dist/bmodel/index.cjs +3 -0
- package/dist/bmodel/index.d.ts +5 -6
- package/dist/bmodel/index.js +3 -0
- package/dist/bmodel/normalization.cjs +90 -106
- package/dist/bmodel/normalization.cjs.map +1 -1
- package/dist/bmodel/normalization.d.ts +7 -3
- package/dist/bmodel/normalization.js +90 -105
- package/dist/bmodel/normalization.js.map +1 -1
- package/dist/bmodel/types.d.ts +4 -1
- package/dist/branding.d.ts +5 -5
- package/dist/common_types.d.ts +19 -15
- package/dist/driver_kit.d.ts +25 -17
- package/dist/drivers/ChunkedStreamReader.cjs +168 -203
- package/dist/drivers/ChunkedStreamReader.cjs.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts +104 -100
- package/dist/drivers/ChunkedStreamReader.js +168 -202
- package/dist/drivers/ChunkedStreamReader.js.map +1 -1
- package/dist/drivers/blob.cjs +15 -17
- package/dist/drivers/blob.cjs.map +1 -1
- package/dist/drivers/blob.d.ts +35 -35
- package/dist/drivers/blob.js +14 -15
- package/dist/drivers/blob.js.map +1 -1
- package/dist/drivers/index.cjs +18 -0
- package/dist/drivers/index.d.ts +29 -9
- package/dist/drivers/index.js +18 -0
- package/dist/drivers/interfaces.d.ts +17 -14
- package/dist/drivers/log.cjs +4 -3
- package/dist/drivers/log.cjs.map +1 -1
- package/dist/drivers/log.d.ts +52 -49
- package/dist/drivers/log.js +4 -2
- package/dist/drivers/log.js.map +1 -1
- package/dist/drivers/ls.cjs +16 -19
- package/dist/drivers/ls.cjs.map +1 -1
- package/dist/drivers/ls.d.ts +73 -76
- package/dist/drivers/ls.js +16 -17
- package/dist/drivers/ls.js.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts +19 -15
- package/dist/drivers/pframe/data_info.cjs +201 -252
- package/dist/drivers/pframe/data_info.cjs.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +84 -109
- package/dist/drivers/pframe/data_info.js +201 -250
- package/dist/drivers/pframe/data_info.js.map +1 -1
- package/dist/drivers/pframe/data_types.cjs +38 -63
- package/dist/drivers/pframe/data_types.cjs.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts +91 -93
- package/dist/drivers/pframe/data_types.js +38 -61
- package/dist/drivers/pframe/data_types.js.map +1 -1
- package/dist/drivers/pframe/driver.cjs +7 -0
- package/dist/drivers/pframe/driver.cjs.map +1 -0
- package/dist/drivers/pframe/driver.d.ts +50 -45
- package/dist/drivers/pframe/driver.js +6 -0
- package/dist/drivers/pframe/driver.js.map +1 -0
- package/dist/drivers/pframe/filter_spec.d.ts +127 -123
- package/dist/drivers/pframe/find_columns.d.ts +21 -17
- package/dist/drivers/pframe/index.cjs +15 -0
- package/dist/drivers/pframe/index.d.ts +23 -16
- package/dist/drivers/pframe/index.js +15 -0
- package/dist/drivers/pframe/linker_columns.cjs +184 -238
- package/dist/drivers/pframe/linker_columns.cjs.map +1 -1
- package/dist/drivers/pframe/linker_columns.d.ts +45 -38
- package/dist/drivers/pframe/linker_columns.js +184 -236
- package/dist/drivers/pframe/linker_columns.js.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +26 -21
- package/dist/drivers/pframe/query/index.cjs +1 -0
- package/dist/drivers/pframe/query/index.d.ts +3 -4
- package/dist/drivers/pframe/query/index.js +1 -0
- package/dist/drivers/pframe/query/query_common.d.ts +205 -247
- package/dist/drivers/pframe/query/query_data.d.ts +25 -23
- package/dist/drivers/pframe/query/query_spec.d.ts +30 -29
- package/dist/drivers/pframe/query/utils.cjs +164 -183
- package/dist/drivers/pframe/query/utils.cjs.map +1 -1
- package/dist/drivers/pframe/query/utils.d.ts +13 -12
- package/dist/drivers/pframe/query/utils.js +164 -181
- package/dist/drivers/pframe/query/utils.js.map +1 -1
- package/dist/drivers/pframe/spec/anchored.cjs +178 -216
- package/dist/drivers/pframe/spec/anchored.cjs.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +53 -49
- package/dist/drivers/pframe/spec/anchored.js +176 -214
- package/dist/drivers/pframe/spec/anchored.js.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.cjs +8 -7
- package/dist/drivers/pframe/spec/filtered_column.cjs.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts +20 -17
- package/dist/drivers/pframe/spec/filtered_column.js +8 -6
- package/dist/drivers/pframe/spec/filtered_column.js.map +1 -1
- package/dist/drivers/pframe/spec/ids.cjs +16 -14
- package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +13 -8
- package/dist/drivers/pframe/spec/ids.js +14 -12
- package/dist/drivers/pframe/spec/ids.js.map +1 -1
- package/dist/drivers/pframe/spec/index.cjs +6 -0
- package/dist/drivers/pframe/spec/index.d.ts +6 -7
- package/dist/drivers/pframe/spec/index.js +6 -0
- package/dist/drivers/pframe/spec/native_id.cjs +16 -16
- package/dist/drivers/pframe/spec/native_id.cjs.map +1 -1
- package/dist/drivers/pframe/spec/native_id.d.ts +9 -4
- package/dist/drivers/pframe/spec/native_id.js +13 -13
- package/dist/drivers/pframe/spec/native_id.js.map +1 -1
- package/dist/drivers/pframe/spec/selectors.cjs +72 -112
- package/dist/drivers/pframe/spec/selectors.cjs.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +99 -94
- package/dist/drivers/pframe/spec/selectors.js +72 -110
- package/dist/drivers/pframe/spec/selectors.js.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +282 -324
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +263 -272
- package/dist/drivers/pframe/spec/spec.js +281 -322
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/table.d.ts +28 -24
- package/dist/drivers/pframe/table_calculate.cjs +117 -147
- package/dist/drivers/pframe/table_calculate.cjs.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +219 -220
- package/dist/drivers/pframe/table_calculate.js +117 -145
- package/dist/drivers/pframe/table_calculate.js.map +1 -1
- package/dist/drivers/pframe/table_common.cjs +13 -14
- package/dist/drivers/pframe/table_common.cjs.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +24 -19
- package/dist/drivers/pframe/table_common.js +13 -13
- package/dist/drivers/pframe/table_common.js.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +23 -18
- package/dist/drivers/upload.d.ts +21 -18
- package/dist/drivers/urls.cjs +5 -6
- package/dist/drivers/urls.cjs.map +1 -1
- package/dist/drivers/urls.d.ts +12 -9
- package/dist/drivers/urls.js +5 -5
- package/dist/drivers/urls.js.map +1 -1
- package/dist/errors.cjs +65 -86
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +36 -33
- package/dist/errors.js +65 -85
- package/dist/errors.js.map +1 -1
- package/dist/flags/block_flags.cjs +7 -6
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +12 -8
- package/dist/flags/block_flags.js +7 -5
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/flag_utils.cjs +69 -108
- package/dist/flags/flag_utils.cjs.map +1 -1
- package/dist/flags/flag_utils.d.ts +40 -42
- package/dist/flags/flag_utils.js +70 -107
- package/dist/flags/flag_utils.js.map +1 -1
- package/dist/flags/type_utils.d.ts +12 -11
- package/dist/httpAuth.cjs +16 -20
- package/dist/httpAuth.cjs.map +1 -1
- package/dist/httpAuth.d.ts +10 -7
- package/dist/httpAuth.js +16 -19
- package/dist/httpAuth.js.map +1 -1
- package/dist/index.cjs +176 -179
- package/dist/index.d.ts +58 -20
- package/dist/index.js +37 -34
- package/dist/json.cjs +10 -8
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts +18 -18
- package/dist/json.js +8 -6
- package/dist/json.js.map +1 -1
- package/dist/navigation.cjs +3 -2
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.d.ts +18 -21
- package/dist/navigation.js +3 -1
- package/dist/navigation.js.map +1 -1
- package/dist/plid.cjs +16 -20
- package/dist/plid.cjs.map +1 -1
- package/dist/plid.d.ts +11 -7
- package/dist/plid.js +15 -18
- package/dist/plid.js.map +1 -1
- package/dist/pool/entry.d.ts +11 -11
- package/dist/pool/index.d.ts +3 -4
- package/dist/pool/query.cjs +21 -43
- package/dist/pool/query.cjs.map +1 -1
- package/dist/pool/query.d.ts +25 -20
- package/dist/pool/query.js +20 -40
- package/dist/pool/query.js.map +1 -1
- package/dist/pool/spec.cjs +40 -47
- package/dist/pool/spec.cjs.map +1 -1
- package/dist/pool/spec.d.ts +33 -31
- package/dist/pool/spec.js +40 -45
- package/dist/pool/spec.js.map +1 -1
- package/dist/ref.cjs +51 -71
- package/dist/ref.cjs.map +1 -1
- package/dist/ref.d.ts +36 -33
- package/dist/ref.js +50 -69
- package/dist/ref.js.map +1 -1
- package/dist/utag.d.ts +18 -14
- package/dist/util.cjs +8 -7
- package/dist/util.cjs.map +1 -1
- package/dist/util.d.ts +5 -2
- package/dist/util.js +8 -6
- package/dist/util.js.map +1 -1
- package/dist/value_or_error.cjs +7 -3
- package/dist/value_or_error.cjs.map +1 -1
- package/dist/value_or_error.d.ts +9 -6
- package/dist/value_or_error.js +7 -2
- package/dist/value_or_error.js.map +1 -1
- package/package.json +6 -6
- package/src/flags/block_flags.ts +2 -1
- package/src/flags/flag_utils.ts +0 -22
- package/dist/author_marker.d.ts.map +0 -1
- package/dist/base32_encode.d.ts +0 -8
- package/dist/base32_encode.d.ts.map +0 -1
- package/dist/base64.d.ts.map +0 -1
- package/dist/block_state.d.ts.map +0 -1
- package/dist/bmodel/block_config.d.ts.map +0 -1
- package/dist/bmodel/code.d.ts.map +0 -1
- package/dist/bmodel/container.d.ts.map +0 -1
- package/dist/bmodel/index.d.ts.map +0 -1
- package/dist/bmodel/normalization.d.ts.map +0 -1
- package/dist/bmodel/types.d.ts.map +0 -1
- package/dist/branding.d.ts.map +0 -1
- package/dist/common_types.d.ts.map +0 -1
- package/dist/driver_kit.d.ts.map +0 -1
- package/dist/drivers/ChunkedStreamReader.d.ts.map +0 -1
- package/dist/drivers/blob.d.ts.map +0 -1
- package/dist/drivers/index.d.ts.map +0 -1
- package/dist/drivers/interfaces.d.ts.map +0 -1
- package/dist/drivers/log.d.ts.map +0 -1
- package/dist/drivers/ls.d.ts.map +0 -1
- package/dist/drivers/pframe/column_filter.d.ts.map +0 -1
- package/dist/drivers/pframe/data_info.d.ts.map +0 -1
- package/dist/drivers/pframe/data_types.d.ts.map +0 -1
- package/dist/drivers/pframe/driver.d.ts.map +0 -1
- package/dist/drivers/pframe/filter_spec.d.ts.map +0 -1
- package/dist/drivers/pframe/find_columns.d.ts.map +0 -1
- package/dist/drivers/pframe/index.d.ts.map +0 -1
- package/dist/drivers/pframe/linker_columns.d.ts.map +0 -1
- package/dist/drivers/pframe/pframe.d.ts.map +0 -1
- package/dist/drivers/pframe/query/index.d.ts.map +0 -1
- package/dist/drivers/pframe/query/query_common.d.ts.map +0 -1
- package/dist/drivers/pframe/query/query_data.d.ts.map +0 -1
- package/dist/drivers/pframe/query/query_spec.d.ts.map +0 -1
- package/dist/drivers/pframe/query/utils.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/anchored.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/ids.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/index.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/native_id.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/selectors.d.ts.map +0 -1
- package/dist/drivers/pframe/spec/spec.d.ts.map +0 -1
- package/dist/drivers/pframe/table.d.ts.map +0 -1
- package/dist/drivers/pframe/table_calculate.d.ts.map +0 -1
- package/dist/drivers/pframe/table_common.d.ts.map +0 -1
- package/dist/drivers/pframe/type_util.d.ts +0 -5
- package/dist/drivers/pframe/type_util.d.ts.map +0 -1
- package/dist/drivers/pframe/unique_values.d.ts.map +0 -1
- package/dist/drivers/upload.d.ts.map +0 -1
- package/dist/drivers/urls.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/flags/block_flags.d.ts.map +0 -1
- package/dist/flags/flag_utils.d.ts.map +0 -1
- package/dist/flags/index.d.ts +0 -4
- package/dist/flags/index.d.ts.map +0 -1
- package/dist/flags/type_utils.d.ts.map +0 -1
- package/dist/httpAuth.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json.d.ts.map +0 -1
- package/dist/navigation.d.ts.map +0 -1
- package/dist/plid.d.ts.map +0 -1
- package/dist/pool/entry.d.ts.map +0 -1
- package/dist/pool/index.d.ts.map +0 -1
- package/dist/pool/query.d.ts.map +0 -1
- package/dist/pool/spec.d.ts.map +0 -1
- package/dist/ref.d.ts.map +0 -1
- package/dist/utag.d.ts.map +0 -1
- package/dist/util.d.ts.map +0 -1
- package/dist/value_or_error.d.ts.map +0 -1
|
@@ -1,414 +1,372 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var zod = require('zod');
|
|
1
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_errors = require('../../../errors.cjs');
|
|
3
|
+
const require_json = require('../../../json.cjs');
|
|
4
|
+
let zod = require("zod");
|
|
6
5
|
|
|
6
|
+
//#region src/drivers/pframe/spec/spec.ts
|
|
7
7
|
const ValueType = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
Int: "Int",
|
|
9
|
+
Long: "Long",
|
|
10
|
+
Float: "Float",
|
|
11
|
+
Double: "Double",
|
|
12
|
+
String: "String",
|
|
13
|
+
Bytes: "Bytes"
|
|
14
14
|
};
|
|
15
15
|
function readMetadata(metadata, key) {
|
|
16
|
-
|
|
16
|
+
return metadata?.[key];
|
|
17
17
|
}
|
|
18
18
|
function readMetadataJsonOrThrow(metadata, metadataJson, key, methodNameInError = "readMetadataJsonOrThrow") {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
throw new Error(`${methodNameInError} failed, ` +
|
|
29
|
-
`key: ${String(key)}, ` +
|
|
30
|
-
`value: ${json}, ` +
|
|
31
|
-
`error: ${errors.ensureError(error)}`);
|
|
32
|
-
}
|
|
19
|
+
const json = readMetadata(metadata, key);
|
|
20
|
+
if (json === void 0) return void 0;
|
|
21
|
+
const schema = metadataJson[key];
|
|
22
|
+
try {
|
|
23
|
+
const value = JSON.parse(json);
|
|
24
|
+
return schema.parse(value);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new Error(`${methodNameInError} failed, key: ${String(key)}, value: ${json}, error: ${require_errors.ensureError(error)}`);
|
|
27
|
+
}
|
|
33
28
|
}
|
|
34
29
|
function readMetadataJson(metadata, metadataJson, key) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
30
|
+
try {
|
|
31
|
+
return readMetadataJsonOrThrow(metadata, metadataJson, key);
|
|
32
|
+
} catch {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
41
35
|
}
|
|
42
|
-
/// Well-known domains
|
|
43
36
|
const Domain = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
ScClonotypeChain: {
|
|
51
|
-
Index: "pl7.app/vdj/scClonotypeChain/index",
|
|
52
|
-
},
|
|
53
|
-
},
|
|
37
|
+
Alphabet: "pl7.app/alphabet",
|
|
38
|
+
BlockId: "pl7.app/blockId",
|
|
39
|
+
VDJ: {
|
|
40
|
+
Clustering: { BlockId: "pl7.app/vdj/clustering/blockId" },
|
|
41
|
+
ScClonotypeChain: { Index: "pl7.app/vdj/scClonotypeChain/index" }
|
|
42
|
+
}
|
|
54
43
|
};
|
|
55
44
|
const DomainJson = {};
|
|
56
|
-
/// Helper function for reading plain domain values
|
|
57
45
|
function readDomain(spec, key) {
|
|
58
|
-
|
|
46
|
+
return readMetadata(spec?.domain, key);
|
|
59
47
|
}
|
|
60
|
-
/// Helper function for reading json-encoded domain values, throws on JSON parsing error
|
|
61
48
|
function readDomainJsonOrThrow(spec, key) {
|
|
62
|
-
|
|
49
|
+
return readMetadataJsonOrThrow(spec?.domain, DomainJson, key, "readDomainJsonOrThrow");
|
|
63
50
|
}
|
|
64
|
-
/// Helper function for reading json-encoded domain values, returns undefined on JSON parsing error
|
|
65
51
|
function readDomainJson(spec, key) {
|
|
66
|
-
|
|
52
|
+
return readMetadataJson(spec?.domain, DomainJson, key);
|
|
67
53
|
}
|
|
68
|
-
/// Well-known annotations
|
|
69
54
|
const Annotation = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
IsMainSequence: "pl7.app/vdj/isMainSequence",
|
|
119
|
-
},
|
|
55
|
+
AxisNature: "pl7.app/axisNature",
|
|
56
|
+
Alphabet: "pl7.app/alphabet",
|
|
57
|
+
Description: "pl7.app/description",
|
|
58
|
+
DiscreteValues: "pl7.app/discreteValues",
|
|
59
|
+
Format: "pl7.app/format",
|
|
60
|
+
Graph: {
|
|
61
|
+
Axis: {
|
|
62
|
+
HighCardinality: "pl7.app/graph/axis/highCardinality",
|
|
63
|
+
LowerLimit: "pl7.app/graph/axis/lowerLimit",
|
|
64
|
+
SymmetricRange: "pl7.app/graph/axis/symmetricRange",
|
|
65
|
+
UpperLimit: "pl7.app/graph/axis/upperLimit"
|
|
66
|
+
},
|
|
67
|
+
IsDenseAxis: "pl7.app/graph/isDenseAxis",
|
|
68
|
+
IsVirtual: "pl7.app/graph/isVirtual",
|
|
69
|
+
Palette: "pl7.app/graph/palette",
|
|
70
|
+
Thresholds: "pl7.app/graph/thresholds",
|
|
71
|
+
TreatAbsentValuesAs: "pl7.app/graph/treatAbsentValuesAs"
|
|
72
|
+
},
|
|
73
|
+
HideDataFromUi: "pl7.app/hideDataFromUi",
|
|
74
|
+
HideDataFromGraphs: "pl7.app/hideDataFromGraphs",
|
|
75
|
+
IsDiscreteFilter: "pl7.app/isDiscreteFilter",
|
|
76
|
+
IsAnchor: "pl7.app/isAnchor",
|
|
77
|
+
IsLinkerColumn: "pl7.app/isLinkerColumn",
|
|
78
|
+
IsScore: "pl7.app/isScore",
|
|
79
|
+
IsSubset: "pl7.app/isSubset",
|
|
80
|
+
Label: "pl7.app/label",
|
|
81
|
+
Max: "pl7.app/max",
|
|
82
|
+
Min: "pl7.app/min",
|
|
83
|
+
MultipliesBy: "pl7.app/multipliesBy",
|
|
84
|
+
Parents: "pl7.app/parents",
|
|
85
|
+
Score: {
|
|
86
|
+
DefaultCutoff: "pl7.app/score/defaultCutoff",
|
|
87
|
+
RankingOrder: "pl7.app/score/rankingOrder"
|
|
88
|
+
},
|
|
89
|
+
Sequence: {
|
|
90
|
+
Annotation: { Mapping: "pl7.app/sequence/annotation/mapping" },
|
|
91
|
+
IsAnnotation: "pl7.app/sequence/isAnnotation"
|
|
92
|
+
},
|
|
93
|
+
Table: {
|
|
94
|
+
FontFamily: "pl7.app/table/fontFamily",
|
|
95
|
+
OrderPriority: "pl7.app/table/orderPriority",
|
|
96
|
+
Visibility: "pl7.app/table/visibility"
|
|
97
|
+
},
|
|
98
|
+
Trace: "pl7.app/trace",
|
|
99
|
+
VDJ: {
|
|
100
|
+
IsAssemblingFeature: "pl7.app/vdj/isAssemblingFeature",
|
|
101
|
+
IsMainSequence: "pl7.app/vdj/isMainSequence"
|
|
102
|
+
}
|
|
120
103
|
};
|
|
121
|
-
const ValueTypeSchema = zod.z.enum([
|
|
104
|
+
const ValueTypeSchema = zod.z.enum([
|
|
105
|
+
"Int",
|
|
106
|
+
"Long",
|
|
107
|
+
"Float",
|
|
108
|
+
"Double",
|
|
109
|
+
"String"
|
|
110
|
+
]);
|
|
122
111
|
const AnnotationJson = {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
112
|
+
[Annotation.DiscreteValues]: zod.z.array(zod.z.string()).or(zod.z.array(zod.z.number())),
|
|
113
|
+
[Annotation.Graph.Axis.HighCardinality]: zod.z.boolean(),
|
|
114
|
+
[Annotation.Graph.Axis.LowerLimit]: zod.z.number(),
|
|
115
|
+
[Annotation.Graph.Axis.UpperLimit]: zod.z.number(),
|
|
116
|
+
[Annotation.Graph.Axis.SymmetricRange]: zod.z.boolean(),
|
|
117
|
+
[Annotation.Graph.IsDenseAxis]: zod.z.boolean(),
|
|
118
|
+
[Annotation.Graph.Palette]: zod.z.object({
|
|
119
|
+
mapping: zod.z.record(zod.z.number()),
|
|
120
|
+
name: zod.z.string()
|
|
121
|
+
}),
|
|
122
|
+
[Annotation.Graph.Thresholds]: zod.z.array(zod.z.object({
|
|
123
|
+
columnId: zod.z.object({
|
|
124
|
+
valueType: ValueTypeSchema,
|
|
125
|
+
name: zod.z.string()
|
|
126
|
+
}),
|
|
127
|
+
value: zod.z.number()
|
|
128
|
+
})),
|
|
129
|
+
[Annotation.Graph.TreatAbsentValuesAs]: zod.z.number(),
|
|
130
|
+
[Annotation.Graph.IsVirtual]: zod.z.boolean(),
|
|
131
|
+
[Annotation.HideDataFromUi]: zod.z.boolean(),
|
|
132
|
+
[Annotation.HideDataFromGraphs]: zod.z.boolean(),
|
|
133
|
+
[Annotation.IsDiscreteFilter]: zod.z.boolean(),
|
|
134
|
+
[Annotation.IsLinkerColumn]: zod.z.boolean(),
|
|
135
|
+
[Annotation.IsSubset]: zod.z.boolean(),
|
|
136
|
+
[Annotation.Max]: zod.z.number(),
|
|
137
|
+
[Annotation.Min]: zod.z.number(),
|
|
138
|
+
[Annotation.MultipliesBy]: zod.z.array(zod.z.string()),
|
|
139
|
+
[Annotation.Parents]: zod.z.array(zod.z.string()),
|
|
140
|
+
[Annotation.Sequence.Annotation.Mapping]: zod.z.record(zod.z.string(), zod.z.string()),
|
|
141
|
+
[Annotation.Sequence.IsAnnotation]: zod.z.boolean(),
|
|
142
|
+
[Annotation.Table.OrderPriority]: zod.z.number(),
|
|
143
|
+
[Annotation.Trace]: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
144
|
+
[Annotation.VDJ.IsAssemblingFeature]: zod.z.boolean()
|
|
150
145
|
};
|
|
151
|
-
/// Helper function for reading plain annotation values
|
|
152
146
|
function readAnnotation(spec, key) {
|
|
153
|
-
|
|
147
|
+
return readMetadata(spec?.annotations, key);
|
|
154
148
|
}
|
|
155
|
-
/// Helper function for reading json-encoded annotation values, throws on JSON parsing error
|
|
156
149
|
function readAnnotationJsonOrThrow(spec, key) {
|
|
157
|
-
|
|
150
|
+
return readMetadataJsonOrThrow(spec?.annotations, AnnotationJson, key, "readAnnotationJsonOrThrow");
|
|
158
151
|
}
|
|
159
|
-
/// Helper function for reading json-encoded annotation values, returns undefined on JSON parsing error
|
|
160
152
|
function readAnnotationJson(spec, key) {
|
|
161
|
-
|
|
153
|
+
return readMetadataJson(spec?.annotations, AnnotationJson, key);
|
|
162
154
|
}
|
|
163
155
|
function isLinkerColumn(column) {
|
|
164
|
-
|
|
156
|
+
return !!readAnnotationJson(column, Annotation.IsLinkerColumn);
|
|
165
157
|
}
|
|
166
158
|
function makeAxisTree(axis) {
|
|
167
|
-
|
|
159
|
+
return {
|
|
160
|
+
axis,
|
|
161
|
+
children: []
|
|
162
|
+
};
|
|
168
163
|
}
|
|
169
164
|
/** Build tree by axis parents annotations */
|
|
170
165
|
function getAxesTree(rootAxis) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
166
|
+
const root = makeAxisTree(rootAxis);
|
|
167
|
+
let nodesQ = [root];
|
|
168
|
+
while (nodesQ.length) {
|
|
169
|
+
const nextNodes = [];
|
|
170
|
+
for (const node of nodesQ) {
|
|
171
|
+
node.children = node.axis.parentAxesSpec.map(makeAxisTree);
|
|
172
|
+
nextNodes.push(...node.children);
|
|
173
|
+
}
|
|
174
|
+
nodesQ = nextNodes;
|
|
175
|
+
}
|
|
176
|
+
return root;
|
|
182
177
|
}
|
|
183
178
|
/** Get set of canonicalized axisIds from axisTree */
|
|
184
179
|
function getSetFromAxisTree(tree) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
return set;
|
|
180
|
+
const set = new Set([require_json.canonicalizeJson(getAxisId(tree.axis))]);
|
|
181
|
+
let nodesQ = [tree];
|
|
182
|
+
while (nodesQ.length) {
|
|
183
|
+
const nextNodes = [];
|
|
184
|
+
for (const node of nodesQ) for (const parent of node.children) {
|
|
185
|
+
set.add(require_json.canonicalizeJson(getAxisId(parent.axis)));
|
|
186
|
+
nextNodes.push(parent);
|
|
187
|
+
}
|
|
188
|
+
nodesQ = nextNodes;
|
|
189
|
+
}
|
|
190
|
+
return set;
|
|
198
191
|
}
|
|
199
192
|
/** Get array of axisSpecs from axisTree */
|
|
200
193
|
function getArrayFromAxisTree(tree) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
return res;
|
|
194
|
+
const res = [tree.axis];
|
|
195
|
+
let nodesQ = [tree];
|
|
196
|
+
while (nodesQ.length) {
|
|
197
|
+
const nextNodes = [];
|
|
198
|
+
for (const node of nodesQ) for (const parent of node.children) {
|
|
199
|
+
res.push(parent.axis);
|
|
200
|
+
nextNodes.push(parent);
|
|
201
|
+
}
|
|
202
|
+
nodesQ = nextNodes;
|
|
203
|
+
}
|
|
204
|
+
return res;
|
|
214
205
|
}
|
|
215
206
|
function canonicalizeAxisWithParents(axis) {
|
|
216
|
-
|
|
207
|
+
return require_json.canonicalizeJson(getArrayFromAxisTree(getAxesTree(axis)).map(getAxisId));
|
|
217
208
|
}
|
|
218
209
|
function normalizingAxesComparator(axis1, axis2) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const parents2 = canonicalizeAxisWithParents(axis2);
|
|
232
|
-
if (parents1 !== parents2) {
|
|
233
|
-
return parents1 < parents2 ? 1 : -1;
|
|
234
|
-
}
|
|
235
|
-
const annotation1 = json.canonicalizeJson(axis1.annotations ?? {});
|
|
236
|
-
const annotation2 = json.canonicalizeJson(axis2.annotations ?? {});
|
|
237
|
-
if (annotation1 !== annotation2) {
|
|
238
|
-
return annotation1 < annotation2 ? 1 : -1;
|
|
239
|
-
}
|
|
240
|
-
return 0;
|
|
210
|
+
if (axis1.name !== axis2.name) return axis1.name < axis2.name ? 1 : -1;
|
|
211
|
+
if (axis1.type !== axis2.type) return axis1.type < axis2.type ? 1 : -1;
|
|
212
|
+
const domain1 = require_json.canonicalizeJson(axis1.domain ?? {});
|
|
213
|
+
const domain2 = require_json.canonicalizeJson(axis2.domain ?? {});
|
|
214
|
+
if (domain1 !== domain2) return domain1 < domain2 ? 1 : -1;
|
|
215
|
+
const parents1 = canonicalizeAxisWithParents(axis1);
|
|
216
|
+
const parents2 = canonicalizeAxisWithParents(axis2);
|
|
217
|
+
if (parents1 !== parents2) return parents1 < parents2 ? 1 : -1;
|
|
218
|
+
const annotation1 = require_json.canonicalizeJson(axis1.annotations ?? {});
|
|
219
|
+
const annotation2 = require_json.canonicalizeJson(axis2.annotations ?? {});
|
|
220
|
+
if (annotation1 !== annotation2) return annotation1 < annotation2 ? 1 : -1;
|
|
221
|
+
return 0;
|
|
241
222
|
}
|
|
242
223
|
function parseParentsFromAnnotations(axis) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
return parentsList;
|
|
224
|
+
const parentsList = readAnnotationJson(axis, Annotation.Parents);
|
|
225
|
+
if (parentsList === void 0) return [];
|
|
226
|
+
return parentsList;
|
|
248
227
|
}
|
|
249
228
|
function sortParentsDeep(axisSpec) {
|
|
250
|
-
|
|
251
|
-
|
|
229
|
+
axisSpec.parentAxesSpec.forEach(sortParentsDeep);
|
|
230
|
+
axisSpec.parentAxesSpec.sort(normalizingAxesComparator);
|
|
252
231
|
}
|
|
253
232
|
function hasCycleOfParents(axisSpec) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
nodesQ = nextNodes;
|
|
275
|
-
}
|
|
276
|
-
return false;
|
|
233
|
+
let nodesQ = [makeAxisTree(axisSpec)];
|
|
234
|
+
const ancestors = new Set(require_json.canonicalizeJson(getAxisId(axisSpec)));
|
|
235
|
+
while (nodesQ.length) {
|
|
236
|
+
const nextNodes = [];
|
|
237
|
+
const levelIds = /* @__PURE__ */ new Set();
|
|
238
|
+
for (const node of nodesQ) {
|
|
239
|
+
node.children = node.axis.parentAxesSpec.map(makeAxisTree);
|
|
240
|
+
for (const child of node.children) {
|
|
241
|
+
const childId = require_json.canonicalizeJson(getAxisId(child.axis));
|
|
242
|
+
if (!levelIds.has(childId)) {
|
|
243
|
+
nextNodes.push(child);
|
|
244
|
+
levelIds.add(childId);
|
|
245
|
+
if (ancestors.has(childId)) return true;
|
|
246
|
+
ancestors.add(childId);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
nodesQ = nextNodes;
|
|
251
|
+
}
|
|
252
|
+
return false;
|
|
277
253
|
}
|
|
278
254
|
/** Create list of normalized axisSpec (parents are in array of specs, not indexes) */
|
|
279
255
|
function getNormalizedAxesList(axes) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
axis.parentAxesSpec = [];
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
modifiedAxes.forEach((axis) => {
|
|
310
|
-
sortParentsDeep(axis);
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
return modifiedAxes;
|
|
256
|
+
if (!axes.length) return [];
|
|
257
|
+
const modifiedAxes = axes.map((axis) => {
|
|
258
|
+
const { parentAxes: _, ...copiedRest } = axis;
|
|
259
|
+
return {
|
|
260
|
+
...copiedRest,
|
|
261
|
+
annotations: { ...copiedRest.annotations },
|
|
262
|
+
parentAxesSpec: []
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
axes.forEach((axis, idx) => {
|
|
266
|
+
const modifiedAxis = modifiedAxes[idx];
|
|
267
|
+
if (axis.parentAxes) modifiedAxis.parentAxesSpec = axis.parentAxes.map((idx) => modifiedAxes[idx]);
|
|
268
|
+
else {
|
|
269
|
+
const parents = parseParentsFromAnnotations(axis).map((name) => modifiedAxes.find((axis) => axis.name === name));
|
|
270
|
+
modifiedAxis.parentAxesSpec = parents.some((p) => p === void 0) ? [] : parents;
|
|
271
|
+
delete modifiedAxis.annotations?.[Annotation.Parents];
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
if (modifiedAxes.some(hasCycleOfParents)) modifiedAxes.forEach((axis) => {
|
|
275
|
+
axis.parentAxesSpec = [];
|
|
276
|
+
});
|
|
277
|
+
else modifiedAxes.forEach((axis) => {
|
|
278
|
+
sortParentsDeep(axis);
|
|
279
|
+
});
|
|
280
|
+
return modifiedAxes;
|
|
314
281
|
}
|
|
315
282
|
/** Create list of regular axisSpec from normalized (parents are indexes, inside of current axes list) */
|
|
316
283
|
function getDenormalizedAxesList(axesSpec) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
284
|
+
const idsList = axesSpec.map((axisSpec) => require_json.canonicalizeJson(getAxisId(axisSpec)));
|
|
285
|
+
return axesSpec.map((axisSpec) => {
|
|
286
|
+
const parentIdxs = axisSpec.parentAxesSpec.map((axisSpec) => require_json.canonicalizeJson(getAxisId(axisSpec))).map((id) => idsList.indexOf(id));
|
|
287
|
+
const { parentAxesSpec: _, ...copiedRest } = axisSpec;
|
|
288
|
+
if (parentIdxs.length) return {
|
|
289
|
+
...copiedRest,
|
|
290
|
+
parentAxes: parentIdxs
|
|
291
|
+
};
|
|
292
|
+
return copiedRest;
|
|
293
|
+
});
|
|
327
294
|
}
|
|
328
|
-
/// Well-known column names
|
|
329
295
|
const PColumnName = {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
Sequence: "pl7.app/vdj/sequence",
|
|
338
|
-
},
|
|
296
|
+
Label: "pl7.app/label",
|
|
297
|
+
Table: { RowSelection: "pl7.app/table/row-selection" },
|
|
298
|
+
VDJ: {
|
|
299
|
+
LeadSelection: "pl7.app/vdj/lead-selection",
|
|
300
|
+
RankingOrder: "pl7.app/vdj/ranking-order",
|
|
301
|
+
Sequence: "pl7.app/vdj/sequence"
|
|
302
|
+
}
|
|
339
303
|
};
|
|
340
|
-
/// Well-known axis names
|
|
341
304
|
const PAxisName = {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
ScClonotypeKey: "pl7.app/vdj/scClonotypeKey",
|
|
350
|
-
},
|
|
305
|
+
SampleId: "pl7.app/sampleId",
|
|
306
|
+
VDJ: {
|
|
307
|
+
Assay: { SequenceId: "pl7.app/vdj/assay/sequenceId" },
|
|
308
|
+
ClusterId: "pl7.app/vdj/clusterId",
|
|
309
|
+
ClonotypeKey: "pl7.app/vdj/clonotypeKey",
|
|
310
|
+
ScClonotypeKey: "pl7.app/vdj/scClonotypeKey"
|
|
311
|
+
}
|
|
351
312
|
};
|
|
352
313
|
function isLabelColumn(column) {
|
|
353
|
-
|
|
314
|
+
return column.axesSpec.length === 1 && column.name === PColumnName.Label;
|
|
354
315
|
}
|
|
355
316
|
function getPColumnSpecId(spec) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
317
|
+
return {
|
|
318
|
+
kind: spec.kind,
|
|
319
|
+
valueType: spec.valueType,
|
|
320
|
+
name: spec.name,
|
|
321
|
+
domain: spec.domain,
|
|
322
|
+
parentAxes: spec.parentAxes,
|
|
323
|
+
axesId: getAxesId(spec.axesSpec)
|
|
324
|
+
};
|
|
364
325
|
}
|
|
365
326
|
/** Get column id and spec from a column */
|
|
366
327
|
function getColumnIdAndSpec(column) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
328
|
+
return {
|
|
329
|
+
columnId: column.id,
|
|
330
|
+
spec: column.spec
|
|
331
|
+
};
|
|
371
332
|
}
|
|
372
333
|
/** Extracts axis ids from axis spec */
|
|
373
334
|
function getAxisId(spec) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
335
|
+
const { type, name, domain } = spec;
|
|
336
|
+
const result = {
|
|
337
|
+
type,
|
|
338
|
+
name
|
|
339
|
+
};
|
|
340
|
+
if (domain && Object.entries(domain).length > 0) Object.assign(result, { domain });
|
|
341
|
+
return result;
|
|
380
342
|
}
|
|
381
343
|
/** Extracts axes ids from axes spec array from column spec */
|
|
382
344
|
function getAxesId(spec) {
|
|
383
|
-
|
|
345
|
+
return spec.map(getAxisId);
|
|
384
346
|
}
|
|
385
347
|
/** Canonicalizes axis id */
|
|
386
348
|
function canonicalizeAxisId(id) {
|
|
387
|
-
|
|
349
|
+
return require_json.canonicalizeJson(getAxisId(id));
|
|
388
350
|
}
|
|
389
351
|
/** Returns true if all domains from query are found in target */
|
|
390
352
|
function matchDomain(query, target) {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
for (const k in target) {
|
|
396
|
-
if (query[k] !== target[k])
|
|
397
|
-
return false;
|
|
398
|
-
}
|
|
399
|
-
return true;
|
|
353
|
+
if (query === void 0) return target === void 0;
|
|
354
|
+
if (target === void 0) return true;
|
|
355
|
+
for (const k in target) if (query[k] !== target[k]) return false;
|
|
356
|
+
return true;
|
|
400
357
|
}
|
|
401
358
|
/** Returns whether "match" axis id is compatible with the "query" */
|
|
402
359
|
function matchAxisId(query, target) {
|
|
403
|
-
|
|
360
|
+
return query.name === target.name && matchDomain(query.domain, target.domain);
|
|
404
361
|
}
|
|
405
362
|
function getTypeFromPColumnOrAxisSpec(spec) {
|
|
406
|
-
|
|
363
|
+
return "valueType" in spec ? spec.valueType : spec.type;
|
|
407
364
|
}
|
|
408
365
|
function isAxisId(id) {
|
|
409
|
-
|
|
366
|
+
return typeof id === "object" && id !== null && "name" in id && "type" in id;
|
|
410
367
|
}
|
|
411
368
|
|
|
369
|
+
//#endregion
|
|
412
370
|
exports.Annotation = Annotation;
|
|
413
371
|
exports.AnnotationJson = AnnotationJson;
|
|
414
372
|
exports.Domain = Domain;
|
|
@@ -441,4 +399,4 @@ exports.readDomainJsonOrThrow = readDomainJsonOrThrow;
|
|
|
441
399
|
exports.readMetadata = readMetadata;
|
|
442
400
|
exports.readMetadataJson = readMetadataJson;
|
|
443
401
|
exports.readMetadataJsonOrThrow = readMetadataJsonOrThrow;
|
|
444
|
-
//# sourceMappingURL=spec.cjs.map
|
|
402
|
+
//# sourceMappingURL=spec.cjs.map
|