@platforma-sdk/model 1.42.15 → 1.42.20

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 (228) hide show
  1. package/dist/bconfig/index.d.ts +0 -1
  2. package/dist/bconfig/lambdas.d.ts +0 -1
  3. package/dist/bconfig/normalization.cjs +19 -0
  4. package/dist/bconfig/normalization.cjs.map +1 -0
  5. package/dist/bconfig/normalization.d.ts +0 -1
  6. package/dist/bconfig/normalization.js +16 -0
  7. package/dist/bconfig/normalization.js.map +1 -0
  8. package/dist/bconfig/types.cjs +8 -0
  9. package/dist/bconfig/types.cjs.map +1 -0
  10. package/dist/bconfig/types.d.ts +0 -1
  11. package/dist/bconfig/types.js +6 -0
  12. package/dist/bconfig/types.js.map +1 -0
  13. package/dist/bconfig/util.d.ts +0 -1
  14. package/dist/bconfig/v3.d.ts +0 -1
  15. package/dist/block_api_v1.d.ts +0 -1
  16. package/dist/block_api_v2.d.ts +0 -1
  17. package/dist/block_state_patch.d.ts +0 -1
  18. package/dist/block_state_util.cjs +28 -0
  19. package/dist/block_state_util.cjs.map +1 -0
  20. package/dist/block_state_util.d.ts +0 -1
  21. package/dist/block_state_util.js +24 -0
  22. package/dist/block_state_util.js.map +1 -0
  23. package/dist/branding.d.ts +0 -1
  24. package/dist/builder.cjs +166 -0
  25. package/dist/builder.cjs.map +1 -0
  26. package/dist/builder.d.ts +0 -1
  27. package/dist/builder.js +164 -0
  28. package/dist/builder.js.map +1 -0
  29. package/dist/components/PFrameForGraphs.cjs +261 -0
  30. package/dist/components/PFrameForGraphs.cjs.map +1 -0
  31. package/dist/components/PFrameForGraphs.d.ts +5 -9
  32. package/dist/components/PFrameForGraphs.js +254 -0
  33. package/dist/components/PFrameForGraphs.js.map +1 -0
  34. package/dist/components/PlAnnotations/filter.d.ts +0 -1
  35. package/dist/components/PlAnnotations/filters_ui.cjs +556 -0
  36. package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -0
  37. package/dist/components/PlAnnotations/filters_ui.d.ts +0 -1
  38. package/dist/components/PlAnnotations/filters_ui.js +548 -0
  39. package/dist/components/PlAnnotations/filters_ui.js.map +1 -0
  40. package/dist/components/PlAnnotations/index.d.ts +0 -1
  41. package/dist/components/PlAnnotations/types.d.ts +0 -1
  42. package/dist/components/PlDataTable.cjs +337 -0
  43. package/dist/components/PlDataTable.cjs.map +1 -0
  44. package/dist/components/PlDataTable.d.ts +3 -4
  45. package/dist/components/PlDataTable.js +324 -0
  46. package/dist/components/PlDataTable.js.map +1 -0
  47. package/dist/components/PlMultiSequenceAlignment.cjs +33 -0
  48. package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -0
  49. package/dist/components/PlMultiSequenceAlignment.d.ts +0 -1
  50. package/dist/components/PlMultiSequenceAlignment.js +31 -0
  51. package/dist/components/PlMultiSequenceAlignment.js.map +1 -0
  52. package/dist/components/PlSelectionModel.cjs +11 -0
  53. package/dist/components/PlSelectionModel.cjs.map +1 -0
  54. package/dist/components/PlSelectionModel.d.ts +0 -1
  55. package/dist/components/PlSelectionModel.js +9 -0
  56. package/dist/components/PlSelectionModel.js.map +1 -0
  57. package/dist/components/index.d.ts +0 -1
  58. package/dist/config/actions.cjs +266 -0
  59. package/dist/config/actions.cjs.map +1 -0
  60. package/dist/config/actions.d.ts +0 -1
  61. package/dist/config/actions.js +233 -0
  62. package/dist/config/actions.js.map +1 -0
  63. package/dist/config/actions_kinds.d.ts +0 -1
  64. package/dist/config/index.d.ts +0 -1
  65. package/dist/config/model.d.ts +0 -1
  66. package/dist/config/model_meta.d.ts +0 -1
  67. package/dist/config/type_engine.d.ts +0 -1
  68. package/dist/config/type_util.d.ts +0 -1
  69. package/dist/env_value.cjs +11 -0
  70. package/dist/env_value.cjs.map +1 -0
  71. package/dist/env_value.d.ts +0 -1
  72. package/dist/env_value.js +9 -0
  73. package/dist/env_value.js.map +1 -0
  74. package/dist/global.d.ts +14 -0
  75. package/dist/index.cjs +138 -0
  76. package/dist/index.cjs.map +1 -0
  77. package/dist/index.d.ts +0 -1
  78. package/dist/index.js +26 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/internal.cjs +56 -0
  81. package/dist/internal.cjs.map +1 -0
  82. package/dist/internal.d.ts +0 -1
  83. package/dist/internal.js +49 -0
  84. package/dist/internal.js.map +1 -0
  85. package/dist/package.json.cjs +6 -0
  86. package/dist/package.json.cjs.map +1 -0
  87. package/dist/package.json.js +4 -0
  88. package/dist/package.json.js.map +1 -0
  89. package/dist/pframe.cjs +34 -0
  90. package/dist/pframe.cjs.map +1 -0
  91. package/dist/pframe.d.ts +0 -1
  92. package/dist/pframe.js +32 -0
  93. package/dist/pframe.js.map +1 -0
  94. package/dist/platforma.d.ts +0 -1
  95. package/dist/raw_globals.cjs +28 -0
  96. package/dist/raw_globals.cjs.map +1 -0
  97. package/dist/raw_globals.d.ts +0 -1
  98. package/dist/raw_globals.js +25 -0
  99. package/dist/raw_globals.js.map +1 -0
  100. package/dist/ref_util.cjs +21 -0
  101. package/dist/ref_util.cjs.map +1 -0
  102. package/dist/ref_util.d.ts +11 -12
  103. package/dist/ref_util.js +18 -0
  104. package/dist/ref_util.js.map +1 -0
  105. package/dist/render/accessor.cjs +233 -0
  106. package/dist/render/accessor.cjs.map +1 -0
  107. package/dist/render/accessor.d.ts +0 -1
  108. package/dist/render/accessor.js +230 -0
  109. package/dist/render/accessor.js.map +1 -0
  110. package/dist/render/api.cjs +514 -0
  111. package/dist/render/api.cjs.map +1 -0
  112. package/dist/render/api.d.ts +0 -1
  113. package/dist/render/api.js +511 -0
  114. package/dist/render/api.js.map +1 -0
  115. package/dist/render/future.cjs +35 -0
  116. package/dist/render/future.cjs.map +1 -0
  117. package/dist/render/future.d.ts +0 -1
  118. package/dist/render/future.js +33 -0
  119. package/dist/render/future.js.map +1 -0
  120. package/dist/render/index.d.ts +0 -1
  121. package/dist/render/internal.cjs +43 -0
  122. package/dist/render/internal.cjs.map +1 -0
  123. package/dist/render/internal.d.ts +0 -1
  124. package/dist/render/internal.js +37 -0
  125. package/dist/render/internal.js.map +1 -0
  126. package/dist/render/traversal_ops.d.ts +0 -1
  127. package/dist/render/util/axis_filtering.cjs +87 -0
  128. package/dist/render/util/axis_filtering.cjs.map +1 -0
  129. package/dist/render/util/axis_filtering.d.ts +0 -1
  130. package/dist/render/util/axis_filtering.js +85 -0
  131. package/dist/render/util/axis_filtering.js.map +1 -0
  132. package/dist/render/util/column_collection.cjs +309 -0
  133. package/dist/render/util/column_collection.cjs.map +1 -0
  134. package/dist/render/util/column_collection.d.ts +0 -1
  135. package/dist/render/util/column_collection.js +307 -0
  136. package/dist/render/util/column_collection.js.map +1 -0
  137. package/dist/render/util/index.d.ts +0 -1
  138. package/dist/render/util/label.cjs +153 -0
  139. package/dist/render/util/label.cjs.map +1 -0
  140. package/dist/render/util/label.d.ts +0 -3
  141. package/dist/render/util/label.js +149 -0
  142. package/dist/render/util/label.js.map +1 -0
  143. package/dist/render/util/pcolumn_data.cjs +342 -0
  144. package/dist/render/util/pcolumn_data.cjs.map +1 -0
  145. package/dist/render/util/pcolumn_data.d.ts +0 -1
  146. package/dist/render/util/pcolumn_data.js +330 -0
  147. package/dist/render/util/pcolumn_data.js.map +1 -0
  148. package/dist/render/util/pframe_upgraders.cjs +47 -0
  149. package/dist/render/util/pframe_upgraders.cjs.map +1 -0
  150. package/dist/render/util/pframe_upgraders.d.ts +0 -1
  151. package/dist/render/util/pframe_upgraders.js +45 -0
  152. package/dist/render/util/pframe_upgraders.js.map +1 -0
  153. package/dist/render/util/split_selectors.d.ts +0 -1
  154. package/dist/sdk_info.cjs +10 -0
  155. package/dist/sdk_info.cjs.map +1 -0
  156. package/dist/sdk_info.d.ts +0 -1
  157. package/dist/sdk_info.js +8 -0
  158. package/dist/sdk_info.js.map +1 -0
  159. package/dist/unionize.d.ts +0 -1
  160. package/dist/version.cjs +8 -0
  161. package/dist/version.cjs.map +1 -0
  162. package/dist/version.d.ts +0 -1
  163. package/dist/version.js +6 -0
  164. package/dist/version.js.map +1 -0
  165. package/package.json +16 -18
  166. package/src/components/PFrameForGraphs.test.ts +22 -23
  167. package/src/components/PFrameForGraphs.ts +56 -75
  168. package/src/components/PlAnnotations/filters_ui.test.ts +1 -1
  169. package/src/components/PlDataTable.ts +9 -6
  170. package/src/components/PlMultiSequenceAlignment.ts +9 -5
  171. package/src/render/api.ts +4 -2
  172. package/src/render/util/column_collection.ts +3 -2
  173. package/src/render/util/label.test.ts +5 -5
  174. package/src/render/util/label.ts +4 -7
  175. package/src/typing.test.ts +2 -1
  176. package/dist/bconfig/index.d.ts.map +0 -1
  177. package/dist/bconfig/lambdas.d.ts.map +0 -1
  178. package/dist/bconfig/normalization.d.ts.map +0 -1
  179. package/dist/bconfig/types.d.ts.map +0 -1
  180. package/dist/bconfig/util.d.ts.map +0 -1
  181. package/dist/bconfig/v3.d.ts.map +0 -1
  182. package/dist/block_api_v1.d.ts.map +0 -1
  183. package/dist/block_api_v2.d.ts.map +0 -1
  184. package/dist/block_state_patch.d.ts.map +0 -1
  185. package/dist/block_state_util.d.ts.map +0 -1
  186. package/dist/branding.d.ts.map +0 -1
  187. package/dist/builder.d.ts.map +0 -1
  188. package/dist/components/PFrameForGraphs.d.ts.map +0 -1
  189. package/dist/components/PlAnnotations/filter.d.ts.map +0 -1
  190. package/dist/components/PlAnnotations/filters_ui.d.ts.map +0 -1
  191. package/dist/components/PlAnnotations/index.d.ts.map +0 -1
  192. package/dist/components/PlAnnotations/types.d.ts.map +0 -1
  193. package/dist/components/PlDataTable.d.ts.map +0 -1
  194. package/dist/components/PlMultiSequenceAlignment.d.ts.map +0 -1
  195. package/dist/components/PlSelectionModel.d.ts.map +0 -1
  196. package/dist/components/index.d.ts.map +0 -1
  197. package/dist/config/actions.d.ts.map +0 -1
  198. package/dist/config/actions_kinds.d.ts.map +0 -1
  199. package/dist/config/index.d.ts.map +0 -1
  200. package/dist/config/model.d.ts.map +0 -1
  201. package/dist/config/model_meta.d.ts.map +0 -1
  202. package/dist/config/type_engine.d.ts.map +0 -1
  203. package/dist/config/type_util.d.ts.map +0 -1
  204. package/dist/env_value.d.ts.map +0 -1
  205. package/dist/index.d.ts.map +0 -1
  206. package/dist/index.mjs +0 -2875
  207. package/dist/index.mjs.map +0 -1
  208. package/dist/internal.d.ts.map +0 -1
  209. package/dist/pframe.d.ts.map +0 -1
  210. package/dist/platforma.d.ts.map +0 -1
  211. package/dist/raw_globals.d.ts.map +0 -1
  212. package/dist/ref_util.d.ts.map +0 -1
  213. package/dist/render/accessor.d.ts.map +0 -1
  214. package/dist/render/api.d.ts.map +0 -1
  215. package/dist/render/future.d.ts.map +0 -1
  216. package/dist/render/index.d.ts.map +0 -1
  217. package/dist/render/internal.d.ts.map +0 -1
  218. package/dist/render/traversal_ops.d.ts.map +0 -1
  219. package/dist/render/util/axis_filtering.d.ts.map +0 -1
  220. package/dist/render/util/column_collection.d.ts.map +0 -1
  221. package/dist/render/util/index.d.ts.map +0 -1
  222. package/dist/render/util/label.d.ts.map +0 -1
  223. package/dist/render/util/pcolumn_data.d.ts.map +0 -1
  224. package/dist/render/util/pframe_upgraders.d.ts.map +0 -1
  225. package/dist/render/util/split_selectors.d.ts.map +0 -1
  226. package/dist/sdk_info.d.ts.map +0 -1
  227. package/dist/unionize.d.ts.map +0 -1
  228. package/dist/version.d.ts.map +0 -1
@@ -0,0 +1,33 @@
1
+ import { registerFutureAwait } from '../internal.js';
2
+
3
+ class FutureRef {
4
+ handle;
5
+ postProcess;
6
+ isResolved = false;
7
+ resolvedValue;
8
+ constructor(handle, postProcess = (v) => v) {
9
+ this.handle = handle;
10
+ this.postProcess = postProcess;
11
+ registerFutureAwait(handle, (value) => {
12
+ this.resolvedValue = postProcess(value);
13
+ this.isResolved = true;
14
+ });
15
+ }
16
+ map(mapping) {
17
+ return new FutureRef(this.handle, (v) => mapping(this.postProcess(v)));
18
+ }
19
+ mapDefined(mapping) {
20
+ return new FutureRef(this.handle, (v) => {
21
+ const vv = this.postProcess(v);
22
+ return vv ? mapping(vv) : undefined;
23
+ });
24
+ }
25
+ toJSON() {
26
+ return this.isResolved
27
+ ? this.resolvedValue
28
+ : { __awaited_futures__: [this.handle] };
29
+ }
30
+ }
31
+
32
+ export { FutureRef };
33
+ //# sourceMappingURL=future.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"future.js","sources":["../../src/render/future.ts"],"sourcesContent":["import type { FutureAwait, FutureHandle } from './internal';\nimport { registerFutureAwait } from '../internal';\n\nexport class FutureRef<T = unknown> {\n private isResolved = false;\n private resolvedValue?: T;\n\n constructor(\n private readonly handle: FutureHandle,\n private readonly postProcess: (value: unknown) => T = (v) => v as T,\n ) {\n registerFutureAwait(handle, (value) => {\n this.resolvedValue = postProcess(value);\n this.isResolved = true;\n });\n }\n\n public map<R>(mapping: (v: T) => R): FutureRef<R> {\n return new FutureRef<R>(this.handle, (v) => mapping(this.postProcess(v)));\n }\n\n public mapDefined<R>(mapping: (v: NonNullable<T>) => R): FutureRef<R | undefined> {\n return new FutureRef<R | undefined>(this.handle, (v) => {\n const vv = this.postProcess(v);\n return vv ? mapping(vv) : undefined;\n });\n }\n\n toJSON() {\n return this.isResolved\n ? this.resolvedValue\n : ({ __awaited_futures__: [this.handle] } as FutureAwait);\n }\n}\n\nexport type ExtractFutureRefType<Ref extends FutureRef> =\n Ref extends FutureRef<infer T> ? T : never;\n"],"names":[],"mappings":";;MAGa,SAAS,CAAA;AAKD,IAAA,MAAA;AACA,IAAA,WAAA;IALX,UAAU,GAAG,KAAK;AAClB,IAAA,aAAa;IAErB,WAAA,CACmB,MAAoB,EACpB,WAAA,GAAqC,CAAC,CAAC,KAAK,CAAM,EAAA;QADlD,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,WAAW,GAAX,WAAW;AAE5B,QAAA,mBAAmB,CAAC,MAAM,EAAE,CAAC,KAAK,KAAI;AACpC,YAAA,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC;AACvC,YAAA,IAAI,CAAC,UAAU,GAAG,IAAI;AACxB,QAAA,CAAC,CAAC;IACJ;AAEO,IAAA,GAAG,CAAI,OAAoB,EAAA;QAChC,OAAO,IAAI,SAAS,CAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E;AAEO,IAAA,UAAU,CAAI,OAAiC,EAAA;QACpD,OAAO,IAAI,SAAS,CAAgB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,KAAI;YACrD,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AAC9B,YAAA,OAAO,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS;AACrC,QAAA,CAAC,CAAC;IACJ;IAEA,MAAM,GAAA;QACJ,OAAO,IAAI,CAAC;cACR,IAAI,CAAC;cACJ,EAAE,mBAAmB,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAkB;IAC7D;AACD;;;;"}
@@ -4,4 +4,3 @@ export * from './accessor';
4
4
  export * from './util';
5
5
  export { type ExtractFutureRefType } from './future';
6
6
  export { FutureRef } from './future';
7
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ const StagingAccessorName = 'staging';
4
+ const MainAccessorName = 'main';
5
+ const GlobalCfgRenderCtxFeatureFlags = {
6
+ explicitColumnsSupport: true,
7
+ inlineColumnsSupport: true,
8
+ activeArgs: true,
9
+ pTablePartitionFiltersSupport: true,
10
+ pFrameInSetFilterSupport: true,
11
+ };
12
+ function isFutureAwait(obj) {
13
+ return typeof obj === 'object' && obj !== null && '__awaited_futures__' in obj;
14
+ }
15
+ function addAllFutureAwaits(set, visited, node) {
16
+ if (visited.has(node))
17
+ return;
18
+ visited.add(node);
19
+ const type = typeof node;
20
+ if (type === 'object') {
21
+ if (isFutureAwait(node))
22
+ node.__awaited_futures__.forEach((a) => set.add(a));
23
+ else if (Array.isArray(node))
24
+ for (const nested of node)
25
+ addAllFutureAwaits(set, visited, nested);
26
+ else
27
+ for (const [, nested] of Object.entries(node))
28
+ if (nested !== node)
29
+ addAllFutureAwaits(set, visited, nested);
30
+ }
31
+ }
32
+ function getAllFutureAwaits(obj) {
33
+ const set = new Set();
34
+ addAllFutureAwaits(set, new Set(), obj);
35
+ return set;
36
+ }
37
+
38
+ exports.GlobalCfgRenderCtxFeatureFlags = GlobalCfgRenderCtxFeatureFlags;
39
+ exports.MainAccessorName = MainAccessorName;
40
+ exports.StagingAccessorName = StagingAccessorName;
41
+ exports.getAllFutureAwaits = getAllFutureAwaits;
42
+ exports.isFutureAwait = isFutureAwait;
43
+ //# sourceMappingURL=internal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.cjs","sources":["../../src/render/internal.ts"],"sourcesContent":["import type { Optional } from 'utility-types';\nimport type { Branded } from '../branding';\nimport type { CommonFieldTraverseOps, FieldTraversalStep, ResourceType } from './traversal_ops';\nimport type {\n ArchiveFormat,\n AnyFunction,\n Option,\n PColumn,\n PColumnValues,\n PFrameDef,\n PFrameHandle,\n PObject,\n PObjectSpec,\n PSpecPredicate,\n PTableDef,\n PTableHandle,\n ResultCollection,\n ValueOrError,\n DataInfo,\n RangeBytes,\n} from '@milaboratories/pl-model-common';\n\nexport const StagingAccessorName = 'staging';\nexport const MainAccessorName = 'main';\n\nexport type AccessorHandle = Branded<string, 'AccessorHandle'>;\nexport type FutureHandle = Branded<string, 'FutureHandle'>;\n\nexport interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = FutureHandle> {\n\n //\n // Root accessor creation\n //\n\n getAccessorHandleByName(name: string): AHandle | undefined;\n\n //\n // Basic resource accessor actions\n //\n\n resolveWithCommon(\n handle: AHandle,\n commonOptions: CommonFieldTraverseOps,\n ...steps: (FieldTraversalStep | string)[]\n ): AHandle | undefined;\n\n getResourceType(handle: AHandle): ResourceType;\n\n getInputsLocked(handle: AHandle): boolean;\n\n getOutputsLocked(handle: AHandle): boolean;\n\n getIsReadyOrError(handle: AHandle): boolean;\n\n getIsFinal(handle: AHandle): boolean;\n\n getError(handle: AHandle): AHandle | undefined;\n\n listInputFields(handle: AHandle): string[];\n\n listOutputFields(handle: AHandle): string[];\n\n listDynamicFields(handle: AHandle): string[];\n\n getKeyValueBase64(handle: AHandle, key: string): string | undefined;\n\n getKeyValueAsString(handle: AHandle, key: string): string | undefined;\n\n getDataBase64(handle: AHandle): string | undefined;\n\n getDataAsString(handle: AHandle): string | undefined;\n\n /** If not final returns undefined */\n parsePObjectCollection(\n handle: AHandle,\n errorOnUnknownField: boolean,\n prefix: string,\n ...resolvePath: string[]\n ): Record<string, PObject<AHandle>> | undefined;\n\n //\n // Blob\n //\n\n getBlobContentAsBase64(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getBlobContentAsString(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getDownloadedBlobContentHandle(handle: AHandle): FHandle; // LocalBlobHandleAndSize | undefined;\n\n getOnDemandBlobContentHandle(handle: AHandle): FHandle; // RemoteBlobHandleAndSize | undefined;\n\n //\n // Blobs to URLs\n //\n\n extractArchiveAndGetURL(handle: AHandle, format: ArchiveFormat): FHandle;\n\n //\n // Import progress\n //\n\n getImportProgress(handle: AHandle): FHandle; // ImportProgress;\n\n //\n // Logs\n //\n\n getLastLogs(handle: AHandle, nLines: number): FHandle; // string | undefined;\n\n getProgressLog(handle: AHandle, patternToSearch: string): FHandle; // string | undefined;\n\n getProgressLogWithInfo(handle: AHandle, patternToSearch: string): FHandle; // ProgressLogWithInfo | undefined;\n\n getLogHandle(handle: AHandle): FHandle; // AnyLogHandle | undefined;\n\n //\n // Blocks\n //\n\n /** @deprecated at some point will stop working and will return dummy values */\n getBlockLabel(blockId: string): string;\n\n //\n // Result Pool\n //\n\n getDataFromResultPool(): ResultCollection<PObject<AHandle>>;\n\n getDataWithErrorsFromResultPool(): ResultCollection<\n Optional<PObject<ValueOrError<AHandle, Error>>, 'id'>\n >;\n\n getSpecsFromResultPool(): ResultCollection<PObjectSpec>;\n\n getSpecFromResultPoolByRef(blockId: string, exportName: string): PObjectSpec | undefined;\n\n getDataFromResultPoolByRef(blockId: string, exportName: string): PObject<AHandle> | undefined;\n\n calculateOptions(predicate: PSpecPredicate): Option[];\n\n //\n // PFrame / PTable\n //\n\n createPFrame(def: PFrameDef<AHandle | PColumnValues | DataInfo<AHandle>>): PFrameHandle;\n\n createPTable(def: PTableDef<PColumn<AHandle | PColumnValues | DataInfo<AHandle>>>): PTableHandle;\n\n //\n // Computable\n //\n\n getCurrentUnstableMarker(): string | undefined;\n\n //\n // Logging\n //\n\n logInfo(message: string): void;\n\n logWarn(message: string): void;\n\n logError(message: string): void;\n}\n\nexport const GlobalCfgRenderCtxFeatureFlags = {\n explicitColumnsSupport: true as const,\n inlineColumnsSupport: true as const,\n activeArgs: true as const,\n pTablePartitionFiltersSupport: true as const,\n pFrameInSetFilterSupport: true as const,\n};\n\nexport interface GlobalCfgRenderCtx extends GlobalCfgRenderCtxMethods {\n //\n // State: Args, UI State, Active Args\n //\n // Old runtime injects these values as strings, new runtime injects them as functions\n // that return strings, if block declares supportsLazyState flag.\n // If function not called in lazy state API, then resulting output will not depend on these values,\n // and thus will not be recalculated on corresponding state change.\n //\n\n readonly args: string | (() => string);\n readonly uiState: string | (() => string);\n readonly activeArgs: undefined | string | (() => string | undefined);\n\n // Note: strings below are used because, anyway, using strings is the only way\n // to get data inside the QuickJS context, as it is implemented now. With this\n // approach deserialization can be lazily postponed until it is actually needed.\n readonly callbackRegistry: Record<string, AnyFunction>;\n readonly featureFlags?: typeof GlobalCfgRenderCtxFeatureFlags;\n}\n\nexport type FutureAwait = {\n __awaited_futures__: FutureHandle[];\n};\n\nexport function isFutureAwait(obj: unknown): obj is FutureAwait {\n return typeof obj === 'object' && obj !== null && '__awaited_futures__' in obj;\n}\n\nfunction addAllFutureAwaits(set: Set<string>, visited: Set<unknown>, node: unknown) {\n if (visited.has(node)) return;\n visited.add(node);\n\n const type = typeof node;\n if (type === 'object') {\n if (isFutureAwait(node)) node.__awaited_futures__.forEach((a) => set.add(a));\n else if (Array.isArray(node))\n for (const nested of node) addAllFutureAwaits(set, visited, nested);\n else\n for (const [, nested] of Object.entries(node as object))\n if (nested !== node) addAllFutureAwaits(set, visited, nested);\n }\n}\n\nexport function getAllFutureAwaits(obj: unknown): Set<string> {\n const set = new Set<string>();\n addAllFutureAwaits(set, new Set(), obj);\n return set;\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,mBAAmB,GAAG;AAC5B,MAAM,gBAAgB,GAAG;AA+IzB,MAAM,8BAA8B,GAAG;AAC5C,IAAA,sBAAsB,EAAE,IAAa;AACrC,IAAA,oBAAoB,EAAE,IAAa;AACnC,IAAA,UAAU,EAAE,IAAa;AACzB,IAAA,6BAA6B,EAAE,IAAa;AAC5C,IAAA,wBAAwB,EAAE,IAAa;;AA4BnC,SAAU,aAAa,CAAC,GAAY,EAAA;AACxC,IAAA,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,qBAAqB,IAAI,GAAG;AAChF;AAEA,SAAS,kBAAkB,CAAC,GAAgB,EAAE,OAAqB,EAAE,IAAa,EAAA;AAChF,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE;AACvB,IAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AAEjB,IAAA,MAAM,IAAI,GAAG,OAAO,IAAI;AACxB,IAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,IAAI,aAAa,CAAC,IAAI,CAAC;AAAE,YAAA,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvE,aAAA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAC1B,KAAK,MAAM,MAAM,IAAI,IAAI;AAAE,gBAAA,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC;;YAEnE,KAAK,MAAM,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAc,CAAC;gBACrD,IAAI,MAAM,KAAK,IAAI;AAAE,oBAAA,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC;IACnE;AACF;AAEM,SAAU,kBAAkB,CAAC,GAAY,EAAA;AAC7C,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU;IAC7B,kBAAkB,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC;AACvC,IAAA,OAAO,GAAG;AACZ;;;;;;;;"}
@@ -68,4 +68,3 @@ export type FutureAwait = {
68
68
  };
69
69
  export declare function isFutureAwait(obj: unknown): obj is FutureAwait;
70
70
  export declare function getAllFutureAwaits(obj: unknown): Set<string>;
71
- //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1,37 @@
1
+ const StagingAccessorName = 'staging';
2
+ const MainAccessorName = 'main';
3
+ const GlobalCfgRenderCtxFeatureFlags = {
4
+ explicitColumnsSupport: true,
5
+ inlineColumnsSupport: true,
6
+ activeArgs: true,
7
+ pTablePartitionFiltersSupport: true,
8
+ pFrameInSetFilterSupport: true,
9
+ };
10
+ function isFutureAwait(obj) {
11
+ return typeof obj === 'object' && obj !== null && '__awaited_futures__' in obj;
12
+ }
13
+ function addAllFutureAwaits(set, visited, node) {
14
+ if (visited.has(node))
15
+ return;
16
+ visited.add(node);
17
+ const type = typeof node;
18
+ if (type === 'object') {
19
+ if (isFutureAwait(node))
20
+ node.__awaited_futures__.forEach((a) => set.add(a));
21
+ else if (Array.isArray(node))
22
+ for (const nested of node)
23
+ addAllFutureAwaits(set, visited, nested);
24
+ else
25
+ for (const [, nested] of Object.entries(node))
26
+ if (nested !== node)
27
+ addAllFutureAwaits(set, visited, nested);
28
+ }
29
+ }
30
+ function getAllFutureAwaits(obj) {
31
+ const set = new Set();
32
+ addAllFutureAwaits(set, new Set(), obj);
33
+ return set;
34
+ }
35
+
36
+ export { GlobalCfgRenderCtxFeatureFlags, MainAccessorName, StagingAccessorName, getAllFutureAwaits, isFutureAwait };
37
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sources":["../../src/render/internal.ts"],"sourcesContent":["import type { Optional } from 'utility-types';\nimport type { Branded } from '../branding';\nimport type { CommonFieldTraverseOps, FieldTraversalStep, ResourceType } from './traversal_ops';\nimport type {\n ArchiveFormat,\n AnyFunction,\n Option,\n PColumn,\n PColumnValues,\n PFrameDef,\n PFrameHandle,\n PObject,\n PObjectSpec,\n PSpecPredicate,\n PTableDef,\n PTableHandle,\n ResultCollection,\n ValueOrError,\n DataInfo,\n RangeBytes,\n} from '@milaboratories/pl-model-common';\n\nexport const StagingAccessorName = 'staging';\nexport const MainAccessorName = 'main';\n\nexport type AccessorHandle = Branded<string, 'AccessorHandle'>;\nexport type FutureHandle = Branded<string, 'FutureHandle'>;\n\nexport interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = FutureHandle> {\n\n //\n // Root accessor creation\n //\n\n getAccessorHandleByName(name: string): AHandle | undefined;\n\n //\n // Basic resource accessor actions\n //\n\n resolveWithCommon(\n handle: AHandle,\n commonOptions: CommonFieldTraverseOps,\n ...steps: (FieldTraversalStep | string)[]\n ): AHandle | undefined;\n\n getResourceType(handle: AHandle): ResourceType;\n\n getInputsLocked(handle: AHandle): boolean;\n\n getOutputsLocked(handle: AHandle): boolean;\n\n getIsReadyOrError(handle: AHandle): boolean;\n\n getIsFinal(handle: AHandle): boolean;\n\n getError(handle: AHandle): AHandle | undefined;\n\n listInputFields(handle: AHandle): string[];\n\n listOutputFields(handle: AHandle): string[];\n\n listDynamicFields(handle: AHandle): string[];\n\n getKeyValueBase64(handle: AHandle, key: string): string | undefined;\n\n getKeyValueAsString(handle: AHandle, key: string): string | undefined;\n\n getDataBase64(handle: AHandle): string | undefined;\n\n getDataAsString(handle: AHandle): string | undefined;\n\n /** If not final returns undefined */\n parsePObjectCollection(\n handle: AHandle,\n errorOnUnknownField: boolean,\n prefix: string,\n ...resolvePath: string[]\n ): Record<string, PObject<AHandle>> | undefined;\n\n //\n // Blob\n //\n\n getBlobContentAsBase64(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getBlobContentAsString(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getDownloadedBlobContentHandle(handle: AHandle): FHandle; // LocalBlobHandleAndSize | undefined;\n\n getOnDemandBlobContentHandle(handle: AHandle): FHandle; // RemoteBlobHandleAndSize | undefined;\n\n //\n // Blobs to URLs\n //\n\n extractArchiveAndGetURL(handle: AHandle, format: ArchiveFormat): FHandle;\n\n //\n // Import progress\n //\n\n getImportProgress(handle: AHandle): FHandle; // ImportProgress;\n\n //\n // Logs\n //\n\n getLastLogs(handle: AHandle, nLines: number): FHandle; // string | undefined;\n\n getProgressLog(handle: AHandle, patternToSearch: string): FHandle; // string | undefined;\n\n getProgressLogWithInfo(handle: AHandle, patternToSearch: string): FHandle; // ProgressLogWithInfo | undefined;\n\n getLogHandle(handle: AHandle): FHandle; // AnyLogHandle | undefined;\n\n //\n // Blocks\n //\n\n /** @deprecated at some point will stop working and will return dummy values */\n getBlockLabel(blockId: string): string;\n\n //\n // Result Pool\n //\n\n getDataFromResultPool(): ResultCollection<PObject<AHandle>>;\n\n getDataWithErrorsFromResultPool(): ResultCollection<\n Optional<PObject<ValueOrError<AHandle, Error>>, 'id'>\n >;\n\n getSpecsFromResultPool(): ResultCollection<PObjectSpec>;\n\n getSpecFromResultPoolByRef(blockId: string, exportName: string): PObjectSpec | undefined;\n\n getDataFromResultPoolByRef(blockId: string, exportName: string): PObject<AHandle> | undefined;\n\n calculateOptions(predicate: PSpecPredicate): Option[];\n\n //\n // PFrame / PTable\n //\n\n createPFrame(def: PFrameDef<AHandle | PColumnValues | DataInfo<AHandle>>): PFrameHandle;\n\n createPTable(def: PTableDef<PColumn<AHandle | PColumnValues | DataInfo<AHandle>>>): PTableHandle;\n\n //\n // Computable\n //\n\n getCurrentUnstableMarker(): string | undefined;\n\n //\n // Logging\n //\n\n logInfo(message: string): void;\n\n logWarn(message: string): void;\n\n logError(message: string): void;\n}\n\nexport const GlobalCfgRenderCtxFeatureFlags = {\n explicitColumnsSupport: true as const,\n inlineColumnsSupport: true as const,\n activeArgs: true as const,\n pTablePartitionFiltersSupport: true as const,\n pFrameInSetFilterSupport: true as const,\n};\n\nexport interface GlobalCfgRenderCtx extends GlobalCfgRenderCtxMethods {\n //\n // State: Args, UI State, Active Args\n //\n // Old runtime injects these values as strings, new runtime injects them as functions\n // that return strings, if block declares supportsLazyState flag.\n // If function not called in lazy state API, then resulting output will not depend on these values,\n // and thus will not be recalculated on corresponding state change.\n //\n\n readonly args: string | (() => string);\n readonly uiState: string | (() => string);\n readonly activeArgs: undefined | string | (() => string | undefined);\n\n // Note: strings below are used because, anyway, using strings is the only way\n // to get data inside the QuickJS context, as it is implemented now. With this\n // approach deserialization can be lazily postponed until it is actually needed.\n readonly callbackRegistry: Record<string, AnyFunction>;\n readonly featureFlags?: typeof GlobalCfgRenderCtxFeatureFlags;\n}\n\nexport type FutureAwait = {\n __awaited_futures__: FutureHandle[];\n};\n\nexport function isFutureAwait(obj: unknown): obj is FutureAwait {\n return typeof obj === 'object' && obj !== null && '__awaited_futures__' in obj;\n}\n\nfunction addAllFutureAwaits(set: Set<string>, visited: Set<unknown>, node: unknown) {\n if (visited.has(node)) return;\n visited.add(node);\n\n const type = typeof node;\n if (type === 'object') {\n if (isFutureAwait(node)) node.__awaited_futures__.forEach((a) => set.add(a));\n else if (Array.isArray(node))\n for (const nested of node) addAllFutureAwaits(set, visited, nested);\n else\n for (const [, nested] of Object.entries(node as object))\n if (nested !== node) addAllFutureAwaits(set, visited, nested);\n }\n}\n\nexport function getAllFutureAwaits(obj: unknown): Set<string> {\n const set = new Set<string>();\n addAllFutureAwaits(set, new Set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GAAG,IAAI,GAAG,EAAU;IAC7B,kBAAkB,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC;AACvC,IAAA,OAAO,GAAG;AACZ;;;;"}
@@ -46,4 +46,3 @@ export type GetFieldStep = CommonFieldTraverseOps & {
46
46
  assertFieldType?: FieldType;
47
47
  };
48
48
  export type FieldTraversalStep = GetFieldStep & ResourceTraversalOps;
49
- //# sourceMappingURL=traversal_ops.d.ts.map
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+
3
+ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
4
+ // Sort filters by axis index in descending order to safely remove elements from arrays
5
+ const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
6
+ // Check for invalid filter axes
7
+ const { type } = dataInfoEntries;
8
+ switch (type) {
9
+ case 'Json': {
10
+ const { keyLength } = dataInfoEntries;
11
+ for (const [axisIdx] of axisFilters)
12
+ if (axisIdx >= keyLength)
13
+ throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
14
+ break;
15
+ }
16
+ case 'JsonPartitioned':
17
+ case 'BinaryPartitioned':
18
+ case 'ParquetPartitioned': {
19
+ const { partitionKeyLength } = dataInfoEntries;
20
+ for (const [axisIdx] of axisFilters)
21
+ if (axisIdx >= partitionKeyLength)
22
+ throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
23
+ break;
24
+ }
25
+ default:
26
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
27
+ throw new Error(`Unsupported data info type: ${type}`);
28
+ }
29
+ const keyMatchesFilters = (key) => {
30
+ for (const [axisIdx, axisValue] of sortedFilters)
31
+ if (key[axisIdx] !== axisValue)
32
+ return false;
33
+ return true;
34
+ };
35
+ const removeFilteredAxes = (key) => {
36
+ const newKey = [...key];
37
+ // Remove axes in descending order to maintain correct indices
38
+ for (const [axisIdx] of sortedFilters)
39
+ newKey.splice(axisIdx, 1);
40
+ return newKey;
41
+ };
42
+ switch (dataInfoEntries.type) {
43
+ case 'Json': return {
44
+ type: 'Json',
45
+ keyLength: dataInfoEntries.keyLength - axisFilters.length,
46
+ data: dataInfoEntries.data
47
+ .filter((entry) => keyMatchesFilters(entry.key))
48
+ .map((entry) => ({
49
+ key: removeFilteredAxes(entry.key),
50
+ value: entry.value,
51
+ })),
52
+ };
53
+ case 'JsonPartitioned': return {
54
+ type: 'JsonPartitioned',
55
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
56
+ parts: dataInfoEntries.parts
57
+ .filter((entry) => keyMatchesFilters(entry.key))
58
+ .map((entry) => ({
59
+ key: removeFilteredAxes(entry.key),
60
+ value: entry.value,
61
+ })),
62
+ };
63
+ case 'BinaryPartitioned': return {
64
+ type: 'BinaryPartitioned',
65
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
66
+ parts: dataInfoEntries.parts
67
+ .filter((entry) => keyMatchesFilters(entry.key))
68
+ .map((entry) => ({
69
+ key: removeFilteredAxes(entry.key),
70
+ value: entry.value,
71
+ })),
72
+ };
73
+ case 'ParquetPartitioned': return {
74
+ type: 'ParquetPartitioned',
75
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
76
+ parts: dataInfoEntries.parts
77
+ .filter((entry) => keyMatchesFilters(entry.key))
78
+ .map((entry) => ({
79
+ key: removeFilteredAxes(entry.key),
80
+ value: entry.value,
81
+ })),
82
+ };
83
+ }
84
+ }
85
+
86
+ exports.filterDataInfoEntries = filterDataInfoEntries;
87
+ //# sourceMappingURL=axis_filtering.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axis_filtering.cjs","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from '@milaboratories/pl-model-common';\nimport type { AxisFilterByIdx } from '@milaboratories/pl-model-common';\n\n/**\n * Filters DataInfoEntries using axis filters, removing specified axes from keys and\n * only keeping entries that match the filter values.\n *\n * @param dataInfoEntries - The data info object to filter\n * @param axisFilters - Array of axis filters (index, value pairs)\n * @throws Error if any filter axis is outside the partitioning axes or data axes for Json data\n */\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: ParquetPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): ParquetPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: BinaryPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): BinaryPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: JsonPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): JsonPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: PartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): PartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries(\n dataInfoEntries: JsonDataInfoEntries,\n axisFilters: AxisFilterByIdx[],\n): JsonDataInfoEntries;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: DataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): DataInfoEntries<Blob> {\n // Sort filters by axis index in descending order to safely remove elements from arrays\n const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);\n\n // Check for invalid filter axes\n const { type } = dataInfoEntries;\n switch (type) {\n case 'Json': {\n const { keyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= keyLength)\n throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);\n break;\n }\n case 'JsonPartitioned':\n case 'BinaryPartitioned':\n case 'ParquetPartitioned': {\n const { partitionKeyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= partitionKeyLength)\n throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);\n break;\n }\n default:\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unsupported data info type: ${type satisfies never}`);\n }\n\n const keyMatchesFilters = (key: PColumnKey): boolean => {\n for (const [axisIdx, axisValue] of sortedFilters)\n if (key[axisIdx] !== axisValue)\n return false;\n return true;\n };\n\n const removeFilteredAxes = (key: PColumnKey): PColumnKey => {\n const newKey = [...key];\n\n // Remove axes in descending order to maintain correct indices\n for (const [axisIdx] of sortedFilters)\n newKey.splice(axisIdx, 1);\n\n return newKey;\n };\n\n switch (dataInfoEntries.type) {\n case 'Json': return {\n type: 'Json',\n keyLength: dataInfoEntries.keyLength - axisFilters.length,\n data: dataInfoEntries.data\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<PColumnValue>)),\n };\n case 'JsonPartitioned': return {\n type: 'JsonPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<Blob>)),\n };\n case 'BinaryPartitioned': return {\n type: 'BinaryPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<BinaryChunk<Blob>>)),\n };\n case 'ParquetPartitioned': return {\n type: 'ParquetPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n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,EAAE,OAAO;AAC/B,YAAA,IAAI,EAAE,mBAAmB;AACzB,YAAA,kBAAkB,EAAE,eAAe,CAAC,kBAAkB,GAAG,WAAW,CAAC,MAAM;YAC3E,KAAK,EAAE,eAAe,CAAC;AACpB,iBAAA,MAAM,CAAC,CAAC,KAAK,KAAK,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9C,iBAAA,GAAG,CAAC,CAAC,KAAK,MAAM;AACf,gBAAA,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;AAC4B,aAAA,CAAA,CAAC;SACpD;QACD,KAAK,oBAAoB,EAAE,OAAO;AAChC,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,kBAAkB,EAAE,eAAe,CAAC,kBAAkB,GAAG,WAAW,CAAC,MAAM;YAC3E,KAAK,EAAE,eAAe,CAAC;AACpB,iBAAA,MAAM,CAAC,CAAC,KAAK,KAAK,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9C,iBAAA,GAAG,CAAC,CAAC,KAAK,MAAM;AACf,gBAAA,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;AACe,aAAA,CAAA,CAAC;SACvC;;AAEL;;;;"}
@@ -12,4 +12,3 @@ export declare function filterDataInfoEntries<Blob>(dataInfoEntries: BinaryParti
12
12
  export declare function filterDataInfoEntries<Blob>(dataInfoEntries: JsonPartitionedDataInfoEntries<Blob>, axisFilters: AxisFilterByIdx[]): JsonPartitionedDataInfoEntries<Blob>;
13
13
  export declare function filterDataInfoEntries<Blob>(dataInfoEntries: PartitionedDataInfoEntries<Blob>, axisFilters: AxisFilterByIdx[]): PartitionedDataInfoEntries<Blob>;
14
14
  export declare function filterDataInfoEntries(dataInfoEntries: JsonDataInfoEntries, axisFilters: AxisFilterByIdx[]): JsonDataInfoEntries;
15
- //# sourceMappingURL=axis_filtering.d.ts.map
@@ -0,0 +1,85 @@
1
+ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
2
+ // Sort filters by axis index in descending order to safely remove elements from arrays
3
+ const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
4
+ // Check for invalid filter axes
5
+ const { type } = dataInfoEntries;
6
+ switch (type) {
7
+ case 'Json': {
8
+ const { keyLength } = dataInfoEntries;
9
+ for (const [axisIdx] of axisFilters)
10
+ if (axisIdx >= keyLength)
11
+ throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
12
+ break;
13
+ }
14
+ case 'JsonPartitioned':
15
+ case 'BinaryPartitioned':
16
+ case 'ParquetPartitioned': {
17
+ const { partitionKeyLength } = dataInfoEntries;
18
+ for (const [axisIdx] of axisFilters)
19
+ if (axisIdx >= partitionKeyLength)
20
+ throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
21
+ break;
22
+ }
23
+ default:
24
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
25
+ throw new Error(`Unsupported data info type: ${type}`);
26
+ }
27
+ const keyMatchesFilters = (key) => {
28
+ for (const [axisIdx, axisValue] of sortedFilters)
29
+ if (key[axisIdx] !== axisValue)
30
+ return false;
31
+ return true;
32
+ };
33
+ const removeFilteredAxes = (key) => {
34
+ const newKey = [...key];
35
+ // Remove axes in descending order to maintain correct indices
36
+ for (const [axisIdx] of sortedFilters)
37
+ newKey.splice(axisIdx, 1);
38
+ return newKey;
39
+ };
40
+ switch (dataInfoEntries.type) {
41
+ case 'Json': return {
42
+ type: 'Json',
43
+ keyLength: dataInfoEntries.keyLength - axisFilters.length,
44
+ data: dataInfoEntries.data
45
+ .filter((entry) => keyMatchesFilters(entry.key))
46
+ .map((entry) => ({
47
+ key: removeFilteredAxes(entry.key),
48
+ value: entry.value,
49
+ })),
50
+ };
51
+ case 'JsonPartitioned': return {
52
+ type: 'JsonPartitioned',
53
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
54
+ parts: dataInfoEntries.parts
55
+ .filter((entry) => keyMatchesFilters(entry.key))
56
+ .map((entry) => ({
57
+ key: removeFilteredAxes(entry.key),
58
+ value: entry.value,
59
+ })),
60
+ };
61
+ case 'BinaryPartitioned': return {
62
+ type: 'BinaryPartitioned',
63
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
64
+ parts: dataInfoEntries.parts
65
+ .filter((entry) => keyMatchesFilters(entry.key))
66
+ .map((entry) => ({
67
+ key: removeFilteredAxes(entry.key),
68
+ value: entry.value,
69
+ })),
70
+ };
71
+ case 'ParquetPartitioned': return {
72
+ type: 'ParquetPartitioned',
73
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
74
+ parts: dataInfoEntries.parts
75
+ .filter((entry) => keyMatchesFilters(entry.key))
76
+ .map((entry) => ({
77
+ key: removeFilteredAxes(entry.key),
78
+ value: entry.value,
79
+ })),
80
+ };
81
+ }
82
+ }
83
+
84
+ export { filterDataInfoEntries };
85
+ //# sourceMappingURL=axis_filtering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axis_filtering.js","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from '@milaboratories/pl-model-common';\nimport type { AxisFilterByIdx } from '@milaboratories/pl-model-common';\n\n/**\n * Filters DataInfoEntries using axis filters, removing specified axes from keys and\n * only keeping entries that match the filter values.\n *\n * @param dataInfoEntries - The data info object to filter\n * @param axisFilters - Array of axis filters (index, value pairs)\n * @throws Error if any filter axis is outside the partitioning axes or data axes for Json data\n */\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: ParquetPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): ParquetPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: BinaryPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): BinaryPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: JsonPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): JsonPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: PartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): PartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries(\n dataInfoEntries: JsonDataInfoEntries,\n axisFilters: AxisFilterByIdx[],\n): JsonDataInfoEntries;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: DataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): DataInfoEntries<Blob> {\n // Sort filters by axis index in descending order to safely remove elements from arrays\n const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);\n\n // Check for invalid filter axes\n const { type } = dataInfoEntries;\n switch (type) {\n case 'Json': {\n const { keyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= keyLength)\n throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);\n break;\n }\n case 'JsonPartitioned':\n case 'BinaryPartitioned':\n case 'ParquetPartitioned': {\n const { partitionKeyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= partitionKeyLength)\n throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);\n break;\n }\n default:\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unsupported data info type: ${type satisfies never}`);\n }\n\n const keyMatchesFilters = (key: PColumnKey): boolean => {\n for (const [axisIdx, axisValue] of sortedFilters)\n if (key[axisIdx] !== axisValue)\n return false;\n return true;\n };\n\n const removeFilteredAxes = (key: PColumnKey): PColumnKey => {\n const newKey = [...key];\n\n // Remove axes in descending order to maintain correct indices\n for (const [axisIdx] of sortedFilters)\n newKey.splice(axisIdx, 1);\n\n return newKey;\n };\n\n switch (dataInfoEntries.type) {\n case 'Json': return {\n type: 'Json',\n keyLength: dataInfoEntries.keyLength - axisFilters.length,\n data: dataInfoEntries.data\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<PColumnValue>)),\n };\n case 'JsonPartitioned': return {\n type: 'JsonPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<Blob>)),\n };\n case 'BinaryPartitioned': return {\n type: 'BinaryPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<BinaryChunk<Blob>>)),\n };\n case 'ParquetPartitioned': return {\n type: 'ParquetPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map((entry) => ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n } satisfies PColumnDataEntry<Blob>)),\n };\n }\n}\n"],"names":[],"mappings":"AA0CM,SAAU,qBAAqB,CACnC,eAAsC,EACtC,WAA8B,EAAA;;IAG9B,MAAM,aAAa,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,C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