@creatio-devkit/common 0.821.0 → 0.823.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 +7 -0
- package/esm2022/lib/internal/models/data-source-load-parameters.mjs +2 -0
- package/esm2022/lib/internal/models/index.mjs +3 -1
- package/esm2022/lib/internal/models/internal-module-definition.mjs +1 -1
- package/esm2022/lib/internal/models/lazy-module-metadata.mjs +1 -1
- package/esm2022/lib/internal/models/lazy-module-ref.mjs +4 -4
- package/esm2022/lib/internal/models/lazy-registry-item.mjs +1 -1
- package/esm2022/lib/internal/services/global-converters-registry/converter-registry.mjs +8 -4
- package/esm2022/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +46 -21
- package/esm2022/lib/internal/services/validator-registry/validator-registry.mjs +9 -6
- package/esm2022/lib/public/decorators/inject/inject.decorator.mjs +1 -1
- package/esm2022/lib/public/enums/index.mjs +2 -1
- package/esm2022/lib/public/enums/process-status.enum.mjs +28 -0
- package/esm2022/lib/public/functions/bootstrap-crt-module.mjs +66 -19
- package/esm2022/lib/public/models/index.mjs +2 -1
- package/esm2022/lib/public/models/process-engine/index.mjs +4 -0
- package/esm2022/lib/public/models/process-engine/process-parameter-value.model.mjs +2 -0
- package/esm2022/lib/public/models/process-engine/run-process-request.model.mjs +12 -0
- package/esm2022/lib/public/models/process-engine/run-process-response.model.mjs +2 -0
- package/esm2022/lib/public/services/index.mjs +2 -1
- package/esm2022/lib/public/services/process-engine/index.mjs +2 -0
- package/esm2022/lib/public/services/process-engine/process-engine.service.mjs +27 -0
- package/esm2022/lib/public/services/sys-values/sys-values.mjs +1 -1
- package/fesm2022/creatio-devkit-common.mjs +193 -50
- package/fesm2022/creatio-devkit-common.mjs.map +1 -1
- package/index.d.ts +137 -1
- package/package.json +2 -2
|
@@ -998,12 +998,19 @@ class InternalRequestHandlerRegistryType {
|
|
|
998
998
|
static { this._addItemListeners = []; }
|
|
999
999
|
static { this._removeItemListeners = []; }
|
|
1000
1000
|
static { this._requestHandlersMap = new Map(); }
|
|
1001
|
+
static { this._handlersByRequestMap = new Map(); }
|
|
1001
1002
|
/**
|
|
1002
1003
|
* @publicHostApi
|
|
1003
1004
|
*/
|
|
1004
1005
|
static get requestHandlersMap() {
|
|
1005
1006
|
return this._requestHandlersMap;
|
|
1006
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* @publicHostApi
|
|
1010
|
+
*/
|
|
1011
|
+
static get handlersByRequestMap() {
|
|
1012
|
+
return this._handlersByRequestMap;
|
|
1013
|
+
}
|
|
1007
1014
|
/**
|
|
1008
1015
|
* @publicHostApi
|
|
1009
1016
|
*/
|
|
@@ -1027,31 +1034,46 @@ class InternalRequestHandlerRegistryType {
|
|
|
1027
1034
|
*/
|
|
1028
1035
|
static addRequestHandler(handlerType, config) {
|
|
1029
1036
|
const existingHandler = this._requestHandlersMap.get(handlerType);
|
|
1030
|
-
if (
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1037
|
+
if (existingHandler && (!existingHandler.instanceConfig?.lazy || existingHandler.instanceType)) {
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
const mergedConfig = {
|
|
1041
|
+
instanceType: config.instanceType,
|
|
1042
|
+
instanceConfig: {
|
|
1043
|
+
...(existingHandler?.instanceConfig ?? {}),
|
|
1044
|
+
...config.instanceConfig,
|
|
1045
|
+
},
|
|
1046
|
+
};
|
|
1047
|
+
this._requestHandlersMap.set(handlerType, mergedConfig);
|
|
1048
|
+
for (const listener of this._addItemListeners) {
|
|
1049
|
+
listener(handlerType, mergedConfig);
|
|
1050
|
+
}
|
|
1051
|
+
const requestType = config.instanceConfig.requestType;
|
|
1052
|
+
let requestHandlerConfigs = this._handlersByRequestMap.get(requestType);
|
|
1053
|
+
if (!requestHandlerConfigs) {
|
|
1054
|
+
requestHandlerConfigs = new Map();
|
|
1055
|
+
this._handlersByRequestMap.set(requestType, requestHandlerConfigs);
|
|
1042
1056
|
}
|
|
1057
|
+
requestHandlerConfigs.set(handlerType, mergedConfig);
|
|
1043
1058
|
}
|
|
1044
1059
|
/**
|
|
1045
1060
|
* @publicHostApi
|
|
1046
1061
|
*/
|
|
1047
1062
|
static removeRequestHandler(handlerType) {
|
|
1048
1063
|
const config = this._requestHandlersMap.get(handlerType);
|
|
1049
|
-
if (config) {
|
|
1050
|
-
|
|
1051
|
-
for (const listener of this._removeItemListeners) {
|
|
1052
|
-
listener(handlerType, config);
|
|
1053
|
-
}
|
|
1064
|
+
if (!config) {
|
|
1065
|
+
return;
|
|
1054
1066
|
}
|
|
1067
|
+
this._requestHandlersMap.delete(handlerType);
|
|
1068
|
+
for (const listener of this._removeItemListeners) {
|
|
1069
|
+
listener(handlerType, config);
|
|
1070
|
+
}
|
|
1071
|
+
const requestType = config.instanceConfig.requestType;
|
|
1072
|
+
const handlerTypes = this._handlersByRequestMap.get(requestType);
|
|
1073
|
+
if (!handlerTypes) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
handlerTypes.delete(handlerType);
|
|
1055
1077
|
}
|
|
1056
1078
|
static clear() {
|
|
1057
1079
|
for (const type of this._requestHandlersMap.keys()) {
|
|
@@ -1077,19 +1099,22 @@ const InternalRequestHandlerRegistry = global$1.creatio.requestHandlerRegistry;
|
|
|
1077
1099
|
*/
|
|
1078
1100
|
class RequestHandlerRegistryService {
|
|
1079
1101
|
static { this._internalRegistry = global$1.creatio.requestHandlerRegistry; }
|
|
1102
|
+
static find(requestHandlerType) {
|
|
1103
|
+
return RequestHandlerRegistryService._internalRegistry.requestHandlersMap.get(requestHandlerType);
|
|
1104
|
+
}
|
|
1080
1105
|
/**
|
|
1081
1106
|
* Register request handler class.
|
|
1082
1107
|
* @param config Request handler registration config.
|
|
1083
|
-
* @param
|
|
1108
|
+
* @param typeRef Request handler type reference (constructor).
|
|
1084
1109
|
*/
|
|
1085
|
-
static register(config,
|
|
1110
|
+
static register(config, typeRef) {
|
|
1086
1111
|
const requestType = config.requestType;
|
|
1087
1112
|
const requestHandlerType = config.type;
|
|
1088
1113
|
if (!requestType) {
|
|
1089
1114
|
throw new Error(`Error when register ${requestHandlerType}. Request type not specified.`);
|
|
1090
1115
|
}
|
|
1091
1116
|
const requestHandlerMapValue = {
|
|
1092
|
-
instanceType:
|
|
1117
|
+
instanceType: typeRef,
|
|
1093
1118
|
instanceConfig: config,
|
|
1094
1119
|
};
|
|
1095
1120
|
RequestHandlerRegistryService._internalRegistry.addRequestHandler(requestHandlerType, requestHandlerMapValue);
|
|
@@ -1137,17 +1162,21 @@ class ConverterRegistry extends ɵBaseRegistry {
|
|
|
1137
1162
|
static has(type) {
|
|
1138
1163
|
return this.store.typeInfos.has(type);
|
|
1139
1164
|
}
|
|
1165
|
+
static find(type) {
|
|
1166
|
+
return this.store.typeInfos.get(type);
|
|
1167
|
+
}
|
|
1140
1168
|
static get(type) {
|
|
1141
|
-
|
|
1169
|
+
const registryItem = this.find(type);
|
|
1170
|
+
if (!registryItem) {
|
|
1142
1171
|
throw new Error(`'${type}' converter doesn't exist`);
|
|
1143
1172
|
}
|
|
1144
|
-
return
|
|
1173
|
+
return registryItem;
|
|
1145
1174
|
}
|
|
1146
1175
|
static register(item) {
|
|
1147
1176
|
checkTypeNameFormat(item.type, 'ConverterTypeName');
|
|
1148
1177
|
checkCrtTypeNamePascalCase(item.type);
|
|
1149
1178
|
// TODO RND-21723
|
|
1150
|
-
const existingItem = this.
|
|
1179
|
+
const existingItem = this.find(item.type);
|
|
1151
1180
|
this.store.typeInfos.set(item.type, {
|
|
1152
1181
|
...(existingItem ?? {}),
|
|
1153
1182
|
...item,
|
|
@@ -1354,16 +1383,19 @@ const validatorRegistryKey = 'ValidatorRegistry';
|
|
|
1354
1383
|
*/
|
|
1355
1384
|
class ValidatorRegistry extends ɵBaseRegistry {
|
|
1356
1385
|
static { this.registryKey = validatorRegistryKey; }
|
|
1357
|
-
static
|
|
1358
|
-
const
|
|
1359
|
-
if (
|
|
1386
|
+
static _hasWithAnotherTypeRef(configType, typeRef) {
|
|
1387
|
+
const existingItem = ValidatorRegistry.items.get(configType);
|
|
1388
|
+
if (!existingItem) {
|
|
1389
|
+
return false;
|
|
1390
|
+
}
|
|
1391
|
+
if (existingItem.lazy && !existingItem.typeRef) {
|
|
1360
1392
|
return false;
|
|
1361
1393
|
}
|
|
1362
|
-
return
|
|
1394
|
+
return existingItem.typeRef !== typeRef;
|
|
1363
1395
|
}
|
|
1364
1396
|
static validate(config) {
|
|
1365
1397
|
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
1366
|
-
if (config.typeRef && ValidatorRegistry.
|
|
1398
|
+
if (config.typeRef && ValidatorRegistry._hasWithAnotherTypeRef(config.type, config.typeRef)) {
|
|
1367
1399
|
throw new Error(`Error when register ${config.type}. Element with this type has already exist`);
|
|
1368
1400
|
}
|
|
1369
1401
|
}
|
|
@@ -1456,16 +1488,16 @@ class LazyModuleRef {
|
|
|
1456
1488
|
get typeRef() {
|
|
1457
1489
|
return this._typeRef;
|
|
1458
1490
|
}
|
|
1459
|
-
constructor(
|
|
1491
|
+
constructor(_moduleDefinition, _bootstrapFn,
|
|
1460
1492
|
/** Name of source build ('host' or remote name) */
|
|
1461
1493
|
sourceName) {
|
|
1462
|
-
this.
|
|
1494
|
+
this._moduleDefinition = _moduleDefinition;
|
|
1463
1495
|
this._bootstrapFn = _bootstrapFn;
|
|
1464
1496
|
this.sourceName = sourceName;
|
|
1465
1497
|
}
|
|
1466
1498
|
loadAndBootstrap() {
|
|
1467
1499
|
if (!this._modulePromise) {
|
|
1468
|
-
this._modulePromise = this.
|
|
1500
|
+
this._modulePromise = this._moduleDefinition.load().then((type) => {
|
|
1469
1501
|
this._typeRef = type;
|
|
1470
1502
|
this._bootstrapFn(type);
|
|
1471
1503
|
return type;
|
|
@@ -1675,6 +1707,18 @@ class LocalizableValue {
|
|
|
1675
1707
|
}
|
|
1676
1708
|
}
|
|
1677
1709
|
|
|
1710
|
+
/**
|
|
1711
|
+
* @public
|
|
1712
|
+
* @class
|
|
1713
|
+
* @classdesc Class representing a request to run a process.
|
|
1714
|
+
* @property {Guid} schemaUId - The unique identifier of the process schema.
|
|
1715
|
+
* @property {string} schemaName - The name of the process schema.
|
|
1716
|
+
* @property {ProcessParameterValue[]} parameterValues - The values of the process parameters.
|
|
1717
|
+
* @property {string[]} resultParameterNames - The names of the resulting process parameters.
|
|
1718
|
+
*/
|
|
1719
|
+
class RunProcessRequest {
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1678
1722
|
/**
|
|
1679
1723
|
* @internal
|
|
1680
1724
|
*/
|
|
@@ -1704,6 +1748,12 @@ function checkRemoteName(remoteName) {
|
|
|
1704
1748
|
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
1705
1749
|
}
|
|
1706
1750
|
}
|
|
1751
|
+
function skipLazyModuleIfItemIsNonLazy(options) {
|
|
1752
|
+
return !options?.featureValues?.LoadLazyModuleEvenIfItemIsNonLazy;
|
|
1753
|
+
}
|
|
1754
|
+
function isItemRegisteredByNonLazyModule(item) {
|
|
1755
|
+
return Boolean(item && !item.lazy && item.typeRef);
|
|
1756
|
+
}
|
|
1707
1757
|
/**
|
|
1708
1758
|
* @internal
|
|
1709
1759
|
*/
|
|
@@ -1720,9 +1770,13 @@ function resistantForEach(items, callback) {
|
|
|
1720
1770
|
/**
|
|
1721
1771
|
* @internal
|
|
1722
1772
|
*/
|
|
1723
|
-
function registerViewElements(types) {
|
|
1773
|
+
function registerViewElements(types, options) {
|
|
1724
1774
|
resistantForEach(types, (type) => {
|
|
1725
1775
|
const registrationConfig = getViewElementMetadata(type);
|
|
1776
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1777
|
+
registrationConfig.lazy = false;
|
|
1778
|
+
registrationConfig.lazyModuleRef = null;
|
|
1779
|
+
}
|
|
1726
1780
|
ViewElementRegistry.validate(registrationConfig);
|
|
1727
1781
|
ViewElementRegistry.register(registrationConfig);
|
|
1728
1782
|
});
|
|
@@ -1730,8 +1784,14 @@ function registerViewElements(types) {
|
|
|
1730
1784
|
/**
|
|
1731
1785
|
* @internal
|
|
1732
1786
|
*/
|
|
1733
|
-
function registerLazyViewElements(configs, lazyModuleRef) {
|
|
1787
|
+
function registerLazyViewElements(configs, options, lazyModuleRef) {
|
|
1734
1788
|
resistantForEach(configs, (config) => {
|
|
1789
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1790
|
+
const existingRegistryItem = ViewElementRegistry.viewElements.get(config.type);
|
|
1791
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1735
1795
|
const registryItem = { ...config, lazy: true, lazyModuleRef };
|
|
1736
1796
|
ViewElementRegistry.validate(registryItem);
|
|
1737
1797
|
ViewElementRegistry.register(registryItem);
|
|
@@ -1772,12 +1832,16 @@ function registerValidators(types, options) {
|
|
|
1772
1832
|
const registrationConfig = {
|
|
1773
1833
|
...metadata,
|
|
1774
1834
|
instantiate: function (injectionContext) {
|
|
1775
|
-
const resolveDependency = options
|
|
1835
|
+
const resolveDependency = options.resolveDependency
|
|
1776
1836
|
? (token) => options.resolveDependency(token, injectionContext)
|
|
1777
1837
|
: null;
|
|
1778
1838
|
return instantiate(type, resolveDependency);
|
|
1779
1839
|
},
|
|
1780
1840
|
};
|
|
1841
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1842
|
+
registrationConfig.lazy = false;
|
|
1843
|
+
registrationConfig.lazyModuleRef = null;
|
|
1844
|
+
}
|
|
1781
1845
|
ValidatorRegistry.validate(registrationConfig);
|
|
1782
1846
|
ValidatorRegistry.register(registrationConfig);
|
|
1783
1847
|
});
|
|
@@ -1785,8 +1849,14 @@ function registerValidators(types, options) {
|
|
|
1785
1849
|
/**
|
|
1786
1850
|
* @internal
|
|
1787
1851
|
*/
|
|
1788
|
-
function registerLazyValidators(configs, lazyModuleRef) {
|
|
1852
|
+
function registerLazyValidators(configs, options, lazyModuleRef) {
|
|
1789
1853
|
resistantForEach(configs, (config) => {
|
|
1854
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1855
|
+
const existingRegistryItem = ValidatorRegistry.items.get(config.type);
|
|
1856
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1857
|
+
return;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1790
1860
|
const registryItem = { ...config, lazy: true, lazyModuleRef };
|
|
1791
1861
|
ValidatorRegistry.validate(registryItem);
|
|
1792
1862
|
ValidatorRegistry.register(registryItem);
|
|
@@ -1807,14 +1877,24 @@ function registerConverters(types, options) {
|
|
|
1807
1877
|
return instantiate(type, resolveDependency);
|
|
1808
1878
|
},
|
|
1809
1879
|
};
|
|
1880
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1881
|
+
registrationConfig.lazy = false;
|
|
1882
|
+
registrationConfig.lazyModuleRef = null;
|
|
1883
|
+
}
|
|
1810
1884
|
ConverterRegistry.register(registrationConfig);
|
|
1811
1885
|
});
|
|
1812
1886
|
}
|
|
1813
1887
|
/**
|
|
1814
1888
|
* @internal
|
|
1815
1889
|
*/
|
|
1816
|
-
function registerLazyConverters(descriptors, lazyModuleRef) {
|
|
1890
|
+
function registerLazyConverters(descriptors, options, lazyModuleRef) {
|
|
1817
1891
|
resistantForEach(descriptors, (descriptor) => {
|
|
1892
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1893
|
+
const existingRegistryItem = ConverterRegistry.find(descriptor.type);
|
|
1894
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1818
1898
|
const registryItem = { ...descriptor, lazy: true, lazyModuleRef };
|
|
1819
1899
|
ConverterRegistry.register(registryItem);
|
|
1820
1900
|
});
|
|
@@ -1854,6 +1934,10 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
1854
1934
|
createHandler,
|
|
1855
1935
|
};
|
|
1856
1936
|
}
|
|
1937
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1938
|
+
registrationConfig.lazy = false;
|
|
1939
|
+
registrationConfig.lazyModuleRef = null;
|
|
1940
|
+
}
|
|
1857
1941
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
1858
1942
|
});
|
|
1859
1943
|
}
|
|
@@ -1862,6 +1946,12 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
1862
1946
|
*/
|
|
1863
1947
|
function registerLazyRequestHandlers(descriptors, options, remoteName, lazyModuleRef) {
|
|
1864
1948
|
resistantForEach(descriptors, (descriptor) => {
|
|
1949
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1950
|
+
const existingRegistryItem = RequestHandlerRegistryService.find(descriptor.type)?.instanceConfig;
|
|
1951
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1865
1955
|
const registrationConfig = {
|
|
1866
1956
|
...descriptor,
|
|
1867
1957
|
lazy: true,
|
|
@@ -1886,16 +1976,16 @@ function registerLazyRequestHandlers(descriptors, options, remoteName, lazyModul
|
|
|
1886
1976
|
function bootstrapLazyCrtModule(name, descriptor, options, lazyModuleRef) {
|
|
1887
1977
|
try {
|
|
1888
1978
|
if (descriptor.viewElements) {
|
|
1889
|
-
registerLazyViewElements(descriptor.viewElements, lazyModuleRef);
|
|
1979
|
+
registerLazyViewElements(descriptor.viewElements, options, lazyModuleRef);
|
|
1890
1980
|
}
|
|
1891
1981
|
if (descriptor.requestHandlers) {
|
|
1892
1982
|
registerLazyRequestHandlers(descriptor.requestHandlers, options, name, lazyModuleRef);
|
|
1893
1983
|
}
|
|
1894
1984
|
if (descriptor.validators) {
|
|
1895
|
-
registerLazyValidators(descriptor.validators, lazyModuleRef);
|
|
1985
|
+
registerLazyValidators(descriptor.validators, options, lazyModuleRef);
|
|
1896
1986
|
}
|
|
1897
1987
|
if (descriptor.converters) {
|
|
1898
|
-
registerLazyConverters(descriptor.converters, lazyModuleRef);
|
|
1988
|
+
registerLazyConverters(descriptor.converters, options, lazyModuleRef);
|
|
1899
1989
|
}
|
|
1900
1990
|
descriptor.includes?.forEach((m) => {
|
|
1901
1991
|
bootstrapLazyCrtModule(name, m, options, lazyModuleRef);
|
|
@@ -1917,7 +2007,7 @@ function bootstrapDefaultCrtModule(name, type, options, root) {
|
|
|
1917
2007
|
try {
|
|
1918
2008
|
const moduleDefinition = getModuleMetadata(type);
|
|
1919
2009
|
if (moduleDefinition.viewElements) {
|
|
1920
|
-
registerViewElements(moduleDefinition.viewElements);
|
|
2010
|
+
registerViewElements(moduleDefinition.viewElements, options);
|
|
1921
2011
|
registerInterfaceDesignerItems(moduleDefinition.viewElements, options?.localizeMetadata);
|
|
1922
2012
|
}
|
|
1923
2013
|
if (moduleDefinition.designTimeViewElements) {
|
|
@@ -1932,18 +2022,18 @@ function bootstrapDefaultCrtModule(name, type, options, root) {
|
|
|
1932
2022
|
if (moduleDefinition.converters) {
|
|
1933
2023
|
registerConverters(moduleDefinition.converters, options);
|
|
1934
2024
|
}
|
|
1935
|
-
moduleDefinition.includes?.forEach((
|
|
1936
|
-
if (typeof
|
|
1937
|
-
bootstrapDefaultCrtModule(name,
|
|
1938
|
-
bootstrapPredefinedModules(name,
|
|
2025
|
+
moduleDefinition.includes?.forEach((includedModuleMetadata) => {
|
|
2026
|
+
if (typeof includedModuleMetadata === 'function') {
|
|
2027
|
+
bootstrapDefaultCrtModule(name, includedModuleMetadata, options, false);
|
|
2028
|
+
bootstrapPredefinedModules(name, includedModuleMetadata, options);
|
|
1939
2029
|
}
|
|
1940
|
-
else if (typeof
|
|
2030
|
+
else if (typeof includedModuleMetadata === 'object') {
|
|
1941
2031
|
if (options.moduleType === 'remote' && !name) {
|
|
1942
2032
|
console.error("To use lazy loading, 'remoteName' parameter should be specified.");
|
|
1943
2033
|
return;
|
|
1944
2034
|
}
|
|
1945
|
-
const ref = new LazyModuleRef(
|
|
1946
|
-
bootstrapLazyCrtModule(name,
|
|
2035
|
+
const ref = new LazyModuleRef(includedModuleMetadata, (x) => bootstrapDefaultCrtModule(name, x, { ...options, lazy: true }, false), source);
|
|
2036
|
+
bootstrapLazyCrtModule(name, includedModuleMetadata, options, ref);
|
|
1947
2037
|
LazyModulesManager.instance.add(ref);
|
|
1948
2038
|
}
|
|
1949
2039
|
});
|
|
@@ -1987,8 +2077,9 @@ function bootstrapCrtModule(...args) {
|
|
|
1987
2077
|
throw new Error('Host module cannot have name');
|
|
1988
2078
|
}
|
|
1989
2079
|
}
|
|
1990
|
-
|
|
1991
|
-
|
|
2080
|
+
const internalOptions = { ...options, lazy: false };
|
|
2081
|
+
bootstrapDefaultCrtModule(name, type, internalOptions, true);
|
|
2082
|
+
bootstrapPredefinedModules(name, type, internalOptions);
|
|
1992
2083
|
if (options.moduleType === 'remote') {
|
|
1993
2084
|
BootstrapNotifier.instance.notify(type);
|
|
1994
2085
|
}
|
|
@@ -2361,6 +2452,34 @@ var DataSourceLoadType;
|
|
|
2361
2452
|
DataSourceLoadType["Reload"] = "reload";
|
|
2362
2453
|
})(DataSourceLoadType || (DataSourceLoadType = {}));
|
|
2363
2454
|
|
|
2455
|
+
/**
|
|
2456
|
+
* @public
|
|
2457
|
+
* @description Enum representing the status of a process.
|
|
2458
|
+
*/
|
|
2459
|
+
var ProcessStatus;
|
|
2460
|
+
(function (ProcessStatus) {
|
|
2461
|
+
/**
|
|
2462
|
+
* The process is inactive.
|
|
2463
|
+
*/
|
|
2464
|
+
ProcessStatus[ProcessStatus["Inactive"] = 0] = "Inactive";
|
|
2465
|
+
/**
|
|
2466
|
+
* The process is currently running.
|
|
2467
|
+
*/
|
|
2468
|
+
ProcessStatus[ProcessStatus["Running"] = 1] = "Running";
|
|
2469
|
+
/**
|
|
2470
|
+
* The process has completed successfully.
|
|
2471
|
+
*/
|
|
2472
|
+
ProcessStatus[ProcessStatus["Completed"] = 2] = "Completed";
|
|
2473
|
+
/**
|
|
2474
|
+
* The process encountered an error.
|
|
2475
|
+
*/
|
|
2476
|
+
ProcessStatus[ProcessStatus["Error"] = 3] = "Error";
|
|
2477
|
+
/**
|
|
2478
|
+
* The process was cancelled.
|
|
2479
|
+
*/
|
|
2480
|
+
ProcessStatus[ProcessStatus["Cancelled"] = 4] = "Cancelled";
|
|
2481
|
+
})(ProcessStatus || (ProcessStatus = {}));
|
|
2482
|
+
|
|
2364
2483
|
/**
|
|
2365
2484
|
* @internal
|
|
2366
2485
|
*/
|
|
@@ -2825,9 +2944,33 @@ __decorate([
|
|
|
2825
2944
|
__metadata("design:type", Function)
|
|
2826
2945
|
], MessageChannelService.prototype, "sendMessage", void 0);
|
|
2827
2946
|
|
|
2947
|
+
/**
|
|
2948
|
+
* @public
|
|
2949
|
+
* @class ProcessEngineService
|
|
2950
|
+
* @classdesc Service, used for starting and completing business processes using handler chain
|
|
2951
|
+
* @extends {BaseHandlerChainService}
|
|
2952
|
+
*/
|
|
2953
|
+
class ProcessEngineService extends BaseHandlerChainService {
|
|
2954
|
+
constructor() {
|
|
2955
|
+
super(...arguments);
|
|
2956
|
+
/**
|
|
2957
|
+
* @internal
|
|
2958
|
+
*/
|
|
2959
|
+
this.requestType = 'crt.ProcessEngineService';
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
__decorate([
|
|
2963
|
+
ImplementUsingHandlerChain(),
|
|
2964
|
+
__metadata("design:type", Function)
|
|
2965
|
+
], ProcessEngineService.prototype, "executeProcessByName", void 0);
|
|
2966
|
+
__decorate([
|
|
2967
|
+
ImplementUsingHandlerChain(),
|
|
2968
|
+
__metadata("design:type", Function)
|
|
2969
|
+
], ProcessEngineService.prototype, "completeExecuting", void 0);
|
|
2970
|
+
|
|
2828
2971
|
/**
|
|
2829
2972
|
* Generated bundle index. Do not edit.
|
|
2830
2973
|
*/
|
|
2831
2974
|
|
|
2832
|
-
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ChatMessageTypeRegistry, ConverterRegistry, CrtChatMessageType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, DialogService, FeatureService, HandleViewModelAttributeChangeRequest, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LazyModuleRef, LazyModulesManager, LicenseService, LocalizableValue, MaskService, MessageChannelService, MethodInvokeRequest, Model, PkgTopology, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementRenderStrategy, ViewElementReuseStrategy, _from, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, bootstrappedCrtModules, callOnContextCreateHooks, callOnContextDestroyHooks, callOnContextUpdateHooks, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, defineRenderConfig, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDeepModuleDependencies, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, localize, matchScopes, objectDeepKeys, registerAngularViewElement, registerViewElement, registryKey, resetGlobals, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey, ɵBaseRegistry, ɵcheckTypeNameFormat, ɵinstantiate };
|
|
2975
|
+
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ChatMessageTypeRegistry, ConverterRegistry, CrtChatMessageType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, DialogService, FeatureService, HandleViewModelAttributeChangeRequest, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LazyModuleRef, LazyModulesManager, LicenseService, LocalizableValue, MaskService, MessageChannelService, MethodInvokeRequest, Model, PkgTopology, ProcessEngineService, ProcessStatus, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, RunProcessRequest, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementRenderStrategy, ViewElementReuseStrategy, _from, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, bootstrappedCrtModules, callOnContextCreateHooks, callOnContextDestroyHooks, callOnContextUpdateHooks, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, defineRenderConfig, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDeepModuleDependencies, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, localize, matchScopes, objectDeepKeys, registerAngularViewElement, registerViewElement, registryKey, resetGlobals, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey, ɵBaseRegistry, ɵcheckTypeNameFormat, ɵinstantiate };
|
|
2833
2976
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|