@kontur.candy/generator 5.21.0-picklist-again.2 → 5.21.0-ss-metrics.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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -83281,14 +83281,14 @@ class OptionalSectionRulesBuilder {
|
|
|
83281
83281
|
}
|
|
83282
83282
|
}
|
|
83283
83283
|
wrapRulesWithOptionalPageCheck(rules) {
|
|
83284
|
-
const
|
|
83285
|
-
const wrappedRules = Iterator.from(rules).map(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && rule.left.valueName != "children" ? this.wrapSetStatementWithOptionalPageCheckIfNeeded(rule,
|
|
83284
|
+
const allOrderedSections = (0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.reverseArray)(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.IterUtils.sortBy(this.getAllSections(), x => x.path.toLegacyPath())).toArray();
|
|
83285
|
+
const wrappedRules = Iterator.from(rules).map(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && rule.left.valueName != "children" ? this.wrapSetStatementWithOptionalPageCheckIfNeeded(rule, allOrderedSections) : rule);
|
|
83286
83286
|
return wrappedRules;
|
|
83287
83287
|
}
|
|
83288
83288
|
wrapSetStatementWithOptionalPageCheckIfNeeded(rule, orderedSections) {
|
|
83289
83289
|
const targetPath = rule.left.modePath;
|
|
83290
|
-
const targetOptionalSection = orderedSections.find(x => _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.isPrefix(x.path.toLegacyPath(), targetPath.toLegacyPath()));
|
|
83291
|
-
if (targetOptionalSection != undefined &&
|
|
83290
|
+
const targetOptionalSection = orderedSections.find(x => _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.isPrefix(x.path.toLegacyPath(), targetPath.toLegacyPath()) && x.optional);
|
|
83291
|
+
if (targetOptionalSection != undefined && !targetOptionalSection.multiple) {
|
|
83292
83292
|
const targetIsFilledPath = targetOptionalSection.path.joinWith(OptionalSectionRulesBuilder.optionalSectionFilledFieldName);
|
|
83293
83293
|
if (!targetIsFilledPath.isEquals(targetPath)) {
|
|
83294
83294
|
const targetIsFilledValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(targetIsFilledPath.toCurrentIteration(), "value");
|