@milaboratories/pl-model-common 1.10.5 → 1.11.0
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/drivers/pframe/column_filter.d.ts +1 -1
- package/dist/drivers/pframe/column_filter.d.ts.map +1 -1
- package/dist/drivers/pframe/data.d.ts +1 -1
- package/dist/drivers/pframe/data.d.ts.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +1 -1
- package/dist/drivers/pframe/driver.d.ts.map +1 -1
- package/dist/drivers/pframe/find_columns.d.ts +1 -1
- package/dist/drivers/pframe/find_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/index.d.ts +2 -1
- package/dist/drivers/pframe/index.d.ts.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +1 -1
- package/dist/drivers/pframe/pframe.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored_id.d.ts +47 -0
- package/dist/drivers/pframe/spec/anchored_id.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/index.d.ts +4 -0
- package/dist/drivers/pframe/spec/index.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/selectors.d.ts +165 -0
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -0
- package/dist/drivers/pframe/{spec.d.ts → spec/spec.d.ts} +16 -3
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -0
- package/dist/drivers/pframe/table_common.d.ts +1 -1
- package/dist/drivers/pframe/table_common.d.ts.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +1 -1
- package/dist/drivers/pframe/unique_values.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +472 -245
- package/dist/index.mjs.map +1 -1
- package/dist/ref.d.ts +7 -0
- package/dist/ref.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/drivers/pframe/column_filter.ts +1 -1
- package/src/drivers/pframe/data.ts +1 -1
- package/src/drivers/pframe/driver.ts +1 -1
- package/src/drivers/pframe/find_columns.ts +1 -1
- package/src/drivers/pframe/index.ts +3 -1
- package/src/drivers/pframe/pframe.ts +1 -1
- package/src/drivers/pframe/spec/anchored_id.ts +215 -0
- package/src/drivers/pframe/spec/index.ts +3 -0
- package/src/drivers/pframe/spec/selectors.test.ts +209 -0
- package/src/drivers/pframe/spec/selectors.ts +267 -0
- package/src/drivers/pframe/{spec.ts → spec/spec.ts} +19 -3
- package/src/drivers/pframe/table_common.ts +1 -1
- package/src/drivers/pframe/unique_values.ts +1 -1
- package/src/ref.ts +17 -0
- package/dist/drivers/pframe/spec.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column_filter.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/column_filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"column_filter.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/column_filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B;mBACe;IACf,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IAE5B;mBACe;IACf,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB,+EAA+E;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C,mFAAmF;IACnF,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElD;kBACc;IACd,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/data.ts"],"names":[],"mappings":"A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AK,IAAI,YAAY,CAExE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,2DAA2D;AAC3D,wBAAgB,WAAW,CACzB,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,eAAoB,GACzB,WAAW,CAwBb;AAED,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG;IACxB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAEhB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Branded } from '../../branding';
|
|
|
2
2
|
import { PTableShape, PTableVector, TableRange } from './data';
|
|
3
3
|
import { FindColumnsRequest, FindColumnsResponse } from './find_columns';
|
|
4
4
|
import { PObjectId } from '../../pool';
|
|
5
|
-
import { PColumnIdAndSpec, PColumnSpec } from './spec';
|
|
5
|
+
import { PColumnIdAndSpec, PColumnSpec } from './spec/spec';
|
|
6
6
|
import { CalculateTableDataRequest, CalculateTableDataResponse } from './table_calculate';
|
|
7
7
|
import { UniqueValuesRequest, UniqueValuesResponse } from './unique_values';
|
|
8
8
|
import { PTableColumnSpec } from './table_common';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,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GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAE/D,mFAAmF;IACnF,kBAAkB,CAChB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,yBAAyB,CAAC,SAAS,CAAC,GAC5C,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEvC,yFAAyF;IACzF,eAAe,CACb,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAMjC,0BAA0B;IAC1B,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAErD;;;;;;;;SAQK;IACL,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAE3D;;;;;;;SAOK;IACL,OAAO,CACL,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,MAAM,EAAE,EACvB,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,GAC7B,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnFilter } from './column_filter';
|
|
2
|
-
import { AxisId, PColumnIdAndSpec } from './spec';
|
|
2
|
+
import { AxisId, PColumnIdAndSpec } from './spec/spec';
|
|
3
3
|
/**
|
|
4
4
|
* Request to search among existing columns in the PFrame. Two filtering
|
|
5
5
|
* criteria can be used: (1) column ашдеук, to search for columns with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find_columns.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/find_columns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"find_columns.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/find_columns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEvD;;;;;KAKK;AACL,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAEpC,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAElC;;;;;SAKK;IACL,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACtC;AAED,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,CAAC;CACnC"}
|
|
@@ -2,10 +2,11 @@ export * from './column_filter';
|
|
|
2
2
|
export * from './data';
|
|
3
3
|
export * from './find_columns';
|
|
4
4
|
export * from './pframe';
|
|
5
|
-
export * from './spec';
|
|
5
|
+
export * from './spec/spec';
|
|
6
6
|
export * from './table';
|
|
7
7
|
export * from './table_calculate';
|
|
8
8
|
export * from './table_common';
|
|
9
9
|
export * from './unique_values';
|
|
10
|
+
export * from './spec';
|
|
10
11
|
export * from './driver';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,QAAQ,CAAC;AAEvB,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PObjectId } from '../../pool';
|
|
2
2
|
import { FindColumnsRequest, FindColumnsResponse } from './find_columns';
|
|
3
|
-
import { PColumn, PColumnIdAndSpec, PColumnSpec } from './spec';
|
|
3
|
+
import { PColumn, PColumnIdAndSpec, PColumnSpec } from './spec/spec';
|
|
4
4
|
import { CalculateTableDataRequest, CalculateTableDataResponse } from './table_calculate';
|
|
5
5
|
import { UniqueValuesRequest, UniqueValuesResponse } from './unique_values';
|
|
6
6
|
/** Read interface exposed by PFrames library */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/pframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/pframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,gDAAgD;AAChD,MAAM,WAAW,MAAM;IACrB;;;SAGK;IACL,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEvE,kCAAkC;IAClC,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,2EAA2E;IAC3E,WAAW,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAE3C,mFAAmF;IACnF,kBAAkB,CAChB,OAAO,EAAE,yBAAyB,CAAC,SAAS,CAAC,GAC5C,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEvC,yFAAyF;IACzF,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC9E;AAED,oDAAoD;AACpD,MAAM,MAAM,SAAS,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PColumnSpec } from './spec';
|
|
2
|
+
import { APColumnId, APColumnSelector, PColumnSelector } from './selectors';
|
|
3
|
+
/**
|
|
4
|
+
* Context for resolving and generating anchored references to columns and axes
|
|
5
|
+
* Maintains maps of known domain values and axes that can be referenced by anchors
|
|
6
|
+
*/
|
|
7
|
+
export declare class AnchorIdDeriver {
|
|
8
|
+
private readonly anchors;
|
|
9
|
+
private readonly domains;
|
|
10
|
+
private readonly axes;
|
|
11
|
+
/**
|
|
12
|
+
* Domain packs are used to group domain keys that can be anchored to the same anchor
|
|
13
|
+
* This is used to optimize the lookup of domain anchors
|
|
14
|
+
*/
|
|
15
|
+
private readonly domainPacks;
|
|
16
|
+
/**
|
|
17
|
+
* Maps domain packs to anchors
|
|
18
|
+
*/
|
|
19
|
+
private readonly domainPackToAnchor;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new anchor context from a set of anchor column specifications
|
|
22
|
+
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
23
|
+
*/
|
|
24
|
+
constructor(anchors: Record<string, PColumnSpec>);
|
|
25
|
+
/**
|
|
26
|
+
* Derives an anchored column identifier from a column specification
|
|
27
|
+
* Replaces domain values and axes with anchored references when possible
|
|
28
|
+
* @param spec Column specification to anchor
|
|
29
|
+
* @returns An anchored column identifier that can be used to identify columns similar to the input specification
|
|
30
|
+
*/
|
|
31
|
+
derive(spec: PColumnSpec): APColumnId;
|
|
32
|
+
/**
|
|
33
|
+
* Derives a canonicalized string representation of an anchored column identifier, can be used as a unique identifier for the column
|
|
34
|
+
* @param spec Column specification to anchor
|
|
35
|
+
* @returns A canonicalized string representation of the anchored column identifier
|
|
36
|
+
*/
|
|
37
|
+
deriveString(spec: PColumnSpec): string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Resolves anchored references in a column matcher to create a non-anchored matcher
|
|
41
|
+
*
|
|
42
|
+
* @param anchors - Record of anchor column specifications indexed by anchor ID
|
|
43
|
+
* @param matcher - An anchored column matcher containing references that need to be resolved
|
|
44
|
+
* @returns A non-anchored column matcher with all references resolved to actual values
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveAnchors(anchors: Record<string, PColumnSpec>, matcher: APColumnSelector): PColumnSelector;
|
|
47
|
+
//# sourceMappingURL=anchored_id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchored_id.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/anchored_id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,WAAW,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,KAAK,EAAoD,UAAU,EAAE,gBAAgB,EAAgB,eAAe,EAAE,MAAM,aAAa,CAAC;AAcjJ;;;GAGG;AACH,qBAAa,eAAe;IAiBd,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;IAC9D;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkB;IAC9C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEhE;;;OAGG;gBAC0B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;IAwBjE;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU;IA6CrC;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;CAIxC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAqC/G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { PObjectSpec } from '../../../pool';
|
|
2
|
+
import { AxisId, PColumnSpec, ValueType } from './spec';
|
|
3
|
+
/**
|
|
4
|
+
* Defines a pattern for matching axes within the PFrame data model.
|
|
5
|
+
*
|
|
6
|
+
* AxisSelector provides a flexible way to identify axes based on their
|
|
7
|
+
* properties. All fields are optional, allowing for partial matching.
|
|
8
|
+
* When multiple properties are specified, all must match for an axis
|
|
9
|
+
* to be selected (logical AND).
|
|
10
|
+
*
|
|
11
|
+
* This interface is used in various selection and matching operations
|
|
12
|
+
* throughout the PFrame system, such as column queries and axis lookups.
|
|
13
|
+
*/
|
|
14
|
+
export interface AxisSelector {
|
|
15
|
+
/**
|
|
16
|
+
* Optional value type to match against.
|
|
17
|
+
* When specified, only axes with this exact type will match.
|
|
18
|
+
* Can be a single type or an array of types to match against any of them.
|
|
19
|
+
* Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.
|
|
20
|
+
*/
|
|
21
|
+
type?: ValueType | ValueType[];
|
|
22
|
+
/**
|
|
23
|
+
* Optional name to match against.
|
|
24
|
+
* When specified, only axes with this exact name will match.
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional domain key-value pairs to match against.
|
|
29
|
+
* Domains provide additional context to uniquely identify an axis beyond its name and type.
|
|
30
|
+
* When specified, an axis will match only if it contains all the key-value pairs defined here.
|
|
31
|
+
* An axis with additional domain entries not present in this selector will still match.
|
|
32
|
+
*/
|
|
33
|
+
domain?: Record<string, string>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Reference to an axis by its numerical index within the anchor column's axes array
|
|
37
|
+
* Format: [anchorId, axisIndex]
|
|
38
|
+
*/
|
|
39
|
+
export type AnchorAxisRefByIdx = {
|
|
40
|
+
anchor: string;
|
|
41
|
+
idx: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Reference to an axis by its name within the anchor column
|
|
45
|
+
* Format: [anchorId, axisName]
|
|
46
|
+
*/
|
|
47
|
+
export type AnchorAxisRefByName = {
|
|
48
|
+
anchor: string;
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Reference to an axis using an AxisId matcher within the anchor
|
|
53
|
+
* Format: [anchorId, axisMatcher]
|
|
54
|
+
*/
|
|
55
|
+
export type AnchorAxisRefByMatcher = {
|
|
56
|
+
anchor: string;
|
|
57
|
+
id: AxisId;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Basic anchor axis reference that can be either by index or a direct AxisId
|
|
61
|
+
*/
|
|
62
|
+
export type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;
|
|
63
|
+
/** Union of all possible ways to reference an axis in an anchored context */
|
|
64
|
+
export type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;
|
|
65
|
+
/** Reference to a domain value through an anchor */
|
|
66
|
+
export type AnchorDomainRef = {
|
|
67
|
+
anchor: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Domain value that can be either a direct string value or a reference to a domain through an anchor
|
|
71
|
+
* Used to establish domain context that can be resolved relative to other anchored columns
|
|
72
|
+
*/
|
|
73
|
+
export type ADomain = string | AnchorDomainRef;
|
|
74
|
+
/**
|
|
75
|
+
* Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor
|
|
76
|
+
* Allows referring to axes in a way that can be resolved in different contexts
|
|
77
|
+
*/
|
|
78
|
+
export type AAxisSelector = AxisSelector | AnchorAxisRef;
|
|
79
|
+
/**
|
|
80
|
+
* Match resolution strategy for PColumns
|
|
81
|
+
* Specifies how to handle when multiple columns match the criteria
|
|
82
|
+
* (default is "expectSingle")
|
|
83
|
+
*/
|
|
84
|
+
export type AnchoredColumnMatchStrategy = 'expectSingle' | 'expectMultiple' | 'takeFirst';
|
|
85
|
+
/**
|
|
86
|
+
* Matcher for PColumns in an anchored context
|
|
87
|
+
* Supports partial matching on axes, allowing for flexible column discovery
|
|
88
|
+
*/
|
|
89
|
+
export interface APColumnSelector {
|
|
90
|
+
/** Optional name of the column to match; can't be used together with namePattern */
|
|
91
|
+
name?: string;
|
|
92
|
+
/** Optional regexp pattern for column name matching; can't be used together with name */
|
|
93
|
+
namePattern?: string;
|
|
94
|
+
/** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */
|
|
95
|
+
type?: ValueType | ValueType[];
|
|
96
|
+
/** If specified, the domain values must be anchored to this anchor */
|
|
97
|
+
domainAnchor?: string;
|
|
98
|
+
/** Optional domain values to match, can include anchored references, if domainAnchor is specified,
|
|
99
|
+
* interpreted as additional domains to domain from the anchor */
|
|
100
|
+
domain?: Record<string, ADomain>;
|
|
101
|
+
/** Optional axes to match, can include anchored references */
|
|
102
|
+
axes?: AAxisSelector[];
|
|
103
|
+
/** When true, allows matching if only a subset of axes match */
|
|
104
|
+
partialAxesMatch?: boolean;
|
|
105
|
+
/** Optional annotations to match with exact values */
|
|
106
|
+
annotations?: Record<string, string>;
|
|
107
|
+
/** Optional annotation patterns to match with regex patterns */
|
|
108
|
+
annotationPatterns?: Record<string, string>;
|
|
109
|
+
/** Match resolution strategy, default is "expectSingle" */
|
|
110
|
+
matchStrategy?: AnchoredColumnMatchStrategy;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Matcher for PColumns in a non-anchored context
|
|
114
|
+
*/
|
|
115
|
+
export interface PColumnSelector extends APColumnSelector {
|
|
116
|
+
domainAnchor?: never;
|
|
117
|
+
domain?: Record<string, string>;
|
|
118
|
+
axes?: AxisSelector[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Strict identifier for PColumns in an anchored context
|
|
122
|
+
* Unlike APColumnMatcher, this requires exact matches on domain and axes
|
|
123
|
+
*/
|
|
124
|
+
export interface APColumnId extends APColumnSelector {
|
|
125
|
+
/** Name is required for exact column identification */
|
|
126
|
+
name: string;
|
|
127
|
+
/** No namePattern in ID */
|
|
128
|
+
namePattern?: never;
|
|
129
|
+
/** Type is not used in exact column identification */
|
|
130
|
+
type?: never;
|
|
131
|
+
/** Full axes specification using only basic references */
|
|
132
|
+
axes: AnchorAxisIdOrRefBasic[];
|
|
133
|
+
/** Partial axes matching is not allowed for exact identification */
|
|
134
|
+
partialAxesMatch?: never;
|
|
135
|
+
/** Annotations are not used in exact column identification */
|
|
136
|
+
annotations?: never;
|
|
137
|
+
/** Annotation patterns are not used in exact column identification */
|
|
138
|
+
annotationPatterns?: never;
|
|
139
|
+
/** "Id" implies single match strategy */
|
|
140
|
+
matchStrategy?: never;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Determines if an axis ID matches an axis selector.
|
|
144
|
+
*
|
|
145
|
+
* @param selector - The selector with criteria to match against
|
|
146
|
+
* @param axis - The AxisId to check against the selector
|
|
147
|
+
* @returns true if the AxisId matches all specified criteria in the selector, false otherwise
|
|
148
|
+
*/
|
|
149
|
+
export declare function matchAxis(selector: AxisSelector, axis: AxisId): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Determines if a given PColumnSpec matches a selector.
|
|
152
|
+
*
|
|
153
|
+
* @param pcolumn - The PColumnSpec to check against the selector
|
|
154
|
+
* @param selector - The selector criteria to match against
|
|
155
|
+
* @returns true if the PColumnSpec matches all criteria in the selector, false otherwise
|
|
156
|
+
*/
|
|
157
|
+
export declare function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Convert a predicate or array of selectors to a single predicate function
|
|
160
|
+
* @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,
|
|
161
|
+
* or an array of PColumnSelectors, or a single PColumnSelector
|
|
162
|
+
* @returns A function that takes a PColumnSpec and returns a boolean
|
|
163
|
+
*/
|
|
164
|
+
export declare function selectorsToPredicate(predicateOrSelectors: PColumnSelector | PColumnSelector[]): ((spec: PObjectSpec) => boolean);
|
|
165
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAG7D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAE/B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,MA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,CAAC,CAKhI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PObject, PObjectId, PObjectSpec } from '
|
|
1
|
+
import { PObject, PObjectId, PObjectSpec } from '../../../pool';
|
|
2
2
|
/** PFrame columns and axes within them may store one of these types. */
|
|
3
3
|
export type ValueType = 'Int' | 'Long' | 'Float' | 'Double' | 'String' | 'Bytes';
|
|
4
4
|
/**
|
|
@@ -53,12 +53,12 @@ export type AxesSpec = AxisSpec[];
|
|
|
53
53
|
*
|
|
54
54
|
* Each element in tuple correspond to the axis having the same index in axesSpec.
|
|
55
55
|
* */
|
|
56
|
-
export interface
|
|
56
|
+
export interface PUniversalColumnSpec extends PObjectSpec {
|
|
57
57
|
/** Defines specific type of BObject, the most generic type of unit of
|
|
58
58
|
* information in Platforma Project. */
|
|
59
59
|
readonly kind: 'PColumn';
|
|
60
60
|
/** Type of column values */
|
|
61
|
-
readonly valueType:
|
|
61
|
+
readonly valueType: string;
|
|
62
62
|
/** Column name */
|
|
63
63
|
readonly name: string;
|
|
64
64
|
/** Adds auxiliary information to the axis name, type and parents to form a
|
|
@@ -72,6 +72,19 @@ export interface PColumnSpec extends PObjectSpec {
|
|
|
72
72
|
/** Axes specifications */
|
|
73
73
|
readonly axesSpec: AxesSpec;
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Specification of a data column.
|
|
77
|
+
*
|
|
78
|
+
* Data column is a specialized type of PColumn that stores only simple values (strings and numbers)
|
|
79
|
+
* addressed by multiple keys. This is in contrast to other PColumn variants that can store more complex
|
|
80
|
+
* values like files or other abstract data types. Data columns are optimized for storing and processing
|
|
81
|
+
* basic tabular data.
|
|
82
|
+
*/
|
|
83
|
+
export interface PDataColumnSpec extends PUniversalColumnSpec {
|
|
84
|
+
/** Type of column values */
|
|
85
|
+
readonly valueType: ValueType;
|
|
86
|
+
}
|
|
87
|
+
export type PColumnSpec = PDataColumnSpec;
|
|
75
88
|
export interface PColumn<Data> extends PObject<Data> {
|
|
76
89
|
/** PColumn spec, allowing it to be found among other PObjects */
|
|
77
90
|
readonly spec: PColumnSpec;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAErE,wEAAwE;AACxE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjF;;;;;;;KAOK;AACL,MAAM,WAAW,QAAQ;IACvB,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;2BACuB;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;oBACgB;IAChB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,iEAAiE;AACjE,MAAM,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;AAElC;;;;;;;;;;KAUK;AACL,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD;2CACuC;IACvC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,4BAA4B;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,kBAAkB;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;2BACuB;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;oBACgB;IAChB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I,EAAE,QAAQ,GAAG,MAAM,CAEhD;AAYD,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAElE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_common.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/table_common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"table_common.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/table_common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5D,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;CAChB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAEN,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,SAAS,CAAC;CACf,CAAC;AAEF,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique_values.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/unique_values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"unique_values.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/unique_values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAE7B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAEvC,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,oBAAoB;IACpB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAE9B,oFAAoF;IACpF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod");function _(t){return t!==void 0&&t.startsWith("log+live://log/")}function g(t){throw new Error("Unexpected object: "+t)}const N="upload://upload/",A="index://index/";function h(t){return t.startsWith(N)}function V(t){return t.startsWith(A)}function I(t){if(V(t)){const n=t.slice(A.length);return JSON.parse(decodeURIComponent(n)).path}else if(h(t)){const n=t.slice(N.length);return JSON.parse(decodeURIComponent(n)).localPath}g(t)}function z(t){return t.replace(/^.*[\\/]/,"")}function M(t){return z(I(t))}const E=-2147483648,b=-9007199254740991n,C=NaN,F=NaN,x=null,S=null;function l(t,n){switch(n){case"Int":return t===E;case"Long":return t===Number(b)||t===b;case"Float":return t===C;case"Double":return t===F;case"String":return t===x;case"Bytes":return t===S;default:throw Error(`unsupported data type: ${n}`)}}function W(t){if(!R(t))throw new Error(`Expected not-NA PValue, got ${t}`);return t}function R(t,n){if(!n)return typeof t=="string"||typeof t=="number"&&isFinite(t)||typeof t=="bigint";if(l(t,n))return!1;switch(n){case"Int":return typeof t=="number";case"Long":return typeof t=="number"||typeof t=="bigint";case"Float":return typeof t=="number";case"Double":return typeof t=="number";case"String":return typeof t=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function U(t,n){if(!n)return t===null||typeof t=="string"||typeof t=="number"||typeof t=="bigint";if(l(t,n))return!0;switch(n){case"Int":return typeof t=="number";case"Long":return typeof t=="number"||typeof t=="bigint";case"Float":return typeof t=="number";case"Double":return typeof t=="number";case"String":return typeof t=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function K(t){if(t===null||typeof t=="string"||typeof t=="number")return t;if(typeof t=="bigint")return{bigint:t.toString()};throw new Error(`Type ${typeof t} (value ${t}) not yet supported.`)}function B(t,n){if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="bigint"){if(n&&!l(t,n)&&!U(t,n))throw new Error(`Unexpected value type, got ${typeof t}, expected ${n}`);return t}if(typeof t=="object"&&t!==null&&"bigint"in t&&typeof t.bigint=="string"){if(n&&n!=="Long")throw new Error(`Unexpected value type, got serialized bigint, expected ${n}`);return BigInt(t.bigint)}throw new Error(`Unsupported type ${typeof t} (value ${t}).`)}function X(t){if(t=D(t),t===null)throw new Error("Value is null");return t}function D(t){if(t=B(t),t===null)return null;if(typeof t=="string")return t;if(typeof t=="number"){if(!isFinite(t))throw new Error(`Value is not finite (${t})`);return t}if(typeof t=="bigint")return Number(t);throw new Error(`Unexpected value type: ${typeof t}`)}function k(t,n){const e=Math.floor(n/8),r=1<<7-n%8;return(t[e]&r)>0}const O={type:"absent"},L=null;function q(t){return typeof t=="object"&&t!==null&&t.type==="absent"}function G(t,n,e={}){if(k(t.absent,n))return e.absent===void 0?O:e.absent;const r=t.data[n],o=t.type;if(l(r,o))return e.na===void 0?L:e.na;switch(o){case"Int":return r;case"Long":return Number(r);case"Float":return r;case"Double":return r;case"String":return r;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${o}`)}}function $(t){const{type:n,name:e,domain:r}=t;return{type:n,name:e,...r&&{domain:r}}}function Q(t){return t.map($)}function Y(t,n){if(t===void 0)return n===void 0;if(n===void 0)return!0;for(const e in n)if(t[e]!==n[e])return!1;return!0}function Z(t,n){return t.name===n.name&&Y(t.domain,n.domain)}function v(t,n){return{...t,src:c(t.src,n)}}function c(t,n){switch(t.type){case"column":return{type:"column",column:n(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(e=>c(e,n))};case"outer":return{type:"outer",primary:c(t.primary,n),secondary:t.secondary.map(e=>c(e,n))};default:g(t)}}const tt={href:"/"},nt=a.z.object({__isRef:a.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:a.z.string().describe("Upstream block id"),name:a.z.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function et(t,n){return t.blockId===n.blockId&&t.name===n.name}function i(t){return t.kind==="PColumn"}function H(t){return i(t.spec)}function rt(t){return i(t.obj)}function ot(t){return i(t.obj.spec)}function it(t){if(!H(t))throw new Error(`not a PColumn (kind = ${t.spec.kind})`);return t}function st(t,n){return t===void 0?void 0:{...t,data:n(t.data)}}function ut(t){const n=new Map,e=r=>{switch(r.type){case"column":n.set(r.column.id,r.column);return;case"full":case"inner":for(const o of r.entries)e(o);return;case"outer":e(r.primary);for(const o of r.secondary)e(o);return;default:g(r)}};return e(t),[...n.values()]}function at(t){throw new Error("Unexpected object: "+t)}function d(t,n){switch(t.type){case"and":for(const e of t.operands)if(!d(e,n))return!1;return!0;case"or":for(const e of t.operands)if(d(e,n))return!0;return!1;case"not":return!d(t.operand,n);case"name":return i(n)&&n.name===t.name;case"name_pattern":return i(n)&&!!n.name.match(t.pattern);case"annotation":return i(n)&&n.annotations!==void 0&&n.annotations[t.annotation]===t.value;case"annotation_pattern":return i(n)&&n.annotations!==void 0&&n.annotations[t.annotation]!==void 0&&!!n.annotations[t.annotation].match(t.pattern);case"has_axes":return i(n)&&t.axes.every(e=>n.axesSpec.some(r=>(e.type===void 0||e.type===r.type)&&(e.name===void 0||e.name===r.name)&&(e.domain===void 0||Object.keys(e.domain).length===0||r.domain!==void 0&&Object.entries(e.domain).every(([o,p])=>r.domain[o]===p))));default:at(t)}}function ct(t,n){return t.ok?{ok:!0,value:n(t.value)}:t}function lt(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const ft="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",dt="0123456789ABCDEFGHIJKLMNOPQRSTUV",pt="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function T(t,n,e){e=e||{};let r,o;switch(n){case"RFC3548":case"RFC4648":r=ft,o=!0;break;case"RFC4648-HEX":r=dt,o=!0;break;case"Crockford":r=pt,o=!1;break;default:throw new Error("Unknown base32 variant: "+n)}const p=e.padding!==void 0?e.padding:o,w=lt(t);let s=0,f=0,u="";for(let m=0;m<w.byteLength;m++)for(f=f<<8|w.getUint8(m),s+=8;s>=5;)u+=r[f>>>s-5&31],s-=5;if(s>0&&(u+=r[f<<5-s&31]),p)for(;u.length%8!==0;)u+="=";return u}const y=15,J=24,P=a.z.string().length(J).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function mt(){const t=new Uint8Array(y);return crypto.getRandomValues(t),P.parse(T(t,"RFC4648"))}function j(t){if(t.length!==y)throw new Error(`Wrong number of bytes: ${t.length}`);return P.parse(T(t,"RFC4648"))}async function bt(t){const n=new TextEncoder,e=await crypto.subtle.digest("SHA-256",n.encode(t));return j(new Uint8Array(e.slice(0,15)))}exports.DefaultNavigationState=tt;exports.PTableAbsent=O;exports.PTableNA=L;exports.PValueBytesNA=S;exports.PValueDoubleNA=F;exports.PValueFloatNA=C;exports.PValueIntNA=E;exports.PValueLongNA=b;exports.PValueStringNA=x;exports.PlId=P;exports.PlIdBytes=y;exports.PlIdLength=J;exports.PlRef=nt;exports.digestPlId=bt;exports.ensureNotNAPValue=W;exports.ensurePColumn=it;exports.executePSpecPredicate=d;exports.extractAllColumns=ut;exports.getAxesId=Q;exports.getAxisId=$;exports.getFileNameFromHandle=M;exports.getFilePathFromHandle=I;exports.isImportFileHandleIndex=V;exports.isImportFileHandleUpload=h;exports.isLiveLog=_;exports.isNotNAPValue=R;exports.isPColumn=H;exports.isPColumnResult=ot;exports.isPColumnSpec=i;exports.isPColumnSpecResult=rt;exports.isPTableAbsent=q;exports.isPValue=U;exports.isValueAbsent=k;exports.isValueNA=l;exports.mapJoinEntry=c;exports.mapPObjectData=st;exports.mapPTableDef=v;exports.mapValueInVOE=ct;exports.matchAxisId=Z;exports.pTableValue=G;exports.pValueToStringOrNumber=X;exports.pValueToStringOrNumberOrNull=D;exports.plId=j;exports.plRefsEqual=et;exports.safeConvertToPValue=B;exports.toJsonSafePValue=K;exports.uniquePlId=mt;
|
|
1
|
+
"use strict";var G=Object.defineProperty;var Q=(n,t,e)=>t in n?G(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var d=(n,t,e)=>Q(n,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("canonicalize"),l=require("zod");function Y(n){return n!==void 0&&n.startsWith("log+live://log/")}function w(n){throw new Error("Unexpected object: "+n)}const S="upload://upload/",k="index://index/";function C(n){return n.startsWith(S)}function F(n){return n.startsWith(k)}function $(n){if(F(n)){const t=n.slice(k.length);return JSON.parse(decodeURIComponent(t)).path}else if(C(n)){const t=n.slice(S.length);return JSON.parse(decodeURIComponent(t)).localPath}w(n)}function Z(n){return n.replace(/^.*[\\/]/,"")}function v(n){return Z($(n))}const D=-2147483648,g=-9007199254740991n,O=NaN,U=NaN,R=null,B=null;function p(n,t){switch(t){case"Int":return n===D;case"Long":return n===Number(g)||n===g;case"Float":return n===O;case"Double":return n===U;case"String":return n===R;case"Bytes":return n===B;default:throw Error(`unsupported data type: ${t}`)}}function nn(n){if(!T(n))throw new Error(`Expected not-NA PValue, got ${n}`);return n}function T(n,t){if(!t)return typeof n=="string"||typeof n=="number"&&isFinite(n)||typeof n=="bigint";if(p(n,t))return!1;switch(t){case"Int":return typeof n=="number";case"Long":return typeof n=="number"||typeof n=="bigint";case"Float":return typeof n=="number";case"Double":return typeof n=="number";case"String":return typeof n=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${t}`)}}function j(n,t){if(!t)return n===null||typeof n=="string"||typeof n=="number"||typeof n=="bigint";if(p(n,t))return!0;switch(t){case"Int":return typeof n=="number";case"Long":return typeof n=="number"||typeof n=="bigint";case"Float":return typeof n=="number";case"Double":return typeof n=="number";case"String":return typeof n=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${t}`)}}function tn(n){if(n===null||typeof n=="string"||typeof n=="number")return n;if(typeof n=="bigint")return{bigint:n.toString()};throw new Error(`Type ${typeof n} (value ${n}) not yet supported.`)}function L(n,t){if(n===null||typeof n=="string"||typeof n=="number"||typeof n=="bigint"){if(t&&!p(n,t)&&!j(n,t))throw new Error(`Unexpected value type, got ${typeof n}, expected ${t}`);return n}if(typeof n=="object"&&n!==null&&"bigint"in n&&typeof n.bigint=="string"){if(t&&t!=="Long")throw new Error(`Unexpected value type, got serialized bigint, expected ${t}`);return BigInt(n.bigint)}throw new Error(`Unsupported type ${typeof n} (value ${n}).`)}function en(n){if(n=H(n),n===null)throw new Error("Value is null");return n}function H(n){if(n=L(n),n===null)return null;if(typeof n=="string")return n;if(typeof n=="number"){if(!isFinite(n))throw new Error(`Value is not finite (${n})`);return n}if(typeof n=="bigint")return Number(n);throw new Error(`Unexpected value type: ${typeof n}`)}function J(n,t){const e=Math.floor(t/8),r=1<<7-t%8;return(n[e]&r)>0}const M={type:"absent"},_=null;function rn(n){return typeof n=="object"&&n!==null&&n.type==="absent"}function on(n,t,e={}){if(J(n.absent,t))return e.absent===void 0?M:e.absent;const r=n.data[t],o=n.type;if(p(r,o))return e.na===void 0?_:e.na;switch(o){case"Int":return r;case"Long":return Number(r);case"Float":return r;case"Double":return r;case"String":return r;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${o}`)}}function h(n){const{type:t,name:e,domain:r}=n;return{type:t,name:e,...r&&{domain:r}}}function an(n){return n.map(h)}function sn(n,t){if(n===void 0)return t===void 0;if(t===void 0)return!0;for(const e in t)if(n[e]!==t[e])return!1;return!0}function K(n,t){return n.name===t.name&&sn(n.domain,t.domain)}function un(n,t){return{...n,src:m(n.src,t)}}function m(n,t){switch(n.type){case"column":return{type:"column",column:t(n.column)};case"inner":case"full":return{type:n.type,entries:n.entries.map(e=>m(e,t))};case"outer":return{type:"outer",primary:m(n.primary,t),secondary:n.secondary.map(e=>m(e,t))};default:w(n)}}function I(n){return V(h(n))}function E(n,t){return JSON.stringify([n,t])}class cn{constructor(t){d(this,"domains",new Map);d(this,"axes",new Map);d(this,"domainPacks",[]);d(this,"domainPackToAnchor",new Map);this.anchors=t;const e=Object.entries(t);e.sort((r,o)=>r[0].localeCompare(o[0]));for(const[r,o]of e){for(let i=0;i<o.axesSpec.length;i++){const a=o.axesSpec[i],s=I(a);this.axes.set(s,{anchor:r,idx:i})}if(o.domain!==void 0){const i=Object.entries(o.domain);i.sort((a,s)=>a[0].localeCompare(s[0])),this.domainPackToAnchor.set(JSON.stringify(i),r),this.domainPacks.push(i.map(([a])=>a));for(const[a,s]of i){const c=E(a,s);this.domains.set(c,r)}}}}derive(t){const e={name:t.name,axes:[]};let r;if(t.domain!==void 0)n:for(const o of this.domainPacks){const i=[];for(const s of o){const c=t.domain[s];if(c!==void 0)i.push([s,c]);else break n}const a=this.domainPackToAnchor.get(JSON.stringify(i));if(a!==void 0){e.domainAnchor=a,r=new Set(o);break}}for(const[o,i]of Object.entries(t.domain??{})){if(r!==void 0&&r.has(o))continue;const a=E(o,i),s=this.domains.get(a);e.domain??(e.domain={}),e.domain[o]=s?{anchor:s}:i}return e.axes=t.axesSpec.map(o=>{const i=I(o);return this.axes.get(i)??o}),e}deriveString(t){const e=this.derive(t);return V(e)}}function fn(n,t){const e={...t};if(e.domainAnchor!==void 0){const r=n[e.domainAnchor];if(!r)throw new Error(`Anchor "${e.domainAnchor}" not found`);const o=r.domain||{};e.domain={...o,...e.domain},delete e.domainAnchor}if(e.domain){const r={};for(const[o,i]of Object.entries(e.domain))if(typeof i=="string")r[o]=i;else{const a=n[i.anchor];if(!a)throw new Error(`Anchor "${i.anchor}" not found for domain key "${o}"`);if(!a.domain||a.domain[o]===void 0)throw new Error(`Domain key "${o}" not found in anchor "${i.anchor}"`);r[o]=a.domain[o]}e.domain=r}return e.axes&&(e.axes=e.axes.map(r=>dn(n,r))),e}function dn(n,t){if(!ln(t))return t;const e=t.anchor,r=n[e];if(!r)throw new Error(`Anchor "${e}" not found for axis reference`);if("idx"in t){if(t.idx<0||t.idx>=r.axesSpec.length)throw new Error(`Axis index ${t.idx} out of bounds for anchor "${e}"`);return r.axesSpec[t.idx]}else if("name"in t){const o=r.axesSpec.filter(i=>i.name===t.name);if(o.length>1)throw new Error(`Multiple axes with name "${t.name}" found in anchor "${e}"`);if(o.length===0)throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);return o[0]}else if("id"in t){const o=r.axesSpec.filter(i=>K(t.id,h(i)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${e}"`);return o[0]}throw new Error("Unsupported axis reference type")}function ln(n){return typeof n=="object"&&"anchor"in n}function u(n){return n.kind==="PColumn"}function z(n){return u(n.spec)}function mn(n){return u(n.obj)}function pn(n){return u(n.obj.spec)}function hn(n){if(!z(n))throw new Error(`not a PColumn (kind = ${n.spec.kind})`);return n}function yn(n,t){return n===void 0?void 0:{...n,data:t(n.data)}}function bn(n){const t=new Map,e=r=>{switch(r.type){case"column":t.set(r.column.id,r.column);return;case"full":case"inner":for(const o of r.entries)e(o);return;case"outer":e(r.primary);for(const o of r.secondary)e(o);return;default:w(r)}};return e(n),[...t.values()]}function gn(n){throw new Error("Unexpected object: "+n)}function y(n,t){switch(n.type){case"and":for(const e of n.operands)if(!y(e,t))return!1;return!0;case"or":for(const e of n.operands)if(y(e,t))return!0;return!1;case"not":return!y(n.operand,t);case"name":return u(t)&&t.name===n.name;case"name_pattern":return u(t)&&!!t.name.match(n.pattern);case"annotation":return u(t)&&t.annotations!==void 0&&t.annotations[n.annotation]===n.value;case"annotation_pattern":return u(t)&&t.annotations!==void 0&&t.annotations[n.annotation]!==void 0&&!!t.annotations[n.annotation].match(n.pattern);case"has_axes":return u(t)&&n.axes.every(e=>t.axesSpec.some(r=>(e.type===void 0||e.type===r.type)&&(e.name===void 0||e.name===r.name)&&(e.domain===void 0||Object.keys(e.domain).length===0||r.domain!==void 0&&Object.entries(e.domain).every(([o,i])=>r.domain[o]===i))));default:gn(n)}}function P(n,t){if(n.name!==void 0&&n.name!==t.name)return!1;if(n.type!==void 0){if(Array.isArray(n.type)){if(!n.type.includes(t.type))return!1}else if(n.type!==t.type)return!1}if(n.domain!==void 0){const e=t.domain||{};for(const[r,o]of Object.entries(n.domain))if(e[r]!==o)return!1}return!0}function A(n,t){if(t.name!==void 0&&n.name!==t.name||t.namePattern!==void 0&&!new RegExp(t.namePattern).test(n.name))return!1;if(t.type!==void 0){if(Array.isArray(t.type)){if(!t.type.includes(n.valueType))return!1}else if(t.type!==n.valueType)return!1}if(t.domain!==void 0){const e=n.domain||{};for(const[r,o]of Object.entries(t.domain))if(e[r]!==o)return!1}if(t.axes!==void 0){const e=n.axesSpec.map(h);if(t.partialAxesMatch){for(const r of t.axes)if(!e.some(o=>P(r,o)))return!1}else{if(e.length!==t.axes.length)return!1;for(let r=0;r<t.axes.length;r++)if(!P(t.axes[r],e[r]))return!1}}if(t.annotations!==void 0){const e=n.annotations||{};for(const[r,o]of Object.entries(t.annotations))if(e[r]!==o)return!1}if(t.annotationPatterns!==void 0){const e=n.annotations||{};for(const[r,o]of Object.entries(t.annotationPatterns)){const i=e[r];if(i===void 0||!new RegExp(o).test(i))return!1}}return!0}function Pn(n){return Array.isArray(n)?t=>n.some(e=>u(t)&&A(t,e)):t=>u(t)&&A(t,n)}const An={href:"/"},wn=l.z.object({__isRef:l.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:l.z.string().describe("Upstream block id"),name:l.z.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function xn(n){return typeof n=="object"&&n!==null&&"__isRef"in n&&n.__isRef===!0&&"blockId"in n&&"name"in n}function Nn(n,t){return n.blockId===t.blockId&&n.name===t.name}function In(n,t){return n.ok?{ok:!0,value:t(n.value)}:n}function En(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const Vn="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Sn="0123456789ABCDEFGHIJKLMNOPQRSTUV",kn="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function W(n,t,e){e=e||{};let r,o;switch(t){case"RFC3548":case"RFC4648":r=Vn,o=!0;break;case"RFC4648-HEX":r=Sn,o=!0;break;case"Crockford":r=kn,o=!1;break;default:throw new Error("Unknown base32 variant: "+t)}const i=e.padding!==void 0?e.padding:o,a=En(n);let s=0,c=0,f="";for(let b=0;b<a.byteLength;b++)for(c=c<<8|a.getUint8(b),s+=8;s>=5;)f+=r[c>>>s-5&31],s-=5;if(s>0&&(f+=r[c<<5-s&31]),i)for(;f.length%8!==0;)f+="=";return f}const x=15,q=24,N=l.z.string().length(q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function Cn(){const n=new Uint8Array(x);return crypto.getRandomValues(n),N.parse(W(n,"RFC4648"))}function X(n){if(n.length!==x)throw new Error(`Wrong number of bytes: ${n.length}`);return N.parse(W(n,"RFC4648"))}async function Fn(n){const t=new TextEncoder,e=await crypto.subtle.digest("SHA-256",t.encode(n));return X(new Uint8Array(e.slice(0,15)))}exports.AnchorIdDeriver=cn;exports.DefaultNavigationState=An;exports.PTableAbsent=M;exports.PTableNA=_;exports.PValueBytesNA=B;exports.PValueDoubleNA=U;exports.PValueFloatNA=O;exports.PValueIntNA=D;exports.PValueLongNA=g;exports.PValueStringNA=R;exports.PlId=N;exports.PlIdBytes=x;exports.PlIdLength=q;exports.PlRef=wn;exports.digestPlId=Fn;exports.ensureNotNAPValue=nn;exports.ensurePColumn=hn;exports.executePSpecPredicate=y;exports.extractAllColumns=bn;exports.getAxesId=an;exports.getAxisId=h;exports.getFileNameFromHandle=v;exports.getFilePathFromHandle=$;exports.isImportFileHandleIndex=F;exports.isImportFileHandleUpload=C;exports.isLiveLog=Y;exports.isNotNAPValue=T;exports.isPColumn=z;exports.isPColumnResult=pn;exports.isPColumnSpec=u;exports.isPColumnSpecResult=mn;exports.isPTableAbsent=rn;exports.isPValue=j;exports.isPlRef=xn;exports.isValueAbsent=J;exports.isValueNA=p;exports.mapJoinEntry=m;exports.mapPObjectData=yn;exports.mapPTableDef=un;exports.mapValueInVOE=In;exports.matchAxis=P;exports.matchAxisId=K;exports.matchPColumn=A;exports.pTableValue=on;exports.pValueToStringOrNumber=en;exports.pValueToStringOrNumberOrNull=H;exports.plId=X;exports.plRefsEqual=Nn;exports.resolveAnchors=fn;exports.safeConvertToPValue=L;exports.selectorsToPredicate=Pn;exports.toJsonSafePValue=tn;exports.uniquePlId=Cn;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|