@techextensor/tab-core-utility 2.2.197 → 2.2.198
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/esm2022/index.mjs +11 -10
- package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +1 -9
- package/esm2022/lib/tab-core-utility/app/constants/common.mjs +16 -1
- package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +14 -18
- package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +8 -12
- package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +3 -3
- package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +56 -200
- package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +5 -6
- package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +30 -16
- package/esm2022/lib/tab-core-utility/app/enums/dsq.enum.mjs +13 -13
- package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +6 -7
- package/esm2022/lib/tab-core-utility/app/helpers/common/meta-data.helpers.mjs +6 -2
- package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +9 -21
- package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +8 -53
- package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +6 -90
- package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +1 -9
- package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +36 -64
- package/esm2022/lib/tab-core-utility/app/models/app-object.class.mjs +1 -27
- package/esm2022/lib/tab-core-utility/app/models/data-source-queries.class.mjs +1 -22
- package/esm2022/lib/tab-core-utility/app/models/data-source-query.model.mjs +4 -4
- package/esm2022/lib/tab-core-utility/app/models/filter.model.mjs +16 -18
- package/esm2022/lib/tab-core-utility/app/models/sort.model.mjs +9 -13
- package/esm2022/lib/tab-core-utility/app/utils/filter.util.mjs +3 -3
- package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +1 -13
- package/esm2022/lib/tab-core-utility/app/utils/select-query.util.mjs +107 -0
- package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +8 -5
- package/index.d.ts +10 -1
- package/lib/tab-core-utility/app/constants/api-constants.d.ts +0 -4
- package/lib/tab-core-utility/app/constants/common.d.ts +15 -1
- package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +1 -1
- package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +16 -67
- package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +3 -1
- package/lib/tab-core-utility/app/enums/dsq.enum.d.ts +2 -2
- package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +4 -1
- package/lib/tab-core-utility/app/helpers/common/meta-data.helpers.d.ts +1 -0
- package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +0 -17
- package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +0 -18
- package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +0 -53
- package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +0 -6
- package/lib/tab-core-utility/app/models/api-query.class.d.ts +84 -94
- package/lib/tab-core-utility/app/models/app-object.class.d.ts +2 -65
- package/lib/tab-core-utility/app/models/data-source-queries.class.d.ts +2 -71
- package/lib/tab-core-utility/app/models/filter.model.d.ts +9 -11
- package/lib/tab-core-utility/app/models/sort.model.d.ts +5 -7
- package/lib/tab-core-utility/app/utils/filter.util.d.ts +2 -2
- package/lib/tab-core-utility/app/utils/req-res.util.d.ts +0 -8
- package/lib/tab-core-utility/app/utils/select-query.util.d.ts +24 -0
- package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +3 -3
- package/package.json +1 -1
- package/esm2022/lib/tab-core-utility/app/enums/workflow.enum.mjs +0 -37
- package/lib/tab-core-utility/app/enums/workflow.enum.d.ts +0 -30
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
* Converts a stored DSQ Configuration JSON (PascalCase storage shape per
|
|
4
|
+
* QUERY_CONFIGURATION_STRUCTURE) to the lowercase APISelectQuery wire shape.
|
|
5
|
+
*
|
|
6
|
+
* Strict — input must follow the new contract exactly:
|
|
7
|
+
* { EntityName, SelectedFields, Includes, Parameters, WhereClause: { Filters, FilterLogic },
|
|
8
|
+
* Sort, TopCount, Pager: { PageNumber, PageSize }, Distinct, NoLock, LoadLookUpValues,
|
|
9
|
+
* GroupBy, AggregateFields, HavingClause, Joins }
|
|
10
|
+
*
|
|
11
|
+
* Use at the boundary between BE-stored metadata and FE wire payload — e.g. when invoking
|
|
12
|
+
* selectExecutor with a Configuration blob fetched from BE, or with a `LookUpDetails.selectQuery`
|
|
13
|
+
* literal stored in metadata.
|
|
14
|
+
*/
|
|
15
|
+
export function parseStoredConfigurationToSelectQuery(config) {
|
|
16
|
+
if (!config || typeof config !== 'object')
|
|
17
|
+
return {};
|
|
18
|
+
const out = {};
|
|
19
|
+
if (config.EntityName !== undefined)
|
|
20
|
+
out.entityName = config.EntityName;
|
|
21
|
+
if (config.SelectedFields !== undefined)
|
|
22
|
+
out.selectedFields = config.SelectedFields;
|
|
23
|
+
if (config.Includes !== undefined)
|
|
24
|
+
out.includes = config.Includes;
|
|
25
|
+
if (Array.isArray(config.Parameters)) {
|
|
26
|
+
out.parameters = config.Parameters.map((p) => ({
|
|
27
|
+
id: p.Id,
|
|
28
|
+
fieldName: p.FieldName,
|
|
29
|
+
mappingFieldName: p.MappingFieldName,
|
|
30
|
+
isMandatory: p.IsMandatory,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
if (config.WhereClause) {
|
|
34
|
+
out.whereClause = parseFilterCriteria(config.WhereClause);
|
|
35
|
+
}
|
|
36
|
+
if (Array.isArray(config.Sort)) {
|
|
37
|
+
out.sort = config.Sort.map((s) => ({
|
|
38
|
+
id: s.Id,
|
|
39
|
+
fieldName: s.FieldName,
|
|
40
|
+
direction: s.Direction,
|
|
41
|
+
sequence: s.Sequence,
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
if (config.Pager) {
|
|
45
|
+
out.pager = {
|
|
46
|
+
pageNumber: config.Pager.PageNumber,
|
|
47
|
+
pageSize: config.Pager.PageSize,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (config.TopCount !== undefined)
|
|
51
|
+
out.topCount = config.TopCount;
|
|
52
|
+
if (config.Distinct !== undefined)
|
|
53
|
+
out.distinct = config.Distinct;
|
|
54
|
+
if (config.NoLock !== undefined)
|
|
55
|
+
out.noLock = config.NoLock;
|
|
56
|
+
if (config.LoadLookUpValues !== undefined)
|
|
57
|
+
out.loadLookUpValues = config.LoadLookUpValues;
|
|
58
|
+
if (Array.isArray(config.GroupBy))
|
|
59
|
+
out.groupBy = config.GroupBy;
|
|
60
|
+
if (config.AggregateFields && typeof config.AggregateFields === 'object') {
|
|
61
|
+
out.aggregateFields = config.AggregateFields;
|
|
62
|
+
}
|
|
63
|
+
if (config.HavingClause) {
|
|
64
|
+
out.havingClause = parseFilterCriteria(config.HavingClause);
|
|
65
|
+
}
|
|
66
|
+
if (Array.isArray(config.Joins)) {
|
|
67
|
+
out.joins = config.Joins.map((j) => ({
|
|
68
|
+
joinType: j.JoinType,
|
|
69
|
+
targetEntity: j.TargetEntity,
|
|
70
|
+
sourceField: j.SourceField,
|
|
71
|
+
targetField: j.TargetField,
|
|
72
|
+
additionalConditions: Array.isArray(j.AdditionalConditions)
|
|
73
|
+
? j.AdditionalConditions.map(parseFilter)
|
|
74
|
+
: undefined,
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parses a stored FilterCriteria { Filters, FilterLogic, SQLQuery? } (PascalCase)
|
|
81
|
+
* into the lowercase APIFilterCriteria wire shape.
|
|
82
|
+
*/
|
|
83
|
+
export function parseFilterCriteria(raw) {
|
|
84
|
+
return {
|
|
85
|
+
filters: Array.isArray(raw?.Filters) ? raw.Filters.map(parseFilter) : [],
|
|
86
|
+
filterLogic: raw?.FilterLogic,
|
|
87
|
+
sqlQuery: raw?.SQLQuery,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Parses a stored Filter (PascalCase per new contract) into the lowercase APIFilter wire shape.
|
|
92
|
+
*/
|
|
93
|
+
export function parseFilter(f) {
|
|
94
|
+
return {
|
|
95
|
+
id: f.Id,
|
|
96
|
+
fieldName: f.FieldName,
|
|
97
|
+
operator: f.Operator,
|
|
98
|
+
valueType: f.ValueType,
|
|
99
|
+
value: f.Value,
|
|
100
|
+
conjunction: f.Conjunction,
|
|
101
|
+
groupId: f.GroupId,
|
|
102
|
+
sequence: f.Sequence,
|
|
103
|
+
fieldType: f.FieldType,
|
|
104
|
+
lookUpDetail: f.LookUpDetail,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LXF1ZXJ5LnV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2RhdGEtYWNjZXNzL3NyYy9saWIvdGFiLWNvcmUtdXRpbGl0eS9hcHAvdXRpbHMvc2VsZWN0LXF1ZXJ5LnV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdURBQXVEO0FBV3ZEOzs7Ozs7Ozs7Ozs7R0FZRztBQUNILE1BQU0sVUFBVSxxQ0FBcUMsQ0FBQyxNQUFXO0lBQy9ELElBQUksQ0FBQyxNQUFNLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUTtRQUFFLE9BQU8sRUFBb0IsQ0FBQztJQUV2RSxNQUFNLEdBQUcsR0FBbUIsRUFBRSxDQUFDO0lBRS9CLElBQUksTUFBTSxDQUFDLFVBQVUsS0FBSyx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GaWx0ZXJDcml0ZXJpYSB7XHJcbiAgcmV0dXJuIHtcclxuICAgIGZpbHRlcnM6IEFycmF5LmlzQXJyYXkocmF3Py5GaWx0ZXJzKSA/IHJhdy5GaWx0ZXJzLm1hcChwYXJzZUZpbHRlcikgOiBbXSxcclxuICAgIGZpbHRlckxvZ2ljOiByYXc/LkZpbHRlckxvZ2ljLFxyXG4gICAgc3FsUXVlcnk6IHJhdz8uU1FMUXVlcnksXHJcbiAgfTtcclxufVxyXG5cclxuLyoqXHJcbiAqIFBhcnNlcyBhIHN0b3JlZCBGaWx0ZXIgKFBhc2NhbENhc2UgcGVyIG5ldyBjb250cmFjdCkgaW50byB0aGUgbG93ZXJjYXNlIEFQSUZpbHRlciB3aXJlIHNoYXBlLlxyXG4gKi9cclxuZXhwb3J0IGZ1bmN0aW9uIHBhcnNlRmlsdGVyKGY6IGFueSk6IEFQSUZpbHRlciB7XHJcbiAgcmV0dXJuIHtcclxuICAgIGlkOiBmLklkLFxyXG4gICAgZmllbGROYW1lOiBmLkZpZWxkTmFtZSxcclxuICAgIG9wZXJhdG9yOiBmLk9wZXJhdG9yLFxyXG4gICAgdmFsdWVUeXBlOiBmLlZhbHVlVHlwZSxcclxuICAgIHZhbHVlOiBmLlZhbHVlLFxyXG4gICAgY29uanVuY3Rpb246IGYuQ29uanVuY3Rpb24sXHJcbiAgICBncm91cElkOiBmLkdyb3VwSWQsXHJcbiAgICBzZXF1ZW5jZTogZi5TZXF1ZW5jZSxcclxuICAgIGZpZWxkVHlwZTogZi5GaWVsZFR5cGUsXHJcbiAgICBsb29rVXBEZXRhaWw6IGYuTG9va1VwRGV0YWlsLFxyXG4gIH07XHJcbn1cclxuIl19
|
|
@@ -3,17 +3,20 @@ import { deleteKeyFromResponse } from './req-res.util';
|
|
|
3
3
|
* Synchronize AppObject fields with the response
|
|
4
4
|
*
|
|
5
5
|
* @param response - The response object
|
|
6
|
-
* @param appObject - The
|
|
6
|
+
* @param appObject - The AppObjectModel
|
|
7
7
|
* @returns any - The synchronized response object
|
|
8
8
|
*/
|
|
9
9
|
export function syncAppObjectFields(response, appObject) {
|
|
10
|
+
if (!appObject)
|
|
11
|
+
return response;
|
|
12
|
+
const fields = appObject.fields();
|
|
13
|
+
const childLookups = appObject.ChildRelationShips?.map((x) => x.childDetails?.LookupObject) ?? [];
|
|
10
14
|
for (const key in response) {
|
|
11
|
-
const foundObj =
|
|
12
|
-
|
|
13
|
-
if (!foundObj && !(chilData && chilData.some((x) => x.includes(key)))) {
|
|
15
|
+
const foundObj = fields.find((f) => f.FieldName === key);
|
|
16
|
+
if (!foundObj && !childLookups.some((x) => x?.includes(key))) {
|
|
14
17
|
deleteKeyFromResponse(response, key);
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
return response;
|
|
18
21
|
}
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWFwcC51dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kYXRhLWFjY2Vzcy9zcmMvbGliL3RhYi1jb3JlLXV0aWxpdHkvYXBwL3V0aWxzL3RhYi1hcHAudXRpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUV2RDs7Ozs7O0dBTUc7QUFDSCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsUUFBYSxFQUFFLFNBQTRDO0lBQzdGLElBQUksQ0FBQyxTQUFTO1FBQUUsT0FBTyxRQUFRLENBQUM7SUFDaEMsTUFBTSxNQUFNLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDO0lBQ2xDLE1BQU0sWUFBWSxHQUFHLFNBQVMsQ0FBQyxrQkFBa0IsRUFBRSxHQUFHL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AqL1xyXG5leHBvcnQgZnVuY3Rpb24gc3luY0FwcE9iamVjdEZpZWxkcyhyZXNwb25zZTogYW55LCBhcHBPYmplY3Q6IEFwcE9iamVjdE1vZGVsIHwgbnVsbCB8IHVuZGVmaW5lZCkge1xyXG4gIGlmICghYXBwT2JqZWN0KSByZXR1cm4gcmVzcG9uc2U7XHJcbiAgY29uc3QgZmllbGRzID0gYXBwT2JqZWN0LmZpZWxkcygpO1xyXG4gIGNvbnN0IGNoaWxkTG9va3VwcyA9IGFwcE9iamVjdC5DaGlsZFJlbGF0aW9uU2hpcHM/Lm1hcChcclxuICAgICh4OiBhbnkpID0+IHguY2hpbGREZXRhaWxzPy5Mb29rdXBPYmplY3RcclxuICApID8/IFtdO1xyXG4gIGZvciAoY29uc3Qga2V5IGluIHJlc3BvbnNlKSB7XHJcbiAgICBjb25zdCBmb3VuZE9iaiA9IGZpZWxkcy5maW5kKChmKSA9PiBmLkZpZWxkTmFtZSA9PT0ga2V5KTtcclxuICAgIGlmICghZm91bmRPYmogJiYgIWNoaWxkTG9va3Vwcy5zb21lKCh4OiBzdHJpbmcpID0+IHg/LmluY2x1ZGVzKGtleSkpKSB7XHJcbiAgICAgIGRlbGV0ZUtleUZyb21SZXNwb25zZShyZXNwb25zZSwga2V5KTtcclxuICAgIH1cclxuICB9XHJcbiAgcmV0dXJuIHJlc3BvbnNlO1xyXG59Il19
|
package/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from './lib/tab-core-utility/app/enums/controllers.enum';
|
|
|
16
16
|
export * from './lib/tab-core-utility/app/enums/dsq.enum';
|
|
17
17
|
export * from './lib/tab-core-utility/app/enums/permission.enum';
|
|
18
18
|
export * from './lib/tab-core-utility/app/enums/query.enum';
|
|
19
|
-
export * from './lib/tab-core-utility/app/enums/workflow.enum';
|
|
20
19
|
export * from './lib/tab-core-utility/app/helpers/common/app.helpers';
|
|
21
20
|
export * from './lib/tab-core-utility/app/helpers/common/user-personalization.helper';
|
|
22
21
|
export * from './lib/tab-core-utility/app/helpers/common/dsq.helpers';
|
|
@@ -39,14 +38,24 @@ export * from './lib/tab-core-utility/app/interfaces/schema.interface';
|
|
|
39
38
|
export * from './lib/tab-core-utility/app/interfaces/grid.interface';
|
|
40
39
|
export * from './lib/tab-core-utility/app/interfaces/signalr.interface';
|
|
41
40
|
export * from './lib/tab-core-utility/app/models/api-query.class';
|
|
41
|
+
export * from './lib/tab-core-utility/app/models/app-field.model';
|
|
42
|
+
export * from './lib/tab-core-utility/app/models/app-menu.model';
|
|
42
43
|
export * from './lib/tab-core-utility/app/models/app-object.class';
|
|
44
|
+
export * from './lib/tab-core-utility/app/models/app-object.model';
|
|
45
|
+
export * from './lib/tab-core-utility/app/models/app-screen.model';
|
|
43
46
|
export * from './lib/tab-core-utility/app/models/common.class';
|
|
44
47
|
export * from './lib/tab-core-utility/app/models/data-source-queries.class';
|
|
48
|
+
export * from './lib/tab-core-utility/app/models/data-source-query.model';
|
|
49
|
+
export * from './lib/tab-core-utility/app/models/filter.model';
|
|
50
|
+
export * from './lib/tab-core-utility/app/models/orgInfo.model';
|
|
51
|
+
export * from './lib/tab-core-utility/app/models/parameter.model';
|
|
52
|
+
export * from './lib/tab-core-utility/app/models/sort.model';
|
|
45
53
|
export * from './lib/tab-core-utility/app/utils/filter.util';
|
|
46
54
|
export * from './lib/tab-core-utility/app/utils/form-builder.util';
|
|
47
55
|
export * from './lib/tab-core-utility/app/utils/json.util';
|
|
48
56
|
export * from './lib/tab-core-utility/app/utils/operators.util';
|
|
49
57
|
export * from './lib/tab-core-utility/app/utils/req-res.util';
|
|
58
|
+
export * from './lib/tab-core-utility/app/utils/select-query.util';
|
|
50
59
|
export * from './lib/tab-core-utility/app/utils/tab-app.util';
|
|
51
60
|
export * from './lib/tab-core-utility/auth/auth.service';
|
|
52
61
|
export * from './lib/tab-core-utility/auth/local-storage.service';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { APIServiceName } from '../interfaces/common.interface';
|
|
2
2
|
export declare const API: {
|
|
3
|
-
applicationIdentifier: string;
|
|
4
|
-
applicationIdentifierForPMS: string;
|
|
5
|
-
novuBackendUrl: string;
|
|
6
|
-
novuSocketUrl: string;
|
|
7
3
|
bulkInsert: string;
|
|
8
4
|
select: string;
|
|
9
5
|
screen: string;
|
|
@@ -2,7 +2,6 @@ import { APIServiceUrls } from '../interfaces/common.interface';
|
|
|
2
2
|
export declare class Common {
|
|
3
3
|
static environmentName: string;
|
|
4
4
|
static applicationCode: string;
|
|
5
|
-
static tabJson: any;
|
|
6
5
|
static tabUserPersonalizedData: any;
|
|
7
6
|
static tabUserPermissions: any;
|
|
8
7
|
static tabAppObjectAccess: any;
|
|
@@ -12,6 +11,21 @@ export declare class Common {
|
|
|
12
11
|
static apiServiceUrls: APIServiceUrls;
|
|
13
12
|
/** SignalR hub URL for real-time notifications */
|
|
14
13
|
static signalRHubUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* Schema source of truth.
|
|
16
|
+
* Reading is cheap (returns the backing field).
|
|
17
|
+
* Writing fires the registered onSchemaChange callback BEFORE assigning,
|
|
18
|
+
* so downstream caches (e.g. MetadataHelper) invalidate automatically.
|
|
19
|
+
*/
|
|
20
|
+
private static _tabJson;
|
|
21
|
+
private static _onSchemaChange;
|
|
22
|
+
static get tabJson(): any;
|
|
23
|
+
static set tabJson(value: any);
|
|
24
|
+
/**
|
|
25
|
+
* Register a listener that fires whenever `Common.tabJson` is reassigned.
|
|
26
|
+
* MetadataHelper calls this from its constructor to auto-clear its cache.
|
|
27
|
+
*/
|
|
28
|
+
static onSchemaChange(callback: () => void): void;
|
|
15
29
|
/**
|
|
16
30
|
* Initialize the static variables
|
|
17
31
|
* Called once at application startup from the main app
|
|
@@ -31,7 +31,7 @@ export declare class TabCrudService {
|
|
|
31
31
|
*
|
|
32
32
|
* Supports two formats for criteria:
|
|
33
33
|
* - **Object** `{ Id: 'xxx' }` — auto-builds EqualTo filters for each key-value pair.
|
|
34
|
-
* - **Array** `[{
|
|
34
|
+
* - **Array** `[{ ConjunctionClause, FieldID, RelationalOperator, ValueType, Value, ... }]` — uses filters directly as provided.
|
|
35
35
|
*
|
|
36
36
|
* @param criteria The criteria object or filter array to generate the where clause from.
|
|
37
37
|
* @param crudTableName The CRUD table name to use in the where clause.
|
|
@@ -8,108 +8,57 @@ export declare class TabGetService {
|
|
|
8
8
|
private readonly metadataHelper;
|
|
9
9
|
/**
|
|
10
10
|
* Execute RAW DSQ with Name
|
|
11
|
-
* NEW: Uses new backend endpoint and CRUD microservice
|
|
12
11
|
* @param data - Object containing AppObjectName and DSQName
|
|
13
12
|
* @returns Response from the API
|
|
14
13
|
*/
|
|
15
14
|
executeRAWDSQWithName(data: any, headers?: any): any;
|
|
16
15
|
/**
|
|
17
16
|
* Get Record
|
|
18
|
-
* @param params - Parameters for the request
|
|
19
|
-
* @returns Response from the API
|
|
20
17
|
*/
|
|
21
18
|
getRecord(params: any): any;
|
|
22
19
|
/**
|
|
23
20
|
* Get History from Kibana microservice
|
|
24
|
-
* @param appObjectId - ID of the application object
|
|
25
|
-
* @param recordIds - Array of record IDs
|
|
26
|
-
* @returns Response from the API
|
|
27
21
|
*/
|
|
28
22
|
getHistory(payload: RcordHistoryPayload, headers?: any): Observable<CommonApiResponse>;
|
|
29
23
|
/**
|
|
30
24
|
* Import data via report microservice
|
|
31
|
-
* @param data - Import data payload
|
|
32
|
-
* @returns Response from the API
|
|
33
25
|
*/
|
|
34
26
|
importData(data: ImportDataPayload): any;
|
|
35
27
|
/**
|
|
36
|
-
* Executes a select query with optional parameters
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @
|
|
28
|
+
* Executes a select query with optional parameters.
|
|
29
|
+
* Sends the APISelectQuery payload directly to the CRUD select endpoint.
|
|
30
|
+
*
|
|
31
|
+
* @param data - APISelectQuery payload (lowercase keys, full new contract shape)
|
|
32
|
+
* @param parameters - Optional reqtokens to substitute into Parameter-typed filter values
|
|
33
|
+
* @param additionalConfig - Optional partial APISelectQuery to merge over the input
|
|
42
34
|
*/
|
|
43
35
|
selectExecutor(data: APISelectQuery, parameters?: any, additionalConfig?: any, headers?: any): Observable<CommonApiResponse>;
|
|
44
36
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @param parameters - Optional parameters to replace in filters
|
|
48
|
-
* @param additionalConfig - Optional additional configuration to merge
|
|
49
|
-
* @returns Prepared APISelectQuery with parameters applied
|
|
37
|
+
* Substitutes parameter values into Parameter-typed filter values, then merges any additional config.
|
|
38
|
+
* Mutates and returns the input.
|
|
50
39
|
*/
|
|
51
40
|
private prepareSelectQueryData;
|
|
52
41
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
private transformToCRUDPayload;
|
|
58
|
-
/**
|
|
59
|
-
* Gets entity name from QueryObjectID
|
|
42
|
+
* Executes a select query by its stored DSQ id.
|
|
43
|
+
* Fetches the stored DSQ row, parses its Configuration JSON (PascalCase storage shape),
|
|
44
|
+
* converts to lowercase APISelectQuery, then invokes selectExecutor.
|
|
60
45
|
*/
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Transforms Joins to includes array
|
|
64
|
-
*/
|
|
65
|
-
private transformJoinsToIncludes;
|
|
66
|
-
/**
|
|
67
|
-
* Transforms TopCount to Pager object
|
|
68
|
-
*/
|
|
69
|
-
private transformPager;
|
|
70
|
-
/**
|
|
71
|
-
* Transforms WhereClause to new format
|
|
72
|
-
*/
|
|
73
|
-
private transformWhereClause;
|
|
74
|
-
/**
|
|
75
|
-
* Transforms a single filter to new format
|
|
76
|
-
*/
|
|
77
|
-
private transformFilter;
|
|
78
|
-
/**
|
|
79
|
-
* Transforms Sort array to new format
|
|
80
|
-
*/
|
|
81
|
-
private transformSort;
|
|
46
|
+
executeSelectQueryById(selectQueryId: string, parameters?: any, additionalConfig?: any, headers?: any): Observable<CommonApiResponse>;
|
|
82
47
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* @param selectQueryId - The ID of the select query to be executed.
|
|
86
|
-
* @param parameters - Optional parameters to be applied to the query.
|
|
87
|
-
* @returns The result of the select query execution.
|
|
88
|
-
* @throws An error if the API response status code is not '200'.
|
|
48
|
+
* Removes Parameter-typed filters whose parameter is missing or empty.
|
|
49
|
+
* Internal helper used only by executeSelectQueryById.
|
|
89
50
|
*/
|
|
90
|
-
|
|
91
|
-
removeWhereClauseForEmptyParams(filters: any[], parameters: Record<string, any>): any[];
|
|
51
|
+
private removeFiltersWithEmptyParams;
|
|
92
52
|
/**
|
|
93
53
|
* Get Search Data from Kibana microservice
|
|
94
|
-
* @param searchQuery - Search Query string
|
|
95
|
-
* @param limit - Limit of search results
|
|
96
|
-
* @returns Response from the API
|
|
97
54
|
*/
|
|
98
55
|
getSearchData(payload: SearchDataPayload, params?: any): Observable<CommonApiResponse>;
|
|
99
56
|
/**
|
|
100
57
|
* Executes an HTTP request with the specified method, URL, headers, and body.
|
|
101
|
-
*
|
|
102
|
-
* @param fullUrl -The full URL of the request containing the query parameters.
|
|
103
|
-
* @param method - The HTTP method to be used ('GET', 'POST', 'PUT', 'DELETE').
|
|
104
|
-
* @param headers - The headers to include in the request.
|
|
105
|
-
* @param body - The body content for methods like POST and PUT.
|
|
106
|
-
* @returns The API response corresponding to the request.
|
|
107
58
|
*/
|
|
108
59
|
executeHttpRequest(payload: HttpExecuteRequestPayload): any;
|
|
109
60
|
/**
|
|
110
|
-
* Generates an HTTP Request based on the provided DataSourceQuery name
|
|
111
|
-
* @param QueryName - The name of the DataSourceQuery
|
|
112
|
-
* @returns The result of the generated HTTP request
|
|
61
|
+
* Generates an HTTP Request based on the provided DataSourceQuery name.
|
|
113
62
|
*/
|
|
114
63
|
generateHttpRequest(dataSourceQueryName: string): Observable<CommonApiResponse>;
|
|
115
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabGetService, never>;
|
|
@@ -12,9 +12,11 @@ export declare class TabUpdateService {
|
|
|
12
12
|
* @param objectId The object ID
|
|
13
13
|
* @param data The data to update
|
|
14
14
|
* @param headers Optional headers
|
|
15
|
+
* @param customWhereClause Optional pre-built whereClause from caller-provided criteria.
|
|
16
|
+
* When provided, skips primary-key extraction from data.
|
|
15
17
|
* @returns Observable with update result
|
|
16
18
|
*/
|
|
17
|
-
updateByObjectId(objectId: string, data: any, headers?: any): Observable<CommonApiResponse> | null;
|
|
19
|
+
updateByObjectId(objectId: string, data: any, headers?: any, customWhereClause?: any): Observable<CommonApiResponse> | null;
|
|
18
20
|
/**
|
|
19
21
|
* Handle async update - wait for SignalR notification
|
|
20
22
|
* @param response Initial response with correlationId
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum ConjunctionClause {
|
|
2
2
|
AND = 1,
|
|
3
3
|
OR = 2,
|
|
4
4
|
AND_NOT = 3,
|
|
@@ -32,7 +32,7 @@ export declare enum FilterValueType {
|
|
|
32
32
|
Property = 3,
|
|
33
33
|
Global = 4
|
|
34
34
|
}
|
|
35
|
-
export declare enum
|
|
35
|
+
export declare enum SortDirection {
|
|
36
36
|
Asc = 1,
|
|
37
37
|
Desc = 2
|
|
38
38
|
}
|
|
@@ -3,9 +3,12 @@ import { CloneDsqPayload, CommonApiResponse, GetDataJsonByTypePayload, Performan
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class AppHelper {
|
|
5
5
|
private readonly apiService;
|
|
6
|
-
private readonly metadataHelper;
|
|
7
6
|
/**
|
|
8
7
|
* Rebuilds the application.
|
|
8
|
+
*
|
|
9
|
+
* Cache invalidation is handled automatically when the caller subsequently
|
|
10
|
+
* reassigns Common.tabJson with the fresh schema (see Common.onSchemaChange).
|
|
11
|
+
*
|
|
9
12
|
* @returns Result of the rebuild operation
|
|
10
13
|
*/
|
|
11
14
|
rebuildApp(payload?: any, headers?: any): Observable<CommonApiResponse>;
|
|
@@ -29,23 +29,6 @@ export declare class RequestResponseHelper {
|
|
|
29
29
|
entityName: string;
|
|
30
30
|
whereClause: APIFilterCriteria;
|
|
31
31
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Creates a payload object for bulk insert operations
|
|
34
|
-
* @param table The table name for the payload
|
|
35
|
-
* @param whereClause The filter criteria for the payload
|
|
36
|
-
* @param value The value sets for the payload
|
|
37
|
-
* @param queryType The type of query for the payload (BulkInsert)
|
|
38
|
-
* @param fields Optional list of fields to include in the insert operation
|
|
39
|
-
* @returns The payload object with QueryObjectID, QueryType, Joins, WhereClause, Values, and Fields
|
|
40
|
-
*/
|
|
41
|
-
createBulkInsertPayload(table: string, whereClause: APIFilterCriteria, value: APIBulkInsertFieldsValueSets[], queryType: QueryType, fields?: string[]): {
|
|
42
|
-
QueryObjectID: string;
|
|
43
|
-
QueryType: QueryType;
|
|
44
|
-
Joins: never[];
|
|
45
|
-
WhereClause: APIFilterCriteria;
|
|
46
|
-
Values: APIBulkInsertFieldsValueSets[];
|
|
47
|
-
Fields: string[] | undefined;
|
|
48
|
-
};
|
|
49
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<RequestResponseHelper, never>;
|
|
50
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<RequestResponseHelper>;
|
|
51
34
|
}
|
|
@@ -19,16 +19,6 @@ export declare class WhereClauseHelper {
|
|
|
19
19
|
* @returns The bound where clause for delete operation with multiple primary keys
|
|
20
20
|
*/
|
|
21
21
|
bindWhereClauseForDeleteWithMultiplePrimaryKeys(data: any, fieldName: string, crudTableName: string): APIFilterCriteria;
|
|
22
|
-
/**
|
|
23
|
-
* Binds the where clause for an insert operation
|
|
24
|
-
* @returns The bound where clause for insert operation
|
|
25
|
-
*/
|
|
26
|
-
bindWhereClauseForInsert(): APIFilterCriteria;
|
|
27
|
-
/**
|
|
28
|
-
* Binds an empty where clause
|
|
29
|
-
* @returns The bound empty where clause
|
|
30
|
-
*/
|
|
31
|
-
bindWhereClauseEmpty(): APIFilterCriteria;
|
|
32
22
|
/**
|
|
33
23
|
* Binds the where clause based on provided parameters
|
|
34
24
|
* @param fields The fields to bind the where clause
|
|
@@ -78,14 +68,6 @@ export declare class WhereClauseHelper {
|
|
|
78
68
|
* @returns The bound where clause for update operation in a grid
|
|
79
69
|
*/
|
|
80
70
|
bindWhereClauseForUpdateGrid(Fields: any, value: any, fieldName: string, crudTableName: string): APIFilterCriteria;
|
|
81
|
-
/**
|
|
82
|
-
* Binds the where clause for updating records using filters
|
|
83
|
-
* @param tableName The name of the table to update
|
|
84
|
-
* @param filters The array of filters for the update query
|
|
85
|
-
* @param fields The array of fields from the app object to map with field ID - used in replacing ID With name
|
|
86
|
-
* @returns The bound where clause for update operation
|
|
87
|
-
*/
|
|
88
|
-
bindWhereClauseForUpdateUsingFilters(tableName: string, filters: any, fields: any[]): APIFilterCriteria;
|
|
89
71
|
/**
|
|
90
72
|
* Binds the where clause for deleting records using a set of key value pairs
|
|
91
73
|
* @param tableName The name of the table from which to delete records
|
|
@@ -1,58 +1,5 @@
|
|
|
1
|
-
import { AppObject } from '../../models/app-object.class';
|
|
2
|
-
import { JqWidghtModel } from '../../interfaces/grid.interface';
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
2
|
export declare class GridHelper {
|
|
5
|
-
private readonly metadataHelper;
|
|
6
|
-
/**
|
|
7
|
-
* Generates a grid schema for the master app object.
|
|
8
|
-
* @param masterAppObj The master app object.
|
|
9
|
-
* @param dsqID The data source query ID.
|
|
10
|
-
* @returns The generated grid schema.
|
|
11
|
-
*/
|
|
12
|
-
generateGridSchema(masterAppObj: AppObject, dsqID: any): {
|
|
13
|
-
label: any;
|
|
14
|
-
type: string;
|
|
15
|
-
key: any;
|
|
16
|
-
input: boolean;
|
|
17
|
-
redrawOn: any;
|
|
18
|
-
'customOptions.dataSourceQueryId': any;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Generates a grid schema for the child relationship.
|
|
22
|
-
* @param childRel The child relationship.
|
|
23
|
-
* @param masterAppObj The master app object.
|
|
24
|
-
* @returns The generated child grid schema.
|
|
25
|
-
*/
|
|
26
|
-
generateChildGridSchema(childRel: any, masterAppObj: AppObject): import("rxjs").Observable<{}> | {
|
|
27
|
-
label: any;
|
|
28
|
-
type: string;
|
|
29
|
-
key: any;
|
|
30
|
-
input: boolean;
|
|
31
|
-
redrawOn: any;
|
|
32
|
-
'customOptions.dataSourceQueryId': string;
|
|
33
|
-
logic: {
|
|
34
|
-
name: string;
|
|
35
|
-
trigger: {
|
|
36
|
-
type: string;
|
|
37
|
-
javascript: string;
|
|
38
|
-
};
|
|
39
|
-
actions: {
|
|
40
|
-
name: string;
|
|
41
|
-
type: string;
|
|
42
|
-
property: {
|
|
43
|
-
label: string;
|
|
44
|
-
value: string;
|
|
45
|
-
type: string;
|
|
46
|
-
};
|
|
47
|
-
text: string;
|
|
48
|
-
}[];
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Retrieves the default grid configuration.
|
|
53
|
-
* @returns The default grid configuration.
|
|
54
|
-
*/
|
|
55
|
-
getDefaultGridConfiguration(): JqWidghtModel | null;
|
|
56
3
|
/**
|
|
57
4
|
* Determines the column type based on the data type.
|
|
58
5
|
* @param dataType The data type.
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class ScreenHelper {
|
|
3
3
|
private readonly metadataHelper;
|
|
4
|
-
/**
|
|
5
|
-
* Retrieves screen data based on the provided screen ID.
|
|
6
|
-
* @param screenId The ID of the screen to retrieve.
|
|
7
|
-
* @returns The screen data if found, otherwise null.
|
|
8
|
-
*/
|
|
9
|
-
getScreenDetailsWithoutContainer(screenId: string): any;
|
|
10
4
|
getScreen(screenId: string): any;
|
|
11
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScreenHelper, never>;
|
|
12
6
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenHelper>;
|