@creatio-devkit/common 0.809.0 → 0.8010.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 +2 -0
- package/esm2020/lib/base-exports.mjs +2 -0
- package/esm2020/lib/external/functions/aggregation-adapter.mjs +4 -4
- package/esm2020/lib/external/functions/date-part-type-adapter.mjs +2 -2
- package/esm2020/lib/external/functions/function-type-adapter.mjs +2 -2
- package/esm2020/lib/external/functions/order-direction-adapter.mjs +2 -2
- package/esm2020/lib/external/models/attribute-value-config.mjs +1 -1
- package/esm2020/lib/external/models/date-time/grouped-date-value.mjs +1 -1
- package/esm2020/lib/external/models/file-value.model.mjs +1 -1
- package/esm2020/lib/index.mjs +2 -8
- package/esm2020/lib/internal/decorators/design-time-view-element/design-time-view-element.decorator.mjs +1 -1
- package/esm2020/lib/internal/decorators/request/request.decorator.mjs +1 -1
- package/esm2020/lib/internal/enums/index.mjs +3 -7
- package/esm2020/lib/internal/models/converter/converter-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/design-time-view-element-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/handler-chain-service-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/index.mjs +1 -2
- package/esm2020/lib/internal/models/interface-designer-item/base-interface-designer-item-registration-config.mjs +1 -1
- package/esm2020/lib/internal/models/interface-designer-item/interface-designer-item-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/internal-interface-designer-item-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/request/method-invoke-request.mjs +4 -4
- package/esm2020/lib/internal/models/request-handler/request-handler-factory.mjs +1 -1
- package/esm2020/lib/internal/models/validator/validator-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/view-element/angular-view-element-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/services/base-registry/base-registry.mjs +6 -4
- package/esm2020/lib/internal/services/bootstrap-notifier/bootstrap-notifier.mjs +5 -4
- package/esm2020/lib/internal/services/design-time-view-element-registry/design-time-view-element-registry.mjs +3 -3
- package/esm2020/lib/internal/services/element-registration-checker/element-registration-checker.mjs +8 -1
- package/esm2020/lib/internal/services/global-converters-registry/converter-registry.mjs +3 -3
- package/esm2020/lib/internal/services/handler-chain-services-registry/handler-chain-services-registry.mjs +3 -3
- package/esm2020/lib/internal/services/interface-designer-item-registry/interface-designer-item-registry.mjs +3 -3
- package/esm2020/lib/internal/services/pkg-topology-registry/pkg-topology-registry.mjs +3 -3
- package/esm2020/lib/internal/services/remote-entries-registry/remote-entries-registry.mjs +3 -3
- package/esm2020/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +1 -1
- package/esm2020/lib/internal/services/request-registry/request-registry.service.mjs +1 -1
- package/esm2020/lib/internal/services/validator-registry/validator-registry.mjs +3 -3
- package/esm2020/lib/internal/services/view-element-registry/view-element-registry.mjs +3 -3
- package/esm2020/lib/internal/utils/handlers-order-comparer.mjs +1 -1
- package/esm2020/lib/internal/utils/instantiate.mjs +8 -1
- package/esm2020/lib/internal/utils/localization-utils.mjs +1 -1
- package/esm2020/lib/internal/utils/metadata-utils.mjs +1 -1
- package/esm2020/lib/public/decorators/converter/converter.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/interface-designer-item/interface-designer-item.decorator.mjs +1 -2
- package/esm2020/lib/public/decorators/module/module.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/request-handler/request-handler.decorator.mjs +6 -2
- package/esm2020/lib/public/decorators/validator/validator.decorator.mjs +6 -2
- package/esm2020/lib/public/decorators/view-element/view-element.decorator.mjs +1 -1
- package/esm2020/lib/public/functions/bootstrap-crt-module-handler-chain-services.mjs +1 -1
- package/esm2020/lib/public/functions/bootstrap-crt-module.mjs +27 -7
- package/esm2020/lib/public/functions/register-angular-view-element.mjs +1 -1
- package/esm2020/lib/public/handlers/base-request-handler.mjs +4 -4
- package/esm2020/lib/public/models/converter.model.mjs +1 -1
- package/esm2020/lib/public/models/entity.model.mjs +1 -1
- package/esm2020/lib/public/models/image-value.model.mjs +1 -1
- package/esm2020/lib/public/models/index.mjs +1 -4
- package/esm2020/lib/public/models/interface-designer-item/interface-designer-item-definition.mjs +1 -1
- package/esm2020/lib/public/models/module-definition.mjs +1 -1
- package/esm2020/lib/public/models/request/data-source-request.mjs +4 -4
- package/esm2020/lib/public/models/request/index.mjs +1 -2
- package/esm2020/lib/public/models/request-handler/index.mjs +1 -2
- package/esm2020/lib/public/services/handler-chain/handler-chain.service.mjs +7 -7
- package/esm2020/lib/public/services/handler-chain/internal-handler-chain.mjs +2 -2
- package/esm2020/lib/public/services/http-client/http-client.service.mjs +16 -6
- package/esm2020/lib/public/services/mask-service/mask.service.mjs +1 -1
- package/esm2020/lib/public/services/mask-service/schema-view-mask.request.mjs +2 -2
- package/esm2020/lib/public/services/model/index.mjs +1 -12
- package/esm2020/lib/public/services/model/model.mjs +1 -1
- package/esm2020/lib/public/services/sys-settings/sys-setting.model.mjs +3 -3
- package/esm2020/lib/public/services/sys-values/sys-values.mjs +1 -1
- package/fesm2015/creatio-devkit-common.mjs +161 -1443
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +161 -1459
- package/fesm2020/creatio-devkit-common.mjs.map +1 -1
- package/index.d.ts +340 -943
- package/package.json +6 -6
- package/esm2020/lib/external/utils/date-utils.mjs +0 -29
- package/esm2020/lib/external/utils/index.mjs +0 -2
- package/esm2020/lib/internal/enums/data-schema-attribute-type.enum.mjs +0 -21
- package/esm2020/lib/internal/enums/data-schema-type.enum.mjs +0 -10
- package/esm2020/lib/internal/enums/data-source-scope.enum.mjs +0 -9
- package/esm2020/lib/internal/enums/default-value-source.enum.mjs +0 -12
- package/esm2020/lib/internal/esq/data-model/index.mjs +0 -3
- package/esm2020/lib/internal/esq/data-model/metadata-provider/metadata-provider.mjs +0 -2
- package/esm2020/lib/internal/esq/data-model/queries/base-filterable-query.mjs +0 -15
- package/esm2020/lib/internal/esq/data-model/queries/base-query.mjs +0 -20
- package/esm2020/lib/internal/esq/data-model/queries/delete-query.mjs +0 -12
- package/esm2020/lib/internal/esq/data-model/queries/entity-schema-query.mjs +0 -211
- package/esm2020/lib/internal/esq/data-model/queries/index.mjs +0 -9
- package/esm2020/lib/internal/esq/data-model/queries/insert-query.mjs +0 -37
- package/esm2020/lib/internal/esq/data-model/queries/query-operation-type.mjs +0 -15
- package/esm2020/lib/internal/esq/data-model/queries/select-localization-query.mjs +0 -7
- package/esm2020/lib/internal/esq/data-model/queries/update-query.mjs +0 -43
- package/esm2020/lib/internal/esq/index.mjs +0 -2
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-aggregation-config.model.mjs +0 -2
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-function-config.model.mjs +0 -2
- package/esm2020/lib/internal/model/data-schema/data-schema-validator-config.model.mjs +0 -2
- package/esm2020/lib/internal/model/data-schema/index.mjs +0 -4
- package/esm2020/lib/internal/model/data-source-config.mjs +0 -2
- package/esm2020/lib/internal/model/index.mjs +0 -3
- package/esm2020/lib/internal/models/default-value-schema.mjs +0 -2
- package/esm2020/lib/public/enums/aggregation-function.enum.mjs +0 -18
- package/esm2020/lib/public/enums/aggregation-type.enum.mjs +0 -18
- package/esm2020/lib/public/enums/data-value-type.enum.mjs +0 -48
- package/esm2020/lib/public/enums/index.mjs +0 -4
- package/esm2020/lib/public/esq/data-model/columns/arithmetic/arithmetic-query-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/base-query-column.mjs +0 -45
- package/esm2020/lib/public/esq/data-model/columns/entity-column/entity-query-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/functions/aggregation-function-column.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/columns/functions/date-part-function-column.mjs +0 -17
- package/esm2020/lib/public/esq/data-model/columns/functions/length-function-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/functions/macros-function-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/functions/window-function-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/index.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/columns/parameters/parameter-query-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/columns/sub-queries/aggregation-sub-query-column.mjs +0 -15
- package/esm2020/lib/public/esq/data-model/columns/sub-queries/sub-query-column.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/enums/aggregation-eval-type.enum.mjs +0 -10
- package/esm2020/lib/public/esq/data-model/enums/arithmetic-operation.enum.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/enums/comparison-type.enum.mjs +0 -21
- package/esm2020/lib/public/esq/data-model/enums/date-part-type.enum.mjs +0 -20
- package/esm2020/lib/public/esq/data-model/enums/expression-type.enum.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/enums/filter-type.enum.mjs +0 -11
- package/esm2020/lib/public/esq/data-model/enums/function-type.enum.mjs +0 -19
- package/esm2020/lib/public/esq/data-model/enums/index.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/enums/logical-operator-type.enum.mjs +0 -6
- package/esm2020/lib/public/esq/data-model/enums/order-direction.enum.mjs +0 -7
- package/esm2020/lib/public/esq/data-model/enums/query-macros-type.enum.mjs +0 -76
- package/esm2020/lib/public/esq/data-model/expressions/arithmetic/arithmetic-expression.mjs +0 -15
- package/esm2020/lib/public/esq/data-model/expressions/arithmetic/index.mjs +0 -2
- package/esm2020/lib/public/esq/data-model/expressions/base-expression.mjs +0 -7
- package/esm2020/lib/public/esq/data-model/expressions/columns/column-expression.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/expressions/columns/index.mjs +0 -2
- package/esm2020/lib/public/esq/data-model/expressions/functions/aggregation-function-expression.mjs +0 -14
- package/esm2020/lib/public/esq/data-model/expressions/functions/argument-function-expression.mjs +0 -8
- package/esm2020/lib/public/esq/data-model/expressions/functions/date-part-function-expression.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/expressions/functions/function-expression.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/expressions/functions/index.mjs +0 -8
- package/esm2020/lib/public/esq/data-model/expressions/functions/length-function-expression.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/expressions/functions/window-function-expression.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/expressions/index.mjs +0 -8
- package/esm2020/lib/public/esq/data-model/expressions/mocks/expression.mock.mjs +0 -17
- package/esm2020/lib/public/esq/data-model/expressions/mocks/index.mjs +0 -2
- package/esm2020/lib/public/esq/data-model/expressions/parameters/index.mjs +0 -2
- package/esm2020/lib/public/esq/data-model/expressions/parameters/parameter-expression.mjs +0 -87
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/aggregation-sub-query-expression.mjs +0 -11
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/index.mjs +0 -3
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/sub-query-expression.mjs +0 -17
- package/esm2020/lib/public/esq/data-model/filters/base-filter.mjs +0 -8
- package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +0 -13
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +0 -105
- package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +0 -12
- package/esm2020/lib/public/esq/data-model/filters/index.mjs +0 -10
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +0 -21
- package/esm2020/lib/public/esq/data-model/filters/mocks/filter.mock.mjs +0 -16
- package/esm2020/lib/public/esq/data-model/filters/mocks/index.mjs +0 -2
- package/esm2020/lib/public/esq/data-model/filters/single-filter.mjs +0 -9
- package/esm2020/lib/public/esq/data-model/index.mjs +0 -5
- package/esm2020/lib/public/esq/index.mjs +0 -2
- package/esm2020/lib/public/exceptions/argument-empty-exception.mjs +0 -7
- package/esm2020/lib/public/exceptions/argument-out-of-range-exception.mjs +0 -7
- package/esm2020/lib/public/exceptions/index.mjs +0 -6
- package/esm2020/lib/public/exceptions/item-not-found-exception.mjs +0 -7
- package/esm2020/lib/public/exceptions/next-handler-already-specified-exception.mjs +0 -9
- package/esm2020/lib/public/exceptions/validation-utilities.mjs +0 -32
- package/esm2020/lib/public/models/data-source/data-source-insert-result.model.mjs +0 -2
- package/esm2020/lib/public/models/data-source/data-source-save-result.model.mjs +0 -2
- package/esm2020/lib/public/models/data-source/index.mjs +0 -3
- package/esm2020/lib/public/models/lookup-value.model.mjs +0 -2
- package/esm2020/lib/public/models/request/base-request.mjs +0 -9
- package/esm2020/lib/public/models/request-handler/request-handler.mjs +0 -2
- package/esm2020/lib/public/models/view-model-context.mjs +0 -2
- package/esm2020/lib/public/services/model/data-schema-attribute.mjs +0 -2
- package/esm2020/lib/public/services/model/data-schema.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-aggregation-config.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-attribute.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-can-execute-operation.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-function-config.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-paging-config.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-parameter.mjs +0 -12
- package/esm2020/lib/public/services/model/data-source-sorting-config.mjs +0 -2
- package/esm2020/lib/public/services/model/model-load-options.mjs +0 -2
- package/esm2020/lib/public/types/abstract-type.mjs +0 -2
- package/esm2020/lib/public/types/aggregation-eval.type.mjs +0 -2
- package/esm2020/lib/public/types/date-part.type.mjs +0 -2
- package/esm2020/lib/public/types/entity-column-value.mjs +0 -2
- package/esm2020/lib/public/types/function.type.mjs +0 -2
- package/esm2020/lib/public/types/guid.type.mjs +0 -53
- package/esm2020/lib/public/types/index.mjs +0 -13
- package/esm2020/lib/public/types/json-data.type.mjs +0 -2
- package/esm2020/lib/public/types/localizable-string.type.mjs +0 -2
- package/esm2020/lib/public/types/localize-fn.type.mjs +0 -2
- package/esm2020/lib/public/types/resolve-dependency-fn.type.mjs +0 -2
- package/esm2020/lib/public/types/sort-direction.type.mjs +0 -2
- package/esm2020/lib/public/types/type.mjs +0 -2
|
@@ -1,973 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ɵAggregationType, ɵAggregationFunction, ɵAggregationEvalType, ɵDatePartType, ɵFunctionType, ɵOrderDirection, ɵNextHandlerAlreadySpecifiedException, ɵBaseRequest } from '@creatio/base';
|
|
2
|
+
export { ɵAggregationEvalType as AggregationEvalType, ɵAggregationFunction as AggregationFunction, ɵAggregationFunctionColumn as AggregationFunctionColumn, ɵAggregationFunctionExpression as AggregationFunctionExpression, ɵAggregationSubQueryColumn as AggregationSubQueryColumn, ɵAggregationSubQueryExpression as AggregationSubQueryExpression, ɵAggregationType as AggregationType, ɵArgumentEmptyException as ArgumentEmptyException, ɵArgumentFunctionExpression as ArgumentFunctionExpression, ɵArgumentOutOfRangeException as ArgumentOutOfRangeException, ɵArithmeticExpression as ArithmeticExpression, ɵArithmeticOperation as ArithmeticOperation, ɵArithmeticQueryColumn as ArithmeticQueryColumn, ɵBaseExpression as BaseExpression, ɵBaseExpressionParser as BaseExpressionParser, ɵBaseFilter as BaseFilter, ɵBaseFilterParser as BaseFilterParser, ɵBaseFilterableQuery as BaseFilterableQuery, ɵBaseQuery as BaseQuery, ɵBaseQueryColumn as BaseQueryColumn, ɵBaseRequest as BaseRequest, ɵBetweenFilter as BetweenFilter, ɵColumnExpression as ColumnExpression, ɵCompareFilter as CompareFilter, ɵComparisonType as ComparisonType, ɵDEFAULT_COLUMN_PLAIN_OBJ as DEFAULT_COLUMN_PLAIN_OBJ, ɵDEFAULT_FILTER_PLAIN_OBJ as DEFAULT_FILTER_PLAIN_OBJ, ɵDataSchemaAttributeType as DataSchemaAttributeType, ɵDataSchemaAttributeUsageType as DataSchemaAttributeUsageType, ɵDataSchemaType as DataSchemaType, ɵDataSourceScope as DataSourceScope, ɵDataValueType as DataValueType, ɵDatePartFunctionColumn as DatePartFunctionColumn, ɵDatePartFunctionExpression as DatePartFunctionExpression, ɵDatePartType as DatePartType, ɵDefaultValueSource as DefaultValueSource, ɵDeleteQuery as DeleteQuery, ɵEMPTY_GUID as EMPTY_GUID, ɵEntityQueryColumn as EntityQueryColumn, ɵEntitySchemaQuery as EntitySchemaQuery, ɵExistsFilter as ExistsFilter, ɵExpressionMock as ExpressionMock, ɵExpressionParser as ExpressionParser, ɵExpressionResolver as ExpressionResolver, ɵExpressionType as ExpressionType, ɵFilterGroup as FilterGroup, ɵFilterMock as FilterMock, ɵFilterParser as FilterParser, ɵFilterResolver as FilterResolver, ɵFilterType as FilterType, ɵFunctionExpression as FunctionExpression, ɵFunctionType as FunctionType, ɵInFilter as InFilter, ɵInsertQuery as InsertQuery, ɵIsNullFilter as IsNullFilter, ɵItemNotFoundException as ItemNotFoundException, ɵLengthFunctionColumn as LengthFunctionColumn, ɵLengthFunctionExpression as LengthFunctionExpression, ɵLogicalOperatorType as LogicalOperatorType, ɵMacrosFunctionColumn as MacrosFunctionColumn, ɵMacrosFunctionExpression as MacrosFunctionExpression, ɵModelParameterType as ModelParameterType, ɵNextHandlerAlreadySpecifiedException as NextHandlerAlreadySpecifiedException, ɵOrderDirection as OrderDirection, ɵParameterExpression as ParameterExpression, ɵParameterQueryColumn as ParameterQueryColumn, ɵQueryMacrosType as QueryMacrosType, ɵQueryOperationType as QueryOperationType, ɵSelectLocalizationQuery as SelectLocalizationQuery, ɵSingleFilter as SingleFilter, ɵSubQueryColumn as SubQueryColumn, ɵSubQueryExpression as SubQueryExpression, ɵUpdateQuery as UpdateQuery, ɵValidationUtilities as ValidationUtilities, ɵWindowFunctionColumn as WindowFunctionColumn, ɵWindowFunctionExpression as WindowFunctionExpression, ɵencodeDate as encodeDate, ɵgenerateGuid as generateGuid, ɵgetColumnPlainObj as getColumnPlainObj, ɵgetFilterPlainObj as getFilterPlainObj, ɵisEmptyGuid as isEmptyGuid, ɵisGuid as isGuid, ɵparserMock as parserMock, ɵtoLocalISOString as toLocalISOString } from '@creatio/base';
|
|
3
3
|
import { get, set, upperFirst, camelCase, isEqual, cloneDeep } from 'lodash';
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
|
|
6
|
-
var DataValueType;
|
|
7
|
-
(function (DataValueType) {
|
|
8
|
-
DataValueType[DataValueType["Guid"] = 0] = "Guid";
|
|
9
|
-
DataValueType[DataValueType["Text"] = 1] = "Text";
|
|
10
|
-
DataValueType[DataValueType["Integer"] = 4] = "Integer";
|
|
11
|
-
DataValueType[DataValueType["Float"] = 5] = "Float";
|
|
12
|
-
DataValueType[DataValueType["Money"] = 6] = "Money";
|
|
13
|
-
DataValueType[DataValueType["DateTime"] = 7] = "DateTime";
|
|
14
|
-
DataValueType[DataValueType["Date"] = 8] = "Date";
|
|
15
|
-
DataValueType[DataValueType["Time"] = 9] = "Time";
|
|
16
|
-
DataValueType[DataValueType["Lookup"] = 10] = "Lookup";
|
|
17
|
-
DataValueType[DataValueType["Enum"] = 11] = "Enum";
|
|
18
|
-
DataValueType[DataValueType["Boolean"] = 12] = "Boolean";
|
|
19
|
-
DataValueType[DataValueType["Blob"] = 13] = "Blob";
|
|
20
|
-
DataValueType[DataValueType["Image"] = 14] = "Image";
|
|
21
|
-
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
22
|
-
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
23
|
-
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
24
|
-
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
25
|
-
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
26
|
-
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
27
|
-
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
28
|
-
DataValueType[DataValueType["ENTITY_COLUMN_MAPPING_COLLECTION"] = 22] = "ENTITY_COLUMN_MAPPING_COLLECTION";
|
|
29
|
-
DataValueType[DataValueType["HASH_TEXT"] = 23] = "HASH_TEXT";
|
|
30
|
-
DataValueType[DataValueType["SECURE_TEXT"] = 24] = "SECURE_TEXT";
|
|
31
|
-
DataValueType[DataValueType["FILE"] = 25] = "FILE";
|
|
32
|
-
DataValueType[DataValueType["MAPPING"] = 26] = "MAPPING";
|
|
33
|
-
DataValueType[DataValueType["SHORT_TEXT"] = 27] = "SHORT_TEXT";
|
|
34
|
-
DataValueType[DataValueType["MEDIUM_TEXT"] = 28] = "MEDIUM_TEXT";
|
|
35
|
-
DataValueType[DataValueType["MAXSIZE_TEXT"] = 29] = "MAXSIZE_TEXT";
|
|
36
|
-
DataValueType[DataValueType["LONG_TEXT"] = 30] = "LONG_TEXT";
|
|
37
|
-
DataValueType[DataValueType["FLOAT1"] = 31] = "FLOAT1";
|
|
38
|
-
DataValueType[DataValueType["FLOAT2"] = 32] = "FLOAT2";
|
|
39
|
-
DataValueType[DataValueType["FLOAT3"] = 33] = "FLOAT3";
|
|
40
|
-
DataValueType[DataValueType["FLOAT4"] = 34] = "FLOAT4";
|
|
41
|
-
DataValueType[DataValueType["LOCALIZABLE_PARAMETER_VALUES_LIST"] = 35] = "LOCALIZABLE_PARAMETER_VALUES_LIST";
|
|
42
|
-
DataValueType[DataValueType["METADATA_TEXT"] = 36] = "METADATA_TEXT";
|
|
43
|
-
DataValueType[DataValueType["STAGE_INDICATOR"] = 37] = "STAGE_INDICATOR";
|
|
44
|
-
DataValueType[DataValueType["OBJECT_LIST"] = 38] = "OBJECT_LIST";
|
|
45
|
-
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
46
|
-
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
47
|
-
DataValueType[DataValueType["FILE_LOCATOR"] = 41] = "FILE_LOCATOR";
|
|
48
|
-
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
49
|
-
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
50
|
-
DataValueType[DataValueType["WEB_TEXT"] = 44] = "WEB_TEXT";
|
|
51
|
-
DataValueType[DataValueType["EMAIL_TEXT"] = 45] = "EMAIL_TEXT";
|
|
52
|
-
})(DataValueType || (DataValueType = {}));
|
|
53
|
-
|
|
54
|
-
var AggregationType;
|
|
55
|
-
(function (AggregationType) {
|
|
56
|
-
/** Aggregation function type not defined. */
|
|
57
|
-
AggregationType[AggregationType["None"] = 0] = "None";
|
|
58
|
-
/** Aggregation function type not defined. */
|
|
59
|
-
AggregationType[AggregationType["Count"] = 1] = "Count";
|
|
60
|
-
/** Sum of values of all elements. */
|
|
61
|
-
AggregationType[AggregationType["Sum"] = 2] = "Sum";
|
|
62
|
-
/** Average value for all elements. */
|
|
63
|
-
AggregationType[AggregationType["Avg"] = 3] = "Avg";
|
|
64
|
-
/** The minimum value among all elements. */
|
|
65
|
-
AggregationType[AggregationType["Min"] = 4] = "Min";
|
|
66
|
-
/** The maximum value among all elements. */
|
|
67
|
-
AggregationType[AggregationType["Max"] = 5] = "Max";
|
|
68
|
-
/** Top one record from collection. */
|
|
69
|
-
AggregationType[AggregationType["TopOne"] = 6] = "TopOne";
|
|
70
|
-
})(AggregationType || (AggregationType = {}));
|
|
71
|
-
|
|
72
|
-
var AggregationFunction;
|
|
73
|
-
(function (AggregationFunction) {
|
|
74
|
-
/** Aggregation function type not defined. */
|
|
75
|
-
AggregationFunction["None"] = "";
|
|
76
|
-
/** Aggregation function type not defined. */
|
|
77
|
-
AggregationFunction["Count"] = "Count";
|
|
78
|
-
/** Sum of values of all elements. */
|
|
79
|
-
AggregationFunction["Sum"] = "Sum";
|
|
80
|
-
/** Average value for all elements. */
|
|
81
|
-
AggregationFunction["Avg"] = "Avg";
|
|
82
|
-
/** The minimum value among all elements. */
|
|
83
|
-
AggregationFunction["Min"] = "Min";
|
|
84
|
-
/** The maximum value among all elements. */
|
|
85
|
-
AggregationFunction["Max"] = "Max";
|
|
86
|
-
/** Top one record from collection. */
|
|
87
|
-
AggregationFunction["TopOne"] = "TopOne";
|
|
88
|
-
})(AggregationFunction || (AggregationFunction = {}));
|
|
89
|
-
|
|
90
|
-
var LogicalOperatorType;
|
|
91
|
-
(function (LogicalOperatorType) {
|
|
92
|
-
LogicalOperatorType[LogicalOperatorType["And"] = 0] = "And";
|
|
93
|
-
LogicalOperatorType[LogicalOperatorType["Or"] = 1] = "Or";
|
|
94
|
-
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
95
|
-
|
|
96
|
-
var AggregationEvalType;
|
|
97
|
-
(function (AggregationEvalType) {
|
|
98
|
-
/** The scope of the aggregating function is not defined. */
|
|
99
|
-
AggregationEvalType[AggregationEvalType["None"] = 0] = "None";
|
|
100
|
-
/** Applies to all elements. */
|
|
101
|
-
AggregationEvalType[AggregationEvalType["All"] = 1] = "All";
|
|
102
|
-
/** Applies to unique values. */
|
|
103
|
-
AggregationEvalType[AggregationEvalType["Distinct"] = 2] = "Distinct";
|
|
104
|
-
})(AggregationEvalType || (AggregationEvalType = {}));
|
|
105
|
-
|
|
106
|
-
var ArithmeticOperation;
|
|
107
|
-
(function (ArithmeticOperation) {
|
|
108
|
-
/** Addition. */
|
|
109
|
-
ArithmeticOperation[ArithmeticOperation["Addition"] = 0] = "Addition";
|
|
110
|
-
/** Subtraction. */
|
|
111
|
-
ArithmeticOperation[ArithmeticOperation["Subtraction"] = 1] = "Subtraction";
|
|
112
|
-
/** Multiplication. */
|
|
113
|
-
ArithmeticOperation[ArithmeticOperation["Multiplication"] = 2] = "Multiplication";
|
|
114
|
-
/** Division. */
|
|
115
|
-
ArithmeticOperation[ArithmeticOperation["Division"] = 3] = "Division";
|
|
116
|
-
})(ArithmeticOperation || (ArithmeticOperation = {}));
|
|
117
|
-
|
|
118
|
-
var ComparisonType;
|
|
119
|
-
(function (ComparisonType) {
|
|
120
|
-
ComparisonType[ComparisonType["Between"] = 0] = "Between";
|
|
121
|
-
ComparisonType[ComparisonType["Contain"] = 11] = "Contain";
|
|
122
|
-
ComparisonType[ComparisonType["End_with"] = 13] = "End_with";
|
|
123
|
-
ComparisonType[ComparisonType["Equal"] = 3] = "Equal";
|
|
124
|
-
ComparisonType[ComparisonType["Exists"] = 15] = "Exists";
|
|
125
|
-
ComparisonType[ComparisonType["Greater"] = 7] = "Greater";
|
|
126
|
-
ComparisonType[ComparisonType["Greater_or_equal"] = 8] = "Greater_or_equal";
|
|
127
|
-
ComparisonType[ComparisonType["Is_not_null"] = 2] = "Is_not_null";
|
|
128
|
-
ComparisonType[ComparisonType["Is_null"] = 1] = "Is_null";
|
|
129
|
-
ComparisonType[ComparisonType["Less"] = 5] = "Less";
|
|
130
|
-
ComparisonType[ComparisonType["Less_or_equal"] = 6] = "Less_or_equal";
|
|
131
|
-
ComparisonType[ComparisonType["Not_contain"] = 12] = "Not_contain";
|
|
132
|
-
ComparisonType[ComparisonType["Not_end_with"] = 14] = "Not_end_with";
|
|
133
|
-
ComparisonType[ComparisonType["Not_equal"] = 4] = "Not_equal";
|
|
134
|
-
ComparisonType[ComparisonType["Not_exists"] = 16] = "Not_exists";
|
|
135
|
-
ComparisonType[ComparisonType["Not_start_with"] = 10] = "Not_start_with";
|
|
136
|
-
ComparisonType[ComparisonType["Start_with"] = 9] = "Start_with";
|
|
137
|
-
})(ComparisonType || (ComparisonType = {}));
|
|
138
|
-
|
|
139
|
-
var DatePartType;
|
|
140
|
-
(function (DatePartType) {
|
|
141
|
-
/** Empty value. */
|
|
142
|
-
DatePartType[DatePartType["None"] = 0] = "None";
|
|
143
|
-
/** Day. */
|
|
144
|
-
DatePartType[DatePartType["Day"] = 1] = "Day";
|
|
145
|
-
/** Week. */
|
|
146
|
-
DatePartType[DatePartType["Week"] = 2] = "Week";
|
|
147
|
-
/** Month. */
|
|
148
|
-
DatePartType[DatePartType["Month"] = 3] = "Month";
|
|
149
|
-
/** Year. */
|
|
150
|
-
DatePartType[DatePartType["Year"] = 4] = "Year";
|
|
151
|
-
/** Day of the week. */
|
|
152
|
-
DatePartType[DatePartType["WeekDay"] = 5] = "WeekDay";
|
|
153
|
-
/** Hour. */
|
|
154
|
-
DatePartType[DatePartType["Hour"] = 6] = "Hour";
|
|
155
|
-
/** Minute. */
|
|
156
|
-
DatePartType[DatePartType["HourMinute"] = 7] = "HourMinute";
|
|
157
|
-
})(DatePartType || (DatePartType = {}));
|
|
158
|
-
|
|
159
|
-
var ExpressionType;
|
|
160
|
-
(function (ExpressionType) {
|
|
161
|
-
ExpressionType[ExpressionType["SchemaColumn"] = 0] = "SchemaColumn";
|
|
162
|
-
ExpressionType[ExpressionType["Function"] = 1] = "Function";
|
|
163
|
-
ExpressionType[ExpressionType["Parameter"] = 2] = "Parameter";
|
|
164
|
-
ExpressionType[ExpressionType["SubQuery"] = 3] = "SubQuery";
|
|
165
|
-
ExpressionType[ExpressionType["ArithmeticOperation"] = 4] = "ArithmeticOperation";
|
|
166
|
-
})(ExpressionType || (ExpressionType = {}));
|
|
167
|
-
|
|
168
|
-
var FilterType;
|
|
169
|
-
(function (FilterType) {
|
|
170
|
-
FilterType[FilterType["None"] = 0] = "None";
|
|
171
|
-
FilterType[FilterType["Compare"] = 1] = "Compare";
|
|
172
|
-
FilterType[FilterType["IsNull"] = 2] = "IsNull";
|
|
173
|
-
FilterType[FilterType["Between"] = 3] = "Between";
|
|
174
|
-
FilterType[FilterType["In"] = 4] = "In";
|
|
175
|
-
FilterType[FilterType["Exists"] = 5] = "Exists";
|
|
176
|
-
FilterType[FilterType["FilterGroup"] = 6] = "FilterGroup";
|
|
177
|
-
})(FilterType || (FilterType = {}));
|
|
178
|
-
|
|
179
|
-
var FunctionType;
|
|
180
|
-
(function (FunctionType) {
|
|
181
|
-
FunctionType[FunctionType["None"] = 0] = "None";
|
|
182
|
-
/** Substitution by macro. */
|
|
183
|
-
FunctionType[FunctionType["Macros"] = 1] = "Macros";
|
|
184
|
-
/** Aggregating function. */
|
|
185
|
-
FunctionType[FunctionType["Aggregation"] = 2] = "Aggregation";
|
|
186
|
-
/** Date fragment. */
|
|
187
|
-
FunctionType[FunctionType["DatePart"] = 3] = "DatePart";
|
|
188
|
-
/** The size of the value in bytes, used for binary data. */
|
|
189
|
-
FunctionType[FunctionType["Length"] = 4] = "Length";
|
|
190
|
-
/** Window query function */
|
|
191
|
-
FunctionType[FunctionType["Window"] = 5] = "Window";
|
|
192
|
-
/** Date add. */
|
|
193
|
-
FunctionType[FunctionType["DateAdd"] = 6] = "DateAdd";
|
|
194
|
-
/** Date diff. */
|
|
195
|
-
FunctionType[FunctionType["DateDiff"] = 7] = "DateDiff";
|
|
196
|
-
})(FunctionType || (FunctionType = {}));
|
|
197
|
-
|
|
198
|
-
var OrderDirection;
|
|
199
|
-
(function (OrderDirection) {
|
|
200
|
-
OrderDirection[OrderDirection["None"] = 0] = "None";
|
|
201
|
-
OrderDirection[OrderDirection["Asc"] = 1] = "Asc";
|
|
202
|
-
OrderDirection[OrderDirection["Desc"] = 2] = "Desc";
|
|
203
|
-
})(OrderDirection || (OrderDirection = {}));
|
|
204
|
-
|
|
205
|
-
var QueryMacrosType;
|
|
206
|
-
(function (QueryMacrosType) {
|
|
207
|
-
/** Macro type not defined. */
|
|
208
|
-
QueryMacrosType[QueryMacrosType["None"] = 0] = "None";
|
|
209
|
-
/** Current user. */
|
|
210
|
-
QueryMacrosType[QueryMacrosType["CurrentUser"] = 1] = "CurrentUser";
|
|
211
|
-
/** Current user contact. */
|
|
212
|
-
QueryMacrosType[QueryMacrosType["CurrentUserContact"] = 2] = "CurrentUserContact";
|
|
213
|
-
/** Yesterday. */
|
|
214
|
-
QueryMacrosType[QueryMacrosType["Yesterday"] = 3] = "Yesterday";
|
|
215
|
-
/** Today. */
|
|
216
|
-
QueryMacrosType[QueryMacrosType["Today"] = 4] = "Today";
|
|
217
|
-
/** Tomorrow. */
|
|
218
|
-
QueryMacrosType[QueryMacrosType["Tomorrow"] = 5] = "Tomorrow";
|
|
219
|
-
/** Previous week. */
|
|
220
|
-
QueryMacrosType[QueryMacrosType["PreviousWeek"] = 6] = "PreviousWeek";
|
|
221
|
-
/** This week. */
|
|
222
|
-
QueryMacrosType[QueryMacrosType["CurrentWeek"] = 7] = "CurrentWeek";
|
|
223
|
-
/** Next week. */
|
|
224
|
-
QueryMacrosType[QueryMacrosType["NextWeek"] = 8] = "NextWeek";
|
|
225
|
-
/** Previous month. */
|
|
226
|
-
QueryMacrosType[QueryMacrosType["PreviousMonth"] = 9] = "PreviousMonth";
|
|
227
|
-
/** Current month. */
|
|
228
|
-
QueryMacrosType[QueryMacrosType["CurrentMonth"] = 10] = "CurrentMonth";
|
|
229
|
-
/** Next month. */
|
|
230
|
-
QueryMacrosType[QueryMacrosType["NextMonth"] = 11] = "NextMonth";
|
|
231
|
-
/** Previous quarter. */
|
|
232
|
-
QueryMacrosType[QueryMacrosType["PreviousQuarter"] = 12] = "PreviousQuarter";
|
|
233
|
-
/** Current quarter. */
|
|
234
|
-
QueryMacrosType[QueryMacrosType["CurrentQuarter"] = 13] = "CurrentQuarter";
|
|
235
|
-
/** Next quarter. */
|
|
236
|
-
QueryMacrosType[QueryMacrosType["NextQuarter"] = 14] = "NextQuarter";
|
|
237
|
-
/** Previous half of the year. */
|
|
238
|
-
QueryMacrosType[QueryMacrosType["PreviousHalfYear"] = 15] = "PreviousHalfYear";
|
|
239
|
-
/** Current half-year. */
|
|
240
|
-
QueryMacrosType[QueryMacrosType["CurrentHalfYear"] = 16] = "CurrentHalfYear";
|
|
241
|
-
/** Next half-year. */
|
|
242
|
-
QueryMacrosType[QueryMacrosType["NextHalfYear"] = 17] = "NextHalfYear";
|
|
243
|
-
/** Last year. */
|
|
244
|
-
QueryMacrosType[QueryMacrosType["PreviousYear"] = 18] = "PreviousYear";
|
|
245
|
-
/** This year. */
|
|
246
|
-
QueryMacrosType[QueryMacrosType["CurrentYear"] = 19] = "CurrentYear";
|
|
247
|
-
/** Previous hour. */
|
|
248
|
-
QueryMacrosType[QueryMacrosType["PreviousHour"] = 20] = "PreviousHour";
|
|
249
|
-
/** Current hour. */
|
|
250
|
-
QueryMacrosType[QueryMacrosType["CurrentHour"] = 21] = "CurrentHour";
|
|
251
|
-
/** Next hour. */
|
|
252
|
-
QueryMacrosType[QueryMacrosType["NextHour"] = 22] = "NextHour";
|
|
253
|
-
/** Next year. */
|
|
254
|
-
QueryMacrosType[QueryMacrosType["NextYear"] = 23] = "NextYear";
|
|
255
|
-
/** Next N Days. */
|
|
256
|
-
QueryMacrosType[QueryMacrosType["NextNDays"] = 24] = "NextNDays";
|
|
257
|
-
/** Previous N days. */
|
|
258
|
-
QueryMacrosType[QueryMacrosType["PreviousNDays"] = 25] = "PreviousNDays";
|
|
259
|
-
/** Next N hours. */
|
|
260
|
-
QueryMacrosType[QueryMacrosType["NextNHours"] = 26] = "NextNHours";
|
|
261
|
-
/** Previous N hours. */
|
|
262
|
-
QueryMacrosType[QueryMacrosType["PreviousNHours"] = 27] = "PreviousNHours";
|
|
263
|
-
/** Primary column. */
|
|
264
|
-
QueryMacrosType[QueryMacrosType["PrimaryColumn"] = 34] = "PrimaryColumn";
|
|
265
|
-
/** Primary displayed column. */
|
|
266
|
-
QueryMacrosType[QueryMacrosType["PrimaryDisplayColumn"] = 35] = "PrimaryDisplayColumn";
|
|
267
|
-
/** Primary image display column. */
|
|
268
|
-
QueryMacrosType[QueryMacrosType["PrimaryImageColumn"] = 36] = "PrimaryImageColumn";
|
|
269
|
-
/** Anniversary today. */
|
|
270
|
-
QueryMacrosType[QueryMacrosType["DayOfYearToday"] = 37] = "DayOfYearToday";
|
|
271
|
-
/** Anniversary on the date computed as today plus days offset. */
|
|
272
|
-
QueryMacrosType[QueryMacrosType["DayOfYearTodayPlusDaysOffset"] = 38] = "DayOfYearTodayPlusDaysOffset";
|
|
273
|
-
/** Anniversary on the next several days. */
|
|
274
|
-
QueryMacrosType[QueryMacrosType["NextNDaysOfYear"] = 39] = "NextNDaysOfYear";
|
|
275
|
-
/** Anniversary on the previous several days. */
|
|
276
|
-
QueryMacrosType[QueryMacrosType["PreviousNDaysOfYear"] = 40] = "PreviousNDaysOfYear";
|
|
277
|
-
/** Primary color display column. */
|
|
278
|
-
QueryMacrosType[QueryMacrosType["PrimaryColorColumn"] = 41] = "PrimaryColorColumn";
|
|
279
|
-
})(QueryMacrosType || (QueryMacrosType = {}));
|
|
280
|
-
|
|
281
|
-
class BaseExpression {
|
|
282
|
-
constructor(config) {
|
|
283
|
-
this.isBlock = false;
|
|
284
|
-
this.isBlock = config?.isBlock;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
class ArithmeticExpression extends BaseExpression {
|
|
289
|
-
constructor(config) {
|
|
290
|
-
super(config);
|
|
291
|
-
this.expressionType = ExpressionType.ArithmeticOperation;
|
|
292
|
-
this.arithmeticOperation = config?.arithmeticOperation;
|
|
293
|
-
this.leftArithmeticOperand = config?.leftArithmeticOperand.clone();
|
|
294
|
-
this.rightArithmeticOperand = config?.rightArithmeticOperand.clone();
|
|
295
|
-
}
|
|
296
|
-
clone() {
|
|
297
|
-
return new ArithmeticExpression(this);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
class ColumnExpression extends BaseExpression {
|
|
302
|
-
constructor(config) {
|
|
303
|
-
super(config);
|
|
304
|
-
this.expressionType = ExpressionType.SchemaColumn;
|
|
305
|
-
this.columnPath = config?.columnPath;
|
|
306
|
-
}
|
|
307
|
-
clone() {
|
|
308
|
-
return new ColumnExpression(this);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
class FunctionExpression extends BaseExpression {
|
|
313
|
-
constructor(config) {
|
|
314
|
-
super(config);
|
|
315
|
-
this.expressionType = ExpressionType.Function;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
class ArgumentFunctionExpression extends FunctionExpression {
|
|
320
|
-
constructor(config) {
|
|
321
|
-
super(config);
|
|
322
|
-
this.functionArgument = config?.functionArgument.clone();
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
class AggregationFunctionExpression extends ArgumentFunctionExpression {
|
|
327
|
-
constructor(config) {
|
|
328
|
-
super(config);
|
|
329
|
-
this.functionType = FunctionType.Aggregation;
|
|
330
|
-
this.aggregationType = config?.aggregationType;
|
|
331
|
-
this.aggregationEvalType = config?.aggregationEvalType;
|
|
332
|
-
}
|
|
333
|
-
clone() {
|
|
334
|
-
return new AggregationFunctionExpression(this);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
class DatePartFunctionExpression extends ArgumentFunctionExpression {
|
|
339
|
-
constructor(config) {
|
|
340
|
-
super(config);
|
|
341
|
-
this.functionType = FunctionType.DatePart;
|
|
342
|
-
this.datePartType = config?.datePartType;
|
|
343
|
-
}
|
|
344
|
-
clone() {
|
|
345
|
-
return new DatePartFunctionExpression(this);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
class LengthFunctionExpression extends ArgumentFunctionExpression {
|
|
350
|
-
constructor(config) {
|
|
351
|
-
super(config);
|
|
352
|
-
this.functionType = FunctionType.Length;
|
|
353
|
-
}
|
|
354
|
-
clone() {
|
|
355
|
-
return new LengthFunctionExpression(this);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
class MacrosFunctionExpression extends FunctionExpression {
|
|
360
|
-
constructor(config) {
|
|
361
|
-
super(config);
|
|
362
|
-
this.functionType = FunctionType.Macros;
|
|
363
|
-
this.macrosType = config?.macrosType;
|
|
364
|
-
}
|
|
365
|
-
clone() {
|
|
366
|
-
return new MacrosFunctionExpression(this);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
class WindowFunctionExpression extends ArgumentFunctionExpression {
|
|
371
|
-
constructor(config) {
|
|
372
|
-
super(config);
|
|
373
|
-
this.functionType = FunctionType.Window;
|
|
374
|
-
}
|
|
375
|
-
clone() {
|
|
376
|
-
return new WindowFunctionExpression(this);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* @internal
|
|
382
|
-
* Returns a string represent of date in ISO 8601 without time zone specification(doesn't convert it
|
|
383
|
-
* using local timezone).
|
|
384
|
-
*
|
|
385
|
-
* Example:
|
|
386
|
-
*
|
|
387
|
-
* const date = new Date(2018, 01, 20, 15, 10, 30);
|
|
388
|
-
* const result = toLocalISOString(date);
|
|
389
|
-
* //result: '2018-02-20T15:10:30'
|
|
390
|
-
*
|
|
391
|
-
* @param date Date value.
|
|
392
|
-
*/
|
|
393
|
-
function toLocalISOString(date) {
|
|
394
|
-
if (!(date instanceof Date)) {
|
|
395
|
-
throw new TypeError();
|
|
396
|
-
}
|
|
397
|
-
const timeZoneOffset = date.getTimezoneOffset() * 60000;
|
|
398
|
-
return new Date(date.getTime() - timeZoneOffset).toISOString().slice(0, -1);
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* @internal
|
|
402
|
-
* Returns encoded date in string value.
|
|
403
|
-
* @param date Date value.
|
|
404
|
-
*/
|
|
405
|
-
function encodeDate(date) {
|
|
406
|
-
return `"${toLocalISOString(date)}"`;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
class ParameterExpression extends BaseExpression {
|
|
410
|
-
constructor(config) {
|
|
411
|
-
super(config);
|
|
412
|
-
this.expressionType = ExpressionType.Parameter;
|
|
413
|
-
const value = config?.value;
|
|
414
|
-
if (value instanceof Date) {
|
|
415
|
-
const cloneDate = new Date();
|
|
416
|
-
cloneDate.setTime(value.getTime());
|
|
417
|
-
this.value = cloneDate;
|
|
418
|
-
}
|
|
419
|
-
else if (!value) {
|
|
420
|
-
this.value = value;
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
this.value = typeof value === 'object' ? { ...value } : value;
|
|
424
|
-
}
|
|
425
|
-
this.dataValueType = config?.dataValueType ?? DataValueType.Text;
|
|
426
|
-
}
|
|
427
|
-
get parameter() {
|
|
428
|
-
return {
|
|
429
|
-
dataValueType: this.dataValueType,
|
|
430
|
-
...this._getParameterValueMetadata(),
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
_convertStringToBlobArray(str) {
|
|
434
|
-
const out = [];
|
|
435
|
-
let position = 0;
|
|
436
|
-
for (let i = 0; i < str.length; i++) {
|
|
437
|
-
const code = str.charCodeAt(i);
|
|
438
|
-
if (code < 128) {
|
|
439
|
-
out[position++] = String.fromCharCode(code);
|
|
440
|
-
}
|
|
441
|
-
else if (code < 2048) {
|
|
442
|
-
/* eslint-disable no-bitwise */
|
|
443
|
-
out[position++] = String.fromCharCode((code >> 6) | 192);
|
|
444
|
-
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
out[position++] = String.fromCharCode((code >> 12) | 224);
|
|
448
|
-
out[position++] = String.fromCharCode(((code >> 6) & 63) | 128);
|
|
449
|
-
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
450
|
-
/* eslint-enable no-bitwise */
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
return out;
|
|
454
|
-
}
|
|
455
|
-
_getParameterValueMetadata() {
|
|
456
|
-
if (this.dataValueType === DataValueType.Blob) {
|
|
457
|
-
return {
|
|
458
|
-
arrayValue: !this.value ? [] : this._convertStringToBlobArray(this.value),
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
else if (this.value instanceof Date) {
|
|
462
|
-
return {
|
|
463
|
-
value: encodeDate(this.value),
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
return {
|
|
468
|
-
value: this.value,
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
clone() {
|
|
473
|
-
return new ParameterExpression(this);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
__decorate([
|
|
477
|
-
Exclude(),
|
|
478
|
-
__metadata("design:type", Object)
|
|
479
|
-
], ParameterExpression.prototype, "value", void 0);
|
|
480
|
-
__decorate([
|
|
481
|
-
Exclude(),
|
|
482
|
-
__metadata("design:type", Number)
|
|
483
|
-
], ParameterExpression.prototype, "dataValueType", void 0);
|
|
484
|
-
__decorate([
|
|
485
|
-
Expose(),
|
|
486
|
-
__metadata("design:type", Object),
|
|
487
|
-
__metadata("design:paramtypes", [])
|
|
488
|
-
], ParameterExpression.prototype, "parameter", null);
|
|
489
|
-
|
|
490
|
-
class SubQueryExpression extends BaseExpression {
|
|
491
|
-
constructor(config) {
|
|
492
|
-
super(config);
|
|
493
|
-
this.expressionType = ExpressionType.SubQuery;
|
|
494
|
-
this.columnPath = config?.columnPath;
|
|
495
|
-
const subFilter = config?.subFilters;
|
|
496
|
-
this.subFilters = typeof subFilter?.clone === 'function' ? subFilter.clone() : subFilter;
|
|
497
|
-
this.subOrderDirection = config.subOrderDirection;
|
|
498
|
-
this.subOrderColumn = config.subOrderColumn;
|
|
499
|
-
}
|
|
500
|
-
clone() {
|
|
501
|
-
return new SubQueryExpression(this);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
class AggregationSubQueryExpression extends SubQueryExpression {
|
|
506
|
-
constructor(config) {
|
|
507
|
-
super(config);
|
|
508
|
-
this.aggregationType = config?.aggregationType;
|
|
509
|
-
}
|
|
510
|
-
clone() {
|
|
511
|
-
return new AggregationSubQueryExpression(this);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
const EXPRESSION_TYPE_MOCK = -1;
|
|
516
|
-
class ExpressionMock extends BaseExpression {
|
|
517
|
-
constructor(config) {
|
|
518
|
-
super(config || {});
|
|
519
|
-
this.expressionType = EXPRESSION_TYPE_MOCK;
|
|
520
|
-
}
|
|
521
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
522
|
-
get plainObject() {
|
|
523
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
524
|
-
}
|
|
525
|
-
clone() {
|
|
526
|
-
return new ExpressionMock(this);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
class BaseFilter {
|
|
531
|
-
constructor(filterType) {
|
|
532
|
-
this.isEnabled = true;
|
|
533
|
-
this.trimDateTimeParameterToDate = false;
|
|
534
|
-
this.filterType = filterType;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
class FilterMock extends BaseFilter {
|
|
539
|
-
constructor(filterType = FilterType.None) {
|
|
540
|
-
super(filterType);
|
|
541
|
-
}
|
|
542
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
543
|
-
get plainObject() {
|
|
544
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
545
|
-
}
|
|
546
|
-
clone() {
|
|
547
|
-
return new FilterMock(this.filterType);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
class SingleFilter extends BaseFilter {
|
|
552
|
-
constructor(filterType, comparisonType, leftExpression) {
|
|
553
|
-
super(filterType);
|
|
554
|
-
this.comparisonType = comparisonType;
|
|
555
|
-
this.leftExpression = leftExpression.clone();
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
class CompareFilter extends SingleFilter {
|
|
560
|
-
constructor(comparisonType, leftExpression, rightExpression) {
|
|
561
|
-
super(FilterType.Compare, comparisonType, leftExpression);
|
|
562
|
-
this.rightExpression = rightExpression.clone();
|
|
563
|
-
}
|
|
564
|
-
clone() {
|
|
565
|
-
return new CompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
class BetweenFilter extends SingleFilter {
|
|
570
|
-
constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
|
|
571
|
-
super(FilterType.Between, ComparisonType.Between, leftExpression);
|
|
572
|
-
this.rightLessExpression = rightLessExpression.clone();
|
|
573
|
-
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
574
|
-
}
|
|
575
|
-
clone() {
|
|
576
|
-
return new BetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
class ExistsFilter extends SingleFilter {
|
|
581
|
-
constructor(leftExpression, subFilters, comparisonType = ComparisonType.Exists, isAggregative = true) {
|
|
582
|
-
super(FilterType.Exists, comparisonType, leftExpression);
|
|
583
|
-
this.subFilters = subFilters?.clone();
|
|
584
|
-
this.isAggregative = isAggregative;
|
|
585
|
-
}
|
|
586
|
-
clone() {
|
|
587
|
-
return new ExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
class InFilter extends SingleFilter {
|
|
592
|
-
constructor(comparisonType, leftExpression, rightExpressions) {
|
|
593
|
-
super(FilterType.In, comparisonType, leftExpression);
|
|
594
|
-
this.rightExpressions = rightExpressions.map((expression) => expression.clone());
|
|
595
|
-
}
|
|
596
|
-
clone() {
|
|
597
|
-
return new InFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
class IsNullFilter extends SingleFilter {
|
|
602
|
-
constructor(comparisonType, leftExpression) {
|
|
603
|
-
super(FilterType.IsNull, comparisonType, leftExpression);
|
|
604
|
-
}
|
|
605
|
-
get isNull() {
|
|
606
|
-
return this.comparisonType === ComparisonType.Is_null;
|
|
607
|
-
}
|
|
608
|
-
clone() {
|
|
609
|
-
return new IsNullFilter(this.comparisonType, this.leftExpression);
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
__decorate([
|
|
613
|
-
Expose(),
|
|
614
|
-
__metadata("design:type", Boolean),
|
|
615
|
-
__metadata("design:paramtypes", [])
|
|
616
|
-
], IsNullFilter.prototype, "isNull", null);
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Empty Guid constant.
|
|
620
|
-
* @internal
|
|
621
|
-
*/
|
|
622
|
-
const EMPTY_GUID = '00000000-0000-0000-0000-000000000000';
|
|
623
|
-
/**
|
|
624
|
-
* Regular expression for Guid validation.
|
|
625
|
-
* @internal
|
|
626
|
-
*/
|
|
627
|
-
const validator = new RegExp('^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$', 'i');
|
|
628
|
-
/**
|
|
629
|
-
* Generates guid part.
|
|
630
|
-
* @param length Part length.
|
|
631
|
-
* @internal
|
|
632
|
-
*/
|
|
633
|
-
function generateGuidPart(length) {
|
|
634
|
-
let out = '';
|
|
635
|
-
for (let i = 0; i < length; i++) {
|
|
636
|
-
// eslint-disable-next-line no-bitwise
|
|
637
|
-
out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
638
|
-
}
|
|
639
|
-
return out;
|
|
640
|
-
}
|
|
641
|
-
/**
|
|
642
|
-
* Generates new Guid.
|
|
643
|
-
* @internal
|
|
644
|
-
*/
|
|
645
|
-
function generateGuid() {
|
|
646
|
-
return [
|
|
647
|
-
generateGuidPart(2),
|
|
648
|
-
generateGuidPart(1),
|
|
649
|
-
generateGuidPart(1),
|
|
650
|
-
generateGuidPart(1),
|
|
651
|
-
generateGuidPart(3),
|
|
652
|
-
].join('-');
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Checks if value is Guid.
|
|
656
|
-
* @param value Value for check.
|
|
657
|
-
* @internal
|
|
658
|
-
*/
|
|
659
|
-
function isGuid(value) {
|
|
660
|
-
return Boolean(value) && validator.test(value);
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* Checks if Guid is empty value or equal to EMPTY_GUID.
|
|
664
|
-
* @param guid Guid for check.
|
|
665
|
-
* @internal
|
|
666
|
-
*/
|
|
667
|
-
function isEmptyGuid(guid) {
|
|
668
|
-
return !guid || guid === EMPTY_GUID;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @internal
|
|
673
|
-
*/
|
|
674
|
-
class NextHandlerAlreadySpecifiedException extends Error {
|
|
675
|
-
constructor() {
|
|
676
|
-
super('Next handler already specified');
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
class ArgumentEmptyException extends Error {
|
|
681
|
-
// region Constructors: Public
|
|
682
|
-
constructor(argumentName) {
|
|
683
|
-
super(`Argument with name '${argumentName}' is empty.`);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
class ArgumentOutOfRangeException extends Error {
|
|
688
|
-
// region Constructors: Public
|
|
689
|
-
constructor(argumentName) {
|
|
690
|
-
super(`Argument with name '${argumentName}' is out of range.`);
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
class ItemNotFoundException extends Error {
|
|
695
|
-
// region Constructors: Public
|
|
696
|
-
constructor(key) {
|
|
697
|
-
super(`Item with key '${key}' does not exist.`);
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
class ValidationUtilities {
|
|
702
|
-
// region Methods: Public
|
|
703
|
-
static checkArgumentEmpty(argumentName, argumentValue) {
|
|
704
|
-
if (argumentValue === undefined || argumentValue === null) {
|
|
705
|
-
throw new ArgumentEmptyException(argumentName);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
static checkArrayEmpty(argumentName, argumentValue) {
|
|
709
|
-
ValidationUtilities.checkArgumentEmpty(argumentName, argumentValue);
|
|
710
|
-
if (argumentValue.length === 0) {
|
|
711
|
-
throw new ArgumentEmptyException(argumentName);
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
static checkStringIsNotEmpty(argumentName, argumentValue) {
|
|
715
|
-
this.checkArgumentEmpty(argumentName, argumentValue);
|
|
716
|
-
if (argumentValue === '') {
|
|
717
|
-
throw new ArgumentEmptyException(argumentName);
|
|
718
|
-
}
|
|
719
|
-
return argumentValue;
|
|
720
|
-
}
|
|
721
|
-
static checkArgumentOutOfRange(argumentName, argumentValue, range) {
|
|
722
|
-
if (range.begin && argumentValue < range.begin) {
|
|
723
|
-
throw new ArgumentOutOfRangeException(argumentName);
|
|
724
|
-
}
|
|
725
|
-
if (range.end && argumentValue > range.end) {
|
|
726
|
-
throw new ArgumentOutOfRangeException(argumentName);
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
class FilterGroup extends BaseFilter {
|
|
732
|
-
constructor(logicalOperation = LogicalOperatorType.And) {
|
|
733
|
-
super(FilterType.FilterGroup);
|
|
734
|
-
this.filters = new Map();
|
|
735
|
-
this.logicalOperation = logicalOperation;
|
|
736
|
-
}
|
|
737
|
-
get items() {
|
|
738
|
-
return classToPlain(this.filters, {
|
|
739
|
-
exposeUnsetFields: false,
|
|
740
|
-
excludePrefixes: ['_'],
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* Returns filter item by index.
|
|
745
|
-
* @param index Item index.
|
|
746
|
-
* @returns Filter.
|
|
747
|
-
*/
|
|
748
|
-
getItemByIndex(index) {
|
|
749
|
-
return this.items[Object.keys(this.items)[index]];
|
|
750
|
-
}
|
|
751
|
-
addSchemaColumnFilterWithParameter(comparisonType, columnPath, parameterValue) {
|
|
752
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
753
|
-
const rightExpression = new ParameterExpression({ value: parameterValue });
|
|
754
|
-
const filter = new CompareFilter(comparisonType, leftExpression, rightExpression);
|
|
755
|
-
this.add(filter);
|
|
756
|
-
}
|
|
757
|
-
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues) {
|
|
758
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
759
|
-
const expressions = parameterValues.map((singleParameterValue) => new ParameterExpression({
|
|
760
|
-
value: singleParameterValue,
|
|
761
|
-
}));
|
|
762
|
-
const filter = new InFilter(comparisonType, leftExpression, expressions);
|
|
763
|
-
this.add(filter);
|
|
764
|
-
}
|
|
765
|
-
addSchemaColumnIsNullFilter(columnPath) {
|
|
766
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
767
|
-
const filter = new IsNullFilter(ComparisonType.Is_null, leftExpression);
|
|
768
|
-
this.add(filter);
|
|
769
|
-
}
|
|
770
|
-
addSchemaColumnIsNotNullFilter(columnPath) {
|
|
771
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
772
|
-
const filter = new IsNullFilter(ComparisonType.Is_not_null, leftExpression);
|
|
773
|
-
this.add(filter);
|
|
774
|
-
}
|
|
775
|
-
/**
|
|
776
|
-
* Creates and adds filter between less value and greater value.
|
|
777
|
-
* @param columnPath Column path.
|
|
778
|
-
* @param lessParamValue Less parameter value.
|
|
779
|
-
* @param greaterParamValue Greater parameter value.
|
|
780
|
-
*/
|
|
781
|
-
addSchemaColumnBetweenFilterWithParameters(columnPath, lessParamValue, greaterParamValue) {
|
|
782
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
783
|
-
const rightLessExpression = new ParameterExpression({ value: lessParamValue });
|
|
784
|
-
const rightGreaterExpression = new ParameterExpression({ value: greaterParamValue });
|
|
785
|
-
const filter = new BetweenFilter(leftExpression, rightLessExpression, rightGreaterExpression);
|
|
786
|
-
this.add(filter);
|
|
787
|
-
}
|
|
788
|
-
addExistsFilter(columnPath, subFilters) {
|
|
789
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
790
|
-
const filter = new ExistsFilter(leftExpression, subFilters);
|
|
791
|
-
this.add(filter);
|
|
792
|
-
}
|
|
793
|
-
addNotExistsFilter(columnPath, subFilters) {
|
|
794
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
795
|
-
const filter = new ExistsFilter(leftExpression, subFilters, ComparisonType.Not_exists);
|
|
796
|
-
this.add(filter);
|
|
797
|
-
}
|
|
798
|
-
add(filter, filterKey) {
|
|
799
|
-
ValidationUtilities.checkArgumentEmpty('filter', filter);
|
|
800
|
-
const key = filterKey || generateGuid();
|
|
801
|
-
this.filters.set(key, filter);
|
|
802
|
-
}
|
|
803
|
-
clone() {
|
|
804
|
-
const filterGroup = new FilterGroup(this.logicalOperation);
|
|
805
|
-
this.filters.forEach((filter, filterKey) => {
|
|
806
|
-
filterGroup.filters.set(filterKey, filter.clone());
|
|
807
|
-
});
|
|
808
|
-
return filterGroup;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
__decorate([
|
|
812
|
-
Exclude(),
|
|
813
|
-
__metadata("design:type", Object)
|
|
814
|
-
], FilterGroup.prototype, "filters", void 0);
|
|
815
|
-
__decorate([
|
|
816
|
-
Expose(),
|
|
817
|
-
__metadata("design:type", Object),
|
|
818
|
-
__metadata("design:paramtypes", [])
|
|
819
|
-
], FilterGroup.prototype, "items", null);
|
|
820
|
-
|
|
821
|
-
class BaseQueryColumn {
|
|
822
|
-
constructor(expression) {
|
|
823
|
-
this.orderDirection = OrderDirection.None;
|
|
824
|
-
this.orderPosition = -1;
|
|
825
|
-
this.isVisible = true;
|
|
826
|
-
this.expression = expression;
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* Adds ordering options.
|
|
830
|
-
* @param orderDirection Direction.
|
|
831
|
-
* @param orderPosition Position.
|
|
832
|
-
* @returns Self.
|
|
833
|
-
*/
|
|
834
|
-
withOrdering(orderDirection, orderPosition) {
|
|
835
|
-
ValidationUtilities.checkArgumentEmpty('orderDirection', orderDirection);
|
|
836
|
-
ValidationUtilities.checkArgumentEmpty('orderPosition', orderPosition);
|
|
837
|
-
ValidationUtilities.checkArgumentOutOfRange('orderPosition', orderPosition, { begin: -1 });
|
|
838
|
-
this.orderDirection = orderDirection;
|
|
839
|
-
this.orderPosition = orderPosition;
|
|
840
|
-
return this;
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Adds options.
|
|
844
|
-
* @param options Options.
|
|
845
|
-
* @returns Self.
|
|
846
|
-
*/
|
|
847
|
-
withOptions(options) {
|
|
848
|
-
ValidationUtilities.checkArgumentEmpty('options', options);
|
|
849
|
-
this.isVisible = options.isVisible ?? true;
|
|
850
|
-
return this;
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* Adds caption.
|
|
854
|
-
* @param caption Caption.
|
|
855
|
-
* @returns Self.
|
|
856
|
-
*/
|
|
857
|
-
withCaption(caption) {
|
|
858
|
-
ValidationUtilities.checkArgumentEmpty('caption', caption);
|
|
859
|
-
this.caption = caption;
|
|
860
|
-
return this;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
class ArithmeticQueryColumn extends BaseQueryColumn {
|
|
865
|
-
// region Constructors: Public
|
|
866
|
-
constructor(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand) {
|
|
867
|
-
super(new ArithmeticExpression({ arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand }));
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
class EntityQueryColumn extends BaseQueryColumn {
|
|
872
|
-
// region Constructors: Public
|
|
873
|
-
constructor(columnPath) {
|
|
874
|
-
super(new ColumnExpression({ columnPath }));
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
class ParameterQueryColumn extends BaseQueryColumn {
|
|
879
|
-
// region Constructors: Public
|
|
880
|
-
constructor(value, dataValueType) {
|
|
881
|
-
super(new ParameterExpression({ value, dataValueType }));
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
class AggregationSubQueryColumn extends BaseQueryColumn {
|
|
886
|
-
// region Constructors: Public
|
|
887
|
-
constructor(columnPath, aggregationType, subFilters, subOrderDirection, subOrderColumn) {
|
|
888
|
-
super(new AggregationSubQueryExpression({
|
|
889
|
-
aggregationType,
|
|
890
|
-
columnPath,
|
|
891
|
-
subFilters,
|
|
892
|
-
subOrderDirection,
|
|
893
|
-
subOrderColumn,
|
|
894
|
-
}));
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
class SubQueryColumn extends BaseQueryColumn {
|
|
899
|
-
// region Constructors: Public
|
|
900
|
-
constructor(columnPath, subFilters) {
|
|
901
|
-
super(new SubQueryExpression({ columnPath, subFilters }));
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
class AggregationFunctionColumn extends BaseQueryColumn {
|
|
906
|
-
// region Constructors: Public
|
|
907
|
-
constructor(aggregationType, aggregationEvalType, functionArgument) {
|
|
908
|
-
super(new AggregationFunctionExpression({
|
|
909
|
-
aggregationType,
|
|
910
|
-
aggregationEvalType,
|
|
911
|
-
functionArgument,
|
|
912
|
-
}));
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
class DatePartFunctionColumn extends BaseQueryColumn {
|
|
917
|
-
// region Constructors: Public
|
|
918
|
-
constructor(datePartType, functionArgument) {
|
|
919
|
-
super(new DatePartFunctionExpression({
|
|
920
|
-
datePartType,
|
|
921
|
-
functionArgument,
|
|
922
|
-
}));
|
|
923
|
-
}
|
|
924
|
-
// endregion
|
|
925
|
-
// region Properties: Public
|
|
926
|
-
get datePartType() {
|
|
927
|
-
return this.expression?.datePartType;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
class LengthFunctionColumn extends BaseQueryColumn {
|
|
932
|
-
// region Constructors: Public
|
|
933
|
-
constructor(functionArgument) {
|
|
934
|
-
super(new LengthFunctionExpression({ functionArgument }));
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
class MacrosFunctionColumn extends BaseQueryColumn {
|
|
939
|
-
// region Constructors: Public
|
|
940
|
-
constructor(macrosType) {
|
|
941
|
-
super(new MacrosFunctionExpression({ macrosType }));
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
class WindowFunctionColumn extends BaseQueryColumn {
|
|
946
|
-
// region Constructors: Public
|
|
947
|
-
constructor(functionArgument) {
|
|
948
|
-
super(new WindowFunctionExpression({ functionArgument }));
|
|
949
|
-
}
|
|
950
|
-
}
|
|
5
|
+
import { __decorate, __metadata } from 'tslib';
|
|
951
6
|
|
|
952
7
|
/**
|
|
953
8
|
* @internal
|
|
954
9
|
*/
|
|
955
10
|
function toAggregationType(aggregationFunction) {
|
|
956
11
|
switch (aggregationFunction) {
|
|
957
|
-
case
|
|
958
|
-
return
|
|
959
|
-
case
|
|
960
|
-
return
|
|
961
|
-
case
|
|
962
|
-
return
|
|
963
|
-
case
|
|
964
|
-
return
|
|
965
|
-
case
|
|
966
|
-
return
|
|
967
|
-
case
|
|
968
|
-
return
|
|
12
|
+
case ɵAggregationFunction.Count:
|
|
13
|
+
return ɵAggregationType.Count;
|
|
14
|
+
case ɵAggregationFunction.Sum:
|
|
15
|
+
return ɵAggregationType.Sum;
|
|
16
|
+
case ɵAggregationFunction.Avg:
|
|
17
|
+
return ɵAggregationType.Avg;
|
|
18
|
+
case ɵAggregationFunction.Min:
|
|
19
|
+
return ɵAggregationType.Min;
|
|
20
|
+
case ɵAggregationFunction.Max:
|
|
21
|
+
return ɵAggregationType.Max;
|
|
22
|
+
case ɵAggregationFunction.TopOne:
|
|
23
|
+
return ɵAggregationType.TopOne;
|
|
969
24
|
default:
|
|
970
|
-
return
|
|
25
|
+
return ɵAggregationType.None;
|
|
971
26
|
}
|
|
972
27
|
}
|
|
973
28
|
/**
|
|
@@ -975,20 +30,20 @@ function toAggregationType(aggregationFunction) {
|
|
|
975
30
|
*/
|
|
976
31
|
function toAggregationFunction(aggregationType) {
|
|
977
32
|
switch (aggregationType) {
|
|
978
|
-
case
|
|
979
|
-
return
|
|
980
|
-
case
|
|
981
|
-
return
|
|
982
|
-
case
|
|
983
|
-
return
|
|
984
|
-
case
|
|
985
|
-
return
|
|
986
|
-
case
|
|
987
|
-
return
|
|
988
|
-
case
|
|
989
|
-
return
|
|
33
|
+
case ɵAggregationType.Count:
|
|
34
|
+
return ɵAggregationFunction.Count;
|
|
35
|
+
case ɵAggregationType.Sum:
|
|
36
|
+
return ɵAggregationFunction.Sum;
|
|
37
|
+
case ɵAggregationType.Avg:
|
|
38
|
+
return ɵAggregationFunction.Avg;
|
|
39
|
+
case ɵAggregationType.Min:
|
|
40
|
+
return ɵAggregationFunction.Min;
|
|
41
|
+
case ɵAggregationType.Max:
|
|
42
|
+
return ɵAggregationFunction.Max;
|
|
43
|
+
case ɵAggregationType.TopOne:
|
|
44
|
+
return ɵAggregationFunction.TopOne;
|
|
990
45
|
default:
|
|
991
|
-
return
|
|
46
|
+
return ɵAggregationFunction.None;
|
|
992
47
|
}
|
|
993
48
|
}
|
|
994
49
|
/**
|
|
@@ -997,11 +52,11 @@ function toAggregationFunction(aggregationType) {
|
|
|
997
52
|
function toAggregationEvalType(aggregationEval) {
|
|
998
53
|
switch (aggregationEval) {
|
|
999
54
|
case 'all':
|
|
1000
|
-
return
|
|
55
|
+
return ɵAggregationEvalType.All;
|
|
1001
56
|
case 'distinct':
|
|
1002
|
-
return
|
|
57
|
+
return ɵAggregationEvalType.Distinct;
|
|
1003
58
|
default:
|
|
1004
|
-
return
|
|
59
|
+
return ɵAggregationEvalType.None;
|
|
1005
60
|
}
|
|
1006
61
|
}
|
|
1007
62
|
/**
|
|
@@ -1009,9 +64,9 @@ function toAggregationEvalType(aggregationEval) {
|
|
|
1009
64
|
*/
|
|
1010
65
|
function toAggregationEval(aggregationEvalType) {
|
|
1011
66
|
switch (aggregationEvalType) {
|
|
1012
|
-
case
|
|
67
|
+
case ɵAggregationEvalType.All:
|
|
1013
68
|
return 'all';
|
|
1014
|
-
case
|
|
69
|
+
case ɵAggregationEvalType.Distinct:
|
|
1015
70
|
return 'distinct';
|
|
1016
71
|
default:
|
|
1017
72
|
return 'none';
|
|
@@ -1024,21 +79,21 @@ function toAggregationEval(aggregationEvalType) {
|
|
|
1024
79
|
function toDatePartType(aggregationFunction) {
|
|
1025
80
|
switch (aggregationFunction) {
|
|
1026
81
|
case 'minute':
|
|
1027
|
-
return
|
|
82
|
+
return ɵDatePartType.HourMinute;
|
|
1028
83
|
case 'hour':
|
|
1029
|
-
return
|
|
84
|
+
return ɵDatePartType.Hour;
|
|
1030
85
|
case 'day':
|
|
1031
|
-
return
|
|
86
|
+
return ɵDatePartType.Day;
|
|
1032
87
|
case 'weekday':
|
|
1033
|
-
return
|
|
88
|
+
return ɵDatePartType.WeekDay;
|
|
1034
89
|
case 'week':
|
|
1035
|
-
return
|
|
90
|
+
return ɵDatePartType.Week;
|
|
1036
91
|
case 'month':
|
|
1037
|
-
return
|
|
92
|
+
return ɵDatePartType.Month;
|
|
1038
93
|
case 'year':
|
|
1039
|
-
return
|
|
94
|
+
return ɵDatePartType.Year;
|
|
1040
95
|
default:
|
|
1041
|
-
return
|
|
96
|
+
return ɵDatePartType.None;
|
|
1042
97
|
}
|
|
1043
98
|
}
|
|
1044
99
|
/**
|
|
@@ -1046,19 +101,19 @@ function toDatePartType(aggregationFunction) {
|
|
|
1046
101
|
*/
|
|
1047
102
|
function toDatePart(aggregationType) {
|
|
1048
103
|
switch (aggregationType) {
|
|
1049
|
-
case
|
|
104
|
+
case ɵDatePartType.HourMinute:
|
|
1050
105
|
return 'minute';
|
|
1051
|
-
case
|
|
106
|
+
case ɵDatePartType.Hour:
|
|
1052
107
|
return 'hour';
|
|
1053
|
-
case
|
|
108
|
+
case ɵDatePartType.Day:
|
|
1054
109
|
return 'day';
|
|
1055
|
-
case
|
|
110
|
+
case ɵDatePartType.WeekDay:
|
|
1056
111
|
return 'weekday';
|
|
1057
|
-
case
|
|
112
|
+
case ɵDatePartType.Week:
|
|
1058
113
|
return 'week';
|
|
1059
|
-
case
|
|
114
|
+
case ɵDatePartType.Month:
|
|
1060
115
|
return 'month';
|
|
1061
|
-
case
|
|
116
|
+
case ɵDatePartType.Year:
|
|
1062
117
|
return 'year';
|
|
1063
118
|
default:
|
|
1064
119
|
return 'none';
|
|
@@ -1070,9 +125,9 @@ function toDatePart(aggregationType) {
|
|
|
1070
125
|
*/
|
|
1071
126
|
function toStringFunctionType(functionType) {
|
|
1072
127
|
switch (functionType) {
|
|
1073
|
-
case
|
|
128
|
+
case ɵFunctionType.Aggregation:
|
|
1074
129
|
return 'aggregation';
|
|
1075
|
-
case
|
|
130
|
+
case ɵFunctionType.DatePart:
|
|
1076
131
|
return 'datePart';
|
|
1077
132
|
default:
|
|
1078
133
|
return 'none';
|
|
@@ -1084,11 +139,11 @@ function toStringFunctionType(functionType) {
|
|
|
1084
139
|
function toNumericFunctionType(functionType) {
|
|
1085
140
|
switch (functionType) {
|
|
1086
141
|
case 'aggregation':
|
|
1087
|
-
return
|
|
142
|
+
return ɵFunctionType.Aggregation;
|
|
1088
143
|
case 'datePart':
|
|
1089
|
-
return
|
|
144
|
+
return ɵFunctionType.DatePart;
|
|
1090
145
|
default:
|
|
1091
|
-
return
|
|
146
|
+
return ɵFunctionType.None;
|
|
1092
147
|
}
|
|
1093
148
|
}
|
|
1094
149
|
|
|
@@ -1098,11 +153,11 @@ function toNumericFunctionType(functionType) {
|
|
|
1098
153
|
function toOrderDirection(sortDirection) {
|
|
1099
154
|
switch (sortDirection) {
|
|
1100
155
|
case 'asc':
|
|
1101
|
-
return
|
|
156
|
+
return ɵOrderDirection.Asc;
|
|
1102
157
|
case 'desc':
|
|
1103
|
-
return
|
|
158
|
+
return ɵOrderDirection.Desc;
|
|
1104
159
|
default:
|
|
1105
|
-
return
|
|
160
|
+
return ɵOrderDirection.None;
|
|
1106
161
|
}
|
|
1107
162
|
}
|
|
1108
163
|
/**
|
|
@@ -1110,9 +165,9 @@ function toOrderDirection(sortDirection) {
|
|
|
1110
165
|
*/
|
|
1111
166
|
function toSortDirection(orderDirection) {
|
|
1112
167
|
switch (orderDirection) {
|
|
1113
|
-
case
|
|
168
|
+
case ɵOrderDirection.Asc:
|
|
1114
169
|
return 'asc';
|
|
1115
|
-
case
|
|
170
|
+
case ɵOrderDirection.Desc:
|
|
1116
171
|
return 'desc';
|
|
1117
172
|
default:
|
|
1118
173
|
return 'none';
|
|
@@ -1161,25 +216,6 @@ var ViewElementDataGroupType;
|
|
|
1161
216
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1162
217
|
const DesignerToolGroupType = { ...ViewElementDataGroupType, ...ViewElementGroupType };
|
|
1163
218
|
|
|
1164
|
-
/**
|
|
1165
|
-
* @internal
|
|
1166
|
-
*/
|
|
1167
|
-
var DataSourceScope;
|
|
1168
|
-
(function (DataSourceScope) {
|
|
1169
|
-
DataSourceScope["ViewElement"] = "viewElement";
|
|
1170
|
-
DataSourceScope["Page"] = "page";
|
|
1171
|
-
})(DataSourceScope || (DataSourceScope = {}));
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* @internal
|
|
1175
|
-
*/
|
|
1176
|
-
var ModelInPageAction;
|
|
1177
|
-
(function (ModelInPageAction) {
|
|
1178
|
-
ModelInPageAction["Edit"] = "edit";
|
|
1179
|
-
ModelInPageAction["Add"] = "add";
|
|
1180
|
-
ModelInPageAction["Copy"] = "copy";
|
|
1181
|
-
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
1182
|
-
|
|
1183
219
|
/**
|
|
1184
220
|
* Handler source types in order of call priority.
|
|
1185
221
|
* @internal
|
|
@@ -1194,51 +230,20 @@ var HandlerSourceType;
|
|
|
1194
230
|
/**
|
|
1195
231
|
* @internal
|
|
1196
232
|
*/
|
|
1197
|
-
var
|
|
1198
|
-
(function (
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
DataSchemaAttributeType["FunctionAttribute"] = "Function";
|
|
1204
|
-
})(DataSchemaAttributeType || (DataSchemaAttributeType = {}));
|
|
1205
|
-
/**
|
|
1206
|
-
* @internal
|
|
1207
|
-
*/
|
|
1208
|
-
var DataSchemaAttributeUsageType;
|
|
1209
|
-
(function (DataSchemaAttributeUsageType) {
|
|
1210
|
-
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["General"] = 0] = "General";
|
|
1211
|
-
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["Advanced"] = 1] = "Advanced";
|
|
1212
|
-
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["None"] = 2] = "None";
|
|
1213
|
-
})(DataSchemaAttributeUsageType || (DataSchemaAttributeUsageType = {}));
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* Type of DataSchema. In combination with the name is used for unique identification of {@link DataSchema}.
|
|
1217
|
-
* @internal
|
|
1218
|
-
*/
|
|
1219
|
-
var DataSchemaType;
|
|
1220
|
-
(function (DataSchemaType) {
|
|
1221
|
-
DataSchemaType["Entity"] = "Entity";
|
|
1222
|
-
DataSchemaType["ClientUnit"] = "ClientUnit";
|
|
1223
|
-
})(DataSchemaType || (DataSchemaType = {}));
|
|
1224
|
-
|
|
1225
|
-
/**
|
|
1226
|
-
* @internal
|
|
1227
|
-
*/
|
|
1228
|
-
var DefaultValueSource;
|
|
1229
|
-
(function (DefaultValueSource) {
|
|
1230
|
-
DefaultValueSource[DefaultValueSource["None"] = 0] = "None";
|
|
1231
|
-
DefaultValueSource[DefaultValueSource["Const"] = 1] = "Const";
|
|
1232
|
-
DefaultValueSource[DefaultValueSource["Settings"] = 2] = "Settings";
|
|
1233
|
-
DefaultValueSource[DefaultValueSource["SystemValue"] = 3] = "SystemValue";
|
|
1234
|
-
DefaultValueSource[DefaultValueSource["Sequence"] = 4] = "Sequence";
|
|
1235
|
-
})(DefaultValueSource || (DefaultValueSource = {}));
|
|
233
|
+
var ModelInPageAction;
|
|
234
|
+
(function (ModelInPageAction) {
|
|
235
|
+
ModelInPageAction["Edit"] = "edit";
|
|
236
|
+
ModelInPageAction["Add"] = "add";
|
|
237
|
+
ModelInPageAction["Copy"] = "copy";
|
|
238
|
+
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
1236
239
|
|
|
1237
240
|
const global$3 = window;
|
|
1238
241
|
/**
|
|
1239
|
-
* @
|
|
242
|
+
* @public
|
|
243
|
+
* @description For internal use only.
|
|
1240
244
|
*/
|
|
1241
|
-
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
246
|
+
class ɵBaseRegistry {
|
|
1242
247
|
constructor() {
|
|
1243
248
|
this.store = {
|
|
1244
249
|
typeInfos: new Map(),
|
|
@@ -1256,12 +261,12 @@ class BaseRegistry {
|
|
|
1256
261
|
return this._instance.store;
|
|
1257
262
|
}
|
|
1258
263
|
}
|
|
1259
|
-
|
|
264
|
+
ɵBaseRegistry._prefix = 'creatio.registry.';
|
|
1260
265
|
|
|
1261
266
|
/**
|
|
1262
267
|
* @internal
|
|
1263
268
|
*/
|
|
1264
|
-
class PkgTopology extends
|
|
269
|
+
class PkgTopology extends ɵBaseRegistry {
|
|
1265
270
|
static get items() {
|
|
1266
271
|
return this.store.typeInfos;
|
|
1267
272
|
}
|
|
@@ -1425,7 +430,7 @@ class InternalHandlerChain {
|
|
|
1425
430
|
handlers[index].setNext(handlers[index + 1]);
|
|
1426
431
|
}
|
|
1427
432
|
catch (error) {
|
|
1428
|
-
if (error instanceof
|
|
433
|
+
if (error instanceof ɵNextHandlerAlreadySpecifiedException) {
|
|
1429
434
|
throw new Error('Handler factory should return new instance of ' +
|
|
1430
435
|
'BaseRequestHandler class or its subclass ' +
|
|
1431
436
|
'(next handler should not be specified)');
|
|
@@ -1443,11 +448,6 @@ const global$2 = window;
|
|
|
1443
448
|
* @classdesc Service to design handlers in chain.
|
|
1444
449
|
*/
|
|
1445
450
|
class HandlerChainService {
|
|
1446
|
-
constructor() {
|
|
1447
|
-
if (!this._chain) {
|
|
1448
|
-
this._createGlobalHandlerChain();
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
451
|
get _chain() {
|
|
1452
452
|
return global$2.handlerChain;
|
|
1453
453
|
}
|
|
@@ -1457,6 +457,11 @@ class HandlerChainService {
|
|
|
1457
457
|
static get instance() {
|
|
1458
458
|
return HandlerChainService._instance || (HandlerChainService._instance = new HandlerChainService());
|
|
1459
459
|
}
|
|
460
|
+
constructor() {
|
|
461
|
+
if (!this._chain) {
|
|
462
|
+
this._createGlobalHandlerChain();
|
|
463
|
+
}
|
|
464
|
+
}
|
|
1460
465
|
_createGlobalHandlerChain() {
|
|
1461
466
|
this._chain = new InternalHandlerChain();
|
|
1462
467
|
}
|
|
@@ -1474,7 +479,7 @@ class HandlerChainService {
|
|
|
1474
479
|
}
|
|
1475
480
|
/**
|
|
1476
481
|
* @description Method to process passed request
|
|
1477
|
-
* @param request - {@link
|
|
482
|
+
* @param request - {@link ɵBaseRequest}
|
|
1478
483
|
* @return `Promise<unknown>`
|
|
1479
484
|
*/
|
|
1480
485
|
process(request) {
|
|
@@ -1527,6 +532,13 @@ function checkTypeNameFormat(type, element) {
|
|
|
1527
532
|
throw new Error(`Error when register ${type}. Type property should have format "VendorPrefix.${element}"`);
|
|
1528
533
|
}
|
|
1529
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* @public
|
|
537
|
+
* @description For internal use only.
|
|
538
|
+
*/
|
|
539
|
+
function ɵcheckTypeNameFormat(type, element) {
|
|
540
|
+
return checkTypeNameFormat(type, element);
|
|
541
|
+
}
|
|
1530
542
|
/**
|
|
1531
543
|
* @internal
|
|
1532
544
|
*/
|
|
@@ -1682,7 +694,7 @@ RequestRegistryService._requestsRegistrationInfos = new Map();
|
|
|
1682
694
|
/**
|
|
1683
695
|
* @internal
|
|
1684
696
|
*/
|
|
1685
|
-
class ConverterRegistry extends
|
|
697
|
+
class ConverterRegistry extends ɵBaseRegistry {
|
|
1686
698
|
static get(type) {
|
|
1687
699
|
if (!this.store.typeInfos.has(type)) {
|
|
1688
700
|
throw new Error(`'${type}' converter doesn't exist`);
|
|
@@ -1708,7 +720,7 @@ const viewElementRegistryKey = 'ViewElementRegistry';
|
|
|
1708
720
|
/**
|
|
1709
721
|
* @internal
|
|
1710
722
|
*/
|
|
1711
|
-
class ViewElementRegistry extends
|
|
723
|
+
class ViewElementRegistry extends ɵBaseRegistry {
|
|
1712
724
|
static validate(config) {
|
|
1713
725
|
checkTypeNameFormat(config.type, 'ViewElementTypeName');
|
|
1714
726
|
checkOnlyOneRegistration(config.type, config, ViewElementRegistry.viewElements);
|
|
@@ -1733,7 +745,7 @@ const interfaceDesignerItemRegistryKey = 'InterfaceDesignerItemRegistry';
|
|
|
1733
745
|
/**
|
|
1734
746
|
* @internal
|
|
1735
747
|
*/
|
|
1736
|
-
class InterfaceDesignerItemRegistry extends
|
|
748
|
+
class InterfaceDesignerItemRegistry extends ɵBaseRegistry {
|
|
1737
749
|
static validate(config) {
|
|
1738
750
|
checkTypeNameFormat(config.type, 'InterfaceDesignerItemTypeName');
|
|
1739
751
|
checkCrtTypeNamePascalCase(config.type);
|
|
@@ -1756,15 +768,16 @@ const global = window;
|
|
|
1756
768
|
* @internal
|
|
1757
769
|
*/
|
|
1758
770
|
class BootstrapNotifier {
|
|
1759
|
-
constructor() {
|
|
1760
|
-
this._subscribers = new Set();
|
|
1761
|
-
}
|
|
1762
771
|
static get instance() {
|
|
1763
772
|
if (!global.__crtModuleBootstrapNotifier) {
|
|
1764
773
|
global.__crtModuleBootstrapNotifier = new BootstrapNotifier();
|
|
1765
774
|
}
|
|
1766
775
|
return global.__crtModuleBootstrapNotifier;
|
|
1767
776
|
}
|
|
777
|
+
constructor() {
|
|
778
|
+
this._subscribers = new Set();
|
|
779
|
+
// private constructor prevent instantiation via 'new' keyword
|
|
780
|
+
}
|
|
1768
781
|
notify(moduleType) {
|
|
1769
782
|
for (const subscriber of this._subscribers.values()) {
|
|
1770
783
|
subscriber(moduleType);
|
|
@@ -1781,7 +794,7 @@ class BootstrapNotifier {
|
|
|
1781
794
|
/**
|
|
1782
795
|
* @internal
|
|
1783
796
|
*/
|
|
1784
|
-
class HandlerChainServicesRegistry extends
|
|
797
|
+
class HandlerChainServicesRegistry extends ɵBaseRegistry {
|
|
1785
798
|
static validate({ requestType }) {
|
|
1786
799
|
checkTypeNameFormat(requestType, this.registryKey);
|
|
1787
800
|
checkCrtTypeNamePascalCase(requestType);
|
|
@@ -1809,7 +822,7 @@ const designTimeViewElementRegistryKey = 'DesignTimeViewElementRegistry';
|
|
|
1809
822
|
/**
|
|
1810
823
|
* @internal
|
|
1811
824
|
*/
|
|
1812
|
-
class DesignTimeViewElementRegistry extends
|
|
825
|
+
class DesignTimeViewElementRegistry extends ɵBaseRegistry {
|
|
1813
826
|
static validate(config) {
|
|
1814
827
|
checkTypeNameFormat(config.type, 'DesignTimeViewElementRegistryItemTypeName');
|
|
1815
828
|
checkCrtTypeNamePascalCase(config.type);
|
|
@@ -1843,7 +856,7 @@ const validatorRegistryKey = 'ValidatorRegistry';
|
|
|
1843
856
|
/**
|
|
1844
857
|
* @internal
|
|
1845
858
|
*/
|
|
1846
|
-
class ValidatorRegistry extends
|
|
859
|
+
class ValidatorRegistry extends ɵBaseRegistry {
|
|
1847
860
|
static _has(configType, type) {
|
|
1848
861
|
return ValidatorRegistry.items.has(configType) && ValidatorRegistry.items.get(configType)?.typeRef !== type;
|
|
1849
862
|
}
|
|
@@ -1866,7 +879,7 @@ ValidatorRegistry.registryKey = validatorRegistryKey;
|
|
|
1866
879
|
* @internal
|
|
1867
880
|
* @dontChange
|
|
1868
881
|
*/
|
|
1869
|
-
class RemoteEntriesRegistry extends
|
|
882
|
+
class RemoteEntriesRegistry extends ɵBaseRegistry {
|
|
1870
883
|
/**
|
|
1871
884
|
* @dontChange
|
|
1872
885
|
*/
|
|
@@ -2111,30 +1124,28 @@ function instantiate(type, resolveDependency) {
|
|
|
2111
1124
|
}
|
|
2112
1125
|
return new type();
|
|
2113
1126
|
}
|
|
2114
|
-
|
|
2115
1127
|
/**
|
|
2116
1128
|
* @public
|
|
1129
|
+
* @description For internal use only.
|
|
2117
1130
|
*/
|
|
2118
|
-
|
|
1131
|
+
function ɵinstantiate(type, resolveDependency) {
|
|
1132
|
+
return instantiate(type, resolveDependency);
|
|
2119
1133
|
}
|
|
2120
1134
|
|
|
2121
1135
|
/**
|
|
2122
1136
|
* @public
|
|
2123
|
-
* @class BaseRequest
|
|
2124
|
-
* @describe Base definition of request.
|
|
2125
|
-
* @template TEvent
|
|
2126
1137
|
*/
|
|
2127
|
-
class
|
|
1138
|
+
class CrtInputRegistrationConfig {
|
|
2128
1139
|
}
|
|
2129
1140
|
|
|
2130
1141
|
/**
|
|
2131
1142
|
* @public
|
|
2132
1143
|
* @class DataRequest
|
|
2133
1144
|
* @description Definition of data source request.
|
|
2134
|
-
* @extends {
|
|
1145
|
+
* @extends {ɵBaseRequest} {@link ɵBaseRequest}
|
|
2135
1146
|
* @property {string} dataSourceName - name of assigned data source.
|
|
2136
1147
|
*/
|
|
2137
|
-
class DataRequest extends
|
|
1148
|
+
class DataRequest extends ɵBaseRequest {
|
|
2138
1149
|
}
|
|
2139
1150
|
|
|
2140
1151
|
/**
|
|
@@ -2250,340 +1261,6 @@ function CrtRequest(config) {
|
|
|
2250
1261
|
};
|
|
2251
1262
|
}
|
|
2252
1263
|
|
|
2253
|
-
/**
|
|
2254
|
-
* @internal
|
|
2255
|
-
*/
|
|
2256
|
-
class BaseQuery {
|
|
2257
|
-
// region Constructors: Protected
|
|
2258
|
-
constructor(operationType, rootSchemaName) {
|
|
2259
|
-
this.operationType = operationType;
|
|
2260
|
-
this.rootSchemaName = rootSchemaName;
|
|
2261
|
-
ValidationUtilities.checkArgumentEmpty('_operationType', operationType);
|
|
2262
|
-
ValidationUtilities.checkArgumentEmpty('_rootSchemaName', rootSchemaName);
|
|
2263
|
-
}
|
|
2264
|
-
// endregion
|
|
2265
|
-
// region Methods: Public
|
|
2266
|
-
getMetadata() {
|
|
2267
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
/**
|
|
2272
|
-
* @internal
|
|
2273
|
-
*/
|
|
2274
|
-
class BaseFilterableQuery extends BaseQuery {
|
|
2275
|
-
// endregion
|
|
2276
|
-
// region Constructors: Protected
|
|
2277
|
-
constructor(operationType, rootSchemaName) {
|
|
2278
|
-
super(operationType, rootSchemaName);
|
|
2279
|
-
// region Properties: Public
|
|
2280
|
-
this.filters = new FilterGroup();
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
/**
|
|
2285
|
-
* @internal
|
|
2286
|
-
*/
|
|
2287
|
-
var QueryOperationType;
|
|
2288
|
-
(function (QueryOperationType) {
|
|
2289
|
-
QueryOperationType[QueryOperationType["Select"] = 0] = "Select";
|
|
2290
|
-
QueryOperationType[QueryOperationType["Insert"] = 1] = "Insert";
|
|
2291
|
-
QueryOperationType[QueryOperationType["Update"] = 2] = "Update";
|
|
2292
|
-
QueryOperationType[QueryOperationType["Delete"] = 3] = "Delete";
|
|
2293
|
-
// Batch,
|
|
2294
|
-
// ListSelect,
|
|
2295
|
-
// FilteredSelect,
|
|
2296
|
-
// LookupSelect
|
|
2297
|
-
})(QueryOperationType || (QueryOperationType = {}));
|
|
2298
|
-
|
|
2299
|
-
/**
|
|
2300
|
-
* @internal
|
|
2301
|
-
*/
|
|
2302
|
-
class DeleteQuery extends BaseFilterableQuery {
|
|
2303
|
-
// region Constructors: Public
|
|
2304
|
-
constructor(rootSchemaName) {
|
|
2305
|
-
super(QueryOperationType.Delete, rootSchemaName);
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
/**
|
|
2310
|
-
* @internal
|
|
2311
|
-
*/
|
|
2312
|
-
class EntitySchemaQuery extends BaseFilterableQuery {
|
|
2313
|
-
// endregion
|
|
2314
|
-
// region Constructors: Public
|
|
2315
|
-
constructor(rootSchemaName) {
|
|
2316
|
-
super(QueryOperationType.Select, rootSchemaName);
|
|
2317
|
-
// region Properties: Private
|
|
2318
|
-
this._columns = new Map();
|
|
2319
|
-
// endregion
|
|
2320
|
-
// region Properties: Public
|
|
2321
|
-
this.isDistinct = false;
|
|
2322
|
-
/**
|
|
2323
|
-
* Number of rows to select.
|
|
2324
|
-
*/
|
|
2325
|
-
this.rowCount = -1;
|
|
2326
|
-
/**
|
|
2327
|
-
* Rows count to skip.
|
|
2328
|
-
*/
|
|
2329
|
-
this.rowsOffset = -1;
|
|
2330
|
-
this.useLocalization = true;
|
|
2331
|
-
this._getIsPageable = () => this.rowCount > 0 && this.rowsOffset > -1;
|
|
2332
|
-
}
|
|
2333
|
-
// endregion
|
|
2334
|
-
// region Methods: Private
|
|
2335
|
-
_internalAddColumn(key, column) {
|
|
2336
|
-
if (!this._columns.has(key)) {
|
|
2337
|
-
this._columns.set(key, column);
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
// endregion
|
|
2341
|
-
// region Methods: Public
|
|
2342
|
-
/**
|
|
2343
|
-
* Returns column instance by column alias.
|
|
2344
|
-
* @param columnAlias Column alias.
|
|
2345
|
-
* @returns [BaseQueryColumn] Column instance.
|
|
2346
|
-
*/
|
|
2347
|
-
getColumn(columnAlias) {
|
|
2348
|
-
if (!this._columns.has(columnAlias)) {
|
|
2349
|
-
throw new ItemNotFoundException(columnAlias);
|
|
2350
|
-
}
|
|
2351
|
-
return this.findColumn(columnAlias);
|
|
2352
|
-
}
|
|
2353
|
-
/**
|
|
2354
|
-
* Returns column instance by column alias if not found returns null.
|
|
2355
|
-
*/
|
|
2356
|
-
findColumn(columnAlias) {
|
|
2357
|
-
return this._columns.get(columnAlias);
|
|
2358
|
-
}
|
|
2359
|
-
/**
|
|
2360
|
-
* @inheritDoc
|
|
2361
|
-
*/
|
|
2362
|
-
getMetadata() {
|
|
2363
|
-
return {
|
|
2364
|
-
...super.getMetadata(),
|
|
2365
|
-
columns: {
|
|
2366
|
-
items: classToPlain(this._columns, { exposeUnsetFields: false, excludePrefixes: ['_'] }),
|
|
2367
|
-
},
|
|
2368
|
-
allColumns: false,
|
|
2369
|
-
isDistinct: this.isDistinct,
|
|
2370
|
-
ignoreDisplayValues: false,
|
|
2371
|
-
rowCount: this.rowCount,
|
|
2372
|
-
rowsOffset: this.rowsOffset,
|
|
2373
|
-
isPageable: this._getIsPageable(),
|
|
2374
|
-
conditionalValues: this.conditionalValues ? this.conditionalValues : null,
|
|
2375
|
-
isHierarchical: false,
|
|
2376
|
-
hierarchicalMaxDepth: 0,
|
|
2377
|
-
hierarchicalColumnName: null,
|
|
2378
|
-
hierarchicalColumnValue: null,
|
|
2379
|
-
useLocalization: this.useLocalization,
|
|
2380
|
-
useRecordDeactivation: false,
|
|
2381
|
-
};
|
|
2382
|
-
}
|
|
2383
|
-
/**
|
|
2384
|
-
* Add column.
|
|
2385
|
-
* @param column Column path.
|
|
2386
|
-
* @param columnAlias Column alias.
|
|
2387
|
-
* @returns [BaseQueryColumn] Column instance.
|
|
2388
|
-
*/
|
|
2389
|
-
addColumn(column, columnAlias) {
|
|
2390
|
-
this._internalAddColumn(columnAlias, column);
|
|
2391
|
-
return column;
|
|
2392
|
-
}
|
|
2393
|
-
/**
|
|
2394
|
-
* Add column by column path.
|
|
2395
|
-
* @param columnPath Column path.
|
|
2396
|
-
* @param columnAlias Column alias.
|
|
2397
|
-
* @returns [EntityQueryColumn] Column instance.
|
|
2398
|
-
*/
|
|
2399
|
-
addSchemaColumn(columnPath, columnAlias) {
|
|
2400
|
-
ValidationUtilities.checkArgumentEmpty('columnPath', columnPath);
|
|
2401
|
-
const column = new EntityQueryColumn(columnPath);
|
|
2402
|
-
this._internalAddColumn(columnAlias || columnPath, column);
|
|
2403
|
-
return column;
|
|
2404
|
-
}
|
|
2405
|
-
/**
|
|
2406
|
-
* Add aggregation sub query column.
|
|
2407
|
-
* @param columnPath Column path.
|
|
2408
|
-
* @param aggregationType Aggregation type.
|
|
2409
|
-
* @param subFilters Sub query filters.
|
|
2410
|
-
* @param columnAlias Column alias.
|
|
2411
|
-
* @returns [AggregationSubQueryColumn] Column instance.
|
|
2412
|
-
*/
|
|
2413
|
-
addAggregationSubQueryColumn(columnPath, aggregationType, aggregationConfig, columnAlias) {
|
|
2414
|
-
const column = new AggregationSubQueryColumn(columnPath, aggregationType, aggregationConfig.filter, aggregationConfig.sortByDirection, aggregationConfig.sortByColumn);
|
|
2415
|
-
this._internalAddColumn(columnAlias || columnPath, column);
|
|
2416
|
-
return column;
|
|
2417
|
-
}
|
|
2418
|
-
/**
|
|
2419
|
-
* Add parameter column.
|
|
2420
|
-
* @param value Parameter value.
|
|
2421
|
-
* @param dataValueType Parameter data value type.
|
|
2422
|
-
* @param columnAlias Column alias.
|
|
2423
|
-
* @returns [ParameterQueryColumn] Column instance.
|
|
2424
|
-
*/
|
|
2425
|
-
addParameterColumn(value, dataValueType, columnAlias) {
|
|
2426
|
-
const column = new ParameterQueryColumn(value, dataValueType);
|
|
2427
|
-
this._internalAddColumn(columnAlias, column);
|
|
2428
|
-
return column;
|
|
2429
|
-
}
|
|
2430
|
-
/**
|
|
2431
|
-
* Add arithmetic column.
|
|
2432
|
-
* @param arithmeticOperation Arithmetic operation.
|
|
2433
|
-
* @param leftArithmeticOperand Left arithmetic operand expression.
|
|
2434
|
-
* @param rightArithmeticOperand Right arithmetic operand expression.
|
|
2435
|
-
* @param columnAlias Column alias.
|
|
2436
|
-
* @returns [ArithmeticQueryColumn] Column instance.
|
|
2437
|
-
*/
|
|
2438
|
-
addArithmeticColumn(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand, columnAlias) {
|
|
2439
|
-
const column = new ArithmeticQueryColumn(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand);
|
|
2440
|
-
this._internalAddColumn(columnAlias, column);
|
|
2441
|
-
return column;
|
|
2442
|
-
}
|
|
2443
|
-
/**
|
|
2444
|
-
* Add macros function column.
|
|
2445
|
-
* @param queryMacrosType Macros type.
|
|
2446
|
-
* @param columnAlias Column alias.
|
|
2447
|
-
* @returns [MacrosFunctionColumn] Column instance.
|
|
2448
|
-
*/
|
|
2449
|
-
addMacrosFunctionColumn(queryMacrosType, columnAlias) {
|
|
2450
|
-
const column = new MacrosFunctionColumn(queryMacrosType);
|
|
2451
|
-
this._internalAddColumn(columnAlias, column);
|
|
2452
|
-
return column;
|
|
2453
|
-
}
|
|
2454
|
-
/**
|
|
2455
|
-
* Add date part function column.
|
|
2456
|
-
* @param columnPath Column path.
|
|
2457
|
-
* @param datePartType Date part type.
|
|
2458
|
-
* @param columnAlias Column alias.
|
|
2459
|
-
* @returns [DatePartFunctionColumn] Column instance.
|
|
2460
|
-
*/
|
|
2461
|
-
addDatePartFunctionColumn(columnPath, datePartType, columnAlias) {
|
|
2462
|
-
const functionArgument = new ColumnExpression({ columnPath });
|
|
2463
|
-
const column = new DatePartFunctionColumn(datePartType, functionArgument);
|
|
2464
|
-
this._internalAddColumn(columnAlias, column);
|
|
2465
|
-
return column;
|
|
2466
|
-
}
|
|
2467
|
-
/**
|
|
2468
|
-
* Add aggregation function column.
|
|
2469
|
-
* @param columnPath Column path.
|
|
2470
|
-
* @param aggregationType Aggregation type.
|
|
2471
|
-
* @param columnAlias Column alias.
|
|
2472
|
-
* @param aggregationEvalType Aggregation eval type.
|
|
2473
|
-
* @returns [AggregationFunctionColumn] Column instance.
|
|
2474
|
-
*/
|
|
2475
|
-
addAggregationFunctionColumn(columnPath, aggregationType, columnAlias, aggregationEvalType = AggregationEvalType.None) {
|
|
2476
|
-
const functionArgument = new ColumnExpression({ columnPath });
|
|
2477
|
-
const column = new AggregationFunctionColumn(aggregationType, aggregationEvalType, functionArgument);
|
|
2478
|
-
this._internalAddColumn(columnAlias, column);
|
|
2479
|
-
return column;
|
|
2480
|
-
}
|
|
2481
|
-
/**
|
|
2482
|
-
* Add length function column.
|
|
2483
|
-
* @param columnPath Column path.
|
|
2484
|
-
* @param columnAlias Column alias.
|
|
2485
|
-
* @returns [LengthFunctionColumn] Column instance.
|
|
2486
|
-
*/
|
|
2487
|
-
addLengthFunctionColumn(columnPath, columnAlias) {
|
|
2488
|
-
const functionArgument = new ColumnExpression({ columnPath });
|
|
2489
|
-
const column = new LengthFunctionColumn(functionArgument);
|
|
2490
|
-
this._internalAddColumn(columnAlias, column);
|
|
2491
|
-
return column;
|
|
2492
|
-
}
|
|
2493
|
-
/**
|
|
2494
|
-
* Add window function column.
|
|
2495
|
-
* @param columnPath Column path.
|
|
2496
|
-
* @param aggregationType Aggregation type.
|
|
2497
|
-
* @param columnAlias Column alias.
|
|
2498
|
-
* @param aggregationEvalType Aggregation eval type.
|
|
2499
|
-
* @returns [WindowFunctionColumn] Column instance.
|
|
2500
|
-
*/
|
|
2501
|
-
addWindowFunctionColumn(columnPath, aggregationType, columnAlias, aggregationEvalType = AggregationEvalType.None) {
|
|
2502
|
-
const functionArgument = new AggregationFunctionExpression({
|
|
2503
|
-
aggregationType,
|
|
2504
|
-
aggregationEvalType,
|
|
2505
|
-
functionArgument: new ColumnExpression({ columnPath }),
|
|
2506
|
-
});
|
|
2507
|
-
const column = new WindowFunctionColumn(functionArgument);
|
|
2508
|
-
this._internalAddColumn(columnAlias, column);
|
|
2509
|
-
return column;
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
|
-
/**
|
|
2514
|
-
* @internal
|
|
2515
|
-
*/
|
|
2516
|
-
class InsertQuery extends BaseQuery {
|
|
2517
|
-
// endregion
|
|
2518
|
-
// region Constructors: Public
|
|
2519
|
-
constructor(rootSchemaName) {
|
|
2520
|
-
super(QueryOperationType.Insert, rootSchemaName);
|
|
2521
|
-
// region Fields: Private
|
|
2522
|
-
this._columnValues = new Map();
|
|
2523
|
-
}
|
|
2524
|
-
// endregion
|
|
2525
|
-
// region Properties: Public
|
|
2526
|
-
get columnValues() {
|
|
2527
|
-
return {
|
|
2528
|
-
items: classToPlain(this._columnValues),
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
// endregion
|
|
2532
|
-
// region Methods: Public
|
|
2533
|
-
addColumn(columnName, columnValue, dataValueType) {
|
|
2534
|
-
ValidationUtilities.checkArgumentEmpty('columnName', columnName);
|
|
2535
|
-
this._columnValues.set(columnName, new ParameterExpression({ value: columnValue, dataValueType }));
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
__decorate([
|
|
2539
|
-
Expose(),
|
|
2540
|
-
__metadata("design:type", Object),
|
|
2541
|
-
__metadata("design:paramtypes", [])
|
|
2542
|
-
], InsertQuery.prototype, "columnValues", null);
|
|
2543
|
-
|
|
2544
|
-
/**
|
|
2545
|
-
* @internal
|
|
2546
|
-
*/
|
|
2547
|
-
class UpdateQuery extends BaseFilterableQuery {
|
|
2548
|
-
// endregion
|
|
2549
|
-
// region Constructors: Public
|
|
2550
|
-
constructor(rootSchemaName) {
|
|
2551
|
-
super(QueryOperationType.Update, rootSchemaName);
|
|
2552
|
-
// region Fields: Private
|
|
2553
|
-
this._columnValues = new Map();
|
|
2554
|
-
// endregion
|
|
2555
|
-
// region Fields: Public
|
|
2556
|
-
/**
|
|
2557
|
-
* Flag that indicates whether to force save data.
|
|
2558
|
-
*/
|
|
2559
|
-
this.isForceUpdate = false;
|
|
2560
|
-
}
|
|
2561
|
-
// endregion
|
|
2562
|
-
// region Properties: Public
|
|
2563
|
-
get columnValues() {
|
|
2564
|
-
return {
|
|
2565
|
-
items: classToPlain(this._columnValues),
|
|
2566
|
-
};
|
|
2567
|
-
}
|
|
2568
|
-
// endregion
|
|
2569
|
-
// region Methods: Public
|
|
2570
|
-
addColumn(columnName, columnValue, dataValueType) {
|
|
2571
|
-
ValidationUtilities.checkArgumentEmpty('columnName', columnName);
|
|
2572
|
-
this._columnValues.set(columnName, new ParameterExpression({ value: columnValue, dataValueType }));
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
__decorate([
|
|
2576
|
-
Expose(),
|
|
2577
|
-
__metadata("design:type", Object),
|
|
2578
|
-
__metadata("design:paramtypes", [])
|
|
2579
|
-
], UpdateQuery.prototype, "columnValues", null);
|
|
2580
|
-
|
|
2581
|
-
/**
|
|
2582
|
-
* @internal
|
|
2583
|
-
*/
|
|
2584
|
-
class SelectLocalizationQuery extends EntitySchemaQuery {
|
|
2585
|
-
}
|
|
2586
|
-
|
|
2587
1264
|
/**
|
|
2588
1265
|
* @internal
|
|
2589
1266
|
*/
|
|
@@ -2594,11 +1271,11 @@ class InterfaceDesignerItemRegistrationConfig {
|
|
|
2594
1271
|
* @internal
|
|
2595
1272
|
* @class MethodInvokeRequest
|
|
2596
1273
|
* @description Definition of invoke method request.
|
|
2597
|
-
* @extends {
|
|
1274
|
+
* @extends {ɵBaseRequest} {@link ɵBaseRequest}
|
|
2598
1275
|
* @property {string} method - method name.
|
|
2599
1276
|
* @property {unknown[]} args - arguments passing to the method.
|
|
2600
1277
|
*/
|
|
2601
|
-
class MethodInvokeRequest extends
|
|
1278
|
+
class MethodInvokeRequest extends ɵBaseRequest {
|
|
2602
1279
|
}
|
|
2603
1280
|
|
|
2604
1281
|
/**
|
|
@@ -2721,7 +1398,6 @@ function CrtModule(moduleDefinition) {
|
|
|
2721
1398
|
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
2722
1399
|
}
|
|
2723
1400
|
|
|
2724
|
-
// noinspection ES6PreferShortImport
|
|
2725
1401
|
/**
|
|
2726
1402
|
* @internal
|
|
2727
1403
|
*/
|
|
@@ -2766,7 +1442,11 @@ function CrtInject(token) {
|
|
|
2766
1442
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2767
1443
|
function CrtValidator(config) {
|
|
2768
1444
|
if (!config) {
|
|
2769
|
-
return (type) => {
|
|
1445
|
+
return (type) => {
|
|
1446
|
+
// the decorator won't do anything by itself,
|
|
1447
|
+
// but will be used by the compiler to generate class metadata,
|
|
1448
|
+
// which is required for DI
|
|
1449
|
+
};
|
|
2770
1450
|
}
|
|
2771
1451
|
return function (type) {
|
|
2772
1452
|
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
@@ -2784,7 +1464,11 @@ function CrtValidator(config) {
|
|
|
2784
1464
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2785
1465
|
function CrtRequestHandler(config) {
|
|
2786
1466
|
if (!config) {
|
|
2787
|
-
return (type) => {
|
|
1467
|
+
return (type) => {
|
|
1468
|
+
// the decorator won't do anything by itself,
|
|
1469
|
+
// but will be used by the compiler to generate class metadata,
|
|
1470
|
+
// which is required for DI
|
|
1471
|
+
};
|
|
2788
1472
|
}
|
|
2789
1473
|
return function (type) {
|
|
2790
1474
|
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
@@ -2973,10 +1657,7 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
2973
1657
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
2974
1658
|
});
|
|
2975
1659
|
}
|
|
2976
|
-
|
|
2977
|
-
* @internal
|
|
2978
|
-
*/
|
|
2979
|
-
function _bootstrapCrtModule(name, type, options) {
|
|
1660
|
+
function bootstrapDefaultCrtModule(name, type, options) {
|
|
2980
1661
|
try {
|
|
2981
1662
|
const moduleDefinition = getModuleMetadata(type);
|
|
2982
1663
|
if (moduleDefinition.viewElements) {
|
|
@@ -2995,12 +1676,34 @@ function _bootstrapCrtModule(name, type, options) {
|
|
|
2995
1676
|
if (moduleDefinition.converters) {
|
|
2996
1677
|
registerConverters(moduleDefinition.converters, options);
|
|
2997
1678
|
}
|
|
2998
|
-
moduleDefinition.includes?.forEach((t) =>
|
|
1679
|
+
moduleDefinition.includes?.forEach((t) => {
|
|
1680
|
+
bootstrapDefaultCrtModule(name, t, options);
|
|
1681
|
+
bootstrapPredefinedModules(name, t, options);
|
|
1682
|
+
});
|
|
2999
1683
|
}
|
|
3000
1684
|
catch (error) {
|
|
3001
1685
|
console.error(error);
|
|
3002
1686
|
}
|
|
3003
1687
|
}
|
|
1688
|
+
/**
|
|
1689
|
+
* @internal
|
|
1690
|
+
*/
|
|
1691
|
+
function bootstrapPredefinedModules(name, type, options) {
|
|
1692
|
+
const modulePrefix = 'module:';
|
|
1693
|
+
const metadataKeys = Reflect.getOwnMetadataKeys(type);
|
|
1694
|
+
for (const key of metadataKeys) {
|
|
1695
|
+
if (typeof key === 'string' && key.startsWith(modulePrefix)) {
|
|
1696
|
+
const moduleType = key.substring(modulePrefix.length);
|
|
1697
|
+
const predefinedBootstrapper = Reflect.getOwnMetadata('moduleBootstrapper:' + moduleType, type);
|
|
1698
|
+
try {
|
|
1699
|
+
predefinedBootstrapper(name, type, options);
|
|
1700
|
+
}
|
|
1701
|
+
catch (error) {
|
|
1702
|
+
console.error(error);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
3004
1707
|
/**
|
|
3005
1708
|
* @internal
|
|
3006
1709
|
*/
|
|
@@ -3017,7 +1720,8 @@ function bootstrapCrtModule(...args) {
|
|
|
3017
1720
|
throw new Error('Host module cannot have name');
|
|
3018
1721
|
}
|
|
3019
1722
|
}
|
|
3020
|
-
|
|
1723
|
+
bootstrapDefaultCrtModule(name, type, options);
|
|
1724
|
+
bootstrapPredefinedModules(name, type, options);
|
|
3021
1725
|
if (options.moduleType === 'remote') {
|
|
3022
1726
|
BootstrapNotifier.instance.notify(type);
|
|
3023
1727
|
}
|
|
@@ -3097,11 +1801,11 @@ class BaseRequestHandler {
|
|
|
3097
1801
|
}
|
|
3098
1802
|
/**
|
|
3099
1803
|
* @description Method to set request handler to handler chain.
|
|
3100
|
-
* @param next - link for next request handler - {@link
|
|
1804
|
+
* @param next - link for next request handler - {@link ɵRequestHandler}
|
|
3101
1805
|
*/
|
|
3102
1806
|
setNext(next) {
|
|
3103
1807
|
if (this._next) {
|
|
3104
|
-
throw new
|
|
1808
|
+
throw new ɵNextHandlerAlreadySpecifiedException();
|
|
3105
1809
|
}
|
|
3106
1810
|
this._next = next;
|
|
3107
1811
|
}
|
|
@@ -3197,13 +1901,13 @@ __decorate([
|
|
|
3197
1901
|
* @public
|
|
3198
1902
|
* @class SysSetting
|
|
3199
1903
|
* @classdesc Class contains info related system setting
|
|
3200
|
-
* @property {
|
|
1904
|
+
* @property {ɵGuid} id - id of system setting.
|
|
3201
1905
|
* @property {string} name - name of system setting.
|
|
3202
1906
|
* @property {string} code - code of system setting.
|
|
3203
1907
|
* @property {isCacheable} boolean - indicator whether system setting is cacheable
|
|
3204
1908
|
* @property {any} value - value of system setting
|
|
3205
1909
|
* @property {string} displayValue - display value of system setting
|
|
3206
|
-
* @property {
|
|
1910
|
+
* @property {ɵDataValueType} ɵDataValueType - system setting {@link ɵDataValueType}
|
|
3207
1911
|
*/
|
|
3208
1912
|
class SysSetting {
|
|
3209
1913
|
}
|
|
@@ -3254,27 +1958,37 @@ class HttpClientService extends BaseHandlerChainService {
|
|
|
3254
1958
|
* @description HTTP GET request.
|
|
3255
1959
|
* @return `Promise<HttpResponse> | void` {(Promise<HttpResponse> | void)}
|
|
3256
1960
|
*/
|
|
3257
|
-
get() {
|
|
1961
|
+
get() {
|
|
1962
|
+
// the method will be implemented dynamically by the decorator
|
|
1963
|
+
}
|
|
3258
1964
|
/**
|
|
3259
1965
|
* @description HTTP POST request.
|
|
3260
1966
|
* @return `Promise<HttpResponse> | void` {(Promise<HttpResponse> | void)}
|
|
3261
1967
|
*/
|
|
3262
|
-
post() {
|
|
1968
|
+
post() {
|
|
1969
|
+
// the method will be implemented dynamically by the decorator
|
|
1970
|
+
}
|
|
3263
1971
|
/**
|
|
3264
1972
|
* @description HTTP DELETE request.
|
|
3265
1973
|
* @return `Promise<HttpResponse> | void` {(Promise<HttpResponse> | void)}
|
|
3266
1974
|
*/
|
|
3267
|
-
delete() {
|
|
1975
|
+
delete() {
|
|
1976
|
+
// the method will be implemented dynamically by the decorator
|
|
1977
|
+
}
|
|
3268
1978
|
/**
|
|
3269
1979
|
* @description HTTP PUT request.
|
|
3270
1980
|
* @return `Promise<HttpResponse> | void`` {(Promise<HttpResponse> | void)}
|
|
3271
1981
|
*/
|
|
3272
|
-
put() {
|
|
1982
|
+
put() {
|
|
1983
|
+
// the method will be implemented dynamically by the decorator
|
|
1984
|
+
}
|
|
3273
1985
|
/**
|
|
3274
1986
|
* @description HTTP PATCH request.
|
|
3275
1987
|
* @return `Promise<HttpResponse> | void` {(Promise<HttpResponse> | void)}
|
|
3276
1988
|
*/
|
|
3277
|
-
patch() {
|
|
1989
|
+
patch() {
|
|
1990
|
+
// the method will be implemented dynamically by the decorator
|
|
1991
|
+
}
|
|
3278
1992
|
}
|
|
3279
1993
|
__decorate([
|
|
3280
1994
|
ImplementUsingHandlerChain(),
|
|
@@ -3318,7 +2032,7 @@ var SchemaViewMaskRequestAction;
|
|
|
3318
2032
|
/**
|
|
3319
2033
|
* @internal
|
|
3320
2034
|
*/
|
|
3321
|
-
class SchemaViewMaskRequest extends
|
|
2035
|
+
class SchemaViewMaskRequest extends ɵBaseRequest {
|
|
3322
2036
|
constructor(action, taskName, $context) {
|
|
3323
2037
|
super();
|
|
3324
2038
|
this.action = action;
|
|
@@ -3431,21 +2145,9 @@ __decorate([
|
|
|
3431
2145
|
__metadata("design:type", Function)
|
|
3432
2146
|
], Model.prototype, "_create", void 0);
|
|
3433
2147
|
|
|
3434
|
-
/**
|
|
3435
|
-
* @public
|
|
3436
|
-
*/
|
|
3437
|
-
var ModelParameterType;
|
|
3438
|
-
(function (ModelParameterType) {
|
|
3439
|
-
ModelParameterType["PrimaryColumnValue"] = "primaryColumnValue";
|
|
3440
|
-
ModelParameterType["Filter"] = "filter";
|
|
3441
|
-
ModelParameterType["PrimaryDisplayValueFilter"] = "primaryDisplayValueFilter";
|
|
3442
|
-
ModelParameterType["Empty"] = "empty";
|
|
3443
|
-
ModelParameterType["Never"] = "never";
|
|
3444
|
-
})(ModelParameterType || (ModelParameterType = {}));
|
|
3445
|
-
|
|
3446
2148
|
/**
|
|
3447
2149
|
* Generated bundle index. Do not edit.
|
|
3448
2150
|
*/
|
|
3449
2151
|
|
|
3450
|
-
export {
|
|
2152
|
+
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ConverterRegistry, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, DataRequest, DesignTimeViewElementRegistry, DesignerToolGroupType, FeatureService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LocalizableValue, MaskService, MethodInvokeRequest, Model, ModelInPageAction, PkgTopology, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SchemaViewMaskRequest, SchemaViewMaskRequestAction, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementRegistry, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, localize, objectDeepKeys, registerAngularViewElement, registerViewElement, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey, ɵBaseRegistry, ɵcheckTypeNameFormat, ɵinstantiate };
|
|
3451
2153
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|