@j2inn/resolvable-ui-elements 1.0.5 → 1.1.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/resolvableElements/elements/expr/ResolvableExprElement.d.ts +7 -1
- package/dist/resolvableElements/elements/expr/ResolvableExprElement.js +49 -20
- package/dist/resolvableElements/elements/expr/ResolvableExprElement.js.map +1 -1
- package/dist_es/resolvableElements/elements/expr/ResolvableExprElement.d.ts +7 -1
- package/dist_es/resolvableElements/elements/expr/ResolvableExprElement.js +49 -20
- package/dist_es/resolvableElements/elements/expr/ResolvableExprElement.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { HDict } from 'haystack-core';
|
|
2
2
|
import { ResolvableValueElement } from '../ResolvableValueElement';
|
|
3
3
|
import { UiElementConstructorData, UiElementData } from '../UiElement';
|
|
4
|
+
import { ResolvableExprElementMeta } from './ResolvableExprElementMeta';
|
|
4
5
|
/**
|
|
5
6
|
* Resolves to the result of an expression.
|
|
6
7
|
*/
|
|
7
8
|
export declare class ResolvableExprElement<T extends UiElementData> extends ResolvableValueElement<T> {
|
|
8
9
|
#private;
|
|
9
|
-
static collectionTypes: Set<string>;
|
|
10
10
|
constructor(data: UiElementConstructorData<T>);
|
|
11
11
|
refreshes: number;
|
|
12
|
+
protected getMeta: () => ResolvableExprElementMeta;
|
|
12
13
|
protected doInitialize: (parameters: HDict) => Promise<void>;
|
|
13
14
|
/**
|
|
14
15
|
* Checks whether the declared resolvedType of this element is a collection.
|
|
15
16
|
* @returns true if the resolvedType is a collection.
|
|
16
17
|
*/
|
|
17
18
|
isExpectedResultACollection: () => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether the declared resolvedType of this element is a single value.
|
|
21
|
+
* @returns true if the resolvedType is a value.
|
|
22
|
+
*/
|
|
23
|
+
isExpectedResultVal: () => boolean;
|
|
18
24
|
protected doClose: () => Promise<void>;
|
|
19
25
|
getParameterList: () => string[];
|
|
20
26
|
}
|
|
@@ -13,29 +13,15 @@ const GRID_VAL_COLUMN_NAME = 'val';
|
|
|
13
13
|
* Resolves to the result of an expression.
|
|
14
14
|
*/
|
|
15
15
|
class ResolvableExprElement extends ResolvableValueElement_1.ResolvableValueElement {
|
|
16
|
-
static collectionTypes = new Set(['HGrid', 'HList']);
|
|
17
16
|
constructor(data) {
|
|
18
17
|
super(data);
|
|
19
18
|
}
|
|
20
19
|
refreshes = 0;
|
|
21
20
|
#timeout;
|
|
21
|
+
getMeta = () => this._meta;
|
|
22
22
|
doInitialize = async (parameters) => {
|
|
23
|
+
const { refreshAfter } = this.getMeta();
|
|
23
24
|
await this.#updateValue(parameters);
|
|
24
|
-
};
|
|
25
|
-
#updateValue = async (parameters) => {
|
|
26
|
-
const { expr, refreshAfter, path } = this
|
|
27
|
-
._meta;
|
|
28
|
-
const grid = await this.resolver.evalExprElement(expr, parameters, path);
|
|
29
|
-
// Identify when it's necessary to unpack the result `val` or not
|
|
30
|
-
// since the eval wraps the result value in a grid's first dict `val` tag for non-collections.
|
|
31
|
-
const shouldUnpackResult = !this.isExpectedResultACollection() &&
|
|
32
|
-
grid.hasColumn(GRID_VAL_COLUMN_NAME);
|
|
33
|
-
if (shouldUnpackResult) {
|
|
34
|
-
this.value = grid[0]?.get(GRID_VAL_COLUMN_NAME);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
this.value = grid;
|
|
38
|
-
}
|
|
39
25
|
if (refreshAfter) {
|
|
40
26
|
this.#timeout = setTimeout(() => {
|
|
41
27
|
this.refreshes++;
|
|
@@ -43,14 +29,57 @@ class ResolvableExprElement extends ResolvableValueElement_1.ResolvableValueElem
|
|
|
43
29
|
}, haystack_core_1.HNum.make(refreshAfter, haystack_units_1.second).convertTo(haystack_units_1.millisecond).value);
|
|
44
30
|
}
|
|
45
31
|
};
|
|
32
|
+
#updateValue = async (parameters) => {
|
|
33
|
+
const { expr, path } = this.getMeta();
|
|
34
|
+
const grid = await this.resolver.evalExprElement(expr, parameters, path);
|
|
35
|
+
this.value = this.#unpackResult(grid);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Unpacks grid if expected `resolvedType` result requires it.
|
|
39
|
+
* @param grid result grid
|
|
40
|
+
* @returns unpacked value
|
|
41
|
+
*/
|
|
42
|
+
#unpackResult = (grid) => {
|
|
43
|
+
// Identify when it's necessary to unpack the result from `val` column or not
|
|
44
|
+
if (this.isExpectedResultACollection()) {
|
|
45
|
+
if (!grid.hasColumn(GRID_VAL_COLUMN_NAME)) {
|
|
46
|
+
this.#logValColumnNotFound(grid);
|
|
47
|
+
}
|
|
48
|
+
// Unpack val column into array
|
|
49
|
+
return grid.map((row) => row.get(GRID_VAL_COLUMN_NAME));
|
|
50
|
+
}
|
|
51
|
+
else if (this.isExpectedResultVal()) {
|
|
52
|
+
if (!grid.hasColumn(GRID_VAL_COLUMN_NAME)) {
|
|
53
|
+
this.#logValColumnNotFound(grid);
|
|
54
|
+
}
|
|
55
|
+
// Unpack first dict val column into value
|
|
56
|
+
return grid[0]?.get(GRID_VAL_COLUMN_NAME);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
// Default to using the grid response as it is
|
|
60
|
+
return grid;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
#logValColumnNotFound = (grid) => {
|
|
64
|
+
const { expr } = this.getMeta();
|
|
65
|
+
console.warn(`expected "${GRID_VAL_COLUMN_NAME}" column on expr result not found`, expr, grid);
|
|
66
|
+
grid.inspect();
|
|
67
|
+
};
|
|
46
68
|
/**
|
|
47
69
|
* Checks whether the declared resolvedType of this element is a collection.
|
|
48
70
|
* @returns true if the resolvedType is a collection.
|
|
49
71
|
*/
|
|
50
72
|
isExpectedResultACollection = () => {
|
|
51
|
-
const { resolvedType } = this.
|
|
52
|
-
return
|
|
53
|
-
|
|
73
|
+
const { resolvedType } = this.getMeta();
|
|
74
|
+
return resolvedType.endsWith('[]');
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Checks whether the declared resolvedType of this element is a single value.
|
|
78
|
+
* @returns true if the resolvedType is a value.
|
|
79
|
+
*/
|
|
80
|
+
isExpectedResultVal = () => {
|
|
81
|
+
const { resolvedType } = this.getMeta();
|
|
82
|
+
return resolvedType !== 'HGrid' && !this.isExpectedResultACollection();
|
|
54
83
|
};
|
|
55
84
|
doClose = async () => {
|
|
56
85
|
if (this.#timeout) {
|
|
@@ -58,7 +87,7 @@ class ResolvableExprElement extends ResolvableValueElement_1.ResolvableValueElem
|
|
|
58
87
|
}
|
|
59
88
|
};
|
|
60
89
|
getParameterList = () => {
|
|
61
|
-
const { expr } = this.
|
|
90
|
+
const { expr } = this.getMeta();
|
|
62
91
|
const parameters = [];
|
|
63
92
|
if (expr) {
|
|
64
93
|
(0, resolveTemplatedExpression_1.replaceTemplateVariables)(expr, (_, match) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvableExprElement.js","sourceRoot":"","sources":["../../../../src/resolvableElements/elements/expr/ResolvableExprElement.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"ResolvableExprElement.js","sourceRoot":"","sources":["../../../../src/resolvableElements/elements/expr/ResolvableExprElement.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDAAwD;AACxD,mDAAoD;AACpD,iFAA2E;AAE3E,sEAAkE;AAIlE,MAAM,oBAAoB,GAAG,KAAK,CAAA;AAElC;;GAEG;AACH,MAAa,qBAEX,SAAQ,+CAAyB;IAClC,YAAY,IAAiC;QAC5C,KAAK,CAAC,IAAI,CAAC,CAAA;IACZ,CAAC;IAED,SAAS,GAAG,CAAC,CAAA;IACb,QAAQ,CAAS;IAEP,OAAO,GAAG,GAA8B,EAAE,CACnD,IAAI,CAAC,KAAkC,CAAA;IAE9B,YAAY,GAAG,KAAK,EAAE,UAAiB,EAAiB,EAAE;QACnE,MAAM,EAAE,YAAY,EAAE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BAC3C,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACtB,OAAO,EAAE,CAAA;YACV,CAAC,CAAC,CAAA;SACF;QAED,OAAO,UAAU,CAAA;IAClB,CAAC,CAAA;CACD;AA7GD,sDA6GC"}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { HDict } from 'haystack-core';
|
|
2
2
|
import { ResolvableValueElement } from '../ResolvableValueElement';
|
|
3
3
|
import { UiElementConstructorData, UiElementData } from '../UiElement';
|
|
4
|
+
import { ResolvableExprElementMeta } from './ResolvableExprElementMeta';
|
|
4
5
|
/**
|
|
5
6
|
* Resolves to the result of an expression.
|
|
6
7
|
*/
|
|
7
8
|
export declare class ResolvableExprElement<T extends UiElementData> extends ResolvableValueElement<T> {
|
|
8
9
|
#private;
|
|
9
|
-
static collectionTypes: Set<string>;
|
|
10
10
|
constructor(data: UiElementConstructorData<T>);
|
|
11
11
|
refreshes: number;
|
|
12
|
+
protected getMeta: () => ResolvableExprElementMeta;
|
|
12
13
|
protected doInitialize: (parameters: HDict) => Promise<void>;
|
|
13
14
|
/**
|
|
14
15
|
* Checks whether the declared resolvedType of this element is a collection.
|
|
15
16
|
* @returns true if the resolvedType is a collection.
|
|
16
17
|
*/
|
|
17
18
|
isExpectedResultACollection: () => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether the declared resolvedType of this element is a single value.
|
|
21
|
+
* @returns true if the resolvedType is a value.
|
|
22
|
+
*/
|
|
23
|
+
isExpectedResultVal: () => boolean;
|
|
18
24
|
protected doClose: () => Promise<void>;
|
|
19
25
|
getParameterList: () => string[];
|
|
20
26
|
}
|
|
@@ -10,29 +10,15 @@ const GRID_VAL_COLUMN_NAME = 'val';
|
|
|
10
10
|
* Resolves to the result of an expression.
|
|
11
11
|
*/
|
|
12
12
|
export class ResolvableExprElement extends ResolvableValueElement {
|
|
13
|
-
static collectionTypes = new Set(['HGrid', 'HList']);
|
|
14
13
|
constructor(data) {
|
|
15
14
|
super(data);
|
|
16
15
|
}
|
|
17
16
|
refreshes = 0;
|
|
18
17
|
#timeout;
|
|
18
|
+
getMeta = () => this._meta;
|
|
19
19
|
doInitialize = async (parameters) => {
|
|
20
|
+
const { refreshAfter } = this.getMeta();
|
|
20
21
|
await this.#updateValue(parameters);
|
|
21
|
-
};
|
|
22
|
-
#updateValue = async (parameters) => {
|
|
23
|
-
const { expr, refreshAfter, path } = this
|
|
24
|
-
._meta;
|
|
25
|
-
const grid = await this.resolver.evalExprElement(expr, parameters, path);
|
|
26
|
-
// Identify when it's necessary to unpack the result `val` or not
|
|
27
|
-
// since the eval wraps the result value in a grid's first dict `val` tag for non-collections.
|
|
28
|
-
const shouldUnpackResult = !this.isExpectedResultACollection() &&
|
|
29
|
-
grid.hasColumn(GRID_VAL_COLUMN_NAME);
|
|
30
|
-
if (shouldUnpackResult) {
|
|
31
|
-
this.value = grid[0]?.get(GRID_VAL_COLUMN_NAME);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this.value = grid;
|
|
35
|
-
}
|
|
36
22
|
if (refreshAfter) {
|
|
37
23
|
this.#timeout = setTimeout(() => {
|
|
38
24
|
this.refreshes++;
|
|
@@ -40,14 +26,57 @@ export class ResolvableExprElement extends ResolvableValueElement {
|
|
|
40
26
|
}, HNum.make(refreshAfter, second).convertTo(millisecond).value);
|
|
41
27
|
}
|
|
42
28
|
};
|
|
29
|
+
#updateValue = async (parameters) => {
|
|
30
|
+
const { expr, path } = this.getMeta();
|
|
31
|
+
const grid = await this.resolver.evalExprElement(expr, parameters, path);
|
|
32
|
+
this.value = this.#unpackResult(grid);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Unpacks grid if expected `resolvedType` result requires it.
|
|
36
|
+
* @param grid result grid
|
|
37
|
+
* @returns unpacked value
|
|
38
|
+
*/
|
|
39
|
+
#unpackResult = (grid) => {
|
|
40
|
+
// Identify when it's necessary to unpack the result from `val` column or not
|
|
41
|
+
if (this.isExpectedResultACollection()) {
|
|
42
|
+
if (!grid.hasColumn(GRID_VAL_COLUMN_NAME)) {
|
|
43
|
+
this.#logValColumnNotFound(grid);
|
|
44
|
+
}
|
|
45
|
+
// Unpack val column into array
|
|
46
|
+
return grid.map((row) => row.get(GRID_VAL_COLUMN_NAME));
|
|
47
|
+
}
|
|
48
|
+
else if (this.isExpectedResultVal()) {
|
|
49
|
+
if (!grid.hasColumn(GRID_VAL_COLUMN_NAME)) {
|
|
50
|
+
this.#logValColumnNotFound(grid);
|
|
51
|
+
}
|
|
52
|
+
// Unpack first dict val column into value
|
|
53
|
+
return grid[0]?.get(GRID_VAL_COLUMN_NAME);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// Default to using the grid response as it is
|
|
57
|
+
return grid;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
#logValColumnNotFound = (grid) => {
|
|
61
|
+
const { expr } = this.getMeta();
|
|
62
|
+
console.warn(`expected "${GRID_VAL_COLUMN_NAME}" column on expr result not found`, expr, grid);
|
|
63
|
+
grid.inspect();
|
|
64
|
+
};
|
|
43
65
|
/**
|
|
44
66
|
* Checks whether the declared resolvedType of this element is a collection.
|
|
45
67
|
* @returns true if the resolvedType is a collection.
|
|
46
68
|
*/
|
|
47
69
|
isExpectedResultACollection = () => {
|
|
48
|
-
const { resolvedType } = this.
|
|
49
|
-
return
|
|
50
|
-
|
|
70
|
+
const { resolvedType } = this.getMeta();
|
|
71
|
+
return resolvedType.endsWith('[]');
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Checks whether the declared resolvedType of this element is a single value.
|
|
75
|
+
* @returns true if the resolvedType is a value.
|
|
76
|
+
*/
|
|
77
|
+
isExpectedResultVal = () => {
|
|
78
|
+
const { resolvedType } = this.getMeta();
|
|
79
|
+
return resolvedType !== 'HGrid' && !this.isExpectedResultACollection();
|
|
51
80
|
};
|
|
52
81
|
doClose = async () => {
|
|
53
82
|
if (this.#timeout) {
|
|
@@ -55,7 +84,7 @@ export class ResolvableExprElement extends ResolvableValueElement {
|
|
|
55
84
|
}
|
|
56
85
|
};
|
|
57
86
|
getParameterList = () => {
|
|
58
|
-
const { expr } = this.
|
|
87
|
+
const { expr } = this.getMeta();
|
|
59
88
|
const parameters = [];
|
|
60
89
|
if (expr) {
|
|
61
90
|
replaceTemplateVariables(expr, (_, match) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvableExprElement.js","sourceRoot":"","sources":["../../../../src/resolvableElements/elements/expr/ResolvableExprElement.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ResolvableExprElement.js","sourceRoot":"","sources":["../../../../src/resolvableElements/elements/expr/ResolvableExprElement.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAgB,IAAI,EAAQ,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAIlE,MAAM,oBAAoB,GAAG,KAAK,CAAA;AAElC;;GAEG;AACH,MAAM,OAAO,qBAEX,SAAQ,sBAAyB;IAClC,YAAY,IAAiC;QAC5C,KAAK,CAAC,IAAI,CAAC,CAAA;IACZ,CAAC;IAED,SAAS,GAAG,CAAC,CAAA;IACb,QAAQ,CAAS;IAEP,OAAO,GAAG,GAA8B,EAAE,CACnD,IAAI,CAAC,KAAkC,CAAA;IAE9B,YAAY,GAAG,KAAK,EAAE,UAAiB,EAAiB,EAAE;QACnE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;QAEvC,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;QAEnC,IAAI,YAAY,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,GAA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