@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";
|
|
@@ -448,6 +468,12 @@ class ɵArithmeticExpression extends ɵBaseExpression {
|
|
|
448
468
|
clone() {
|
|
449
469
|
return new ɵArithmeticExpression(this);
|
|
450
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
_getUsedColumns() {
|
|
475
|
+
return [...this.leftArithmeticOperand._getUsedColumns(), ...this.rightArithmeticOperand._getUsedColumns()];
|
|
476
|
+
}
|
|
451
477
|
}
|
|
452
478
|
/**
|
|
453
479
|
* @internal
|
|
@@ -479,6 +505,16 @@ class ɵColumnExpression extends ɵBaseExpression {
|
|
|
479
505
|
clone() {
|
|
480
506
|
return new ɵColumnExpression(this);
|
|
481
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* @internal
|
|
510
|
+
*/
|
|
511
|
+
_getUsedColumns() {
|
|
512
|
+
return [
|
|
513
|
+
{
|
|
514
|
+
path: this.columnPath,
|
|
515
|
+
},
|
|
516
|
+
];
|
|
517
|
+
}
|
|
482
518
|
}
|
|
483
519
|
/**
|
|
484
520
|
* @internal
|
|
@@ -534,6 +570,12 @@ class ɵArgumentFunctionExpression extends ɵFunctionExpression {
|
|
|
534
570
|
}
|
|
535
571
|
return result;
|
|
536
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
_getUsedColumns() {
|
|
577
|
+
return this.functionArgument?._getUsedColumns() ?? [];
|
|
578
|
+
}
|
|
537
579
|
}
|
|
538
580
|
/**
|
|
539
581
|
* @internal
|
|
@@ -654,18 +696,27 @@ class ɵMacrosFunctionExpression extends ɵFunctionExpression {
|
|
|
654
696
|
super(config);
|
|
655
697
|
this.functionType = ɵFunctionType.Macros;
|
|
656
698
|
this.macrosType = config?.macrosType;
|
|
699
|
+
this.functionArgument = config?.functionArgument;
|
|
657
700
|
}
|
|
658
701
|
/**
|
|
659
702
|
* Parses expression from json.
|
|
660
703
|
* @public
|
|
661
704
|
*/
|
|
662
|
-
static fromJson(dto) {
|
|
663
|
-
const
|
|
664
|
-
|
|
705
|
+
static fromJson(dto, filterParser, expressionParser) {
|
|
706
|
+
const functionArgument = filterParser && expressionParser && dto['functionArgument']
|
|
707
|
+
? expressionParser.fromJson(dto['functionArgument'], filterParser)
|
|
708
|
+
: undefined;
|
|
709
|
+
return new ɵMacrosFunctionExpression({ functionArgument, macrosType: dto['macrosType'] });
|
|
665
710
|
}
|
|
666
711
|
clone() {
|
|
667
712
|
return new ɵMacrosFunctionExpression(this);
|
|
668
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* @internal
|
|
716
|
+
*/
|
|
717
|
+
_getUsedColumns() {
|
|
718
|
+
return this.functionArgument?._getUsedColumns() ?? [];
|
|
719
|
+
}
|
|
669
720
|
}
|
|
670
721
|
/**
|
|
671
722
|
* @internal
|
|
@@ -782,6 +833,12 @@ class ɵParameterExpression extends ɵBaseExpression {
|
|
|
782
833
|
clone() {
|
|
783
834
|
return new ɵParameterExpression(this);
|
|
784
835
|
}
|
|
836
|
+
/**
|
|
837
|
+
* @internal
|
|
838
|
+
*/
|
|
839
|
+
_getUsedColumns() {
|
|
840
|
+
return [];
|
|
841
|
+
}
|
|
785
842
|
}
|
|
786
843
|
/**
|
|
787
844
|
* @internal
|
|
@@ -797,165 +854,6 @@ __decorate([
|
|
|
797
854
|
__metadata("design:type", Number)
|
|
798
855
|
], ɵParameterExpression.prototype, "dataValueType", void 0);
|
|
799
856
|
|
|
800
|
-
class ɵSubQueryExpression extends ɵBaseExpression {
|
|
801
|
-
/**
|
|
802
|
-
* @internal
|
|
803
|
-
* @dontChange
|
|
804
|
-
*/
|
|
805
|
-
static get _instanceOfKeys() {
|
|
806
|
-
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
807
|
-
}
|
|
808
|
-
constructor(config) {
|
|
809
|
-
super(config);
|
|
810
|
-
this.expressionType = ɵExpressionType.SubQuery;
|
|
811
|
-
this.columnPath = config?.columnPath;
|
|
812
|
-
const subFilter = config?.subFilters;
|
|
813
|
-
this.subFilters = typeof subFilter?.clone === 'function' ? subFilter.clone() : subFilter;
|
|
814
|
-
this.subOrderDirection = config.subOrderDirection;
|
|
815
|
-
this.subOrderColumn = config.subOrderColumn;
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Parses expression from json.
|
|
819
|
-
* @public
|
|
820
|
-
*/
|
|
821
|
-
static fromJson(dto, filterParser) {
|
|
822
|
-
const expression = new ɵSubQueryExpression({
|
|
823
|
-
columnPath: dto['columnPath'],
|
|
824
|
-
subFilters: filterParser.fromJson(dto['subFilters']),
|
|
825
|
-
subOrderDirection: dto['subOrderDirection'],
|
|
826
|
-
subOrderColumn: dto['subOrderColumn'],
|
|
827
|
-
});
|
|
828
|
-
return expression;
|
|
829
|
-
}
|
|
830
|
-
clone() {
|
|
831
|
-
return new ɵSubQueryExpression(this);
|
|
832
|
-
}
|
|
833
|
-
toJson() {
|
|
834
|
-
const result = super.toJson();
|
|
835
|
-
if (this.subFilters) {
|
|
836
|
-
result['subFilters'] = this.serializeItem(this.subFilters);
|
|
837
|
-
}
|
|
838
|
-
return result;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* @internal
|
|
843
|
-
* @dontChange
|
|
844
|
-
*/
|
|
845
|
-
ɵSubQueryExpression._instanceOfKey = 'devkit_SubQueryExpression';
|
|
846
|
-
|
|
847
|
-
class ɵAggregationSubQueryExpression extends ɵSubQueryExpression {
|
|
848
|
-
/**
|
|
849
|
-
* @internal
|
|
850
|
-
* @dontChange
|
|
851
|
-
*/
|
|
852
|
-
static get _instanceOfKeys() {
|
|
853
|
-
return [...ɵSubQueryExpression._instanceOfKeys, this._instanceOfKey];
|
|
854
|
-
}
|
|
855
|
-
constructor(config) {
|
|
856
|
-
super(config);
|
|
857
|
-
this.aggregationType = config?.aggregationType;
|
|
858
|
-
this.functionType = config?.functionType;
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* Parses expression from json.
|
|
862
|
-
* @public
|
|
863
|
-
*/
|
|
864
|
-
static fromJson(dto, filterParser) {
|
|
865
|
-
const subQueryExpression = super.fromJson(dto, filterParser);
|
|
866
|
-
const expression = new ɵAggregationSubQueryExpression({
|
|
867
|
-
aggregationType: dto['aggregationType'],
|
|
868
|
-
functionType: dto['functionType'],
|
|
869
|
-
...subQueryExpression,
|
|
870
|
-
});
|
|
871
|
-
return expression;
|
|
872
|
-
}
|
|
873
|
-
clone() {
|
|
874
|
-
return new ɵAggregationSubQueryExpression(this);
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* @internal
|
|
879
|
-
* @dontChange
|
|
880
|
-
*/
|
|
881
|
-
ɵAggregationSubQueryExpression._instanceOfKey = 'devkit_AggregationSubQueryExpression';
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* Function expression resolver.
|
|
885
|
-
* @public
|
|
886
|
-
*/
|
|
887
|
-
class FunctionExpressionResolver {
|
|
888
|
-
static resolve(dto) {
|
|
889
|
-
const expressionClass = {
|
|
890
|
-
[ɵFunctionType.Macros]: ɵMacrosFunctionExpression,
|
|
891
|
-
[ɵFunctionType.Length]: ɵLengthFunctionExpression,
|
|
892
|
-
[ɵFunctionType.Window]: ɵWindowFunctionExpression,
|
|
893
|
-
[ɵFunctionType.DatePart]: ɵDatePartFunctionExpression,
|
|
894
|
-
[ɵFunctionType.DateAdd]: ɵDatePartFunctionExpression,
|
|
895
|
-
[ɵFunctionType.DateDiff]: ɵDatePartFunctionExpression,
|
|
896
|
-
};
|
|
897
|
-
return expressionClass[dto['functionType']];
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
/**
|
|
901
|
-
* Expression resolver.
|
|
902
|
-
* @public
|
|
903
|
-
*/
|
|
904
|
-
class ɵExpressionResolver {
|
|
905
|
-
static resolve(expressionType, dto) {
|
|
906
|
-
const expressionClass = {
|
|
907
|
-
[ɵExpressionType.SchemaColumn]: ɵColumnExpression,
|
|
908
|
-
[ɵExpressionType.Parameter]: ɵParameterExpression,
|
|
909
|
-
[ɵExpressionType.SubQuery]: ɵAggregationSubQueryExpression,
|
|
910
|
-
[ɵExpressionType.ArithmeticOperation]: ɵArithmeticExpression,
|
|
911
|
-
[ɵExpressionType.Function]: FunctionExpressionResolver.resolve(dto),
|
|
912
|
-
};
|
|
913
|
-
return expressionClass[expressionType];
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* Expression parser.
|
|
919
|
-
* @public
|
|
920
|
-
*/
|
|
921
|
-
class ɵExpressionParser extends ɵBaseExpressionParser {
|
|
922
|
-
/**
|
|
923
|
-
* Parses expression from json.
|
|
924
|
-
* @public
|
|
925
|
-
*/
|
|
926
|
-
static fromJson(dto, filterParser) {
|
|
927
|
-
const expressionType = dto['expressionType'];
|
|
928
|
-
return ɵExpressionResolver.resolve(expressionType, dto).fromJson(dto, filterParser, ɵExpressionParser);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
const ɵEXPRESSION_TYPE_MOCK = -1;
|
|
933
|
-
class ɵExpressionMock extends ɵBaseExpression {
|
|
934
|
-
/**
|
|
935
|
-
* @internal
|
|
936
|
-
* @dontChange
|
|
937
|
-
*/
|
|
938
|
-
static get _instanceOfKeys() {
|
|
939
|
-
return [...ɵBaseExpression._instanceOfKeys, this._instanceOfKey];
|
|
940
|
-
}
|
|
941
|
-
constructor(config) {
|
|
942
|
-
super(config || {});
|
|
943
|
-
this.expressionType = ɵEXPRESSION_TYPE_MOCK;
|
|
944
|
-
}
|
|
945
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
946
|
-
get plainObject() {
|
|
947
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
948
|
-
}
|
|
949
|
-
clone() {
|
|
950
|
-
return new ɵExpressionMock(this);
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* @internal
|
|
955
|
-
* @dontChange
|
|
956
|
-
*/
|
|
957
|
-
ɵExpressionMock._instanceOfKey = 'devkit_ExpressionMock';
|
|
958
|
-
|
|
959
857
|
class ɵBaseFilter {
|
|
960
858
|
/**
|
|
961
859
|
* @internal
|
|
@@ -1005,7 +903,7 @@ class ɵBaseFilter {
|
|
|
1005
903
|
*/
|
|
1006
904
|
ɵBaseFilter._instanceOfKey = 'devkit_BaseFilter';
|
|
1007
905
|
|
|
1008
|
-
class
|
|
906
|
+
class ɵSingleFilter extends ɵBaseFilter {
|
|
1009
907
|
/**
|
|
1010
908
|
* @internal
|
|
1011
909
|
* @dontChange
|
|
@@ -1013,56 +911,80 @@ class ɵFilterMock extends ɵBaseFilter {
|
|
|
1013
911
|
static get _instanceOfKeys() {
|
|
1014
912
|
return [...ɵBaseFilter._instanceOfKeys, this._instanceOfKey];
|
|
1015
913
|
}
|
|
1016
|
-
constructor(filterType
|
|
914
|
+
constructor(filterType, comparisonType, leftExpression) {
|
|
1017
915
|
super(filterType);
|
|
916
|
+
this.comparisonType = comparisonType;
|
|
917
|
+
this.leftExpression = leftExpression.clone();
|
|
1018
918
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
919
|
+
toJson() {
|
|
920
|
+
return {
|
|
921
|
+
...super.toJson(),
|
|
922
|
+
leftExpression: this.serializeItem(this.leftExpression),
|
|
923
|
+
};
|
|
1022
924
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
925
|
+
/**
|
|
926
|
+
* @internal
|
|
927
|
+
*/
|
|
928
|
+
_getUsedColumns() {
|
|
929
|
+
return this.leftExpression._getUsedColumns();
|
|
1025
930
|
}
|
|
1026
931
|
}
|
|
1027
932
|
/**
|
|
1028
933
|
* @internal
|
|
1029
934
|
* @dontChange
|
|
1030
935
|
*/
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
const ɵparserMock = {
|
|
1034
|
-
fromJson: (data) => ({
|
|
1035
|
-
...data,
|
|
1036
|
-
clone: () => data,
|
|
1037
|
-
}),
|
|
1038
|
-
clone: () => this,
|
|
1039
|
-
};
|
|
936
|
+
ɵSingleFilter._instanceOfKey = 'devkit_SingleFilter';
|
|
1040
937
|
|
|
1041
|
-
class
|
|
938
|
+
class ɵBetweenFilter extends ɵSingleFilter {
|
|
1042
939
|
/**
|
|
1043
940
|
* @internal
|
|
1044
941
|
* @dontChange
|
|
1045
942
|
*/
|
|
1046
943
|
static get _instanceOfKeys() {
|
|
1047
|
-
return [...ɵ
|
|
944
|
+
return [...ɵSingleFilter._instanceOfKeys, this._instanceOfKey];
|
|
1048
945
|
}
|
|
1049
|
-
constructor(
|
|
1050
|
-
super(
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
946
|
+
constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
|
|
947
|
+
super(ɵFilterType.Between, ɵComparisonType.Between, leftExpression);
|
|
948
|
+
this.rightLessExpression = rightLessExpression.clone();
|
|
949
|
+
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Parses filter from json.
|
|
953
|
+
* @public
|
|
954
|
+
*/
|
|
955
|
+
static fromJson(dto, filterParser, expressionParser) {
|
|
956
|
+
const filter = new ɵBetweenFilter(expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightLessExpression'], filterParser), expressionParser.fromJson(dto['rightGreaterExpression'], filterParser));
|
|
957
|
+
return filter;
|
|
958
|
+
}
|
|
959
|
+
clone() {
|
|
960
|
+
const filter = new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
961
|
+
filter.isEnabled = this.isEnabled;
|
|
962
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
963
|
+
return filter;
|
|
1053
964
|
}
|
|
1054
965
|
toJson() {
|
|
1055
966
|
return {
|
|
1056
967
|
...super.toJson(),
|
|
1057
|
-
|
|
968
|
+
rightLessExpression: this.serializeItem(this.rightLessExpression),
|
|
969
|
+
rightGreaterExpression: this.serializeItem(this.rightGreaterExpression),
|
|
1058
970
|
};
|
|
1059
971
|
}
|
|
972
|
+
/**
|
|
973
|
+
* @internal
|
|
974
|
+
*/
|
|
975
|
+
_getUsedColumns() {
|
|
976
|
+
return [
|
|
977
|
+
...super._getUsedColumns(),
|
|
978
|
+
...this.rightLessExpression._getUsedColumns(),
|
|
979
|
+
...this.rightGreaterExpression._getUsedColumns(),
|
|
980
|
+
];
|
|
981
|
+
}
|
|
1060
982
|
}
|
|
1061
983
|
/**
|
|
1062
984
|
* @internal
|
|
1063
985
|
* @dontChange
|
|
1064
986
|
*/
|
|
1065
|
-
|
|
987
|
+
ɵBetweenFilter._instanceOfKey = 'devkit_BetweenFilter';
|
|
1066
988
|
|
|
1067
989
|
class ɵCompareFilter extends ɵSingleFilter {
|
|
1068
990
|
/**
|
|
@@ -1085,7 +1007,10 @@ class ɵCompareFilter extends ɵSingleFilter {
|
|
|
1085
1007
|
return filter;
|
|
1086
1008
|
}
|
|
1087
1009
|
clone() {
|
|
1088
|
-
|
|
1010
|
+
const filter = new ɵCompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
1011
|
+
filter.isEnabled = this.isEnabled;
|
|
1012
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1013
|
+
return filter;
|
|
1089
1014
|
}
|
|
1090
1015
|
toJson() {
|
|
1091
1016
|
return {
|
|
@@ -1093,50 +1018,18 @@ class ɵCompareFilter extends ɵSingleFilter {
|
|
|
1093
1018
|
rightExpression: this.serializeItem(this.rightExpression),
|
|
1094
1019
|
};
|
|
1095
1020
|
}
|
|
1096
|
-
}
|
|
1097
|
-
/**
|
|
1098
|
-
* @internal
|
|
1099
|
-
* @dontChange
|
|
1100
|
-
*/
|
|
1101
|
-
ɵCompareFilter._instanceOfKey = 'devkit_CompareFilter';
|
|
1102
|
-
|
|
1103
|
-
class ɵBetweenFilter extends ɵSingleFilter {
|
|
1104
1021
|
/**
|
|
1105
1022
|
* @internal
|
|
1106
|
-
* @dontChange
|
|
1107
1023
|
*/
|
|
1108
|
-
|
|
1109
|
-
return [
|
|
1110
|
-
}
|
|
1111
|
-
constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
|
|
1112
|
-
super(ɵFilterType.Between, ɵComparisonType.Between, leftExpression);
|
|
1113
|
-
this.rightLessExpression = rightLessExpression.clone();
|
|
1114
|
-
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
1115
|
-
}
|
|
1116
|
-
/**
|
|
1117
|
-
* Parses filter from json.
|
|
1118
|
-
* @public
|
|
1119
|
-
*/
|
|
1120
|
-
static fromJson(dto, filterParser, expressionParser) {
|
|
1121
|
-
const filter = new ɵBetweenFilter(expressionParser.fromJson(dto['leftExpression'], filterParser), expressionParser.fromJson(dto['rightLessExpression'], filterParser), expressionParser.fromJson(dto['rightGreaterExpression'], filterParser));
|
|
1122
|
-
return filter;
|
|
1123
|
-
}
|
|
1124
|
-
clone() {
|
|
1125
|
-
return new ɵBetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
1126
|
-
}
|
|
1127
|
-
toJson() {
|
|
1128
|
-
return {
|
|
1129
|
-
...super.toJson(),
|
|
1130
|
-
rightLessExpression: this.serializeItem(this.rightLessExpression),
|
|
1131
|
-
rightGreaterExpression: this.serializeItem(this.rightGreaterExpression),
|
|
1132
|
-
};
|
|
1024
|
+
_getUsedColumns() {
|
|
1025
|
+
return [...super._getUsedColumns(), ...this.rightExpression._getUsedColumns()];
|
|
1133
1026
|
}
|
|
1134
1027
|
}
|
|
1135
1028
|
/**
|
|
1136
1029
|
* @internal
|
|
1137
1030
|
* @dontChange
|
|
1138
1031
|
*/
|
|
1139
|
-
|
|
1032
|
+
ɵCompareFilter._instanceOfKey = 'devkit_CompareFilter';
|
|
1140
1033
|
|
|
1141
1034
|
class ɵExistsFilter extends ɵSingleFilter {
|
|
1142
1035
|
/**
|
|
@@ -1161,7 +1054,10 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1161
1054
|
return new ɵExistsFilter(leftExpression, subFilters, dto['comparisonType'], dto['isAggregative']);
|
|
1162
1055
|
}
|
|
1163
1056
|
clone() {
|
|
1164
|
-
|
|
1057
|
+
const filter = new ɵExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
1058
|
+
filter.isEnabled = this.isEnabled;
|
|
1059
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1060
|
+
return filter;
|
|
1165
1061
|
}
|
|
1166
1062
|
toJson() {
|
|
1167
1063
|
const result = super.toJson();
|
|
@@ -1170,6 +1066,12 @@ class ɵExistsFilter extends ɵSingleFilter {
|
|
|
1170
1066
|
}
|
|
1171
1067
|
return result;
|
|
1172
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
* @internal
|
|
1071
|
+
*/
|
|
1072
|
+
_getUsedColumns() {
|
|
1073
|
+
return [...super._getUsedColumns(), ...(this.subFilters?._getUsedColumns() ?? [])];
|
|
1074
|
+
}
|
|
1173
1075
|
}
|
|
1174
1076
|
/**
|
|
1175
1077
|
* @internal
|
|
@@ -1198,7 +1100,10 @@ class ɵInFilter extends ɵSingleFilter {
|
|
|
1198
1100
|
return new ɵInFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser), dtoRightExpressions.map((expression) => expressionParser.fromJson(expression, filterParser)));
|
|
1199
1101
|
}
|
|
1200
1102
|
clone() {
|
|
1201
|
-
|
|
1103
|
+
const filter = new ɵInFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
1104
|
+
filter.isEnabled = this.isEnabled;
|
|
1105
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1106
|
+
return filter;
|
|
1202
1107
|
}
|
|
1203
1108
|
toJson() {
|
|
1204
1109
|
return {
|
|
@@ -1206,6 +1111,15 @@ class ɵInFilter extends ɵSingleFilter {
|
|
|
1206
1111
|
rightExpressions: this.rightExpressions.map((expression) => this.serializeItem(expression)),
|
|
1207
1112
|
};
|
|
1208
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
|
+
}
|
|
1209
1123
|
}
|
|
1210
1124
|
/**
|
|
1211
1125
|
* @internal
|
|
@@ -1235,7 +1149,10 @@ class ɵIsNullFilter extends ɵSingleFilter {
|
|
|
1235
1149
|
return new ɵIsNullFilter(dto['comparisonType'], expressionParser.fromJson(dto['leftExpression'], filterParser));
|
|
1236
1150
|
}
|
|
1237
1151
|
clone() {
|
|
1238
|
-
|
|
1152
|
+
const filter = new ɵIsNullFilter(this.comparisonType, this.leftExpression);
|
|
1153
|
+
filter.isEnabled = this.isEnabled;
|
|
1154
|
+
filter.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1155
|
+
return filter;
|
|
1239
1156
|
}
|
|
1240
1157
|
}
|
|
1241
1158
|
/**
|
|
@@ -1377,10 +1294,11 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1377
1294
|
});
|
|
1378
1295
|
return result;
|
|
1379
1296
|
}
|
|
1380
|
-
constructor(logicalOperation = ɵLogicalOperatorType.And) {
|
|
1297
|
+
constructor(logicalOperation = ɵLogicalOperatorType.And, rootSchemaName) {
|
|
1381
1298
|
super(ɵFilterType.FilterGroup);
|
|
1382
1299
|
this.filters = new Map();
|
|
1383
1300
|
this.logicalOperation = logicalOperation;
|
|
1301
|
+
this.rootSchemaName = rootSchemaName;
|
|
1384
1302
|
}
|
|
1385
1303
|
/**
|
|
1386
1304
|
* Parses filter group from json.
|
|
@@ -1388,12 +1306,33 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1388
1306
|
*/
|
|
1389
1307
|
static fromJson(dto, filterParser) {
|
|
1390
1308
|
const logicalOperation = dto['logicalOperation'];
|
|
1391
|
-
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And);
|
|
1309
|
+
const group = new ɵFilterGroup(logicalOperation || ɵLogicalOperatorType.And, dto['rootSchemaName']);
|
|
1392
1310
|
Object.entries(dto['items']).forEach(([key, filterDTO]) => {
|
|
1393
1311
|
group.add(filterParser.fromJson(filterDTO), key);
|
|
1394
1312
|
});
|
|
1395
1313
|
return group;
|
|
1396
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
|
+
}
|
|
1331
|
+
_createParameterValueExpressions(values) {
|
|
1332
|
+
return values.map((value) => new ɵParameterExpression({
|
|
1333
|
+
value: value,
|
|
1334
|
+
}));
|
|
1335
|
+
}
|
|
1397
1336
|
/**
|
|
1398
1337
|
* Returns filter item by index.
|
|
1399
1338
|
* @param index Item index.
|
|
@@ -1424,12 +1363,21 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1424
1363
|
*/
|
|
1425
1364
|
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues, filterKey) {
|
|
1426
1365
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1427
|
-
const expressions =
|
|
1428
|
-
value: singleParameterValue,
|
|
1429
|
-
}));
|
|
1366
|
+
const expressions = this._createParameterValueExpressions(parameterValues);
|
|
1430
1367
|
const filter = new ɵInFilter(comparisonType, leftExpression, expressions);
|
|
1431
1368
|
this.add(filter, filterKey);
|
|
1432
1369
|
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Creates and adds in filter for primary column.
|
|
1372
|
+
* @param primaryColumnValues Primary column values.
|
|
1373
|
+
* @param filterKey Filter key.
|
|
1374
|
+
*/
|
|
1375
|
+
addPrimarySchemaColumnInFilter(primaryColumnValues, filterKey) {
|
|
1376
|
+
const leftExpression = new ɵMacrosFunctionExpression({ macrosType: ɵQueryMacrosType.PrimaryColumn });
|
|
1377
|
+
const expressions = this._createParameterValueExpressions(primaryColumnValues);
|
|
1378
|
+
const filter = new ɵInFilter(ɵComparisonType.Equal, leftExpression, expressions);
|
|
1379
|
+
this.add(filter, filterKey);
|
|
1380
|
+
}
|
|
1433
1381
|
addSchemaColumnIsNullFilter(columnPath, filterKey) {
|
|
1434
1382
|
const leftExpression = new ɵColumnExpression({ columnPath });
|
|
1435
1383
|
const filter = new ɵIsNullFilter(ɵComparisonType.Is_null, leftExpression);
|
|
@@ -1475,12 +1423,29 @@ class ɵFilterGroup extends ɵBaseFilter {
|
|
|
1475
1423
|
this.filters.set(key, filter);
|
|
1476
1424
|
}
|
|
1477
1425
|
clone() {
|
|
1478
|
-
const filterGroup = new ɵFilterGroup(this.logicalOperation);
|
|
1426
|
+
const filterGroup = new ɵFilterGroup(this.logicalOperation, this.rootSchemaName);
|
|
1479
1427
|
this.filters.forEach((filter, filterKey) => {
|
|
1480
1428
|
filterGroup.filters.set(filterKey, filter.clone());
|
|
1481
1429
|
});
|
|
1430
|
+
filterGroup.isEnabled = this.isEnabled;
|
|
1431
|
+
filterGroup.trimDateTimeParameterToDate = this.trimDateTimeParameterToDate;
|
|
1482
1432
|
return filterGroup;
|
|
1483
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
|
+
}
|
|
1484
1449
|
}
|
|
1485
1450
|
/**
|
|
1486
1451
|
* @internal
|
|
@@ -1497,6 +1462,232 @@ __decorate([
|
|
|
1497
1462
|
__metadata("design:paramtypes", [])
|
|
1498
1463
|
], ɵFilterGroup.prototype, "items", null);
|
|
1499
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
|
+
|
|
1500
1691
|
/**
|
|
1501
1692
|
* Filter parser interface
|
|
1502
1693
|
* @public
|
|
@@ -1532,7 +1723,12 @@ class ɵFilterResolver {
|
|
|
1532
1723
|
class ɵFilterParser extends ɵBaseFilterParser {
|
|
1533
1724
|
static fromJson(dto) {
|
|
1534
1725
|
const filterType = dto['filterType'];
|
|
1535
|
-
|
|
1726
|
+
const isEnabled = dto['isEnabled'];
|
|
1727
|
+
const trimDateTimeParameterToDate = dto['trimDateTimeParameterToDate'];
|
|
1728
|
+
const filter = ɵFilterResolver.resolve(filterType).fromJson(dto, ɵFilterParser, ɵExpressionParser);
|
|
1729
|
+
filter.isEnabled = isEnabled !== false;
|
|
1730
|
+
filter.trimDateTimeParameterToDate = trimDateTimeParameterToDate === true;
|
|
1731
|
+
return filter;
|
|
1536
1732
|
}
|
|
1537
1733
|
}
|
|
1538
1734
|
|
|
@@ -1588,6 +1784,12 @@ class ɵBaseQueryColumn {
|
|
|
1588
1784
|
this.caption = caption;
|
|
1589
1785
|
return this;
|
|
1590
1786
|
}
|
|
1787
|
+
/**
|
|
1788
|
+
* @internal
|
|
1789
|
+
*/
|
|
1790
|
+
_getUsedColumns() {
|
|
1791
|
+
return this.expression._getUsedColumns();
|
|
1792
|
+
}
|
|
1591
1793
|
}
|
|
1592
1794
|
|
|
1593
1795
|
class ɵArithmeticQueryColumn extends ɵBaseQueryColumn {
|
|
@@ -1725,7 +1927,23 @@ class ɵBaseFilterableQuery extends ɵBaseQuery {
|
|
|
1725
1927
|
filters: this.filters.toJson(),
|
|
1726
1928
|
};
|
|
1727
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
|
+
}
|
|
1728
1942
|
}
|
|
1943
|
+
__decorate([
|
|
1944
|
+
Exclude(),
|
|
1945
|
+
__metadata("design:type", Object)
|
|
1946
|
+
], ɵBaseFilterableQuery.prototype, "filters", void 0);
|
|
1729
1947
|
|
|
1730
1948
|
/**
|
|
1731
1949
|
* @public
|
|
@@ -1948,6 +2166,21 @@ class ɵEntitySchemaQuery extends ɵBaseFilterableQuery {
|
|
|
1948
2166
|
this._internalAddColumn(columnAlias, column);
|
|
1949
2167
|
return column;
|
|
1950
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
|
+
}
|
|
1951
2184
|
}
|
|
1952
2185
|
|
|
1953
2186
|
/**
|
|
@@ -2047,9 +2280,32 @@ var ɵModelParameterType;
|
|
|
2047
2280
|
ɵModelParameterType["Never"] = "never";
|
|
2048
2281
|
})(ɵModelParameterType || (ɵModelParameterType = {}));
|
|
2049
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
|
+
|
|
2050
2306
|
/**
|
|
2051
2307
|
* Generated bundle index. Do not edit.
|
|
2052
2308
|
*/
|
|
2053
2309
|
|
|
2054
|
-
export { LookupMode, ɵAggregationEvalType, ɵAggregationFunction, ɵAggregationFunctionColumn, ɵAggregationFunctionExpression, ɵAggregationSubQueryColumn, ɵAggregationSubQueryExpression, ɵAggregationType, ɵArgumentEmptyException, ɵArgumentFunctionExpression, ɵArgumentOutOfRangeException, ɵArithmeticExpression, ɵArithmeticOperation, ɵArithmeticQueryColumn, ɵBaseExpression, ɵBaseExpressionParser, ɵBaseFilter, ɵBaseFilterParser, ɵBaseFilterableQuery, ɵBaseQuery, ɵBaseQueryColumn, ɵBaseRequest, ɵBetweenFilter, ɵColumnExpression, ɵCompareFilter, ɵComparisonType, ɵDEFAULT_COLUMN_PLAIN_OBJ, ɵDEFAULT_FILTER_PLAIN_OBJ, ɵDataSchemaAttributeType, ɵDataSchemaAttributeUsageType, ɵDataSchemaType, ɵDataSourceScope, ɵDataValueType, ɵDatePartFunctionColumn, ɵDatePartFunctionExpression, ɵDatePartType, ɵDefaultValueSource, ɵDeleteQuery, ɵEMPTY_GUID, ɵEXPRESSION_TYPE_MOCK, ɵEntityQueryColumn, ɵEntitySchemaQuery, ɵExistsFilter, ɵExpressionMock, ɵExpressionParser, ɵExpressionResolver, ɵExpressionType, ɵFilterGroup, ɵFilterMock, ɵFilterParser, ɵFilterResolver, ɵFilterType, ɵFunctionExpression, ɵFunctionType, ɵInFilter, ɵInsertQuery, ɵIsNullFilter, ɵItemNotFoundException, ɵLengthFunctionColumn, ɵLengthFunctionExpression, ɵLogicalOperatorType, ɵMacrosFunctionColumn, ɵMacrosFunctionExpression, ɵModelParameterType, ɵNextHandlerAlreadySpecifiedException, ɵOrderDirection, ɵParameterExpression, ɵParameterQueryColumn, ɵQueryMacrosType, ɵQueryOperationType, ɵSelectLocalizationQuery, ɵSingleFilter, ɵSubQueryColumn, ɵSubQueryExpression, ɵUpdateQuery, ɵValidationUtilities, ɵWindowFunctionColumn, ɵWindowFunctionExpression, ɵencodeDate, ɵgenerateGuid, ɵgetColumnPlainObj, ɵgetFilterPlainObj, ɵisEmptyGuid, ɵisGuid, ɵparserMock, ɵtoLocalISOString };
|
|
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 };
|
|
2055
2311
|
//# sourceMappingURL=creatio-base.mjs.map
|