@kontur.candy/generator 5.126.0-fix-ResizeObserver.0 → 5.126.0-forceAutoValue.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/dist/index.js +150 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47766,6 +47766,52 @@ function getMatchedAndDifferentModelPaths(baseModelPath, splittingModelPath) {
|
|
|
47766
47766
|
|
|
47767
47767
|
/***/ }),
|
|
47768
47768
|
|
|
47769
|
+
/***/ "./Common/ModelPath/Set/AbsoluteModelPathSet.ts":
|
|
47770
|
+
/*!******************************************************!*\
|
|
47771
|
+
!*** ./Common/ModelPath/Set/AbsoluteModelPathSet.ts ***!
|
|
47772
|
+
\******************************************************/
|
|
47773
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
47774
|
+
|
|
47775
|
+
"use strict";
|
|
47776
|
+
__webpack_require__.r(__webpack_exports__);
|
|
47777
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47778
|
+
/* harmony export */ AbsoluteModelPathSet: () => (/* binding */ AbsoluteModelPathSet)
|
|
47779
|
+
/* harmony export */ });
|
|
47780
|
+
/* harmony import */ var _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
|
|
47781
|
+
/* harmony import */ var _Set2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Set2 */ "./Common/ModelPath/Set/Set2.ts");
|
|
47782
|
+
|
|
47783
|
+
|
|
47784
|
+
class AbsoluteModelPathSet extends _Set2__WEBPACK_IMPORTED_MODULE_1__.Set2 {
|
|
47785
|
+
constructor(eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_0__.EachCurrentCollision.AreSame) {
|
|
47786
|
+
super();
|
|
47787
|
+
this.eachCurrentCollision = void 0;
|
|
47788
|
+
this.eachCurrentCollision = eachCurrentCollision;
|
|
47789
|
+
}
|
|
47790
|
+
static *unique(paths) {
|
|
47791
|
+
const set = new AbsoluteModelPathSet();
|
|
47792
|
+
for (const path of paths) {
|
|
47793
|
+
if (set.add(path)) {
|
|
47794
|
+
yield path;
|
|
47795
|
+
}
|
|
47796
|
+
}
|
|
47797
|
+
}
|
|
47798
|
+
areItemsEqual(left, right) {
|
|
47799
|
+
return left.isEquals(right, this.eachCurrentCollision);
|
|
47800
|
+
}
|
|
47801
|
+
getItemHash(key) {
|
|
47802
|
+
return key.getHash(this.eachCurrentCollision);
|
|
47803
|
+
}
|
|
47804
|
+
static from(source) {
|
|
47805
|
+
const set = new AbsoluteModelPathSet();
|
|
47806
|
+
for (const sourceElement of source) {
|
|
47807
|
+
set.add(sourceElement);
|
|
47808
|
+
}
|
|
47809
|
+
return set;
|
|
47810
|
+
}
|
|
47811
|
+
}
|
|
47812
|
+
|
|
47813
|
+
/***/ }),
|
|
47814
|
+
|
|
47769
47815
|
/***/ "./Common/ModelPath/Set/Set2.ts":
|
|
47770
47816
|
/*!**************************************!*\
|
|
47771
47817
|
!*** ./Common/ModelPath/Set/Set2.ts ***!
|
|
@@ -48980,7 +49026,7 @@ function nonRegularFieldName(fieldName) {
|
|
|
48980
49026
|
function ensureIsKnownViewModelFieldName(fieldName) {
|
|
48981
49027
|
return getKnownViewModelFieldNames().has(fieldName) ? fieldName : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(`[${fieldName}] is not known ViewModelFieldName`);
|
|
48982
49028
|
}
|
|
48983
|
-
const keysOfViewModelFieldName = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId", "dirtyChangedPathMasks"];
|
|
49029
|
+
const keysOfViewModelFieldName = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId", "dirtyChangedPathMasks", "forceAutoValue"];
|
|
48984
49030
|
const allKeysOfViewModelFieldName = keysOfViewModelFieldName;
|
|
48985
49031
|
const names = new Set(allKeysOfViewModelFieldName);
|
|
48986
49032
|
function getKnownViewModelFieldNames() {
|
|
@@ -62643,6 +62689,7 @@ class FormSchemaRngElement {
|
|
|
62643
62689
|
this.useServerFilters = void 0;
|
|
62644
62690
|
this.attributes = new Map();
|
|
62645
62691
|
this.parent = void 0;
|
|
62692
|
+
this.choices = [];
|
|
62646
62693
|
this.optional = void 0;
|
|
62647
62694
|
this.nillable = void 0;
|
|
62648
62695
|
this.editorOnly = void 0;
|
|
@@ -62666,6 +62713,9 @@ class FormSchemaRngElement {
|
|
|
62666
62713
|
addAttribute(attribute) {
|
|
62667
62714
|
this.attributes.set(attribute.name, attribute);
|
|
62668
62715
|
}
|
|
62716
|
+
setChoices(choices) {
|
|
62717
|
+
this.choices.push(choices);
|
|
62718
|
+
}
|
|
62669
62719
|
setInnerTextType(type) {
|
|
62670
62720
|
this.innerTextType = type;
|
|
62671
62721
|
}
|
|
@@ -62733,9 +62783,17 @@ class FormSchemaRng {
|
|
|
62733
62783
|
result.addElement(this.convertSchemaRngElement(childElement, result));
|
|
62734
62784
|
}
|
|
62735
62785
|
for (const childChoiceElement of schemaRngElement.choices) {
|
|
62786
|
+
const choiceChildren = new Map();
|
|
62787
|
+
const rngElements = [];
|
|
62736
62788
|
for (const childElement of childChoiceElement.children) {
|
|
62737
|
-
|
|
62789
|
+
const rngElement = this.convertSchemaRngElement(childElement, result);
|
|
62790
|
+
rngElements.push(rngElement);
|
|
62791
|
+
choiceChildren.set(childElement.name, rngElement);
|
|
62738
62792
|
}
|
|
62793
|
+
rngElements.forEach(rngElement => {
|
|
62794
|
+
rngElement.setChoices(choiceChildren);
|
|
62795
|
+
result.addElement(rngElement);
|
|
62796
|
+
});
|
|
62739
62797
|
}
|
|
62740
62798
|
}
|
|
62741
62799
|
return result;
|
|
@@ -62883,6 +62941,13 @@ class FormSchemaRng {
|
|
|
62883
62941
|
optional: true
|
|
62884
62942
|
};
|
|
62885
62943
|
}
|
|
62944
|
+
if (currentElement instanceof FormSchemaRngElement && currentElement.choices.length > 0) {
|
|
62945
|
+
return {
|
|
62946
|
+
dependencies: [],
|
|
62947
|
+
hasOptionalParent: false,
|
|
62948
|
+
optional: false
|
|
62949
|
+
};
|
|
62950
|
+
}
|
|
62886
62951
|
if (endOptionalElement == undefined || endOptionalElement instanceof FormSchemaRngElement && ((_endOptionalElement = endOptionalElement) === null || _endOptionalElement === void 0 ? void 0 : _endOptionalElement.multiple) === true) {
|
|
62887
62952
|
return {
|
|
62888
62953
|
dependencies: [],
|
|
@@ -67460,6 +67525,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
|
|
|
67460
67525
|
const autoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(target.toLegacyPath());
|
|
67461
67526
|
const disabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(target.toLegacyPath());
|
|
67462
67527
|
const optional = this.dataDeclarationHelper.isNodeOptionalBySchemaOrSugar(target);
|
|
67528
|
+
const forceAutoValue = this.dataDeclarationHelper.isNodeHasForcedAutoValueEntry(target);
|
|
67463
67529
|
const compiledTarget = this.modelPathInstance(target);
|
|
67464
67530
|
const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.distinctBy(dependencies.map(x => ({
|
|
67465
67531
|
path: x.asDependencyModelPath(),
|
|
@@ -67470,7 +67536,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
|
|
|
67470
67536
|
const compiledExpressionWithCheck = this.compileAllItemsIsEmptyCheckBlock(compiledExpression, dependencyModelPaths.filter(x => !x.isIgnoreForChecks).map(x => x.path));
|
|
67471
67537
|
const compiledDelegate = `context => KCCalculation.execute(context, expression => ${compiledExpressionWithCheck}, "${defaultValue}")`;
|
|
67472
67538
|
return {
|
|
67473
|
-
compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled}, ${optional})`,
|
|
67539
|
+
compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled}, ${optional}, ${forceAutoValue})`,
|
|
67474
67540
|
dependencies: dependencies
|
|
67475
67541
|
};
|
|
67476
67542
|
}
|
|
@@ -70374,8 +70440,13 @@ class DataDeclarationGenerationTimeHelper {
|
|
|
70374
70440
|
return declEntry !== undefined && "autoValue" in declEntry;
|
|
70375
70441
|
}
|
|
70376
70442
|
isNodeHasDisabledEntry(targetPath) {
|
|
70443
|
+
var _declEntry$disabled;
|
|
70444
|
+
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
70445
|
+
return (declEntry === null || declEntry === void 0 || (_declEntry$disabled = declEntry.disabled) === null || _declEntry$disabled === void 0 ? void 0 : _declEntry$disabled[0]) == true;
|
|
70446
|
+
}
|
|
70447
|
+
isNodeHasForcedAutoValueEntry(targetPath) {
|
|
70377
70448
|
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
70378
|
-
return Boolean(declEntry === null || declEntry === void 0 ? void 0 : declEntry.
|
|
70449
|
+
return Boolean(declEntry === null || declEntry === void 0 ? void 0 : declEntry.forceAutoValue);
|
|
70379
70450
|
}
|
|
70380
70451
|
getDefaultValue(targetPath) {
|
|
70381
70452
|
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
@@ -70403,6 +70474,11 @@ class DataDeclarationGenerationTimeHelper {
|
|
|
70403
70474
|
const rootPath = this.getDataDeclarationRootPath();
|
|
70404
70475
|
return (_this$dataDeclaration = (_this$dataDeclaration2 = this.dataDeclaration[rootPath]) === null || _this$dataDeclaration2 === void 0 ? void 0 : _this$dataDeclaration2.optionalSections) !== null && _this$dataDeclaration !== void 0 ? _this$dataDeclaration : [];
|
|
70405
70476
|
}
|
|
70477
|
+
getAllSingleSections() {
|
|
70478
|
+
var _this$dataDeclaration3, _this$dataDeclaration4;
|
|
70479
|
+
const rootPath = this.getDataDeclarationRootPath();
|
|
70480
|
+
return (_this$dataDeclaration3 = (_this$dataDeclaration4 = this.dataDeclaration[rootPath]) === null || _this$dataDeclaration4 === void 0 ? void 0 : _this$dataDeclaration4.allSingleSections) !== null && _this$dataDeclaration3 !== void 0 ? _this$dataDeclaration3 : [];
|
|
70481
|
+
}
|
|
70406
70482
|
getOptionalBlocksPaths() {
|
|
70407
70483
|
const visibilityFieldsPaths = Object.keys(this.dataDeclaration).filter(path => path.endsWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_5__.OptionalBlockVisibilityFieldName));
|
|
70408
70484
|
const optionalBlocksPaths = visibilityFieldsPaths.map(fieldPath => (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromMask)(fieldPath, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).getParentPath());
|
|
@@ -71290,6 +71366,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71290
71366
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
71291
71367
|
/* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
71292
71368
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
71369
|
+
/* harmony import */ var _Common_ModelPath_Set_AbsoluteModelPathSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/Set/AbsoluteModelPathSet */ "./Common/ModelPath/Set/AbsoluteModelPathSet.ts");
|
|
71370
|
+
|
|
71293
71371
|
|
|
71294
71372
|
|
|
71295
71373
|
|
|
@@ -71342,6 +71420,7 @@ function buildFieldsConfiguration(path, dataDeclaration) {
|
|
|
71342
71420
|
return resultFields;
|
|
71343
71421
|
}
|
|
71344
71422
|
function buildExtendedSchemaInfo(dataDeclaration) {
|
|
71423
|
+
const singleSectionsSet = _Common_ModelPath_Set_AbsoluteModelPathSet__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelPathSet.from(dataDeclaration.getAllSingleSections().map(x => (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromMask)(x.path, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each)));
|
|
71345
71424
|
const nodes = new Map();
|
|
71346
71425
|
for (const path of dataDeclaration.getAllPaths()) {
|
|
71347
71426
|
if (path.isEmpty() || path.endsWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each]))) {
|
|
@@ -71349,7 +71428,8 @@ function buildExtendedSchemaInfo(dataDeclaration) {
|
|
|
71349
71428
|
}
|
|
71350
71429
|
const defaultValue = dataDeclaration.getDefaultValue(path);
|
|
71351
71430
|
const isMultiple = dataDeclaration.isNodeHasChildrenEntry(path);
|
|
71352
|
-
const
|
|
71431
|
+
const isPage = dataDeclaration.getPageId(path) != undefined;
|
|
71432
|
+
const optional = isPage ? dataDeclaration.isNodeOptional(path) : dataDeclaration.isNodeOptionalBySchemaOrSugar(path);
|
|
71353
71433
|
const node = getOrCreateNode(nodes, path);
|
|
71354
71434
|
node.properties ??= {};
|
|
71355
71435
|
const props = node.properties;
|
|
@@ -71366,10 +71446,8 @@ function buildExtendedSchemaInfo(dataDeclaration) {
|
|
|
71366
71446
|
props.optional = optional;
|
|
71367
71447
|
props.type = dataDeclaration.getType(path);
|
|
71368
71448
|
props.disabled = dataDeclaration.isNodeHasDisabledEntry(path);
|
|
71369
|
-
|
|
71370
|
-
|
|
71371
|
-
props.isPage = isPage;
|
|
71372
|
-
}
|
|
71449
|
+
props.isPage = isPage || undefined;
|
|
71450
|
+
props.isForceFilledOptional = isPage && isMultiple && singleSectionsSet.has(path) || undefined;
|
|
71373
71451
|
props.fields = buildFieldsConfiguration(path, dataDeclaration);
|
|
71374
71452
|
}
|
|
71375
71453
|
return {
|
|
@@ -76051,11 +76129,12 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
76051
76129
|
compiledArgumentExpression(prefix, target, selectPath, selectType, addPrecalculationRule, aggregationFunction = "Sum") {
|
|
76052
76130
|
const builtInType = this.convertExpressionTypePropertyToFLangType(selectType !== null && selectType !== void 0 ? selectType : "string");
|
|
76053
76131
|
const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath);
|
|
76132
|
+
const isSelectEqualsTarget = target.path.isEquals(adjustedSelectPath);
|
|
76054
76133
|
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
76055
76134
|
const baseSelectPath = splitInfo.matchedPath;
|
|
76056
76135
|
if (!splitInfo.differentPath.isContainIteration()) {
|
|
76057
76136
|
const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
|
|
76058
|
-
const finalValue =
|
|
76137
|
+
const finalValue = isSelectEqualsTarget && target.field === "value" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)(valueRefExpression) : valueRefExpression;
|
|
76059
76138
|
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandIfNeed)(finalValue, builtInType);
|
|
76060
76139
|
} else {
|
|
76061
76140
|
var _countValueExpression;
|
|
@@ -83259,6 +83338,15 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
83259
83338
|
result[`${attachmentSection.path}/${_Common_PathConstants__WEBPACK_IMPORTED_MODULE_21__.AttachmentInfoPath.toLegacyPath()}`] = {
|
|
83260
83339
|
section: [attachmentSection.id]
|
|
83261
83340
|
};
|
|
83341
|
+
result[attachmentSection.path] = {
|
|
83342
|
+
section: [attachmentSection.id],
|
|
83343
|
+
pageId: attachmentSection.id
|
|
83344
|
+
};
|
|
83345
|
+
if (attachmentSection.optional) {
|
|
83346
|
+
result[attachmentSection.path] = {
|
|
83347
|
+
optional: [true]
|
|
83348
|
+
};
|
|
83349
|
+
}
|
|
83262
83350
|
});
|
|
83263
83351
|
return result;
|
|
83264
83352
|
}
|
|
@@ -84737,9 +84825,9 @@ class PageConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Sug
|
|
|
84737
84825
|
result.children = [{
|
|
84738
84826
|
model: true
|
|
84739
84827
|
}, node.optional ? [] : ["0"]];
|
|
84740
|
-
|
|
84741
|
-
|
|
84742
|
-
|
|
84828
|
+
}
|
|
84829
|
+
if (node.optional) {
|
|
84830
|
+
result.optional = [true];
|
|
84743
84831
|
}
|
|
84744
84832
|
const optionalFieldPath = node.getFullPath().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_15__.OptionalSectionFilledFieldName).toLegacyPath();
|
|
84745
84833
|
const optionalFieldRequired = ((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false) && !((_node$multiple = node.multiple) !== null && _node$multiple !== void 0 ? _node$multiple : false);
|
|
@@ -99822,7 +99910,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
99822
99910
|
}
|
|
99823
99911
|
doBuildDataDeclaration(context) {
|
|
99824
99912
|
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_8__.InputNode);
|
|
99825
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.auto ? ["autoFlag", context.initSequenceFactory.takeFromModel()] : undefined, node.auto ? ["autoValue", context.initSequenceFactory.takeFromModelOrDefaultValue(node.dataBinding.defaultValue)] : undefined]), context.addSpecialFieldsEntry(node, {
|
|
99913
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.auto ? ["autoFlag", context.initSequenceFactory.takeFromModel()] : undefined, node.auto ? ["autoValue", context.initSequenceFactory.takeFromModelOrDefaultValue(node.dataBinding.defaultValue)] : undefined, node.auto && node.forceAutoValue != undefined ? ["forceAutoValue", [node.forceAutoValue]] : undefined]), context.addSpecialFieldsEntry(node, {
|
|
99826
99914
|
optional: node.dataBinding.optional,
|
|
99827
99915
|
disabled: node.disabled
|
|
99828
99916
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
@@ -100096,7 +100184,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100096
100184
|
|
|
100097
100185
|
|
|
100098
100186
|
|
|
100099
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45, _descriptor46, _descriptor47, _descriptor48, _descriptor49;
|
|
100187
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45, _descriptor46, _descriptor47, _descriptor48, _descriptor49, _descriptor50;
|
|
100100
100188
|
|
|
100101
100189
|
|
|
100102
100190
|
|
|
@@ -100158,7 +100246,7 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
100158
100246
|
Отключает использование mask только для валидного по маске значения и при отсутствии ошибки/предупреждения в валидации.
|
|
100159
100247
|
По умолчанию включен показ кривых значений после импорта и,
|
|
100160
100248
|
после ручного исправления на правильное по маске и валидное значение, редактирование будет доступно уже только в пределах маски.
|
|
100161
|
-
`), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("settings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "'true': всегда первой будет применяться указанная fetchfn, а если она вернет undefined то тогда будет брать из модели - из фуфа/draftinfo (то, что придет с сервера). В противном случае fetchfn сработает только в том случае, когда бекенд ничего не прислал"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("deprecated-disabled-for-rpn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit.default("100%"), "Ширина поля"), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного скрытия контрола`), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("left", "right"), "Выравнивание текста внутри поля ввода (`left` | `right`, default: `left`)"), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("formula", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Всплывающая подсказка по авторасчету"), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("suffix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в правой части input-а`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в левой части input-а`), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("currency", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, `При включении этого флага значение в поле отображается как денежное: с двумя знаками после запятой и пробелами между тысячами.`), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("showNegativeAsBrackets", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Отрицательные числа будут отображаться в скобках и без минуса (только визуально и только при потере фокуса)"), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("removeReadonlyBackground", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает серый background у ридонли инпута"), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("noReadonlyPadding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает дефолтный паддинг 2px у контейнера ридонли инпута"), _dec(_class = (_class2 = class InputNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
100249
|
+
`), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("settings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "'true': всегда первой будет применяться указанная fetchfn, а если она вернет undefined то тогда будет брать из модели - из фуфа/draftinfo (то, что придет с сервера). В противном случае fetchfn сработает только в том случае, когда бекенд ничего не прислал"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("deprecated-disabled-for-rpn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit.default("100%"), "Ширина поля"), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного скрытия контрола`), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("left", "right"), "Выравнивание текста внутри поля ввода (`left` | `right`, default: `left`)"), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("formula", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Всплывающая подсказка по авторасчету"), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("suffix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в правой части input-а`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в левой части input-а`), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("currency", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, `При включении этого флага значение в поле отображается как денежное: с двумя знаками после запятой и пробелами между тысячами.`), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("showNegativeAsBrackets", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Отрицательные числа будут отображаться в скобках и без минуса (только визуально и только при потере фокуса)"), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("removeReadonlyBackground", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает серый background у ридонли инпута"), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("noReadonlyPadding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает дефолтный паддинг 2px у контейнера ридонли инпута"), _dec51 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("forceAutoValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Принудительно устанавливает autoValue при ините черновика"), _dec(_class = (_class2 = class InputNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
100162
100250
|
constructor(...args) {
|
|
100163
100251
|
super(...args);
|
|
100164
100252
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "validationInfo", _descriptor, this);
|
|
@@ -100212,6 +100300,7 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
100212
100300
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "showNegativeAsBrackets", _descriptor47, this);
|
|
100213
100301
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "removeReadonlyBackground", _descriptor48, this);
|
|
100214
100302
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "noReadonlyPadding", _descriptor49, this);
|
|
100303
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "forceAutoValue", _descriptor50, this);
|
|
100215
100304
|
}
|
|
100216
100305
|
getOwnPath() {
|
|
100217
100306
|
return this.dataBinding.getOwnPath();
|
|
@@ -100464,6 +100553,11 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
100464
100553
|
enumerable: true,
|
|
100465
100554
|
writable: true,
|
|
100466
100555
|
initializer: null
|
|
100556
|
+
}), _descriptor50 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "forceAutoValue", [_dec51], {
|
|
100557
|
+
configurable: true,
|
|
100558
|
+
enumerable: true,
|
|
100559
|
+
writable: true,
|
|
100560
|
+
initializer: null
|
|
100467
100561
|
}), _class2)) || _class);
|
|
100468
100562
|
|
|
100469
100563
|
/***/ }),
|
|
@@ -103589,6 +103683,12 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
103589
103683
|
const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_8__.PopupTextAreaNode);
|
|
103590
103684
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
103591
103685
|
}
|
|
103686
|
+
doBuildNormalizeRules(builder, __) {
|
|
103687
|
+
const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_8__.PopupTextAreaNode);
|
|
103688
|
+
return [builder.valueInitializer(node, node.dataBinding, node.disabled), ...builder.specialFieldsInitializer(node, {
|
|
103689
|
+
disabled: node.disabled
|
|
103690
|
+
})];
|
|
103691
|
+
}
|
|
103592
103692
|
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
103593
103693
|
const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_8__.PopupTextAreaNode);
|
|
103594
103694
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
@@ -104164,14 +104264,14 @@ class FIOConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Suga
|
|
|
104164
104264
|
}
|
|
104165
104265
|
doBuildNormalizeRules(builder) {
|
|
104166
104266
|
const node = this.getCurrentNodeAs(_FIONode__WEBPACK_IMPORTED_MODULE_7__.FIONode);
|
|
104167
|
-
return [builder.valueInitializer(node, node.dataBinding,
|
|
104168
|
-
disabled:
|
|
104267
|
+
return [builder.valueInitializer(node, node.dataBinding, true, "Фамилия", "surname"), ...builder.specialFieldsInitializer(node, {
|
|
104268
|
+
disabled: true,
|
|
104169
104269
|
pathSuffix: "Фамилия"
|
|
104170
|
-
}), builder.valueInitializer(node, node.dataBinding,
|
|
104171
|
-
disabled:
|
|
104270
|
+
}), builder.valueInitializer(node, node.dataBinding, true, "Имя", "name"), ...builder.specialFieldsInitializer(node, {
|
|
104271
|
+
disabled: true,
|
|
104172
104272
|
pathSuffix: "Имя"
|
|
104173
|
-
}), builder.valueInitializer(node, node.dataBinding,
|
|
104174
|
-
disabled:
|
|
104273
|
+
}), builder.valueInitializer(node, node.dataBinding, true, "Отчество", "patronymic"), ...builder.specialFieldsInitializer(node, {
|
|
104274
|
+
disabled: true,
|
|
104175
104275
|
pathSuffix: "Отчество"
|
|
104176
104276
|
})];
|
|
104177
104277
|
}
|
|
@@ -105390,7 +105490,8 @@ class MarkupBuildingContext {
|
|
|
105390
105490
|
__webpack_require__.r(__webpack_exports__);
|
|
105391
105491
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
105392
105492
|
/* harmony export */ KCLangCalculationsBuildContext: () => (/* binding */ KCLangCalculationsBuildContext),
|
|
105393
|
-
/* harmony export */ combineByAndKCLangExpr: () => (/* binding */ combineByAndKCLangExpr)
|
|
105493
|
+
/* harmony export */ combineByAndKCLangExpr: () => (/* binding */ combineByAndKCLangExpr),
|
|
105494
|
+
/* harmony export */ combineByOrKCLangExpr: () => (/* binding */ combineByOrKCLangExpr)
|
|
105394
105495
|
/* harmony export */ });
|
|
105395
105496
|
/* harmony import */ var _Common_AutoValidationUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/AutoValidationUtils */ "./Common/AutoValidationUtils.ts");
|
|
105396
105497
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
@@ -105513,9 +105614,29 @@ class KCLangCalculationsBuildContext {
|
|
|
105513
105614
|
if (((_allChildrenPaths$len = (_allChildrenPaths = allChildrenPaths) === null || _allChildrenPaths === void 0 ? void 0 : _allChildrenPaths.length) !== null && _allChildrenPaths$len !== void 0 ? _allChildrenPaths$len : 0) > _validationGenerator_MaxOptionalChildrenLimit__WEBPACK_IMPORTED_MODULE_31__.maxOptionalChildrenLimit) {
|
|
105514
105615
|
allChildrenPaths = undefined;
|
|
105515
105616
|
}
|
|
105516
|
-
const restChecks = (_allChildrenPaths2 = allChildrenPaths) === null || _allChildrenPaths2 === void 0 ? void 0 : _allChildrenPaths2.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(
|
|
105617
|
+
const restChecks = (_allChildrenPaths2 = allChildrenPaths) === null || _allChildrenPaths2 === void 0 ? void 0 : _allChildrenPaths2.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(combineByOrKCLangExpr, undefined);
|
|
105618
|
+
let choiceChecks;
|
|
105619
|
+
const haveChoices = schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_28__.FormSchemaRngElement && schemaNode.choices.length > 0;
|
|
105620
|
+
if (haveChoices) {
|
|
105621
|
+
const choiceRules = [];
|
|
105622
|
+
for (const schemaNodeChoice of schemaNode.choices) {
|
|
105623
|
+
if (schemaNodeChoice !== null && schemaNodeChoice !== void 0 && schemaNodeChoice.values().every(el => el.isOptional())) {
|
|
105624
|
+
continue;
|
|
105625
|
+
}
|
|
105626
|
+
const allChoicesPaths = schemaNodeChoice === null || schemaNodeChoice === void 0 ? void 0 : schemaNodeChoice.values().map(x => this.schemaRng.getPath(x, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).filter(x => !(0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_2__.getMatchedAndDifferentModelPaths)(targetFullPath, x).differentPath.isContainIteration());
|
|
105627
|
+
choiceChecks = allChoicesPaths === null || allChoicesPaths === void 0 ? void 0 : allChoicesPaths.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(combineByOrKCLangExpr, undefined);
|
|
105628
|
+
if (choiceChecks) {
|
|
105629
|
+
choiceRules.push(new _common_KCLang_CodeDom_NotExpression__WEBPACK_IMPORTED_MODULE_21__.NotExpression(choiceChecks));
|
|
105630
|
+
}
|
|
105631
|
+
}
|
|
105632
|
+
choiceChecks = choiceRules.reduce(combineByOrKCLangExpr, undefined);
|
|
105633
|
+
}
|
|
105517
105634
|
const checkRequiredStatement = new _common_KCLang_CodeDom_CheckStatement__WEBPACK_IMPORTED_MODULE_6__.CheckStatement(new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(targetPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(targetPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression(""))), [new _common_KCLang_CodeDom_WithBlock__WEBPACK_IMPORTED_MODULE_27__.WithBlock("description", new _common_KCLang_CodeDom_DescriptionText__WEBPACK_IMPORTED_MODULE_8__.DescriptionText((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_38__.omitLocalization)(requiredDescription))), new _common_KCLang_CodeDom_WithBlock__WEBPACK_IMPORTED_MODULE_27__.WithBlock("target", new _common_KCLang_CodeDom_DescriptionText__WEBPACK_IMPORTED_MODULE_8__.DescriptionText((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(Iterator.from(targetPath.getPathParts()).filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken).toArray()).toString()))]);
|
|
105518
|
-
if (restChecks != undefined) {
|
|
105635
|
+
if (restChecks != undefined && choiceChecks != undefined) {
|
|
105636
|
+
yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(restChecks, choiceChecks), [checkRequiredStatement]);
|
|
105637
|
+
} else if (choiceChecks != undefined) {
|
|
105638
|
+
yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(choiceChecks, [checkRequiredStatement]);
|
|
105639
|
+
} else if (restChecks != undefined) {
|
|
105519
105640
|
yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(restChecks, [checkRequiredStatement]);
|
|
105520
105641
|
} else {
|
|
105521
105642
|
yield checkRequiredStatement;
|
|
@@ -105716,9 +105837,12 @@ class KCLangCalculationsBuildContext {
|
|
|
105716
105837
|
}
|
|
105717
105838
|
}
|
|
105718
105839
|
}
|
|
105719
|
-
function
|
|
105840
|
+
function combineByOrKCLangExpr(acc, current) {
|
|
105720
105841
|
return acc != undefined ? new _common_KCLang_CodeDom_OrExpression__WEBPACK_IMPORTED_MODULE_23__.OrExpression(acc, current) : current;
|
|
105721
105842
|
}
|
|
105843
|
+
function combineByAndKCLangExpr(acc, current) {
|
|
105844
|
+
return acc != undefined ? new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(acc, current) : current;
|
|
105845
|
+
}
|
|
105722
105846
|
|
|
105723
105847
|
/***/ }),
|
|
105724
105848
|
|