semanticdb-core 1.0.35 → 1.0.37
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/common/date.js +1 -13
- package/dist/logicform/logicform.utils.js +1 -13
- package/package.json +1 -1
package/dist/common/date.js
CHANGED
|
@@ -61,19 +61,7 @@ function isDateForm(dateValue) {
|
|
|
61
61
|
* @return {String}
|
|
62
62
|
*/
|
|
63
63
|
function getMinGran(date, flag = false) {
|
|
64
|
-
if (
|
|
65
|
-
return 'day';
|
|
66
|
-
}
|
|
67
|
-
if (date === 'YTD') {
|
|
68
|
-
return 'year';
|
|
69
|
-
}
|
|
70
|
-
if (date === 'QTD') {
|
|
71
|
-
return 'quarter';
|
|
72
|
-
}
|
|
73
|
-
if (date === 'MTD') {
|
|
74
|
-
return 'month';
|
|
75
|
-
}
|
|
76
|
-
if (date === 'DTD') {
|
|
64
|
+
if (typeof date === 'string' && date.endsWith('TD')) {
|
|
77
65
|
return 'day';
|
|
78
66
|
}
|
|
79
67
|
if (typeof date !== 'object') {
|
|
@@ -24,19 +24,7 @@ const isDimensionInQuery = (query, dimension, strictMode = true) => {
|
|
|
24
24
|
const flattenQuery = (0, exports.getFlattenQuery)(query);
|
|
25
25
|
if (strictMode) {
|
|
26
26
|
if (typeof dimension === 'string') {
|
|
27
|
-
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
// 如果是单纯的$exists: true, 不认为是。
|
|
31
|
-
const v = flattenQuery[dimension];
|
|
32
|
-
if (v &&
|
|
33
|
-
typeof v === 'object' &&
|
|
34
|
-
'$exists' in v &&
|
|
35
|
-
v['$exists'] === true &&
|
|
36
|
-
Object.keys(v).length === 1) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return true;
|
|
27
|
+
return dimension in flattenQuery;
|
|
40
28
|
}
|
|
41
29
|
else if (dimension._id in flattenQuery) {
|
|
42
30
|
if ((0, date_1.isStandardDateForm)(flattenQuery[dimension._id])) {
|