@easyquery/core 7.2.3 → 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 -9336
- 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 -1439
- 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
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a parser for format expressions in operators
|
|
3
|
-
*/
|
|
4
|
-
var FormatParser = /** @class */ (function () {
|
|
5
|
-
function FormatParser(format) {
|
|
6
|
-
this.start(format);
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Starts parsing of the format string passed in the parameter
|
|
10
|
-
* @param format
|
|
11
|
-
*/
|
|
12
|
-
FormatParser.prototype.start = function (format) {
|
|
13
|
-
this.formatStr = format;
|
|
14
|
-
this.pos = 0;
|
|
15
|
-
this.exprNum = 0;
|
|
16
|
-
this.tokenText = '';
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Skips all spcaes till the beginning of next token
|
|
20
|
-
*/
|
|
21
|
-
FormatParser.prototype.skipSpaces = function () {
|
|
22
|
-
while (this.pos < this.formatStr.length && this.formatStr.charAt(this.pos) === ' ')
|
|
23
|
-
this.pos++;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Scans the source and gets the next token
|
|
27
|
-
*/
|
|
28
|
-
FormatParser.prototype.next = function () {
|
|
29
|
-
this.skipSpaces();
|
|
30
|
-
if (this.pos >= this.formatStr.length)
|
|
31
|
-
return false;
|
|
32
|
-
var npos = 0;
|
|
33
|
-
if (this.formatStr.charAt(this.pos) === '{') {
|
|
34
|
-
npos = this.formatStr.indexOf('}', this.pos);
|
|
35
|
-
if (npos < 0)
|
|
36
|
-
return false;
|
|
37
|
-
this.tokenText = this.formatStr.substring(this.pos, npos + 1);
|
|
38
|
-
if (this.tokenText.indexOf('{expr') === 0) {
|
|
39
|
-
this.token = 'expression';
|
|
40
|
-
this.exprNum = parseInt(this.tokenText.substring(5, this.tokenText.length));
|
|
41
|
-
}
|
|
42
|
-
this.pos = npos + 1;
|
|
43
|
-
}
|
|
44
|
-
else if (this.formatStr.charAt(this.pos) === '[' && this.pos < this.formatStr.length - 1 && this.formatStr.charAt(this.pos + 1) === '[') {
|
|
45
|
-
this.pos += 2;
|
|
46
|
-
npos = this.formatStr.indexOf(']]', this.pos);
|
|
47
|
-
this.token = 'operator';
|
|
48
|
-
this.tokenText = this.formatStr.substring(this.pos, npos);
|
|
49
|
-
this.pos = npos + 2;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.token = 'text';
|
|
53
|
-
var npos1 = this.formatStr.indexOf('{', this.pos);
|
|
54
|
-
if (npos1 < 0)
|
|
55
|
-
npos1 = this.formatStr.length;
|
|
56
|
-
var npos2 = this.formatStr.indexOf('[[', this.pos);
|
|
57
|
-
if (npos2 < 0)
|
|
58
|
-
npos2 = this.formatStr.length;
|
|
59
|
-
npos = Math.min(npos1, npos2);
|
|
60
|
-
this.tokenText = this.formatStr.substring(this.pos, npos).trim();
|
|
61
|
-
this.pos = npos;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Returns current token
|
|
67
|
-
*/
|
|
68
|
-
FormatParser.prototype.getToken = function () {
|
|
69
|
-
return {
|
|
70
|
-
type: this.token,
|
|
71
|
-
text: this.tokenText,
|
|
72
|
-
index: this.exprNum - 1
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Parses all source string passed in constructor and returns the list of tokens
|
|
77
|
-
*/
|
|
78
|
-
FormatParser.prototype.parse = function () {
|
|
79
|
-
var result = [];
|
|
80
|
-
while (this.next()) {
|
|
81
|
-
result.push(this.getToken());
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
};
|
|
85
|
-
return FormatParser;
|
|
86
|
-
}());
|
|
87
|
-
export { FormatParser };
|
|
1
|
+
/**
|
|
2
|
+
* Represents a parser for format expressions in operators
|
|
3
|
+
*/
|
|
4
|
+
var FormatParser = /** @class */ (function () {
|
|
5
|
+
function FormatParser(format) {
|
|
6
|
+
this.start(format);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Starts parsing of the format string passed in the parameter
|
|
10
|
+
* @param format
|
|
11
|
+
*/
|
|
12
|
+
FormatParser.prototype.start = function (format) {
|
|
13
|
+
this.formatStr = format;
|
|
14
|
+
this.pos = 0;
|
|
15
|
+
this.exprNum = 0;
|
|
16
|
+
this.tokenText = '';
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Skips all spcaes till the beginning of next token
|
|
20
|
+
*/
|
|
21
|
+
FormatParser.prototype.skipSpaces = function () {
|
|
22
|
+
while (this.pos < this.formatStr.length && this.formatStr.charAt(this.pos) === ' ')
|
|
23
|
+
this.pos++;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Scans the source and gets the next token
|
|
27
|
+
*/
|
|
28
|
+
FormatParser.prototype.next = function () {
|
|
29
|
+
this.skipSpaces();
|
|
30
|
+
if (this.pos >= this.formatStr.length)
|
|
31
|
+
return false;
|
|
32
|
+
var npos = 0;
|
|
33
|
+
if (this.formatStr.charAt(this.pos) === '{') {
|
|
34
|
+
npos = this.formatStr.indexOf('}', this.pos);
|
|
35
|
+
if (npos < 0)
|
|
36
|
+
return false;
|
|
37
|
+
this.tokenText = this.formatStr.substring(this.pos, npos + 1);
|
|
38
|
+
if (this.tokenText.indexOf('{expr') === 0) {
|
|
39
|
+
this.token = 'expression';
|
|
40
|
+
this.exprNum = parseInt(this.tokenText.substring(5, this.tokenText.length));
|
|
41
|
+
}
|
|
42
|
+
this.pos = npos + 1;
|
|
43
|
+
}
|
|
44
|
+
else if (this.formatStr.charAt(this.pos) === '[' && this.pos < this.formatStr.length - 1 && this.formatStr.charAt(this.pos + 1) === '[') {
|
|
45
|
+
this.pos += 2;
|
|
46
|
+
npos = this.formatStr.indexOf(']]', this.pos);
|
|
47
|
+
this.token = 'operator';
|
|
48
|
+
this.tokenText = this.formatStr.substring(this.pos, npos);
|
|
49
|
+
this.pos = npos + 2;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.token = 'text';
|
|
53
|
+
var npos1 = this.formatStr.indexOf('{', this.pos);
|
|
54
|
+
if (npos1 < 0)
|
|
55
|
+
npos1 = this.formatStr.length;
|
|
56
|
+
var npos2 = this.formatStr.indexOf('[[', this.pos);
|
|
57
|
+
if (npos2 < 0)
|
|
58
|
+
npos2 = this.formatStr.length;
|
|
59
|
+
npos = Math.min(npos1, npos2);
|
|
60
|
+
this.tokenText = this.formatStr.substring(this.pos, npos).trim();
|
|
61
|
+
this.pos = npos;
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Returns current token
|
|
67
|
+
*/
|
|
68
|
+
FormatParser.prototype.getToken = function () {
|
|
69
|
+
return {
|
|
70
|
+
type: this.token,
|
|
71
|
+
text: this.tokenText,
|
|
72
|
+
index: this.exprNum - 1
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Parses all source string passed in constructor and returns the list of tokens
|
|
77
|
+
*/
|
|
78
|
+
FormatParser.prototype.parse = function () {
|
|
79
|
+
var result = [];
|
|
80
|
+
while (this.next()) {
|
|
81
|
+
result.push(this.getToken());
|
|
82
|
+
}
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
return FormatParser;
|
|
86
|
+
}());
|
|
87
|
+
export { FormatParser };
|
|
88
88
|
//# sourceMappingURL=format_parser.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { DataType } from '@easydata/core';
|
|
2
|
-
import { FormatToken } from "./format_parser";
|
|
3
|
-
import { LinkType } from '../types/link_type';
|
|
4
|
-
export declare namespace equtils {
|
|
5
|
-
/**
|
|
6
|
-
* Adds two paths and returns the result
|
|
7
|
-
* Correctly processes leading and trailing slashes
|
|
8
|
-
* @param path1
|
|
9
|
-
* @param path2
|
|
10
|
-
*/
|
|
11
|
-
function combinePath(path1: string, path2: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Converts a string to a `LinkType` value
|
|
14
|
-
* @param str
|
|
15
|
-
*/
|
|
16
|
-
function strToLinkType(str: string): LinkType;
|
|
17
|
-
/**
|
|
18
|
-
* Converts a `LinkType` value to a string
|
|
19
|
-
* @param type
|
|
20
|
-
*/
|
|
21
|
-
function linkTypeToStr(type: LinkType): string;
|
|
22
|
-
/**
|
|
23
|
-
* Parses the operator's format string and returns a list of tokens
|
|
24
|
-
* @param operator
|
|
25
|
-
*/
|
|
26
|
-
function parseOperatorFormat(operator: any): FormatToken[];
|
|
27
|
-
/**
|
|
28
|
-
* Converts a value from one DataType to another
|
|
29
|
-
* @param value
|
|
30
|
-
* @param fromDataType - the original data type
|
|
31
|
-
* @param toDataType - the data type we want to get
|
|
32
|
-
*/
|
|
33
|
-
function convertValue(value: string, fromDataType: DataType, toDataType: DataType): string;
|
|
34
|
-
}
|
|
1
|
+
import { DataType } from '@easydata/core';
|
|
2
|
+
import { FormatToken } from "./format_parser";
|
|
3
|
+
import { LinkType } from '../types/link_type';
|
|
4
|
+
export declare namespace equtils {
|
|
5
|
+
/**
|
|
6
|
+
* Adds two paths and returns the result
|
|
7
|
+
* Correctly processes leading and trailing slashes
|
|
8
|
+
* @param path1
|
|
9
|
+
* @param path2
|
|
10
|
+
*/
|
|
11
|
+
function combinePath(path1: string, path2: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a string to a `LinkType` value
|
|
14
|
+
* @param str
|
|
15
|
+
*/
|
|
16
|
+
function strToLinkType(str: string): LinkType;
|
|
17
|
+
/**
|
|
18
|
+
* Converts a `LinkType` value to a string
|
|
19
|
+
* @param type
|
|
20
|
+
*/
|
|
21
|
+
function linkTypeToStr(type: LinkType): string;
|
|
22
|
+
/**
|
|
23
|
+
* Parses the operator's format string and returns a list of tokens
|
|
24
|
+
* @param operator
|
|
25
|
+
*/
|
|
26
|
+
function parseOperatorFormat(operator: any): FormatToken[];
|
|
27
|
+
/**
|
|
28
|
+
* Converts a value from one DataType to another
|
|
29
|
+
* @param value
|
|
30
|
+
* @param fromDataType - the original data type
|
|
31
|
+
* @param toDataType - the data type we want to get
|
|
32
|
+
*/
|
|
33
|
+
function convertValue(value: string, fromDataType: DataType, toDataType: DataType): string;
|
|
34
|
+
}
|
package/dist/lib/utils/utils.js
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import { DataType } from '@easydata/core';
|
|
2
|
-
import { i18n } from '@easydata/core';
|
|
3
|
-
import { FormatParser } from "./format_parser";
|
|
4
|
-
import { LinkType } from '../types/link_type';
|
|
5
|
-
export var equtils;
|
|
6
|
-
(function (equtils) {
|
|
7
|
-
/**
|
|
8
|
-
* Adds two paths and returns the result
|
|
9
|
-
* Correctly processes leading and trailing slashes
|
|
10
|
-
* @param path1
|
|
11
|
-
* @param path2
|
|
12
|
-
*/
|
|
13
|
-
function combinePath(path1, path2) {
|
|
14
|
-
var result = path1;
|
|
15
|
-
if (result != null && result.length > 0) {
|
|
16
|
-
if (result.charAt(result.length - 1) != '/')
|
|
17
|
-
result += "/";
|
|
18
|
-
result += path2;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
result = path2;
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
}
|
|
25
|
-
equtils.combinePath = combinePath;
|
|
26
|
-
/**
|
|
27
|
-
* Converts a string to a `LinkType` value
|
|
28
|
-
* @param str
|
|
29
|
-
*/
|
|
30
|
-
function strToLinkType(str) {
|
|
31
|
-
if (str == "All") {
|
|
32
|
-
return LinkType.All;
|
|
33
|
-
}
|
|
34
|
-
else if (str == "NotAll") {
|
|
35
|
-
return LinkType.NotAll;
|
|
36
|
-
}
|
|
37
|
-
else if (str == "Any") {
|
|
38
|
-
return LinkType.Any;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return LinkType.None;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
equtils.strToLinkType = strToLinkType;
|
|
45
|
-
/**
|
|
46
|
-
* Converts a `LinkType` value to a string
|
|
47
|
-
* @param type
|
|
48
|
-
*/
|
|
49
|
-
function linkTypeToStr(type) {
|
|
50
|
-
if (type === LinkType.All) {
|
|
51
|
-
return "All";
|
|
52
|
-
}
|
|
53
|
-
else if (type === LinkType.NotAll) {
|
|
54
|
-
return "NotAll";
|
|
55
|
-
}
|
|
56
|
-
else if (type == LinkType.Any) {
|
|
57
|
-
return "Any";
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return "None";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
equtils.linkTypeToStr = linkTypeToStr;
|
|
64
|
-
/**
|
|
65
|
-
* Parses the operator's format string and returns a list of tokens
|
|
66
|
-
* @param operator
|
|
67
|
-
*/
|
|
68
|
-
function parseOperatorFormat(operator) {
|
|
69
|
-
var format = i18n.getText('Operators', operator.id, 'format');
|
|
70
|
-
if (!format) {
|
|
71
|
-
format = i18n.getText('Operators', operator.id, 'displayFormat');
|
|
72
|
-
}
|
|
73
|
-
if (!format) {
|
|
74
|
-
format = operator.displayFormat;
|
|
75
|
-
}
|
|
76
|
-
var parser = new FormatParser(format);
|
|
77
|
-
return parser.parse();
|
|
78
|
-
}
|
|
79
|
-
equtils.parseOperatorFormat = parseOperatorFormat;
|
|
80
|
-
//----------- value converstion utils --------------
|
|
81
|
-
/**
|
|
82
|
-
* Converts a value from one DataType to another
|
|
83
|
-
* @param value
|
|
84
|
-
* @param fromDataType - the original data type
|
|
85
|
-
* @param toDataType - the data type we want to get
|
|
86
|
-
*/
|
|
87
|
-
function convertValue(value, fromDataType, toDataType) {
|
|
88
|
-
switch (toDataType) {
|
|
89
|
-
case DataType.String:
|
|
90
|
-
return value;
|
|
91
|
-
case (DataType.Autoinc, DataType.Byte, DataType.Int32, DataType.Int64, DataType.Word):
|
|
92
|
-
var resInt = parseInt(value);
|
|
93
|
-
return isNaN(resInt) ? '' : resInt.toString();
|
|
94
|
-
case (DataType.Currency, DataType.Float):
|
|
95
|
-
var resFloat = parseFloat(value);
|
|
96
|
-
return isNaN(resFloat) ? '' : resFloat.toString();
|
|
97
|
-
default:
|
|
98
|
-
return '';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
equtils.convertValue = convertValue;
|
|
102
|
-
})(equtils || (equtils = {}));
|
|
1
|
+
import { DataType } from '@easydata/core';
|
|
2
|
+
import { i18n } from '@easydata/core';
|
|
3
|
+
import { FormatParser } from "./format_parser";
|
|
4
|
+
import { LinkType } from '../types/link_type';
|
|
5
|
+
export var equtils;
|
|
6
|
+
(function (equtils) {
|
|
7
|
+
/**
|
|
8
|
+
* Adds two paths and returns the result
|
|
9
|
+
* Correctly processes leading and trailing slashes
|
|
10
|
+
* @param path1
|
|
11
|
+
* @param path2
|
|
12
|
+
*/
|
|
13
|
+
function combinePath(path1, path2) {
|
|
14
|
+
var result = path1;
|
|
15
|
+
if (result != null && result.length > 0) {
|
|
16
|
+
if (result.charAt(result.length - 1) != '/')
|
|
17
|
+
result += "/";
|
|
18
|
+
result += path2;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
result = path2;
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
equtils.combinePath = combinePath;
|
|
26
|
+
/**
|
|
27
|
+
* Converts a string to a `LinkType` value
|
|
28
|
+
* @param str
|
|
29
|
+
*/
|
|
30
|
+
function strToLinkType(str) {
|
|
31
|
+
if (str == "All") {
|
|
32
|
+
return LinkType.All;
|
|
33
|
+
}
|
|
34
|
+
else if (str == "NotAll") {
|
|
35
|
+
return LinkType.NotAll;
|
|
36
|
+
}
|
|
37
|
+
else if (str == "Any") {
|
|
38
|
+
return LinkType.Any;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return LinkType.None;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
equtils.strToLinkType = strToLinkType;
|
|
45
|
+
/**
|
|
46
|
+
* Converts a `LinkType` value to a string
|
|
47
|
+
* @param type
|
|
48
|
+
*/
|
|
49
|
+
function linkTypeToStr(type) {
|
|
50
|
+
if (type === LinkType.All) {
|
|
51
|
+
return "All";
|
|
52
|
+
}
|
|
53
|
+
else if (type === LinkType.NotAll) {
|
|
54
|
+
return "NotAll";
|
|
55
|
+
}
|
|
56
|
+
else if (type == LinkType.Any) {
|
|
57
|
+
return "Any";
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return "None";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
equtils.linkTypeToStr = linkTypeToStr;
|
|
64
|
+
/**
|
|
65
|
+
* Parses the operator's format string and returns a list of tokens
|
|
66
|
+
* @param operator
|
|
67
|
+
*/
|
|
68
|
+
function parseOperatorFormat(operator) {
|
|
69
|
+
var format = i18n.getText('Operators', operator.id, 'format');
|
|
70
|
+
if (!format) {
|
|
71
|
+
format = i18n.getText('Operators', operator.id, 'displayFormat');
|
|
72
|
+
}
|
|
73
|
+
if (!format) {
|
|
74
|
+
format = operator.displayFormat;
|
|
75
|
+
}
|
|
76
|
+
var parser = new FormatParser(format);
|
|
77
|
+
return parser.parse();
|
|
78
|
+
}
|
|
79
|
+
equtils.parseOperatorFormat = parseOperatorFormat;
|
|
80
|
+
//----------- value converstion utils --------------
|
|
81
|
+
/**
|
|
82
|
+
* Converts a value from one DataType to another
|
|
83
|
+
* @param value
|
|
84
|
+
* @param fromDataType - the original data type
|
|
85
|
+
* @param toDataType - the data type we want to get
|
|
86
|
+
*/
|
|
87
|
+
function convertValue(value, fromDataType, toDataType) {
|
|
88
|
+
switch (toDataType) {
|
|
89
|
+
case DataType.String:
|
|
90
|
+
return value;
|
|
91
|
+
case (DataType.Autoinc, DataType.Byte, DataType.Int32, DataType.Int64, DataType.Word):
|
|
92
|
+
var resInt = parseInt(value);
|
|
93
|
+
return isNaN(resInt) ? '' : resInt.toString();
|
|
94
|
+
case (DataType.Currency, DataType.Float):
|
|
95
|
+
var resFloat = parseFloat(value);
|
|
96
|
+
return isNaN(resFloat) ? '' : resFloat.toString();
|
|
97
|
+
default:
|
|
98
|
+
return '';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
equtils.convertValue = convertValue;
|
|
102
|
+
})(equtils || (equtils = {}));
|
|
103
103
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare class EqVersionInfo {
|
|
2
|
-
major: number;
|
|
3
|
-
minor: number;
|
|
4
|
-
update: number;
|
|
5
|
-
constructor(major: number, minor: number, update: number);
|
|
6
|
-
toString(): string;
|
|
7
|
-
}
|
|
8
|
-
export declare const versionInfo: EqVersionInfo;
|
|
9
|
-
export {};
|
|
1
|
+
declare class EqVersionInfo {
|
|
2
|
+
major: number;
|
|
3
|
+
minor: number;
|
|
4
|
+
update: number;
|
|
5
|
+
constructor(major: number, minor: number, update: number);
|
|
6
|
+
toString(): string;
|
|
7
|
+
}
|
|
8
|
+
export declare const versionInfo: EqVersionInfo;
|
|
9
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var EqVersionInfo = /** @class */ (function () {
|
|
2
|
-
function EqVersionInfo(major, minor, update) {
|
|
3
|
-
this.major = major;
|
|
4
|
-
this.minor = minor;
|
|
5
|
-
this.update = update;
|
|
6
|
-
}
|
|
7
|
-
EqVersionInfo.prototype.toString = function () {
|
|
8
|
-
return this.major
|
|
9
|
-
};
|
|
10
|
-
return EqVersionInfo;
|
|
11
|
-
}());
|
|
12
|
-
export var versionInfo = new EqVersionInfo(6, 2, 0);
|
|
1
|
+
var EqVersionInfo = /** @class */ (function () {
|
|
2
|
+
function EqVersionInfo(major, minor, update) {
|
|
3
|
+
this.major = major;
|
|
4
|
+
this.minor = minor;
|
|
5
|
+
this.update = update;
|
|
6
|
+
}
|
|
7
|
+
EqVersionInfo.prototype.toString = function () {
|
|
8
|
+
return "".concat(this.major, ".").concat(this.minor, ".").concat(this.update);
|
|
9
|
+
};
|
|
10
|
+
return EqVersionInfo;
|
|
11
|
+
}());
|
|
12
|
+
export var versionInfo = new EqVersionInfo(6, 2, 0);
|
|
13
13
|
//# sourceMappingURL=version_info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version_info.js","sourceRoot":"","sources":["../../../src/utils/version_info.ts"],"names":[],"mappings":"AAAA;IAEG,uBAAmB,KAAa,EAAS,KAAa,EAAS,MAAc;QAA1D,UAAK,GAAL,KAAK,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAG1E,gCAAQ,GAAf;QACI,
|
|
1
|
+
{"version":3,"file":"version_info.js","sourceRoot":"","sources":["../../../src/utils/version_info.ts"],"names":[],"mappings":"AAAA;IAEG,uBAAmB,KAAa,EAAS,KAAa,EAAS,MAAc;QAA1D,UAAK,GAAL,KAAK,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAG1E,gCAAQ,GAAf;QACI,OAAO,UAAG,IAAI,CAAC,KAAK,cAAI,IAAI,CAAC,KAAK,cAAI,IAAI,CAAC,MAAM,CAAE,CAAA;IACvD,CAAC;IACJ,oBAAC;AAAD,CAAC,AARD,IAQC;AAED,MAAM,CAAC,IAAM,WAAW,GAAG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyquery/core",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4-beta03",
|
|
4
4
|
"description": "EasyQuery.JS Community core modules",
|
|
5
5
|
"types": "./dist/lib/public_api.d.ts",
|
|
6
6
|
"main": "./dist/bundles/easyquery.core.js",
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
"bugs": "https://korzh.com/support",
|
|
32
32
|
"license": "LGPL-3.0",
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@easydata/core": "^1.4.
|
|
34
|
+
"@easydata/core": "^1.4.16"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@types/
|
|
39
|
-
"
|
|
40
|
-
"
|
|
37
|
+
"@olton/typedoc-webpack-plugin": "^0.1.0",
|
|
38
|
+
"@types/jasmine": "^4.3.2",
|
|
39
|
+
"@types/node": "20.2.5",
|
|
40
|
+
"es6-promise": "^4.2.8",
|
|
41
|
+
"jasmine": "^5.0.0",
|
|
41
42
|
"jasmine-ts-console-reporter": "^3.1.1",
|
|
42
|
-
"jsdom": "^
|
|
43
|
-
"nodemon": "
|
|
44
|
-
"rimraf": "
|
|
45
|
-
"terser-webpack-plugin": "^
|
|
46
|
-
"ts-loader": "^
|
|
47
|
-
"typedoc": "^0.
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"webpack": "^
|
|
51
|
-
"webpack-cli": "^3.3.6"
|
|
43
|
+
"jsdom": "^22.1.0",
|
|
44
|
+
"nodemon": "2.0.22",
|
|
45
|
+
"rimraf": "5.0.1",
|
|
46
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
47
|
+
"ts-loader": "^9.4.3",
|
|
48
|
+
"typedoc": "^0.24.7",
|
|
49
|
+
"typescript": "5.0.*",
|
|
50
|
+
"webpack": "^5.84.1",
|
|
51
|
+
"webpack-cli": "^5.1.1"
|
|
52
52
|
},
|
|
53
53
|
"nodemonConfig": {
|
|
54
54
|
"watch": [
|
package/webpack.config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
3
3
|
const libName = "easyqueryCore";
|
|
4
|
-
const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
|
|
4
|
+
const TypedocWebpackPlugin = require('@olton/typedoc-webpack-plugin');
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
entry: {
|
|
@@ -31,8 +31,8 @@ module.exports = {
|
|
|
31
31
|
optimization: {
|
|
32
32
|
minimizer: [new TerserPlugin({
|
|
33
33
|
include: /\.min\.js$/,
|
|
34
|
-
sourceMap: true,
|
|
35
34
|
terserOptions: {
|
|
35
|
+
sourceMap: true,
|
|
36
36
|
compress: {
|
|
37
37
|
pure_funcs: ['console.log', 'console.info', 'console.debug']
|
|
38
38
|
}
|
|
@@ -41,10 +41,11 @@ module.exports = {
|
|
|
41
41
|
},
|
|
42
42
|
plugins: [
|
|
43
43
|
new TypedocWebpackPlugin({
|
|
44
|
-
mode: 'file',
|
|
45
44
|
json: '../../../../docs/core.json',
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
out: "docs",
|
|
46
|
+
entryPoints: ["./src/**/*.ts"],
|
|
47
|
+
tsconfig: "tsconfig.json",
|
|
48
|
+
compilerOptions: {}
|
|
48
49
|
})
|
|
49
50
|
]
|
|
50
51
|
}
|