@easyquery/core 7.4.1 → 7.4.2-rc01
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* EasyQuery.JS Core v7.4.
|
|
3
|
+
* EasyQuery.JS Core v7.4.2-rc01
|
|
4
4
|
* Copyright 2026 Korzh.com
|
|
5
5
|
* Licensed under MIT
|
|
6
6
|
*
|
|
7
|
-
* Build time:
|
|
7
|
+
* Build time: 3/19/2026 9:10:32 PM
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -1088,7 +1088,7 @@ class DataModel extends core.MetaData {
|
|
|
1088
1088
|
return this.getOperatorById(operatorId);
|
|
1089
1089
|
}
|
|
1090
1090
|
/**
|
|
1091
|
-
* Gets operand.
|
|
1091
|
+
* Gets the index operand in the operator or default operand if index is out of range.
|
|
1092
1092
|
* @param attr The attribute.
|
|
1093
1093
|
* @param operator The operator.
|
|
1094
1094
|
* @param index The index.
|
|
@@ -1110,7 +1110,7 @@ class DataModel extends core.MetaData {
|
|
|
1110
1110
|
defOperand.dataType = attr.dataType;
|
|
1111
1111
|
defOperand.defValue = '';
|
|
1112
1112
|
defOperand.defText = '';
|
|
1113
|
-
defOperand.editor =
|
|
1113
|
+
defOperand.editor = new EqValueEditor();
|
|
1114
1114
|
}
|
|
1115
1115
|
let result = defOperand;
|
|
1116
1116
|
if (result.dataType === core.DataType.Unknown && attr) {
|
|
@@ -1121,11 +1121,8 @@ class DataModel extends core.MetaData {
|
|
|
1121
1121
|
result = core.utils.assign(result, operator.operands[index - 1]);
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
if (
|
|
1125
|
-
if (defOperand.
|
|
1126
|
-
result.editor = defOperand.editor;
|
|
1127
|
-
}
|
|
1128
|
-
else if (defOperand.kind === exports.DataKind.Query) {
|
|
1124
|
+
if (result.editor.tag === core.EditorTag.Unknown) {
|
|
1125
|
+
if (defOperand.kind === exports.DataKind.Query) {
|
|
1129
1126
|
result.editor.tag = EqEditorTag.SubQuery;
|
|
1130
1127
|
}
|
|
1131
1128
|
else if (attr && attr.defaultEditor) {
|
|
@@ -4376,15 +4373,28 @@ class EqContext {
|
|
|
4376
4373
|
reqParams[prop] = params[prop].replace(attrPattern, paramValue);
|
|
4377
4374
|
}
|
|
4378
4375
|
}
|
|
4376
|
+
//no cache if the editor has extra params
|
|
4377
|
+
let useCache = !options.editorParams;
|
|
4378
|
+
const editor = this.getModel().editors.find(ed => ed.id === options.editorId);
|
|
4379
|
+
if (editor && editor.dependsOnAttr) {
|
|
4380
|
+
//no cache if we have a dependency
|
|
4381
|
+
useCache = false;
|
|
4382
|
+
let parentValue = query.getOneValueForAttr(editor.dependsOnAttr);
|
|
4383
|
+
if (parentValue) {
|
|
4384
|
+
reqParams.parentValue = parentValue;
|
|
4385
|
+
}
|
|
4386
|
+
}
|
|
4379
4387
|
const requestParams = {
|
|
4380
4388
|
listName: reqParams.listName,
|
|
4381
4389
|
editorId: options.editorId,
|
|
4382
4390
|
queryParams: reqParams
|
|
4383
4391
|
};
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4392
|
+
if (useCache) {
|
|
4393
|
+
let list = this.getListFromCache(options);
|
|
4394
|
+
if (list && list.length > 0) {
|
|
4395
|
+
onResult(list);
|
|
4396
|
+
return;
|
|
4397
|
+
}
|
|
4388
4398
|
}
|
|
4389
4399
|
let processed = false;
|
|
4390
4400
|
const predefinedHandler = this._predefinedListRequestHandlers[options.editorId];
|
|
@@ -5904,7 +5914,7 @@ class EqContext {
|
|
|
5904
5914
|
};
|
|
5905
5915
|
interval = setInterval(() => {
|
|
5906
5916
|
checkStatus();
|
|
5907
|
-
},
|
|
5917
|
+
}, 10000);
|
|
5908
5918
|
//initial check
|
|
5909
5919
|
checkStatus();
|
|
5910
5920
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* EasyQuery.JS Core v7.4.
|
|
3
|
+
* EasyQuery.JS Core v7.4.2-rc01
|
|
4
4
|
* Copyright 2026 Korzh.com
|
|
5
5
|
* Licensed under MIT
|
|
6
6
|
*
|
|
7
|
-
* Build time:
|
|
7
|
+
* Build time: 3/19/2026 9:10:32 PM
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { i18n, DataType, utils, ValueEditor, MetaEntity, MetaEntityAttr, EditorTag, MetaData, EventEmitter, AggregationSettings, HttpClient, EasyDataTable } from '@easydata/core';
|
|
@@ -1087,7 +1087,7 @@ class DataModel extends MetaData {
|
|
|
1087
1087
|
return this.getOperatorById(operatorId);
|
|
1088
1088
|
}
|
|
1089
1089
|
/**
|
|
1090
|
-
* Gets operand.
|
|
1090
|
+
* Gets the index operand in the operator or default operand if index is out of range.
|
|
1091
1091
|
* @param attr The attribute.
|
|
1092
1092
|
* @param operator The operator.
|
|
1093
1093
|
* @param index The index.
|
|
@@ -1109,7 +1109,7 @@ class DataModel extends MetaData {
|
|
|
1109
1109
|
defOperand.dataType = attr.dataType;
|
|
1110
1110
|
defOperand.defValue = '';
|
|
1111
1111
|
defOperand.defText = '';
|
|
1112
|
-
defOperand.editor =
|
|
1112
|
+
defOperand.editor = new EqValueEditor();
|
|
1113
1113
|
}
|
|
1114
1114
|
let result = defOperand;
|
|
1115
1115
|
if (result.dataType === DataType.Unknown && attr) {
|
|
@@ -1120,11 +1120,8 @@ class DataModel extends MetaData {
|
|
|
1120
1120
|
result = utils.assign(result, operator.operands[index - 1]);
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
|
-
if (
|
|
1124
|
-
if (defOperand.
|
|
1125
|
-
result.editor = defOperand.editor;
|
|
1126
|
-
}
|
|
1127
|
-
else if (defOperand.kind === DataKind.Query) {
|
|
1123
|
+
if (result.editor.tag === EditorTag.Unknown) {
|
|
1124
|
+
if (defOperand.kind === DataKind.Query) {
|
|
1128
1125
|
result.editor.tag = EqEditorTag.SubQuery;
|
|
1129
1126
|
}
|
|
1130
1127
|
else if (attr && attr.defaultEditor) {
|
|
@@ -4375,15 +4372,28 @@ class EqContext {
|
|
|
4375
4372
|
reqParams[prop] = params[prop].replace(attrPattern, paramValue);
|
|
4376
4373
|
}
|
|
4377
4374
|
}
|
|
4375
|
+
//no cache if the editor has extra params
|
|
4376
|
+
let useCache = !options.editorParams;
|
|
4377
|
+
const editor = this.getModel().editors.find(ed => ed.id === options.editorId);
|
|
4378
|
+
if (editor && editor.dependsOnAttr) {
|
|
4379
|
+
//no cache if we have a dependency
|
|
4380
|
+
useCache = false;
|
|
4381
|
+
let parentValue = query.getOneValueForAttr(editor.dependsOnAttr);
|
|
4382
|
+
if (parentValue) {
|
|
4383
|
+
reqParams.parentValue = parentValue;
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4378
4386
|
const requestParams = {
|
|
4379
4387
|
listName: reqParams.listName,
|
|
4380
4388
|
editorId: options.editorId,
|
|
4381
4389
|
queryParams: reqParams
|
|
4382
4390
|
};
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4391
|
+
if (useCache) {
|
|
4392
|
+
let list = this.getListFromCache(options);
|
|
4393
|
+
if (list && list.length > 0) {
|
|
4394
|
+
onResult(list);
|
|
4395
|
+
return;
|
|
4396
|
+
}
|
|
4387
4397
|
}
|
|
4388
4398
|
let processed = false;
|
|
4389
4399
|
const predefinedHandler = this._predefinedListRequestHandlers[options.editorId];
|
|
@@ -5903,7 +5913,7 @@ class EqContext {
|
|
|
5903
5913
|
};
|
|
5904
5914
|
interval = setInterval(() => {
|
|
5905
5915
|
checkStatus();
|
|
5906
|
-
},
|
|
5916
|
+
}, 10000);
|
|
5907
5917
|
//initial check
|
|
5908
5918
|
checkStatus();
|
|
5909
5919
|
}
|
|
@@ -253,7 +253,7 @@ export declare class DataModel extends MetaData {
|
|
|
253
253
|
*/
|
|
254
254
|
getDefaultOperatorForAttr(attr: EntityAttr): Operator;
|
|
255
255
|
/**
|
|
256
|
-
* Gets operand.
|
|
256
|
+
* Gets the index operand in the operator or default operand if index is out of range.
|
|
257
257
|
* @param attr The attribute.
|
|
258
258
|
* @param operator The operator.
|
|
259
259
|
* @param index The index.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
/** Represents editor tags*/
|
|
2
|
-
export declare const EqEditorTag:
|
|
2
|
+
export declare const EqEditorTag: {
|
|
3
|
+
/** SqlList tag value */
|
|
4
|
+
SqlList: string;
|
|
5
|
+
/** SubQuery tag value */
|
|
6
|
+
SubQuery: string;
|
|
7
|
+
/** Bind to parent column tag value */
|
|
8
|
+
BindToParentColumn: string;
|
|
9
|
+
Unknown: string;
|
|
10
|
+
Edit: string;
|
|
11
|
+
/** SqlList tag value */
|
|
12
|
+
DateTime: string;
|
|
13
|
+
List: string;
|
|
14
|
+
CustomList: string;
|
|
15
|
+
File: string;
|
|
16
|
+
};
|
|
3
17
|
export type EqEditorTag = (typeof EqEditorTag)[keyof typeof EqEditorTag];
|