@kontur.candy/generator 6.5.1 → 6.5.2-fix-extendedschema-diffs.2
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 +204 -97
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47651,6 +47651,57 @@ function checkIsReservedPath(path) {
|
|
|
47651
47651
|
|
|
47652
47652
|
/***/ }),
|
|
47653
47653
|
|
|
47654
|
+
/***/ "./Common/ModelPath/ModelPathValidator.ts":
|
|
47655
|
+
/*!************************************************!*\
|
|
47656
|
+
!*** ./Common/ModelPath/ModelPathValidator.ts ***!
|
|
47657
|
+
\************************************************/
|
|
47658
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
47659
|
+
|
|
47660
|
+
"use strict";
|
|
47661
|
+
__webpack_require__.r(__webpack_exports__);
|
|
47662
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47663
|
+
/* harmony export */ ModelPathValidator: () => (/* binding */ ModelPathValidator)
|
|
47664
|
+
/* harmony export */ });
|
|
47665
|
+
/* harmony import */ var _ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
47666
|
+
var _ModelPathValidator;
|
|
47667
|
+
|
|
47668
|
+
class ModelPathValidator {
|
|
47669
|
+
static validate(path) {
|
|
47670
|
+
for (const token of path.getPathParts()) {
|
|
47671
|
+
if (_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isMultiToken(token)) {
|
|
47672
|
+
continue;
|
|
47673
|
+
}
|
|
47674
|
+
if (_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isInstanceTokenOrInstancesSpec(token)) {
|
|
47675
|
+
continue;
|
|
47676
|
+
}
|
|
47677
|
+
if (token === "." || token === "..") {
|
|
47678
|
+
continue;
|
|
47679
|
+
}
|
|
47680
|
+
if (!ModelPathValidator.isValidXmlName(token)) {
|
|
47681
|
+
return {
|
|
47682
|
+
valid: false,
|
|
47683
|
+
invalidToken: token,
|
|
47684
|
+
error: `Token "${token}" is not a valid XML name`
|
|
47685
|
+
};
|
|
47686
|
+
}
|
|
47687
|
+
}
|
|
47688
|
+
return {
|
|
47689
|
+
valid: true
|
|
47690
|
+
};
|
|
47691
|
+
}
|
|
47692
|
+
static isValidXmlName(name) {
|
|
47693
|
+
return ModelPathValidator.XML_NAME_REGEX.test(name);
|
|
47694
|
+
}
|
|
47695
|
+
}
|
|
47696
|
+
_ModelPathValidator = ModelPathValidator;
|
|
47697
|
+
ModelPathValidator.NAME_START_CHAR = "[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF" + "\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F" + "\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]";
|
|
47698
|
+
ModelPathValidator.NAME_CHAR = "[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF" + "\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F" + "\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD" + "\\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]";
|
|
47699
|
+
// Full XML Name regex built from the two character classes above.
|
|
47700
|
+
// The `u` flag enables proper handling of Unicode code points > U+FFFF.
|
|
47701
|
+
ModelPathValidator.XML_NAME_REGEX = new RegExp(`^${_ModelPathValidator.NAME_START_CHAR}${_ModelPathValidator.NAME_CHAR}*$`, "u");
|
|
47702
|
+
|
|
47703
|
+
/***/ }),
|
|
47704
|
+
|
|
47654
47705
|
/***/ "./Common/ModelPath/PathMatcher.ts":
|
|
47655
47706
|
/*!*****************************************!*\
|
|
47656
47707
|
!*** ./Common/ModelPath/PathMatcher.ts ***!
|
|
@@ -62825,9 +62876,9 @@ class FormSchemaRngAttribute {
|
|
|
62825
62876
|
isEditorOnly() {
|
|
62826
62877
|
return this.editorOnly || false;
|
|
62827
62878
|
}
|
|
62828
|
-
|
|
62879
|
+
isDisableValueAutoInit() {
|
|
62829
62880
|
var _this$disableValueAut;
|
|
62830
|
-
return (_this$disableValueAut = this.disableValueAutoInit) !== null && _this$disableValueAut !== void 0 ? _this$disableValueAut : this.parent.
|
|
62881
|
+
return (_this$disableValueAut = this.disableValueAutoInit) !== null && _this$disableValueAut !== void 0 ? _this$disableValueAut : this.parent.isDisableValueAutoInit();
|
|
62831
62882
|
}
|
|
62832
62883
|
}
|
|
62833
62884
|
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
@@ -62902,9 +62953,9 @@ class FormSchemaRngElement {
|
|
|
62902
62953
|
getAttributesArray() {
|
|
62903
62954
|
return this.attributes.values().toArray();
|
|
62904
62955
|
}
|
|
62905
|
-
|
|
62956
|
+
isDisableValueAutoInit() {
|
|
62906
62957
|
var _this$disableValueAut2;
|
|
62907
|
-
return (_this$disableValueAut2 = this.disableValueAutoInit) !== null && _this$disableValueAut2 !== void 0 ? _this$disableValueAut2 : this.parent instanceof FormSchemaRngElement ? this.parent.
|
|
62958
|
+
return (_this$disableValueAut2 = this.disableValueAutoInit) !== null && _this$disableValueAut2 !== void 0 ? _this$disableValueAut2 : this.parent instanceof FormSchemaRngElement ? this.parent.isDisableValueAutoInit() : undefined;
|
|
62908
62959
|
}
|
|
62909
62960
|
getUseServerFilters() {
|
|
62910
62961
|
return this.useServerFilters;
|
|
@@ -70561,6 +70612,9 @@ class DataDeclarationGenerationContext {
|
|
|
70561
70612
|
[(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_8__.getResolvedBindingPath)(sugarNode)]: declEntry
|
|
70562
70613
|
};
|
|
70563
70614
|
}
|
|
70615
|
+
adjustPathMultiplicityByScheme(path) {
|
|
70616
|
+
return this.formSchemaRng.adjustPathMultiplicity(path);
|
|
70617
|
+
}
|
|
70564
70618
|
}
|
|
70565
70619
|
|
|
70566
70620
|
/***/ }),
|
|
@@ -70659,6 +70713,10 @@ class DataDeclarationGenerationTimeHelper {
|
|
|
70659
70713
|
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());
|
|
70660
70714
|
return optionalBlocksPaths;
|
|
70661
70715
|
}
|
|
70716
|
+
isNodeHasDisableValueAutoInitEntry(targetPath) {
|
|
70717
|
+
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
70718
|
+
return declEntry === null || declEntry === void 0 ? void 0 : declEntry.hasDisableValueAutoInitFlag;
|
|
70719
|
+
}
|
|
70662
70720
|
getDataDeclarationRootPath() {
|
|
70663
70721
|
const anyPath = Object.keys(this.dataDeclaration)[0];
|
|
70664
70722
|
if (anyPath == undefined) {
|
|
@@ -70814,8 +70872,9 @@ class DataDeclarationGenerator {
|
|
|
70814
70872
|
if (entry instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_6__.FormSchemaRngElement && entry.useServerFilters != undefined) {
|
|
70815
70873
|
declarationEntry.useServerFilters = entry.useServerFilters;
|
|
70816
70874
|
}
|
|
70817
|
-
|
|
70818
|
-
|
|
70875
|
+
const disableValueAutoInit = entry.isDisableValueAutoInit();
|
|
70876
|
+
if (disableValueAutoInit != undefined) {
|
|
70877
|
+
declarationEntry.hasDisableValueAutoInitFlag = disableValueAutoInit;
|
|
70819
70878
|
}
|
|
70820
70879
|
}
|
|
70821
70880
|
}
|
|
@@ -71628,6 +71687,7 @@ function buildExtendedSchemaInfo(dataDeclaration) {
|
|
|
71628
71687
|
props.isPage = isPage || undefined;
|
|
71629
71688
|
props.isForceFilledOptional = props.isFilledOptionalRequired = isPage && optional && (isMultiple && singleSectionsSet.has(path) || !isMultiple) || undefined;
|
|
71630
71689
|
props.fields = buildFieldsConfiguration(path, dataDeclaration);
|
|
71690
|
+
props.disableValueAutoInit = dataDeclaration.isNodeHasDisableValueAutoInitEntry(path);
|
|
71631
71691
|
}
|
|
71632
71692
|
return {
|
|
71633
71693
|
roots: [...nodes.values()].map(x => x[0])
|
|
@@ -75432,7 +75492,7 @@ function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression)
|
|
|
75432
75492
|
}
|
|
75433
75493
|
function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
|
|
75434
75494
|
var _formSchemaRng$getEle;
|
|
75435
|
-
return isSetStatement(x) && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.
|
|
75495
|
+
return isSetStatement(x) && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.isDisableValueAutoInit() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
75436
75496
|
}
|
|
75437
75497
|
function wrapWithArgumentsCondition(expression) {
|
|
75438
75498
|
const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression);
|
|
@@ -76665,7 +76725,7 @@ class FormulaAndInitOnlyNormalizationRuleGenerator {
|
|
|
76665
76725
|
const createDisableValueAutoInitRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "disableValueAutoInit"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("true"));
|
|
76666
76726
|
const ignoredValueSetRuleMapper = x => {
|
|
76667
76727
|
var _this$formSchemaRng$g;
|
|
76668
|
-
return x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && x.left.valueName === "value" && (_this$formSchemaRng$g = this.formSchemaRng.getElementByPath(x.left.modePath)) !== null && _this$formSchemaRng$g !== void 0 && _this$formSchemaRng$g.
|
|
76728
|
+
return x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && x.left.valueName === "value" && (_this$formSchemaRng$g = this.formSchemaRng.getElementByPath(x.left.modePath)) !== null && _this$formSchemaRng$g !== void 0 && _this$formSchemaRng$g.isDisableValueAutoInit() ? [createValueRuleEmptyRule(x.left.modePath), createDisableValueAutoInitRule(x.left.modePath)] : [x];
|
|
76669
76729
|
};
|
|
76670
76730
|
const allFormulaRules = this.formulaRulesBuilder.buildRules();
|
|
76671
76731
|
const updatedFormulaRules = Iterator.from(allFormulaRules).flatMap(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.isSetStatement)(x) && x.left.valueName === "autoValue" ? [x, createValueRuleFromAutoValueRule(x)] : [x]);
|
|
@@ -80355,16 +80415,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80355
80415
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
80356
80416
|
/* harmony export */ LinkConverter: () => (/* binding */ LinkConverter)
|
|
80357
80417
|
/* harmony export */ });
|
|
80358
|
-
/* harmony import */ var
|
|
80359
|
-
/* harmony import */ var
|
|
80360
|
-
/* harmony import */ var
|
|
80361
|
-
/* harmony import */ var
|
|
80362
|
-
/* harmony import */ var
|
|
80363
|
-
/* harmony import */ var
|
|
80364
|
-
/* harmony import */ var
|
|
80365
|
-
/* harmony import */ var
|
|
80366
|
-
/* harmony import */ var
|
|
80367
|
-
/* harmony import */ var
|
|
80418
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js");
|
|
80419
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
|
|
80420
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
80421
|
+
/* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../DataDeclarationGenerator/DataDeclarationGenerationContext */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts");
|
|
80422
|
+
/* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
|
|
80423
|
+
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
80424
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
80425
|
+
/* harmony import */ var _Typography_Icon_GetIconName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Typography/Icon/GetIconName */ "./Generator/src/generators/markupGenerator/ElementProcessors/Typography/Icon/GetIconName.ts");
|
|
80426
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
80427
|
+
/* harmony import */ var _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../../../Common/KCLangRuntimeUtils */ "./Common/KCLangRuntimeUtils.ts");
|
|
80428
|
+
/* harmony import */ var _common_ConditionUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../common/ConditionUtils */ "./Generator/src/common/ConditionUtils.ts");
|
|
80429
|
+
/* harmony import */ var _Common_ModelPath_ModelPathValidator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPathValidator */ "./Common/ModelPath/ModelPathValidator.ts");
|
|
80430
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
80431
|
+
/* harmony import */ var _LinkNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LinkNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Action/Link/LinkNode.ts");
|
|
80432
|
+
|
|
80433
|
+
|
|
80368
80434
|
|
|
80369
80435
|
|
|
80370
80436
|
|
|
@@ -80375,44 +80441,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80375
80441
|
|
|
80376
80442
|
|
|
80377
80443
|
|
|
80378
|
-
|
|
80444
|
+
|
|
80445
|
+
class LinkConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.SugarNodeConverterBase {
|
|
80379
80446
|
static getAcceptNodeClass() {
|
|
80380
|
-
return
|
|
80447
|
+
return _LinkNode__WEBPACK_IMPORTED_MODULE_12__.LinkNode;
|
|
80381
80448
|
}
|
|
80382
80449
|
doBuildDataDeclaration(context) {
|
|
80383
|
-
|
|
80384
|
-
|
|
80385
|
-
|
|
80386
|
-
|
|
80450
|
+
var _node$optional;
|
|
80451
|
+
const node = this.getCurrentNodeAs(_LinkNode__WEBPACK_IMPORTED_MODULE_12__.LinkNode);
|
|
80452
|
+
const nodePath = node.getFullPath();
|
|
80453
|
+
if (!_Common_ModelPath_ModelPathValidator__WEBPACK_IMPORTED_MODULE_10__.ModelPathValidator.validate(nodePath).valid) {
|
|
80454
|
+
// eslint-disable-next-line no-console
|
|
80455
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_0___default().yellow(`WARN: [LinkConverter] Not supported path is used: [${nodePath.toLegacyPath()}]`));
|
|
80456
|
+
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection;
|
|
80457
|
+
}
|
|
80458
|
+
const nodePathWithoutMultiplicity = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_11__.createAbsoluteFromTokens)(nodePath.getPathPartsAsArray().filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_11__.PathTokens.isSimpleToken));
|
|
80459
|
+
|
|
80460
|
+
// Если в Link передали путь, который не матчится со схемой (не совпадают множественность), то игнорируем его
|
|
80461
|
+
if (!nodePath.isEquals(context.adjustPathMultiplicityByScheme(nodePathWithoutMultiplicity))) {
|
|
80462
|
+
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection;
|
|
80463
|
+
}
|
|
80464
|
+
return context.mergeDataDeclaration(node.path ? context.addPathDeclEntry(node, [["value", context.initSequenceFactory.takeFromModelOrDefaultValue(node.defaultValue)]]) : _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection, context.addSpecialFieldsEntry(node, {
|
|
80465
|
+
optional: (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
80466
|
+
}), node.path ? context.addPathSectionDeclarationEntry(node) : _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection, context.addVisibilityPathDeclEntryNew(node));
|
|
80387
80467
|
}
|
|
80388
80468
|
buildChildrenDataDeclaration(context) {
|
|
80389
|
-
const node = this.getCurrentNodeAs(
|
|
80469
|
+
const node = this.getCurrentNodeAs(_LinkNode__WEBPACK_IMPORTED_MODULE_12__.LinkNode);
|
|
80390
80470
|
return context.processChildrenDataDeclaration(node.children);
|
|
80391
80471
|
}
|
|
80392
80472
|
*doTraverseChildren() {
|
|
80393
|
-
const node = this.getCurrentNodeAs(
|
|
80473
|
+
const node = this.getCurrentNodeAs(_LinkNode__WEBPACK_IMPORTED_MODULE_12__.LinkNode);
|
|
80394
80474
|
yield* node.children;
|
|
80395
80475
|
}
|
|
80396
80476
|
doConvert(context) {
|
|
80397
|
-
const node = this.getCurrentNodeAs(
|
|
80477
|
+
const node = this.getCurrentNodeAs(_LinkNode__WEBPACK_IMPORTED_MODULE_12__.LinkNode);
|
|
80398
80478
|
if (node.path != undefined && node.onClick == undefined) {
|
|
80399
|
-
throw new
|
|
80479
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(`onClick is required when path attribute specified`, node, "path");
|
|
80400
80480
|
}
|
|
80401
80481
|
return node.onClick ? this.getLinkForModelChanging(context, node) : this.getLinkWithHref(context, node);
|
|
80402
80482
|
}
|
|
80403
80483
|
getLinkForModelChanging(context, node) {
|
|
80404
|
-
const markupBuilder = (0,
|
|
80484
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("Link");
|
|
80405
80485
|
markupBuilder.prop("data-tid").set(node.tid);
|
|
80406
|
-
markupBuilder.prop(x => x.bindingPath).set((0,
|
|
80486
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getNewBindingPathExpression)(node));
|
|
80407
80487
|
markupBuilder.prop(x => x.onClick).set(context.generateHelperFunctionExpression(node, "onClick", node.onClick));
|
|
80408
80488
|
markupBuilder.prop(x => x.use).set(node.use);
|
|
80409
80489
|
markupBuilder.prop(x => x.hint).set(this.getConverterResultFromAttributeWithMarkup(context, node.hint));
|
|
80410
80490
|
markupBuilder.prop(x => x.metricsId).set(node.metricsId);
|
|
80411
|
-
markupBuilder.prop(x => x.icon).set((0,
|
|
80491
|
+
markupBuilder.prop(x => x.icon).set((0,_Typography_Icon_GetIconName__WEBPACK_IMPORTED_MODULE_6__.getIconName)(node, node.icon));
|
|
80412
80492
|
markupBuilder.appendChild(context.convertChildNodes(node.children));
|
|
80413
80493
|
markupBuilder.prop(x => x.stopPropagation).set(node.stopPropagation);
|
|
80414
80494
|
if (node.disabled2 != undefined) {
|
|
80415
|
-
markupBuilder.prop(x => x.disabled2).set((0,
|
|
80495
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(node.disabled2));
|
|
80416
80496
|
}
|
|
80417
80497
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
80418
80498
|
if (node.disabled2 != undefined) {
|
|
@@ -80422,21 +80502,21 @@ class LinkConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
80422
80502
|
return markupBuilder.buildConverterResult();
|
|
80423
80503
|
}
|
|
80424
80504
|
getLinkWithHref(context, node) {
|
|
80425
|
-
const markupBuilder = (0,
|
|
80505
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("Link");
|
|
80426
80506
|
markupBuilder.prop("data-tid").set(node.tid);
|
|
80427
80507
|
markupBuilder.prop(x => x.href).set(node.href);
|
|
80428
80508
|
markupBuilder.prop(x => x.target).set("_blank");
|
|
80429
80509
|
markupBuilder.prop(x => x.use).set(node.use);
|
|
80430
80510
|
markupBuilder.prop(x => x.hint).set(this.getConverterResultFromAttributeWithMarkup(context, node.hint));
|
|
80431
80511
|
markupBuilder.prop(x => x.metricsId).set(node.metricsId);
|
|
80432
|
-
markupBuilder.prop(x => x.icon).set((0,
|
|
80512
|
+
markupBuilder.prop(x => x.icon).set((0,_Typography_Icon_GetIconName__WEBPACK_IMPORTED_MODULE_6__.getIconName)(node, node.icon));
|
|
80433
80513
|
markupBuilder.prop(x => x.stopPropagation).set(node.stopPropagation);
|
|
80434
80514
|
if (node.disabled2 != undefined) {
|
|
80435
|
-
markupBuilder.prop(x => x.disabled2).set((0,
|
|
80515
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(node.disabled2));
|
|
80436
80516
|
}
|
|
80437
80517
|
if (node.hrefExpression != undefined) {
|
|
80438
|
-
const conditionWithDependencies = (0,
|
|
80439
|
-
markupBuilder.prop(x => x.hrefExpression).set((0,
|
|
80518
|
+
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_9__.convertConditionToJsOrFailWithFriendlySugarError)(node.hrefExpression, "path", "count", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_8__.KCLangRuntimeUtils.kcLangUtilsName, node, "condition");
|
|
80519
|
+
markupBuilder.prop(x => x.hrefExpression).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(conditionWithDependencies.condition, conditionWithDependencies.dependencies));
|
|
80440
80520
|
}
|
|
80441
80521
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
80442
80522
|
if (node.disabled2 != undefined || node.hrefExpression != undefined) {
|
|
@@ -81244,9 +81324,10 @@ class ChoiceConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
|
|
|
81244
81324
|
return _ChoiceNode__WEBPACK_IMPORTED_MODULE_3__.ChoiceNode;
|
|
81245
81325
|
}
|
|
81246
81326
|
doBuildDataDeclaration(context) {
|
|
81327
|
+
var _node$dataBinding$opt;
|
|
81247
81328
|
const node = this.getCurrentNodeAs(_ChoiceNode__WEBPACK_IMPORTED_MODULE_3__.ChoiceNode);
|
|
81248
81329
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
|
|
81249
|
-
optional: node.dataBinding.optional,
|
|
81330
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
81250
81331
|
disabled: node.disabled
|
|
81251
81332
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
81252
81333
|
}
|
|
@@ -85090,22 +85171,23 @@ class PageConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Sug
|
|
|
85090
85171
|
}
|
|
85091
85172
|
}
|
|
85092
85173
|
doBuildDataDeclaration(context) {
|
|
85093
|
-
var _node$
|
|
85174
|
+
var _node$multiple;
|
|
85094
85175
|
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
85095
85176
|
if (node.path == undefined) {
|
|
85096
85177
|
return {};
|
|
85097
85178
|
}
|
|
85098
85179
|
const result = {};
|
|
85180
|
+
const isOptional = node.optional;
|
|
85099
85181
|
if (node.multiple) {
|
|
85100
85182
|
result.children = [{
|
|
85101
85183
|
model: true
|
|
85102
|
-
},
|
|
85184
|
+
}, isOptional ? [] : ["0"]];
|
|
85103
85185
|
}
|
|
85104
|
-
if (
|
|
85186
|
+
if (isOptional) {
|
|
85105
85187
|
result.optional = [true];
|
|
85106
85188
|
}
|
|
85107
85189
|
const optionalFieldPath = node.getFullPath().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_15__.OptionalSectionFilledFieldName).toLegacyPath();
|
|
85108
|
-
const optionalFieldRequired = (
|
|
85190
|
+
const optionalFieldRequired = (isOptional !== null && isOptional !== void 0 ? isOptional : false) && !((_node$multiple = node.multiple) !== null && _node$multiple !== void 0 ? _node$multiple : false);
|
|
85109
85191
|
return context.mergeDataDeclaration({
|
|
85110
85192
|
[this.getResolvedBindingPath(node)]: result
|
|
85111
85193
|
}, context.addPageId(node, node.id), context.addPathSectionDeclarationEntry(node), optionalFieldRequired ? {
|
|
@@ -91538,12 +91620,14 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
91538
91620
|
const node = this.getCurrentNodeAs(_CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.CrossfitTableNode);
|
|
91539
91621
|
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
91540
91622
|
}
|
|
91541
|
-
*doBuildNormalizeRules(builder) {
|
|
91623
|
+
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
91542
91624
|
const node = this.getCurrentNodeAs(_CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.CrossfitTableNode);
|
|
91543
91625
|
for (const rowNode of node.rows) {
|
|
91544
91626
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.MultilineNode) {
|
|
91545
|
-
var _rowNode$optional;
|
|
91546
|
-
|
|
91627
|
+
var _ref, _rowNode$optional;
|
|
91628
|
+
const element = formSchemaRng.getElementByPath(rowNode.getFullPath());
|
|
91629
|
+
const isOptional = (_ref = (_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
91630
|
+
yield* builder.childrenInitializer(rowNode, isOptional, rowNode.defaultChildren);
|
|
91547
91631
|
yield* builder.specialFieldsInitializer(rowNode, {
|
|
91548
91632
|
disabled: undefined
|
|
91549
91633
|
});
|
|
@@ -91563,10 +91647,11 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
91563
91647
|
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(rowNode), context.processChildrenDataDeclaration(rowNode.children));
|
|
91564
91648
|
}
|
|
91565
91649
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.MultilineNode) {
|
|
91566
|
-
var
|
|
91650
|
+
var _rowNode$optional2;
|
|
91567
91651
|
this.ensurePathExists(rowNode, rowNode.dataScope.path);
|
|
91568
|
-
|
|
91569
|
-
|
|
91652
|
+
const isOptional = (_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath());
|
|
91653
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children(isOptional !== null && isOptional !== void 0 ? isOptional : false, rowNode.defaultChildren)]]), rowNode.maxOccurs != undefined && /^\d+$/.test(rowNode.maxOccurs) && context.maxOccurs(rowNode.getFullPath(), rowNode.maxOccurs), context.addSpecialFieldsEntry(rowNode, {
|
|
91654
|
+
optional: isOptional
|
|
91570
91655
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
|
|
91571
91656
|
if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.CrossfitTableRowNode) {
|
|
91572
91657
|
return context.mergeDataDeclaration(context.processChildrenDataDeclaration(rowNode2.columns));
|
|
@@ -93505,15 +93590,19 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
93505
93590
|
return _MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode;
|
|
93506
93591
|
}
|
|
93507
93592
|
doBuildDataDeclaration(context) {
|
|
93508
|
-
var
|
|
93593
|
+
var _node$optional;
|
|
93509
93594
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
93510
|
-
|
|
93511
|
-
|
|
93595
|
+
const isOptional = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath());
|
|
93596
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children(isOptional !== null && isOptional !== void 0 ? isOptional : false)]]), context.maxOccurs(node.getFullPath(), node.maxOccurs), context.addSpecialFieldsEntry(node, {
|
|
93597
|
+
optional: isOptional
|
|
93512
93598
|
}), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
93513
93599
|
}
|
|
93514
|
-
*doBuildNormalizeRules(builder) {
|
|
93600
|
+
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
93601
|
+
var _ref, _node$optional2;
|
|
93515
93602
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
93516
|
-
|
|
93603
|
+
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
93604
|
+
const isOptional = (_ref = (_node$optional2 = node.optional) !== null && _node$optional2 !== void 0 ? _node$optional2 : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
93605
|
+
yield* builder.childrenInitializer(node, isOptional);
|
|
93517
93606
|
}
|
|
93518
93607
|
buildChildrenDataDeclaration(context) {
|
|
93519
93608
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
@@ -93674,9 +93763,9 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
93674
93763
|
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
93675
93764
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
93676
93765
|
if (node.path != undefined) {
|
|
93677
|
-
var _ref;
|
|
93766
|
+
var _ref, _node$optional;
|
|
93678
93767
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
93679
|
-
const isOptional = (_ref = node.optional
|
|
93768
|
+
const isOptional = (_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
93680
93769
|
yield* builder.childrenInitializer(node, isOptional);
|
|
93681
93770
|
yield* builder.specialFieldsInitializer(node, {
|
|
93682
93771
|
disabled: undefined
|
|
@@ -93684,10 +93773,11 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
93684
93773
|
}
|
|
93685
93774
|
}
|
|
93686
93775
|
doBuildDataDeclaration(context) {
|
|
93687
|
-
var
|
|
93776
|
+
var _node$optional2;
|
|
93688
93777
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
93689
|
-
|
|
93690
|
-
|
|
93778
|
+
const isOptional = (_node$optional2 = node.optional) !== null && _node$optional2 !== void 0 ? _node$optional2 : context.isMultipleNodeOptionalFromScheme(node.getFullPath());
|
|
93779
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children(isOptional !== null && isOptional !== void 0 ? isOptional : false)]]), context.maxOccurs(node.getFullPath(), node.maxOccurs), context.addSpecialFieldsEntry(node, {
|
|
93780
|
+
optional: isOptional
|
|
93691
93781
|
}), context.addPathSectionDeclarationEntry(node));
|
|
93692
93782
|
}
|
|
93693
93783
|
buildChildrenDataDeclaration(context) {
|
|
@@ -94729,9 +94819,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
94729
94819
|
const node = this.getCurrentNodeAs(_StickyTableNode__WEBPACK_IMPORTED_MODULE_17__.StickyTableNode);
|
|
94730
94820
|
for (const row of node.rows) {
|
|
94731
94821
|
if (row instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_17__.StickyTableMultilineNode) {
|
|
94732
|
-
var _ref;
|
|
94822
|
+
var _ref, _row$optional;
|
|
94733
94823
|
const element = formSchemaRng.getElementByPath(row.getFullPath());
|
|
94734
|
-
const isOptional = (_ref = row.optional
|
|
94824
|
+
const isOptional = (_ref = (_row$optional = row.optional) !== null && _row$optional !== void 0 ? _row$optional : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
94735
94825
|
yield* builder.childrenInitializer(row, isOptional);
|
|
94736
94826
|
}
|
|
94737
94827
|
}
|
|
@@ -94823,9 +94913,10 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
94823
94913
|
}
|
|
94824
94914
|
processMultilineNode(context, rowNode) {
|
|
94825
94915
|
if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_17__.StickyTableMultilineNode) {
|
|
94826
|
-
var
|
|
94827
|
-
|
|
94828
|
-
|
|
94916
|
+
var _rowNode$optional;
|
|
94917
|
+
const isOptional = (_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath());
|
|
94918
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children(isOptional !== null && isOptional !== void 0 ? isOptional : false, rowNode.defaultChildren)]]), rowNode.maxOccurs != undefined && /^\d+$/.test(rowNode.maxOccurs) && context.maxOccurs(rowNode.getFullPath(), rowNode.maxOccurs), context.addSpecialFieldsEntry(rowNode, {
|
|
94919
|
+
optional: isOptional
|
|
94829
94920
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
|
|
94830
94921
|
}
|
|
94831
94922
|
return undefined;
|
|
@@ -94896,10 +94987,10 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
94896
94987
|
const orientation = (_this$getParentPage = this.getParentPage()) === null || _this$getParentPage === void 0 ? void 0 : _this$getParentPage.orientation;
|
|
94897
94988
|
const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
|
|
94898
94989
|
if (this.isSimpleForm()) {
|
|
94899
|
-
var
|
|
94990
|
+
var _ref2, _node$deprecatedDiado;
|
|
94900
94991
|
mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
|
|
94901
94992
|
mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
|
|
94902
|
-
const width = (
|
|
94993
|
+
const width = (_ref2 = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref2 !== void 0 ? _ref2 : maxWidthSimpleForm;
|
|
94903
94994
|
mb.prop(x => x.width).set(width);
|
|
94904
94995
|
mb.prop(x => x.footerHeight).set(160);
|
|
94905
94996
|
} else {
|
|
@@ -95148,9 +95239,9 @@ BindingPath: ${errorPath}`));
|
|
|
95148
95239
|
if (this.isSimpleForm()) {
|
|
95149
95240
|
mb.prop(x => x.buttonType).set(undefined);
|
|
95150
95241
|
} else {
|
|
95151
|
-
var _multiline$rowmenu,
|
|
95242
|
+
var _multiline$rowmenu, _ref3, _tableNode$removeButt;
|
|
95152
95243
|
const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
|
|
95153
|
-
const removebutton = (
|
|
95244
|
+
const removebutton = (_ref3 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true;
|
|
95154
95245
|
mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
|
|
95155
95246
|
}
|
|
95156
95247
|
if (multiline.maxOccurs != undefined) {
|
|
@@ -95170,7 +95261,7 @@ BindingPath: ${errorPath}`));
|
|
|
95170
95261
|
mb.prop(x => x.optional).set((_multiline$optional = multiline.optional) !== null && _multiline$optional !== void 0 ? _multiline$optional : false);
|
|
95171
95262
|
}
|
|
95172
95263
|
getMultiline(context, node, multiline, start, end = Infinity) {
|
|
95173
|
-
var
|
|
95264
|
+
var _ref4, _node$removeButton, _multiline$rowmenu2, _ref5, _node$removeButton2, _context$popPathsCont2;
|
|
95174
95265
|
const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
|
|
95175
95266
|
const mb = overrideInfo == undefined ? (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_6__.componentMarkupBuilder)("MultiLine") : (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_6__.componentMarkupBuilder)(overrideInfo.dependencies, overrideInfo.controlName);
|
|
95176
95267
|
if (overrideInfo != undefined) {
|
|
@@ -95186,7 +95277,7 @@ BindingPath: ${errorPath}`));
|
|
|
95186
95277
|
mb.prop(x => x.debounceDisable).set(multiline.debounceDisable);
|
|
95187
95278
|
mb.prop(x => x.defaultFilter).set(multiline.defaultFilter);
|
|
95188
95279
|
mb.prop(x => x.dynamicHeight).set(multiline.dynamicHeight);
|
|
95189
|
-
const hasRemoveButton = ((
|
|
95280
|
+
const hasRemoveButton = ((_ref4 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
|
|
95190
95281
|
const needAddButton = multiline.addbutton !== "false";
|
|
95191
95282
|
if (this.isSimpleForm()) {
|
|
95192
95283
|
mb.prop(x => x.addButton).set(needAddButton ? multiline.addbutton : false);
|
|
@@ -95197,7 +95288,7 @@ BindingPath: ${errorPath}`));
|
|
|
95197
95288
|
mb.prop(x => x.removeButton).set(false);
|
|
95198
95289
|
mb.prop(x => x.removeButtonPosition).set(undefined);
|
|
95199
95290
|
}
|
|
95200
|
-
mb.prop(x => x.disableScroll).set(multiline.disableScroll ? multiline.disableScroll : needAddButton || ((
|
|
95291
|
+
mb.prop(x => x.disableScroll).set(multiline.disableScroll ? multiline.disableScroll : needAddButton || ((_ref5 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) ? undefined : true);
|
|
95201
95292
|
context.pushPathsContext();
|
|
95202
95293
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
|
|
95203
95294
|
mb.appendChildren(this.getColumns(context, node, multiline.rows[0].columns, start, end, false));
|
|
@@ -95221,8 +95312,8 @@ BindingPath: ${errorPath}`));
|
|
|
95221
95312
|
hasActionButton(node) {
|
|
95222
95313
|
const multilines = node.rows.map(child => (0,_StickyTableNode__WEBPACK_IMPORTED_MODULE_17__.isMultilineNode)(child) ? child : child.columns.find(_StickyTableNode__WEBPACK_IMPORTED_MODULE_17__.isMultilineNode)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined);
|
|
95223
95314
|
return multilines.some(multiline => {
|
|
95224
|
-
var
|
|
95225
|
-
return ((
|
|
95315
|
+
var _ref6, _node$removeButton3;
|
|
95316
|
+
return ((_ref6 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref6 !== void 0 ? _ref6 : true) || multiline.rowmenu;
|
|
95226
95317
|
});
|
|
95227
95318
|
}
|
|
95228
95319
|
getActionButtonPosition(node) {
|
|
@@ -97573,9 +97664,10 @@ class CheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
97573
97664
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
97574
97665
|
}
|
|
97575
97666
|
doBuildDataDeclaration(context) {
|
|
97667
|
+
var _node$dataBinding$opt;
|
|
97576
97668
|
const node = this.getCurrentNodeAs(_CheckboxNode__WEBPACK_IMPORTED_MODULE_5__.CheckboxNode);
|
|
97577
97669
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
|
|
97578
|
-
optional: node.dataBinding.optional
|
|
97670
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
97579
97671
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
97580
97672
|
}
|
|
97581
97673
|
doBuildNormalizeRules(builder) {
|
|
@@ -97805,9 +97897,10 @@ class ComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__
|
|
|
97805
97897
|
return paths;
|
|
97806
97898
|
}
|
|
97807
97899
|
doBuildDataDeclaration(context) {
|
|
97900
|
+
var _node$dataBinding$opt;
|
|
97808
97901
|
const node = this.getCurrentNodeAs(_ComboBoxNode__WEBPACK_IMPORTED_MODULE_10__.ComboBoxNode);
|
|
97809
97902
|
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, {
|
|
97810
|
-
optional: node.dataBinding.optional,
|
|
97903
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
97811
97904
|
disabled: node.disabled
|
|
97812
97905
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
97813
97906
|
}
|
|
@@ -98390,9 +98483,10 @@ class DateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Sug
|
|
|
98390
98483
|
})];
|
|
98391
98484
|
}
|
|
98392
98485
|
doBuildDataDeclaration(context) {
|
|
98486
|
+
var _node$dataBinding$opt;
|
|
98393
98487
|
const node = this.getCurrentNodeAs(_DateNode__WEBPACK_IMPORTED_MODULE_6__.DateNode);
|
|
98394
98488
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
|
|
98395
|
-
optional: node.dataBinding.optional,
|
|
98489
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
98396
98490
|
disabled: node.disabled
|
|
98397
98491
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
98398
98492
|
}
|
|
@@ -98642,9 +98736,10 @@ class DiadocSuggestComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORT
|
|
|
98642
98736
|
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(node)];
|
|
98643
98737
|
}
|
|
98644
98738
|
doBuildDataDeclaration(context) {
|
|
98739
|
+
var _node$dataBinding$opt;
|
|
98645
98740
|
const node = this.getCurrentNodeAs(_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_7__.DiadocSuggestComboBoxNode);
|
|
98646
98741
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)], ["disabled", context.initSequenceFactory.disabled()]]), context.addSpecialFieldsEntry(node, {
|
|
98647
|
-
optional: node.dataBinding.optional
|
|
98742
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
98648
98743
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
98649
98744
|
}
|
|
98650
98745
|
buildChildrenDataDeclaration() {
|
|
@@ -100346,9 +100441,10 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
100346
100441
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
100347
100442
|
}
|
|
100348
100443
|
doBuildDataDeclaration(context) {
|
|
100444
|
+
var _node$dataBinding$opt;
|
|
100349
100445
|
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_8__.InputNode);
|
|
100350
100446
|
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, {
|
|
100351
|
-
optional: node.dataBinding.optional,
|
|
100447
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
100352
100448
|
disabled: node.disabled
|
|
100353
100449
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
100354
100450
|
}
|
|
@@ -101155,9 +101251,10 @@ class KladrConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_5__.Su
|
|
|
101155
101251
|
}];
|
|
101156
101252
|
}
|
|
101157
101253
|
doBuildDataDeclaration(context) {
|
|
101254
|
+
var _node$dataBinding$opt;
|
|
101158
101255
|
const node = this.getCurrentNodeAs(_KladrNode__WEBPACK_IMPORTED_MODULE_8__.KladrNode);
|
|
101159
101256
|
return context.mergeDataDeclaration(node.kind === "stat" ? context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)], ["index", context.initSequenceFactory.takeFromModelOrFetchFn("index", node.dataBinding.fetchfn)], ["regionCode", context.initSequenceFactory.takeFromModelOrFetchFn("regionCode", node.dataBinding.fetchfn)], ["district", context.initSequenceFactory.takeFromModelOrFetchFn("district", node.dataBinding.fetchfn)], ["city", context.initSequenceFactory.takeFromModelOrFetchFn("city", node.dataBinding.fetchfn)], ["settlement", context.initSequenceFactory.takeFromModelOrFetchFn("settlement", node.dataBinding.fetchfn)], ["street", context.initSequenceFactory.takeFromModelOrFetchFn("street", node.dataBinding.fetchfn)], ["house", context.initSequenceFactory.takeFromModelOrFetchFn("house", node.dataBinding.fetchfn)], ["building", context.initSequenceFactory.takeFromModelOrFetchFn("building", node.dataBinding.fetchfn)], ["room", context.initSequenceFactory.takeFromModelOrFetchFn("room", node.dataBinding.fetchfn)]]) : _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection, context.addSpecialFieldsEntry(node, {
|
|
101160
|
-
optional: node.dataBinding.optional
|
|
101257
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
101161
101258
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
101162
101259
|
}
|
|
101163
101260
|
buildChildrenDataDeclaration(context) {
|
|
@@ -101434,22 +101531,23 @@ class PicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__
|
|
|
101434
101531
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
101435
101532
|
}
|
|
101436
101533
|
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
101437
|
-
var _ref;
|
|
101534
|
+
var _ref, _node$dataBinding$opt;
|
|
101438
101535
|
const node = this.getCurrentNodeAs(_PicklistNode__WEBPACK_IMPORTED_MODULE_8__.PicklistNode);
|
|
101439
101536
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
101440
101537
|
yield builder.valueInitializer(node, node.dataBinding, false);
|
|
101441
|
-
const isOptional = (_ref = node.dataBinding.optional
|
|
101538
|
+
const isOptional = (_ref = (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
101442
101539
|
yield* builder.specialFieldsInitializer(node, {});
|
|
101443
101540
|
if (node.multiple) {
|
|
101444
101541
|
yield* builder.childrenInitializerForPicklist(node, isOptional);
|
|
101445
101542
|
}
|
|
101446
101543
|
}
|
|
101447
101544
|
doBuildDataDeclaration(context) {
|
|
101448
|
-
var _node$dataBinding$
|
|
101545
|
+
var _node$dataBinding$opt2;
|
|
101449
101546
|
const node = this.getCurrentNodeAs(_PicklistNode__WEBPACK_IMPORTED_MODULE_8__.PicklistNode);
|
|
101547
|
+
const isOptional = (_node$dataBinding$opt2 = node.dataBinding.optional) !== null && _node$dataBinding$opt2 !== void 0 ? _node$dataBinding$opt2 : context.isMultipleNodeOptionalFromScheme(node.getFullPath());
|
|
101450
101548
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)]]), context.addSpecialFieldsEntry(node, {
|
|
101451
|
-
optional:
|
|
101452
|
-
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), context.addChildrenPathDeclEntry(node, node.dataBinding.path,
|
|
101549
|
+
optional: isOptional
|
|
101550
|
+
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), context.addChildrenPathDeclEntry(node, node.dataBinding.path, isOptional !== null && isOptional !== void 0 ? isOptional : false, node.dataBinding.requisite));
|
|
101453
101551
|
}
|
|
101454
101552
|
get nodePaths() {
|
|
101455
101553
|
var _node$binding$map, _node$binding;
|
|
@@ -101902,9 +102000,10 @@ class RadioGroupConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
|
|
|
101902
102000
|
return [builder.valueInitializer(node, node.dataBinding, false), ...builder.specialFieldsInitializer(node, {})];
|
|
101903
102001
|
}
|
|
101904
102002
|
doBuildDataDeclaration(context) {
|
|
102003
|
+
var _node$dataBinding$opt;
|
|
101905
102004
|
const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode);
|
|
101906
102005
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)]]), context.addSpecialFieldsEntry(node, {
|
|
101907
|
-
optional: node.dataBinding.optional
|
|
102006
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
101908
102007
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
101909
102008
|
}
|
|
101910
102009
|
buildChildrenDataDeclaration(context) {
|
|
@@ -102398,9 +102497,10 @@ class SelectConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.S
|
|
|
102398
102497
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
102399
102498
|
}
|
|
102400
102499
|
doBuildDataDeclaration(context) {
|
|
102500
|
+
var _node$dataBinding$opt;
|
|
102401
102501
|
const node = this.getCurrentNodeAs(_SelectNode__WEBPACK_IMPORTED_MODULE_6__.SelectNode);
|
|
102402
102502
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.disabled ? undefined : ["disabled", context.initSequenceFactory.disabled()]]), context.addSpecialFieldsEntry(node, {
|
|
102403
|
-
optional: node.dataBinding.optional,
|
|
102503
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
102404
102504
|
disabled: node.disabled
|
|
102405
102505
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
102406
102506
|
}
|
|
@@ -102961,9 +103061,10 @@ class SelectCheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
102961
103061
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
102962
103062
|
}
|
|
102963
103063
|
doBuildDataDeclaration(context) {
|
|
103064
|
+
var _node$dataBinding$opt;
|
|
102964
103065
|
const node = this.getCurrentNodeAs(_SelectCheckboxNode__WEBPACK_IMPORTED_MODULE_6__.SelectCheckboxNode);
|
|
102965
103066
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
|
|
102966
|
-
optional: node.dataBinding.optional
|
|
103067
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
102967
103068
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
102968
103069
|
}
|
|
102969
103070
|
doBuildNormalizeRules(builder) {
|
|
@@ -103184,9 +103285,10 @@ class TaxRebateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3_
|
|
|
103184
103285
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
103185
103286
|
}
|
|
103186
103287
|
doBuildDataDeclaration(context) {
|
|
103288
|
+
var _node$dataBinding$opt;
|
|
103187
103289
|
const node = this.getCurrentNodeAs(_TaxRebateNode__WEBPACK_IMPORTED_MODULE_7__.TaxRebateNode);
|
|
103188
103290
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, undefined)]]), context.addSpecialFieldsEntry(node, {
|
|
103189
|
-
optional: node.dataBinding.optional
|
|
103291
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
103190
103292
|
}), context.addPathSectionDeclarationEntry(node));
|
|
103191
103293
|
}
|
|
103192
103294
|
doBuildNormalizeRules(builder) {
|
|
@@ -103443,9 +103545,10 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
103443
103545
|
})];
|
|
103444
103546
|
}
|
|
103445
103547
|
doBuildDataDeclaration(context) {
|
|
103548
|
+
var _node$dataBinding$opt;
|
|
103446
103549
|
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_8__.TextAreaNode);
|
|
103447
103550
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
|
|
103448
|
-
optional: node.dataBinding.optional,
|
|
103551
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
103449
103552
|
disabled: node.disabled
|
|
103450
103553
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
103451
103554
|
}
|
|
@@ -103699,9 +103802,10 @@ class ToggleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
|
|
|
103699
103802
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
103700
103803
|
}
|
|
103701
103804
|
doBuildDataDeclaration(context) {
|
|
103805
|
+
var _node$dataBinding$opt;
|
|
103702
103806
|
const node = this.getCurrentNodeAs(_ToggleNode__WEBPACK_IMPORTED_MODULE_6__.ToggleNode);
|
|
103703
103807
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
|
|
103704
|
-
optional: node.dataBinding.optional
|
|
103808
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath())
|
|
103705
103809
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
103706
103810
|
}
|
|
103707
103811
|
doBuildNormalizeRules(builder) {
|
|
@@ -103844,22 +103948,23 @@ class TreePicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
103844
103948
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
103845
103949
|
}
|
|
103846
103950
|
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
103847
|
-
var _ref;
|
|
103951
|
+
var _ref, _node$dataBinding$opt;
|
|
103848
103952
|
const node = this.getCurrentNodeAs(_TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode);
|
|
103849
103953
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
103850
103954
|
yield builder.valueInitializer(node, node.dataBinding, false);
|
|
103851
|
-
const isOptional = (_ref = node.dataBinding.optional
|
|
103955
|
+
const isOptional = (_ref = (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : element === null || element === void 0 ? void 0 : element.isOptional()) !== null && _ref !== void 0 ? _ref : false;
|
|
103852
103956
|
yield* builder.specialFieldsInitializer(node, {});
|
|
103853
103957
|
if (node.multiple) {
|
|
103854
103958
|
yield* builder.childrenInitializerForPicklist(node, isOptional);
|
|
103855
103959
|
}
|
|
103856
103960
|
}
|
|
103857
103961
|
doBuildDataDeclaration(context) {
|
|
103858
|
-
var _node$dataBinding$
|
|
103962
|
+
var _node$dataBinding$opt2;
|
|
103859
103963
|
const node = this.getCurrentNodeAs(_TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode);
|
|
103964
|
+
const isOptional = (_node$dataBinding$opt2 = node.dataBinding.optional) !== null && _node$dataBinding$opt2 !== void 0 ? _node$dataBinding$opt2 : context.isMultipleNodeOptionalFromScheme(node.getFullPath());
|
|
103860
103965
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)]]), context.addSpecialFieldsEntry(node, {
|
|
103861
|
-
optional:
|
|
103862
|
-
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), context.addChildrenPathDeclEntry(node, node.dataBinding.path,
|
|
103966
|
+
optional: isOptional
|
|
103967
|
+
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), context.addChildrenPathDeclEntry(node, node.dataBinding.path, isOptional !== null && isOptional !== void 0 ? isOptional : false, node.dataBinding.requisite));
|
|
103863
103968
|
}
|
|
103864
103969
|
get nodePaths() {
|
|
103865
103970
|
const node = this.getCurrentNodeAs(_TreePicklistNode__WEBPACK_IMPORTED_MODULE_6__.TreePicklistNode);
|
|
@@ -104176,9 +104281,10 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
104176
104281
|
yield* buildContext.buildBasicValidations(ownPath, targetPath, prefixPath, typeNode, schemaTypeNode, node.validationInfo.optional == undefined ? element === null || element === void 0 ? void 0 : element.isOptional() : node.validationInfo.optional);
|
|
104177
104282
|
}
|
|
104178
104283
|
doBuildDataDeclaration(context) {
|
|
104284
|
+
var _node$dataBinding$opt;
|
|
104179
104285
|
const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_8__.PopupTextAreaNode);
|
|
104180
104286
|
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, {
|
|
104181
|
-
optional: node.dataBinding.optional,
|
|
104287
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
104182
104288
|
disabled: node.disabled
|
|
104183
104289
|
}), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
104184
104290
|
}
|
|
@@ -105107,13 +105213,14 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
105107
105213
|
})];
|
|
105108
105214
|
}
|
|
105109
105215
|
doBuildDataDeclaration(context) {
|
|
105216
|
+
var _node$dataBinding$opt;
|
|
105110
105217
|
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_7__.TextNode);
|
|
105111
105218
|
if (!node.dataBinding.path) {
|
|
105112
105219
|
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
|
|
105113
105220
|
}
|
|
105114
105221
|
const fetchfn = node.dataBinding.fetchfn;
|
|
105115
105222
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], fetchfn !== null && fetchfn !== void 0 && fetchfn.includes("sign") ? ["bossValue", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "bossValue")] : undefined, fetchfn !== null && fetchfn !== void 0 && fetchfn.includes("sign") ? ["agentValue", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "agentValue")] : undefined, fetchfn === "sendername" ? ["senderInn", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "senderInn")] : undefined, fetchfn === "editablenameorg" || fetchfn === "formsclientinfo_editablenameorg" ? ["nameorg", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "nameorg")] : undefined]), context.addSpecialFieldsEntry(node, {
|
|
105116
|
-
optional: node.dataBinding.optional,
|
|
105223
|
+
optional: (_node$dataBinding$opt = node.dataBinding.optional) !== null && _node$dataBinding$opt !== void 0 ? _node$dataBinding$opt : context.isMultipleNodeOptionalFromScheme(node.getFullPath()),
|
|
105117
105224
|
disabled: node.disabled
|
|
105118
105225
|
}), node.dataBinding.path && context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
|
|
105119
105226
|
}
|
|
@@ -155669,7 +155776,7 @@ module.exports = "Элемент для отображения информац
|
|
|
155669
155776
|
\**************************************************************************************************/
|
|
155670
155777
|
/***/ ((module) => {
|
|
155671
155778
|
|
|
155672
|
-
module.exports = "Используется для выделения раздела. По умолчанию будет нарисована в виде отдельного листа.\n\n### Модальные разделы\n\nДля того, чтобы создать модальный раздел, нужно указать в < page > атрибут **showOnDemand**. Тогда этот раздел будет отображаться в редакторе только по какому-то действию (например, при клике по контролу).\n\n#### Открытие и закрытие модального раздела\n\nЧтобы модальный раздел открылся, нужно указать в атрибуте onClick того контрола, который вызывает действие, функцию открытия раздела. Это может быть как встроенная функция **modalInstanceUnit.Open**, которая только показывает нужный раздел, или же самописная helper-функция, где можно написать дополнительные действия при открытии модального раздела.\n\nОбычно открытие модального раздела инициируется по клику на ссылке в строке таблицы. Это выглядит следующим образом:\n\n```\n<multiline\n path=\"СправДох\"\n addbutton=\"false\"\n rowmenu=\"false\"\n removebutton=\"false\"\n optional=\"true\">\n <row>\n ...\n <column>\n <link onClick=\"modalInstanceUnit.Open\">\n <fioline path=\"ПолучДох/ФИО\" />\n </link>\n ...\n```\n\nТ.о. по клику на link с ФИО должен открыться модальный раздел. \n\nПри этом, чтобы открылся правильный раздел, функция должна получить id этого раздела в качестве параметра. Его можно задать непосредственно в page, откуда вызывается открытие модальго раздела, с помощью атрибута **modalUnitPageId**.\n\n```\n<page\n id=\"inquiryList\"\n template=\"default\"\n navigationName=\"Список справок\"\n modalUnitPageId=\"inquiry\"\n path=\"/Файл/Документ/НДФЛ6.2\"\n visible=\"path('@settings/isReadOnly') != 'true'\n || (path('@settings/isReadOnly') == 'true'\n && count('/Файл/Документ/НДФЛ6.2/СправДох') > 0)\"\n pageActions={{ hideButton: true }}>\n```\n\nДля закрытия модального раздела нужно указать в атрибуте onBackButtonClick в headerpanel функцию закрытия раздела: встроенную функцию **modalInstanceUnit.Close** или самописную helper-функцию:\n\n```\n<headerpanel onBackButtonClick=\"modalInstanceUnit.Close\">\n <text size=\"20px\">\n <fioline path=\"ПолучДох/ФИО\" />\n </text>\n```\n\n
|
|
155779
|
+
module.exports = "Используется для выделения раздела. По умолчанию будет нарисована в виде отдельного листа.\n\n### Модальные разделы\n\nДля того, чтобы создать модальный раздел, нужно указать в < page > атрибут **showOnDemand**. Тогда этот раздел будет отображаться в редакторе только по какому-то действию (например, при клике по контролу).\n\n#### Открытие и закрытие модального раздела\n\nЧтобы модальный раздел открылся, нужно указать в атрибуте onClick того контрола, который вызывает действие, функцию открытия раздела. Это может быть как встроенная функция **modalInstanceUnit.Open**, которая только показывает нужный раздел, или же самописная helper-функция, где можно написать дополнительные действия при открытии модального раздела.\n\nОбычно открытие модального раздела инициируется по клику на ссылке в строке таблицы. Это выглядит следующим образом:\n\n```\n<multiline\n path=\"СправДох\"\n addbutton=\"false\"\n rowmenu=\"false\"\n removebutton=\"false\"\n optional=\"true\">\n <row>\n ...\n <column>\n <link onClick=\"modalInstanceUnit.Open\">\n <fioline path=\"ПолучДох/ФИО\" />\n </link>\n ...\n```\n\nТ.о. по клику на link с ФИО должен открыться модальный раздел. \n\nПри этом, чтобы открылся правильный раздел, функция должна получить id этого раздела в качестве параметра. Его можно задать непосредственно в page, откуда вызывается открытие модальго раздела, с помощью атрибута **modalUnitPageId**.\n\n```\n<page\n id=\"inquiryList\"\n template=\"default\"\n navigationName=\"Список справок\"\n modalUnitPageId=\"inquiry\"\n path=\"/Файл/Документ/НДФЛ6.2\"\n visible=\"path('@settings/isReadOnly') != 'true'\n || (path('@settings/isReadOnly') == 'true'\n && count('/Файл/Документ/НДФЛ6.2/СправДох') > 0)\"\n pageActions={{ hideButton: true }}>\n</page>\n```\n\nДля закрытия модального раздела нужно указать в атрибуте onBackButtonClick в headerpanel функцию закрытия раздела: встроенную функцию **modalInstanceUnit.Close** или самописную helper-функцию:\n\n```\n<headerpanel onBackButtonClick=\"modalInstanceUnit.Close\">\n <text size=\"20px\">\n <fioline path=\"ПолучДох/ФИО\" />\n </text>\n ...\n```\n\n#### Навигация в модальный раздел\n\nДля навигации в модальный раздел также нужно указать id модального раздела в атрибуте **modalUnitPageId**. Для форм с простой структурой этого будет достаточно. Под простой структурой подразумевается, когда внутри раздела, единичного или множественного, есть только 1 уникальный модальный раздел.\n\nДля форм, где есть несколько разделов с одинаковым путем и в каждом есть свой списочный раздел, для навигации в некоторые пути нужно как-то определять, какой из нескольких разделов был заполнен. Для этого нужно дополнительно указать в атрибуте **isUnitExistsFlag** название флага-признака того, был ли тот или иной раздел создан.\nПри навигации в такой модальный раздел другие открытые модальные разделы автоматически закрываются.\nНапример, **для формы ЕФС-1**:\n\n```\n<page\nid=\"tdTable\"\nmodalUnitPageId=\"tdEmployee\"\nisUnitExistsFlag=\"tdIsExists\"\ntemplate=\"default\"\nnavigationName=\"1.1 Трудовая деятельность СЗВ-ТД\"\npath=\"/ЭДПФР/ЕФС-1/СЗВ\"\n...\n```\n\nДля остальных случаев форм со сложной структурой разделов навигация \"из коробки\" работать не будет. Тогда нужно в хэлпере написать кастомную функцию для навигации. Её название должно быть указано в атрибуте **onNavigateFromErrorLog** в < page > модального раздела.\nПример:\n\n```\n<page\n showOnDemand\n onNavigateFromErrorLog=\"inquiryNavigateFromErrorLog\"\n id=\"inquiry\"\n template=\"multiple\"\n navigationName=\"Справка\"\n path=\"/Файл/Документ/НДФЛ6.2/СправДох\"\n optional=\"true\"\n>\n</page>\n```\n\nПример хэлпера для навигации:\n\n```\nexport default function({ publicForm, pathUtils }, { id, pageId, instance, parentInstances }) {\nconst targetInstance = parentInstances?.length > 0 ? parentInstances[0] : instance;\npublicForm.unit('inquiryList').openModalUnit(publicForm.unit('inquiry', targetInstance))\n}\n```";
|
|
155673
155780
|
|
|
155674
155781
|
/***/ }),
|
|
155675
155782
|
|