@kontur.candy/generator 5.127.0-fias-more-upgrades.2 → 5.127.0-fias-more-upgrades.4
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 +166 -63
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71360,6 +71360,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71360
71360
|
/* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
71361
71361
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
71362
71362
|
/* harmony import */ var _Common_ModelPath_Set_AbsoluteModelPathSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/Set/AbsoluteModelPathSet */ "./Common/ModelPath/Set/AbsoluteModelPathSet.ts");
|
|
71363
|
+
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
71364
|
+
|
|
71363
71365
|
|
|
71364
71366
|
|
|
71365
71367
|
|
|
@@ -71415,7 +71417,9 @@ function buildFieldsConfiguration(path, dataDeclaration) {
|
|
|
71415
71417
|
function buildExtendedSchemaInfo(dataDeclaration) {
|
|
71416
71418
|
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)));
|
|
71417
71419
|
const nodes = new Map();
|
|
71418
|
-
|
|
71420
|
+
const filteredPaths = [(0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([_Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__.OptionalSectionFilledFieldName]), (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([_Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__.OptionalElementsExistenceFieldName])];
|
|
71421
|
+
const pathToProcess = Iterator.from(dataDeclaration.getAllPaths()).filter(path => !filteredPaths.some(fp => path.endsWith(fp)));
|
|
71422
|
+
for (const path of pathToProcess) {
|
|
71419
71423
|
if (path.isEmpty() || path.endsWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each]))) {
|
|
71420
71424
|
continue;
|
|
71421
71425
|
}
|
|
@@ -71440,7 +71444,7 @@ function buildExtendedSchemaInfo(dataDeclaration) {
|
|
|
71440
71444
|
props.type = dataDeclaration.getType(path);
|
|
71441
71445
|
props.disabled = dataDeclaration.isNodeHasDisabledEntry(path);
|
|
71442
71446
|
props.isPage = isPage || undefined;
|
|
71443
|
-
props.isForceFilledOptional = isPage && isMultiple && singleSectionsSet.has(path) || undefined;
|
|
71447
|
+
props.isForceFilledOptional = props.isFilledOptionalRequired = isPage && optional && (isMultiple && singleSectionsSet.has(path) || !isMultiple) || undefined;
|
|
71444
71448
|
props.fields = buildFieldsConfiguration(path, dataDeclaration);
|
|
71445
71449
|
}
|
|
71446
71450
|
return {
|
|
@@ -88711,6 +88715,15 @@ class SimpleTableColumnConverter extends _MultiControls_Column_ColumnConverter__
|
|
|
88711
88715
|
static getAcceptNodeClass() {
|
|
88712
88716
|
return _SimpleTableNode__WEBPACK_IMPORTED_MODULE_1__.SimpleTableColumnNode;
|
|
88713
88717
|
}
|
|
88718
|
+
*doBuildNormalizeRules(builder) {
|
|
88719
|
+
const node = this.getCurrentNodeAs(_SimpleTableNode__WEBPACK_IMPORTED_MODULE_1__.SimpleTableColumnNode);
|
|
88720
|
+
if (node.dataScope.path != undefined && node.multiple) {
|
|
88721
|
+
yield* builder.childrenInitializer(node, false);
|
|
88722
|
+
yield* builder.specialFieldsInitializer(node, {
|
|
88723
|
+
disabled: undefined
|
|
88724
|
+
});
|
|
88725
|
+
}
|
|
88726
|
+
}
|
|
88714
88727
|
doBuildDataDeclaration(context) {
|
|
88715
88728
|
const node = this.getCurrentNodeAs(_SimpleTableNode__WEBPACK_IMPORTED_MODULE_1__.SimpleTableColumnNode);
|
|
88716
88729
|
if (node.multiple) {
|
|
@@ -90373,7 +90386,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90373
90386
|
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
90374
90387
|
/* harmony import */ var _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../validationGenerator/Nodes/TypeNode */ "./Generator/src/generators/validationGenerator/Nodes/TypeNode.ts");
|
|
90375
90388
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
90376
|
-
/* harmony import */ var
|
|
90389
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
90390
|
+
/* harmony import */ var _AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./AddRowButtonNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/MultiControls/AddRowButton/AddRowButtonNode.ts");
|
|
90391
|
+
|
|
90377
90392
|
|
|
90378
90393
|
|
|
90379
90394
|
|
|
@@ -90387,10 +90402,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90387
90402
|
|
|
90388
90403
|
class AddRowButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.SugarNodeConverterBase {
|
|
90389
90404
|
static getAcceptNodeClass() {
|
|
90390
|
-
return
|
|
90405
|
+
return _AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__.AddRowButtonNode;
|
|
90391
90406
|
}
|
|
90392
90407
|
doBuildNodeValidations(validationGenerator) {
|
|
90393
|
-
const node = this.getCurrentNodeAs(
|
|
90408
|
+
const node = this.getCurrentNodeAs(_AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__.AddRowButtonNode);
|
|
90394
90409
|
const {
|
|
90395
90410
|
validationPath
|
|
90396
90411
|
} = this.getNodeBindingAndValidationPaths(node);
|
|
@@ -90402,20 +90417,36 @@ class AddRowButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
90402
90417
|
fakeNode.children = [];
|
|
90403
90418
|
validationGenerator.processValidations(validationPath.toLegacyPath(), node.validationInfo.optional, fakeNode, undefined, node.validationInfo.emptydescription, undefined);
|
|
90404
90419
|
}
|
|
90420
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
90421
|
+
const node = this.getCurrentNodeAs(_AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__.AddRowButtonNode);
|
|
90422
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
90423
|
+
|
|
90424
|
+
// eslint-disable-next-line no-warning-comments
|
|
90425
|
+
// TODO(2026-02-01): Необходимо разобраться с тем, что тут конфликтят свойства в type. Подробности в задаче https://yt.skbkontur.ru/issue/FS-9234
|
|
90426
|
+
const fakeNode = new _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_8__.TypeNode();
|
|
90427
|
+
fakeNode.base = "string";
|
|
90428
|
+
fakeNode.children = [];
|
|
90429
|
+
const typeNode = fakeNode;
|
|
90430
|
+
const {
|
|
90431
|
+
validationPath
|
|
90432
|
+
} = this.getNodeBindingAndValidationPaths(node);
|
|
90433
|
+
if ((0,util__WEBPACK_IMPORTED_MODULE_0__.isNullOrUndefined)(validationPath) || (0,util__WEBPACK_IMPORTED_MODULE_0__.isNullOrUndefined)(node.validationPath)) {
|
|
90434
|
+
return;
|
|
90435
|
+
}
|
|
90436
|
+
const targetPath = node.getFullPathForChildren().joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_10__.createRelativeFromMask)(node.validationPath, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_10__.PathTokens.each));
|
|
90437
|
+
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
90438
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
90439
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
90440
|
+
return;
|
|
90441
|
+
}
|
|
90442
|
+
yield* buildContext.buildBasicValidations(validationPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
90443
|
+
}
|
|
90405
90444
|
doBuildDataDeclaration(context) {
|
|
90406
|
-
const node = this.getCurrentNodeAs(
|
|
90445
|
+
const node = this.getCurrentNodeAs(_AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__.AddRowButtonNode);
|
|
90407
90446
|
const pathDeclarations = [];
|
|
90408
90447
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__.isNotNullOrUndefined)(node.maxOccurs) && /^\d+$/.test(node.maxOccurs)) {
|
|
90409
90448
|
pathDeclarations.push(context.maxOccurs(node.getFullPath(), node.maxOccurs));
|
|
90410
90449
|
}
|
|
90411
|
-
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__.isNotNullOrEmpty)(node.validationPath)) {
|
|
90412
|
-
const declEntry = {};
|
|
90413
|
-
declEntry["value"] = context.initSequenceFactory.setValueUnconditionally("");
|
|
90414
|
-
const validationPath = node.getFullPath().getParentPath().joinWith(node.validationPath).normalize().toLegacyPath();
|
|
90415
|
-
pathDeclarations.push({
|
|
90416
|
-
[validationPath]: declEntry
|
|
90417
|
-
});
|
|
90418
|
-
}
|
|
90419
90450
|
return pathDeclarations.length > 0 ? context.mergeDataDeclaration(...pathDeclarations) : _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_1__.emptyDataDeclarationCollection;
|
|
90420
90451
|
}
|
|
90421
90452
|
buildChildrenDataDeclaration() {
|
|
@@ -90425,7 +90456,7 @@ class AddRowButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
90425
90456
|
// no children
|
|
90426
90457
|
}
|
|
90427
90458
|
doConvert(context) {
|
|
90428
|
-
const node = this.getCurrentNodeAs(
|
|
90459
|
+
const node = this.getCurrentNodeAs(_AddRowButtonNode__WEBPACK_IMPORTED_MODULE_11__.AddRowButtonNode);
|
|
90429
90460
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("AddRowButton");
|
|
90430
90461
|
const {
|
|
90431
90462
|
bindingPath,
|
|
@@ -93298,10 +93329,22 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
93298
93329
|
static getAcceptNodeClass() {
|
|
93299
93330
|
return _MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode;
|
|
93300
93331
|
}
|
|
93332
|
+
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
93333
|
+
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
93334
|
+
if (node.path != undefined) {
|
|
93335
|
+
var _ref;
|
|
93336
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
93337
|
+
const isOptional = (_ref = node.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.optional) !== null && _ref !== void 0 ? _ref : false;
|
|
93338
|
+
yield* builder.childrenInitializer(node, isOptional);
|
|
93339
|
+
yield* builder.specialFieldsInitializer(node, {
|
|
93340
|
+
disabled: undefined
|
|
93341
|
+
});
|
|
93342
|
+
}
|
|
93343
|
+
}
|
|
93301
93344
|
doBuildDataDeclaration(context) {
|
|
93302
|
-
var
|
|
93345
|
+
var _ref2, _node$optional;
|
|
93303
93346
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
93304
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
93347
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref2 = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref2 !== void 0 ? _ref2 : false)]]), context.maxOccurs(node.getFullPath(), node.maxOccurs), context.addSpecialFieldsEntry(node, {
|
|
93305
93348
|
optional: node.optional
|
|
93306
93349
|
}), context.addPathSectionDeclarationEntry(node));
|
|
93307
93350
|
}
|
|
@@ -98416,44 +98459,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
98416
98459
|
/* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
|
|
98417
98460
|
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
98418
98461
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
98419
|
-
/* harmony import */ var
|
|
98462
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
98463
|
+
/* harmony import */ var _ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ExpertNoteNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/ExpertNote/ExpertNoteNode.ts");
|
|
98464
|
+
|
|
98420
98465
|
|
|
98421
98466
|
|
|
98422
98467
|
|
|
98423
98468
|
|
|
98424
98469
|
class ExpertNoteConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.SugarNodeConverterBase {
|
|
98425
98470
|
static getAcceptNodeClass() {
|
|
98426
|
-
return
|
|
98471
|
+
return _ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode;
|
|
98427
98472
|
}
|
|
98428
98473
|
doBuildNodeValidations(validationGenerator) {
|
|
98429
|
-
const node = this.getCurrentNodeAs(
|
|
98474
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98430
98475
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
98431
98476
|
}
|
|
98477
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
98478
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98479
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
98480
|
+
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each);
|
|
98481
|
+
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
98482
|
+
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
98483
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
98484
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
98485
|
+
return;
|
|
98486
|
+
}
|
|
98487
|
+
yield* buildContext.buildBasicValidations(ownPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
98488
|
+
}
|
|
98432
98489
|
doBuildDataDeclaration(context) {
|
|
98433
|
-
const node = this.getCurrentNodeAs(
|
|
98490
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98434
98491
|
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
98435
98492
|
}
|
|
98436
98493
|
buildChildrenDataDeclaration(context) {
|
|
98437
|
-
const node = this.getCurrentNodeAs(
|
|
98494
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98438
98495
|
return context.processChildrenDataDeclaration([...node.name.children, ...node.messageBox.children], x => {
|
|
98439
|
-
if (x instanceof
|
|
98496
|
+
if (x instanceof _ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertLinkNode) {
|
|
98440
98497
|
return context.processChildrenDataDeclaration(x.children);
|
|
98441
98498
|
}
|
|
98442
98499
|
return undefined;
|
|
98443
98500
|
});
|
|
98444
98501
|
}
|
|
98445
98502
|
*doTraverseChildren() {
|
|
98446
|
-
const node = this.getCurrentNodeAs(
|
|
98503
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98447
98504
|
yield* node.name.children;
|
|
98448
98505
|
for (const child of node.messageBox.children) {
|
|
98449
|
-
if (child instanceof
|
|
98506
|
+
if (child instanceof _ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertLinkNode) {
|
|
98450
98507
|
yield* child.children;
|
|
98451
98508
|
}
|
|
98452
98509
|
yield child;
|
|
98453
98510
|
}
|
|
98454
98511
|
}
|
|
98455
98512
|
doConvert(context) {
|
|
98456
|
-
const node = this.getCurrentNodeAs(
|
|
98513
|
+
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertNoteNode);
|
|
98457
98514
|
const nodeBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__.componentMarkupBuilder)("ExpertNote");
|
|
98458
98515
|
nodeBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node));
|
|
98459
98516
|
nodeBuilder.createChild("ExpertNote", "ExpertNote.Name").appendChild(context.convertChildNodes(node.name.children));
|
|
@@ -98465,7 +98522,7 @@ class ExpertNoteConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
|
|
|
98465
98522
|
}
|
|
98466
98523
|
convertChildren(context, nodes) {
|
|
98467
98524
|
return nodes.map(node => {
|
|
98468
|
-
if (node instanceof
|
|
98525
|
+
if (node instanceof _ExpertNoteNode__WEBPACK_IMPORTED_MODULE_4__.ExpertLinkNode) {
|
|
98469
98526
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__.componentMarkupBuilder)("ExpertNote", "ExpertNote.Link");
|
|
98470
98527
|
markupBuilder.prop(x => x.unitId).set(node.unitid);
|
|
98471
98528
|
markupBuilder.appendChild(context.convertChildNodes(node.children));
|
|
@@ -98611,15 +98668,20 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
98611
98668
|
const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
|
|
98612
98669
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
98613
98670
|
}
|
|
98671
|
+
doBuildNormalizeRules(builder) {
|
|
98672
|
+
var _node$fiasfield$;
|
|
98673
|
+
const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
|
|
98674
|
+
return ((_node$fiasfield$ = node.fiasfield[0]) === null || _node$fiasfield$ === void 0 ? void 0 : _node$fiasfield$.path) != undefined ? [builder.valueInitializer(node, node.dataBinding, false, node.fiasfield[0].path, undefined, "")] : [];
|
|
98675
|
+
}
|
|
98614
98676
|
doBuildDataDeclaration(context) {
|
|
98615
98677
|
const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
|
|
98616
98678
|
const PathDeclarations = [];
|
|
98617
98679
|
if (node.fiasfield && node.fiasfield.length > 0) {
|
|
98618
|
-
var _node$fiasfield
|
|
98680
|
+
var _node$fiasfield$2;
|
|
98619
98681
|
node.fiasfield.forEach(field => {
|
|
98620
98682
|
PathDeclarations.push(context.addChildPathSectionDeclarationEntry(node, field.path, node.dataBinding.requisite));
|
|
98621
98683
|
});
|
|
98622
|
-
if ((_node$fiasfield$ = node.fiasfield[0]) !== null && _node$fiasfield$ !== void 0 && _node$fiasfield
|
|
98684
|
+
if ((_node$fiasfield$2 = node.fiasfield[0]) !== null && _node$fiasfield$2 !== void 0 && _node$fiasfield$2.path) {
|
|
98623
98685
|
const declEntry = {};
|
|
98624
98686
|
declEntry["value"] = context.initSequenceFactory.takeFromModelOrDefaultValue("");
|
|
98625
98687
|
PathDeclarations.push({
|
|
@@ -98635,11 +98697,12 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
98635
98697
|
*doTraverseChildren() {
|
|
98636
98698
|
// no children
|
|
98637
98699
|
}
|
|
98638
|
-
doConvert() {
|
|
98700
|
+
doConvert(context) {
|
|
98639
98701
|
var _node$title, _node$withSteads, _node$division, _node$searchToAddress;
|
|
98640
98702
|
const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
|
|
98641
98703
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("Fias");
|
|
98642
|
-
|
|
98704
|
+
const bindingPath = (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_0__.getNewBindingPathExpression)(node);
|
|
98705
|
+
markupBuilder.prop(x => x.bindingPath).set(bindingPath);
|
|
98643
98706
|
markupBuilder.prop(x => x.hasOwnBindingPath).set(node.getOwnPathForKCLang() != undefined);
|
|
98644
98707
|
markupBuilder.prop(x => x.title).set((_node$title = node.title) !== null && _node$title !== void 0 ? _node$title : "Адрес регистрации");
|
|
98645
98708
|
markupBuilder.prop(x => x.withSteads).set((_node$withSteads = node.withSteads) !== null && _node$withSteads !== void 0 ? _node$withSteads : false);
|
|
@@ -98664,6 +98727,7 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
98664
98727
|
markupBuilder.prop(x => x.mvdOptions).set(mvdOptions);
|
|
98665
98728
|
}
|
|
98666
98729
|
if (node.adrgaroptions) {
|
|
98730
|
+
context.addPathsToContext([bindingPath]);
|
|
98667
98731
|
const adrGarOptions = this.extractAdrGarOptions(node.adrgaroptions);
|
|
98668
98732
|
markupBuilder.prop(x => x.adrGarOptions).set(adrGarOptions);
|
|
98669
98733
|
}
|
|
@@ -99503,6 +99567,18 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
|
|
|
99503
99567
|
multiple: multipleNode
|
|
99504
99568
|
});
|
|
99505
99569
|
}
|
|
99570
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
99571
|
+
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_11__.FileLoaderNode);
|
|
99572
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
99573
|
+
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each);
|
|
99574
|
+
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
99575
|
+
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
99576
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
99577
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
99578
|
+
return;
|
|
99579
|
+
}
|
|
99580
|
+
yield* buildContext.buildBasicValidations(ownPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
99581
|
+
}
|
|
99506
99582
|
doBuildDataDeclaration(context) {
|
|
99507
99583
|
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_11__.FileLoaderNode);
|
|
99508
99584
|
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node), this.addAttachmentPathDeclEntry(context, node));
|
|
@@ -102497,8 +102573,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102497
102573
|
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
102498
102574
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
102499
102575
|
/* harmony import */ var _CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps.ts");
|
|
102500
|
-
/* harmony import */ var
|
|
102501
|
-
/* harmony import */ var
|
|
102576
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
102577
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
102578
|
+
/* harmony import */ var _SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SelectCheckboxNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectCheckbox/SelectCheckboxNode.ts");
|
|
102579
|
+
|
|
102502
102580
|
|
|
102503
102581
|
|
|
102504
102582
|
|
|
@@ -102507,24 +102585,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102507
102585
|
|
|
102508
102586
|
class SelectCheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.SugarNodeConverterBase {
|
|
102509
102587
|
static getAcceptNodeClass() {
|
|
102510
|
-
return
|
|
102588
|
+
return _SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode;
|
|
102511
102589
|
}
|
|
102512
102590
|
get nodePaths() {
|
|
102513
|
-
const node = this.getCurrentNodeAs(
|
|
102591
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102514
102592
|
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node)];
|
|
102515
102593
|
}
|
|
102594
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
102595
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102596
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
102597
|
+
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.each);
|
|
102598
|
+
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
102599
|
+
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
102600
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
102601
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
102602
|
+
return;
|
|
102603
|
+
}
|
|
102604
|
+
yield* buildContext.buildBasicValidations(ownPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
102605
|
+
}
|
|
102516
102606
|
doBuildNodeValidations(validationGenerator) {
|
|
102517
|
-
const node = this.getCurrentNodeAs(
|
|
102607
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102518
102608
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
102519
102609
|
}
|
|
102520
102610
|
doBuildDataDeclaration(context) {
|
|
102521
|
-
const node = this.getCurrentNodeAs(
|
|
102611
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102522
102612
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
|
|
102523
102613
|
optional: node.dataBinding.optional
|
|
102524
102614
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
102525
102615
|
}
|
|
102526
102616
|
doBuildNormalizeRules(builder) {
|
|
102527
|
-
const node = this.getCurrentNodeAs(
|
|
102617
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102528
102618
|
return [builder.valueInitializer(node, node.dataBinding, false)];
|
|
102529
102619
|
}
|
|
102530
102620
|
getDefaultValue(node) {
|
|
@@ -102542,16 +102632,16 @@ class SelectCheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
102542
102632
|
return defaultValue;
|
|
102543
102633
|
}
|
|
102544
102634
|
buildChildrenDataDeclaration(context) {
|
|
102545
|
-
const node = this.getCurrentNodeAs(
|
|
102635
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102546
102636
|
return context.processChildrenDataDeclaration(node.children);
|
|
102547
102637
|
}
|
|
102548
102638
|
*doTraverseChildren() {
|
|
102549
|
-
const node = this.getCurrentNodeAs(
|
|
102639
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102550
102640
|
yield* node.children;
|
|
102551
102641
|
}
|
|
102552
102642
|
doConvert(context) {
|
|
102553
102643
|
var _node$checkedValue2, _node$uncheckedValue2;
|
|
102554
|
-
const node = this.getCurrentNodeAs(
|
|
102644
|
+
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102555
102645
|
this.ensurePathExists(node, node.dataBinding.path);
|
|
102556
102646
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__.componentMarkupBuilder)("SelectCheckbox");
|
|
102557
102647
|
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node));
|
|
@@ -102562,7 +102652,7 @@ class SelectCheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
102562
102652
|
markupBuilder.prop(x => x.callHelperOnChange).set(context.generateHelperFunctionExpression(node, "callHelperOnChange", node.callHelperOnChange));
|
|
102563
102653
|
}
|
|
102564
102654
|
if (node.disabled2 != undefined) {
|
|
102565
|
-
markupBuilder.prop(x => x.disabled2).set((0,
|
|
102655
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__.buildExpressionPropValue)(node.disabled2));
|
|
102566
102656
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
102567
102657
|
markupBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
102568
102658
|
}
|
|
@@ -103221,8 +103311,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103221
103311
|
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
103222
103312
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
103223
103313
|
/* harmony import */ var _CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps.ts");
|
|
103224
|
-
/* harmony import */ var
|
|
103225
|
-
/* harmony import */ var
|
|
103314
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
103315
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
103316
|
+
/* harmony import */ var _ToggleNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ToggleNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Toggle/ToggleNode.ts");
|
|
103317
|
+
|
|
103226
103318
|
|
|
103227
103319
|
|
|
103228
103320
|
|
|
@@ -103231,24 +103323,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103231
103323
|
|
|
103232
103324
|
class ToggleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.SugarNodeConverterBase {
|
|
103233
103325
|
static getAcceptNodeClass() {
|
|
103234
|
-
return
|
|
103326
|
+
return _ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode;
|
|
103235
103327
|
}
|
|
103236
103328
|
get nodePaths() {
|
|
103237
|
-
const node = this.getCurrentNodeAs(
|
|
103329
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103238
103330
|
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node)];
|
|
103239
103331
|
}
|
|
103332
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
103333
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103334
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
103335
|
+
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.each);
|
|
103336
|
+
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
103337
|
+
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
103338
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
103339
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
103340
|
+
return;
|
|
103341
|
+
}
|
|
103342
|
+
yield* buildContext.buildBasicValidations(ownPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
103343
|
+
}
|
|
103240
103344
|
doBuildNodeValidations(validationGenerator) {
|
|
103241
|
-
const node = this.getCurrentNodeAs(
|
|
103345
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103242
103346
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
103243
103347
|
}
|
|
103244
103348
|
doBuildDataDeclaration(context) {
|
|
103245
|
-
const node = this.getCurrentNodeAs(
|
|
103349
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103246
103350
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
|
|
103247
103351
|
optional: node.dataBinding.optional
|
|
103248
103352
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
103249
103353
|
}
|
|
103250
103354
|
doBuildNormalizeRules(builder) {
|
|
103251
|
-
const node = this.getCurrentNodeAs(
|
|
103355
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103252
103356
|
return [builder.valueInitializer(node, node.dataBinding, false), ...builder.specialFieldsInitializer(node, {
|
|
103253
103357
|
disabled: false
|
|
103254
103358
|
})];
|
|
@@ -103268,15 +103372,15 @@ class ToggleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
|
|
|
103268
103372
|
return defaultValue;
|
|
103269
103373
|
}
|
|
103270
103374
|
buildChildrenDataDeclaration(context) {
|
|
103271
|
-
const node = this.getCurrentNodeAs(
|
|
103375
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103272
103376
|
return context.processChildrenDataDeclaration(node.children);
|
|
103273
103377
|
}
|
|
103274
103378
|
*doTraverseChildren() {
|
|
103275
|
-
const node = this.getCurrentNodeAs(
|
|
103379
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103276
103380
|
yield* node.children;
|
|
103277
103381
|
}
|
|
103278
103382
|
doConvert(context) {
|
|
103279
|
-
const node = this.getCurrentNodeAs(
|
|
103383
|
+
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103280
103384
|
this.ensurePathExists(node, node.dataBinding.path);
|
|
103281
103385
|
const markupBuilderToggle = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__.componentMarkupBuilder)("Toggle");
|
|
103282
103386
|
markupBuilderToggle.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node));
|
|
@@ -103288,7 +103392,7 @@ class ToggleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
|
|
|
103288
103392
|
markupBuilderToggle.prop(x => x.callHelperOnChange).set(context.generateHelperFunctionExpression(node, "callHelperOnChange", node.callHelperOnChange));
|
|
103289
103393
|
}
|
|
103290
103394
|
if (node.disabled2 != undefined) {
|
|
103291
|
-
markupBuilderToggle.prop(x => x.disabled2).set((0,
|
|
103395
|
+
markupBuilderToggle.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__.buildExpressionPropValue)(node.disabled2));
|
|
103292
103396
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
103293
103397
|
markupBuilderToggle.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
103294
103398
|
}
|
|
@@ -103369,16 +103473,18 @@ class TreePicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
103369
103473
|
static getAcceptNodeClass() {
|
|
103370
103474
|
return _TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode;
|
|
103371
103475
|
}
|
|
103372
|
-
|
|
103476
|
+
*doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
|
|
103373
103477
|
const node = this.getCurrentNodeAs(_TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode);
|
|
103374
103478
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
103375
103479
|
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each);
|
|
103376
103480
|
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
103377
103481
|
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
103378
|
-
|
|
103379
|
-
|
|
103482
|
+
const ownPath = node.getOwnPathForKCLang();
|
|
103483
|
+
if (typeNode == undefined && schemaTypeNode == undefined || ownPath == undefined) {
|
|
103484
|
+
return;
|
|
103380
103485
|
}
|
|
103381
|
-
|
|
103486
|
+
const ownPathFixed = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.createRelativeFromTokens)([...ownPath.getPathParts()].filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken));
|
|
103487
|
+
yield* buildContext.buildBasicValidations(ownPathFixed, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional, node.gId);
|
|
103382
103488
|
}
|
|
103383
103489
|
doBuildNodeValidations(validationGenerator) {
|
|
103384
103490
|
const node = this.getCurrentNodeAs(_TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode);
|
|
@@ -104556,9 +104662,6 @@ class LinetextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
104556
104662
|
static getAcceptNodeClass() {
|
|
104557
104663
|
return _LineTextNode__WEBPACK_IMPORTED_MODULE_3__.LineTextNode;
|
|
104558
104664
|
}
|
|
104559
|
-
doBuildNodeValidations() {
|
|
104560
|
-
// no validations
|
|
104561
|
-
}
|
|
104562
104665
|
doBuildDataDeclaration(context) {
|
|
104563
104666
|
const node = this.getCurrentNodeAs(_LineTextNode__WEBPACK_IMPORTED_MODULE_3__.LineTextNode);
|
|
104564
104667
|
return context.mergeDataDeclaration(context.addVisibilityPathDeclEntryNew(node));
|
|
@@ -105209,12 +105312,12 @@ class FLangNormalizationRulesBuilder {
|
|
|
105209
105312
|
const targetPathReference = node.getFullPath().toEachIteration().trimLastStarIfLastToken();
|
|
105210
105313
|
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
|
|
105211
105314
|
}
|
|
105212
|
-
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
|
|
105213
|
-
var
|
|
105315
|
+
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix, customDefaultValue) {
|
|
105316
|
+
var _ref;
|
|
105214
105317
|
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
105215
105318
|
const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
105216
105319
|
const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
|
|
105217
|
-
const defaultValue = (
|
|
105320
|
+
const defaultValue = (_ref = customDefaultValue !== null && customDefaultValue !== void 0 ? customDefaultValue : dataBinding.defaultValue) !== null && _ref !== void 0 ? _ref : "";
|
|
105218
105321
|
const sourceSequenceType = node.sourceXmlNode.attributes.settings ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.SETTINGS : disabled ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DISABLED : _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DEFAULT;
|
|
105219
105322
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
|
|
105220
105323
|
try {
|