@easyquery/core 7.2.3-rc03 → 7.2.4-beta03
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/bundles/easyquery.core.js +9353 -9335
- package/dist/bundles/easyquery.core.js.map +1 -1
- package/dist/bundles/easyquery.core.min.js +1 -1
- package/dist/bundles/easyquery.core.min.js.map +1 -1
- package/dist/lib/common/eq_services.d.ts +56 -56
- package/dist/lib/common/eq_services.js +159 -159
- package/dist/lib/common/query_param.d.ts +25 -25
- package/dist/lib/common/query_param.js +1 -0
- package/dist/lib/common/tree.d.ts +10 -10
- package/dist/lib/common/tree.js +57 -57
- package/dist/lib/data/eq_aggr_container.d.ts +24 -24
- package/dist/lib/data/eq_aggr_container.js +108 -108
- package/dist/lib/data/eq_aggr_container.js.map +1 -1
- package/dist/lib/data/eq_data_loader.d.ts +8 -8
- package/dist/lib/data/eq_data_loader.js +49 -49
- package/dist/lib/data/eq_data_loader.js.map +1 -1
- package/dist/lib/data/google_data_converter.d.ts +82 -82
- package/dist/lib/data/google_data_converter.js +173 -173
- package/dist/lib/data/google_data_converter.js.map +1 -1
- package/dist/lib/dm/aggr_function.d.ts +27 -27
- package/dist/lib/dm/aggr_function.js +42 -42
- package/dist/lib/dm/data_model.d.ts +330 -330
- package/dist/lib/dm/data_model.js +934 -932
- package/dist/lib/dm/data_model.js.map +1 -1
- package/dist/lib/dm/dto/af_data.d.ts +16 -16
- package/dist/lib/dm/dto/af_data.js +1 -0
- package/dist/lib/dm/dto/dm_data.d.ts +34 -34
- package/dist/lib/dm/dto/dm_data.js +1 -0
- package/dist/lib/dm/dto/entity_data.d.ts +37 -37
- package/dist/lib/dm/dto/entity_data.js +1 -0
- package/dist/lib/dm/dto/operator_data.d.ts +44 -44
- package/dist/lib/dm/dto/operator_data.js +1 -0
- package/dist/lib/dm/dto/ve_data.d.ts +10 -10
- package/dist/lib/dm/dto/ve_data.js +1 -0
- package/dist/lib/dm/entity.d.ts +71 -71
- package/dist/lib/dm/entity.js +90 -88
- package/dist/lib/dm/entity.js.map +1 -1
- package/dist/lib/dm/link.d.ts +7 -7
- package/dist/lib/dm/link.js +1 -0
- package/dist/lib/dm/operator.d.ts +80 -80
- package/dist/lib/dm/operator.js +93 -93
- package/dist/lib/dm/value_editor.d.ts +16 -16
- package/dist/lib/dm/value_editor.js +43 -41
- package/dist/lib/dm/value_editor.js.map +1 -1
- package/dist/lib/eqs/eqs_data_fetcher.d.ts +7 -7
- package/dist/lib/eqs/eqs_data_fetcher.js +36 -36
- package/dist/lib/eqs/eqs_exporter.d.ts +10 -10
- package/dist/lib/eqs/eqs_exporter.js +57 -54
- package/dist/lib/eqs/eqs_exporter.js.map +1 -1
- package/dist/lib/eqs/eqs_model_loader.d.ts +7 -7
- package/dist/lib/eqs/eqs_model_loader.js +42 -40
- package/dist/lib/eqs/eqs_model_loader.js.map +1 -1
- package/dist/lib/eqs/eqs_query_file_loader.d.ts +9 -9
- package/dist/lib/eqs/eqs_query_file_loader.js +54 -54
- package/dist/lib/eqs/eqs_query_file_loader.js.map +1 -1
- package/dist/lib/eqs/eqs_query_synchronizer.d.ts +7 -7
- package/dist/lib/eqs/eqs_query_synchronizer.js +23 -23
- package/dist/lib/eqs/eqs_value_list_resolver.d.ts +7 -7
- package/dist/lib/eqs/eqs_value_list_resolver.js +28 -28
- package/dist/lib/export/exporter.d.ts +16 -16
- package/dist/lib/export/exporter.js +1 -0
- package/dist/lib/i18n/text_resources.d.ts +1 -1
- package/dist/lib/i18n/text_resources.js +26 -26
- package/dist/lib/i18n/text_resources.js.map +1 -1
- package/dist/lib/main/action.d.ts +13 -13
- package/dist/lib/main/action.js +5 -5
- package/dist/lib/main/context.d.ts +342 -342
- package/dist/lib/main/context.js +1439 -1438
- package/dist/lib/main/context.js.map +1 -1
- package/dist/lib/main/context_options.d.ts +145 -145
- package/dist/lib/main/context_options.js +1 -0
- package/dist/lib/main/data_fetcher.d.ts +46 -46
- package/dist/lib/main/data_fetcher.js +1 -0
- package/dist/lib/main/eq_actions.d.ts +14 -14
- package/dist/lib/main/eq_actions.js +15 -15
- package/dist/lib/main/list_cache.d.ts +8 -8
- package/dist/lib/main/list_cache.js +1 -0
- package/dist/lib/main/model_loader.d.ts +21 -21
- package/dist/lib/main/model_loader.js +32 -32
- package/dist/lib/main/model_storage.d.ts +13 -13
- package/dist/lib/main/model_storage.js +17 -17
- package/dist/lib/main/query_file_loader.d.ts +15 -15
- package/dist/lib/main/query_file_loader.js +1 -0
- package/dist/lib/main/query_storage.d.ts +58 -58
- package/dist/lib/main/query_storage.js +124 -124
- package/dist/lib/main/query_synchronizer.d.ts +9 -9
- package/dist/lib/main/query_synchronizer.js +1 -0
- package/dist/lib/main/value_list_resolver.d.ts +18 -18
- package/dist/lib/main/value_list_resolver.js +1 -0
- package/dist/lib/main/widget.d.ts +74 -74
- package/dist/lib/main/widget.js +101 -101
- package/dist/lib/public_api.d.ts +58 -58
- package/dist/lib/public_api.js +59 -42
- package/dist/lib/public_api.js.map +1 -1
- package/dist/lib/query/condition.d.ts +97 -97
- package/dist/lib/query/condition.js +331 -331
- package/dist/lib/query/descriptors.d.ts +36 -36
- package/dist/lib/query/descriptors.js +1 -0
- package/dist/lib/query/dto/condition_data.d.ts +38 -38
- package/dist/lib/query/dto/condition_data.js +1 -0
- package/dist/lib/query/dto/expression_data.d.ts +32 -32
- package/dist/lib/query/dto/expression_data.js +1 -0
- package/dist/lib/query/dto/query_column_data.d.ts +28 -28
- package/dist/lib/query/dto/query_column_data.js +1 -0
- package/dist/lib/query/dto/query_data.d.ts +27 -27
- package/dist/lib/query/dto/query_data.js +1 -0
- package/dist/lib/query/expression.d.ts +69 -69
- package/dist/lib/query/expression.js +202 -202
- package/dist/lib/query/query.d.ts +410 -410
- package/dist/lib/query/query.js +1393 -1391
- package/dist/lib/query/query.js.map +1 -1
- package/dist/lib/query/query_column.d.ts +70 -70
- package/dist/lib/query/query_column.js +157 -157
- package/dist/lib/query/query_events.d.ts +29 -29
- package/dist/lib/query/query_events.js +19 -19
- package/dist/lib/types/cond_part.d.ts +6 -6
- package/dist/lib/types/cond_part.js +7 -7
- package/dist/lib/types/cond_tag.d.ts +12 -12
- package/dist/lib/types/cond_tag.js +13 -13
- package/dist/lib/types/data_kind.d.ts +15 -15
- package/dist/lib/types/data_kind.js +16 -16
- package/dist/lib/types/eq_editor_tag.d.ts +17 -17
- package/dist/lib/types/eq_editor_tag.js +20 -20
- package/dist/lib/types/expr_tag.d.ts +19 -19
- package/dist/lib/types/expr_tag.js +20 -20
- package/dist/lib/types/link_type.d.ts +17 -17
- package/dist/lib/types/link_type.js +18 -18
- package/dist/lib/types/widget_group.d.ts +17 -17
- package/dist/lib/types/widget_group.js +18 -18
- package/dist/lib/utils/constants.d.ts +36 -36
- package/dist/lib/utils/constants.js +50 -50
- package/dist/lib/utils/format_parser.d.ts +40 -40
- package/dist/lib/utils/format_parser.js +87 -87
- package/dist/lib/utils/utils.d.ts +34 -34
- package/dist/lib/utils/utils.js +102 -102
- package/dist/lib/utils/version_info.d.ts +9 -9
- package/dist/lib/utils/version_info.js +12 -12
- package/dist/lib/utils/version_info.js.map +1 -1
- package/package.json +16 -16
- package/webpack.config.js +6 -5
package/dist/lib/dm/entity.js
CHANGED
|
@@ -1,89 +1,91 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
d
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_this
|
|
25
|
-
_this.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_this.
|
|
61
|
-
_this.
|
|
62
|
-
_this.
|
|
63
|
-
_this.
|
|
64
|
-
_this.
|
|
65
|
-
_this.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this.
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { MetaEntity, MetaEntityAttr } from '@easydata/core';
|
|
17
|
+
/**
|
|
18
|
+
* Represents one entity.
|
|
19
|
+
*/
|
|
20
|
+
var Entity = /** @class */ (function (_super) {
|
|
21
|
+
__extends(Entity, _super);
|
|
22
|
+
/** The default constructor. */
|
|
23
|
+
function Entity(parent) {
|
|
24
|
+
var _this = _super.call(this, parent) || this;
|
|
25
|
+
_this.useInConditions = false;
|
|
26
|
+
_this.useInResult = false;
|
|
27
|
+
_this.useInSorting = false;
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Loads entity from its JSON representation object.
|
|
32
|
+
* @param model The Data Model.
|
|
33
|
+
* @param data The JSON representation object.
|
|
34
|
+
*/
|
|
35
|
+
Entity.prototype.loadFromData = function (model, data) {
|
|
36
|
+
_super.prototype.loadFromData.call(this, model, data);
|
|
37
|
+
if (data) {
|
|
38
|
+
this.useInConditions = data.uic;
|
|
39
|
+
this.useInResult = data.uir;
|
|
40
|
+
this.useInSorting = data.uis;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
Entity.prototype.scan = function (processAttribute, processEntity) {
|
|
44
|
+
_super.prototype.scan.call(this, function (attr, opts) { return processAttribute && processAttribute(attr, opts); }, function (entity, opts) { return processEntity && processEntity(entity, opts); });
|
|
45
|
+
};
|
|
46
|
+
return Entity;
|
|
47
|
+
}(MetaEntity));
|
|
48
|
+
export { Entity };
|
|
49
|
+
/**
|
|
50
|
+
* Represents entity attribute.
|
|
51
|
+
*/
|
|
52
|
+
var EntityAttr = /** @class */ (function (_super) {
|
|
53
|
+
__extends(EntityAttr, _super);
|
|
54
|
+
/** The default constructor. */
|
|
55
|
+
function EntityAttr(entity) {
|
|
56
|
+
var _this = _super.call(this, entity) || this;
|
|
57
|
+
/**
|
|
58
|
+
* The parameters associated with this entity attribute
|
|
59
|
+
*/
|
|
60
|
+
_this.params = [];
|
|
61
|
+
_this.useInConditions = true;
|
|
62
|
+
_this.useInResult = true;
|
|
63
|
+
_this.useInSorting = true;
|
|
64
|
+
_this.defaultOperator = "";
|
|
65
|
+
_this.operators = new Array();
|
|
66
|
+
_this.lookupAttr = "";
|
|
67
|
+
_this.expr = "";
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Loads entity attribute from JSON representation object.
|
|
72
|
+
* @param model The Data Model.
|
|
73
|
+
* @param data The JSON representation object.
|
|
74
|
+
*/
|
|
75
|
+
EntityAttr.prototype.loadFromData = function (model, data) {
|
|
76
|
+
_super.prototype.loadFromData.call(this, model, data);
|
|
77
|
+
if (data) {
|
|
78
|
+
this.useInConditions = data.uic;
|
|
79
|
+
this.useInResult = data.uir;
|
|
80
|
+
this.useInSorting = data.uis;
|
|
81
|
+
this.expr = data.sql;
|
|
82
|
+
this.defaultOperator = data.defOperator;
|
|
83
|
+
this.operators = data.ops;
|
|
84
|
+
if (data.udata)
|
|
85
|
+
this.userData = data.udata;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return EntityAttr;
|
|
89
|
+
}(MetaEntityAttr));
|
|
90
|
+
export { EntityAttr };
|
|
89
91
|
//# sourceMappingURL=entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/dm/entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/dm/entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAO5D;;GAEG;AACH;IAA4B,0BAAU;IAuBlC,+BAA+B;IAC/B,gBAAY,MAAe;QAA3B,YACI,kBAAM,MAAM,CAAC,SAIhB;QAHG,KAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,KAAI,CAAC,YAAY,GAAG,KAAK,CAAC;;IAC9B,CAAC;IAGA;;;;MAIE;IACI,6BAAY,GAAnB,UAAoB,KAAgB,EAAE,IAAgB;QAElD,iBAAM,YAAY,YAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAC/B,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC;YAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC;SAChC;IACL,CAAC;IAGM,qBAAI,GAAX,UAAY,gBAAwD,EAChE,aAAmD;QACpD,iBAAM,IAAI,YACN,UAAC,IAAI,EAAE,IAAI,IAAK,OAAA,gBAAgB,IAAI,gBAAgB,CAAC,IAAkB,EAAE,IAAI,CAAC,EAA9D,CAA8D,EAC9E,UAAC,MAAM,EAAE,IAAI,IAAK,OAAA,aAAa,IAAI,aAAa,CAAC,MAAgB,EAAE,IAAI,CAAC,EAAtD,CAAsD,CAC1E,CAAC;IACN,CAAC;IAEL,aAAC;AAAD,CAAC,AAxDD,CAA4B,UAAU,GAwDrC;;AAED;;GAEG;AACH;IAAgC,8BAAc;IAmC1C,+BAA+B;IAC/B,oBAAY,MAAc;QAA1B,YACI,kBAAM,MAAM,CAAC,SAQhB;QApBD;;WAEG;QACI,YAAM,GAAiB,EAAE,CAAC;QAU7B,KAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,KAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,KAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,KAAI,CAAC,SAAS,GAAG,IAAI,KAAK,EAAU,CAAC;QACrC,KAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,KAAI,CAAC,IAAI,GAAG,EAAE,CAAC;;IACnB,CAAC;IAED;;;;OAIG;IACI,iCAAY,GAAnB,UAAoB,KAAgB,EAAE,IAAoB;QAEtD,iBAAM,YAAY,YAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEhC,IAAI,IAAI,EAAE;YAEN,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC;YAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;YACrB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC;YACxC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;YAE1B,IAAI,IAAI,CAAC,KAAK;gBACV,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;SAElC;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AAtED,CAAgC,cAAc,GAsE7C"}
|
package/dist/lib/dm/link.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Entity, EntityAttr } from "./entity";
|
|
2
|
-
export interface Link {
|
|
3
|
-
entityFrom: Entity;
|
|
4
|
-
attrFrom: EntityAttr;
|
|
5
|
-
entityTo: Entity;
|
|
6
|
-
attrTo: EntityAttr;
|
|
7
|
-
}
|
|
1
|
+
import { Entity, EntityAttr } from "./entity";
|
|
2
|
+
export interface Link {
|
|
3
|
+
entityFrom: Entity;
|
|
4
|
+
attrFrom: EntityAttr;
|
|
5
|
+
entityTo: Entity;
|
|
6
|
+
attrTo: EntityAttr;
|
|
7
|
+
}
|
package/dist/lib/dm/link.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { DataType } from '@easydata/core';
|
|
2
|
-
import { EqValueEditor } from './value_editor';
|
|
3
|
-
import { DataModel } from '../dm/data_model';
|
|
4
|
-
import { DataKind } from '../types/data_kind';
|
|
5
|
-
import { OperatorData, OperandData } from './dto/operator_data';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a logical expression or predicate, like comparisions or `LIKE` predicate.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Operator {
|
|
10
|
-
/** The operator ID. */
|
|
11
|
-
id: string;
|
|
12
|
-
/** The operator caption. */
|
|
13
|
-
caption: string;
|
|
14
|
-
/** The display format of operator. */
|
|
15
|
-
displayFormat: string;
|
|
16
|
-
/**
|
|
17
|
-
* The value indicating whether this operator requires range values so first value must be less than the second one.
|
|
18
|
-
*/
|
|
19
|
-
isRange: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The value indicating whether the operator is case insensative.
|
|
22
|
-
*/
|
|
23
|
-
caseIns: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The number of parameters which are taken by the operator.
|
|
26
|
-
*/
|
|
27
|
-
paramCount: number;
|
|
28
|
-
defaultOperand: Operand;
|
|
29
|
-
/** The operands for this operator. */
|
|
30
|
-
operands: Operand[];
|
|
31
|
-
expr: string;
|
|
32
|
-
constValueFormat: string;
|
|
33
|
-
appliedTypes: DataType[];
|
|
34
|
-
/** The default constructor. */
|
|
35
|
-
constructor();
|
|
36
|
-
/**
|
|
37
|
-
* Loads operator from its JSON representation object.
|
|
38
|
-
* @param model The Data Model.
|
|
39
|
-
* @param data The JSON representation object.
|
|
40
|
-
*/
|
|
41
|
-
loadFromData(model: DataModel, data: OperatorData): void;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Represents one operand in some operator's expression
|
|
45
|
-
*/
|
|
46
|
-
export declare class Operand {
|
|
47
|
-
/**
|
|
48
|
-
* The kind of operand (`scalar`, `list`, etc)
|
|
49
|
-
*/
|
|
50
|
-
kind: DataKind;
|
|
51
|
-
/**
|
|
52
|
-
* The type of the data.
|
|
53
|
-
*/
|
|
54
|
-
dataType: DataType;
|
|
55
|
-
/**
|
|
56
|
-
* The value editor associated with this operand.
|
|
57
|
-
*/
|
|
58
|
-
editor: EqValueEditor;
|
|
59
|
-
/**
|
|
60
|
-
* The default value for this operand.
|
|
61
|
-
*/
|
|
62
|
-
defValue: string;
|
|
63
|
-
/**
|
|
64
|
-
* The text for default operand value.
|
|
65
|
-
*/
|
|
66
|
-
defText: string;
|
|
67
|
-
/** The default constructor. */
|
|
68
|
-
constructor();
|
|
69
|
-
/**
|
|
70
|
-
* Loads operand from its JSON representation object.
|
|
71
|
-
* @param model The Data Model.
|
|
72
|
-
* @param data The JSON representation object.
|
|
73
|
-
*/
|
|
74
|
-
loadFromData(model: DataModel, operand: OperandData): void;
|
|
75
|
-
/**
|
|
76
|
-
* Copies operand from other operand.
|
|
77
|
-
* @param scr The operand.
|
|
78
|
-
*/
|
|
79
|
-
copyFrom(src: Operand): void;
|
|
80
|
-
}
|
|
1
|
+
import { DataType } from '@easydata/core';
|
|
2
|
+
import { EqValueEditor } from './value_editor';
|
|
3
|
+
import { DataModel } from '../dm/data_model';
|
|
4
|
+
import { DataKind } from '../types/data_kind';
|
|
5
|
+
import { OperatorData, OperandData } from './dto/operator_data';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a logical expression or predicate, like comparisions or `LIKE` predicate.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Operator {
|
|
10
|
+
/** The operator ID. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** The operator caption. */
|
|
13
|
+
caption: string;
|
|
14
|
+
/** The display format of operator. */
|
|
15
|
+
displayFormat: string;
|
|
16
|
+
/**
|
|
17
|
+
* The value indicating whether this operator requires range values so first value must be less than the second one.
|
|
18
|
+
*/
|
|
19
|
+
isRange: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The value indicating whether the operator is case insensative.
|
|
22
|
+
*/
|
|
23
|
+
caseIns: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The number of parameters which are taken by the operator.
|
|
26
|
+
*/
|
|
27
|
+
paramCount: number;
|
|
28
|
+
defaultOperand: Operand;
|
|
29
|
+
/** The operands for this operator. */
|
|
30
|
+
operands: Operand[];
|
|
31
|
+
expr: string;
|
|
32
|
+
constValueFormat: string;
|
|
33
|
+
appliedTypes: DataType[];
|
|
34
|
+
/** The default constructor. */
|
|
35
|
+
constructor();
|
|
36
|
+
/**
|
|
37
|
+
* Loads operator from its JSON representation object.
|
|
38
|
+
* @param model The Data Model.
|
|
39
|
+
* @param data The JSON representation object.
|
|
40
|
+
*/
|
|
41
|
+
loadFromData(model: DataModel, data: OperatorData): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents one operand in some operator's expression
|
|
45
|
+
*/
|
|
46
|
+
export declare class Operand {
|
|
47
|
+
/**
|
|
48
|
+
* The kind of operand (`scalar`, `list`, etc)
|
|
49
|
+
*/
|
|
50
|
+
kind: DataKind;
|
|
51
|
+
/**
|
|
52
|
+
* The type of the data.
|
|
53
|
+
*/
|
|
54
|
+
dataType: DataType;
|
|
55
|
+
/**
|
|
56
|
+
* The value editor associated with this operand.
|
|
57
|
+
*/
|
|
58
|
+
editor: EqValueEditor;
|
|
59
|
+
/**
|
|
60
|
+
* The default value for this operand.
|
|
61
|
+
*/
|
|
62
|
+
defValue: string;
|
|
63
|
+
/**
|
|
64
|
+
* The text for default operand value.
|
|
65
|
+
*/
|
|
66
|
+
defText: string;
|
|
67
|
+
/** The default constructor. */
|
|
68
|
+
constructor();
|
|
69
|
+
/**
|
|
70
|
+
* Loads operand from its JSON representation object.
|
|
71
|
+
* @param model The Data Model.
|
|
72
|
+
* @param data The JSON representation object.
|
|
73
|
+
*/
|
|
74
|
+
loadFromData(model: DataModel, operand: OperandData): void;
|
|
75
|
+
/**
|
|
76
|
+
* Copies operand from other operand.
|
|
77
|
+
* @param scr The operand.
|
|
78
|
+
*/
|
|
79
|
+
copyFrom(src: Operand): void;
|
|
80
|
+
}
|
package/dist/lib/dm/operator.js
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import { DataType, utils as dataUtils } from '@easydata/core';
|
|
2
|
-
import { EqValueEditor } from './value_editor';
|
|
3
|
-
import { DataKind } from '../types/data_kind';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a logical expression or predicate, like comparisions or `LIKE` predicate.
|
|
6
|
-
*/
|
|
7
|
-
var Operator = /** @class */ (function () {
|
|
8
|
-
/** The default constructor. */
|
|
9
|
-
function Operator() {
|
|
10
|
-
this.id = "";
|
|
11
|
-
this.expr = "";
|
|
12
|
-
this.constValueFormat = "{const}";
|
|
13
|
-
this.caption = "{Unrecognized operator}";
|
|
14
|
-
this.displayFormat = "{expr1} [[{unrecognized operator}]] {expr2}";
|
|
15
|
-
this.isRange = false;
|
|
16
|
-
this.caseIns = false;
|
|
17
|
-
this.paramCount = 2;
|
|
18
|
-
this.defaultOperand = new Operand();
|
|
19
|
-
this.appliedTypes = [];
|
|
20
|
-
this.operands = new Array();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Loads operator from its JSON representation object.
|
|
24
|
-
* @param model The Data Model.
|
|
25
|
-
* @param data The JSON representation object.
|
|
26
|
-
*/
|
|
27
|
-
Operator.prototype.loadFromData = function (model, data) {
|
|
28
|
-
if (data) {
|
|
29
|
-
this.id = data.id;
|
|
30
|
-
this.caption = data.cptn;
|
|
31
|
-
this.caseIns = data.caseIns;
|
|
32
|
-
this.isRange = data.isRange;
|
|
33
|
-
this.displayFormat = data.fmt;
|
|
34
|
-
this.paramCount = data.pcnt;
|
|
35
|
-
this.expr = data.expr;
|
|
36
|
-
this.appliedTypes = data.dtypes || this.appliedTypes;
|
|
37
|
-
if (data.defOperand) {
|
|
38
|
-
this.defaultOperand.loadFromData(model, data.defOperand);
|
|
39
|
-
}
|
|
40
|
-
if (data.editor) {
|
|
41
|
-
this.defaultOperand.editor = model.getEditorById(data.editor) || new EqValueEditor();
|
|
42
|
-
}
|
|
43
|
-
if (data.operands) {
|
|
44
|
-
for (var i = 0; i < data.operands.length; i++) {
|
|
45
|
-
var newOperand = new Operand();
|
|
46
|
-
newOperand.loadFromData(model, data.operands[i]);
|
|
47
|
-
if (data.editor) {
|
|
48
|
-
newOperand.editor = model.getEditorById(data.editor) || new EqValueEditor();
|
|
49
|
-
}
|
|
50
|
-
this.operands.push(newOperand);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
return Operator;
|
|
56
|
-
}());
|
|
57
|
-
export { Operator };
|
|
58
|
-
/**
|
|
59
|
-
* Represents one operand in some operator's expression
|
|
60
|
-
*/
|
|
61
|
-
var Operand = /** @class */ (function () {
|
|
62
|
-
/** The default constructor. */
|
|
63
|
-
function Operand() {
|
|
64
|
-
this.kind = DataKind.Scalar;
|
|
65
|
-
this.dataType = DataType.Unknown;
|
|
66
|
-
this.editor = new EqValueEditor();
|
|
67
|
-
this.defValue = "";
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Loads operand from its JSON representation object.
|
|
71
|
-
* @param model The Data Model.
|
|
72
|
-
* @param data The JSON representation object.
|
|
73
|
-
*/
|
|
74
|
-
Operand.prototype.loadFromData = function (model, operand) {
|
|
75
|
-
this.kind = operand.kind;
|
|
76
|
-
this.dataType = operand.dtype;
|
|
77
|
-
this.defValue = operand.val;
|
|
78
|
-
this.defText = operand.txt;
|
|
79
|
-
;
|
|
80
|
-
if (operand.editor) {
|
|
81
|
-
this.editor = model.getEditorById(operand.editor) || new EqValueEditor();
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Copies operand from other operand.
|
|
86
|
-
* @param scr The operand.
|
|
87
|
-
*/
|
|
88
|
-
Operand.prototype.copyFrom = function (src) {
|
|
89
|
-
dataUtils.assign(this, src);
|
|
90
|
-
};
|
|
91
|
-
return Operand;
|
|
92
|
-
}());
|
|
93
|
-
export { Operand };
|
|
1
|
+
import { DataType, utils as dataUtils } from '@easydata/core';
|
|
2
|
+
import { EqValueEditor } from './value_editor';
|
|
3
|
+
import { DataKind } from '../types/data_kind';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a logical expression or predicate, like comparisions or `LIKE` predicate.
|
|
6
|
+
*/
|
|
7
|
+
var Operator = /** @class */ (function () {
|
|
8
|
+
/** The default constructor. */
|
|
9
|
+
function Operator() {
|
|
10
|
+
this.id = "";
|
|
11
|
+
this.expr = "";
|
|
12
|
+
this.constValueFormat = "{const}";
|
|
13
|
+
this.caption = "{Unrecognized operator}";
|
|
14
|
+
this.displayFormat = "{expr1} [[{unrecognized operator}]] {expr2}";
|
|
15
|
+
this.isRange = false;
|
|
16
|
+
this.caseIns = false;
|
|
17
|
+
this.paramCount = 2;
|
|
18
|
+
this.defaultOperand = new Operand();
|
|
19
|
+
this.appliedTypes = [];
|
|
20
|
+
this.operands = new Array();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Loads operator from its JSON representation object.
|
|
24
|
+
* @param model The Data Model.
|
|
25
|
+
* @param data The JSON representation object.
|
|
26
|
+
*/
|
|
27
|
+
Operator.prototype.loadFromData = function (model, data) {
|
|
28
|
+
if (data) {
|
|
29
|
+
this.id = data.id;
|
|
30
|
+
this.caption = data.cptn;
|
|
31
|
+
this.caseIns = data.caseIns;
|
|
32
|
+
this.isRange = data.isRange;
|
|
33
|
+
this.displayFormat = data.fmt;
|
|
34
|
+
this.paramCount = data.pcnt;
|
|
35
|
+
this.expr = data.expr;
|
|
36
|
+
this.appliedTypes = data.dtypes || this.appliedTypes;
|
|
37
|
+
if (data.defOperand) {
|
|
38
|
+
this.defaultOperand.loadFromData(model, data.defOperand);
|
|
39
|
+
}
|
|
40
|
+
if (data.editor) {
|
|
41
|
+
this.defaultOperand.editor = model.getEditorById(data.editor) || new EqValueEditor();
|
|
42
|
+
}
|
|
43
|
+
if (data.operands) {
|
|
44
|
+
for (var i = 0; i < data.operands.length; i++) {
|
|
45
|
+
var newOperand = new Operand();
|
|
46
|
+
newOperand.loadFromData(model, data.operands[i]);
|
|
47
|
+
if (data.editor) {
|
|
48
|
+
newOperand.editor = model.getEditorById(data.editor) || new EqValueEditor();
|
|
49
|
+
}
|
|
50
|
+
this.operands.push(newOperand);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return Operator;
|
|
56
|
+
}());
|
|
57
|
+
export { Operator };
|
|
58
|
+
/**
|
|
59
|
+
* Represents one operand in some operator's expression
|
|
60
|
+
*/
|
|
61
|
+
var Operand = /** @class */ (function () {
|
|
62
|
+
/** The default constructor. */
|
|
63
|
+
function Operand() {
|
|
64
|
+
this.kind = DataKind.Scalar;
|
|
65
|
+
this.dataType = DataType.Unknown;
|
|
66
|
+
this.editor = new EqValueEditor();
|
|
67
|
+
this.defValue = "";
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Loads operand from its JSON representation object.
|
|
71
|
+
* @param model The Data Model.
|
|
72
|
+
* @param data The JSON representation object.
|
|
73
|
+
*/
|
|
74
|
+
Operand.prototype.loadFromData = function (model, operand) {
|
|
75
|
+
this.kind = operand.kind;
|
|
76
|
+
this.dataType = operand.dtype;
|
|
77
|
+
this.defValue = operand.val;
|
|
78
|
+
this.defText = operand.txt;
|
|
79
|
+
;
|
|
80
|
+
if (operand.editor) {
|
|
81
|
+
this.editor = model.getEditorById(operand.editor) || new EqValueEditor();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Copies operand from other operand.
|
|
86
|
+
* @param scr The operand.
|
|
87
|
+
*/
|
|
88
|
+
Operand.prototype.copyFrom = function (src) {
|
|
89
|
+
dataUtils.assign(this, src);
|
|
90
|
+
};
|
|
91
|
+
return Operand;
|
|
92
|
+
}());
|
|
93
|
+
export { Operand };
|
|
94
94
|
//# sourceMappingURL=operator.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ValueEditor } from '@easydata/core';
|
|
2
|
-
import { EqEditorTag } from '../types/eq_editor_tag';
|
|
3
|
-
import { ValueEditorData } from './dto/ve_data';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a value editor.
|
|
6
|
-
*/
|
|
7
|
-
export declare class EqValueEditor extends ValueEditor {
|
|
8
|
-
tag: EqEditorTag;
|
|
9
|
-
/** The default constructor. */
|
|
10
|
-
constructor();
|
|
11
|
-
/**
|
|
12
|
-
* Loads value editor from its JSON representation object.
|
|
13
|
-
* @param data The JSON representation object.
|
|
14
|
-
*/
|
|
15
|
-
loadFromData(data: ValueEditorData): void;
|
|
16
|
-
}
|
|
1
|
+
import { ValueEditor } from '@easydata/core';
|
|
2
|
+
import { EqEditorTag } from '../types/eq_editor_tag';
|
|
3
|
+
import { ValueEditorData } from './dto/ve_data';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a value editor.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EqValueEditor extends ValueEditor {
|
|
8
|
+
tag: EqEditorTag;
|
|
9
|
+
/** The default constructor. */
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Loads value editor from its JSON representation object.
|
|
13
|
+
* @param data The JSON representation object.
|
|
14
|
+
*/
|
|
15
|
+
loadFromData(data: ValueEditorData): void;
|
|
16
|
+
}
|