@platforma-sdk/model 1.58.5 → 1.58.11

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.
Files changed (365) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +43 -0
  2. package/dist/_virtual/_rolldown/runtime.js +18 -0
  3. package/dist/annotations/converter.cjs +15 -20
  4. package/dist/annotations/converter.cjs.map +1 -1
  5. package/dist/annotations/converter.d.ts +6 -2
  6. package/dist/annotations/converter.js +14 -18
  7. package/dist/annotations/converter.js.map +1 -1
  8. package/dist/annotations/index.cjs +1 -0
  9. package/dist/annotations/index.d.ts +2 -3
  10. package/dist/annotations/index.js +1 -0
  11. package/dist/annotations/types.d.ts +21 -16
  12. package/dist/bconfig/index.cjs +2 -0
  13. package/dist/bconfig/index.d.ts +5 -6
  14. package/dist/bconfig/index.js +2 -0
  15. package/dist/bconfig/lambdas.d.ts +52 -52
  16. package/dist/bconfig/normalization.cjs +13 -18
  17. package/dist/bconfig/normalization.cjs.map +1 -1
  18. package/dist/bconfig/normalization.d.ts +10 -6
  19. package/dist/bconfig/normalization.js +12 -16
  20. package/dist/bconfig/normalization.js.map +1 -1
  21. package/dist/bconfig/types.cjs +4 -3
  22. package/dist/bconfig/types.cjs.map +1 -1
  23. package/dist/bconfig/types.d.ts +10 -5
  24. package/dist/bconfig/types.js +4 -2
  25. package/dist/bconfig/types.js.map +1 -1
  26. package/dist/bconfig/util.d.ts +7 -4
  27. package/dist/bconfig/v3.d.ts +10 -6
  28. package/dist/block_api_v1.d.ts +62 -58
  29. package/dist/block_api_v2.d.ts +51 -47
  30. package/dist/block_api_v3.d.ts +33 -29
  31. package/dist/block_migrations.cjs +481 -413
  32. package/dist/block_migrations.cjs.map +1 -1
  33. package/dist/block_migrations.d.ts +258 -204
  34. package/dist/block_migrations.js +482 -408
  35. package/dist/block_migrations.js.map +1 -1
  36. package/dist/block_model.cjs +312 -343
  37. package/dist/block_model.cjs.map +1 -1
  38. package/dist/block_model.d.ts +143 -147
  39. package/dist/block_model.js +312 -341
  40. package/dist/block_model.js.map +1 -1
  41. package/dist/block_model_legacy.cjs +231 -255
  42. package/dist/block_model_legacy.cjs.map +1 -1
  43. package/dist/block_model_legacy.d.ts +108 -106
  44. package/dist/block_model_legacy.js +231 -253
  45. package/dist/block_model_legacy.js.map +1 -1
  46. package/dist/block_state_patch.d.ts +10 -10
  47. package/dist/block_state_util.cjs +15 -19
  48. package/dist/block_state_util.cjs.map +1 -1
  49. package/dist/block_state_util.d.ts +14 -13
  50. package/dist/block_state_util.js +15 -18
  51. package/dist/block_state_util.js.map +1 -1
  52. package/dist/block_storage.cjs +233 -238
  53. package/dist/block_storage.cjs.map +1 -1
  54. package/dist/block_storage.d.ts +62 -78
  55. package/dist/block_storage.js +234 -237
  56. package/dist/block_storage.js.map +1 -1
  57. package/dist/block_storage_callbacks.cjs +156 -195
  58. package/dist/block_storage_callbacks.cjs.map +1 -1
  59. package/dist/block_storage_callbacks.js +156 -192
  60. package/dist/block_storage_callbacks.js.map +1 -1
  61. package/dist/block_storage_facade.cjs +29 -85
  62. package/dist/block_storage_facade.cjs.map +1 -1
  63. package/dist/block_storage_facade.d.ts +83 -126
  64. package/dist/block_storage_facade.js +29 -83
  65. package/dist/block_storage_facade.js.map +1 -1
  66. package/dist/components/PFrameForGraphs.cjs +26 -24
  67. package/dist/components/PFrameForGraphs.cjs.map +1 -1
  68. package/dist/components/PFrameForGraphs.d.ts +12 -7
  69. package/dist/components/PFrameForGraphs.js +25 -22
  70. package/dist/components/PFrameForGraphs.js.map +1 -1
  71. package/dist/components/PlAnnotations/filter.d.ts +62 -79
  72. package/dist/components/PlAnnotations/filters_ui.cjs +135 -171
  73. package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -1
  74. package/dist/components/PlAnnotations/filters_ui.d.ts +48 -46
  75. package/dist/components/PlAnnotations/filters_ui.js +135 -170
  76. package/dist/components/PlAnnotations/filters_ui.js.map +1 -1
  77. package/dist/components/PlAnnotations/index.d.ts +2 -3
  78. package/dist/components/PlDataTable/index.cjs +2 -0
  79. package/dist/components/PlDataTable/index.d.ts +3 -5
  80. package/dist/components/PlDataTable/index.js +2 -0
  81. package/dist/components/PlDataTable/labels.cjs +59 -81
  82. package/dist/components/PlDataTable/labels.cjs.map +1 -1
  83. package/dist/components/PlDataTable/labels.js +58 -79
  84. package/dist/components/PlDataTable/labels.js.map +1 -1
  85. package/dist/components/PlDataTable/state-migration.cjs +186 -144
  86. package/dist/components/PlDataTable/state-migration.cjs.map +1 -1
  87. package/dist/components/PlDataTable/state-migration.d.ts +85 -82
  88. package/dist/components/PlDataTable/state-migration.js +185 -142
  89. package/dist/components/PlDataTable/state-migration.js.map +1 -1
  90. package/dist/components/PlDataTable/table.cjs +172 -194
  91. package/dist/components/PlDataTable/table.cjs.map +1 -1
  92. package/dist/components/PlDataTable/table.d.ts +16 -12
  93. package/dist/components/PlDataTable/table.js +171 -192
  94. package/dist/components/PlDataTable/table.js.map +1 -1
  95. package/dist/components/PlDataTable/v4.d.ts +84 -119
  96. package/dist/components/PlDataTable/v5.d.ts +80 -103
  97. package/dist/components/PlMultiSequenceAlignment.cjs +27 -29
  98. package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -1
  99. package/dist/components/PlMultiSequenceAlignment.d.ts +36 -27
  100. package/dist/components/PlMultiSequenceAlignment.js +26 -27
  101. package/dist/components/PlMultiSequenceAlignment.js.map +1 -1
  102. package/dist/components/PlSelectionModel.cjs +7 -6
  103. package/dist/components/PlSelectionModel.cjs.map +1 -1
  104. package/dist/components/PlSelectionModel.d.ts +10 -8
  105. package/dist/components/PlSelectionModel.js +7 -5
  106. package/dist/components/PlSelectionModel.js.map +1 -1
  107. package/dist/components/index.cjs +8 -0
  108. package/dist/components/index.d.ts +11 -6
  109. package/dist/components/index.js +8 -0
  110. package/dist/config/actions.cjs +138 -171
  111. package/dist/config/actions.cjs.map +1 -1
  112. package/dist/config/actions.d.ts +47 -47
  113. package/dist/config/actions.js +146 -178
  114. package/dist/config/actions.js.map +1 -1
  115. package/dist/config/actions_kinds.d.ts +114 -121
  116. package/dist/config/index.cjs +1 -0
  117. package/dist/config/index.d.ts +6 -7
  118. package/dist/config/index.js +1 -0
  119. package/dist/config/model.d.ts +131 -127
  120. package/dist/config/model_meta.d.ts +4 -1
  121. package/dist/config/type_engine.d.ts +22 -21
  122. package/dist/config/type_util.d.ts +12 -10
  123. package/dist/env_value.cjs +5 -6
  124. package/dist/env_value.cjs.map +1 -1
  125. package/dist/env_value.d.ts +4 -1
  126. package/dist/env_value.js +5 -5
  127. package/dist/env_value.js.map +1 -1
  128. package/dist/filters/converters/filterToQuery.cjs +273 -239
  129. package/dist/filters/converters/filterToQuery.cjs.map +1 -1
  130. package/dist/filters/converters/filterToQuery.d.ts +6 -2
  131. package/dist/filters/converters/filterToQuery.js +272 -237
  132. package/dist/filters/converters/filterToQuery.js.map +1 -1
  133. package/dist/filters/converters/filterUiToExpressionImpl.cjs +56 -85
  134. package/dist/filters/converters/filterUiToExpressionImpl.cjs.map +1 -1
  135. package/dist/filters/converters/filterUiToExpressionImpl.d.ts +8 -4
  136. package/dist/filters/converters/filterUiToExpressionImpl.js +55 -83
  137. package/dist/filters/converters/filterUiToExpressionImpl.js.map +1 -1
  138. package/dist/filters/converters/index.cjs +2 -0
  139. package/dist/filters/converters/index.d.ts +2 -3
  140. package/dist/filters/converters/index.js +2 -0
  141. package/dist/filters/distill.cjs +59 -60
  142. package/dist/filters/distill.cjs.map +1 -1
  143. package/dist/filters/distill.d.ts +6 -3
  144. package/dist/filters/distill.js +58 -58
  145. package/dist/filters/distill.js.map +1 -1
  146. package/dist/filters/index.cjs +4 -0
  147. package/dist/filters/index.d.ts +5 -4
  148. package/dist/filters/index.js +4 -0
  149. package/dist/filters/traverse.cjs +31 -40
  150. package/dist/filters/traverse.cjs.map +1 -1
  151. package/dist/filters/traverse.js +31 -39
  152. package/dist/filters/traverse.js.map +1 -1
  153. package/dist/filters/types.d.ts +10 -7
  154. package/dist/index.cjs +193 -187
  155. package/dist/index.d.ts +61 -28
  156. package/dist/index.js +49 -41
  157. package/dist/internal.cjs +48 -62
  158. package/dist/internal.cjs.map +1 -1
  159. package/dist/internal.js +49 -60
  160. package/dist/internal.js.map +1 -1
  161. package/dist/package.cjs +12 -0
  162. package/dist/package.cjs.map +1 -0
  163. package/dist/package.js +6 -0
  164. package/dist/package.js.map +1 -0
  165. package/dist/pframe.cjs +32 -37
  166. package/dist/pframe.cjs.map +1 -1
  167. package/dist/pframe.d.ts +14 -10
  168. package/dist/pframe.js +32 -35
  169. package/dist/pframe.js.map +1 -1
  170. package/dist/pframe_utils/axes.cjs +81 -114
  171. package/dist/pframe_utils/axes.cjs.map +1 -1
  172. package/dist/pframe_utils/axes.d.ts +10 -13
  173. package/dist/pframe_utils/axes.js +80 -112
  174. package/dist/pframe_utils/axes.js.map +1 -1
  175. package/dist/pframe_utils/columns.cjs +61 -81
  176. package/dist/pframe_utils/columns.cjs.map +1 -1
  177. package/dist/pframe_utils/columns.d.ts +15 -6
  178. package/dist/pframe_utils/columns.js +60 -79
  179. package/dist/pframe_utils/columns.js.map +1 -1
  180. package/dist/pframe_utils/index.cjs +232 -253
  181. package/dist/pframe_utils/index.cjs.map +1 -1
  182. package/dist/pframe_utils/index.d.ts +39 -35
  183. package/dist/pframe_utils/index.js +231 -251
  184. package/dist/pframe_utils/index.js.map +1 -1
  185. package/dist/platforma.d.ts +48 -46
  186. package/dist/plugin_handle.cjs +6 -14
  187. package/dist/plugin_handle.cjs.map +1 -1
  188. package/dist/plugin_handle.d.ts +20 -25
  189. package/dist/plugin_handle.js +6 -13
  190. package/dist/plugin_handle.js.map +1 -1
  191. package/dist/plugin_model.cjs +364 -163
  192. package/dist/plugin_model.cjs.map +1 -1
  193. package/dist/plugin_model.d.ts +280 -129
  194. package/dist/plugin_model.js +362 -163
  195. package/dist/plugin_model.js.map +1 -1
  196. package/dist/raw_globals.cjs +10 -22
  197. package/dist/raw_globals.cjs.map +1 -1
  198. package/dist/raw_globals.d.ts +8 -5
  199. package/dist/raw_globals.js +10 -20
  200. package/dist/raw_globals.js.map +1 -1
  201. package/dist/ref_util.cjs +14 -13
  202. package/dist/ref_util.cjs.map +1 -1
  203. package/dist/ref_util.d.ts +18 -12
  204. package/dist/ref_util.js +14 -11
  205. package/dist/ref_util.js.map +1 -1
  206. package/dist/render/accessor.cjs +213 -226
  207. package/dist/render/accessor.cjs.map +1 -1
  208. package/dist/render/accessor.d.ts +115 -120
  209. package/dist/render/accessor.js +212 -224
  210. package/dist/render/accessor.js.map +1 -1
  211. package/dist/render/api.cjs +478 -580
  212. package/dist/render/api.cjs.map +1 -1
  213. package/dist/render/api.d.ts +207 -209
  214. package/dist/render/api.js +476 -578
  215. package/dist/render/api.js.map +1 -1
  216. package/dist/render/future.cjs +28 -32
  217. package/dist/render/future.cjs.map +1 -1
  218. package/dist/render/future.d.ts +15 -11
  219. package/dist/render/future.js +28 -30
  220. package/dist/render/future.js.map +1 -1
  221. package/dist/render/index.cjs +8 -0
  222. package/dist/render/index.d.ts +10 -8
  223. package/dist/render/index.js +8 -0
  224. package/dist/render/internal.cjs +33 -29
  225. package/dist/render/internal.cjs.map +1 -1
  226. package/dist/render/internal.d.ts +78 -72
  227. package/dist/render/internal.js +29 -26
  228. package/dist/render/internal.js.map +1 -1
  229. package/dist/render/traversal_ops.d.ts +42 -43
  230. package/dist/render/util/axis_filtering.cjs +63 -86
  231. package/dist/render/util/axis_filtering.cjs.map +1 -1
  232. package/dist/render/util/axis_filtering.d.ts +10 -7
  233. package/dist/render/util/axis_filtering.js +63 -85
  234. package/dist/render/util/axis_filtering.js.map +1 -1
  235. package/dist/render/util/column_collection.cjs +266 -321
  236. package/dist/render/util/column_collection.cjs.map +1 -1
  237. package/dist/render/util/column_collection.d.ts +47 -47
  238. package/dist/render/util/column_collection.js +264 -319
  239. package/dist/render/util/column_collection.js.map +1 -1
  240. package/dist/render/util/index.cjs +4 -0
  241. package/dist/render/util/index.d.ts +4 -5
  242. package/dist/render/util/index.js +4 -0
  243. package/dist/render/util/label.cjs +129 -163
  244. package/dist/render/util/label.cjs.map +1 -1
  245. package/dist/render/util/label.d.ts +45 -46
  246. package/dist/render/util/label.js +128 -161
  247. package/dist/render/util/label.js.map +1 -1
  248. package/dist/render/util/pcolumn_data.cjs +315 -375
  249. package/dist/render/util/pcolumn_data.cjs.map +1 -1
  250. package/dist/render/util/pcolumn_data.d.ts +33 -32
  251. package/dist/render/util/pcolumn_data.js +314 -373
  252. package/dist/render/util/pcolumn_data.js.map +1 -1
  253. package/dist/render/util/pframe_upgraders.cjs +37 -42
  254. package/dist/render/util/pframe_upgraders.cjs.map +1 -1
  255. package/dist/render/util/pframe_upgraders.js +37 -41
  256. package/dist/render/util/pframe_upgraders.js.map +1 -1
  257. package/dist/render/util/split_selectors.d.ts +13 -9
  258. package/dist/version.cjs +6 -8
  259. package/dist/version.cjs.map +1 -1
  260. package/dist/version.d.ts +7 -4
  261. package/dist/version.js +5 -5
  262. package/dist/version.js.map +1 -1
  263. package/package.json +15 -9
  264. package/src/block_migrations.test.ts +184 -14
  265. package/src/block_migrations.ts +185 -30
  266. package/src/block_model.ts +111 -66
  267. package/src/block_storage.test.ts +147 -3
  268. package/src/block_storage.ts +43 -8
  269. package/src/block_storage_callbacks.ts +9 -4
  270. package/src/env_value.ts +0 -2
  271. package/src/index.ts +12 -11
  272. package/src/internal.ts +0 -1
  273. package/src/platforma.ts +4 -4
  274. package/src/plugin_handle.ts +1 -1
  275. package/src/plugin_model.test.ts +217 -21
  276. package/src/plugin_model.ts +450 -55
  277. package/src/raw_globals.ts +0 -1
  278. package/dist/annotations/converter.d.ts.map +0 -1
  279. package/dist/annotations/index.d.ts.map +0 -1
  280. package/dist/annotations/types.d.ts.map +0 -1
  281. package/dist/bconfig/index.d.ts.map +0 -1
  282. package/dist/bconfig/lambdas.d.ts.map +0 -1
  283. package/dist/bconfig/normalization.d.ts.map +0 -1
  284. package/dist/bconfig/types.d.ts.map +0 -1
  285. package/dist/bconfig/util.d.ts.map +0 -1
  286. package/dist/bconfig/v3.d.ts.map +0 -1
  287. package/dist/block_api_v1.d.ts.map +0 -1
  288. package/dist/block_api_v2.d.ts.map +0 -1
  289. package/dist/block_api_v3.d.ts.map +0 -1
  290. package/dist/block_migrations.d.ts.map +0 -1
  291. package/dist/block_model.d.ts.map +0 -1
  292. package/dist/block_model_legacy.d.ts.map +0 -1
  293. package/dist/block_state_patch.d.ts.map +0 -1
  294. package/dist/block_state_util.d.ts.map +0 -1
  295. package/dist/block_storage.d.ts.map +0 -1
  296. package/dist/block_storage_callbacks.d.ts +0 -115
  297. package/dist/block_storage_callbacks.d.ts.map +0 -1
  298. package/dist/block_storage_facade.d.ts.map +0 -1
  299. package/dist/components/PFrameForGraphs.d.ts.map +0 -1
  300. package/dist/components/PlAnnotations/filter.d.ts.map +0 -1
  301. package/dist/components/PlAnnotations/filters_ui.d.ts.map +0 -1
  302. package/dist/components/PlAnnotations/index.d.ts.map +0 -1
  303. package/dist/components/PlAnnotations/types.d.ts +0 -3
  304. package/dist/components/PlAnnotations/types.d.ts.map +0 -1
  305. package/dist/components/PlDataTable/index.d.ts.map +0 -1
  306. package/dist/components/PlDataTable/labels.d.ts +0 -7
  307. package/dist/components/PlDataTable/labels.d.ts.map +0 -1
  308. package/dist/components/PlDataTable/state-migration.d.ts.map +0 -1
  309. package/dist/components/PlDataTable/table.d.ts.map +0 -1
  310. package/dist/components/PlDataTable/v4.d.ts.map +0 -1
  311. package/dist/components/PlDataTable/v5.d.ts.map +0 -1
  312. package/dist/components/PlMultiSequenceAlignment.d.ts.map +0 -1
  313. package/dist/components/PlSelectionModel.d.ts.map +0 -1
  314. package/dist/components/index.d.ts.map +0 -1
  315. package/dist/config/actions.d.ts.map +0 -1
  316. package/dist/config/actions_kinds.d.ts.map +0 -1
  317. package/dist/config/index.d.ts.map +0 -1
  318. package/dist/config/model.d.ts.map +0 -1
  319. package/dist/config/model_meta.d.ts.map +0 -1
  320. package/dist/config/type_engine.d.ts.map +0 -1
  321. package/dist/config/type_util.d.ts.map +0 -1
  322. package/dist/env_value.d.ts.map +0 -1
  323. package/dist/filters/converters/filterToQuery.d.ts.map +0 -1
  324. package/dist/filters/converters/filterUiToExpressionImpl.d.ts.map +0 -1
  325. package/dist/filters/converters/index.d.ts.map +0 -1
  326. package/dist/filters/distill.d.ts.map +0 -1
  327. package/dist/filters/index.d.ts.map +0 -1
  328. package/dist/filters/traverse.d.ts +0 -27
  329. package/dist/filters/traverse.d.ts.map +0 -1
  330. package/dist/filters/types.d.ts.map +0 -1
  331. package/dist/index.cjs.map +0 -1
  332. package/dist/index.d.ts.map +0 -1
  333. package/dist/index.js.map +0 -1
  334. package/dist/internal.d.ts +0 -36
  335. package/dist/internal.d.ts.map +0 -1
  336. package/dist/package.json.cjs +0 -6
  337. package/dist/package.json.cjs.map +0 -1
  338. package/dist/package.json.js +0 -4
  339. package/dist/package.json.js.map +0 -1
  340. package/dist/pframe.d.ts.map +0 -1
  341. package/dist/pframe_utils/axes.d.ts.map +0 -1
  342. package/dist/pframe_utils/columns.d.ts.map +0 -1
  343. package/dist/pframe_utils/index.d.ts.map +0 -1
  344. package/dist/pframe_utils/querySpec.d.ts +0 -2
  345. package/dist/pframe_utils/querySpec.d.ts.map +0 -1
  346. package/dist/platforma.d.ts.map +0 -1
  347. package/dist/plugin_handle.d.ts.map +0 -1
  348. package/dist/plugin_model.d.ts.map +0 -1
  349. package/dist/raw_globals.d.ts.map +0 -1
  350. package/dist/ref_util.d.ts.map +0 -1
  351. package/dist/render/accessor.d.ts.map +0 -1
  352. package/dist/render/api.d.ts.map +0 -1
  353. package/dist/render/future.d.ts.map +0 -1
  354. package/dist/render/index.d.ts.map +0 -1
  355. package/dist/render/internal.d.ts.map +0 -1
  356. package/dist/render/traversal_ops.d.ts.map +0 -1
  357. package/dist/render/util/axis_filtering.d.ts.map +0 -1
  358. package/dist/render/util/column_collection.d.ts.map +0 -1
  359. package/dist/render/util/index.d.ts.map +0 -1
  360. package/dist/render/util/label.d.ts.map +0 -1
  361. package/dist/render/util/pcolumn_data.d.ts.map +0 -1
  362. package/dist/render/util/pframe_upgraders.d.ts +0 -3
  363. package/dist/render/util/pframe_upgraders.d.ts.map +0 -1
  364. package/dist/render/util/split_selectors.d.ts.map +0 -1
  365. package/dist/version.d.ts.map +0 -1
@@ -1,38 +1,36 @@
1
- import type { SUniversalPColumnId } from "@milaboratories/pl-model-common";
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
- export type PatternPredicateEquals = {
8
- type: "equals";
9
- /** The exact pattern value to match */
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
- export type PatternPredicateContainSubsequence = {
18
- type: "containSubsequence";
19
- /** The subpattern to search for within the target pattern */
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
- export type PatternPredicate = PatternPredicateEquals | PatternPredicateContainSubsequence;
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
- export type PatternFilter = {
31
- type: "pattern";
32
- /** The column identifier to apply the filter to */
33
- column: SUniversalPColumnId;
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
- export type ValueRank = {
49
- transformer: "rank";
50
- /** The column identifier to apply the ranking to */
51
- column: SUniversalPColumnId;
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
- export type SortedCumulativeSum = {
66
- transformer: "sortedCumulativeSum";
67
- /** The column identifier to apply the cumulative sum to */
68
- column: SUniversalPColumnId;
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
- export type Log10 = {
82
- transformer: "log10";
83
- /** The column identifier to apply the log10 transformation to */
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
- export type TransformedColumn = ValueRank | SortedCumulativeSum | Log10;
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
- export type NumericalComparisonFilter = {
111
- type: "numericalComparison";
112
- /** The first column to compare (left side of comparison) */
113
- lhs: SUniversalPColumnId | TransformedColumn | number;
114
- /** The second column to compare (right side of comparison) */
115
- rhs: SUniversalPColumnId | TransformedColumn | number;
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
- export type IsNA = {
126
- type: "isNA";
127
- /** The column identifier to check for NA values */
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
- export interface OrFilter {
135
- type: "or";
136
- /** Array of filters to combine with OR logic */
137
- filters: AnnotationFilter[];
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
- export interface AndFilter {
144
- type: "and";
145
- /** Array of filters to combine with AND logic */
146
- filters: AnnotationFilter[];
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
- export interface NotFilter {
153
- type: "not";
154
- /** The filter to negate */
155
- filter: AnnotationFilter;
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
- export type AnnotationFilter = IsNA | PatternFilter | NumericalComparisonFilter | OrFilter | AndFilter | NotFilter;
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
- export type AnnotationStep = {
166
- /** The filter to apply for selecting records */
167
- filter: AnnotationFilter;
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
- export type AnnotationMode =
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
- | "bySampleAndClonotype";
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
- export type AnnotationScript = {
200
- /** The title of the annotation */
201
- title: string;
202
- /** The mode of annotation to apply */
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
- export type AnnotationScript2<S extends AnnotationStep> = {
208
- /** The mode of annotation to apply */
209
- mode: AnnotationMode;
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
- // DEPRECATED - use lib/ui/uikit/src/composition/filters
2
+ //#region src/components/PlAnnotations/filters_ui.ts
4
3
  function unreachable(x) {
5
- // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
6
- throw new Error("Unexpected object: " + x);
4
+ throw new Error("Unexpected object: " + x);
7
5
  }
8
6
  function compileFilter(ui) {
9
- if (ui.type === "or") {
10
- return {
11
- type: "or",
12
- filters: compileFilters(ui.filters),
13
- };
14
- }
15
- if (ui.type === "and") {
16
- return {
17
- type: "and",
18
- filters: compileFilters(ui.filters),
19
- };
20
- }
21
- if (ui.type === "not") {
22
- return {
23
- type: "not",
24
- filter: compileFilter(ui.filter),
25
- };
26
- }
27
- if (ui.type === "isNA") {
28
- return {
29
- type: "isNA",
30
- column: ui.column,
31
- };
32
- }
33
- if (ui.type === "isNotNA") {
34
- const isNAFilter = { type: "isNA", column: ui.column };
35
- const notFilter = { type: "not", filter: isNAFilter };
36
- return notFilter;
37
- }
38
- if (ui.type === "patternEquals") {
39
- return {
40
- type: "pattern",
41
- column: ui.column,
42
- predicate: {
43
- type: "equals",
44
- value: ui.value,
45
- },
46
- };
47
- }
48
- if (ui.type === "patternNotEquals") {
49
- const patternFilter = {
50
- type: "pattern",
51
- column: ui.column,
52
- predicate: { type: "equals", value: ui.value },
53
- };
54
- const notFilter = { type: "not", filter: patternFilter };
55
- return notFilter;
56
- }
57
- if (ui.type === "patternContainSubsequence") {
58
- return {
59
- type: "pattern",
60
- column: ui.column,
61
- predicate: {
62
- type: "containSubsequence",
63
- value: ui.value,
64
- },
65
- };
66
- }
67
- if (ui.type === "patternNotContainSubsequence") {
68
- const patternFilter = {
69
- type: "pattern",
70
- column: ui.column,
71
- predicate: { type: "containSubsequence", value: ui.value },
72
- };
73
- const notFilter = { type: "not", filter: patternFilter };
74
- return notFilter;
75
- }
76
- if (ui.type === "topN") {
77
- const rankTransform = {
78
- transformer: "rank",
79
- column: ui.column,
80
- descending: true,
81
- };
82
- const comparisonFilter = {
83
- type: "numericalComparison",
84
- lhs: rankTransform,
85
- rhs: ui.n,
86
- allowEqual: true,
87
- };
88
- return comparisonFilter;
89
- }
90
- if (ui.type === "bottomN") {
91
- const rankTransform = {
92
- transformer: "rank",
93
- column: ui.column,
94
- };
95
- const comparisonFilter = {
96
- type: "numericalComparison",
97
- lhs: rankTransform,
98
- rhs: ui.n,
99
- allowEqual: true,
100
- };
101
- return comparisonFilter;
102
- }
103
- if (ui.type === "lessThan") {
104
- return {
105
- type: "numericalComparison",
106
- lhs: ui.column,
107
- rhs: ui.x,
108
- };
109
- }
110
- if (ui.type === "greaterThan") {
111
- return {
112
- type: "numericalComparison",
113
- rhs: ui.column,
114
- lhs: ui.x,
115
- };
116
- }
117
- if (ui.type === "greaterThanOrEqual") {
118
- return {
119
- type: "numericalComparison",
120
- rhs: ui.column,
121
- lhs: ui.x,
122
- allowEqual: true,
123
- };
124
- }
125
- if (ui.type === "lessThanOrEqual") {
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
- return uiFilters.filter((f) => f.type !== undefined).map(compileFilter);
126
+ return uiFilters.filter((f) => f.type !== void 0).map(compileFilter);
155
127
  }
156
128
  function compileAnnotationScript(uiScript) {
157
- return {
158
- title: uiScript.title,
159
- mode: uiScript.mode,
160
- steps: uiScript.steps
161
- .filter((step) => {
162
- // No need to compile empty steps
163
- if (step.filter.type == null) {
164
- return false;
165
- }
166
- if (step.filter.type === "or") {
167
- return step.filter.filters.length > 0;
168
- }
169
- if (step.filter.type === "and") {
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;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,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;AACzE;AAEM,SAAU,uBAAuB,CAAC,QAA4B,EAAA;IAClE,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,QAAQ,CAAC;AACb,aAAA,MAAM,CAAC,CAAC,IAAI,KAAI;;YAEf,IAAI,IAAI,CAAC,MAAM,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;I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