@platforma-sdk/model 1.58.3 → 1.58.9
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 +43 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/annotations/converter.cjs +15 -20
- package/dist/annotations/converter.cjs.map +1 -1
- package/dist/annotations/converter.d.ts +6 -2
- package/dist/annotations/converter.js +14 -18
- package/dist/annotations/converter.js.map +1 -1
- package/dist/annotations/index.cjs +1 -0
- package/dist/annotations/index.d.ts +2 -3
- package/dist/annotations/index.js +1 -0
- package/dist/annotations/types.d.ts +21 -16
- package/dist/bconfig/index.cjs +2 -0
- package/dist/bconfig/index.d.ts +5 -6
- package/dist/bconfig/index.js +2 -0
- package/dist/bconfig/lambdas.d.ts +52 -52
- package/dist/bconfig/normalization.cjs +13 -18
- package/dist/bconfig/normalization.cjs.map +1 -1
- package/dist/bconfig/normalization.d.ts +10 -6
- package/dist/bconfig/normalization.js +12 -16
- package/dist/bconfig/normalization.js.map +1 -1
- package/dist/bconfig/types.cjs +4 -3
- package/dist/bconfig/types.cjs.map +1 -1
- package/dist/bconfig/types.d.ts +10 -5
- package/dist/bconfig/types.js +4 -2
- package/dist/bconfig/types.js.map +1 -1
- package/dist/bconfig/util.d.ts +7 -4
- package/dist/bconfig/v3.d.ts +10 -6
- package/dist/block_api_v1.d.ts +62 -58
- package/dist/block_api_v2.d.ts +51 -47
- package/dist/block_api_v3.d.ts +33 -29
- package/dist/block_migrations.cjs +481 -413
- package/dist/block_migrations.cjs.map +1 -1
- package/dist/block_migrations.d.ts +258 -204
- package/dist/block_migrations.js +482 -408
- package/dist/block_migrations.js.map +1 -1
- package/dist/block_model.cjs +312 -343
- package/dist/block_model.cjs.map +1 -1
- package/dist/block_model.d.ts +143 -147
- package/dist/block_model.js +312 -341
- package/dist/block_model.js.map +1 -1
- package/dist/block_model_legacy.cjs +231 -255
- package/dist/block_model_legacy.cjs.map +1 -1
- package/dist/block_model_legacy.d.ts +108 -106
- package/dist/block_model_legacy.js +231 -253
- package/dist/block_model_legacy.js.map +1 -1
- package/dist/block_state_patch.d.ts +10 -10
- package/dist/block_state_util.cjs +15 -19
- package/dist/block_state_util.cjs.map +1 -1
- package/dist/block_state_util.d.ts +14 -13
- package/dist/block_state_util.js +15 -18
- package/dist/block_state_util.js.map +1 -1
- package/dist/block_storage.cjs +233 -238
- package/dist/block_storage.cjs.map +1 -1
- package/dist/block_storage.d.ts +62 -78
- package/dist/block_storage.js +234 -237
- package/dist/block_storage.js.map +1 -1
- package/dist/block_storage_callbacks.cjs +156 -195
- package/dist/block_storage_callbacks.cjs.map +1 -1
- package/dist/block_storage_callbacks.js +156 -192
- package/dist/block_storage_callbacks.js.map +1 -1
- package/dist/block_storage_facade.cjs +29 -85
- package/dist/block_storage_facade.cjs.map +1 -1
- package/dist/block_storage_facade.d.ts +83 -126
- package/dist/block_storage_facade.js +29 -83
- package/dist/block_storage_facade.js.map +1 -1
- package/dist/components/PFrameForGraphs.cjs +26 -24
- package/dist/components/PFrameForGraphs.cjs.map +1 -1
- package/dist/components/PFrameForGraphs.d.ts +12 -7
- package/dist/components/PFrameForGraphs.js +25 -22
- package/dist/components/PFrameForGraphs.js.map +1 -1
- package/dist/components/PlAnnotations/filter.d.ts +62 -79
- package/dist/components/PlAnnotations/filters_ui.cjs +135 -171
- package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts +48 -46
- package/dist/components/PlAnnotations/filters_ui.js +135 -170
- package/dist/components/PlAnnotations/filters_ui.js.map +1 -1
- package/dist/components/PlAnnotations/index.d.ts +2 -3
- package/dist/components/PlDataTable/index.cjs +2 -0
- package/dist/components/PlDataTable/index.d.ts +3 -5
- package/dist/components/PlDataTable/index.js +2 -0
- package/dist/components/PlDataTable/labels.cjs +59 -81
- package/dist/components/PlDataTable/labels.cjs.map +1 -1
- package/dist/components/PlDataTable/labels.js +58 -79
- package/dist/components/PlDataTable/labels.js.map +1 -1
- package/dist/components/PlDataTable/state-migration.cjs +186 -144
- package/dist/components/PlDataTable/state-migration.cjs.map +1 -1
- package/dist/components/PlDataTable/state-migration.d.ts +85 -82
- package/dist/components/PlDataTable/state-migration.js +185 -142
- package/dist/components/PlDataTable/state-migration.js.map +1 -1
- package/dist/components/PlDataTable/table.cjs +172 -194
- package/dist/components/PlDataTable/table.cjs.map +1 -1
- package/dist/components/PlDataTable/table.d.ts +16 -12
- package/dist/components/PlDataTable/table.js +171 -192
- package/dist/components/PlDataTable/table.js.map +1 -1
- package/dist/components/PlDataTable/v4.d.ts +84 -119
- package/dist/components/PlDataTable/v5.d.ts +80 -103
- package/dist/components/PlMultiSequenceAlignment.cjs +27 -29
- package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +36 -27
- package/dist/components/PlMultiSequenceAlignment.js +26 -27
- package/dist/components/PlMultiSequenceAlignment.js.map +1 -1
- package/dist/components/PlSelectionModel.cjs +7 -6
- package/dist/components/PlSelectionModel.cjs.map +1 -1
- package/dist/components/PlSelectionModel.d.ts +10 -8
- package/dist/components/PlSelectionModel.js +7 -5
- package/dist/components/PlSelectionModel.js.map +1 -1
- package/dist/components/index.cjs +8 -0
- package/dist/components/index.d.ts +11 -6
- package/dist/components/index.js +8 -0
- package/dist/config/actions.cjs +138 -171
- package/dist/config/actions.cjs.map +1 -1
- package/dist/config/actions.d.ts +47 -47
- package/dist/config/actions.js +146 -178
- package/dist/config/actions.js.map +1 -1
- package/dist/config/actions_kinds.d.ts +114 -121
- package/dist/config/index.cjs +1 -0
- package/dist/config/index.d.ts +6 -7
- package/dist/config/index.js +1 -0
- package/dist/config/model.d.ts +131 -127
- package/dist/config/model_meta.d.ts +4 -1
- package/dist/config/type_engine.d.ts +22 -21
- package/dist/config/type_util.d.ts +12 -10
- package/dist/env_value.cjs +5 -6
- package/dist/env_value.cjs.map +1 -1
- package/dist/env_value.d.ts +4 -1
- package/dist/env_value.js +5 -5
- package/dist/env_value.js.map +1 -1
- package/dist/filters/converters/filterToQuery.cjs +273 -239
- package/dist/filters/converters/filterToQuery.cjs.map +1 -1
- package/dist/filters/converters/filterToQuery.d.ts +6 -2
- package/dist/filters/converters/filterToQuery.js +272 -237
- package/dist/filters/converters/filterToQuery.js.map +1 -1
- package/dist/filters/converters/filterUiToExpressionImpl.cjs +56 -85
- package/dist/filters/converters/filterUiToExpressionImpl.cjs.map +1 -1
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts +8 -4
- package/dist/filters/converters/filterUiToExpressionImpl.js +55 -83
- package/dist/filters/converters/filterUiToExpressionImpl.js.map +1 -1
- package/dist/filters/converters/index.cjs +2 -0
- package/dist/filters/converters/index.d.ts +2 -3
- package/dist/filters/converters/index.js +2 -0
- package/dist/filters/distill.cjs +59 -50
- package/dist/filters/distill.cjs.map +1 -1
- package/dist/filters/distill.d.ts +6 -3
- package/dist/filters/distill.js +58 -48
- package/dist/filters/distill.js.map +1 -1
- package/dist/filters/index.cjs +4 -0
- package/dist/filters/index.d.ts +5 -4
- package/dist/filters/index.js +4 -0
- package/dist/filters/traverse.cjs +31 -40
- package/dist/filters/traverse.cjs.map +1 -1
- package/dist/filters/traverse.js +31 -39
- package/dist/filters/traverse.js.map +1 -1
- package/dist/filters/types.d.ts +10 -7
- package/dist/index.cjs +193 -187
- package/dist/index.d.ts +61 -28
- package/dist/index.js +49 -41
- package/dist/internal.cjs +48 -62
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +49 -60
- package/dist/internal.js.map +1 -1
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/dist/pframe.cjs +32 -37
- package/dist/pframe.cjs.map +1 -1
- package/dist/pframe.d.ts +14 -10
- package/dist/pframe.js +32 -35
- package/dist/pframe.js.map +1 -1
- package/dist/pframe_utils/axes.cjs +81 -114
- package/dist/pframe_utils/axes.cjs.map +1 -1
- package/dist/pframe_utils/axes.d.ts +10 -13
- package/dist/pframe_utils/axes.js +80 -112
- package/dist/pframe_utils/axes.js.map +1 -1
- package/dist/pframe_utils/columns.cjs +61 -81
- package/dist/pframe_utils/columns.cjs.map +1 -1
- package/dist/pframe_utils/columns.d.ts +15 -6
- package/dist/pframe_utils/columns.js +60 -79
- package/dist/pframe_utils/columns.js.map +1 -1
- package/dist/pframe_utils/index.cjs +232 -253
- package/dist/pframe_utils/index.cjs.map +1 -1
- package/dist/pframe_utils/index.d.ts +39 -35
- package/dist/pframe_utils/index.js +231 -251
- package/dist/pframe_utils/index.js.map +1 -1
- package/dist/platforma.d.ts +48 -46
- package/dist/plugin_handle.cjs +6 -14
- package/dist/plugin_handle.cjs.map +1 -1
- package/dist/plugin_handle.d.ts +20 -25
- package/dist/plugin_handle.js +6 -13
- package/dist/plugin_handle.js.map +1 -1
- package/dist/plugin_model.cjs +364 -163
- package/dist/plugin_model.cjs.map +1 -1
- package/dist/plugin_model.d.ts +280 -129
- package/dist/plugin_model.js +362 -163
- package/dist/plugin_model.js.map +1 -1
- package/dist/raw_globals.cjs +10 -22
- package/dist/raw_globals.cjs.map +1 -1
- package/dist/raw_globals.d.ts +8 -5
- package/dist/raw_globals.js +10 -20
- package/dist/raw_globals.js.map +1 -1
- package/dist/ref_util.cjs +14 -13
- package/dist/ref_util.cjs.map +1 -1
- package/dist/ref_util.d.ts +18 -12
- package/dist/ref_util.js +14 -11
- package/dist/ref_util.js.map +1 -1
- package/dist/render/accessor.cjs +213 -226
- package/dist/render/accessor.cjs.map +1 -1
- package/dist/render/accessor.d.ts +115 -120
- package/dist/render/accessor.js +212 -224
- package/dist/render/accessor.js.map +1 -1
- package/dist/render/api.cjs +478 -580
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +207 -209
- package/dist/render/api.js +476 -578
- package/dist/render/api.js.map +1 -1
- package/dist/render/future.cjs +28 -32
- package/dist/render/future.cjs.map +1 -1
- package/dist/render/future.d.ts +15 -11
- package/dist/render/future.js +28 -30
- package/dist/render/future.js.map +1 -1
- package/dist/render/index.cjs +8 -0
- package/dist/render/index.d.ts +10 -8
- package/dist/render/index.js +8 -0
- package/dist/render/internal.cjs +33 -29
- package/dist/render/internal.cjs.map +1 -1
- package/dist/render/internal.d.ts +78 -72
- package/dist/render/internal.js +29 -26
- package/dist/render/internal.js.map +1 -1
- package/dist/render/traversal_ops.d.ts +42 -43
- package/dist/render/util/axis_filtering.cjs +63 -86
- package/dist/render/util/axis_filtering.cjs.map +1 -1
- package/dist/render/util/axis_filtering.d.ts +10 -7
- package/dist/render/util/axis_filtering.js +63 -85
- package/dist/render/util/axis_filtering.js.map +1 -1
- package/dist/render/util/column_collection.cjs +266 -321
- package/dist/render/util/column_collection.cjs.map +1 -1
- package/dist/render/util/column_collection.d.ts +47 -47
- package/dist/render/util/column_collection.js +264 -319
- package/dist/render/util/column_collection.js.map +1 -1
- package/dist/render/util/index.cjs +4 -0
- package/dist/render/util/index.d.ts +4 -5
- package/dist/render/util/index.js +4 -0
- package/dist/render/util/label.cjs +129 -163
- package/dist/render/util/label.cjs.map +1 -1
- package/dist/render/util/label.d.ts +45 -46
- package/dist/render/util/label.js +128 -161
- package/dist/render/util/label.js.map +1 -1
- package/dist/render/util/pcolumn_data.cjs +315 -375
- package/dist/render/util/pcolumn_data.cjs.map +1 -1
- package/dist/render/util/pcolumn_data.d.ts +33 -32
- package/dist/render/util/pcolumn_data.js +314 -373
- package/dist/render/util/pcolumn_data.js.map +1 -1
- package/dist/render/util/pframe_upgraders.cjs +37 -42
- package/dist/render/util/pframe_upgraders.cjs.map +1 -1
- package/dist/render/util/pframe_upgraders.js +37 -41
- package/dist/render/util/pframe_upgraders.js.map +1 -1
- package/dist/render/util/split_selectors.d.ts +13 -9
- package/dist/version.cjs +6 -8
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.ts +7 -4
- package/dist/version.js +5 -5
- package/dist/version.js.map +1 -1
- package/package.json +9 -3
- package/src/block_migrations.test.ts +184 -14
- package/src/block_migrations.ts +185 -30
- package/src/block_model.ts +111 -66
- package/src/block_storage.test.ts +147 -3
- package/src/block_storage.ts +43 -8
- package/src/block_storage_callbacks.ts +9 -4
- package/src/env_value.ts +0 -2
- package/src/filters/distill.ts +17 -6
- package/src/index.ts +12 -11
- package/src/internal.ts +0 -1
- package/src/platforma.ts +4 -4
- package/src/plugin_handle.ts +1 -1
- package/src/plugin_model.test.ts +217 -21
- package/src/plugin_model.ts +450 -55
- package/src/raw_globals.ts +0 -1
- package/dist/annotations/converter.d.ts.map +0 -1
- package/dist/annotations/index.d.ts.map +0 -1
- package/dist/annotations/types.d.ts.map +0 -1
- package/dist/bconfig/index.d.ts.map +0 -1
- package/dist/bconfig/lambdas.d.ts.map +0 -1
- package/dist/bconfig/normalization.d.ts.map +0 -1
- package/dist/bconfig/types.d.ts.map +0 -1
- package/dist/bconfig/util.d.ts.map +0 -1
- package/dist/bconfig/v3.d.ts.map +0 -1
- package/dist/block_api_v1.d.ts.map +0 -1
- package/dist/block_api_v2.d.ts.map +0 -1
- package/dist/block_api_v3.d.ts.map +0 -1
- package/dist/block_migrations.d.ts.map +0 -1
- package/dist/block_model.d.ts.map +0 -1
- package/dist/block_model_legacy.d.ts.map +0 -1
- package/dist/block_state_patch.d.ts.map +0 -1
- package/dist/block_state_util.d.ts.map +0 -1
- package/dist/block_storage.d.ts.map +0 -1
- package/dist/block_storage_callbacks.d.ts +0 -115
- package/dist/block_storage_callbacks.d.ts.map +0 -1
- package/dist/block_storage_facade.d.ts.map +0 -1
- package/dist/components/PFrameForGraphs.d.ts.map +0 -1
- package/dist/components/PlAnnotations/filter.d.ts.map +0 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts.map +0 -1
- package/dist/components/PlAnnotations/index.d.ts.map +0 -1
- package/dist/components/PlAnnotations/types.d.ts +0 -3
- package/dist/components/PlAnnotations/types.d.ts.map +0 -1
- package/dist/components/PlDataTable/index.d.ts.map +0 -1
- package/dist/components/PlDataTable/labels.d.ts +0 -7
- package/dist/components/PlDataTable/labels.d.ts.map +0 -1
- package/dist/components/PlDataTable/state-migration.d.ts.map +0 -1
- package/dist/components/PlDataTable/table.d.ts.map +0 -1
- package/dist/components/PlDataTable/v4.d.ts.map +0 -1
- package/dist/components/PlDataTable/v5.d.ts.map +0 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +0 -1
- package/dist/components/PlSelectionModel.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/config/actions.d.ts.map +0 -1
- package/dist/config/actions_kinds.d.ts.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/model.d.ts.map +0 -1
- package/dist/config/model_meta.d.ts.map +0 -1
- package/dist/config/type_engine.d.ts.map +0 -1
- package/dist/config/type_util.d.ts.map +0 -1
- package/dist/env_value.d.ts.map +0 -1
- package/dist/filters/converters/filterToQuery.d.ts.map +0 -1
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts.map +0 -1
- package/dist/filters/converters/index.d.ts.map +0 -1
- package/dist/filters/distill.d.ts.map +0 -1
- package/dist/filters/index.d.ts.map +0 -1
- package/dist/filters/traverse.d.ts +0 -27
- package/dist/filters/traverse.d.ts.map +0 -1
- package/dist/filters/types.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/internal.d.ts +0 -36
- package/dist/internal.d.ts.map +0 -1
- package/dist/package.json.cjs +0 -6
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -4
- package/dist/package.json.js.map +0 -1
- package/dist/pframe.d.ts.map +0 -1
- package/dist/pframe_utils/axes.d.ts.map +0 -1
- package/dist/pframe_utils/columns.d.ts.map +0 -1
- package/dist/pframe_utils/index.d.ts.map +0 -1
- package/dist/pframe_utils/querySpec.d.ts +0 -2
- package/dist/pframe_utils/querySpec.d.ts.map +0 -1
- package/dist/platforma.d.ts.map +0 -1
- package/dist/plugin_handle.d.ts.map +0 -1
- package/dist/plugin_model.d.ts.map +0 -1
- package/dist/raw_globals.d.ts.map +0 -1
- package/dist/ref_util.d.ts.map +0 -1
- package/dist/render/accessor.d.ts.map +0 -1
- package/dist/render/api.d.ts.map +0 -1
- package/dist/render/future.d.ts.map +0 -1
- package/dist/render/index.d.ts.map +0 -1
- package/dist/render/internal.d.ts.map +0 -1
- package/dist/render/traversal_ops.d.ts.map +0 -1
- package/dist/render/util/axis_filtering.d.ts.map +0 -1
- package/dist/render/util/column_collection.d.ts.map +0 -1
- package/dist/render/util/index.d.ts.map +0 -1
- package/dist/render/util/label.d.ts.map +0 -1
- package/dist/render/util/pcolumn_data.d.ts.map +0 -1
- package/dist/render/util/pframe_upgraders.d.ts +0 -3
- package/dist/render/util/pframe_upgraders.d.ts.map +0 -1
- package/dist/render/util/split_selectors.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SUniversalPColumnId } from "@milaboratories/pl-model-common";
|
|
2
|
+
|
|
3
|
+
//#region src/components/PlAnnotations/filter.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Represents an equals predicate for pattern filtering.
|
|
4
6
|
* Checks if the pattern exactly matches the provided value.
|
|
5
7
|
* Can handle both string literals and biological sequences with wildcards.
|
|
6
8
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
value: string;
|
|
9
|
+
type PatternPredicateEquals = {
|
|
10
|
+
type: "equals"; /** The exact pattern value to match */
|
|
11
|
+
value: string;
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* Represents a subsequence containment predicate for pattern filtering.
|
|
14
15
|
* Checks if the pattern contains the provided subsequence.
|
|
15
16
|
* Can handle both string literals and biological sequences with wildcards.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
value: string;
|
|
18
|
+
type PatternPredicateContainSubsequence = {
|
|
19
|
+
type: "containSubsequence"; /** The subpattern to search for within the target pattern */
|
|
20
|
+
value: string;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
23
|
* Union type for pattern predicates that can be applied to both sequence and string data.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
type PatternPredicate = PatternPredicateEquals | PatternPredicateContainSubsequence;
|
|
26
26
|
/**
|
|
27
27
|
* Filter for pattern data, specifying the column to filter and the predicate to apply.
|
|
28
28
|
* Works with both biological sequences (with wildcards) and regular strings.
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/** The predicate defining the filtering logic */
|
|
35
|
-
predicate: PatternPredicate;
|
|
30
|
+
type PatternFilter = {
|
|
31
|
+
type: "pattern"; /** The column identifier to apply the filter to */
|
|
32
|
+
column: SUniversalPColumnId; /** The predicate defining the filtering logic */
|
|
33
|
+
predicate: PatternPredicate;
|
|
36
34
|
};
|
|
37
35
|
/**
|
|
38
36
|
* Transforms a column's values into their rank positions.
|
|
@@ -45,12 +43,10 @@ export type PatternFilter = {
|
|
|
45
43
|
*
|
|
46
44
|
* The ranked values can be used in numerical comparison filters.
|
|
47
45
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/** If true, sorts highest values first (highest value gets rank 1) */
|
|
53
|
-
descending?: true;
|
|
46
|
+
type ValueRank = {
|
|
47
|
+
transformer: "rank"; /** The column identifier to apply the ranking to */
|
|
48
|
+
column: SUniversalPColumnId; /** If true, sorts highest values first (highest value gets rank 1) */
|
|
49
|
+
descending?: true;
|
|
54
50
|
};
|
|
55
51
|
/**
|
|
56
52
|
* Transforms a column's values into a running total after sorting.
|
|
@@ -62,12 +58,10 @@ export type ValueRank = {
|
|
|
62
58
|
*
|
|
63
59
|
* The cumulative values can be used in numerical comparison filters.
|
|
64
60
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/** If true, sorts values in descending order before calculating the cumulative sum */
|
|
70
|
-
descending?: true;
|
|
61
|
+
type SortedCumulativeSum = {
|
|
62
|
+
transformer: "sortedCumulativeSum"; /** The column identifier to apply the cumulative sum to */
|
|
63
|
+
column: SUniversalPColumnId; /** If true, sorts values in descending order before calculating the cumulative sum */
|
|
64
|
+
descending?: true;
|
|
71
65
|
};
|
|
72
66
|
/**
|
|
73
67
|
* Transforms a column's values by applying the log10 function.
|
|
@@ -78,10 +72,9 @@ export type SortedCumulativeSum = {
|
|
|
78
72
|
* The log10-transformed values can be used in numerical comparison filters.
|
|
79
73
|
* Note: The behavior for non-positive input values (<= 0) results in -Infinity.
|
|
80
74
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
column: SUniversalPColumnId;
|
|
75
|
+
type Log10 = {
|
|
76
|
+
transformer: "log10"; /** The column identifier to apply the log10 transformation to */
|
|
77
|
+
column: SUniversalPColumnId;
|
|
85
78
|
};
|
|
86
79
|
/**
|
|
87
80
|
* Represents a column whose values have been transformed by either ranking or
|
|
@@ -89,7 +82,7 @@ export type Log10 = {
|
|
|
89
82
|
* operations such as "top N" or "first X%" queries.
|
|
90
83
|
* Any NA values are propagated to the transformed column, and ignored in ranks and cumulative sums.
|
|
91
84
|
*/
|
|
92
|
-
|
|
85
|
+
type TransformedColumn = ValueRank | SortedCumulativeSum | Log10;
|
|
93
86
|
/**
|
|
94
87
|
* Defines a numerical comparison between two values that can be column references or constants.
|
|
95
88
|
*
|
|
@@ -107,72 +100,65 @@ export type TransformedColumn = ValueRank | SortedCumulativeSum | Log10;
|
|
|
107
100
|
* - The minDiff parameter can only be used when both sides are columns or transformed columns
|
|
108
101
|
* - Use allowEqual=true to include equality in the comparison (<=)
|
|
109
102
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/** The minimum difference between lhs and rhs values */
|
|
117
|
-
minDiff?: number;
|
|
118
|
-
/** Whether equality is permitted in the comparison */
|
|
119
|
-
allowEqual?: true;
|
|
103
|
+
type NumericalComparisonFilter = {
|
|
104
|
+
type: "numericalComparison"; /** The first column to compare (left side of comparison) */
|
|
105
|
+
lhs: SUniversalPColumnId | TransformedColumn | number; /** The second column to compare (right side of comparison) */
|
|
106
|
+
rhs: SUniversalPColumnId | TransformedColumn | number; /** The minimum difference between lhs and rhs values */
|
|
107
|
+
minDiff?: number; /** Whether equality is permitted in the comparison */
|
|
108
|
+
allowEqual?: true;
|
|
120
109
|
};
|
|
121
110
|
/**
|
|
122
111
|
* Represents a filter that checks if a column's values are NA (not available).
|
|
123
112
|
* This filter is useful for filtering out records where a specific column has no value / clonotype is not present.
|
|
124
113
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
column: SUniversalPColumnId;
|
|
114
|
+
type IsNA = {
|
|
115
|
+
type: "isNA"; /** The column identifier to check for NA values */
|
|
116
|
+
column: SUniversalPColumnId;
|
|
129
117
|
};
|
|
130
118
|
/**
|
|
131
119
|
* Represents a logical OR operation between multiple filters.
|
|
132
120
|
* A record matches if at least one of the contained filters matches.
|
|
133
121
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
122
|
+
interface OrFilter {
|
|
123
|
+
type: "or";
|
|
124
|
+
/** Array of filters to combine with OR logic */
|
|
125
|
+
filters: AnnotationFilter[];
|
|
138
126
|
}
|
|
139
127
|
/**
|
|
140
128
|
* Represents a logical AND operation between multiple filters.
|
|
141
129
|
* A record matches only if all of the contained filters match.
|
|
142
130
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
131
|
+
interface AndFilter {
|
|
132
|
+
type: "and";
|
|
133
|
+
/** Array of filters to combine with AND logic */
|
|
134
|
+
filters: AnnotationFilter[];
|
|
147
135
|
}
|
|
148
136
|
/**
|
|
149
137
|
* Represents a logical NOT operation on a filter.
|
|
150
138
|
* A record matches if it does not match the contained filter.
|
|
151
139
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
interface NotFilter {
|
|
141
|
+
type: "not";
|
|
142
|
+
/** The filter to negate */
|
|
143
|
+
filter: AnnotationFilter;
|
|
156
144
|
}
|
|
157
145
|
/**
|
|
158
146
|
* Union type for all supported annotation filters.
|
|
159
147
|
*/
|
|
160
|
-
|
|
148
|
+
type AnnotationFilter = IsNA | PatternFilter | NumericalComparisonFilter | OrFilter | AndFilter | NotFilter;
|
|
161
149
|
/**
|
|
162
150
|
* Represents a single step in the annotation process.
|
|
163
151
|
* Each step consists of a filter to select records and a label to assign to those records.
|
|
164
152
|
*/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/** The label to assign to records that match the filter */
|
|
169
|
-
label: string;
|
|
153
|
+
type AnnotationStep = {
|
|
154
|
+
/** The filter to apply for selecting records */filter: AnnotationFilter; /** The label to assign to records that match the filter */
|
|
155
|
+
label: string;
|
|
170
156
|
};
|
|
171
157
|
/**
|
|
172
158
|
* Specifies which entity to annotate: either entire clonotypes or clonotypes within specific samples.
|
|
173
159
|
* This choice affects how filtering and labeling will be applied across your dataset.
|
|
174
160
|
*/
|
|
175
|
-
|
|
161
|
+
type AnnotationMode =
|
|
176
162
|
/**
|
|
177
163
|
* Annotates entire clonotypes globally, regardless of which samples they appear in.
|
|
178
164
|
* A clonotype will either be fully included or excluded across all samples.
|
|
@@ -189,25 +175,22 @@ export type AnnotationMode =
|
|
|
189
175
|
* The resulting column will have the following shape:
|
|
190
176
|
* [sample_id, clonotype_key] -> label
|
|
191
177
|
*/
|
|
192
|
-
|
|
178
|
+
| "bySampleAndClonotype";
|
|
193
179
|
/**
|
|
194
180
|
* Represents a complete annotation configuration.
|
|
195
181
|
* Contains a series of annotation steps that are applied in sequence.
|
|
196
182
|
* Annotations are applied from lower indices to higher indices (earlier steps are processed first),
|
|
197
183
|
* with later steps taking precedence when multiple steps match the same record.
|
|
198
184
|
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
mode: AnnotationMode;
|
|
204
|
-
/** Ordered list of annotation steps to apply */
|
|
205
|
-
steps: AnnotationStep[];
|
|
185
|
+
type AnnotationScript = {
|
|
186
|
+
/** The title of the annotation */title: string; /** The mode of annotation to apply */
|
|
187
|
+
mode: AnnotationMode; /** Ordered list of annotation steps to apply */
|
|
188
|
+
steps: AnnotationStep[];
|
|
206
189
|
};
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/** Ordered list of annotation steps to apply */
|
|
211
|
-
steps: S[];
|
|
190
|
+
type AnnotationScript2<S extends AnnotationStep> = {
|
|
191
|
+
/** The mode of annotation to apply */mode: AnnotationMode; /** Ordered list of annotation steps to apply */
|
|
192
|
+
steps: S[];
|
|
212
193
|
};
|
|
194
|
+
//#endregion
|
|
195
|
+
export { AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationStep, IsNA, Log10, NotFilter, NumericalComparisonFilter, OrFilter, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, SortedCumulativeSum, TransformedColumn, ValueRank };
|
|
213
196
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1,185 +1,149 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
//#region src/components/PlAnnotations/filters_ui.ts
|
|
4
3
|
function unreachable(x) {
|
|
5
|
-
|
|
6
|
-
throw new Error("Unexpected object: " + x);
|
|
4
|
+
throw new Error("Unexpected object: " + x);
|
|
7
5
|
}
|
|
8
6
|
function compileFilter(ui) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
type: "numericalComparison",
|
|
128
|
-
lhs: ui.column,
|
|
129
|
-
rhs: ui.x,
|
|
130
|
-
allowEqual: true,
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
if (ui.type === "lessThanColumn") {
|
|
134
|
-
return {
|
|
135
|
-
type: "numericalComparison",
|
|
136
|
-
lhs: ui.column,
|
|
137
|
-
rhs: ui.rhs,
|
|
138
|
-
minDiff: ui.minDiff,
|
|
139
|
-
allowEqual: undefined,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
if (ui.type === "lessThanColumnOrEqual") {
|
|
143
|
-
return {
|
|
144
|
-
type: "numericalComparison",
|
|
145
|
-
lhs: ui.column,
|
|
146
|
-
rhs: ui.rhs,
|
|
147
|
-
minDiff: ui.minDiff,
|
|
148
|
-
allowEqual: true,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
unreachable(ui);
|
|
7
|
+
if (ui.type === "or") return {
|
|
8
|
+
type: "or",
|
|
9
|
+
filters: compileFilters(ui.filters)
|
|
10
|
+
};
|
|
11
|
+
if (ui.type === "and") return {
|
|
12
|
+
type: "and",
|
|
13
|
+
filters: compileFilters(ui.filters)
|
|
14
|
+
};
|
|
15
|
+
if (ui.type === "not") return {
|
|
16
|
+
type: "not",
|
|
17
|
+
filter: compileFilter(ui.filter)
|
|
18
|
+
};
|
|
19
|
+
if (ui.type === "isNA") return {
|
|
20
|
+
type: "isNA",
|
|
21
|
+
column: ui.column
|
|
22
|
+
};
|
|
23
|
+
if (ui.type === "isNotNA") return {
|
|
24
|
+
type: "not",
|
|
25
|
+
filter: {
|
|
26
|
+
type: "isNA",
|
|
27
|
+
column: ui.column
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
if (ui.type === "patternEquals") return {
|
|
31
|
+
type: "pattern",
|
|
32
|
+
column: ui.column,
|
|
33
|
+
predicate: {
|
|
34
|
+
type: "equals",
|
|
35
|
+
value: ui.value
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
if (ui.type === "patternNotEquals") return {
|
|
39
|
+
type: "not",
|
|
40
|
+
filter: {
|
|
41
|
+
type: "pattern",
|
|
42
|
+
column: ui.column,
|
|
43
|
+
predicate: {
|
|
44
|
+
type: "equals",
|
|
45
|
+
value: ui.value
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
if (ui.type === "patternContainSubsequence") return {
|
|
50
|
+
type: "pattern",
|
|
51
|
+
column: ui.column,
|
|
52
|
+
predicate: {
|
|
53
|
+
type: "containSubsequence",
|
|
54
|
+
value: ui.value
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
if (ui.type === "patternNotContainSubsequence") return {
|
|
58
|
+
type: "not",
|
|
59
|
+
filter: {
|
|
60
|
+
type: "pattern",
|
|
61
|
+
column: ui.column,
|
|
62
|
+
predicate: {
|
|
63
|
+
type: "containSubsequence",
|
|
64
|
+
value: ui.value
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
if (ui.type === "topN") return {
|
|
69
|
+
type: "numericalComparison",
|
|
70
|
+
lhs: {
|
|
71
|
+
transformer: "rank",
|
|
72
|
+
column: ui.column,
|
|
73
|
+
descending: true
|
|
74
|
+
},
|
|
75
|
+
rhs: ui.n,
|
|
76
|
+
allowEqual: true
|
|
77
|
+
};
|
|
78
|
+
if (ui.type === "bottomN") return {
|
|
79
|
+
type: "numericalComparison",
|
|
80
|
+
lhs: {
|
|
81
|
+
transformer: "rank",
|
|
82
|
+
column: ui.column
|
|
83
|
+
},
|
|
84
|
+
rhs: ui.n,
|
|
85
|
+
allowEqual: true
|
|
86
|
+
};
|
|
87
|
+
if (ui.type === "lessThan") return {
|
|
88
|
+
type: "numericalComparison",
|
|
89
|
+
lhs: ui.column,
|
|
90
|
+
rhs: ui.x
|
|
91
|
+
};
|
|
92
|
+
if (ui.type === "greaterThan") return {
|
|
93
|
+
type: "numericalComparison",
|
|
94
|
+
rhs: ui.column,
|
|
95
|
+
lhs: ui.x
|
|
96
|
+
};
|
|
97
|
+
if (ui.type === "greaterThanOrEqual") return {
|
|
98
|
+
type: "numericalComparison",
|
|
99
|
+
rhs: ui.column,
|
|
100
|
+
lhs: ui.x,
|
|
101
|
+
allowEqual: true
|
|
102
|
+
};
|
|
103
|
+
if (ui.type === "lessThanOrEqual") return {
|
|
104
|
+
type: "numericalComparison",
|
|
105
|
+
lhs: ui.column,
|
|
106
|
+
rhs: ui.x,
|
|
107
|
+
allowEqual: true
|
|
108
|
+
};
|
|
109
|
+
if (ui.type === "lessThanColumn") return {
|
|
110
|
+
type: "numericalComparison",
|
|
111
|
+
lhs: ui.column,
|
|
112
|
+
rhs: ui.rhs,
|
|
113
|
+
minDiff: ui.minDiff,
|
|
114
|
+
allowEqual: void 0
|
|
115
|
+
};
|
|
116
|
+
if (ui.type === "lessThanColumnOrEqual") return {
|
|
117
|
+
type: "numericalComparison",
|
|
118
|
+
lhs: ui.column,
|
|
119
|
+
rhs: ui.rhs,
|
|
120
|
+
minDiff: ui.minDiff,
|
|
121
|
+
allowEqual: true
|
|
122
|
+
};
|
|
123
|
+
unreachable(ui);
|
|
152
124
|
}
|
|
153
125
|
function compileFilters(uiFilters) {
|
|
154
|
-
|
|
126
|
+
return uiFilters.filter((f) => f.type !== void 0).map(compileFilter);
|
|
155
127
|
}
|
|
156
128
|
function compileAnnotationScript(uiScript) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return step.filter.filters.length > 0;
|
|
171
|
-
}
|
|
172
|
-
return false;
|
|
173
|
-
})
|
|
174
|
-
.map((step) => ({
|
|
175
|
-
label: step.label.trim(),
|
|
176
|
-
filter: compileFilter(step.filter),
|
|
177
|
-
})),
|
|
178
|
-
};
|
|
129
|
+
return {
|
|
130
|
+
title: uiScript.title,
|
|
131
|
+
mode: uiScript.mode,
|
|
132
|
+
steps: uiScript.steps.filter((step) => {
|
|
133
|
+
if (step.filter.type == null) return false;
|
|
134
|
+
if (step.filter.type === "or") return step.filter.filters.length > 0;
|
|
135
|
+
if (step.filter.type === "and") return step.filter.filters.length > 0;
|
|
136
|
+
return false;
|
|
137
|
+
}).map((step) => ({
|
|
138
|
+
label: step.label.trim(),
|
|
139
|
+
filter: compileFilter(step.filter)
|
|
140
|
+
}))
|
|
141
|
+
};
|
|
179
142
|
}
|
|
180
143
|
|
|
144
|
+
//#endregion
|
|
181
145
|
exports.compileAnnotationScript = compileAnnotationScript;
|
|
182
146
|
exports.compileFilter = compileFilter;
|
|
183
147
|
exports.compileFilters = compileFilters;
|
|
184
148
|
exports.unreachable = unreachable;
|
|
185
|
-
//# sourceMappingURL=filters_ui.cjs.map
|
|
149
|
+
//# sourceMappingURL=filters_ui.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters_ui.cjs","sources":["../../../src/components/PlAnnotations/filters_ui.ts"],"sourcesContent":["// @DEPRECATED - use sdk/model/src/filters + sdk/model/src/annotations\nimport type { SUniversalPColumnId } from \"@milaboratories/pl-model-common\";\nimport type { FilterSpecUi } from \"../../annotations\";\nimport type { FilterSpec, FilterSpecLeaf } from \"../../filters\";\nimport type {\n AnnotationFilter,\n AnnotationMode,\n AnnotationScript,\n IsNA,\n NotFilter,\n NumericalComparisonFilter,\n PatternFilter,\n PatternPredicate,\n ValueRank,\n} from \"./filter\";\n\nexport type FilterUi = FilterSpec<\n Extract<\n FilterSpecLeaf,\n // supported filters\n {\n type:\n | \"lessThan\"\n | \"greaterThan\"\n | \"lessThanOrEqual\"\n | \"greaterThanOrEqual\"\n | \"lessThanColumn\"\n | \"lessThanColumnOrEqual\"\n | \"patternContainSubsequence\"\n | \"patternNotContainSubsequence\"\n | \"patternEquals\"\n | \"patternNotEquals\"\n | \"topN\"\n | \"bottomN\"\n | \"isNA\"\n | \"isNotNA\";\n }\n >,\n { id: number; name?: string; isExpanded?: boolean }\n>;\n\nexport type FilterUiType = Exclude<FilterUi, { type: undefined }>[\"type\"];\n\nexport type FilterUiOfType<T extends FilterUiType> = Extract<FilterUi, { type: T }>;\n\n// DEPRECATED - use lib/ui/uikit/src/composition/filters\nexport function unreachable(x: never): never {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unexpected object: \" + x);\n}\n\nexport type TypeToLiteral<T> = [T] extends [FilterUiType]\n ? \"FilterUiType\"\n : [T] extends [SUniversalPColumnId]\n ? \"SUniversalPColumnId\"\n : [T] extends [PatternPredicate]\n ? \"PatternPredicate\"\n : [T] extends [AnnotationFilter[]]\n ? \"AnnotationFilter[]\"\n : [T] extends [AnnotationFilter]\n ? \"AnnotationFilter\"\n : [T] extends [number]\n ? \"number\"\n : [T] extends [number | undefined]\n ? \"number?\"\n : [T] extends [string]\n ? \"string\"\n : [T] extends [string | undefined]\n ? \"string?\"\n : [T] extends [boolean]\n ? \"boolean\"\n : [T] extends [boolean | undefined]\n ? \"boolean?\"\n : [T] extends [unknown[]]\n ? \"unknown[]\"\n : // this is special\n T extends number\n ? \"number\"\n : T extends string\n ? \"string\"\n : T extends boolean\n ? \"boolean\"\n : T extends Record<string, unknown>\n ? \"form\"\n : \"unknown\";\n\n// @TODO: \"parse\" option\nexport type TypeField<V> = {\n fieldType: TypeToLiteral<V>;\n label: string;\n defaultValue: () => V | undefined;\n};\n\nexport type TypeFieldRecord<T extends FilterUi> = { [K in keyof T]: TypeField<T[K]> };\n\nexport type TypeForm<T> = {\n [P in keyof T]: T[P] extends Record<string, unknown>\n ? {\n fieldType: \"form\";\n label?: string;\n form?: T[P] extends Record<string, unknown> ? TypeForm<T[P]> : undefined;\n defaultValue: () => T[P];\n }\n : TypeField<T[P]>;\n};\n\nexport type FormField =\n | {\n fieldType: \"form\";\n form?: Record<string, FormField>;\n defaultValue: () => Record<string, unknown>;\n }\n | TypeField<FilterUiType>\n | TypeField<string>\n | TypeField<number>\n | TypeField<number | undefined>\n | TypeField<boolean>\n | TypeField<boolean | undefined>\n | TypeField<SUniversalPColumnId>;\n\nexport type AnyForm = Record<string, FormField>;\n\nexport type AnnotationStepUi = FilterSpecUi<Extract<FilterUi, { type: \"and\" | \"or\" }>> & {\n id: number;\n};\n\nexport type AnnotationScriptUi = {\n isCreated?: boolean;\n title: string;\n mode: AnnotationMode;\n steps: AnnotationStepUi[];\n};\n\nexport function compileFilter(ui: FilterUi): AnnotationFilter {\n if (ui.type === \"or\") {\n return {\n type: \"or\" as const,\n filters: compileFilters(ui.filters),\n };\n }\n\n if (ui.type === \"and\") {\n return {\n type: \"and\" as const,\n filters: compileFilters(ui.filters),\n };\n }\n\n if (ui.type === \"not\") {\n return {\n type: \"not\" as const,\n filter: compileFilter(ui.filter),\n };\n }\n\n if (ui.type === \"isNA\") {\n return {\n type: \"isNA\" as const,\n column: ui.column,\n };\n }\n\n if (ui.type === \"isNotNA\") {\n const isNAFilter: IsNA = { type: \"isNA\", column: ui.column };\n const notFilter: NotFilter = { type: \"not\", filter: isNAFilter };\n return notFilter;\n }\n\n if (ui.type === \"patternEquals\") {\n return {\n type: \"pattern\" as const,\n column: ui.column,\n predicate: {\n type: \"equals\" as const,\n value: ui.value,\n },\n };\n }\n\n if (ui.type === \"patternNotEquals\") {\n const patternFilter: PatternFilter = {\n type: \"pattern\",\n column: ui.column,\n predicate: { type: \"equals\", value: ui.value },\n };\n const notFilter: NotFilter = { type: \"not\", filter: patternFilter };\n return notFilter;\n }\n\n if (ui.type === \"patternContainSubsequence\") {\n return {\n type: \"pattern\" as const,\n column: ui.column,\n predicate: {\n type: \"containSubsequence\" as const,\n value: ui.value,\n },\n };\n }\n\n if (ui.type === \"patternNotContainSubsequence\") {\n const patternFilter: PatternFilter = {\n type: \"pattern\",\n column: ui.column,\n predicate: { type: \"containSubsequence\", value: ui.value },\n };\n const notFilter: NotFilter = { type: \"not\", filter: patternFilter };\n return notFilter;\n }\n\n if (ui.type === \"topN\") {\n const rankTransform: ValueRank = {\n transformer: \"rank\",\n column: ui.column,\n descending: true,\n };\n const comparisonFilter: NumericalComparisonFilter = {\n type: \"numericalComparison\",\n lhs: rankTransform,\n rhs: ui.n,\n allowEqual: true,\n };\n return comparisonFilter;\n }\n\n if (ui.type === \"bottomN\") {\n const rankTransform: ValueRank = {\n transformer: \"rank\",\n column: ui.column,\n };\n const comparisonFilter: NumericalComparisonFilter = {\n type: \"numericalComparison\",\n lhs: rankTransform,\n rhs: ui.n,\n allowEqual: true,\n };\n return comparisonFilter;\n }\n\n if (ui.type === \"lessThan\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.x,\n };\n }\n\n if (ui.type === \"greaterThan\") {\n return {\n type: \"numericalComparison\" as const,\n rhs: ui.column,\n lhs: ui.x,\n };\n }\n\n if (ui.type === \"greaterThanOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n rhs: ui.column,\n lhs: ui.x,\n allowEqual: true,\n };\n }\n\n if (ui.type === \"lessThanOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.x,\n allowEqual: true,\n };\n }\n\n if (ui.type === \"lessThanColumn\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.rhs,\n minDiff: ui.minDiff,\n allowEqual: undefined,\n };\n }\n\n if (ui.type === \"lessThanColumnOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.rhs,\n minDiff: ui.minDiff,\n allowEqual: true,\n };\n }\n\n unreachable(ui);\n}\n\nexport function compileFilters(uiFilters: FilterUi[]): AnnotationFilter[] {\n return uiFilters.filter((f) => f.type !== undefined).map(compileFilter);\n}\n\nexport function compileAnnotationScript(uiScript: AnnotationScriptUi): AnnotationScript {\n return {\n title: uiScript.title,\n mode: uiScript.mode,\n steps: uiScript.steps\n .filter((step) => {\n // No need to compile empty steps\n if (step.filter.type == null) {\n return false;\n }\n\n if (step.filter.type === \"or\") {\n return step.filter.filters.length > 0;\n }\n\n if (step.filter.type === \"and\") {\n return step.filter.filters.length > 0;\n }\n\n return false;\n })\n .map((step) => ({\n label: step.label.trim(),\n filter: compileFilter(step.filter),\n })),\n };\n}\n"],"names":[],"mappings":";;AA6CA;AACM,SAAU,WAAW,CAAC,CAAQ,EAAA;;AAElC,IAAA,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,CAAC,CAAC;AAC5C;AAoFM,SAAU,aAAa,CAAC,EAAY,EAAA;AACxC,IAAA,IAAI,EAAE,CAAC,IAAI,KAAK,IAAI,EAAE;QACpB,OAAO;AACL,YAAA,IAAI,EAAE,IAAa;AACnB,YAAA,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC;SACpC;IACH;AAEA,IAAA,IAAI,EAAE,CAAC,IAAI,KAAK,KAAK,EAAE;QACrB,OAAO;AACL,YAAA,IAAI,EAAE,KAAc;AACpB,YAAA,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC;SACpC;IACH;AAEA,IAAA,IAAI,EAAE,CAAC,IAAI,KAAK,KAAK,EAAE;QACrB,OAAO;AACL,YAAA,IAAI,EAAE,KAAc;AACpB,YAAA,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC;SACjC;IACH;AAEA,IAAA,IAAI,EAAE,CAAC,IAAI,KAAK,MAAM,EAAE;QACtB,OAAO;AACL,YAAA,IAAI,EAAE,MAAe;YACrB,MAAM,EAAE,EAAE,CAAC,MAAM;SAClB;IACH;AAEA,IAAA,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,UAAU,GAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE;QAC5D,MAAM,SAAS,GAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,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M,CAAC,IAAI,IAAI,IAAI,EAAE;AAC5B,gBAAA,OAAO,KAAK;YACd;YAEA,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE;gBAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACvC;YAEA,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,EAAE;gBAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACvC;AAEA,YAAA,OAAO,KAAK;AACd,QAAA,CAAC;AACA,aAAA,GAAG,CAAC,CAAC,IAAI,MAAM;AACd,YAAA,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;AACxB,YAAA,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;AACnC,SAAA,CAAC,CAAC;KACN;AACH;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"filters_ui.cjs","names":[],"sources":["../../../src/components/PlAnnotations/filters_ui.ts"],"sourcesContent":["// @DEPRECATED - use sdk/model/src/filters + sdk/model/src/annotations\nimport type { SUniversalPColumnId } from \"@milaboratories/pl-model-common\";\nimport type { FilterSpecUi } from \"../../annotations\";\nimport type { FilterSpec, FilterSpecLeaf } from \"../../filters\";\nimport type {\n AnnotationFilter,\n AnnotationMode,\n AnnotationScript,\n IsNA,\n NotFilter,\n NumericalComparisonFilter,\n PatternFilter,\n PatternPredicate,\n ValueRank,\n} from \"./filter\";\n\nexport type FilterUi = FilterSpec<\n Extract<\n FilterSpecLeaf,\n // supported filters\n {\n type:\n | \"lessThan\"\n | \"greaterThan\"\n | \"lessThanOrEqual\"\n | \"greaterThanOrEqual\"\n | \"lessThanColumn\"\n | \"lessThanColumnOrEqual\"\n | \"patternContainSubsequence\"\n | \"patternNotContainSubsequence\"\n | \"patternEquals\"\n | \"patternNotEquals\"\n | \"topN\"\n | \"bottomN\"\n | \"isNA\"\n | \"isNotNA\";\n }\n >,\n { id: number; name?: string; isExpanded?: boolean }\n>;\n\nexport type FilterUiType = Exclude<FilterUi, { type: undefined }>[\"type\"];\n\nexport type FilterUiOfType<T extends FilterUiType> = Extract<FilterUi, { type: T }>;\n\n// DEPRECATED - use lib/ui/uikit/src/composition/filters\nexport function unreachable(x: never): never {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unexpected object: \" + x);\n}\n\nexport type TypeToLiteral<T> = [T] extends [FilterUiType]\n ? \"FilterUiType\"\n : [T] extends [SUniversalPColumnId]\n ? \"SUniversalPColumnId\"\n : [T] extends [PatternPredicate]\n ? \"PatternPredicate\"\n : [T] extends [AnnotationFilter[]]\n ? \"AnnotationFilter[]\"\n : [T] extends [AnnotationFilter]\n ? \"AnnotationFilter\"\n : [T] extends [number]\n ? \"number\"\n : [T] extends [number | undefined]\n ? \"number?\"\n : [T] extends [string]\n ? \"string\"\n : [T] extends [string | undefined]\n ? \"string?\"\n : [T] extends [boolean]\n ? \"boolean\"\n : [T] extends [boolean | undefined]\n ? \"boolean?\"\n : [T] extends [unknown[]]\n ? \"unknown[]\"\n : // this is special\n T extends number\n ? \"number\"\n : T extends string\n ? \"string\"\n : T extends boolean\n ? \"boolean\"\n : T extends Record<string, unknown>\n ? \"form\"\n : \"unknown\";\n\n// @TODO: \"parse\" option\nexport type TypeField<V> = {\n fieldType: TypeToLiteral<V>;\n label: string;\n defaultValue: () => V | undefined;\n};\n\nexport type TypeFieldRecord<T extends FilterUi> = { [K in keyof T]: TypeField<T[K]> };\n\nexport type TypeForm<T> = {\n [P in keyof T]: T[P] extends Record<string, unknown>\n ? {\n fieldType: \"form\";\n label?: string;\n form?: T[P] extends Record<string, unknown> ? TypeForm<T[P]> : undefined;\n defaultValue: () => T[P];\n }\n : TypeField<T[P]>;\n};\n\nexport type FormField =\n | {\n fieldType: \"form\";\n form?: Record<string, FormField>;\n defaultValue: () => Record<string, unknown>;\n }\n | TypeField<FilterUiType>\n | TypeField<string>\n | TypeField<number>\n | TypeField<number | undefined>\n | TypeField<boolean>\n | TypeField<boolean | undefined>\n | TypeField<SUniversalPColumnId>;\n\nexport type AnyForm = Record<string, FormField>;\n\nexport type AnnotationStepUi = FilterSpecUi<Extract<FilterUi, { type: \"and\" | \"or\" }>> & {\n id: number;\n};\n\nexport type AnnotationScriptUi = {\n isCreated?: boolean;\n title: string;\n mode: AnnotationMode;\n steps: AnnotationStepUi[];\n};\n\nexport function compileFilter(ui: FilterUi): AnnotationFilter {\n if (ui.type === \"or\") {\n return {\n type: \"or\" as const,\n filters: compileFilters(ui.filters),\n };\n }\n\n if (ui.type === \"and\") {\n return {\n type: \"and\" as const,\n filters: compileFilters(ui.filters),\n };\n }\n\n if (ui.type === \"not\") {\n return {\n type: \"not\" as const,\n filter: compileFilter(ui.filter),\n };\n }\n\n if (ui.type === \"isNA\") {\n return {\n type: \"isNA\" as const,\n column: ui.column,\n };\n }\n\n if (ui.type === \"isNotNA\") {\n const isNAFilter: IsNA = { type: \"isNA\", column: ui.column };\n const notFilter: NotFilter = { type: \"not\", filter: isNAFilter };\n return notFilter;\n }\n\n if (ui.type === \"patternEquals\") {\n return {\n type: \"pattern\" as const,\n column: ui.column,\n predicate: {\n type: \"equals\" as const,\n value: ui.value,\n },\n };\n }\n\n if (ui.type === \"patternNotEquals\") {\n const patternFilter: PatternFilter = {\n type: \"pattern\",\n column: ui.column,\n predicate: { type: \"equals\", value: ui.value },\n };\n const notFilter: NotFilter = { type: \"not\", filter: patternFilter };\n return notFilter;\n }\n\n if (ui.type === \"patternContainSubsequence\") {\n return {\n type: \"pattern\" as const,\n column: ui.column,\n predicate: {\n type: \"containSubsequence\" as const,\n value: ui.value,\n },\n };\n }\n\n if (ui.type === \"patternNotContainSubsequence\") {\n const patternFilter: PatternFilter = {\n type: \"pattern\",\n column: ui.column,\n predicate: { type: \"containSubsequence\", value: ui.value },\n };\n const notFilter: NotFilter = { type: \"not\", filter: patternFilter };\n return notFilter;\n }\n\n if (ui.type === \"topN\") {\n const rankTransform: ValueRank = {\n transformer: \"rank\",\n column: ui.column,\n descending: true,\n };\n const comparisonFilter: NumericalComparisonFilter = {\n type: \"numericalComparison\",\n lhs: rankTransform,\n rhs: ui.n,\n allowEqual: true,\n };\n return comparisonFilter;\n }\n\n if (ui.type === \"bottomN\") {\n const rankTransform: ValueRank = {\n transformer: \"rank\",\n column: ui.column,\n };\n const comparisonFilter: NumericalComparisonFilter = {\n type: \"numericalComparison\",\n lhs: rankTransform,\n rhs: ui.n,\n allowEqual: true,\n };\n return comparisonFilter;\n }\n\n if (ui.type === \"lessThan\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.x,\n };\n }\n\n if (ui.type === \"greaterThan\") {\n return {\n type: \"numericalComparison\" as const,\n rhs: ui.column,\n lhs: ui.x,\n };\n }\n\n if (ui.type === \"greaterThanOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n rhs: ui.column,\n lhs: ui.x,\n allowEqual: true,\n };\n }\n\n if (ui.type === \"lessThanOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.x,\n allowEqual: true,\n };\n }\n\n if (ui.type === \"lessThanColumn\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.rhs,\n minDiff: ui.minDiff,\n allowEqual: undefined,\n };\n }\n\n if (ui.type === \"lessThanColumnOrEqual\") {\n return {\n type: \"numericalComparison\" as const,\n lhs: ui.column,\n rhs: ui.rhs,\n minDiff: ui.minDiff,\n allowEqual: true,\n };\n }\n\n unreachable(ui);\n}\n\nexport function compileFilters(uiFilters: FilterUi[]): AnnotationFilter[] {\n return uiFilters.filter((f) => f.type !== undefined).map(compileFilter);\n}\n\nexport function compileAnnotationScript(uiScript: AnnotationScriptUi): AnnotationScript {\n return {\n title: uiScript.title,\n mode: uiScript.mode,\n steps: uiScript.steps\n .filter((step) => {\n // No need to compile empty steps\n if (step.filter.type == null) {\n return false;\n }\n\n if (step.filter.type === \"or\") {\n return step.filter.filters.length > 0;\n }\n\n if (step.filter.type === \"and\") {\n return step.filter.filters.length > 0;\n }\n\n return false;\n })\n .map((step) => ({\n label: step.label.trim(),\n filter: compileFilter(step.filter),\n })),\n };\n}\n"],"mappings":";;AA8CA,SAAgB,YAAY,GAAiB;AAE3C,OAAM,IAAI,MAAM,wBAAwB,EAAE;;AAqF5C,SAAgB,cAAc,IAAgC;AAC5D,KAAI,GAAG,SAAS,KACd,QAAO;EACL,MAAM;EACN,SAAS,eAAe,GAAG,QAAQ;EACpC;AAGH,KAAI,GAAG,SAAS,MACd,QAAO;EACL,MAAM;EACN,SAAS,eAAe,GAAG,QAAQ;EACpC;AAGH,KAAI,GAAG,SAAS,MACd,QAAO;EACL,MAAM;EACN,QAAQ,cAAc,GAAG,OAAO;EACjC;AAGH,KAAI,GAAG,SAAS,OACd,QAAO;EACL,MAAM;EACN,QAAQ,GAAG;EACZ;AAGH,KAAI,GAAG,SAAS,UAGd,QAD6B;EAAE,MAAM;EAAO,QADnB;GAAE,MAAM;GAAQ,QAAQ,GAAG;GAAQ;EACI;AAIlE,KAAI,GAAG,SAAS,gBACd,QAAO;EACL,MAAM;EACN,QAAQ,GAAG;EACX,WAAW;GACT,MAAM;GACN,OAAO,GAAG;GACX;EACF;AAGH,KAAI,GAAG,SAAS,mBAOd,QAD6B;EAAE,MAAM;EAAO,QALP;GACnC,MAAM;GACN,QAAQ,GAAG;GACX,WAAW;IAAE,MAAM;IAAU,OAAO,GAAG;IAAO;GAC/C;EACkE;AAIrE,KAAI,GAAG,SAAS,4BACd,QAAO;EACL,MAAM;EACN,QAAQ,GAAG;EACX,WAAW;GACT,MAAM;GACN,OAAO,GAAG;GACX;EACF;AAGH,KAAI,GAAG,SAAS,+BAOd,QAD6B;EAAE,MAAM;EAAO,QALP;GACnC,MAAM;GACN,QAAQ,GAAG;GACX,WAAW;IAAE,MAAM;IAAsB,OAAO,GAAG;IAAO;GAC3D;EACkE;AAIrE,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