@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";
|
|
@@ -655,14 +675,17 @@ class ɵMacrosFunctionExpression extends ɵFunctionExpression {
|
|
|
655
675
|
super(config);
|
|
656
676
|
this.functionType = ɵFunctionType.Macros;
|
|
657
677
|
this.macrosType = config === null || config === void 0 ? void 0 : config.macrosType;
|
|
678
|
+
this.functionArgument = config === null || config === void 0 ? void 0 : config.functionArgument;
|
|
658
679
|
}
|
|
659
680
|
/**
|
|
660
681
|
* Parses expression from json.
|
|
661
682
|
* @public
|
|
662
683
|
*/
|
|
663
|
-
static fromJson(dto) {
|
|
664
|
-
const
|
|
665
|
-
|
|
684
|
+
static fromJson(dto, filterParser, expressionParser) {
|
|
685
|
+
const functionArgument = filterParser && expressionParser && dto['functionArgument']
|
|
686
|
+
? expressionParser.fromJson(dto['functionArgument'], filterParser)
|
|
687
|
+
: undefined;
|
|
688
|
+
return new ɵMacrosFunctionExpression({ functionArgument, macrosType: dto['macrosType'] });
|
|
666
689
|
}
|
|
667
690
|
clone() {
|
|
668
691
|
return new ɵMacrosFunctionExpression(this);
|
|
@@ -1075,7 +1098,10 @@ class ɵCompareFilter extends ɵSingleFilter {
|
|
|
1075
1098
|
return filter;
|
|
1076
1099
|
}
|
|
1077
1100
|
clone() {
|
|
1078
|
-
|
|
1101
|
+
const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
1102
|
+
filter.isEnabled = this.isEnabled;
|
|
1103
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1104
|
+
return filter;
|
|
1079
1105
|
}
|
|
1080
1106
|
toJson() {
|
|
1081
1107
|
return Object.assign(Object.assign({}, super.toJson()), { rightExpression: this.serializeItem(this.rightExpression) });
|
|
@@ -1109,7 +1135,10 @@ class ɵBetweenFilter extends ɵSingleFilter {
|
|
|
1109
1135
|
return filter;
|
|
1110
1136
|
}
|
|
1111
1137
|
clone() {
|
|
1112
|
-
|
|
1138
|
+
const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
1139
|
+
filter.isEnabled = this.isEnabled;
|
|
1140
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1141
|
+
return filter;
|
|
1113
1142
|
}
|
|
1114
1143
|
toJson() {
|
|
1115
1144
|
return Object.assign(Object.assign({}, super.toJson()), { rightLessExpression: this.serializeItem(this.rightLessExpression), rightGreaterExpression: this.serializeItem(this.rightGreaterExpression) });
|
|
@@ -1144,7 +1173,10 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1144
1173
|
return new ɵExistsFilter(leftExpression, subFilters, dto['comparisonType'], dto['isAggregative']);
|
|
1145
1174
|
}
|
|
1146
1175
|
clone() {
|
|
1147
|
-
|
|
1176
|
+
const filter = new ɵExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
1177
|
+
filter.isEnabled = this.isEnabled;
|
|
1178
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1179
|
+
return filter;
|
|
1148
1180
|
}
|
|
1149
1181
|
toJson() {
|
|
1150
1182
|
const result = super.toJson();
|
|
@@ -1182,7 +1214,10 @@ class ɵInFilter extends ɵSingleFilter {
|
|
|
1182
1214
|
return new ɵInFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), dtoRightExpressions.map((expression) => expressionParser.fromJson(expression, filterParser)));
|
|
1183
1215
|
}
|
|
1184
1216
|
clone() {
|
|
1185
|
-
|
|
1217
|
+
const filter = new ɵInFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
1218
|
+
filter.isEnabled = this.isEnabled;
|
|
1219
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1220
|
+
return filter;
|
|
1186
1221
|
}
|
|
1187
1222
|
toJson() {
|
|
1188
1223
|
return Object.assign(Object.assign({}, super.toJson()), { rightExpressions: this.rightExpressions.map((expression) => this.serializeItem(expression)) });
|
|
@@ -1216,7 +1251,10 @@ class ɵIsNullFilter extends ɵSingleFilter {
|
|
|
1216
1251
|
return new ɵIsNullFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser));
|
|
1217
1252
|
}
|
|
1218
1253
|
clone() {
|
|
1219
|
-
|
|
1254
|
+
const filter = new ɵIsNullFilter(this.comparisonType, this.leftExpression);
|
|
1255
|
+
filter.isEnabled = this.isEnabled;
|
|
1256
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1257
|
+
return filter;
|
|
1220
1258
|
}
|
|
1221
1259
|
}
|
|
1222
1260
|
/**
|
|
@@ -1358,10 +1396,11 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1358
1396
|
});
|
|
1359
1397
|
return result;
|
|
1360
1398
|
}
|
|
1361
|
-
constructor(logicalOperation = ɵLogicalOperatorType.And) {
|
|
1399
|
+
constructor(logicalOperation = ɵLogicalOperatorType.And, rootSchemaName) {
|
|
1362
1400
|
super(ɵFilterType.FilterGroup);
|
|
1363
1401
|
this.filters = new Map();
|
|
1364
1402
|
this.logicalOperation = logicalOperation;
|
|
1403
|
+
this.rootSchemaName = rootSchemaName;
|
|
1365
1404
|
}
|
|
1366
1405
|
/**
|
|
1367
1406
|
* Parses filter group from json.
|
|
@@ -1369,12 +1408,17 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1369
1408
|
*/
|
|
1370
1409
|
static fromJson(dto, filterParser) {
|
|
1371
1410
|
const logicalOperation = dto['logicalOperation'];
|
|
1372
|
-
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And);
|
|
1411
|
+
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And, dto['rootSchemaName']);
|
|
1373
1412
|
Object.entries(dto['items']).forEach(([key, filterDTO]) => {
|
|
1374
1413
|
group.add(filterParser.fromJson(filterDTO), key);
|
|
1375
1414
|
});
|
|
1376
1415
|
return group;
|
|
1377
1416
|
}
|
|
1417
|
+
_createParameterValueExpressions(values) {
|
|
1418
|
+
return values.map((value) => new ɵParameterExpression({
|
|
1419
|
+
value: value,
|
|
1420
|
+
}));
|
|
1421
|
+
}
|
|
1378
1422
|
/**
|
|
1379
1423
|
* Returns filter item by index.
|
|
1380
1424
|
* @param index Item index.
|
|
@@ -1405,12 +1449,21 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1405
1449
|
*/
|
|
1406
1450
|
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues, filterKey) {
|
|
1407
1451
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1408
|
-
const expressions =
|
|
1409
|
-
value: singleParameterValue,
|
|
1410
|
-
}));
|
|
1452
|
+
const expressions = this._createParameterValueExpressions(parameterValues);
|
|
1411
1453
|
const filter = new ɵInFilter(comparisonType, leftExpression, expressions);
|
|
1412
1454
|
this.add(filter, filterKey);
|
|
1413
1455
|
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Creates and adds in filter for primary column.
|
|
1458
|
+
* @param primaryColumnValues Primary column values.
|
|
1459
|
+
* @param filterKey Filter key.
|
|
1460
|
+
*/
|
|
1461
|
+
addPrimarySchemaColumnInFilter(primaryColumnValues, filterKey) {
|
|
1462
|
+
const leftExpression = new ɵMacrosFunctionExpression({ macrosType: ɵQueryMacrosType.PrimaryColumn });
|
|
1463
|
+
const expressions = this._createParameterValueExpressions(primaryColumnValues);
|
|
1464
|
+
const filter = new ɵInFilter(ɵComparisonType.Equal, leftExpression, expressions);
|
|
1465
|
+
this.add(filter, filterKey);
|
|
1466
|
+
}
|
|
1414
1467
|
addSchemaColumnIsNullFilter(columnPath, filterKey) {
|
|
1415
1468
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1416
1469
|
const filter = new ɵIsNullFilter(ɵComparisonType.Is_null, leftExpression);
|
|
@@ -1456,10 +1509,12 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1456
1509
|
this.filters.set(key, filter);
|
|
1457
1510
|
}
|
|
1458
1511
|
clone() {
|
|
1459
|
-
const filterGroup = new ɵFilterGroup(this.logicalOperation);
|
|
1512
|
+
const filterGroup = new ɵFilterGroup(this.logicalOperation, this.rootSchemaName);
|
|
1460
1513
|
this.filters.forEach((filter, filterKey) => {
|
|
1461
1514
|
filterGroup.filters.set(filterKey, filter.clone());
|
|
1462
1515
|
});
|
|
1516
|
+
filterGroup.isEnabled = this.isEnabled;
|
|
1517
|
+
filterGroup.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1463
1518
|
return filterGroup;
|
|
1464
1519
|
}
|
|
1465
1520
|
}
|
|
@@ -1513,7 +1568,12 @@ class ɵFilterResolver {
|
|
|
1513
1568
|
class ɵFilterParser extends ɵBaseFilterParser {
|
|
1514
1569
|
static fromJson(dto) {
|
|
1515
1570
|
const filterType = dto['filterType'];
|
|
1516
|
-
|
|
1571
|
+
const isEnabled = dto['isEnabled'];
|
|
1572
|
+
const trimDateTimeParameterToDate = dto['trimDateTimeParameterToDate'];
|
|
1573
|
+
const filter = ɵFilterResolver.resolve(filterType).fromJson(dto, ɵFilterParser, ɵExpressionParser);
|
|
1574
|
+
filter.isEnabled = isEnabled !== false;
|
|
1575
|
+
filter.trimDateTimeParameterToDate = trimDateTimeParameterToDate === true;
|
|
1576
|
+
return filter;
|
|
1517
1577
|
}
|
|
1518
1578
|
}
|
|
1519
1579
|
|
|
@@ -2007,5 +2067,5 @@ var ɵModelParameterType;
|
|
|
2007
2067
|
* Generated bundle index. Do not edit.
|
|
2008
2068
|
*/
|
|
2009
2069
|
|
|
2010
|
-
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 };
|
|
2070
|
+
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 };
|
|
2011
2071
|
//# sourceMappingURL=creatio-base.mjs.map
|