@creatio/base 0.811.1 → 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.
- package/CHANGELOG.md +5 -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/columns/base-query-column.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/expressions/arithmetic/arithmetic-expression.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/expressions/base-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/columns/column-expression.mjs +11 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/argument-function-expression.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +13 -4
- package/esm2020/lib/public/esq/data-model/expressions/mocks/expression.mock.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/expressions/parameters/parameter-expression.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/sub-query-expression.mjs +31 -8
- package/esm2020/lib/public/esq/data-model/filters/base-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +15 -2
- package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +11 -2
- package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +11 -2
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +57 -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 +14 -2
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +5 -2
- package/esm2020/lib/public/esq/data-model/filters/mocks/filter.mock.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/filters/single-filter.mjs +7 -1
- package/esm2020/lib/public/esq/data-model/index.mjs +2 -1
- package/esm2020/lib/public/esq/data-model/queries/base-filterable-query.mjs +19 -1
- package/esm2020/lib/public/esq/data-model/queries/entity-schema-query.mjs +18 -3
- package/esm2020/lib/public/esq/data-model/used-column.mjs +2 -0
- package/esm2020/lib/public/models/index.mjs +4 -1
- package/esm2020/lib/public/models/item-creation-config.mjs +2 -0
- package/esm2020/lib/public/models/model-init-config.mjs +2 -0
- package/esm2020/lib/public/models/request/index.mjs +2 -1
- package/esm2020/lib/public/models/request/request-registration-config.model.mjs +2 -0
- package/esm2020/lib/public/models/view-model-collection.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 +3 -1
- package/esm2020/lib/public/services/mask-service/base-mask.service.mjs +2 -0
- package/esm2020/lib/public/services/mask-service/index.mjs +3 -0
- package/esm2020/lib/public/services/mask-service/schema-view-mask.request.mjs +24 -0
- package/esm2020/lib/public/services/model/data-source-aggregation-config.mjs +1 -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 +479 -216
- package/fesm2015/creatio-base.mjs.map +1 -1
- package/fesm2020/creatio-base.mjs +489 -233
- package/fesm2020/creatio-base.mjs.map +1 -1
- package/index.d.ts +283 -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";
|
|
@@ -449,6 +469,12 @@ class ɵArithmeticExpression extends ɵBaseExpression {
|
|
|
449
469
|
clone() {
|
|
450
470
|
return new ɵArithmeticExpression(this);
|
|
451
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* @internal
|
|
474
|
+
*/
|
|
475
|
+
_getUsedColumns() {
|
|
476
|
+
return [...this.leftArithmeticOperand._getUsedColumns(), ...this.rightArithmeticOperand._getUsedColumns()];
|
|
477
|
+
}
|
|
452
478
|
}
|
|
453
479
|
/**
|
|
454
480
|
* @internal
|
|
@@ -480,6 +506,16 @@ class ɵColumnExpression extends ɵBaseExpression {
|
|
|
480
506
|
clone() {
|
|
481
507
|
return new ɵColumnExpression(this);
|
|
482
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* @internal
|
|
511
|
+
*/
|
|
512
|
+
_getUsedColumns() {
|
|
513
|
+
return [
|
|
514
|
+
{
|
|
515
|
+
path: this.columnPath,
|
|
516
|
+
},
|
|
517
|
+
];
|
|
518
|
+
}
|
|
483
519
|
}
|
|
484
520
|
/**
|
|
485
521
|
* @internal
|
|
@@ -535,6 +571,13 @@ class ɵArgumentFunctionExpression extends ɵFunctionExpression {
|
|
|
535
571
|
}
|
|
536
572
|
return result;
|
|
537
573
|
}
|
|
574
|
+
/**
|
|
575
|
+
* @internal
|
|
576
|
+
*/
|
|
577
|
+
_getUsedColumns() {
|
|
578
|
+
var _a, _b;
|
|
579
|
+
return (_b = (_a = this.functionArgument) === null || _a === void 0 ? void 0 : _a._getUsedColumns()) !== null && _b !== void 0 ? _b : [];
|
|
580
|
+
}
|
|
538
581
|
}
|
|
539
582
|
/**
|
|
540
583
|
* @internal
|
|
@@ -655,18 +698,28 @@ class ɵMacrosFunctionExpression extends ɵFunctionExpression {
|
|
|
655
698
|
super(config);
|
|
656
699
|
this.functionType = ɵFunctionType.Macros;
|
|
657
700
|
this.macrosType = config === null || config === void 0 ? void 0 : config.macrosType;
|
|
701
|
+
this.functionArgument = config === null || config === void 0 ? void 0 : config.functionArgument;
|
|
658
702
|
}
|
|
659
703
|
/**
|
|
660
704
|
* Parses expression from json.
|
|
661
705
|
* @public
|
|
662
706
|
*/
|
|
663
|
-
static fromJson(dto) {
|
|
664
|
-
const
|
|
665
|
-
|
|
707
|
+
static fromJson(dto, filterParser, expressionParser) {
|
|
708
|
+
const functionArgument = filterParser && expressionParser && dto['functionArgument']
|
|
709
|
+
? expressionParser.fromJson(dto['functionArgument'], filterParser)
|
|
710
|
+
: undefined;
|
|
711
|
+
return new ɵMacrosFunctionExpression({ functionArgument, macrosType: dto['macrosType'] });
|
|
666
712
|
}
|
|
667
713
|
clone() {
|
|
668
714
|
return new ɵMacrosFunctionExpression(this);
|
|
669
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* @internal
|
|
718
|
+
*/
|
|
719
|
+
_getUsedColumns() {
|
|
720
|
+
var _a, _b;
|
|
721
|
+
return (_b = (_a = this.functionArgument) === null || _a === void 0 ? void 0 : _a._getUsedColumns()) !== null && _b !== void 0 ? _b : [];
|
|
722
|
+
}
|
|
670
723
|
}
|
|
671
724
|
/**
|
|
672
725
|
* @internal
|
|
@@ -781,6 +834,12 @@ class ɵParameterExpression extends ɵBaseExpression {
|
|
|
781
834
|
clone() {
|
|
782
835
|
return new ɵParameterExpression(this);
|
|
783
836
|
}
|
|
837
|
+
/**
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
_getUsedColumns() {
|
|
841
|
+
return [];
|
|
842
|
+
}
|
|
784
843
|
}
|
|
785
844
|
/**
|
|
786
845
|
* @internal
|
|
@@ -796,161 +855,6 @@ __decorate([
|
|
|
796
855
|
__metadata("design:type", Number)
|
|
797
856
|
], ɵParameterExpression.prototype, "dataValueType", void 0);
|
|
798
857
|
|
|
799
|
-
class ɵSubQueryExpression extends ɵBaseExpression {
|
|
800
|
-
/**
|
|
801
|
-
* @internal
|
|
802
|
-
* @dontChange
|
|
803
|
-
*/
|
|
804
|
-
static get _instanceOfKeys() {
|
|
805
|
-
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
806
|
-
}
|
|
807
|
-
constructor(config) {
|
|
808
|
-
super(config);
|
|
809
|
-
this.expressionType = ɵExpressionType.SubQuery;
|
|
810
|
-
this.columnPath = config === null || config === void 0 ? void 0 : config.columnPath;
|
|
811
|
-
const subFilter = config === null || config === void 0 ? void 0 : config.subFilters;
|
|
812
|
-
this.subFilters = typeof (subFilter === null || subFilter === void 0 ? void 0 : subFilter.clone) === 'function' ? subFilter.clone() : subFilter;
|
|
813
|
-
this.subOrderDirection = config.subOrderDirection;
|
|
814
|
-
this.subOrderColumn = config.subOrderColumn;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* Parses expression from json.
|
|
818
|
-
* @public
|
|
819
|
-
*/
|
|
820
|
-
static fromJson(dto, filterParser) {
|
|
821
|
-
const expression = new ɵSubQueryExpression({
|
|
822
|
-
columnPath: dto['columnPath'],
|
|
823
|
-
subFilters: filterParser.fromJson(dto['subFilters']),
|
|
824
|
-
subOrderDirection: dto['subOrderDirection'],
|
|
825
|
-
subOrderColumn: dto['subOrderColumn'],
|
|
826
|
-
});
|
|
827
|
-
return expression;
|
|
828
|
-
}
|
|
829
|
-
clone() {
|
|
830
|
-
return new ɵSubQueryExpression(this);
|
|
831
|
-
}
|
|
832
|
-
toJson() {
|
|
833
|
-
const result = super.toJson();
|
|
834
|
-
if (this.subFilters) {
|
|
835
|
-
result['subFilters'] = this.serializeItem(this.subFilters);
|
|
836
|
-
}
|
|
837
|
-
return result;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* @internal
|
|
842
|
-
* @dontChange
|
|
843
|
-
*/
|
|
844
|
-
ɵSubQueryExpression._instanceOfKey = 'devkit_SubQueryExpression';
|
|
845
|
-
|
|
846
|
-
class ɵAggregationSubQueryExpression extends ɵSubQueryExpression {
|
|
847
|
-
/**
|
|
848
|
-
* @internal
|
|
849
|
-
* @dontChange
|
|
850
|
-
*/
|
|
851
|
-
static get _instanceOfKeys() {
|
|
852
|
-
return [...ɵSubQueryExpression._instanceOfKeys, this._instanceOfKey];
|
|
853
|
-
}
|
|
854
|
-
constructor(config) {
|
|
855
|
-
super(config);
|
|
856
|
-
this.aggregationType = config === null || config === void 0 ? void 0 : config.aggregationType;
|
|
857
|
-
this.functionType = config === null || config === void 0 ? void 0 : config.functionType;
|
|
858
|
-
}
|
|
859
|
-
/**
|
|
860
|
-
* Parses expression from json.
|
|
861
|
-
* @public
|
|
862
|
-
*/
|
|
863
|
-
static fromJson(dto, filterParser) {
|
|
864
|
-
const subQueryExpression = super.fromJson(dto, filterParser);
|
|
865
|
-
const expression = new ɵAggregationSubQueryExpression(Object.assign({ aggregationType: dto['aggregationType'], functionType: dto['functionType'] }, subQueryExpression));
|
|
866
|
-
return expression;
|
|
867
|
-
}
|
|
868
|
-
clone() {
|
|
869
|
-
return new ɵAggregationSubQueryExpression(this);
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* @internal
|
|
874
|
-
* @dontChange
|
|
875
|
-
*/
|
|
876
|
-
ɵAggregationSubQueryExpression._instanceOfKey = 'devkit_AggregationSubQueryExpression';
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* Function expression resolver.
|
|
880
|
-
* @public
|
|
881
|
-
*/
|
|
882
|
-
class FunctionExpressionResolver {
|
|
883
|
-
static resolve(dto) {
|
|
884
|
-
const expressionClass = {
|
|
885
|
-
[ɵFunctionType.Macros]: ɵMacrosFunctionExpression,
|
|
886
|
-
[ɵFunctionType.Length]: ɵLengthFunctionExpression,
|
|
887
|
-
[ɵFunctionType.Window]: ɵWindowFunctionExpression,
|
|
888
|
-
[ɵFunctionType.DatePart]: ɵDatePartFunctionExpression,
|
|
889
|
-
[ɵFunctionType.DateAdd]: ɵDatePartFunctionExpression,
|
|
890
|
-
[ɵFunctionType.DateDiff]: ɵDatePartFunctionExpression,
|
|
891
|
-
};
|
|
892
|
-
return expressionClass[dto['functionType']];
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* Expression resolver.
|
|
897
|
-
* @public
|
|
898
|
-
*/
|
|
899
|
-
class ɵExpressionResolver {
|
|
900
|
-
static resolve(expressionType, dto) {
|
|
901
|
-
const expressionClass = {
|
|
902
|
-
[ɵExpressionType.SchemaColumn]: ɵColumnExpression,
|
|
903
|
-
[ɵExpressionType.Parameter]: ɵParameterExpression,
|
|
904
|
-
[ɵExpressionType.SubQuery]: ɵAggregationSubQueryExpression,
|
|
905
|
-
[ɵExpressionType.ArithmeticOperation]: ɵArithmeticExpression,
|
|
906
|
-
[ɵExpressionType.Function]: FunctionExpressionResolver.resolve(dto),
|
|
907
|
-
};
|
|
908
|
-
return expressionClass[expressionType];
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/**
|
|
913
|
-
* Expression parser.
|
|
914
|
-
* @public
|
|
915
|
-
*/
|
|
916
|
-
class ɵExpressionParser extends ɵBaseExpressionParser {
|
|
917
|
-
/**
|
|
918
|
-
* Parses expression from json.
|
|
919
|
-
* @public
|
|
920
|
-
*/
|
|
921
|
-
static fromJson(dto, filterParser) {
|
|
922
|
-
const expressionType = dto['expressionType'];
|
|
923
|
-
return ɵExpressionResolver.resolve(expressionType, dto).fromJson(dto, filterParser, ɵExpressionParser);
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
const ɵEXPRESSION_TYPE_MOCK = -1;
|
|
928
|
-
class ɵExpressionMock extends ɵBaseExpression {
|
|
929
|
-
/**
|
|
930
|
-
* @internal
|
|
931
|
-
* @dontChange
|
|
932
|
-
*/
|
|
933
|
-
static get _instanceOfKeys() {
|
|
934
|
-
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
935
|
-
}
|
|
936
|
-
constructor(config) {
|
|
937
|
-
super(config || {});
|
|
938
|
-
this.expressionType = ɵEXPRESSION_TYPE_MOCK;
|
|
939
|
-
}
|
|
940
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
941
|
-
get plainObject() {
|
|
942
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
943
|
-
}
|
|
944
|
-
clone() {
|
|
945
|
-
return new ɵExpressionMock(this);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
/**
|
|
949
|
-
* @internal
|
|
950
|
-
* @dontChange
|
|
951
|
-
*/
|
|
952
|
-
ɵExpressionMock._instanceOfKey = 'devkit_ExpressionMock';
|
|
953
|
-
|
|
954
858
|
class ɵBaseFilter {
|
|
955
859
|
/**
|
|
956
860
|
* @internal
|
|
@@ -1001,36 +905,6 @@ class ɵBaseFilter {
|
|
|
1001
905
|
*/
|
|
1002
906
|
ɵBaseFilter._instanceOfKey = 'devkit_BaseFilter';
|
|
1003
907
|
|
|
1004
|
-
class ɵFilterMock extends ɵBaseFilter {
|
|
1005
|
-
/**
|
|
1006
|
-
* @internal
|
|
1007
|
-
* @dontChange
|
|
1008
|
-
*/
|
|
1009
|
-
static get _instanceOfKeys() {
|
|
1010
|
-
return [...ɵBaseFilter._instanceOfKeys, this._instanceOfKey];
|
|
1011
|
-
}
|
|
1012
|
-
constructor(filterType = ɵFilterType.None) {
|
|
1013
|
-
super(filterType);
|
|
1014
|
-
}
|
|
1015
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
1016
|
-
get plainObject() {
|
|
1017
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
1018
|
-
}
|
|
1019
|
-
clone() {
|
|
1020
|
-
return new ɵFilterMock(this.filterType);
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* @internal
|
|
1025
|
-
* @dontChange
|
|
1026
|
-
*/
|
|
1027
|
-
ɵFilterMock._instanceOfKey = 'devkit_FilterMock';
|
|
1028
|
-
|
|
1029
|
-
const ɵparserMock = {
|
|
1030
|
-
fromJson: (data) => (Object.assign(Object.assign({}, data), { clone: () => data })),
|
|
1031
|
-
clone: () => this,
|
|
1032
|
-
};
|
|
1033
|
-
|
|
1034
908
|
class ɵSingleFilter extends ɵBaseFilter {
|
|
1035
909
|
/**
|
|
1036
910
|
* @internal
|
|
@@ -1047,6 +921,12 @@ class ɵSingleFilter extends ɵBaseFilter {
|
|
|
1047
921
|
toJson() {
|
|
1048
922
|
return Object.assign(Object.assign({}, super.toJson()), { leftExpression: this.serializeItem(this.leftExpression) });
|
|
1049
923
|
}
|
|
924
|
+
/**
|
|
925
|
+
* @internal
|
|
926
|
+
*/
|
|
927
|
+
_getUsedColumns() {
|
|
928
|
+
return this.leftExpression._getUsedColumns();
|
|
929
|
+
}
|
|
1050
930
|
}
|
|
1051
931
|
/**
|
|
1052
932
|
* @internal
|
|
@@ -1054,7 +934,7 @@ class ɵSingleFilter extends ɵBaseFilter {
|
|
|
1054
934
|
*/
|
|
1055
935
|
ɵSingleFilter._instanceOfKey = 'devkit_SingleFilter';
|
|
1056
936
|
|
|
1057
|
-
class
|
|
937
|
+
class ɵBetweenFilter extends ɵSingleFilter {
|
|
1058
938
|
/**
|
|
1059
939
|
* @internal
|
|
1060
940
|
* @dontChange
|
|
@@ -1062,32 +942,46 @@ class ɵCompareFilter extends ɵSingleFilter {
|
|
|
1062
942
|
static get _instanceOfKeys() {
|
|
1063
943
|
return [...ɵSingleFilter._instanceOfKeys, this._instanceOfKey];
|
|
1064
944
|
}
|
|
1065
|
-
constructor(
|
|
1066
|
-
super(ɵFilterType.
|
|
1067
|
-
this.
|
|
945
|
+
constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
|
|
946
|
+
super(ɵFilterType.Between, ɵComparisonType.Between, leftExpression);
|
|
947
|
+
this.rightLessExpression = rightLessExpression.clone();
|
|
948
|
+
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
1068
949
|
}
|
|
1069
950
|
/**
|
|
1070
951
|
* Parses filter from json.
|
|
1071
952
|
* @public
|
|
1072
953
|
*/
|
|
1073
954
|
static fromJson(dto, filterParser, expressionParser) {
|
|
1074
|
-
const filter = new
|
|
955
|
+
const filter = new ɵBetweenFilter(expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightLessExpression'], filterParser), expressionParser.fromJson(dto['rightGreaterExpression'], filterParser));
|
|
1075
956
|
return filter;
|
|
1076
957
|
}
|
|
1077
958
|
clone() {
|
|
1078
|
-
|
|
959
|
+
const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
960
|
+
filter.isEnabled = this.isEnabled;
|
|
961
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
962
|
+
return filter;
|
|
1079
963
|
}
|
|
1080
964
|
toJson() {
|
|
1081
|
-
return Object.assign(Object.assign({}, super.toJson()), {
|
|
965
|
+
return Object.assign(Object.assign({}, super.toJson()), { rightLessExpression: this.serializeItem(this.rightLessExpression), rightGreaterExpression: this.serializeItem(this.rightGreaterExpression) });
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* @internal
|
|
969
|
+
*/
|
|
970
|
+
_getUsedColumns() {
|
|
971
|
+
return [
|
|
972
|
+
...super._getUsedColumns(),
|
|
973
|
+
...this.rightLessExpression._getUsedColumns(),
|
|
974
|
+
...this.rightGreaterExpression._getUsedColumns(),
|
|
975
|
+
];
|
|
1082
976
|
}
|
|
1083
977
|
}
|
|
1084
978
|
/**
|
|
1085
979
|
* @internal
|
|
1086
980
|
* @dontChange
|
|
1087
981
|
*/
|
|
1088
|
-
|
|
982
|
+
ɵBetweenFilter._instanceOfKey = 'devkit_BetweenFilter';
|
|
1089
983
|
|
|
1090
|
-
class
|
|
984
|
+
class ɵCompareFilter extends ɵSingleFilter {
|
|
1091
985
|
/**
|
|
1092
986
|
* @internal
|
|
1093
987
|
* @dontChange
|
|
@@ -1095,31 +989,39 @@ class ɵBetweenFilter extends ɵSingleFilter {
|
|
|
1095
989
|
static get _instanceOfKeys() {
|
|
1096
990
|
return [...ɵSingleFilter._instanceOfKeys, this._instanceOfKey];
|
|
1097
991
|
}
|
|
1098
|
-
constructor(
|
|
1099
|
-
super(ɵFilterType.
|
|
1100
|
-
this.
|
|
1101
|
-
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
992
|
+
constructor(comparisonType, leftExpression, rightExpression) {
|
|
993
|
+
super(ɵFilterType.Compare, comparisonType, leftExpression);
|
|
994
|
+
this.rightExpression = rightExpression.clone();
|
|
1102
995
|
}
|
|
1103
996
|
/**
|
|
1104
997
|
* Parses filter from json.
|
|
1105
998
|
* @public
|
|
1106
999
|
*/
|
|
1107
1000
|
static fromJson(dto, filterParser, expressionParser) {
|
|
1108
|
-
const filter = new
|
|
1001
|
+
const filter = new ɵCompareFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightExpression'], filterParser));
|
|
1109
1002
|
return filter;
|
|
1110
1003
|
}
|
|
1111
1004
|
clone() {
|
|
1112
|
-
|
|
1005
|
+
const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
1006
|
+
filter.isEnabled = this.isEnabled;
|
|
1007
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1008
|
+
return filter;
|
|
1113
1009
|
}
|
|
1114
1010
|
toJson() {
|
|
1115
|
-
return Object.assign(Object.assign({}, super.toJson()), {
|
|
1011
|
+
return Object.assign(Object.assign({}, super.toJson()), { rightExpression: this.serializeItem(this.rightExpression) });
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* @internal
|
|
1015
|
+
*/
|
|
1016
|
+
_getUsedColumns() {
|
|
1017
|
+
return [...super._getUsedColumns(), ...this.rightExpression._getUsedColumns()];
|
|
1116
1018
|
}
|
|
1117
1019
|
}
|
|
1118
1020
|
/**
|
|
1119
1021
|
* @internal
|
|
1120
1022
|
* @dontChange
|
|
1121
1023
|
*/
|
|
1122
|
-
|
|
1024
|
+
ɵCompareFilter._instanceOfKey = 'devkit_CompareFilter';
|
|
1123
1025
|
|
|
1124
1026
|
class ɵExistsFilter extends ɵSingleFilter {
|
|
1125
1027
|
/**
|
|
@@ -1144,7 +1046,10 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1144
1046
|
return new ɵExistsFilter(leftExpression, subFilters, dto['comparisonType'], dto['isAggregative']);
|
|
1145
1047
|
}
|
|
1146
1048
|
clone() {
|
|
1147
|
-
|
|
1049
|
+
const filter = new ɵExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
1050
|
+
filter.isEnabled = this.isEnabled;
|
|
1051
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1052
|
+
return filter;
|
|
1148
1053
|
}
|
|
1149
1054
|
toJson() {
|
|
1150
1055
|
const result = super.toJson();
|
|
@@ -1153,6 +1058,13 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1153
1058
|
}
|
|
1154
1059
|
return result;
|
|
1155
1060
|
}
|
|
1061
|
+
/**
|
|
1062
|
+
* @internal
|
|
1063
|
+
*/
|
|
1064
|
+
_getUsedColumns() {
|
|
1065
|
+
var _a, _b;
|
|
1066
|
+
return [...super._getUsedColumns(), ...((_b = (_a = this.subFilters) === null || _a === void 0 ? void 0 : _a._getUsedColumns()) !== null && _b !== void 0 ? _b : [])];
|
|
1067
|
+
}
|
|
1156
1068
|
}
|
|
1157
1069
|
/**
|
|
1158
1070
|
* @internal
|
|
@@ -1182,11 +1094,23 @@ class ɵInFilter extends ɵSingleFilter {
|
|
|
1182
1094
|
return new ɵInFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), dtoRightExpressions.map((expression) => expressionParser.fromJson(expression, filterParser)));
|
|
1183
1095
|
}
|
|
1184
1096
|
clone() {
|
|
1185
|
-
|
|
1097
|
+
const filter = new ɵInFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
1098
|
+
filter.isEnabled = this.isEnabled;
|
|
1099
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1100
|
+
return filter;
|
|
1186
1101
|
}
|
|
1187
1102
|
toJson() {
|
|
1188
1103
|
return Object.assign(Object.assign({}, super.toJson()), { rightExpressions: this.rightExpressions.map((expression) => this.serializeItem(expression)) });
|
|
1189
1104
|
}
|
|
1105
|
+
/**
|
|
1106
|
+
* @internal
|
|
1107
|
+
*/
|
|
1108
|
+
_getUsedColumns() {
|
|
1109
|
+
const rightExpressionsUsedColumns = this.rightExpressions
|
|
1110
|
+
.map((expression) => expression._getUsedColumns())
|
|
1111
|
+
.flat();
|
|
1112
|
+
return [...super._getUsedColumns(), ...rightExpressionsUsedColumns];
|
|
1113
|
+
}
|
|
1190
1114
|
}
|
|
1191
1115
|
/**
|
|
1192
1116
|
* @internal
|
|
@@ -1216,7 +1140,10 @@ class ɵIsNullFilter extends ɵSingleFilter {
|
|
|
1216
1140
|
return new ɵIsNullFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser));
|
|
1217
1141
|
}
|
|
1218
1142
|
clone() {
|
|
1219
|
-
|
|
1143
|
+
const filter = new ɵIsNullFilter(this.comparisonType, this.leftExpression);
|
|
1144
|
+
filter.isEnabled = this.isEnabled;
|
|
1145
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1146
|
+
return filter;
|
|
1220
1147
|
}
|
|
1221
1148
|
}
|
|
1222
1149
|
/**
|
|
@@ -1358,10 +1285,11 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1358
1285
|
});
|
|
1359
1286
|
return result;
|
|
1360
1287
|
}
|
|
1361
|
-
constructor(logicalOperation = ɵLogicalOperatorType.And) {
|
|
1288
|
+
constructor(logicalOperation = ɵLogicalOperatorType.And, rootSchemaName) {
|
|
1362
1289
|
super(ɵFilterType.FilterGroup);
|
|
1363
1290
|
this.filters = new Map();
|
|
1364
1291
|
this.logicalOperation = logicalOperation;
|
|
1292
|
+
this.rootSchemaName = rootSchemaName;
|
|
1365
1293
|
}
|
|
1366
1294
|
/**
|
|
1367
1295
|
* Parses filter group from json.
|
|
@@ -1369,12 +1297,33 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1369
1297
|
*/
|
|
1370
1298
|
static fromJson(dto, filterParser) {
|
|
1371
1299
|
const logicalOperation = dto['logicalOperation'];
|
|
1372
|
-
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And);
|
|
1300
|
+
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And, dto['rootSchemaName']);
|
|
1373
1301
|
Object.entries(dto['items']).forEach(([key, filterDTO]) => {
|
|
1374
1302
|
group.add(filterParser.fromJson(filterDTO), key);
|
|
1375
1303
|
});
|
|
1376
1304
|
return group;
|
|
1377
1305
|
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Converts instance to json object.
|
|
1308
|
+
* @public
|
|
1309
|
+
*/
|
|
1310
|
+
toJson() {
|
|
1311
|
+
const result = {};
|
|
1312
|
+
result['filterType'] = this.filterType;
|
|
1313
|
+
result['isEnabled'] = this.isEnabled;
|
|
1314
|
+
result['logicalOperation'] = this.logicalOperation;
|
|
1315
|
+
result['trimDateTimeParameterToDate'] = this.trimDateTimeParameterToDate;
|
|
1316
|
+
result['items'] = this.items;
|
|
1317
|
+
if (this.rootSchemaName) {
|
|
1318
|
+
result['rootSchemaName'] = this.rootSchemaName;
|
|
1319
|
+
}
|
|
1320
|
+
return result;
|
|
1321
|
+
}
|
|
1322
|
+
_createParameterValueExpressions(values) {
|
|
1323
|
+
return values.map((value) => new ɵParameterExpression({
|
|
1324
|
+
value: value,
|
|
1325
|
+
}));
|
|
1326
|
+
}
|
|
1378
1327
|
/**
|
|
1379
1328
|
* Returns filter item by index.
|
|
1380
1329
|
* @param index Item index.
|
|
@@ -1405,12 +1354,21 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1405
1354
|
*/
|
|
1406
1355
|
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues, filterKey) {
|
|
1407
1356
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1408
|
-
const expressions =
|
|
1409
|
-
value: singleParameterValue,
|
|
1410
|
-
}));
|
|
1357
|
+
const expressions = this._createParameterValueExpressions(parameterValues);
|
|
1411
1358
|
const filter = new ɵInFilter(comparisonType, leftExpression, expressions);
|
|
1412
1359
|
this.add(filter, filterKey);
|
|
1413
1360
|
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Creates and adds in filter for primary column.
|
|
1363
|
+
* @param primaryColumnValues Primary column values.
|
|
1364
|
+
* @param filterKey Filter key.
|
|
1365
|
+
*/
|
|
1366
|
+
addPrimarySchemaColumnInFilter(primaryColumnValues, filterKey) {
|
|
1367
|
+
const leftExpression = new ɵMacrosFunctionExpression({ macrosType: ɵQueryMacrosType.PrimaryColumn });
|
|
1368
|
+
const expressions = this._createParameterValueExpressions(primaryColumnValues);
|
|
1369
|
+
const filter = new ɵInFilter(ɵComparisonType.Equal, leftExpression, expressions);
|
|
1370
|
+
this.add(filter, filterKey);
|
|
1371
|
+
}
|
|
1414
1372
|
addSchemaColumnIsNullFilter(columnPath, filterKey) {
|
|
1415
1373
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1416
1374
|
const filter = new ɵIsNullFilter(ɵComparisonType.Is_null, leftExpression);
|
|
@@ -1456,12 +1414,32 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1456
1414
|
this.filters.set(key, filter);
|
|
1457
1415
|
}
|
|
1458
1416
|
clone() {
|
|
1459
|
-
const filterGroup = new ɵFilterGroup(this.logicalOperation);
|
|
1417
|
+
const filterGroup = new ɵFilterGroup(this.logicalOperation, this.rootSchemaName);
|
|
1460
1418
|
this.filters.forEach((filter, filterKey) => {
|
|
1461
1419
|
filterGroup.filters.set(filterKey, filter.clone());
|
|
1462
1420
|
});
|
|
1421
|
+
filterGroup.isEnabled = this.isEnabled;
|
|
1422
|
+
filterGroup.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1463
1423
|
return filterGroup;
|
|
1464
1424
|
}
|
|
1425
|
+
/**
|
|
1426
|
+
* @internal
|
|
1427
|
+
*/
|
|
1428
|
+
_getUsedColumns() {
|
|
1429
|
+
const result = [];
|
|
1430
|
+
this.filters.forEach((filter) => {
|
|
1431
|
+
let filterUsedColumns = filter._getUsedColumns ? filter._getUsedColumns() : [];
|
|
1432
|
+
filterUsedColumns = filterUsedColumns.map((usedColumn) => {
|
|
1433
|
+
var _a;
|
|
1434
|
+
return ({
|
|
1435
|
+
path: usedColumn.path,
|
|
1436
|
+
schemaName: (_a = usedColumn.schemaName) !== null && _a !== void 0 ? _a : this.rootSchemaName,
|
|
1437
|
+
});
|
|
1438
|
+
});
|
|
1439
|
+
result.push(...filterUsedColumns);
|
|
1440
|
+
});
|
|
1441
|
+
return result;
|
|
1442
|
+
}
|
|
1465
1443
|
}
|
|
1466
1444
|
/**
|
|
1467
1445
|
* @internal
|
|
@@ -1478,6 +1456,226 @@ __decorate([
|
|
|
1478
1456
|
__metadata("design:paramtypes", [])
|
|
1479
1457
|
], ɵFilterGroup.prototype, "items", null);
|
|
1480
1458
|
|
|
1459
|
+
class ɵSubQueryExpression extends ɵBaseExpression {
|
|
1460
|
+
/**
|
|
1461
|
+
* @internal
|
|
1462
|
+
* @dontChange
|
|
1463
|
+
*/
|
|
1464
|
+
static get _instanceOfKeys() {
|
|
1465
|
+
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
1466
|
+
}
|
|
1467
|
+
constructor(config) {
|
|
1468
|
+
super(config);
|
|
1469
|
+
this.expressionType = ɵExpressionType.SubQuery;
|
|
1470
|
+
this.columnPath = config === null || config === void 0 ? void 0 : config.columnPath;
|
|
1471
|
+
const subFilters = config === null || config === void 0 ? void 0 : config.subFilters;
|
|
1472
|
+
if (typeof (subFilters === null || subFilters === void 0 ? void 0 : subFilters.clone) === 'function') {
|
|
1473
|
+
this.subFilters = subFilters.clone();
|
|
1474
|
+
}
|
|
1475
|
+
else if (subFilters) {
|
|
1476
|
+
this.subFilters = new ɵFilterGroup(subFilters.logicalOperation, subFilters.rootSchemaName);
|
|
1477
|
+
Object.entries(subFilters.items).forEach(([key, filter]) => {
|
|
1478
|
+
this.subFilters.add(filter, key);
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
this.subFilters = subFilters;
|
|
1483
|
+
}
|
|
1484
|
+
this.subOrderDirection = config.subOrderDirection;
|
|
1485
|
+
this.subOrderColumn = config.subOrderColumn;
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Parses expression from json.
|
|
1489
|
+
* @public
|
|
1490
|
+
*/
|
|
1491
|
+
static fromJson(dto, filterParser) {
|
|
1492
|
+
const expression = new ɵSubQueryExpression({
|
|
1493
|
+
columnPath: dto['columnPath'],
|
|
1494
|
+
subFilters: filterParser.fromJson(dto['subFilters']),
|
|
1495
|
+
subOrderDirection: dto['subOrderDirection'],
|
|
1496
|
+
subOrderColumn: dto['subOrderColumn'],
|
|
1497
|
+
});
|
|
1498
|
+
return expression;
|
|
1499
|
+
}
|
|
1500
|
+
clone() {
|
|
1501
|
+
return new ɵSubQueryExpression(this);
|
|
1502
|
+
}
|
|
1503
|
+
toJson() {
|
|
1504
|
+
const result = super.toJson();
|
|
1505
|
+
if (this.subFilters) {
|
|
1506
|
+
result['subFilters'] = this.serializeItem(this.subFilters);
|
|
1507
|
+
}
|
|
1508
|
+
return result;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @internal
|
|
1512
|
+
*/
|
|
1513
|
+
_getUsedColumns() {
|
|
1514
|
+
var _a, _b;
|
|
1515
|
+
return [
|
|
1516
|
+
{
|
|
1517
|
+
path: this.columnPath,
|
|
1518
|
+
},
|
|
1519
|
+
...((_b = (_a = this.subFilters) === null || _a === void 0 ? void 0 : _a._getUsedColumns()) !== null && _b !== void 0 ? _b : []),
|
|
1520
|
+
];
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* @internal
|
|
1525
|
+
* @dontChange
|
|
1526
|
+
*/
|
|
1527
|
+
ɵSubQueryExpression._instanceOfKey = 'devkit_SubQueryExpression';
|
|
1528
|
+
|
|
1529
|
+
class ɵAggregationSubQueryExpression extends ɵSubQueryExpression {
|
|
1530
|
+
/**
|
|
1531
|
+
* @internal
|
|
1532
|
+
* @dontChange
|
|
1533
|
+
*/
|
|
1534
|
+
static get _instanceOfKeys() {
|
|
1535
|
+
return [...ɵSubQueryExpression._instanceOfKeys, this._instanceOfKey];
|
|
1536
|
+
}
|
|
1537
|
+
constructor(config) {
|
|
1538
|
+
super(config);
|
|
1539
|
+
this.aggregationType = config === null || config === void 0 ? void 0 : config.aggregationType;
|
|
1540
|
+
this.functionType = config === null || config === void 0 ? void 0 : config.functionType;
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Parses expression from json.
|
|
1544
|
+
* @public
|
|
1545
|
+
*/
|
|
1546
|
+
static fromJson(dto, filterParser) {
|
|
1547
|
+
const subQueryExpression = super.fromJson(dto, filterParser);
|
|
1548
|
+
const expression = new ɵAggregationSubQueryExpression(Object.assign({ aggregationType: dto['aggregationType'], functionType: dto['functionType'] }, subQueryExpression));
|
|
1549
|
+
return expression;
|
|
1550
|
+
}
|
|
1551
|
+
clone() {
|
|
1552
|
+
return new ɵAggregationSubQueryExpression(this);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* @internal
|
|
1557
|
+
* @dontChange
|
|
1558
|
+
*/
|
|
1559
|
+
ɵAggregationSubQueryExpression._instanceOfKey = 'devkit_AggregationSubQueryExpression';
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Function expression resolver.
|
|
1563
|
+
* @public
|
|
1564
|
+
*/
|
|
1565
|
+
class FunctionExpressionResolver {
|
|
1566
|
+
static resolve(dto) {
|
|
1567
|
+
const expressionClass = {
|
|
1568
|
+
[ɵFunctionType.Macros]: ɵMacrosFunctionExpression,
|
|
1569
|
+
[ɵFunctionType.Length]: ɵLengthFunctionExpression,
|
|
1570
|
+
[ɵFunctionType.Window]: ɵWindowFunctionExpression,
|
|
1571
|
+
[ɵFunctionType.DatePart]: ɵDatePartFunctionExpression,
|
|
1572
|
+
[ɵFunctionType.DateAdd]: ɵDatePartFunctionExpression,
|
|
1573
|
+
[ɵFunctionType.DateDiff]: ɵDatePartFunctionExpression,
|
|
1574
|
+
};
|
|
1575
|
+
return expressionClass[dto['functionType']];
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Expression resolver.
|
|
1580
|
+
* @public
|
|
1581
|
+
*/
|
|
1582
|
+
class ɵExpressionResolver {
|
|
1583
|
+
static resolve(expressionType, dto) {
|
|
1584
|
+
const expressionClass = {
|
|
1585
|
+
[ɵExpressionType.SchemaColumn]: ɵColumnExpression,
|
|
1586
|
+
[ɵExpressionType.Parameter]: ɵParameterExpression,
|
|
1587
|
+
[ɵExpressionType.SubQuery]: ɵAggregationSubQueryExpression,
|
|
1588
|
+
[ɵExpressionType.ArithmeticOperation]: ɵArithmeticExpression,
|
|
1589
|
+
[ɵExpressionType.Function]: FunctionExpressionResolver.resolve(dto),
|
|
1590
|
+
};
|
|
1591
|
+
return expressionClass[expressionType];
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Expression parser.
|
|
1597
|
+
* @public
|
|
1598
|
+
*/
|
|
1599
|
+
class ɵExpressionParser extends ɵBaseExpressionParser {
|
|
1600
|
+
/**
|
|
1601
|
+
* Parses expression from json.
|
|
1602
|
+
* @public
|
|
1603
|
+
*/
|
|
1604
|
+
static fromJson(dto, filterParser) {
|
|
1605
|
+
const expressionType = dto['expressionType'];
|
|
1606
|
+
return ɵExpressionResolver.resolve(expressionType, dto).fromJson(dto, filterParser, ɵExpressionParser);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
const ɵEXPRESSION_TYPE_MOCK = -1;
|
|
1611
|
+
class ɵExpressionMock extends ɵBaseExpression {
|
|
1612
|
+
/**
|
|
1613
|
+
* @internal
|
|
1614
|
+
* @dontChange
|
|
1615
|
+
*/
|
|
1616
|
+
static get _instanceOfKeys() {
|
|
1617
|
+
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
1618
|
+
}
|
|
1619
|
+
constructor(config) {
|
|
1620
|
+
super(config || {});
|
|
1621
|
+
this.expressionType = ɵEXPRESSION_TYPE_MOCK;
|
|
1622
|
+
}
|
|
1623
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
1624
|
+
get plainObject() {
|
|
1625
|
+
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
1626
|
+
}
|
|
1627
|
+
clone() {
|
|
1628
|
+
return new ɵExpressionMock(this);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* @internal
|
|
1632
|
+
*/
|
|
1633
|
+
_getUsedColumns() {
|
|
1634
|
+
return [];
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* @internal
|
|
1639
|
+
* @dontChange
|
|
1640
|
+
*/
|
|
1641
|
+
ɵExpressionMock._instanceOfKey = 'devkit_ExpressionMock';
|
|
1642
|
+
|
|
1643
|
+
class ɵFilterMock extends ɵBaseFilter {
|
|
1644
|
+
/**
|
|
1645
|
+
* @internal
|
|
1646
|
+
* @dontChange
|
|
1647
|
+
*/
|
|
1648
|
+
static get _instanceOfKeys() {
|
|
1649
|
+
return [...ɵBaseFilter._instanceOfKeys, this._instanceOfKey];
|
|
1650
|
+
}
|
|
1651
|
+
constructor(filterType = ɵFilterType.None) {
|
|
1652
|
+
super(filterType);
|
|
1653
|
+
}
|
|
1654
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
1655
|
+
get plainObject() {
|
|
1656
|
+
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
1657
|
+
}
|
|
1658
|
+
clone() {
|
|
1659
|
+
return new ɵFilterMock(this.filterType);
|
|
1660
|
+
}
|
|
1661
|
+
/**
|
|
1662
|
+
* @internal
|
|
1663
|
+
*/
|
|
1664
|
+
_getUsedColumns() {
|
|
1665
|
+
return [];
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* @internal
|
|
1670
|
+
* @dontChange
|
|
1671
|
+
*/
|
|
1672
|
+
ɵFilterMock._instanceOfKey = 'devkit_FilterMock';
|
|
1673
|
+
|
|
1674
|
+
const ɵparserMock = {
|
|
1675
|
+
fromJson: (data) => (Object.assign(Object.assign({}, data), { clone: () => data })),
|
|
1676
|
+
clone: () => this,
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1481
1679
|
/**
|
|
1482
1680
|
* Filter parser interface
|
|
1483
1681
|
* @public
|
|
@@ -1513,7 +1711,12 @@ class ɵFilterResolver {
|
|
|
1513
1711
|
class ɵFilterParser extends ɵBaseFilterParser {
|
|
1514
1712
|
static fromJson(dto) {
|
|
1515
1713
|
const filterType = dto['filterType'];
|
|
1516
|
-
|
|
1714
|
+
const isEnabled = dto['isEnabled'];
|
|
1715
|
+
const trimDateTimeParameterToDate = dto['trimDateTimeParameterToDate'];
|
|
1716
|
+
const filter = ɵFilterResolver.resolve(filterType).fromJson(dto, ɵFilterParser, ɵExpressionParser);
|
|
1717
|
+
filter.isEnabled = isEnabled !== false;
|
|
1718
|
+
filter.trimDateTimeParameterToDate = trimDateTimeParameterToDate === true;
|
|
1719
|
+
return filter;
|
|
1517
1720
|
}
|
|
1518
1721
|
}
|
|
1519
1722
|
|
|
@@ -1567,6 +1770,12 @@ class ɵBaseQueryColumn {
|
|
|
1567
1770
|
this.caption = caption;
|
|
1568
1771
|
return this;
|
|
1569
1772
|
}
|
|
1773
|
+
/**
|
|
1774
|
+
* @internal
|
|
1775
|
+
*/
|
|
1776
|
+
_getUsedColumns() {
|
|
1777
|
+
return this.expression._getUsedColumns();
|
|
1778
|
+
}
|
|
1570
1779
|
}
|
|
1571
1780
|
|
|
1572
1781
|
class ɵArithmeticQueryColumn extends ɵBaseQueryColumn {
|
|
@@ -1699,7 +1908,23 @@ class ɵBaseFilterableQuery extends ɵBaseQuery {
|
|
|
1699
1908
|
getMetadata() {
|
|
1700
1909
|
return Object.assign(Object.assign({}, super.getMetadata()), { filters: this.filters.toJson() });
|
|
1701
1910
|
}
|
|
1911
|
+
/**
|
|
1912
|
+
* @internal
|
|
1913
|
+
*/
|
|
1914
|
+
_getUsedColumns() {
|
|
1915
|
+
const usedColumns = this.filters._getUsedColumns();
|
|
1916
|
+
usedColumns.forEach((usedColumn) => {
|
|
1917
|
+
if (!usedColumn.schemaName) {
|
|
1918
|
+
usedColumn.schemaName = this.rootSchemaName;
|
|
1919
|
+
}
|
|
1920
|
+
});
|
|
1921
|
+
return usedColumns;
|
|
1922
|
+
}
|
|
1702
1923
|
}
|
|
1924
|
+
__decorate([
|
|
1925
|
+
Exclude(),
|
|
1926
|
+
__metadata("design:type", Object)
|
|
1927
|
+
], ɵBaseFilterableQuery.prototype, "filters", void 0);
|
|
1703
1928
|
|
|
1704
1929
|
/**
|
|
1705
1930
|
* @public
|
|
@@ -1906,6 +2131,21 @@ class ɵEntitySchemaQuery extends ɵBaseFilterableQuery {
|
|
|
1906
2131
|
this._internalAddColumn(columnAlias, column);
|
|
1907
2132
|
return column;
|
|
1908
2133
|
}
|
|
2134
|
+
/**
|
|
2135
|
+
* @internal
|
|
2136
|
+
*/
|
|
2137
|
+
_getUsedColumns() {
|
|
2138
|
+
const usedColumns = [];
|
|
2139
|
+
this._columns.forEach((column) => {
|
|
2140
|
+
usedColumns.push(...column._getUsedColumns());
|
|
2141
|
+
});
|
|
2142
|
+
usedColumns.forEach((usedColumn) => {
|
|
2143
|
+
if (!usedColumn.schemaName) {
|
|
2144
|
+
usedColumn.schemaName = this.rootSchemaName;
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
return [...usedColumns, ...super._getUsedColumns()];
|
|
2148
|
+
}
|
|
1909
2149
|
}
|
|
1910
2150
|
|
|
1911
2151
|
/**
|
|
@@ -2003,9 +2243,32 @@ var ɵModelParameterType;
|
|
|
2003
2243
|
ɵModelParameterType["Never"] = "never";
|
|
2004
2244
|
})(ɵModelParameterType || (ɵModelParameterType = {}));
|
|
2005
2245
|
|
|
2246
|
+
/**
|
|
2247
|
+
* @public
|
|
2248
|
+
* @description Actions of mask request.
|
|
2249
|
+
*/
|
|
2250
|
+
var ɵSchemaViewMaskRequestAction;
|
|
2251
|
+
(function (ɵSchemaViewMaskRequestAction) {
|
|
2252
|
+
ɵSchemaViewMaskRequestAction["AddTask"] = "addTask";
|
|
2253
|
+
ɵSchemaViewMaskRequestAction["RemoveTask"] = "removeTask";
|
|
2254
|
+
})(ɵSchemaViewMaskRequestAction || (ɵSchemaViewMaskRequestAction = {}));
|
|
2255
|
+
/**
|
|
2256
|
+
* @public
|
|
2257
|
+
* @description Request to show mask.
|
|
2258
|
+
*/
|
|
2259
|
+
class ɵSchemaViewMaskRequest extends ɵBaseRequest {
|
|
2260
|
+
constructor(action, taskName, $context) {
|
|
2261
|
+
super();
|
|
2262
|
+
this.action = action;
|
|
2263
|
+
this.taskName = taskName;
|
|
2264
|
+
this.$context = $context;
|
|
2265
|
+
this.type = 'crt.SchemaViewMaskRequest';
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2006
2269
|
/**
|
|
2007
2270
|
* Generated bundle index. Do not edit.
|
|
2008
2271
|
*/
|
|
2009
2272
|
|
|
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 };
|
|
2273
|
+
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 };
|
|
2011
2274
|
//# sourceMappingURL=creatio-base.mjs.map
|