@creatio/base 0.811.1 → 0.812.0
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/CHANGELOG.md +3 -1
- package/esm2020/lib/public/enums/index.mjs +2 -1
- package/esm2020/lib/public/enums/model-in-page-action.enum.mjs +20 -0
- package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +7 -4
- package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +5 -2
- package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +5 -2
- package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +5 -2
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +26 -7
- package/esm2020/lib/public/esq/data-model/filters/filter-parser/filter-parser.mjs +7 -2
- package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +5 -2
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +5 -2
- package/esm2020/lib/public/models/index.mjs +2 -1
- package/esm2020/lib/public/models/model-init-config.mjs +2 -0
- package/esm2020/lib/public/services/dialog/dialog.service.mjs +2 -0
- package/esm2020/lib/public/services/dialog/index.mjs +3 -0
- package/esm2020/lib/public/services/dialog/models/base-dialog-button-config.mjs +2 -0
- package/esm2020/lib/public/services/dialog/models/dialog-action.mjs +2 -0
- package/esm2020/lib/public/services/dialog/models/dialog-config.mjs +2 -0
- package/esm2020/lib/public/services/dialog/models/index.mjs +4 -0
- package/esm2020/lib/public/services/index.mjs +2 -1
- package/esm2020/lib/public/types/button-color.type.mjs +2 -0
- package/esm2020/lib/public/types/index.mjs +2 -1
- package/fesm2015/creatio-base.mjs +76 -16
- package/fesm2015/creatio-base.mjs.map +1 -1
- package/fesm2020/creatio-base.mjs +76 -16
- package/fesm2020/creatio-base.mjs.map +1 -1
- package/index.d.ts +148 -2
- package/package.json +2 -2
|
@@ -175,6 +175,26 @@ var ɵDataSchemaType;
|
|
|
175
175
|
ɵDataSchemaType["ClientUnit"] = "ClientUnit";
|
|
176
176
|
})(ɵDataSchemaType || (ɵDataSchemaType = {}));
|
|
177
177
|
|
|
178
|
+
/**
|
|
179
|
+
* @public
|
|
180
|
+
* @description Type of the action of the model.
|
|
181
|
+
*/
|
|
182
|
+
var ɵModelInPageAction;
|
|
183
|
+
(function (ɵModelInPageAction) {
|
|
184
|
+
/**
|
|
185
|
+
* @description Action for editing existed record.
|
|
186
|
+
*/
|
|
187
|
+
ɵModelInPageAction["Edit"] = "edit";
|
|
188
|
+
/**
|
|
189
|
+
* @description Action for adding new record.
|
|
190
|
+
*/
|
|
191
|
+
ɵModelInPageAction["Add"] = "add";
|
|
192
|
+
/**
|
|
193
|
+
* @description Action for copying the record.
|
|
194
|
+
*/
|
|
195
|
+
ɵModelInPageAction["Copy"] = "copy";
|
|
196
|
+
})(ɵModelInPageAction || (ɵModelInPageAction = {}));
|
|
197
|
+
|
|
178
198
|
var ɵLogicalOperatorType;
|
|
179
199
|
(function (ɵLogicalOperatorType) {
|
|
180
200
|
ɵLogicalOperatorType[ɵLogicalOperatorType["And"] = 0] = "And";
|
|
@@ -654,14 +674,17 @@ class ɵMacrosFunctionExpression extends ɵFunctionExpression {
|
|
|
654
674
|
super(config);
|
|
655
675
|
this.functionType = ɵFunctionType.Macros;
|
|
656
676
|
this.macrosType = config?.macrosType;
|
|
677
|
+
this.functionArgument = config?.functionArgument;
|
|
657
678
|
}
|
|
658
679
|
/**
|
|
659
680
|
* Parses expression from json.
|
|
660
681
|
* @public
|
|
661
682
|
*/
|
|
662
|
-
static fromJson(dto) {
|
|
663
|
-
const
|
|
664
|
-
|
|
683
|
+
static fromJson(dto, filterParser, expressionParser) {
|
|
684
|
+
const functionArgument = filterParser && expressionParser && dto['functionArgument']
|
|
685
|
+
? expressionParser.fromJson(dto['functionArgument'], filterParser)
|
|
686
|
+
: undefined;
|
|
687
|
+
return new ɵMacrosFunctionExpression({ functionArgument, macrosType: dto['macrosType'] });
|
|
665
688
|
}
|
|
666
689
|
clone() {
|
|
667
690
|
return new ɵMacrosFunctionExpression(this);
|
|
@@ -1085,7 +1108,10 @@ class ɵCompareFilter extends ɵSingleFilter {
|
|
|
1085
1108
|
return filter;
|
|
1086
1109
|
}
|
|
1087
1110
|
clone() {
|
|
1088
|
-
|
|
1111
|
+
const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
1112
|
+
filter.isEnabled = this.isEnabled;
|
|
1113
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1114
|
+
return filter;
|
|
1089
1115
|
}
|
|
1090
1116
|
toJson() {
|
|
1091
1117
|
return {
|
|
@@ -1122,7 +1148,10 @@ class ɵBetweenFilter extends ɵSingleFilter {
|
|
|
1122
1148
|
return filter;
|
|
1123
1149
|
}
|
|
1124
1150
|
clone() {
|
|
1125
|
-
|
|
1151
|
+
const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
1152
|
+
filter.isEnabled = this.isEnabled;
|
|
1153
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1154
|
+
return filter;
|
|
1126
1155
|
}
|
|
1127
1156
|
toJson() {
|
|
1128
1157
|
return {
|
|
@@ -1161,7 +1190,10 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1161
1190
|
return new ɵExistsFilter(leftExpression, subFilters, dto['comparisonType'], dto['isAggregative']);
|
|
1162
1191
|
}
|
|
1163
1192
|
clone() {
|
|
1164
|
-
|
|
1193
|
+
const filter = new ɵExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
1194
|
+
filter.isEnabled = this.isEnabled;
|
|
1195
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1196
|
+
return filter;
|
|
1165
1197
|
}
|
|
1166
1198
|
toJson() {
|
|
1167
1199
|
const result = super.toJson();
|
|
@@ -1198,7 +1230,10 @@ class ɵInFilter extends ɵSingleFilter {
|
|
|
1198
1230
|
return new ɵInFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), dtoRightExpressions.map((expression) => expressionParser.fromJson(expression, filterParser)));
|
|
1199
1231
|
}
|
|
1200
1232
|
clone() {
|
|
1201
|
-
|
|
1233
|
+
const filter = new ɵInFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
1234
|
+
filter.isEnabled = this.isEnabled;
|
|
1235
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1236
|
+
return filter;
|
|
1202
1237
|
}
|
|
1203
1238
|
toJson() {
|
|
1204
1239
|
return {
|
|
@@ -1235,7 +1270,10 @@ class ɵIsNullFilter extends ɵSingleFilter {
|
|
|
1235
1270
|
return new ɵIsNullFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser));
|
|
1236
1271
|
}
|
|
1237
1272
|
clone() {
|
|
1238
|
-
|
|
1273
|
+
const filter = new ɵIsNullFilter(this.comparisonType, this.leftExpression);
|
|
1274
|
+
filter.isEnabled = this.isEnabled;
|
|
1275
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1276
|
+
return filter;
|
|
1239
1277
|
}
|
|
1240
1278
|
}
|
|
1241
1279
|
/**
|
|
@@ -1377,10 +1415,11 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1377
1415
|
});
|
|
1378
1416
|
return result;
|
|
1379
1417
|
}
|
|
1380
|
-
constructor(logicalOperation = ɵLogicalOperatorType.And) {
|
|
1418
|
+
constructor(logicalOperation = ɵLogicalOperatorType.And, rootSchemaName) {
|
|
1381
1419
|
super(ɵFilterType.FilterGroup);
|
|
1382
1420
|
this.filters = new Map();
|
|
1383
1421
|
this.logicalOperation = logicalOperation;
|
|
1422
|
+
this.rootSchemaName = rootSchemaName;
|
|
1384
1423
|
}
|
|
1385
1424
|
/**
|
|
1386
1425
|
* Parses filter group from json.
|
|
@@ -1388,12 +1427,17 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1388
1427
|
*/
|
|
1389
1428
|
static fromJson(dto, filterParser) {
|
|
1390
1429
|
const logicalOperation = dto['logicalOperation'];
|
|
1391
|
-
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And);
|
|
1430
|
+
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And, dto['rootSchemaName']);
|
|
1392
1431
|
Object.entries(dto['items']).forEach(([key, filterDTO]) => {
|
|
1393
1432
|
group.add(filterParser.fromJson(filterDTO), key);
|
|
1394
1433
|
});
|
|
1395
1434
|
return group;
|
|
1396
1435
|
}
|
|
1436
|
+
_createParameterValueExpressions(values) {
|
|
1437
|
+
return values.map((value) => new ɵParameterExpression({
|
|
1438
|
+
value: value,
|
|
1439
|
+
}));
|
|
1440
|
+
}
|
|
1397
1441
|
/**
|
|
1398
1442
|
* Returns filter item by index.
|
|
1399
1443
|
* @param index Item index.
|
|
@@ -1424,12 +1468,21 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1424
1468
|
*/
|
|
1425
1469
|
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues, filterKey) {
|
|
1426
1470
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1427
|
-
const expressions =
|
|
1428
|
-
value: singleParameterValue,
|
|
1429
|
-
}));
|
|
1471
|
+
const expressions = this._createParameterValueExpressions(parameterValues);
|
|
1430
1472
|
const filter = new ɵInFilter(comparisonType, leftExpression, expressions);
|
|
1431
1473
|
this.add(filter, filterKey);
|
|
1432
1474
|
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Creates and adds in filter for primary column.
|
|
1477
|
+
* @param primaryColumnValues Primary column values.
|
|
1478
|
+
* @param filterKey Filter key.
|
|
1479
|
+
*/
|
|
1480
|
+
addPrimarySchemaColumnInFilter(primaryColumnValues, filterKey) {
|
|
1481
|
+
const leftExpression = new ɵMacrosFunctionExpression({ macrosType: ɵQueryMacrosType.PrimaryColumn });
|
|
1482
|
+
const expressions = this._createParameterValueExpressions(primaryColumnValues);
|
|
1483
|
+
const filter = new ɵInFilter(ɵComparisonType.Equal, leftExpression, expressions);
|
|
1484
|
+
this.add(filter, filterKey);
|
|
1485
|
+
}
|
|
1433
1486
|
addSchemaColumnIsNullFilter(columnPath, filterKey) {
|
|
1434
1487
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1435
1488
|
const filter = new ɵIsNullFilter(ɵComparisonType.Is_null, leftExpression);
|
|
@@ -1475,10 +1528,12 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1475
1528
|
this.filters.set(key, filter);
|
|
1476
1529
|
}
|
|
1477
1530
|
clone() {
|
|
1478
|
-
const filterGroup = new ɵFilterGroup(this.logicalOperation);
|
|
1531
|
+
const filterGroup = new ɵFilterGroup(this.logicalOperation, this.rootSchemaName);
|
|
1479
1532
|
this.filters.forEach((filter, filterKey) => {
|
|
1480
1533
|
filterGroup.filters.set(filterKey, filter.clone());
|
|
1481
1534
|
});
|
|
1535
|
+
filterGroup.isEnabled = this.isEnabled;
|
|
1536
|
+
filterGroup.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1482
1537
|
return filterGroup;
|
|
1483
1538
|
}
|
|
1484
1539
|
}
|
|
@@ -1532,7 +1587,12 @@ class ɵFilterResolver {
|
|
|
1532
1587
|
class ɵFilterParser extends ɵBaseFilterParser {
|
|
1533
1588
|
static fromJson(dto) {
|
|
1534
1589
|
const filterType = dto['filterType'];
|
|
1535
|
-
|
|
1590
|
+
const isEnabled = dto['isEnabled'];
|
|
1591
|
+
const trimDateTimeParameterToDate = dto['trimDateTimeParameterToDate'];
|
|
1592
|
+
const filter = ɵFilterResolver.resolve(filterType).fromJson(dto, ɵFilterParser, ɵExpressionParser);
|
|
1593
|
+
filter.isEnabled = isEnabled !== false;
|
|
1594
|
+
filter.trimDateTimeParameterToDate = trimDateTimeParameterToDate === true;
|
|
1595
|
+
return filter;
|
|
1536
1596
|
}
|
|
1537
1597
|
}
|
|
1538
1598
|
|
|
@@ -2051,5 +2111,5 @@ var ɵModelParameterType;
|
|
|
2051
2111
|
* Generated bundle index. Do not edit.
|
|
2052
2112
|
*/
|
|
2053
2113
|
|
|
2054
|
-
export { LookupMode, ɵAggregationEvalType, ɵAggregationFunction, ɵAggregationFunctionColumn, ɵAggregationFunctionExpression, ɵAggregationSubQueryColumn, ɵAggregationSubQueryExpression, ɵAggregationType, ɵArgumentEmptyException, ɵArgumentFunctionExpression, ɵArgumentOutOfRangeException, ɵArithmeticExpression, ɵArithmeticOperation, ɵArithmeticQueryColumn, ɵBaseExpression, ɵBaseExpressionParser, ɵBaseFilter, ɵBaseFilterParser, ɵBaseFilterableQuery, ɵBaseQuery, ɵBaseQueryColumn, ɵBaseRequest, ɵBetweenFilter, ɵColumnExpression, ɵCompareFilter, ɵComparisonType, ɵDEFAULT_COLUMN_PLAIN_OBJ, ɵDEFAULT_FILTER_PLAIN_OBJ, ɵDataSchemaAttributeType, ɵDataSchemaAttributeUsageType, ɵDataSchemaType, ɵDataSourceScope, ɵDataValueType, ɵDatePartFunctionColumn, ɵDatePartFunctionExpression, ɵDatePartType, ɵDefaultValueSource, ɵDeleteQuery, ɵEMPTY_GUID, ɵEXPRESSION_TYPE_MOCK, ɵEntityQueryColumn, ɵEntitySchemaQuery, ɵExistsFilter, ɵExpressionMock, ɵExpressionParser, ɵExpressionResolver, ɵExpressionType, ɵFilterGroup, ɵFilterMock, ɵFilterParser, ɵFilterResolver, ɵFilterType, ɵFunctionExpression, ɵFunctionType, ɵInFilter, ɵInsertQuery, ɵIsNullFilter, ɵItemNotFoundException, ɵLengthFunctionColumn, ɵLengthFunctionExpression, ɵLogicalOperatorType, ɵMacrosFunctionColumn, ɵMacrosFunctionExpression, ɵModelParameterType, ɵNextHandlerAlreadySpecifiedException, ɵOrderDirection, ɵParameterExpression, ɵParameterQueryColumn, ɵQueryMacrosType, ɵQueryOperationType, ɵSelectLocalizationQuery, ɵSingleFilter, ɵSubQueryColumn, ɵSubQueryExpression, ɵUpdateQuery, ɵValidationUtilities, ɵWindowFunctionColumn, ɵWindowFunctionExpression, ɵencodeDate, ɵgenerateGuid, ɵgetColumnPlainObj, ɵgetFilterPlainObj, ɵisEmptyGuid, ɵisGuid, ɵparserMock, ɵtoLocalISOString };
|
|
2114
|
+
export { LookupMode, ɵAggregationEvalType, ɵAggregationFunction, ɵAggregationFunctionColumn, ɵAggregationFunctionExpression, ɵAggregationSubQueryColumn, ɵAggregationSubQueryExpression, ɵAggregationType, ɵArgumentEmptyException, ɵArgumentFunctionExpression, ɵArgumentOutOfRangeException, ɵArithmeticExpression, ɵArithmeticOperation, ɵArithmeticQueryColumn, ɵBaseExpression, ɵBaseExpressionParser, ɵBaseFilter, ɵBaseFilterParser, ɵBaseFilterableQuery, ɵBaseQuery, ɵBaseQueryColumn, ɵBaseRequest, ɵBetweenFilter, ɵColumnExpression, ɵCompareFilter, ɵComparisonType, ɵDEFAULT_COLUMN_PLAIN_OBJ, ɵDEFAULT_FILTER_PLAIN_OBJ, ɵDataSchemaAttributeType, ɵDataSchemaAttributeUsageType, ɵDataSchemaType, ɵDataSourceScope, ɵDataValueType, ɵDatePartFunctionColumn, ɵDatePartFunctionExpression, ɵDatePartType, ɵDefaultValueSource, ɵDeleteQuery, ɵEMPTY_GUID, ɵEXPRESSION_TYPE_MOCK, ɵEntityQueryColumn, ɵEntitySchemaQuery, ɵExistsFilter, ɵExpressionMock, ɵExpressionParser, ɵExpressionResolver, ɵExpressionType, ɵFilterGroup, ɵFilterMock, ɵFilterParser, ɵFilterResolver, ɵFilterType, ɵFunctionExpression, ɵFunctionType, ɵInFilter, ɵInsertQuery, ɵIsNullFilter, ɵItemNotFoundException, ɵLengthFunctionColumn, ɵLengthFunctionExpression, ɵLogicalOperatorType, ɵMacrosFunctionColumn, ɵMacrosFunctionExpression, ɵModelInPageAction, ɵModelParameterType, ɵNextHandlerAlreadySpecifiedException, ɵOrderDirection, ɵParameterExpression, ɵParameterQueryColumn, ɵQueryMacrosType, ɵQueryOperationType, ɵSelectLocalizationQuery, ɵSingleFilter, ɵSubQueryColumn, ɵSubQueryExpression, ɵUpdateQuery, ɵValidationUtilities, ɵWindowFunctionColumn, ɵWindowFunctionExpression, ɵencodeDate, ɵgenerateGuid, ɵgetColumnPlainObj, ɵgetFilterPlainObj, ɵisEmptyGuid, ɵisGuid, ɵparserMock, ɵtoLocalISOString };
|
|
2055
2115
|
//# sourceMappingURL=creatio-base.mjs.map
|