@creatio/base 0.812.0 → 0.813.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/esm2020/lib/public/esq/data-model/columns/base-query-column.mjs +7 -1
  3. package/esm2020/lib/public/esq/data-model/expressions/arithmetic/arithmetic-expression.mjs +7 -1
  4. package/esm2020/lib/public/esq/data-model/expressions/base-expression.mjs +1 -1
  5. package/esm2020/lib/public/esq/data-model/expressions/columns/column-expression.mjs +11 -1
  6. package/esm2020/lib/public/esq/data-model/expressions/functions/argument-function-expression.mjs +7 -1
  7. package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +7 -1
  8. package/esm2020/lib/public/esq/data-model/expressions/mocks/expression.mock.mjs +7 -1
  9. package/esm2020/lib/public/esq/data-model/expressions/parameters/parameter-expression.mjs +7 -1
  10. package/esm2020/lib/public/esq/data-model/expressions/sub-queries/sub-query-expression.mjs +31 -8
  11. package/esm2020/lib/public/esq/data-model/filters/base-filter.mjs +1 -1
  12. package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +11 -1
  13. package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +7 -1
  14. package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +7 -1
  15. package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +32 -1
  16. package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +10 -1
  17. package/esm2020/lib/public/esq/data-model/filters/mocks/filter.mock.mjs +7 -1
  18. package/esm2020/lib/public/esq/data-model/filters/single-filter.mjs +7 -1
  19. package/esm2020/lib/public/esq/data-model/index.mjs +2 -1
  20. package/esm2020/lib/public/esq/data-model/queries/base-filterable-query.mjs +19 -1
  21. package/esm2020/lib/public/esq/data-model/queries/entity-schema-query.mjs +18 -3
  22. package/esm2020/lib/public/esq/data-model/used-column.mjs +2 -0
  23. package/esm2020/lib/public/models/index.mjs +3 -1
  24. package/esm2020/lib/public/models/item-creation-config.mjs +2 -0
  25. package/esm2020/lib/public/models/request/index.mjs +2 -1
  26. package/esm2020/lib/public/models/request/request-registration-config.model.mjs +2 -0
  27. package/esm2020/lib/public/models/view-model-collection.mjs +2 -0
  28. package/esm2020/lib/public/services/index.mjs +2 -1
  29. package/esm2020/lib/public/services/mask-service/base-mask.service.mjs +2 -0
  30. package/esm2020/lib/public/services/mask-service/index.mjs +3 -0
  31. package/esm2020/lib/public/services/mask-service/schema-view-mask.request.mjs +24 -0
  32. package/esm2020/lib/public/services/model/data-source-aggregation-config.mjs +1 -1
  33. package/fesm2015/creatio-base.mjs +406 -203
  34. package/fesm2015/creatio-base.mjs.map +1 -1
  35. package/fesm2020/creatio-base.mjs +407 -211
  36. package/fesm2020/creatio-base.mjs.map +1 -1
  37. package/index.d.ts +135 -0
  38. package/package.json +1 -1
@@ -468,6 +468,12 @@ class ɵArithmeticExpression extends ɵBaseExpression {
468
468
  clone() {
469
469
  return new ɵArithmeticExpression(this);
470
470
  }
471
+ /**
472
+ * @internal
473
+ */
474
+ _getUsedColumns() {
475
+ return [...this.leftArithmeticOperand._getUsedColumns(), ...this.rightArithmeticOperand._getUsedColumns()];
476
+ }
471
477
  }
472
478
  /**
473
479
  * @internal
@@ -499,6 +505,16 @@ class ɵColumnExpression extends ɵBaseExpression {
499
505
  clone() {
500
506
  return new ɵColumnExpression(this);
501
507
  }
508
+ /**
509
+ * @internal
510
+ */
511
+ _getUsedColumns() {
512
+ return [
513
+ {
514
+ path: this.columnPath,
515
+ },
516
+ ];
517
+ }
502
518
  }
503
519
  /**
504
520
  * @internal
@@ -554,6 +570,12 @@ class ɵArgumentFunctionExpression extends ɵFunctionExpression {
554
570
  }
555
571
  return result;
556
572
  }
573
+ /**
574
+ * @internal
575
+ */
576
+ _getUsedColumns() {
577
+ return this.functionArgument?._getUsedColumns() ?? [];
578
+ }
557
579
  }
558
580
  /**
559
581
  * @internal
@@ -689,6 +711,12 @@ class ɵMacrosFunctionExpression extends ɵFunctionExpression {
689
711
  clone() {
690
712
  return new ɵMacrosFunctionExpression(this);
691
713
  }
714
+ /**
715
+ * @internal
716
+ */
717
+ _getUsedColumns() {
718
+ return this.functionArgument?._getUsedColumns() ?? [];
719
+ }
692
720
  }
693
721
  /**
694
722
  * @internal
@@ -805,6 +833,12 @@ class ɵParameterExpression extends ɵBaseExpression {
805
833
  clone() {
806
834
  return new ɵParameterExpression(this);
807
835
  }
836
+ /**
837
+ * @internal
838
+ */
839
+ _getUsedColumns() {
840
+ return [];
841
+ }
808
842
  }
809
843
  /**
810
844
  * @internal
@@ -820,165 +854,6 @@ __decorate([
820
854
  __metadata("design:type", Number)
821
855
  ], ɵParameterExpression.prototype, "dataValueType", void 0);
822
856
 
823
- class ɵSubQueryExpression extends ɵBaseExpression {
824
- /**
825
- * @internal
826
- * @dontChange
827
- */
828
- static get _instanceOfKeys() {
829
- return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
830
- }
831
- constructor(config) {
832
- super(config);
833
- this.expressionType = ɵExpressionType.SubQuery;
834
- this.columnPath = config?.columnPath;
835
- const subFilter = config?.subFilters;
836
- this.subFilters = typeof subFilter?.clone === 'function' ? subFilter.clone() : subFilter;
837
- this.subOrderDirection = config.subOrderDirection;
838
- this.subOrderColumn = config.subOrderColumn;
839
- }
840
- /**
841
- * Parses expression from json.
842
- * @public
843
- */
844
- static fromJson(dto, filterParser) {
845
- const expression = new ɵSubQueryExpression({
846
- columnPath: dto['columnPath'],
847
- subFilters: filterParser.fromJson(dto['subFilters']),
848
- subOrderDirection: dto['subOrderDirection'],
849
- subOrderColumn: dto['subOrderColumn'],
850
- });
851
- return expression;
852
- }
853
- clone() {
854
- return new ɵSubQueryExpression(this);
855
- }
856
- toJson() {
857
- const result = super.toJson();
858
- if (this.subFilters) {
859
- result['subFilters'] = this.serializeItem(this.subFilters);
860
- }
861
- return result;
862
- }
863
- }
864
- /**
865
- * @internal
866
- * @dontChange
867
- */
868
- ɵSubQueryExpression._instanceOfKey = 'devkit_SubQueryExpression';
869
-
870
- class ɵAggregationSubQueryExpression extends ɵSubQueryExpression {
871
- /**
872
- * @internal
873
- * @dontChange
874
- */
875
- static get _instanceOfKeys() {
876
- return [...ɵSubQueryExpression._instanceOfKeys, this._instanceOfKey];
877
- }
878
- constructor(config) {
879
- super(config);
880
- this.aggregationType = config?.aggregationType;
881
- this.functionType = config?.functionType;
882
- }
883
- /**
884
- * Parses expression from json.
885
- * @public
886
- */
887
- static fromJson(dto, filterParser) {
888
- const subQueryExpression = super.fromJson(dto, filterParser);
889
- const expression = new ɵAggregationSubQueryExpression({
890
- aggregationType: dto['aggregationType'],
891
- functionType: dto['functionType'],
892
- ...subQueryExpression,
893
- });
894
- return expression;
895
- }
896
- clone() {
897
- return new ɵAggregationSubQueryExpression(this);
898
- }
899
- }
900
- /**
901
- * @internal
902
- * @dontChange
903
- */
904
- ɵAggregationSubQueryExpression._instanceOfKey = 'devkit_AggregationSubQueryExpression';
905
-
906
- /**
907
- * Function expression resolver.
908
- * @public
909
- */
910
- class FunctionExpressionResolver {
911
- static resolve(dto) {
912
- const expressionClass = {
913
- [ɵFunctionType.Macros]: ɵMacrosFunctionExpression,
914
- [ɵFunctionType.Length]: ɵLengthFunctionExpression,
915
- [ɵFunctionType.Window]: ɵWindowFunctionExpression,
916
- [ɵFunctionType.DatePart]: ɵDatePartFunctionExpression,
917
- [ɵFunctionType.DateAdd]: ɵDatePartFunctionExpression,
918
- [ɵFunctionType.DateDiff]: ɵDatePartFunctionExpression,
919
- };
920
- return expressionClass[dto['functionType']];
921
- }
922
- }
923
- /**
924
- * Expression resolver.
925
- * @public
926
- */
927
- class ɵExpressionResolver {
928
- static resolve(expressionType, dto) {
929
- const expressionClass = {
930
- [ɵExpressionType.SchemaColumn]: ɵColumnExpression,
931
- [ɵExpressionType.Parameter]: ɵParameterExpression,
932
- [ɵExpressionType.SubQuery]: ɵAggregationSubQueryExpression,
933
- [ɵExpressionType.ArithmeticOperation]: ɵArithmeticExpression,
934
- [ɵExpressionType.Function]: FunctionExpressionResolver.resolve(dto),
935
- };
936
- return expressionClass[expressionType];
937
- }
938
- }
939
-
940
- /**
941
- * Expression parser.
942
- * @public
943
- */
944
- class ɵExpressionParser extends ɵBaseExpressionParser {
945
- /**
946
- * Parses expression from json.
947
- * @public
948
- */
949
- static fromJson(dto, filterParser) {
950
- const expressionType = dto['expressionType'];
951
- return ɵExpressionResolver.resolve(expressionType, dto).fromJson(dto, filterParser, ɵExpressionParser);
952
- }
953
- }
954
-
955
- const ɵEXPRESSION_TYPE_MOCK = -1;
956
- class ɵExpressionMock extends ɵBaseExpression {
957
- /**
958
- * @internal
959
- * @dontChange
960
- */
961
- static get _instanceOfKeys() {
962
- return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
963
- }
964
- constructor(config) {
965
- super(config || {});
966
- this.expressionType = ɵEXPRESSION_TYPE_MOCK;
967
- }
968
- // eslint-disable-next-line @typescript-eslint/ban-types
969
- get plainObject() {
970
- return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
971
- }
972
- clone() {
973
- return new ɵExpressionMock(this);
974
- }
975
- }
976
- /**
977
- * @internal
978
- * @dontChange
979
- */
980
- ɵExpressionMock._instanceOfKey = 'devkit_ExpressionMock';
981
-
982
857
  class ɵBaseFilter {
983
858
  /**
984
859
  * @internal
@@ -1028,39 +903,6 @@ class ɵBaseFilter {
1028
903
  */
1029
904
  ɵBaseFilter._instanceOfKey = 'devkit_BaseFilter';
1030
905
 
1031
- class ɵFilterMock extends ɵBaseFilter {
1032
- /**
1033
- * @internal
1034
- * @dontChange
1035
- */
1036
- static get _instanceOfKeys() {
1037
- return [...ɵBaseFilter._instanceOfKeys, this._instanceOfKey];
1038
- }
1039
- constructor(filterType = ɵFilterType.None) {
1040
- super(filterType);
1041
- }
1042
- // eslint-disable-next-line @typescript-eslint/ban-types
1043
- get plainObject() {
1044
- return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
1045
- }
1046
- clone() {
1047
- return new ɵFilterMock(this.filterType);
1048
- }
1049
- }
1050
- /**
1051
- * @internal
1052
- * @dontChange
1053
- */
1054
- ɵFilterMock._instanceOfKey = 'devkit_FilterMock';
1055
-
1056
- const ɵparserMock = {
1057
- fromJson: (data) => ({
1058
- ...data,
1059
- clone: () => data,
1060
- }),
1061
- clone: () => this,
1062
- };
1063
-
1064
906
  class ɵSingleFilter extends ɵBaseFilter {
1065
907
  /**
1066
908
  * @internal
@@ -1080,6 +922,12 @@ class ɵSingleFilter extends ɵBaseFilter {
1080
922
  leftExpression: this.serializeItem(this.leftExpression),
1081
923
  };
1082
924
  }
925
+ /**
926
+ * @internal
927
+ */
928
+ _getUsedColumns() {
929
+ return this.leftExpression._getUsedColumns();
930
+ }
1083
931
  }
1084
932
  /**
1085
933
  * @internal
@@ -1087,7 +935,7 @@ class ɵSingleFilter extends ɵBaseFilter {
1087
935
  */
1088
936
  ɵSingleFilter._instanceOfKey = 'devkit_SingleFilter';
1089
937
 
1090
- class ɵCompareFilter extends ɵSingleFilter {
938
+ class ɵBetweenFilter extends ɵSingleFilter {
1091
939
  /**
1092
940
  * @internal
1093
941
  * @dontChange
@@ -1095,20 +943,21 @@ class ɵCompareFilter extends ɵSingleFilter {
1095
943
  static get _instanceOfKeys() {
1096
944
  return [...ɵSingleFilter._instanceOfKeys, this._instanceOfKey];
1097
945
  }
1098
- constructor(comparisonType, leftExpression, rightExpression) {
1099
- super(ɵFilterType.Compare, comparisonType, leftExpression);
1100
- this.rightExpression = rightExpression.clone();
946
+ constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
947
+ super(ɵFilterType.Between, ɵComparisonType.Between, leftExpression);
948
+ this.rightLessExpression = rightLessExpression.clone();
949
+ this.rightGreaterExpression = rightGreaterExpression.clone();
1101
950
  }
1102
951
  /**
1103
952
  * Parses filter from json.
1104
953
  * @public
1105
954
  */
1106
955
  static fromJson(dto, filterParser, expressionParser) {
1107
- const filter = new ɵCompareFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightExpression'], filterParser));
956
+ const filter = new ɵBetweenFilter(expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightLessExpression'], filterParser), expressionParser.fromJson(dto['rightGreaterExpression'], filterParser));
1108
957
  return filter;
1109
958
  }
1110
959
  clone() {
1111
- const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
960
+ const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
1112
961
  filter.isEnabled = this.isEnabled;
1113
962
  filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
1114
963
  return filter;
@@ -1116,17 +965,28 @@ class ɵCompareFilter extends ɵSingleFilter {
1116
965
  toJson() {
1117
966
  return {
1118
967
  ...super.toJson(),
1119
- rightExpression: this.serializeItem(this.rightExpression),
968
+ rightLessExpression: this.serializeItem(this.rightLessExpression),
969
+ rightGreaterExpression: this.serializeItem(this.rightGreaterExpression),
1120
970
  };
1121
971
  }
972
+ /**
973
+ * @internal
974
+ */
975
+ _getUsedColumns() {
976
+ return [
977
+ ...super._getUsedColumns(),
978
+ ...this.rightLessExpression._getUsedColumns(),
979
+ ...this.rightGreaterExpression._getUsedColumns(),
980
+ ];
981
+ }
1122
982
  }
1123
983
  /**
1124
984
  * @internal
1125
985
  * @dontChange
1126
986
  */
1127
- ɵCompareFilter._instanceOfKey = 'devkit_CompareFilter';
987
+ ɵBetweenFilter._instanceOfKey = 'devkit_BetweenFilter';
1128
988
 
1129
- class ɵBetweenFilter extends ɵSingleFilter {
989
+ class ɵCompareFilter extends ɵSingleFilter {
1130
990
  /**
1131
991
  * @internal
1132
992
  * @dontChange
@@ -1134,21 +994,20 @@ class ɵBetweenFilter extends ɵSingleFilter {
1134
994
  static get _instanceOfKeys() {
1135
995
  return [...ɵSingleFilter._instanceOfKeys, this._instanceOfKey];
1136
996
  }
1137
- constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
1138
- super(ɵFilterType.Between, ɵComparisonType.Between, leftExpression);
1139
- this.rightLessExpression = rightLessExpression.clone();
1140
- this.rightGreaterExpression = rightGreaterExpression.clone();
997
+ constructor(comparisonType, leftExpression, rightExpression) {
998
+ super(ɵFilterType.Compare, comparisonType, leftExpression);
999
+ this.rightExpression = rightExpression.clone();
1141
1000
  }
1142
1001
  /**
1143
1002
  * Parses filter from json.
1144
1003
  * @public
1145
1004
  */
1146
1005
  static fromJson(dto, filterParser, expressionParser) {
1147
- const filter = new ɵBetweenFilter(expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightLessExpression'], filterParser), expressionParser.fromJson(dto['rightGreaterExpression'], filterParser));
1006
+ const filter = new ɵCompareFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightExpression'], filterParser));
1148
1007
  return filter;
1149
1008
  }
1150
1009
  clone() {
1151
- const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
1010
+ const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
1152
1011
  filter.isEnabled = this.isEnabled;
1153
1012
  filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
1154
1013
  return filter;
@@ -1156,16 +1015,21 @@ class ɵBetweenFilter extends ɵSingleFilter {
1156
1015
  toJson() {
1157
1016
  return {
1158
1017
  ...super.toJson(),
1159
- rightLessExpression: this.serializeItem(this.rightLessExpression),
1160
- rightGreaterExpression: this.serializeItem(this.rightGreaterExpression),
1018
+ rightExpression: this.serializeItem(this.rightExpression),
1161
1019
  };
1162
1020
  }
1021
+ /**
1022
+ * @internal
1023
+ */
1024
+ _getUsedColumns() {
1025
+ return [...super._getUsedColumns(), ...this.rightExpression._getUsedColumns()];
1026
+ }
1163
1027
  }
1164
1028
  /**
1165
1029
  * @internal
1166
1030
  * @dontChange
1167
1031
  */
1168
- ɵBetweenFilter._instanceOfKey = 'devkit_BetweenFilter';
1032
+ ɵCompareFilter._instanceOfKey = 'devkit_CompareFilter';
1169
1033
 
1170
1034
  class ɵExistsFilter extends ɵSingleFilter {
1171
1035
  /**
@@ -1202,6 +1066,12 @@ class ɵExistsFilter extends ɵSingleFilter {
1202
1066
  }
1203
1067
  return result;
1204
1068
  }
1069
+ /**
1070
+ * @internal
1071
+ */
1072
+ _getUsedColumns() {
1073
+ return [...super._getUsedColumns(), ...(this.subFilters?._getUsedColumns() ?? [])];
1074
+ }
1205
1075
  }
1206
1076
  /**
1207
1077
  * @internal
@@ -1241,6 +1111,15 @@ class ɵInFilter extends ɵSingleFilter {
1241
1111
  rightExpressions: this.rightExpressions.map((expression) => this.serializeItem(expression)),
1242
1112
  };
1243
1113
  }
1114
+ /**
1115
+ * @internal
1116
+ */
1117
+ _getUsedColumns() {
1118
+ const rightExpressionsUsedColumns = this.rightExpressions
1119
+ .map((expression) => expression._getUsedColumns())
1120
+ .flat();
1121
+ return [...super._getUsedColumns(), ...rightExpressionsUsedColumns];
1122
+ }
1244
1123
  }
1245
1124
  /**
1246
1125
  * @internal
@@ -1433,6 +1312,22 @@ class ɵFilterGroup extends ɵBaseFilter {
1433
1312
  });
1434
1313
  return group;
1435
1314
  }
1315
+ /**
1316
+ * Converts instance to json object.
1317
+ * @public
1318
+ */
1319
+ toJson() {
1320
+ const result = {};
1321
+ result['filterType'] = this.filterType;
1322
+ result['isEnabled'] = this.isEnabled;
1323
+ result['logicalOperation'] = this.logicalOperation;
1324
+ result['trimDateTimeParameterToDate'] = this.trimDateTimeParameterToDate;
1325
+ result['items'] = this.items;
1326
+ if (this.rootSchemaName) {
1327
+ result['rootSchemaName'] = this.rootSchemaName;
1328
+ }
1329
+ return result;
1330
+ }
1436
1331
  _createParameterValueExpressions(values) {
1437
1332
  return values.map((value) => new ɵParameterExpression({
1438
1333
  value: value,
@@ -1536,6 +1431,21 @@ class ɵFilterGroup extends ɵBaseFilter {
1536
1431
  filterGroup.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
1537
1432
  return filterGroup;
1538
1433
  }
1434
+ /**
1435
+ * @internal
1436
+ */
1437
+ _getUsedColumns() {
1438
+ const result = [];
1439
+ this.filters.forEach((filter) => {
1440
+ let filterUsedColumns = filter._getUsedColumns ? filter._getUsedColumns() : [];
1441
+ filterUsedColumns = filterUsedColumns.map((usedColumn) => ({
1442
+ path: usedColumn.path,
1443
+ schemaName: usedColumn.schemaName ?? this.rootSchemaName,
1444
+ }));
1445
+ result.push(...filterUsedColumns);
1446
+ });
1447
+ return result;
1448
+ }
1539
1449
  }
1540
1450
  /**
1541
1451
  * @internal
@@ -1552,6 +1462,232 @@ __decorate([
1552
1462
  __metadata("design:paramtypes", [])
1553
1463
  ], ɵFilterGroup.prototype, "items", null);
1554
1464
 
1465
+ class ɵSubQueryExpression extends ɵBaseExpression {
1466
+ /**
1467
+ * @internal
1468
+ * @dontChange
1469
+ */
1470
+ static get _instanceOfKeys() {
1471
+ return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
1472
+ }
1473
+ constructor(config) {
1474
+ super(config);
1475
+ this.expressionType = ɵExpressionType.SubQuery;
1476
+ this.columnPath = config?.columnPath;
1477
+ const subFilters = config?.subFilters;
1478
+ if (typeof subFilters?.clone === 'function') {
1479
+ this.subFilters = subFilters.clone();
1480
+ }
1481
+ else if (subFilters) {
1482
+ this.subFilters = new ɵFilterGroup(subFilters.logicalOperation, subFilters.rootSchemaName);
1483
+ Object.entries(subFilters.items).forEach(([key, filter]) => {
1484
+ this.subFilters.add(filter, key);
1485
+ });
1486
+ }
1487
+ else {
1488
+ this.subFilters = subFilters;
1489
+ }
1490
+ this.subOrderDirection = config.subOrderDirection;
1491
+ this.subOrderColumn = config.subOrderColumn;
1492
+ }
1493
+ /**
1494
+ * Parses expression from json.
1495
+ * @public
1496
+ */
1497
+ static fromJson(dto, filterParser) {
1498
+ const expression = new ɵSubQueryExpression({
1499
+ columnPath: dto['columnPath'],
1500
+ subFilters: filterParser.fromJson(dto['subFilters']),
1501
+ subOrderDirection: dto['subOrderDirection'],
1502
+ subOrderColumn: dto['subOrderColumn'],
1503
+ });
1504
+ return expression;
1505
+ }
1506
+ clone() {
1507
+ return new ɵSubQueryExpression(this);
1508
+ }
1509
+ toJson() {
1510
+ const result = super.toJson();
1511
+ if (this.subFilters) {
1512
+ result['subFilters'] = this.serializeItem(this.subFilters);
1513
+ }
1514
+ return result;
1515
+ }
1516
+ /**
1517
+ * @internal
1518
+ */
1519
+ _getUsedColumns() {
1520
+ return [
1521
+ {
1522
+ path: this.columnPath,
1523
+ },
1524
+ ...(this.subFilters?._getUsedColumns() ?? []),
1525
+ ];
1526
+ }
1527
+ }
1528
+ /**
1529
+ * @internal
1530
+ * @dontChange
1531
+ */
1532
+ ɵSubQueryExpression._instanceOfKey = 'devkit_SubQueryExpression';
1533
+
1534
+ class ɵAggregationSubQueryExpression extends ɵSubQueryExpression {
1535
+ /**
1536
+ * @internal
1537
+ * @dontChange
1538
+ */
1539
+ static get _instanceOfKeys() {
1540
+ return [...ɵSubQueryExpression._instanceOfKeys, this._instanceOfKey];
1541
+ }
1542
+ constructor(config) {
1543
+ super(config);
1544
+ this.aggregationType = config?.aggregationType;
1545
+ this.functionType = config?.functionType;
1546
+ }
1547
+ /**
1548
+ * Parses expression from json.
1549
+ * @public
1550
+ */
1551
+ static fromJson(dto, filterParser) {
1552
+ const subQueryExpression = super.fromJson(dto, filterParser);
1553
+ const expression = new ɵAggregationSubQueryExpression({
1554
+ aggregationType: dto['aggregationType'],
1555
+ functionType: dto['functionType'],
1556
+ ...subQueryExpression,
1557
+ });
1558
+ return expression;
1559
+ }
1560
+ clone() {
1561
+ return new ɵAggregationSubQueryExpression(this);
1562
+ }
1563
+ }
1564
+ /**
1565
+ * @internal
1566
+ * @dontChange
1567
+ */
1568
+ ɵAggregationSubQueryExpression._instanceOfKey = 'devkit_AggregationSubQueryExpression';
1569
+
1570
+ /**
1571
+ * Function expression resolver.
1572
+ * @public
1573
+ */
1574
+ class FunctionExpressionResolver {
1575
+ static resolve(dto) {
1576
+ const expressionClass = {
1577
+ [ɵFunctionType.Macros]: ɵMacrosFunctionExpression,
1578
+ [ɵFunctionType.Length]: ɵLengthFunctionExpression,
1579
+ [ɵFunctionType.Window]: ɵWindowFunctionExpression,
1580
+ [ɵFunctionType.DatePart]: ɵDatePartFunctionExpression,
1581
+ [ɵFunctionType.DateAdd]: ɵDatePartFunctionExpression,
1582
+ [ɵFunctionType.DateDiff]: ɵDatePartFunctionExpression,
1583
+ };
1584
+ return expressionClass[dto['functionType']];
1585
+ }
1586
+ }
1587
+ /**
1588
+ * Expression resolver.
1589
+ * @public
1590
+ */
1591
+ class ɵExpressionResolver {
1592
+ static resolve(expressionType, dto) {
1593
+ const expressionClass = {
1594
+ [ɵExpressionType.SchemaColumn]: ɵColumnExpression,
1595
+ [ɵExpressionType.Parameter]: ɵParameterExpression,
1596
+ [ɵExpressionType.SubQuery]: ɵAggregationSubQueryExpression,
1597
+ [ɵExpressionType.ArithmeticOperation]: ɵArithmeticExpression,
1598
+ [ɵExpressionType.Function]: FunctionExpressionResolver.resolve(dto),
1599
+ };
1600
+ return expressionClass[expressionType];
1601
+ }
1602
+ }
1603
+
1604
+ /**
1605
+ * Expression parser.
1606
+ * @public
1607
+ */
1608
+ class ɵExpressionParser extends ɵBaseExpressionParser {
1609
+ /**
1610
+ * Parses expression from json.
1611
+ * @public
1612
+ */
1613
+ static fromJson(dto, filterParser) {
1614
+ const expressionType = dto['expressionType'];
1615
+ return ɵExpressionResolver.resolve(expressionType, dto).fromJson(dto, filterParser, ɵExpressionParser);
1616
+ }
1617
+ }
1618
+
1619
+ const ɵEXPRESSION_TYPE_MOCK = -1;
1620
+ class ɵExpressionMock extends ɵBaseExpression {
1621
+ /**
1622
+ * @internal
1623
+ * @dontChange
1624
+ */
1625
+ static get _instanceOfKeys() {
1626
+ return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
1627
+ }
1628
+ constructor(config) {
1629
+ super(config || {});
1630
+ this.expressionType = ɵEXPRESSION_TYPE_MOCK;
1631
+ }
1632
+ // eslint-disable-next-line @typescript-eslint/ban-types
1633
+ get plainObject() {
1634
+ return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
1635
+ }
1636
+ clone() {
1637
+ return new ɵExpressionMock(this);
1638
+ }
1639
+ /**
1640
+ * @internal
1641
+ */
1642
+ _getUsedColumns() {
1643
+ return [];
1644
+ }
1645
+ }
1646
+ /**
1647
+ * @internal
1648
+ * @dontChange
1649
+ */
1650
+ ɵExpressionMock._instanceOfKey = 'devkit_ExpressionMock';
1651
+
1652
+ class ɵFilterMock extends ɵBaseFilter {
1653
+ /**
1654
+ * @internal
1655
+ * @dontChange
1656
+ */
1657
+ static get _instanceOfKeys() {
1658
+ return [...ɵBaseFilter._instanceOfKeys, this._instanceOfKey];
1659
+ }
1660
+ constructor(filterType = ɵFilterType.None) {
1661
+ super(filterType);
1662
+ }
1663
+ // eslint-disable-next-line @typescript-eslint/ban-types
1664
+ get plainObject() {
1665
+ return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
1666
+ }
1667
+ clone() {
1668
+ return new ɵFilterMock(this.filterType);
1669
+ }
1670
+ /**
1671
+ * @internal
1672
+ */
1673
+ _getUsedColumns() {
1674
+ return [];
1675
+ }
1676
+ }
1677
+ /**
1678
+ * @internal
1679
+ * @dontChange
1680
+ */
1681
+ ɵFilterMock._instanceOfKey = 'devkit_FilterMock';
1682
+
1683
+ const ɵparserMock = {
1684
+ fromJson: (data) => ({
1685
+ ...data,
1686
+ clone: () => data,
1687
+ }),
1688
+ clone: () => this,
1689
+ };
1690
+
1555
1691
  /**
1556
1692
  * Filter parser interface
1557
1693
  * @public
@@ -1648,6 +1784,12 @@ class ɵBaseQueryColumn {
1648
1784
  this.caption = caption;
1649
1785
  return this;
1650
1786
  }
1787
+ /**
1788
+ * @internal
1789
+ */
1790
+ _getUsedColumns() {
1791
+ return this.expression._getUsedColumns();
1792
+ }
1651
1793
  }
1652
1794
 
1653
1795
  class ɵArithmeticQueryColumn extends ɵBaseQueryColumn {
@@ -1785,7 +1927,23 @@ class ɵBaseFilterableQuery extends ɵBaseQuery {
1785
1927
  filters: this.filters.toJson(),
1786
1928
  };
1787
1929
  }
1930
+ /**
1931
+ * @internal
1932
+ */
1933
+ _getUsedColumns() {
1934
+ const usedColumns = this.filters._getUsedColumns();
1935
+ usedColumns.forEach((usedColumn) => {
1936
+ if (!usedColumn.schemaName) {
1937
+ usedColumn.schemaName = this.rootSchemaName;
1938
+ }
1939
+ });
1940
+ return usedColumns;
1941
+ }
1788
1942
  }
1943
+ __decorate([
1944
+ Exclude(),
1945
+ __metadata("design:type", Object)
1946
+ ], ɵBaseFilterableQuery.prototype, "filters", void 0);
1789
1947
 
1790
1948
  /**
1791
1949
  * @public
@@ -2008,6 +2166,21 @@ class ɵEntitySchemaQuery extends ɵBaseFilterableQuery {
2008
2166
  this._internalAddColumn(columnAlias, column);
2009
2167
  return column;
2010
2168
  }
2169
+ /**
2170
+ * @internal
2171
+ */
2172
+ _getUsedColumns() {
2173
+ const usedColumns = [];
2174
+ this._columns.forEach((column) => {
2175
+ usedColumns.push(...column._getUsedColumns());
2176
+ });
2177
+ usedColumns.forEach((usedColumn) => {
2178
+ if (!usedColumn.schemaName) {
2179
+ usedColumn.schemaName = this.rootSchemaName;
2180
+ }
2181
+ });
2182
+ return [...usedColumns, ...super._getUsedColumns()];
2183
+ }
2011
2184
  }
2012
2185
 
2013
2186
  /**
@@ -2107,9 +2280,32 @@ var ɵModelParameterType;
2107
2280
  ɵModelParameterType["Never"] = "never";
2108
2281
  })(ɵModelParameterType || (ɵModelParameterType = {}));
2109
2282
 
2283
+ /**
2284
+ * @public
2285
+ * @description Actions of mask request.
2286
+ */
2287
+ var ɵSchemaViewMaskRequestAction;
2288
+ (function (ɵSchemaViewMaskRequestAction) {
2289
+ ɵSchemaViewMaskRequestAction["AddTask"] = "addTask";
2290
+ ɵSchemaViewMaskRequestAction["RemoveTask"] = "removeTask";
2291
+ })(ɵSchemaViewMaskRequestAction || (ɵSchemaViewMaskRequestAction = {}));
2292
+ /**
2293
+ * @public
2294
+ * @description Request to show mask.
2295
+ */
2296
+ class ɵSchemaViewMaskRequest extends ɵBaseRequest {
2297
+ constructor(action, taskName, $context) {
2298
+ super();
2299
+ this.action = action;
2300
+ this.taskName = taskName;
2301
+ this.$context = $context;
2302
+ this.type = 'crt.SchemaViewMaskRequest';
2303
+ }
2304
+ }
2305
+
2110
2306
  /**
2111
2307
  * Generated bundle index. Do not edit.
2112
2308
  */
2113
2309
 
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 };
2310
+ 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, ɵSchemaViewMaskRequest, ɵSchemaViewMaskRequestAction, ɵSelectLocalizationQuery, ɵSingleFilter, ɵSubQueryColumn, ɵSubQueryExpression, ɵUpdateQuery, ɵValidationUtilities, ɵWindowFunctionColumn, ɵWindowFunctionExpression, ɵencodeDate, ɵgenerateGuid, ɵgetColumnPlainObj, ɵgetFilterPlainObj, ɵisEmptyGuid, ɵisGuid, ɵparserMock, ɵtoLocalISOString };
2115
2311
  //# sourceMappingURL=creatio-base.mjs.map