@creatio-devkit/common 0.806.1 → 0.807.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/external/functions/aggregation-adapter.mjs +49 -1
- package/esm2020/lib/external/functions/date-part-type-adapter.mjs +48 -0
- package/esm2020/lib/external/functions/function-type-adapter.mjs +28 -0
- package/esm2020/lib/external/functions/index.mjs +4 -1
- package/esm2020/lib/external/functions/order-direction-adapter.mjs +28 -0
- package/esm2020/lib/index.mjs +2 -1
- package/esm2020/lib/internal/enums/data-schema-attribute-type.enum.mjs +2 -1
- package/esm2020/lib/internal/esq/data-model/queries/entity-schema-query.mjs +3 -2
- package/esm2020/lib/internal/esq/data-model/queries/index.mjs +2 -1
- package/esm2020/lib/internal/esq/data-model/queries/insert-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/select-localization-query.mjs +7 -0
- package/esm2020/lib/internal/esq/data-model/queries/update-query.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-aggregation-config.model.mjs +2 -0
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-function-config.model.mjs +2 -0
- package/esm2020/lib/internal/model/data-schema/data-schema-validator-config.model.mjs +2 -0
- package/esm2020/lib/internal/model/data-schema/index.mjs +4 -0
- package/esm2020/lib/internal/model/data-source-config.mjs +1 -1
- package/esm2020/lib/internal/model/index.mjs +2 -3
- package/esm2020/lib/internal/models/internal-interface-designer-item-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/types/index.mjs +2 -0
- package/esm2020/lib/internal/types/localizable-values.type.mjs +2 -0
- package/esm2020/lib/public/enums/data-value-type.enum.mjs +2 -1
- package/esm2020/lib/public/esq/data-model/expressions/parameters/parameter-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +1 -1
- package/esm2020/lib/public/models/lookup-value.model.mjs +1 -1
- package/esm2020/lib/public/services/feature/feature.service.mjs +1 -1
- package/esm2020/lib/public/services/http-client/http-client.service.mjs +1 -1
- package/esm2020/lib/public/services/mask-service/mask.service.mjs +1 -1
- package/esm2020/lib/public/services/model/data-schema-attribute.mjs +1 -1
- package/esm2020/lib/public/services/model/data-schema.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-aggregation-config.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-attribute.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-function-config.mjs +2 -0
- package/esm2020/lib/public/services/model/data-source-parameter.mjs +1 -1
- package/esm2020/lib/public/services/model/index.mjs +2 -1
- package/esm2020/lib/public/services/model/model.mjs +1 -1
- package/esm2020/lib/public/services/rights/rights.service.mjs +1 -1
- package/esm2020/lib/public/services/sys-settings/sys-settings.service.mjs +1 -1
- package/esm2020/lib/public/services/sys-values/sys-values.service.mjs +1 -1
- package/esm2020/lib/public/types/aggregation-eval.type.mjs +2 -0
- package/esm2020/lib/public/types/date-part.type.mjs +2 -0
- package/esm2020/lib/public/types/function.type.mjs +2 -0
- package/esm2020/lib/public/types/guid.type.mjs +2 -2
- package/esm2020/lib/public/types/index.mjs +4 -1
- package/fesm2015/creatio-devkit-common.mjs +160 -3
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +160 -3
- package/fesm2020/creatio-devkit-common.mjs.map +1 -1
- package/{creatio-devkit-common.d.ts → index.d.ts} +105 -3
- package/package.json +7 -5
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-aggregation-config.mjs +0 -2
- package/esm2020/lib/internal/model/data-schema/data-schema-validator-config.mjs +0 -2
|
@@ -874,6 +874,7 @@ var DataSchemaAttributeType;
|
|
|
874
874
|
DataSchemaAttributeType["ForwardReferenceAttribute"] = "ForwardReference";
|
|
875
875
|
DataSchemaAttributeType["BackReferenceAttribute"] = "BackReference";
|
|
876
876
|
DataSchemaAttributeType["AggregationAttribute"] = "Aggregation";
|
|
877
|
+
DataSchemaAttributeType["FunctionAttribute"] = "Function";
|
|
877
878
|
})(DataSchemaAttributeType || (DataSchemaAttributeType = {}));
|
|
878
879
|
/**
|
|
879
880
|
* @internal
|
|
@@ -1356,6 +1357,7 @@ var DataValueType;
|
|
|
1356
1357
|
DataValueType[DataValueType["OBJECT_LIST"] = 38] = "OBJECT_LIST";
|
|
1357
1358
|
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
1358
1359
|
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
1360
|
+
DataValueType[DataValueType["FILE_LOCATOR"] = 41] = "FILE_LOCATOR";
|
|
1359
1361
|
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
1360
1362
|
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
1361
1363
|
DataValueType[DataValueType["WEB_TEXT"] = 44] = "WEB_TEXT";
|
|
@@ -1879,7 +1881,7 @@ function generateGuid() {
|
|
|
1879
1881
|
* @internal
|
|
1880
1882
|
*/
|
|
1881
1883
|
function isGuid(value) {
|
|
1882
|
-
return value && validator.test(value);
|
|
1884
|
+
return Boolean(value) && validator.test(value);
|
|
1883
1885
|
}
|
|
1884
1886
|
/**
|
|
1885
1887
|
* Checks if Guid is empty value or equal to EMPTY_GUID.
|
|
@@ -2226,6 +2228,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2226
2228
|
* Rows count to skip.
|
|
2227
2229
|
*/
|
|
2228
2230
|
this.rowsOffset = -1;
|
|
2231
|
+
this.useLocalization = true;
|
|
2229
2232
|
this._getIsPageable = () => this.rowCount > 0 && this.rowsOffset > -1;
|
|
2230
2233
|
}
|
|
2231
2234
|
// endregion
|
|
@@ -2262,7 +2265,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2262
2265
|
items: classToPlain(this._columns, { exposeUnsetFields: false, excludePrefixes: ['_'] }),
|
|
2263
2266
|
}, allColumns: false, isDistinct: this.isDistinct, ignoreDisplayValues: false, rowCount: this.rowCount, rowsOffset: this.rowsOffset, isPageable: this._getIsPageable(),
|
|
2264
2267
|
// TODO: CRM-61150: https://tscore-task/browse/CRM-61150
|
|
2265
|
-
conditionalValues: this.conditionalValues ? this.conditionalValues : null, isHierarchical: false, hierarchicalMaxDepth: 0, hierarchicalColumnName: null, hierarchicalColumnValue: null, useLocalization:
|
|
2268
|
+
conditionalValues: this.conditionalValues ? this.conditionalValues : null, isHierarchical: false, hierarchicalMaxDepth: 0, hierarchicalColumnName: null, hierarchicalColumnValue: null, useLocalization: this.useLocalization, useRecordDeactivation: false });
|
|
2266
2269
|
}
|
|
2267
2270
|
/**
|
|
2268
2271
|
* Add column.
|
|
@@ -2462,6 +2465,12 @@ __decorate([
|
|
|
2462
2465
|
__metadata("design:paramtypes", [])
|
|
2463
2466
|
], UpdateQuery.prototype, "columnValues", null);
|
|
2464
2467
|
|
|
2468
|
+
/**
|
|
2469
|
+
* @internal
|
|
2470
|
+
*/
|
|
2471
|
+
class SelectLocalizationQuery extends EntitySchemaQuery {
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2465
2474
|
/**
|
|
2466
2475
|
* @public
|
|
2467
2476
|
* @description Function allows to register user-defined component as view element in Creatio platform.
|
|
@@ -3055,10 +3064,158 @@ function toAggregationType(aggregationFunction) {
|
|
|
3055
3064
|
return AggregationType.None;
|
|
3056
3065
|
}
|
|
3057
3066
|
}
|
|
3067
|
+
/**
|
|
3068
|
+
* @internal
|
|
3069
|
+
*/
|
|
3070
|
+
function toAggregationFunction(aggregationType) {
|
|
3071
|
+
switch (aggregationType) {
|
|
3072
|
+
case AggregationType.Count:
|
|
3073
|
+
return AggregationFunction.Count;
|
|
3074
|
+
case AggregationType.Sum:
|
|
3075
|
+
return AggregationFunction.Sum;
|
|
3076
|
+
case AggregationType.Avg:
|
|
3077
|
+
return AggregationFunction.Avg;
|
|
3078
|
+
case AggregationType.Min:
|
|
3079
|
+
return AggregationFunction.Min;
|
|
3080
|
+
case AggregationType.Max:
|
|
3081
|
+
return AggregationFunction.Max;
|
|
3082
|
+
case AggregationType.TopOne:
|
|
3083
|
+
return AggregationFunction.TopOne;
|
|
3084
|
+
default:
|
|
3085
|
+
return AggregationFunction.None;
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
/**
|
|
3089
|
+
* @internal
|
|
3090
|
+
*/
|
|
3091
|
+
function toAggregationEvalType(aggregationEval) {
|
|
3092
|
+
switch (aggregationEval) {
|
|
3093
|
+
case 'all':
|
|
3094
|
+
return AggregationEvalType.All;
|
|
3095
|
+
case 'distinct':
|
|
3096
|
+
return AggregationEvalType.Distinct;
|
|
3097
|
+
default:
|
|
3098
|
+
return AggregationEvalType.None;
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
/**
|
|
3102
|
+
* @internal
|
|
3103
|
+
*/
|
|
3104
|
+
function toAggregationEval(aggregationEvalType) {
|
|
3105
|
+
switch (aggregationEvalType) {
|
|
3106
|
+
case AggregationEvalType.All:
|
|
3107
|
+
return 'all';
|
|
3108
|
+
case AggregationEvalType.Distinct:
|
|
3109
|
+
return 'distinct';
|
|
3110
|
+
default:
|
|
3111
|
+
return 'none';
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* @internal
|
|
3117
|
+
*/
|
|
3118
|
+
function toDatePartType(aggregationFunction) {
|
|
3119
|
+
switch (aggregationFunction) {
|
|
3120
|
+
case 'minute':
|
|
3121
|
+
return DatePartType.HourMinute;
|
|
3122
|
+
case 'hour':
|
|
3123
|
+
return DatePartType.Hour;
|
|
3124
|
+
case 'day':
|
|
3125
|
+
return DatePartType.Day;
|
|
3126
|
+
case 'weekday':
|
|
3127
|
+
return DatePartType.WeekDay;
|
|
3128
|
+
case 'week':
|
|
3129
|
+
return DatePartType.Week;
|
|
3130
|
+
case 'month':
|
|
3131
|
+
return DatePartType.Month;
|
|
3132
|
+
case 'year':
|
|
3133
|
+
return DatePartType.Year;
|
|
3134
|
+
default:
|
|
3135
|
+
return DatePartType.None;
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* @internal
|
|
3140
|
+
*/
|
|
3141
|
+
function toDatePart(aggregationType) {
|
|
3142
|
+
switch (aggregationType) {
|
|
3143
|
+
case DatePartType.HourMinute:
|
|
3144
|
+
return 'minute';
|
|
3145
|
+
case DatePartType.Hour:
|
|
3146
|
+
return 'hour';
|
|
3147
|
+
case DatePartType.Day:
|
|
3148
|
+
return 'day';
|
|
3149
|
+
case DatePartType.WeekDay:
|
|
3150
|
+
return 'weekday';
|
|
3151
|
+
case DatePartType.Week:
|
|
3152
|
+
return 'week';
|
|
3153
|
+
case DatePartType.Month:
|
|
3154
|
+
return 'month';
|
|
3155
|
+
case DatePartType.Year:
|
|
3156
|
+
return 'year';
|
|
3157
|
+
default:
|
|
3158
|
+
return 'none';
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
/**
|
|
3163
|
+
* @internal
|
|
3164
|
+
*/
|
|
3165
|
+
function toStringFunctionType(functionType) {
|
|
3166
|
+
switch (functionType) {
|
|
3167
|
+
case FunctionType.Aggregation:
|
|
3168
|
+
return 'aggregation';
|
|
3169
|
+
case FunctionType.DatePart:
|
|
3170
|
+
return 'datePart';
|
|
3171
|
+
default:
|
|
3172
|
+
return 'none';
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
/**
|
|
3176
|
+
* @internal
|
|
3177
|
+
*/
|
|
3178
|
+
function toNumericFunctionType(functionType) {
|
|
3179
|
+
switch (functionType) {
|
|
3180
|
+
case 'aggregation':
|
|
3181
|
+
return FunctionType.Aggregation;
|
|
3182
|
+
case 'datePart':
|
|
3183
|
+
return FunctionType.DatePart;
|
|
3184
|
+
default:
|
|
3185
|
+
return FunctionType.None;
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
/**
|
|
3190
|
+
* @internal
|
|
3191
|
+
*/
|
|
3192
|
+
function toOrderDirection(sortDirection) {
|
|
3193
|
+
switch (sortDirection) {
|
|
3194
|
+
case 'asc':
|
|
3195
|
+
return OrderDirection.Asc;
|
|
3196
|
+
case 'desc':
|
|
3197
|
+
return OrderDirection.Desc;
|
|
3198
|
+
default:
|
|
3199
|
+
return OrderDirection.None;
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
/**
|
|
3203
|
+
* @internal
|
|
3204
|
+
*/
|
|
3205
|
+
function toSortDirection(orderDirection) {
|
|
3206
|
+
switch (orderDirection) {
|
|
3207
|
+
case OrderDirection.Asc:
|
|
3208
|
+
return 'asc';
|
|
3209
|
+
case OrderDirection.Desc:
|
|
3210
|
+
return 'desc';
|
|
3211
|
+
default:
|
|
3212
|
+
return 'none';
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3058
3215
|
|
|
3059
3216
|
/**
|
|
3060
3217
|
* Generated bundle index. Do not edit.
|
|
3061
3218
|
*/
|
|
3062
3219
|
|
|
3063
|
-
export { AggregationEvalType, AggregationFunction, AggregationFunctionColumn, AggregationFunctionExpression, AggregationSubQueryColumn, AggregationSubQueryExpression, AggregationType, ArgumentEmptyException, ArgumentFunctionExpression, ArgumentOutOfRangeException, ArithmeticExpression, ArithmeticOperation, ArithmeticQueryColumn, BaseExpression, BaseFilter, BaseFilterableQuery, BaseQuery, BaseQueryColumn, BaseRegistry, BaseRequest, BaseRequestHandler, BaseValidator, BetweenFilter, BootstrapNotifier, ColumnExpression, CompareFilter, ComparisonType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, DataRequest, DataSchemaAttributeType, DataSchemaAttributeUsageType, DataSourceScope, DataValueType, DatePartFunctionColumn, DatePartFunctionExpression, DatePartType, DefaultValueSource, DeleteQuery, DesignTimeViewElementRegistry, DesignerToolGroupType, EMPTY_GUID, EXPRESSION_TYPE_MOCK, EntityQueryColumn, EntitySchemaQuery, ExistsFilter, ExpressionMock, ExpressionType, FeatureService, FilterGroup, FilterMock, FilterType, FunctionExpression, FunctionType, GlobalConvertersRegistryService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InFilter, InsertQuery, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, IsNullFilter, ItemNotFoundException, LengthFunctionColumn, LengthFunctionExpression, LocalizableValue, LogicalOperatorType, MacrosFunctionColumn, MacrosFunctionExpression, MaskService, MethodInvokeRequest, Model, ModelInPageAction, ModelParameterType, NextHandlerAlreadySpecifiedException, OrderDirection, ParameterExpression, ParameterQueryColumn, PkgTopology, QueryMacrosType, QueryOperationType, RemoteEntriesRegistry, RequestHandlerRegistryService, RequestRegistryService, RightsService, SingleFilter, SubQueryColumn, SubQueryExpression, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, UpdateQuery, ValidationUtilities, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementRegistry, WindowFunctionColumn, WindowFunctionExpression, _bootstrapCrtModule, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, designTimeViewElementRegistryKey, generateGuid, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, isEmptyGuid, isGuid, localize, objectDeepKeys, registerAngularViewElement, registerViewElement, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationType, toPascalCase, validatorRegistryKey, viewElementRegistryKey };
|
|
3220
|
+
export { AggregationEvalType, AggregationFunction, AggregationFunctionColumn, AggregationFunctionExpression, AggregationSubQueryColumn, AggregationSubQueryExpression, AggregationType, ArgumentEmptyException, ArgumentFunctionExpression, ArgumentOutOfRangeException, ArithmeticExpression, ArithmeticOperation, ArithmeticQueryColumn, BaseExpression, BaseFilter, BaseFilterableQuery, BaseQuery, BaseQueryColumn, BaseRegistry, BaseRequest, BaseRequestHandler, BaseValidator, BetweenFilter, BootstrapNotifier, ColumnExpression, CompareFilter, ComparisonType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, DataRequest, DataSchemaAttributeType, DataSchemaAttributeUsageType, DataSourceScope, DataValueType, DatePartFunctionColumn, DatePartFunctionExpression, DatePartType, DefaultValueSource, DeleteQuery, DesignTimeViewElementRegistry, DesignerToolGroupType, EMPTY_GUID, EXPRESSION_TYPE_MOCK, EntityQueryColumn, EntitySchemaQuery, ExistsFilter, ExpressionMock, ExpressionType, FeatureService, FilterGroup, FilterMock, FilterType, FunctionExpression, FunctionType, GlobalConvertersRegistryService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InFilter, InsertQuery, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, IsNullFilter, ItemNotFoundException, LengthFunctionColumn, LengthFunctionExpression, LocalizableValue, LogicalOperatorType, MacrosFunctionColumn, MacrosFunctionExpression, MaskService, MethodInvokeRequest, Model, ModelInPageAction, ModelParameterType, NextHandlerAlreadySpecifiedException, OrderDirection, ParameterExpression, ParameterQueryColumn, PkgTopology, QueryMacrosType, QueryOperationType, RemoteEntriesRegistry, RequestHandlerRegistryService, RequestRegistryService, RightsService, SelectLocalizationQuery, SingleFilter, SubQueryColumn, SubQueryExpression, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, UpdateQuery, ValidationUtilities, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementRegistry, WindowFunctionColumn, WindowFunctionExpression, _bootstrapCrtModule, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, designTimeViewElementRegistryKey, generateGuid, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, isEmptyGuid, isGuid, localize, objectDeepKeys, registerAngularViewElement, registerViewElement, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey };
|
|
3064
3221
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|