@platforma-sdk/model 1.30.26 → 1.31.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlDataTable.d.ts +12 -5
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +13 -0
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +1 -0
- package/dist/components/PlSelectionModel.d.ts +18 -0
- package/dist/components/PlSelectionModel.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/config/actions.d.ts +4 -4
- package/dist/config/actions.d.ts.map +1 -1
- package/dist/config/model.d.ts +4 -1
- package/dist/config/model.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +486 -445
- package/dist/index.mjs.map +1 -1
- package/dist/render/accessor.d.ts +4 -4
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/internal.d.ts +3 -3
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/PlDataTable.ts +32 -11
- package/src/components/PlMultiSequenceAlignment.ts +71 -0
- package/src/components/PlSelectionModel.ts +27 -0
- package/src/components/index.ts +3 -1
- package/src/config/actions.ts +7 -1
- package/src/config/model.ts +4 -1
- package/src/render/accessor.ts +7 -6
- package/src/render/internal.ts +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyLogHandle, ImportProgress, LocalBlobHandleAndSize, PColumn, PObject, RemoteBlobHandleAndSize, FolderURL, ArchiveFormat, ProgressLogWithInfo } from '@milaboratories/pl-model-common';
|
|
1
|
+
import { AnyLogHandle, ImportProgress, LocalBlobHandleAndSize, PColumn, PObject, RemoteBlobHandleAndSize, FolderURL, ArchiveFormat, ProgressLogWithInfo, RangeBytes } from '@milaboratories/pl-model-common';
|
|
2
2
|
import { FutureRef } from './future';
|
|
3
3
|
import { AccessorHandle } from './internal';
|
|
4
4
|
import { CommonFieldTraverseOps, FieldTraversalStep, ResourceType } from './traversal_ops';
|
|
@@ -79,9 +79,9 @@ export declare class TreeNodeAccessor {
|
|
|
79
79
|
*
|
|
80
80
|
*/
|
|
81
81
|
parsePObjectCollection(errorOnUnknownField?: boolean, prefix?: string): Record<string, PObject<TreeNodeAccessor>> | undefined;
|
|
82
|
-
getFileContentAsBase64(): FutureRef<string | undefined>;
|
|
83
|
-
getFileContentAsString(): FutureRef<string | undefined>;
|
|
84
|
-
getFileContentAsJson<T>(): FutureRef<T | undefined>;
|
|
82
|
+
getFileContentAsBase64(range?: RangeBytes): FutureRef<string | undefined>;
|
|
83
|
+
getFileContentAsString(range?: RangeBytes): FutureRef<string | undefined>;
|
|
84
|
+
getFileContentAsJson<T>(range?: RangeBytes): FutureRef<T | undefined>;
|
|
85
85
|
/**
|
|
86
86
|
* @deprecated use getFileContentAsBase64
|
|
87
87
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessor.d.ts","sourceRoot":"","sources":["../../src/render/accessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,mBAAmB,
|
|
1
|
+
{"version":3,"file":"accessor.d.ts","sourceRoot":"","sources":["../../src/render/accessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,UAAU,EACX,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,sBAA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IAItE,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAI3F,YAAY,IAAI,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC;IAInD,iBAAiB,CAAC,SAAS,GAAE,OAAO,GAAG,QAAkB,GAAG,OAAO;IAmBnE,SAAS,CAAC,CAAC,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,KAAK,CAAC,EACtD,IAAI,EAAE,WAAW,GAAG;QAAE,cAAc,EAAE,IAAI,CAAA;KAAE,GAC3C,CAAC,EAAE,GAAG,SAAS;IACX,SAAS,CAAC,CAAC,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,SAAS,KAAK,CAAC,EAClE,IAAI,CAAC,EAAE,WAAW,GACjB,CAAC,EAAE,GAAG,SAAS;CA4BnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Optional } from 'utility-types';
|
|
2
2
|
import { Branded } from '../branding';
|
|
3
3
|
import { CommonFieldTraverseOps, FieldTraversalStep, ResourceType } from './traversal_ops';
|
|
4
|
-
import { ArchiveFormat, AnyFunction, Option, PColumn, PColumnValues, PFrameDef, PFrameHandle, PObject, PObjectSpec, PSpecPredicate, PTableDef, PTableHandle, ResultCollection, ValueOrError, DataInfo } from '@milaboratories/pl-model-common';
|
|
4
|
+
import { ArchiveFormat, AnyFunction, Option, PColumn, PColumnValues, PFrameDef, PFrameHandle, PObject, PObjectSpec, PSpecPredicate, PTableDef, PTableHandle, ResultCollection, ValueOrError, DataInfo, RangeBytes } from '@milaboratories/pl-model-common';
|
|
5
5
|
export declare const StagingAccessorName = "staging";
|
|
6
6
|
export declare const MainAccessorName = "main";
|
|
7
7
|
export type AccessorHandle = Branded<string, 'AccessorHandle'>;
|
|
@@ -24,8 +24,8 @@ export interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = F
|
|
|
24
24
|
getDataAsString(handle: AHandle): string | undefined;
|
|
25
25
|
/** If not final returns undefined */
|
|
26
26
|
parsePObjectCollection(handle: AHandle, errorOnUnknownField: boolean, prefix: string, ...resolvePath: string[]): Record<string, PObject<AHandle>> | undefined;
|
|
27
|
-
getBlobContentAsBase64(handle: AHandle): FHandle;
|
|
28
|
-
getBlobContentAsString(handle: AHandle): FHandle;
|
|
27
|
+
getBlobContentAsBase64(handle: AHandle, range?: RangeBytes): FHandle;
|
|
28
|
+
getBlobContentAsString(handle: AHandle, range?: RangeBytes): FHandle;
|
|
29
29
|
getDownloadedBlobContentHandle(handle: AHandle): FHandle;
|
|
30
30
|
getOnDemandBlobContentHandle(handle: AHandle): FHandle;
|
|
31
31
|
extractArchiveAndGetURL(handle: AHandle, format: ArchiveFormat): FHandle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/render/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,SAAS,EACT,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,QAAQ,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/render/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,E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,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,8BAA8B,CAAC;CAC/D;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,mBAAmB,EAAE,YAAY,EAAE,CAAC;CACrC,CAAC;AAEF,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAE9D;AAiBD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAI5D"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PlatformaSDKVersion = "1.
|
|
1
|
+
export declare const PlatformaSDKVersion = "1.31.6";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/model",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.6",
|
|
4
4
|
"description": "Platforma.bio SDK / Block Model",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"canonicalize": "~2.1.0",
|
|
23
23
|
"zod": "~3.23.8",
|
|
24
|
-
"@milaboratories/pl-
|
|
25
|
-
"@milaboratories/pl-
|
|
24
|
+
"@milaboratories/pl-model-common": "^1.15.1",
|
|
25
|
+
"@milaboratories/pl-error-like": "^1.12.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "~5.5.4",
|
|
@@ -16,16 +16,30 @@ import type {
|
|
|
16
16
|
PTableRecordFilter,
|
|
17
17
|
PTableRecordSingleValueFilterV2,
|
|
18
18
|
PTableSorting,
|
|
19
|
+
PTableValue,
|
|
19
20
|
} from '@milaboratories/pl-model-common';
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
import {
|
|
22
|
+
canonicalizeJson,
|
|
23
|
+
getAxisId,
|
|
24
|
+
getColumnIdAndSpec,
|
|
25
|
+
matchAxisId,
|
|
26
|
+
parseJson,
|
|
27
|
+
} from '@milaboratories/pl-model-common';
|
|
28
|
+
import type {
|
|
29
|
+
AxisLabelProvider,
|
|
30
|
+
ColumnProvider,
|
|
31
|
+
RenderCtx,
|
|
32
|
+
} from '../render';
|
|
33
|
+
import {
|
|
34
|
+
PColumnCollection,
|
|
35
|
+
TreeNodeAccessor,
|
|
36
|
+
} from '../render';
|
|
23
37
|
|
|
24
38
|
/** Canonicalized PTableColumnSpec JSON string */
|
|
25
39
|
export type PTableColumnSpecJson = CanonicalizedJson<PTableColumnSpec>;
|
|
26
40
|
|
|
27
41
|
/** Encode `PTableColumnId` as canonicalized JSON string */
|
|
28
|
-
export function
|
|
42
|
+
export function stringifyPTableColumnSpec(spec: PTableColumnSpec): PTableColumnSpecJson {
|
|
29
43
|
const type = spec.type;
|
|
30
44
|
switch (type) {
|
|
31
45
|
case 'axis':
|
|
@@ -38,11 +52,6 @@ export function stringifyPTableColumnId(spec: PTableColumnSpec): PTableColumnSpe
|
|
|
38
52
|
}
|
|
39
53
|
}
|
|
40
54
|
|
|
41
|
-
/** Parse `PTableColumnId` from JSON string */
|
|
42
|
-
export function parsePTableColumnId(str: PTableColumnSpecJson): PTableColumnSpec {
|
|
43
|
-
return JSON.parse(str) as PTableColumnSpec;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
55
|
/** Data table state */
|
|
47
56
|
export type PlDataTableGridState = {
|
|
48
57
|
// TODO request stable key from the driver
|
|
@@ -568,6 +577,17 @@ export type PlDataTableModel = {
|
|
|
568
577
|
tableHandle: PTableHandle;
|
|
569
578
|
};
|
|
570
579
|
|
|
580
|
+
/**
|
|
581
|
+
* @deprecated Used only in PlAgDataTable v1 that is no longer maintained.
|
|
582
|
+
* Please migrate to v2.
|
|
583
|
+
*/
|
|
584
|
+
export type PTableRowKey = PTableValue[];
|
|
585
|
+
|
|
586
|
+
/** Check if column should be omitted from the table */
|
|
587
|
+
export function isColumnHidden(spec: { annotations?: Record<string, string> }): boolean {
|
|
588
|
+
return spec.annotations?.['pl7.app/table/visibility'] === 'hidden';
|
|
589
|
+
}
|
|
590
|
+
|
|
571
591
|
/** Check if column is hidden by default */
|
|
572
592
|
export function isColumnOptional(spec: { annotations?: Record<string, string> }): boolean {
|
|
573
593
|
return spec.annotations?.['pl7.app/table/visibility'] === 'optional';
|
|
@@ -583,7 +603,7 @@ export function isColumnOptional(spec: { annotations?: Record<string, string> })
|
|
|
583
603
|
*/
|
|
584
604
|
export function createPlDataTableV2<A, U>(
|
|
585
605
|
ctx: RenderCtx<A, U>,
|
|
586
|
-
|
|
606
|
+
inputColumns: PColumn<TreeNodeAccessor | PColumnValues | DataInfo<TreeNodeAccessor>>[],
|
|
587
607
|
mainColumnPredicate: (spec: PColumnSpec) => boolean,
|
|
588
608
|
tableState: PlDataTableState | undefined,
|
|
589
609
|
ops?: CreatePlDataTableOps,
|
|
@@ -592,6 +612,7 @@ export function createPlDataTableV2<A, U>(
|
|
|
592
612
|
const filters: PTableRecordSingleValueFilterV2[]
|
|
593
613
|
= [...(ops?.filters ?? []), ...(tableState?.pTableParams?.filters ?? [])];
|
|
594
614
|
const sorting: PTableSorting[] = tableState?.pTableParams?.sorting ?? [];
|
|
615
|
+
const columns = inputColumns.filter((c) => !isColumnHidden(c.spec));
|
|
595
616
|
|
|
596
617
|
const mainColumn = columns.find((c) => mainColumnPredicate(c.spec));
|
|
597
618
|
if (!mainColumn) return undefined;
|
|
@@ -604,7 +625,7 @@ export function createPlDataTableV2<A, U>(
|
|
|
604
625
|
if (coreJoinType === 'inner') return [];
|
|
605
626
|
|
|
606
627
|
const hiddenColIds = tableState?.gridState.columnVisibility?.hiddenColIds
|
|
607
|
-
?.map(
|
|
628
|
+
?.map(parseJson)
|
|
608
629
|
.filter((c) => c.type === 'column')
|
|
609
630
|
.map((c) => c.id);
|
|
610
631
|
if (hiddenColIds) return hiddenColIds;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CanonicalizedJson,
|
|
3
|
+
PColumn,
|
|
4
|
+
PColumnIdAndSpec,
|
|
5
|
+
PColumnKey,
|
|
6
|
+
PColumnValues,
|
|
7
|
+
PColumnValuesEntry,
|
|
8
|
+
PObjectId,
|
|
9
|
+
PTableColumnId,
|
|
10
|
+
} from '@milaboratories/pl-model-common';
|
|
11
|
+
import {
|
|
12
|
+
canonicalizeJson,
|
|
13
|
+
isPTableAbsent,
|
|
14
|
+
} from '@milaboratories/pl-model-common';
|
|
15
|
+
import type { PlSelectionModel } from './PlSelectionModel';
|
|
16
|
+
|
|
17
|
+
/** Canonicalized PTableColumnId JSON string */
|
|
18
|
+
export type PTableColumnIdJson = CanonicalizedJson<PTableColumnId>;
|
|
19
|
+
|
|
20
|
+
/** Encode `PTableColumnId` as canonicalized JSON string */
|
|
21
|
+
export function stringifyPTableColumnId(
|
|
22
|
+
id: PTableColumnId,
|
|
23
|
+
): PTableColumnIdJson {
|
|
24
|
+
const type = id.type;
|
|
25
|
+
switch (type) {
|
|
26
|
+
case 'axis':
|
|
27
|
+
return canonicalizeJson(id);
|
|
28
|
+
case 'column':
|
|
29
|
+
return canonicalizeJson(id);
|
|
30
|
+
default:
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
32
|
+
throw Error(`unsupported column type: ${type satisfies never}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type PColumnPredicate = (column: PColumnIdAndSpec) => boolean;
|
|
37
|
+
|
|
38
|
+
export type PlMultiSequenceAlignmentModel = {
|
|
39
|
+
sequenceColumnIds?: PObjectId[];
|
|
40
|
+
labelColumnIds?: PTableColumnIdJson[];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export function createRowSelectionColumn(
|
|
44
|
+
columnId: PObjectId,
|
|
45
|
+
rowSelectionModel: PlSelectionModel | undefined,
|
|
46
|
+
label?: string,
|
|
47
|
+
domain?: Record<string, string>,
|
|
48
|
+
): PColumn<PColumnValues> | undefined {
|
|
49
|
+
if (!rowSelectionModel || rowSelectionModel.axesSpec.length === 0) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
id: columnId,
|
|
55
|
+
spec: {
|
|
56
|
+
kind: 'PColumn',
|
|
57
|
+
valueType: 'Int',
|
|
58
|
+
name: 'pl7.app/table/row-selection',
|
|
59
|
+
axesSpec: rowSelectionModel.axesSpec,
|
|
60
|
+
...(domain && { domain }),
|
|
61
|
+
annotations: {
|
|
62
|
+
'pl7.app/label': label ?? 'Selected rows',
|
|
63
|
+
'pl7.app/discreteValues': '[1]',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
data: rowSelectionModel
|
|
67
|
+
.selectedKeys
|
|
68
|
+
.filter((r): r is PColumnKey => !r.some((v) => isPTableAbsent(v)))
|
|
69
|
+
.map((r) => ({ key: r, val: 1 } satisfies PColumnValuesEntry)),
|
|
70
|
+
} satisfies PColumn<PColumnValues>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AxesSpec, PTableAbsent, PTableValue } from '@milaboratories/pl-model-common';
|
|
2
|
+
import { PTableNA } from '@milaboratories/pl-model-common';
|
|
3
|
+
|
|
4
|
+
/** Key is a set of all axes values, which means it is unique across rows */
|
|
5
|
+
export type PTableKey = AxisValue[];
|
|
6
|
+
|
|
7
|
+
/** Readable axis value */
|
|
8
|
+
export type AxisValue = string | number | PTableAbsent;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Information on selected rows.
|
|
12
|
+
* for selectedKeys = [[axis1Value, axis2Value, axis3Value], ...]
|
|
13
|
+
* axesSpec would be [axis1Spec, axis2Spec, axis3Spec]
|
|
14
|
+
*/
|
|
15
|
+
export type PlSelectionModel = {
|
|
16
|
+
/** Specs for {@link AxisValue}'s in {@link PTableKey} */
|
|
17
|
+
axesSpec: AxesSpec;
|
|
18
|
+
/** Row keys (arrays of axes values) of selected rows */
|
|
19
|
+
selectedKeys: PTableKey[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function mapPTableValueToAxisKey(value: PTableValue): AxisValue {
|
|
23
|
+
if (value === PTableNA) {
|
|
24
|
+
throw new Error('Axis value can never be N/A');
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
package/src/components/index.ts
CHANGED
package/src/config/actions.ts
CHANGED
|
@@ -30,7 +30,7 @@ import type {
|
|
|
30
30
|
import type { ExtractAction, POCExtractAction, PrimitiveOrConfig, TypedConfig } from './type_engine';
|
|
31
31
|
import type { Cfg } from './model';
|
|
32
32
|
import type { CheckedSyncConf } from './type_util';
|
|
33
|
-
import type { ArchiveFormat } from '@milaboratories/pl-model-common';
|
|
33
|
+
import type { ArchiveFormat, RangeBytes } from '@milaboratories/pl-model-common';
|
|
34
34
|
|
|
35
35
|
//
|
|
36
36
|
// Helpers
|
|
@@ -337,18 +337,22 @@ export function mapResourceFields<
|
|
|
337
337
|
|
|
338
338
|
export function getBlobContent<const Source extends TypedConfig>(
|
|
339
339
|
source: Source,
|
|
340
|
+
range?: RangeBytes,
|
|
340
341
|
): TypedConfig<ActGetBlobContent<ExtractAction<Source>>> {
|
|
341
342
|
return {
|
|
342
343
|
type: 'GetBlobContent',
|
|
344
|
+
range,
|
|
343
345
|
source: primitiveToConfig(source),
|
|
344
346
|
} as Cfg as any;
|
|
345
347
|
}
|
|
346
348
|
|
|
347
349
|
export function getBlobContentAsString<const Source extends TypedConfig>(
|
|
348
350
|
source: Source,
|
|
351
|
+
range?: RangeBytes,
|
|
349
352
|
): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>> {
|
|
350
353
|
return {
|
|
351
354
|
type: 'GetBlobContentAsString',
|
|
355
|
+
range,
|
|
352
356
|
source: primitiveToConfig(source),
|
|
353
357
|
} as Cfg as any;
|
|
354
358
|
}
|
|
@@ -356,9 +360,11 @@ export function getBlobContentAsString<const Source extends TypedConfig>(
|
|
|
356
360
|
export function getBlobContentAsJson<T>() {
|
|
357
361
|
return function <const Source extends TypedConfig>(
|
|
358
362
|
source: Source,
|
|
363
|
+
range?: RangeBytes,
|
|
359
364
|
): TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>> {
|
|
360
365
|
return {
|
|
361
366
|
type: 'GetBlobContentAsJson',
|
|
367
|
+
range,
|
|
362
368
|
source: primitiveToConfig(source),
|
|
363
369
|
} as Cfg as any;
|
|
364
370
|
};
|
package/src/config/model.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArchiveFormat } from '@milaboratories/pl-model-common';
|
|
1
|
+
import type { ArchiveFormat, RangeBytes } from '@milaboratories/pl-model-common';
|
|
2
2
|
|
|
3
3
|
export type Cfg =
|
|
4
4
|
| CfgGetFromCtx
|
|
@@ -149,16 +149,19 @@ export type CfgResourceValueAsJson = {
|
|
|
149
149
|
|
|
150
150
|
export type CfgBlobContent = {
|
|
151
151
|
type: 'GetBlobContent';
|
|
152
|
+
range: RangeBytes | undefined;
|
|
152
153
|
source: Cfg;
|
|
153
154
|
};
|
|
154
155
|
|
|
155
156
|
export type CfgBlobContentAsString = {
|
|
156
157
|
type: 'GetBlobContentAsString';
|
|
158
|
+
range: RangeBytes | undefined;
|
|
157
159
|
source: Cfg;
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
export type CfgBlobContentAsJson = {
|
|
161
163
|
type: 'GetBlobContentAsJson';
|
|
164
|
+
range: RangeBytes | undefined;
|
|
162
165
|
source: Cfg;
|
|
163
166
|
};
|
|
164
167
|
|
package/src/render/accessor.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
FolderURL,
|
|
9
9
|
ArchiveFormat,
|
|
10
10
|
ProgressLogWithInfo,
|
|
11
|
+
RangeBytes,
|
|
11
12
|
} from '@milaboratories/pl-model-common';
|
|
12
13
|
import {
|
|
13
14
|
isPColumn,
|
|
@@ -244,17 +245,17 @@ export class TreeNodeAccessor {
|
|
|
244
245
|
return result;
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
public getFileContentAsBase64(): FutureRef<string | undefined> {
|
|
248
|
-
return new FutureRef(getCfgRenderCtx().getBlobContentAsBase64(this.handle));
|
|
248
|
+
public getFileContentAsBase64(range?: RangeBytes): FutureRef<string | undefined> {
|
|
249
|
+
return new FutureRef(getCfgRenderCtx().getBlobContentAsBase64(this.handle, range));
|
|
249
250
|
}
|
|
250
251
|
|
|
251
|
-
public getFileContentAsString(): FutureRef<string | undefined> {
|
|
252
|
-
return new FutureRef(getCfgRenderCtx().getBlobContentAsString(this.handle));
|
|
252
|
+
public getFileContentAsString(range?: RangeBytes): FutureRef<string | undefined> {
|
|
253
|
+
return new FutureRef(getCfgRenderCtx().getBlobContentAsString(this.handle, range));
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
public getFileContentAsJson<T>(): FutureRef<T | undefined> {
|
|
256
|
+
public getFileContentAsJson<T>(range?: RangeBytes): FutureRef<T | undefined> {
|
|
256
257
|
return new FutureRef<string | undefined>(
|
|
257
|
-
getCfgRenderCtx().getBlobContentAsString(this.handle),
|
|
258
|
+
getCfgRenderCtx().getBlobContentAsString(this.handle, range),
|
|
258
259
|
).mapDefined((v) => JSON.parse(v) as T);
|
|
259
260
|
}
|
|
260
261
|
|
package/src/render/internal.ts
CHANGED
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
ResultCollection,
|
|
18
18
|
ValueOrError,
|
|
19
19
|
DataInfo,
|
|
20
|
+
RangeBytes,
|
|
20
21
|
} from '@milaboratories/pl-model-common';
|
|
21
22
|
|
|
22
23
|
export const StagingAccessorName = 'staging';
|
|
@@ -80,9 +81,9 @@ export interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = F
|
|
|
80
81
|
// Blob
|
|
81
82
|
//
|
|
82
83
|
|
|
83
|
-
getBlobContentAsBase64(handle: AHandle): FHandle; // string | undefined
|
|
84
|
+
getBlobContentAsBase64(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined
|
|
84
85
|
|
|
85
|
-
getBlobContentAsString(handle: AHandle): FHandle; // string | undefined
|
|
86
|
+
getBlobContentAsString(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined
|
|
86
87
|
|
|
87
88
|
getDownloadedBlobContentHandle(handle: AHandle): FHandle; // LocalBlobHandleAndSize | undefined;
|
|
88
89
|
|