@creatio-devkit/common 0.811.1 → 0.812.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 +11 -1
- package/esm2020/lib/base-exports.mjs +2 -2
- package/esm2020/lib/external/models/index.mjs +1 -2
- package/esm2020/lib/internal/constants/default-size.const.mjs +5 -0
- package/esm2020/lib/internal/constants/index.mjs +2 -1
- package/esm2020/lib/internal/decorators/request/request.decorator.mjs +1 -1
- package/esm2020/lib/internal/enums/index.mjs +1 -2
- package/esm2020/lib/internal/models/attribute-property-config.interface.mjs +2 -0
- package/esm2020/lib/internal/models/index.mjs +2 -1
- package/esm2020/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +2 -2
- package/esm2020/lib/internal/services/view-element-registry/view-element-registry.mjs +21 -1
- package/esm2020/lib/public/decorators/view-element/view-element.decorator.mjs +7 -1
- package/esm2020/lib/public/enums/index.mjs +2 -1
- package/esm2020/lib/public/enums/view-element-property.enum.mjs +9 -0
- package/esm2020/lib/public/models/input/input-registration-config.model.mjs +1 -1
- package/esm2020/lib/public/models/view-element/base-view-element-registration-config.mjs +1 -1
- package/esm2020/lib/public/models/view-element/index.mjs +2 -1
- package/esm2020/lib/public/models/view-element/view-element-visibility-strategy.mjs +16 -0
- package/fesm2015/creatio-devkit-common.mjs +60 -13
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +57 -13
- package/fesm2020/creatio-devkit-common.mjs.map +1 -1
- package/index.d.ts +22 -3
- package/package.json +4 -4
- package/esm2020/lib/external/models/model-init-config.mjs +0 -2
- package/esm2020/lib/internal/enums/model-in-page-action.enum.mjs +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ɵAggregationType, ɵAggregationFunction, ɵAggregationEvalType, ɵDatePartType, ɵFunctionType, ɵOrderDirection, ɵgenerateGuid, ɵ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';
|
|
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, ɵModelInPageAction as ModelInPageAction, ɵ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
5
|
import { __decorate, __metadata } from 'tslib';
|
|
@@ -191,6 +191,11 @@ const crtValidationInputPrefix = 'crtValidationInput:';
|
|
|
191
191
|
*/
|
|
192
192
|
const crtInjectPrefix = 'crtInject:';
|
|
193
193
|
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
const VIEW_ELEMENT_DEFAULT_HEIGHT = '39px';
|
|
198
|
+
|
|
194
199
|
/**
|
|
195
200
|
* @internal
|
|
196
201
|
* @hostPublicApi
|
|
@@ -231,16 +236,6 @@ var HandlerSourceType;
|
|
|
231
236
|
HandlerSourceType[HandlerSourceType["Host"] = 2] = "Host";
|
|
232
237
|
})(HandlerSourceType || (HandlerSourceType = {}));
|
|
233
238
|
|
|
234
|
-
/**
|
|
235
|
-
* @internal
|
|
236
|
-
*/
|
|
237
|
-
var ModelInPageAction;
|
|
238
|
-
(function (ModelInPageAction) {
|
|
239
|
-
ModelInPageAction["Edit"] = "edit";
|
|
240
|
-
ModelInPageAction["Add"] = "add";
|
|
241
|
-
ModelInPageAction["Copy"] = "copy";
|
|
242
|
-
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
243
|
-
|
|
244
239
|
const global$3 = window;
|
|
245
240
|
/**
|
|
246
241
|
* @public
|
|
@@ -701,7 +696,7 @@ if (!global$1.creatio.requestHandlerRegistry) {
|
|
|
701
696
|
* @internal
|
|
702
697
|
*/
|
|
703
698
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
704
|
-
const InternalRequestHandlerRegistry =
|
|
699
|
+
const InternalRequestHandlerRegistry = global$1.creatio.requestHandlerRegistry;
|
|
705
700
|
/**
|
|
706
701
|
* @internal
|
|
707
702
|
*/
|
|
@@ -804,6 +799,26 @@ class ViewElementRegistry extends ɵBaseRegistry {
|
|
|
804
799
|
const config = this.store.typeInfos.get(type);
|
|
805
800
|
return (config && 'formControlConfig' in config && config.formControlConfig?.relatesTo) || null;
|
|
806
801
|
}
|
|
802
|
+
static getViewElementInputs(type) {
|
|
803
|
+
const config = this.store.typeInfos.get(type);
|
|
804
|
+
return config?.inputs ?? {};
|
|
805
|
+
}
|
|
806
|
+
static getViewElementPropertiesDefaultValues(type) {
|
|
807
|
+
const config = this.store.typeInfos.get(type);
|
|
808
|
+
const propertiesDefaultValues = Object.entries(config?.inputs ?? {})
|
|
809
|
+
.filter(([_, inputConfig]) => Object.prototype.hasOwnProperty.call(inputConfig, 'defaultValue'))
|
|
810
|
+
.map(([propertyName, propertyConfig]) => ({
|
|
811
|
+
name: propertyName,
|
|
812
|
+
defaultValue: propertyConfig.defaultValue,
|
|
813
|
+
}));
|
|
814
|
+
return [
|
|
815
|
+
...propertiesDefaultValues,
|
|
816
|
+
{
|
|
817
|
+
name: 'visible',
|
|
818
|
+
defaultValue: true,
|
|
819
|
+
},
|
|
820
|
+
];
|
|
821
|
+
}
|
|
807
822
|
}
|
|
808
823
|
ViewElementRegistry.registryKey = viewElementRegistryKey;
|
|
809
824
|
|
|
@@ -1242,6 +1257,22 @@ var ViewElementReuseStrategy;
|
|
|
1242
1257
|
ViewElementReuseStrategy[ViewElementReuseStrategy["Rerender"] = 1] = "Rerender";
|
|
1243
1258
|
})(ViewElementReuseStrategy || (ViewElementReuseStrategy = {}));
|
|
1244
1259
|
|
|
1260
|
+
/**
|
|
1261
|
+
* @internal
|
|
1262
|
+
* @description Visibility strategy for view element.
|
|
1263
|
+
*/
|
|
1264
|
+
var ViewElementVisibilityStrategy;
|
|
1265
|
+
(function (ViewElementVisibilityStrategy) {
|
|
1266
|
+
/**
|
|
1267
|
+
* @description Default visibility strategy.
|
|
1268
|
+
*/
|
|
1269
|
+
ViewElementVisibilityStrategy["Default"] = "default";
|
|
1270
|
+
/**
|
|
1271
|
+
* @description On demand visibility strategy.
|
|
1272
|
+
*/
|
|
1273
|
+
ViewElementVisibilityStrategy["OnDemand"] = "on-demand";
|
|
1274
|
+
})(ViewElementVisibilityStrategy || (ViewElementVisibilityStrategy = {}));
|
|
1275
|
+
|
|
1245
1276
|
/**
|
|
1246
1277
|
* @public
|
|
1247
1278
|
* @description Abstract Base Validator class for designing custom validators.
|
|
@@ -1460,6 +1491,10 @@ function CrtViewElement(config) {
|
|
|
1460
1491
|
const registrationConfig = 'selector' in config
|
|
1461
1492
|
? { ...baseRegistrationConfig, selector: config.selector }
|
|
1462
1493
|
: { ...baseRegistrationConfig, typeRef: type };
|
|
1494
|
+
registrationConfig.reuseStrategy = config?.reuseStrategy ?? ViewElementReuseStrategy.Rerender;
|
|
1495
|
+
registrationConfig.defaultSize = config.defaultSize ?? {
|
|
1496
|
+
height: VIEW_ELEMENT_DEFAULT_HEIGHT,
|
|
1497
|
+
};
|
|
1463
1498
|
setViewElementMetadata(registrationConfig, type);
|
|
1464
1499
|
};
|
|
1465
1500
|
}
|
|
@@ -1595,6 +1630,15 @@ var DataSourceLoadType;
|
|
|
1595
1630
|
DataSourceLoadType["Reload"] = "reload";
|
|
1596
1631
|
})(DataSourceLoadType || (DataSourceLoadType = {}));
|
|
1597
1632
|
|
|
1633
|
+
/**
|
|
1634
|
+
* @internal
|
|
1635
|
+
*/
|
|
1636
|
+
var ViewElementProperty;
|
|
1637
|
+
(function (ViewElementProperty) {
|
|
1638
|
+
ViewElementProperty["Readonly"] = "READONLY_PROPERTY";
|
|
1639
|
+
ViewElementProperty["Disabled"] = "DISABLED_PROPERTY";
|
|
1640
|
+
})(ViewElementProperty || (ViewElementProperty = {}));
|
|
1641
|
+
|
|
1598
1642
|
/**
|
|
1599
1643
|
* @public
|
|
1600
1644
|
* @description Function allows to register user-defined component as view element in Creatio platform.
|
|
@@ -2285,5 +2329,5 @@ __decorate([
|
|
|
2285
2329
|
* Generated bundle index. Do not edit.
|
|
2286
2330
|
*/
|
|
2287
2331
|
|
|
2288
|
-
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ConverterRegistry, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, FeatureService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LocalizableValue, MaskService, MethodInvokeRequest, Model,
|
|
2332
|
+
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ConverterRegistry, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, FeatureService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LocalizableValue, MaskService, MethodInvokeRequest, Model, PkgTopology, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SchemaViewMaskRequest, SchemaViewMaskRequestAction, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementReuseStrategy, ViewElementVisibilityStrategy, _from, 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 };
|
|
2289
2333
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|