@kontur.candy/generator 4.238.0-nightly.67ebe → 4.238.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +442 -926
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112928,6 +112928,10 @@ class ModelPath {
|
|
|
112928
112928
|
return new ModelPath(this.tokens.map(x => x === PathTokens.each ? PathTokens.current : x), this.isAbsolute());
|
|
112929
112929
|
}
|
|
112930
112930
|
|
|
112931
|
+
toEachIteration() {
|
|
112932
|
+
return new ModelPath(this.tokens.map(x => x === PathTokens.current ? PathTokens.each : x), this.isAbsolute());
|
|
112933
|
+
}
|
|
112934
|
+
|
|
112931
112935
|
toAbsolute() {
|
|
112932
112936
|
if (!this.absolute) {
|
|
112933
112937
|
throw new Error(`Path '${this.toLegacyPath()} is not absolute'`);
|
|
@@ -120658,293 +120662,6 @@ class CompositionOperandContext extends antlr4ts_ParserRuleContext__WEBPACK_IMPO
|
|
|
120658
120662
|
|
|
120659
120663
|
/***/ }),
|
|
120660
120664
|
|
|
120661
|
-
/***/ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts":
|
|
120662
|
-
/*!*****************************************************************!*\
|
|
120663
|
-
!*** ./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts ***!
|
|
120664
|
-
\*****************************************************************/
|
|
120665
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120666
|
-
|
|
120667
|
-
"use strict";
|
|
120668
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120669
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120670
|
-
/* harmony export */ "traverseKCLangExpression": () => (/* binding */ traverseKCLangExpression),
|
|
120671
|
-
/* harmony export */ "DefaultKCLangExpressionVisitor": () => (/* binding */ DefaultKCLangExpressionVisitor)
|
|
120672
|
-
/* harmony export */ });
|
|
120673
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
120674
|
-
|
|
120675
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
120676
|
-
function traverseKCLangExpression(node, visitor) {
|
|
120677
|
-
switch (node.type) {
|
|
120678
|
-
case "cast":
|
|
120679
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120680
|
-
visitor.visitCastExpressionKCLangNode(node);
|
|
120681
|
-
break;
|
|
120682
|
-
|
|
120683
|
-
case "oneof":
|
|
120684
|
-
traverseKCLangExpression(node.testExpression, visitor);
|
|
120685
|
-
visitor.visitOneOfExpressionKCLangNode(node);
|
|
120686
|
-
break;
|
|
120687
|
-
|
|
120688
|
-
case "abs":
|
|
120689
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120690
|
-
visitor.visitAbsKCLangNode(node);
|
|
120691
|
-
break;
|
|
120692
|
-
|
|
120693
|
-
case "xabs":
|
|
120694
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120695
|
-
visitor.visitXAbsKCLangNode(node);
|
|
120696
|
-
break;
|
|
120697
|
-
|
|
120698
|
-
case "exists":
|
|
120699
|
-
visitor.visitExistsKCLangNode(node);
|
|
120700
|
-
break;
|
|
120701
|
-
|
|
120702
|
-
case "length":
|
|
120703
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120704
|
-
visitor.visitLengthKCLangNode(node);
|
|
120705
|
-
break;
|
|
120706
|
-
|
|
120707
|
-
case "and":
|
|
120708
|
-
for (const expression of node.expressions) {
|
|
120709
|
-
traverseKCLangExpression(expression, visitor);
|
|
120710
|
-
}
|
|
120711
|
-
|
|
120712
|
-
visitor.visitAndKCLangNode(node);
|
|
120713
|
-
break;
|
|
120714
|
-
|
|
120715
|
-
case "sum":
|
|
120716
|
-
visitor.visitSumKCLangNode(node);
|
|
120717
|
-
break;
|
|
120718
|
-
|
|
120719
|
-
case "gt":
|
|
120720
|
-
case "ge":
|
|
120721
|
-
case "lt":
|
|
120722
|
-
case "le":
|
|
120723
|
-
case "eq":
|
|
120724
|
-
case "noteq":
|
|
120725
|
-
for (const expression of node.expressions) {
|
|
120726
|
-
traverseKCLangExpression(expression, visitor);
|
|
120727
|
-
}
|
|
120728
|
-
|
|
120729
|
-
visitor.visitComparisonKCLangNode(node);
|
|
120730
|
-
break;
|
|
120731
|
-
|
|
120732
|
-
case "division":
|
|
120733
|
-
case "multiply":
|
|
120734
|
-
for (const expression of node.expressions) {
|
|
120735
|
-
traverseKCLangExpression(expression, visitor);
|
|
120736
|
-
}
|
|
120737
|
-
|
|
120738
|
-
visitor.visitMultiplyKCLangNode(node);
|
|
120739
|
-
break;
|
|
120740
|
-
|
|
120741
|
-
case "minus":
|
|
120742
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120743
|
-
visitor.visitMinusKCLangNode(node);
|
|
120744
|
-
break;
|
|
120745
|
-
|
|
120746
|
-
case "not":
|
|
120747
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120748
|
-
visitor.visitNotKCLangNode(node);
|
|
120749
|
-
break;
|
|
120750
|
-
|
|
120751
|
-
case "round":
|
|
120752
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120753
|
-
visitor.visitRoundKCLangNode(node);
|
|
120754
|
-
break;
|
|
120755
|
-
|
|
120756
|
-
case "choose":
|
|
120757
|
-
traverseKCLangExpression(node.if, visitor);
|
|
120758
|
-
traverseKCLangExpression(node.else, visitor);
|
|
120759
|
-
traverseKCLangExpression(node.then, visitor);
|
|
120760
|
-
visitor.visitChooseKCLangNode(node);
|
|
120761
|
-
break;
|
|
120762
|
-
|
|
120763
|
-
case "const":
|
|
120764
|
-
visitor.visitConstKCLangNode(node);
|
|
120765
|
-
break;
|
|
120766
|
-
|
|
120767
|
-
case "argument":
|
|
120768
|
-
visitor.visitArgumentKCLangNode(node);
|
|
120769
|
-
break;
|
|
120770
|
-
|
|
120771
|
-
case "or":
|
|
120772
|
-
for (const expression of node.expressions) {
|
|
120773
|
-
traverseKCLangExpression(expression, visitor);
|
|
120774
|
-
}
|
|
120775
|
-
|
|
120776
|
-
visitor.visitOrKCLangNode(node);
|
|
120777
|
-
break;
|
|
120778
|
-
|
|
120779
|
-
case "multySum":
|
|
120780
|
-
visitor.visitMultySumKCLangNode(node);
|
|
120781
|
-
break;
|
|
120782
|
-
|
|
120783
|
-
case "substring":
|
|
120784
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120785
|
-
visitor.visitSubstringKCLangNode(node);
|
|
120786
|
-
break;
|
|
120787
|
-
|
|
120788
|
-
case "regexMatch":
|
|
120789
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120790
|
-
visitor.visitRegexMatchKCLangNode(node);
|
|
120791
|
-
break;
|
|
120792
|
-
|
|
120793
|
-
default:
|
|
120794
|
-
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
120795
|
-
break;
|
|
120796
|
-
}
|
|
120797
|
-
}
|
|
120798
|
-
class DefaultKCLangExpressionVisitor {
|
|
120799
|
-
visitAbsKCLangNode(node) {// default empty implementation
|
|
120800
|
-
}
|
|
120801
|
-
|
|
120802
|
-
visitAndKCLangNode(node) {// default empty implementation
|
|
120803
|
-
}
|
|
120804
|
-
|
|
120805
|
-
visitArgumentKCLangNode(node) {// default empty implementation
|
|
120806
|
-
}
|
|
120807
|
-
|
|
120808
|
-
visitCastExpressionKCLangNode(node) {// default empty implementation
|
|
120809
|
-
}
|
|
120810
|
-
|
|
120811
|
-
visitChooseKCLangNode(node) {// default empty implementation
|
|
120812
|
-
}
|
|
120813
|
-
|
|
120814
|
-
visitComparisonKCLangNode(node) {// default empty implementation
|
|
120815
|
-
}
|
|
120816
|
-
|
|
120817
|
-
visitConstKCLangNode(node) {// default empty implementation
|
|
120818
|
-
}
|
|
120819
|
-
|
|
120820
|
-
visitExistsKCLangNode(node) {// default empty implementation
|
|
120821
|
-
}
|
|
120822
|
-
|
|
120823
|
-
visitLengthKCLangNode(node) {// default empty implementation
|
|
120824
|
-
}
|
|
120825
|
-
|
|
120826
|
-
visitMinusKCLangNode(node) {// default empty implementation
|
|
120827
|
-
}
|
|
120828
|
-
|
|
120829
|
-
visitMultiplyKCLangNode(node) {// default empty implementation
|
|
120830
|
-
}
|
|
120831
|
-
|
|
120832
|
-
visitMultySumKCLangNode(node) {// default empty implementation
|
|
120833
|
-
}
|
|
120834
|
-
|
|
120835
|
-
visitNotKCLangNode(node) {// default empty implementation
|
|
120836
|
-
}
|
|
120837
|
-
|
|
120838
|
-
visitOneOfExpressionKCLangNode(node) {// default empty implementation
|
|
120839
|
-
}
|
|
120840
|
-
|
|
120841
|
-
visitOrKCLangNode(node) {// default empty implementation
|
|
120842
|
-
}
|
|
120843
|
-
|
|
120844
|
-
visitRegexMatchKCLangNode(node) {// default empty implementation
|
|
120845
|
-
}
|
|
120846
|
-
|
|
120847
|
-
visitRoundKCLangNode(node) {// default empty implementation
|
|
120848
|
-
}
|
|
120849
|
-
|
|
120850
|
-
visitSubstringKCLangNode(node) {// default empty implementation
|
|
120851
|
-
}
|
|
120852
|
-
|
|
120853
|
-
visitSumKCLangNode(node) {// default empty implementation
|
|
120854
|
-
}
|
|
120855
|
-
|
|
120856
|
-
visitXAbsKCLangNode(node) {// default empty implementation
|
|
120857
|
-
}
|
|
120858
|
-
|
|
120859
|
-
}
|
|
120860
|
-
|
|
120861
|
-
/***/ }),
|
|
120862
|
-
|
|
120863
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts":
|
|
120864
|
-
/*!*****************************************************************!*\
|
|
120865
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts ***!
|
|
120866
|
-
\*****************************************************************/
|
|
120867
|
-
/***/ ((module) => {
|
|
120868
|
-
|
|
120869
|
-
// this file was prevaled
|
|
120870
|
-
|
|
120871
|
-
/* eslint-disable */
|
|
120872
|
-
// @ts-ignore
|
|
120873
|
-
module.exports = "/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { Text: peg$parseText },\n peg$startRuleFunction = peg$parseText,\n\n peg$c0 = function(items) {\r\n \treturn items.filter(x => x !== \"\");\r\n },\n peg$c1 = \"[\",\n peg$c2 = peg$literalExpectation(\"[\", false),\n peg$c3 = \"]\",\n peg$c4 = peg$literalExpectation(\"]\", false),\n peg$c5 = \"(\",\n peg$c6 = peg$literalExpectation(\"(\", false),\n peg$c7 = \")\",\n peg$c8 = peg$literalExpectation(\")\", false),\n peg$c9 = function(text, src) {\r\n return {\r\n \ttype: \"link\",\r\n text: text,\r\n src: src,\r\n }\r\n },\n peg$c10 = /^[^ \\]\\t\\n\\r]/,\n peg$c11 = peg$classExpectation([\" \", \"]\", \"\\t\", \"\\n\", \"\\r\"], true, false),\n peg$c12 = function(w) { return w.join(\"\") },\n peg$c13 = function(items) {\r\n return items.filter(x => x !== \"\");\r\n },\n peg$c14 = /^[^)]/,\n peg$c15 = peg$classExpectation([\")\"], true, false),\n peg$c16 = function(w) {\r\n \treturn w.join(\"\").trim()\r\n },\n peg$c17 = /^[\\n]/,\n peg$c18 = peg$classExpectation([\"\\n\"], false, false),\n peg$c19 = /^[ \\t\\n\\r]/,\n peg$c20 = peg$classExpectation([\" \", \"\\t\", \"\\n\", \"\\r\"], false, false),\n peg$c21 = function() {\r\n \treturn \"\\n\"\r\n },\n peg$c22 = /^[^ \\t\\n\\r]/,\n peg$c23 = peg$classExpectation([\" \", \"\\t\", \"\\n\", \"\\r\"], true, false),\n peg$c24 = function(w) {\r\n \treturn w.join(\"\");\r\n },\n peg$c25 = function() {\r\n \treturn \"\";\r\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parseText() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parseLink();\n if (s2 === peg$FAILED) {\n s2 = peg$parseWord();\n if (s2 === peg$FAILED) {\n s2 = peg$parseNewLine();\n if (s2 === peg$FAILED) {\n s2 = peg$parse_();\n }\n }\n }\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parseLink();\n if (s2 === peg$FAILED) {\n s2 = peg$parseWord();\n if (s2 === peg$FAILED) {\n s2 = peg$parseNewLine();\n if (s2 === peg$FAILED) {\n s2 = peg$parse_();\n }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseLink() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c1;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseLinkText();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s3 = peg$c3;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c4); }\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s4 = peg$c5;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseLinkSrc();\n if (s5 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s6 = peg$c7;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s6 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9(s2, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseLinkText() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = [];\n if (peg$c10.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c10.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s2;\n s3 = peg$c12(s3);\n }\n s2 = s3;\n if (s2 === peg$FAILED) {\n s2 = peg$parse_();\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = [];\n if (peg$c10.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c10.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s2;\n s3 = peg$c12(s3);\n }\n s2 = s3;\n if (s2 === peg$FAILED) {\n s2 = peg$parse_();\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c13(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseLinkSrc() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c14.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c15); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c14.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c15); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseNewLine() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 !== peg$FAILED) {\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c19.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c19.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseWord() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c22.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c22.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$currPos;\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s6 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = void 0;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (peg$c19.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$currPos;\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n if (peg$c17.test(input.charAt(peg$currPos))) {\n s6 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = void 0;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (peg$c19.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c25();\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n})()";
|
|
120874
|
-
|
|
120875
|
-
/***/ }),
|
|
120876
|
-
|
|
120877
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts":
|
|
120878
|
-
/*!****************************************************************!*\
|
|
120879
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionParser.ts ***!
|
|
120880
|
-
\****************************************************************/
|
|
120881
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120882
|
-
|
|
120883
|
-
"use strict";
|
|
120884
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120885
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120886
|
-
/* harmony export */ "KCLangDescriptionParser": () => (/* binding */ KCLangDescriptionParser)
|
|
120887
|
-
/* harmony export */ });
|
|
120888
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./KCLangDescriptionGrammar */ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts");
|
|
120889
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__);
|
|
120890
|
-
// @ts-ignore
|
|
120891
|
-
// tslint:disable-next-line no-eval no-unsafe-any
|
|
120892
|
-
|
|
120893
|
-
const evalParse = eval((_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default())).parse;
|
|
120894
|
-
class KCLangDescriptionParser {
|
|
120895
|
-
static getOrCreateParser() {
|
|
120896
|
-
return evalParse;
|
|
120897
|
-
}
|
|
120898
|
-
|
|
120899
|
-
static parse(code) {
|
|
120900
|
-
const parser = this.getOrCreateParser();
|
|
120901
|
-
return parser(code);
|
|
120902
|
-
}
|
|
120903
|
-
|
|
120904
|
-
}
|
|
120905
|
-
|
|
120906
|
-
/***/ }),
|
|
120907
|
-
|
|
120908
|
-
/***/ "./Generator/src/common/KCLang/KCLangNodes.ts":
|
|
120909
|
-
/*!****************************************************!*\
|
|
120910
|
-
!*** ./Generator/src/common/KCLang/KCLangNodes.ts ***!
|
|
120911
|
-
\****************************************************/
|
|
120912
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120913
|
-
|
|
120914
|
-
"use strict";
|
|
120915
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120916
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120917
|
-
/* harmony export */ "isFormulaStatement": () => (/* binding */ isFormulaStatement),
|
|
120918
|
-
/* harmony export */ "isBlockStatement": () => (/* binding */ isBlockStatement),
|
|
120919
|
-
/* harmony export */ "isEnsureStatement": () => (/* binding */ isEnsureStatement),
|
|
120920
|
-
/* harmony export */ "isConditionalStatement": () => (/* binding */ isConditionalStatement),
|
|
120921
|
-
/* harmony export */ "isDescribeStatement": () => (/* binding */ isDescribeStatement),
|
|
120922
|
-
/* harmony export */ "andKCLangNode": () => (/* binding */ andKCLangNode)
|
|
120923
|
-
/* harmony export */ });
|
|
120924
|
-
function isFormulaStatement(node) {
|
|
120925
|
-
return node.type === "formula";
|
|
120926
|
-
}
|
|
120927
|
-
function isBlockStatement(node) {
|
|
120928
|
-
return node.type === "block";
|
|
120929
|
-
}
|
|
120930
|
-
function isEnsureStatement(node) {
|
|
120931
|
-
return node.type === "ensure";
|
|
120932
|
-
}
|
|
120933
|
-
function isConditionalStatement(node) {
|
|
120934
|
-
return node.type === "if";
|
|
120935
|
-
}
|
|
120936
|
-
function isDescribeStatement(node) {
|
|
120937
|
-
return node.type === "describe";
|
|
120938
|
-
}
|
|
120939
|
-
function andKCLangNode(...expressions) {
|
|
120940
|
-
return {
|
|
120941
|
-
type: "and",
|
|
120942
|
-
expressions: expressions
|
|
120943
|
-
};
|
|
120944
|
-
}
|
|
120945
|
-
|
|
120946
|
-
/***/ }),
|
|
120947
|
-
|
|
120948
120665
|
/***/ "./Generator/src/common/KCLang/KCLangToJsTranspiler.ts":
|
|
120949
120666
|
/*!*************************************************************!*\
|
|
120950
120667
|
!*** ./Generator/src/common/KCLang/KCLangToJsTranspiler.ts ***!
|
|
@@ -121242,345 +120959,6 @@ class KCLangToJsTranspiler {
|
|
|
121242
120959
|
|
|
121243
120960
|
/***/ }),
|
|
121244
120961
|
|
|
121245
|
-
/***/ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts":
|
|
121246
|
-
/*!**************************************************************!*\
|
|
121247
|
-
!*** ./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts ***!
|
|
121248
|
-
\**************************************************************/
|
|
121249
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
121250
|
-
|
|
121251
|
-
"use strict";
|
|
121252
|
-
__webpack_require__.r(__webpack_exports__);
|
|
121253
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
121254
|
-
/* harmony export */ "KCLangToXmlTranspiler": () => (/* binding */ KCLangToXmlTranspiler),
|
|
121255
|
-
/* harmony export */ "kclang": () => (/* binding */ kclang)
|
|
121256
|
-
/* harmony export */ });
|
|
121257
|
-
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
121258
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
121259
|
-
/* harmony import */ var _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./IKCLangExpressionVisitor */ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts");
|
|
121260
|
-
/* harmony import */ var _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./KCLangDescriptionParser */ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts");
|
|
121261
|
-
/* harmony import */ var _KCLangNodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./KCLangNodes */ "./Generator/src/common/KCLang/KCLangNodes.ts");
|
|
121262
|
-
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils */ "./Generator/src/common/KCLang/Utils.ts");
|
|
121263
|
-
/* harmony import */ var _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Antlr/KCLangAntlrParser */ "./Generator/src/common/KCLang/Antlr/KCLangAntlrParser.ts");
|
|
121264
|
-
|
|
121265
|
-
|
|
121266
|
-
|
|
121267
|
-
|
|
121268
|
-
|
|
121269
|
-
|
|
121270
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
121271
|
-
|
|
121272
|
-
function generateKCXmlExpression(expression) {
|
|
121273
|
-
switch (expression.type) {
|
|
121274
|
-
case "abs":
|
|
121275
|
-
case "xabs":
|
|
121276
|
-
case "length":
|
|
121277
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
121278
|
-
|
|
121279
|
-
case "exists":
|
|
121280
|
-
case "multySum":
|
|
121281
|
-
return `<m:${expression.type} select="${expression.select}" />`;
|
|
121282
|
-
|
|
121283
|
-
case "cast":
|
|
121284
|
-
if (expression.expression.type === "argument") {
|
|
121285
|
-
return `<m:argument select="${expression.expression.select}" type="${expression.targetType}" />`;
|
|
121286
|
-
}
|
|
121287
|
-
|
|
121288
|
-
throw new Error("Cast supports only for argument");
|
|
121289
|
-
|
|
121290
|
-
case "and":
|
|
121291
|
-
case "or":
|
|
121292
|
-
return [`<m:${expression.type}>`, ...expression.expressions.map(generateKCXmlExpression).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
121293
|
-
|
|
121294
|
-
case "sum":
|
|
121295
|
-
return [`<m:sum>`, ...expression.operands.map(operand => {
|
|
121296
|
-
if (operand.operator === "+") {
|
|
121297
|
-
return generateKCXmlExpression(operand.expression);
|
|
121298
|
-
}
|
|
121299
|
-
|
|
121300
|
-
return [`<m:minus>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(operand.expression), 1), `</m:minus>`].join("\n");
|
|
121301
|
-
}).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:sum>`].join("\n");
|
|
121302
|
-
|
|
121303
|
-
case "gt":
|
|
121304
|
-
case "ge":
|
|
121305
|
-
case "lt":
|
|
121306
|
-
case "le":
|
|
121307
|
-
case "eq":
|
|
121308
|
-
case "multiply":
|
|
121309
|
-
case "division":
|
|
121310
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expressions[0]), 1), (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expressions[1]), 1), `</m:${expression.type}>`].join("\n");
|
|
121311
|
-
|
|
121312
|
-
case "noteq":
|
|
121313
|
-
return [`<m:not>`, ` <m:eq>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expressions[0]), 2), (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expressions[1]), 2), ` </m:eq>`, `</m:not>`].join("\n");
|
|
121314
|
-
|
|
121315
|
-
case "minus":
|
|
121316
|
-
case "not":
|
|
121317
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
121318
|
-
break;
|
|
121319
|
-
break;
|
|
121320
|
-
|
|
121321
|
-
case "round":
|
|
121322
|
-
return [expression.fractionalDigits != undefined ? `<m:round fractionalDigits="${expression.fractionalDigits}">` : `<m:round>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:round>`].join("\n");
|
|
121323
|
-
|
|
121324
|
-
case "substring":
|
|
121325
|
-
return [expression.length != undefined ? `<m:substring start="${expression.start}" length="${expression.length}">` : `<m:substring start="${expression.start}">`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:substring>`].join("\n");
|
|
121326
|
-
|
|
121327
|
-
case "regexMatch":
|
|
121328
|
-
return [`<m:regexMatch pattern="${expression.pattern}">`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:regexMatch>`].join("\n");
|
|
121329
|
-
|
|
121330
|
-
case "choose":
|
|
121331
|
-
return [`<m:choose>`, ` <m:if>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.if), 2), ` </m:if>`, ` <m:then>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.then), 2), ` </m:then>`, ` <m:else>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.else), 2), ` </m:else>`, `</m:choose>`].join("\n");
|
|
121332
|
-
break;
|
|
121333
|
-
|
|
121334
|
-
case "const":
|
|
121335
|
-
if (expression.value.type === "decimal") {
|
|
121336
|
-
return `<m:const value="${expression.value.value}" type="decimal" />`;
|
|
121337
|
-
}
|
|
121338
|
-
|
|
121339
|
-
if (expression.value.type === "string") {
|
|
121340
|
-
return `<m:const value="${expression.value.value}" type="string" />`;
|
|
121341
|
-
}
|
|
121342
|
-
|
|
121343
|
-
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_0__.NotImplementedError();
|
|
121344
|
-
|
|
121345
|
-
case "argument":
|
|
121346
|
-
return `<m:argument select="${expression.select}" />`;
|
|
121347
|
-
|
|
121348
|
-
case "oneof":
|
|
121349
|
-
{
|
|
121350
|
-
const testExpr = generateKCXmlExpression(expression.testExpression);
|
|
121351
|
-
return [`<m:or>`, ...expression.expressions.items.map(x => [`<m:eq>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(testExpr, 1), (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(x), 1), `</m:eq>`]).flat().map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:or>`].join("\n");
|
|
121352
|
-
}
|
|
121353
|
-
|
|
121354
|
-
default:
|
|
121355
|
-
// @ts-ignore
|
|
121356
|
-
throw new Error(`Expression of type '${expression.type}' is not supported`);
|
|
121357
|
-
}
|
|
121358
|
-
}
|
|
121359
|
-
|
|
121360
|
-
function formatDescribeStatement(ast, matchPath, describe) {
|
|
121361
|
-
return _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__.KCLangDescriptionParser.parse(describe.text).map(item => {
|
|
121362
|
-
if (typeof item === "string") {
|
|
121363
|
-
return item;
|
|
121364
|
-
} else {
|
|
121365
|
-
return `{{link ref=${item.src}}}${item.text.join(" ")}{{/link}}`;
|
|
121366
|
-
}
|
|
121367
|
-
}).join(" ");
|
|
121368
|
-
}
|
|
121369
|
-
|
|
121370
|
-
function generateKCXmlFormula(ast, matchPath, describe) {
|
|
121371
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
121372
|
-
return `<m:formula match="${matchPath}" target="${ast.target}"${descriptionAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:formula>`;
|
|
121373
|
-
}
|
|
121374
|
-
|
|
121375
|
-
function removeTrailingSlash(inputStr) {
|
|
121376
|
-
if (inputStr.endsWith("/")) {
|
|
121377
|
-
return inputStr.substring(0, inputStr.length - 1);
|
|
121378
|
-
}
|
|
121379
|
-
|
|
121380
|
-
return inputStr;
|
|
121381
|
-
}
|
|
121382
|
-
|
|
121383
|
-
function joinPaths(paths) {
|
|
121384
|
-
return paths.map(removeTrailingSlash).join("/");
|
|
121385
|
-
}
|
|
121386
|
-
|
|
121387
|
-
function generateBlockKCXmlFormulas(block, parents) {
|
|
121388
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
121389
|
-
const result = [];
|
|
121390
|
-
let lastDescribeStatement;
|
|
121391
|
-
|
|
121392
|
-
for (const statement of block.statements) {
|
|
121393
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
121394
|
-
result.push(generateKCXmlFormula(statement, matchPath, lastDescribeStatement));
|
|
121395
|
-
lastDescribeStatement = undefined;
|
|
121396
|
-
}
|
|
121397
|
-
|
|
121398
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
121399
|
-
lastDescribeStatement = undefined;
|
|
121400
|
-
}
|
|
121401
|
-
|
|
121402
|
-
if (lastDescribeStatement != undefined) {
|
|
121403
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121404
|
-
}
|
|
121405
|
-
|
|
121406
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
121407
|
-
lastDescribeStatement = statement;
|
|
121408
|
-
}
|
|
121409
|
-
|
|
121410
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
121411
|
-
result.push(generateBlockKCXmlFormulas(statement, [...(parents !== null && parents !== void 0 ? parents : []), block]));
|
|
121412
|
-
}
|
|
121413
|
-
}
|
|
121414
|
-
|
|
121415
|
-
return result.join("\n");
|
|
121416
|
-
}
|
|
121417
|
-
|
|
121418
|
-
function guessConditionTarget(condition) {
|
|
121419
|
-
let result;
|
|
121420
|
-
|
|
121421
|
-
class GuessConditionTargetVisitor extends _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.DefaultKCLangExpressionVisitor {
|
|
121422
|
-
visitExistsKCLangNode(node) {
|
|
121423
|
-
if (result == undefined) {
|
|
121424
|
-
result = node.select;
|
|
121425
|
-
}
|
|
121426
|
-
}
|
|
121427
|
-
|
|
121428
|
-
visitArgumentKCLangNode(node) {
|
|
121429
|
-
if (result == undefined) {
|
|
121430
|
-
result = node.select;
|
|
121431
|
-
}
|
|
121432
|
-
}
|
|
121433
|
-
|
|
121434
|
-
}
|
|
121435
|
-
|
|
121436
|
-
(0,_IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.traverseKCLangExpression)(condition.expression, new GuessConditionTargetVisitor());
|
|
121437
|
-
return result;
|
|
121438
|
-
}
|
|
121439
|
-
|
|
121440
|
-
function generateKCXmlCondition(ast, matchPath, parentConditions, describe) {
|
|
121441
|
-
const levelAttr = ast.level === "error" ? ` errorLevel="Error"` : "";
|
|
121442
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
121443
|
-
const guessedTarget = guessConditionTarget(ast);
|
|
121444
|
-
const targetAttr = guessedTarget != undefined ? ` target="${guessedTarget}"` : "";
|
|
121445
|
-
|
|
121446
|
-
if (parentConditions != undefined && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.arrayIsNotEmpty)(parentConditions)) {
|
|
121447
|
-
var _parentConditions$map;
|
|
121448
|
-
|
|
121449
|
-
const condition = parentConditions.length === 1 ? parentConditions[0].condition : (0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.andKCLangNode)(...((_parentConditions$map = parentConditions === null || parentConditions === void 0 ? void 0 : parentConditions.map(z => z.condition)) !== null && _parentConditions$map !== void 0 ? _parentConditions$map : []));
|
|
121450
|
-
return `<m:condition match="${matchPath}"${descriptionAttr}${levelAttr}${targetAttr}>\n` + ` <m:when>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(condition), 2) + "\n" + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 2) + "\n" + ` </m:when>\n` + `</m:condition>`;
|
|
121451
|
-
}
|
|
121452
|
-
|
|
121453
|
-
return `<m:condition match="${matchPath}"${descriptionAttr}${levelAttr}${targetAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:condition>`;
|
|
121454
|
-
}
|
|
121455
|
-
|
|
121456
|
-
function generateBlockKCXmlConditions(block, parents, parentConditions) {
|
|
121457
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
121458
|
-
const result = [];
|
|
121459
|
-
let lastDescribeStatement;
|
|
121460
|
-
|
|
121461
|
-
for (const statement of block.statements) {
|
|
121462
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
121463
|
-
lastDescribeStatement = undefined;
|
|
121464
|
-
}
|
|
121465
|
-
|
|
121466
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
121467
|
-
result.push(generateKCXmlCondition(statement, matchPath, parentConditions, lastDescribeStatement));
|
|
121468
|
-
lastDescribeStatement = undefined;
|
|
121469
|
-
}
|
|
121470
|
-
|
|
121471
|
-
if (lastDescribeStatement != undefined) {
|
|
121472
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121473
|
-
}
|
|
121474
|
-
|
|
121475
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
121476
|
-
lastDescribeStatement = statement;
|
|
121477
|
-
}
|
|
121478
|
-
|
|
121479
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(statement)) {
|
|
121480
|
-
result.push(generateConditionalConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
121481
|
-
}
|
|
121482
|
-
|
|
121483
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
121484
|
-
result.push(generateBlockKCXmlConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
121485
|
-
}
|
|
121486
|
-
}
|
|
121487
|
-
|
|
121488
|
-
return result.join("\n");
|
|
121489
|
-
}
|
|
121490
|
-
|
|
121491
|
-
function generateConditionalConditions(conditionalStatement, parents, parentConditions) {
|
|
121492
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path)]);
|
|
121493
|
-
const result = [];
|
|
121494
|
-
let lastDescribeStatement;
|
|
121495
|
-
|
|
121496
|
-
for (const x of conditionalStatement.statements) {
|
|
121497
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(x)) {
|
|
121498
|
-
result.push(generateKCXmlCondition(x, matchPath, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement], lastDescribeStatement));
|
|
121499
|
-
lastDescribeStatement = undefined;
|
|
121500
|
-
}
|
|
121501
|
-
|
|
121502
|
-
if (lastDescribeStatement != undefined) {
|
|
121503
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121504
|
-
}
|
|
121505
|
-
|
|
121506
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(x)) {
|
|
121507
|
-
lastDescribeStatement = x;
|
|
121508
|
-
}
|
|
121509
|
-
|
|
121510
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(x)) {
|
|
121511
|
-
result.push(generateConditionalConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
121512
|
-
}
|
|
121513
|
-
|
|
121514
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(x)) {
|
|
121515
|
-
result.push(generateBlockKCXmlConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
121516
|
-
}
|
|
121517
|
-
}
|
|
121518
|
-
|
|
121519
|
-
return result.join("\n");
|
|
121520
|
-
}
|
|
121521
|
-
|
|
121522
|
-
function generateKCXmlFormulas(blocks) {
|
|
121523
|
-
const formulas = Iterator.from(blocks).map(generateBlockKCXmlFormulas).toArray();
|
|
121524
|
-
|
|
121525
|
-
if (formulas.filter(x => x !== "").length > 0) {
|
|
121526
|
-
return `<m:formulas>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(formulas.join("\n"), 1) + "\n" + `</m:formulas>\n`;
|
|
121527
|
-
} else {
|
|
121528
|
-
return "";
|
|
121529
|
-
}
|
|
121530
|
-
}
|
|
121531
|
-
|
|
121532
|
-
function generateKCXmlConditions(blocks) {
|
|
121533
|
-
const conditions = Iterator.from(blocks).map(generateBlockKCXmlConditions).toArray();
|
|
121534
|
-
|
|
121535
|
-
if (conditions.filter(x => x !== "").length > 0) {
|
|
121536
|
-
return `<m:conditions>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(conditions.join("\n"), 1) + "\n" + `</m:conditions>\n`;
|
|
121537
|
-
} else {
|
|
121538
|
-
return "";
|
|
121539
|
-
}
|
|
121540
|
-
}
|
|
121541
|
-
|
|
121542
|
-
function generateKCXml(blocks) {
|
|
121543
|
-
return `<?xml version="1.0" encoding="utf-8"?>\n` + `<m:math xmlns:m="http://www.kontur-extern.ru/ФНС 4.0/math.xsd">\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlFormulas(blocks), 1) + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlConditions(blocks), 1) + `</m:math>`;
|
|
121544
|
-
}
|
|
121545
|
-
|
|
121546
|
-
class KCLangToXmlTranspiler {
|
|
121547
|
-
static transpile(kcLang, customParser) {
|
|
121548
|
-
const parser = customParser !== null && customParser !== void 0 ? customParser : _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__.KCLangAntlrParser.parse;
|
|
121549
|
-
const kcxml = generateKCXml(parser(kcLang).blocks);
|
|
121550
|
-
return kcxml;
|
|
121551
|
-
}
|
|
121552
|
-
|
|
121553
|
-
}
|
|
121554
|
-
function kclang(str) {
|
|
121555
|
-
return KCLangToXmlTranspiler.transpile(str.join(""));
|
|
121556
|
-
}
|
|
121557
|
-
|
|
121558
|
-
/***/ }),
|
|
121559
|
-
|
|
121560
|
-
/***/ "./Generator/src/common/KCLang/Utils.ts":
|
|
121561
|
-
/*!**********************************************!*\
|
|
121562
|
-
!*** ./Generator/src/common/KCLang/Utils.ts ***!
|
|
121563
|
-
\**********************************************/
|
|
121564
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
121565
|
-
|
|
121566
|
-
"use strict";
|
|
121567
|
-
__webpack_require__.r(__webpack_exports__);
|
|
121568
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
121569
|
-
/* harmony export */ "indent": () => (/* binding */ indent)
|
|
121570
|
-
/* harmony export */ });
|
|
121571
|
-
function indent(str, count) {
|
|
121572
|
-
const indentStr = new Array(count * 2).fill(" ").join("");
|
|
121573
|
-
return str.split("\n").map(x => {
|
|
121574
|
-
if (x === "") {
|
|
121575
|
-
return x;
|
|
121576
|
-
}
|
|
121577
|
-
|
|
121578
|
-
return indentStr + x;
|
|
121579
|
-
}).join("\n");
|
|
121580
|
-
}
|
|
121581
|
-
|
|
121582
|
-
/***/ }),
|
|
121583
|
-
|
|
121584
120962
|
/***/ "./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts":
|
|
121585
120963
|
/*!*********************************************************************************!*\
|
|
121586
120964
|
!*** ./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts ***!
|
|
@@ -121638,28 +121016,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121638
121016
|
|
|
121639
121017
|
|
|
121640
121018
|
class FormSchemaRngAttribute {
|
|
121641
|
-
constructor(name, description, type, optional) {
|
|
121019
|
+
constructor(name, description, type, optional, parent) {
|
|
121642
121020
|
this.name = void 0;
|
|
121643
121021
|
this.optional = void 0;
|
|
121644
121022
|
this.type = void 0;
|
|
121645
121023
|
this.description = void 0;
|
|
121024
|
+
this.parent = void 0;
|
|
121646
121025
|
this.description = description;
|
|
121647
121026
|
this.optional = optional;
|
|
121648
121027
|
this.type = type;
|
|
121649
121028
|
this.name = name;
|
|
121029
|
+
this.parent = parent;
|
|
121650
121030
|
}
|
|
121651
121031
|
|
|
121652
121032
|
}
|
|
121033
|
+
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
121653
121034
|
class FormSchemaRngElement {
|
|
121654
|
-
constructor(name, optional, multiple) {
|
|
121035
|
+
constructor(name, parent, optional, multiple) {
|
|
121655
121036
|
this.name = void 0;
|
|
121656
121037
|
this.optional = void 0;
|
|
121657
121038
|
this.multiple = void 0;
|
|
121658
121039
|
this.innerTextType = void 0;
|
|
121659
121040
|
this.children = new Map();
|
|
121660
121041
|
this.attributes = new Map();
|
|
121661
|
-
this.
|
|
121042
|
+
this.parent = void 0;
|
|
121662
121043
|
this.name = name;
|
|
121044
|
+
this.parent = parent;
|
|
121045
|
+
this.multiple = multiple;
|
|
121663
121046
|
this.optional = optional;
|
|
121664
121047
|
}
|
|
121665
121048
|
|
|
@@ -121695,11 +121078,11 @@ class FormSchemaRng {
|
|
|
121695
121078
|
|
|
121696
121079
|
static createFromSchemaRng(schemaRngXmlContent) {
|
|
121697
121080
|
const schemaRngElement = (0,_SchemaRngSerializer__WEBPACK_IMPORTED_MODULE_5__.deserializeSchemaRng)(schemaRngXmlContent);
|
|
121698
|
-
return new FormSchemaRng(this.convertSchemaRngElement(schemaRngElement));
|
|
121081
|
+
return new FormSchemaRng(this.convertSchemaRngElement(schemaRngElement, RootParent));
|
|
121699
121082
|
}
|
|
121700
121083
|
|
|
121701
|
-
static convertSchemaRngElement(schemaRngElement) {
|
|
121702
|
-
const result = new FormSchemaRngElement(schemaRngElement.name, schemaRngElement.optional, schemaRngElement.multiple);
|
|
121084
|
+
static convertSchemaRngElement(schemaRngElement, parent) {
|
|
121085
|
+
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple);
|
|
121703
121086
|
|
|
121704
121087
|
if (schemaRngElement.innerText != undefined) {
|
|
121705
121088
|
if (schemaRngElement.innerText.type != undefined) {
|
|
@@ -121707,16 +121090,16 @@ class FormSchemaRng {
|
|
|
121707
121090
|
}
|
|
121708
121091
|
} else {
|
|
121709
121092
|
for (const attribute of schemaRngElement.attributes) {
|
|
121710
|
-
result.addAttribute(this.convertSchemaRngAttribute(attribute));
|
|
121093
|
+
result.addAttribute(this.convertSchemaRngAttribute(attribute, result));
|
|
121711
121094
|
}
|
|
121712
121095
|
|
|
121713
121096
|
for (const childElement of schemaRngElement.children) {
|
|
121714
|
-
result.addElement(this.convertSchemaRngElement(childElement));
|
|
121097
|
+
result.addElement(this.convertSchemaRngElement(childElement, result));
|
|
121715
121098
|
}
|
|
121716
121099
|
|
|
121717
121100
|
for (const childChoiceElement of schemaRngElement.choices) {
|
|
121718
121101
|
for (const childElement of childChoiceElement.children) {
|
|
121719
|
-
result.addElement(this.convertSchemaRngElement(childElement));
|
|
121102
|
+
result.addElement(this.convertSchemaRngElement(childElement, result));
|
|
121720
121103
|
}
|
|
121721
121104
|
}
|
|
121722
121105
|
}
|
|
@@ -121777,8 +121160,8 @@ class FormSchemaRng {
|
|
|
121777
121160
|
return type.base;
|
|
121778
121161
|
}
|
|
121779
121162
|
|
|
121780
|
-
static convertSchemaRngAttribute(attribute) {
|
|
121781
|
-
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional);
|
|
121163
|
+
static convertSchemaRngAttribute(attribute, parent) {
|
|
121164
|
+
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, parent);
|
|
121782
121165
|
}
|
|
121783
121166
|
|
|
121784
121167
|
adjustPathMultiplicity(path) {
|
|
@@ -121887,6 +121270,105 @@ class FormSchemaRng {
|
|
|
121887
121270
|
return isOptionalStatus;
|
|
121888
121271
|
}
|
|
121889
121272
|
|
|
121273
|
+
getDependenciesFromSchema(bindingPath) {
|
|
121274
|
+
let currentElement;
|
|
121275
|
+
let endOptionalElement = undefined;
|
|
121276
|
+
|
|
121277
|
+
for (const part of bindingPath.getPathParts()) {
|
|
121278
|
+
if (currentElement == undefined) {
|
|
121279
|
+
if (this.rootElement.name === part) {
|
|
121280
|
+
currentElement = this.rootElement;
|
|
121281
|
+
|
|
121282
|
+
if (currentElement.optional) {
|
|
121283
|
+
endOptionalElement = currentElement;
|
|
121284
|
+
}
|
|
121285
|
+
|
|
121286
|
+
continue;
|
|
121287
|
+
} else {
|
|
121288
|
+
return {
|
|
121289
|
+
dependencies: [],
|
|
121290
|
+
hasOptionalParent: false,
|
|
121291
|
+
optional: false
|
|
121292
|
+
};
|
|
121293
|
+
}
|
|
121294
|
+
}
|
|
121295
|
+
|
|
121296
|
+
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121297
|
+
var _currentElement4;
|
|
121298
|
+
|
|
121299
|
+
currentElement = currentElement.getElementByName(part);
|
|
121300
|
+
|
|
121301
|
+
if (((_currentElement4 = currentElement) === null || _currentElement4 === void 0 ? void 0 : _currentElement4.optional) !== undefined) {
|
|
121302
|
+
if (currentElement.optional) {
|
|
121303
|
+
endOptionalElement = currentElement;
|
|
121304
|
+
}
|
|
121305
|
+
}
|
|
121306
|
+
}
|
|
121307
|
+
}
|
|
121308
|
+
|
|
121309
|
+
const isOptional = currentElement === endOptionalElement && currentElement != undefined;
|
|
121310
|
+
|
|
121311
|
+
if (isOptional) {
|
|
121312
|
+
return {
|
|
121313
|
+
dependencies: [],
|
|
121314
|
+
hasOptionalParent: true,
|
|
121315
|
+
optional: true
|
|
121316
|
+
};
|
|
121317
|
+
}
|
|
121318
|
+
|
|
121319
|
+
if (endOptionalElement == undefined) {
|
|
121320
|
+
return {
|
|
121321
|
+
dependencies: [],
|
|
121322
|
+
hasOptionalParent: false,
|
|
121323
|
+
optional: false
|
|
121324
|
+
};
|
|
121325
|
+
}
|
|
121326
|
+
|
|
121327
|
+
const children = this.getAllChildren(endOptionalElement);
|
|
121328
|
+
const deps = children.map(x => this.getPath(x));
|
|
121329
|
+
return {
|
|
121330
|
+
dependencies: deps,
|
|
121331
|
+
hasOptionalParent: endOptionalElement != undefined,
|
|
121332
|
+
// true
|
|
121333
|
+
optional: false
|
|
121334
|
+
};
|
|
121335
|
+
}
|
|
121336
|
+
|
|
121337
|
+
getAllChildren(element) {
|
|
121338
|
+
const children = [];
|
|
121339
|
+
const queue = [element];
|
|
121340
|
+
|
|
121341
|
+
while (queue.length > 0) {
|
|
121342
|
+
const current = queue.shift();
|
|
121343
|
+
|
|
121344
|
+
if (current instanceof FormSchemaRngElement) {
|
|
121345
|
+
const childrenOfCurrent = Array.from(current.children.values());
|
|
121346
|
+
const attributesOfCurrent = Array.from(current.attributes.values());
|
|
121347
|
+
children.push(...childrenOfCurrent);
|
|
121348
|
+
queue.push(...childrenOfCurrent);
|
|
121349
|
+
children.push(...attributesOfCurrent);
|
|
121350
|
+
}
|
|
121351
|
+
}
|
|
121352
|
+
|
|
121353
|
+
return children;
|
|
121354
|
+
}
|
|
121355
|
+
|
|
121356
|
+
getPath(element) {
|
|
121357
|
+
const result = [];
|
|
121358
|
+
let currentElement = element;
|
|
121359
|
+
|
|
121360
|
+
while (currentElement !== RootParent) {
|
|
121361
|
+
if (currentElement instanceof FormSchemaRngElement && currentElement.multiple) {
|
|
121362
|
+
result.unshift(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.current);
|
|
121363
|
+
}
|
|
121364
|
+
|
|
121365
|
+
result.unshift(currentElement.name);
|
|
121366
|
+
currentElement = currentElement.parent;
|
|
121367
|
+
}
|
|
121368
|
+
|
|
121369
|
+
return new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(result, true);
|
|
121370
|
+
}
|
|
121371
|
+
|
|
121890
121372
|
getIsOptionalByExactPath(bindingPath) {
|
|
121891
121373
|
var _this$getElementByPat, _this$getElementByPat2;
|
|
121892
121374
|
|
|
@@ -126854,7 +126336,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
126854
126336
|
|
|
126855
126337
|
|
|
126856
126338
|
class FormulasAutoCalculationsGenerator {
|
|
126857
|
-
generate(
|
|
126339
|
+
generate(formulaContainer, schemaRng, dataDeclarationHelper) {
|
|
126340
|
+
const formulas = formulaContainer.formulas == undefined || formulaContainer.formulas.items == undefined ? [] : formulaContainer.formulas.items;
|
|
126858
126341
|
const formulaAutoCalculations = formulas.map(formula => this.buildFormulaAutoCalculation(formula, schemaRng, dataDeclarationHelper)).flat();
|
|
126859
126342
|
return this.mergeFormulaAutoCalculations(formulaAutoCalculations);
|
|
126860
126343
|
}
|
|
@@ -127580,73 +127063,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127580
127063
|
/* harmony export */ });
|
|
127581
127064
|
/* harmony import */ var _common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/XmlParser/XmlParser */ "./Generator/src/common/XmlParser/XmlParser.ts");
|
|
127582
127065
|
/* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
127583
|
-
/* harmony import */ var
|
|
127584
|
-
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
127585
|
-
|
|
127066
|
+
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
127586
127067
|
|
|
127587
127068
|
|
|
127588
127069
|
|
|
127589
127070
|
class FormulaReader {
|
|
127590
|
-
readFormulas(
|
|
127071
|
+
readFormulas(kcxmlSource) {
|
|
127591
127072
|
const serializer = this.createFormulaSerializer();
|
|
127592
|
-
const result =
|
|
127593
|
-
|
|
127594
|
-
for (const kcxmlSource of kcxmlSources) {
|
|
127595
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
127596
|
-
|
|
127597
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127598
|
-
var _rootNode$formulas$it, _rootNode$formulas;
|
|
127599
|
-
|
|
127600
|
-
result.push(...((_rootNode$formulas$it = (_rootNode$formulas = rootNode.formulas) === null || _rootNode$formulas === void 0 ? void 0 : _rootNode$formulas.items) !== null && _rootNode$formulas$it !== void 0 ? _rootNode$formulas$it : []));
|
|
127601
|
-
}
|
|
127602
|
-
}
|
|
127603
|
-
|
|
127604
|
-
for (const kclangSource of kclangSources) {
|
|
127605
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
127073
|
+
const result = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
127606
127074
|
|
|
127607
|
-
|
|
127608
|
-
|
|
127609
|
-
|
|
127610
|
-
result.push(...((_rootNode$formulas$it2 = (_rootNode$formulas2 = rootNode.formulas) === null || _rootNode$formulas2 === void 0 ? void 0 : _rootNode$formulas2.items) !== null && _rootNode$formulas$it2 !== void 0 ? _rootNode$formulas$it2 : []));
|
|
127611
|
-
}
|
|
127075
|
+
if (result instanceof _Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent) {
|
|
127076
|
+
return this.createEmptyMathContainer();
|
|
127612
127077
|
}
|
|
127613
127078
|
|
|
127614
127079
|
return result;
|
|
127615
127080
|
}
|
|
127616
127081
|
|
|
127617
|
-
|
|
127618
|
-
const
|
|
127619
|
-
|
|
127620
|
-
|
|
127621
|
-
|
|
127622
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
127623
|
-
|
|
127624
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127625
|
-
var _rootNode$conditions$, _rootNode$conditions;
|
|
127626
|
-
|
|
127627
|
-
result.push(...((_rootNode$conditions$ = (_rootNode$conditions = rootNode.conditions) === null || _rootNode$conditions === void 0 ? void 0 : _rootNode$conditions.items) !== null && _rootNode$conditions$ !== void 0 ? _rootNode$conditions$ : []));
|
|
127628
|
-
}
|
|
127629
|
-
}
|
|
127630
|
-
|
|
127631
|
-
for (const kclangSource of kclangSources) {
|
|
127632
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
127633
|
-
|
|
127634
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127635
|
-
var _rootNode$conditions$2, _rootNode$conditions2;
|
|
127636
|
-
|
|
127637
|
-
result.push(...((_rootNode$conditions$2 = (_rootNode$conditions2 = rootNode.conditions) === null || _rootNode$conditions2 === void 0 ? void 0 : _rootNode$conditions2.items) !== null && _rootNode$conditions$2 !== void 0 ? _rootNode$conditions$2 : []));
|
|
127638
|
-
}
|
|
127639
|
-
}
|
|
127640
|
-
|
|
127641
|
-
return result;
|
|
127082
|
+
createEmptyMathContainer() {
|
|
127083
|
+
const mathContainer = new _Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer();
|
|
127084
|
+
mathContainer.formulas = new _Formula__WEBPACK_IMPORTED_MODULE_2__.Formulas();
|
|
127085
|
+
mathContainer.formulas.items = [];
|
|
127086
|
+
return mathContainer;
|
|
127642
127087
|
}
|
|
127643
127088
|
|
|
127644
127089
|
createFormulaSerializer() {
|
|
127645
127090
|
const result = new _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.SugarSerializer();
|
|
127646
|
-
result.registerNode(
|
|
127647
|
-
result.registerNode(
|
|
127091
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent);
|
|
127092
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer);
|
|
127648
127093
|
|
|
127649
|
-
for (const formulaExpression of
|
|
127094
|
+
for (const formulaExpression of _Formula__WEBPACK_IMPORTED_MODULE_2__.formulaExpressions) {
|
|
127650
127095
|
result.registerNode(formulaExpression);
|
|
127651
127096
|
}
|
|
127652
127097
|
|
|
@@ -129064,6 +128509,7 @@ function getWebEntry(gfv, resourcesHash) {
|
|
|
129064
128509
|
dataDeclaration,
|
|
129065
128510
|
calculationFunctions,
|
|
129066
128511
|
validationFunctions,
|
|
128512
|
+
rngSchemaValidationConfigurator,
|
|
129067
128513
|
settings as defaultSettings,
|
|
129068
128514
|
requisiteList,
|
|
129069
128515
|
hooks,
|
|
@@ -129086,7 +128532,7 @@ window.CF.entryPoint[gfv] = function(container, { renderForm, ...settings }) {
|
|
|
129086
128532
|
resourcesHash: resourcesHash,
|
|
129087
128533
|
localizationDictionary: localizationDictionary,
|
|
129088
128534
|
hooks: hooks,
|
|
129089
|
-
autocalculationConfigurators: [...autocalculationConfigurators, kcXmlValidationConfigurator],
|
|
128535
|
+
autocalculationConfigurators: [...autocalculationConfigurators, kcXmlValidationConfigurator, rngSchemaValidationConfigurator],
|
|
129090
128536
|
settings: {
|
|
129091
128537
|
...defaultSettings,
|
|
129092
128538
|
...settings,
|
|
@@ -129261,9 +128707,11 @@ class KCXmlValidationGenerator {
|
|
|
129261
128707
|
const conditionReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_2__.FormulaReader();
|
|
129262
128708
|
|
|
129263
128709
|
for (const file of importedKcXmlValidations) {
|
|
129264
|
-
const
|
|
128710
|
+
const math = conditionReader.readFormulas(file);
|
|
128711
|
+
|
|
128712
|
+
for (const condition of (_math$conditions$item = math === null || math === void 0 ? void 0 : (_math$conditions = math.conditions) === null || _math$conditions === void 0 ? void 0 : _math$conditions.items) !== null && _math$conditions$item !== void 0 ? _math$conditions$item : []) {
|
|
128713
|
+
var _math$conditions$item, _math$conditions;
|
|
129265
128714
|
|
|
129266
|
-
for (const condition of conditions) {
|
|
129267
128715
|
compiledConditions.push(this.compileCondition(condition));
|
|
129268
128716
|
}
|
|
129269
128717
|
}
|
|
@@ -129443,12 +128891,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129443
128891
|
|
|
129444
128892
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
129445
128893
|
try {
|
|
129446
|
-
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
|
|
128894
|
+
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$deepOption, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
|
|
129447
128895
|
|
|
129448
128896
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
129449
128897
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
129450
128898
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_13__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_10__.FormNode);
|
|
129451
|
-
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent
|
|
128899
|
+
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
|
|
129452
128900
|
const schemaRng = (0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__.parseXml)(additionalContent.schemaRngContent);
|
|
129453
128901
|
const formSchemaRng = _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.FormSchemaRng.createFromSchemaRng(additionalContent.schemaRngContent);
|
|
129454
128902
|
const typeRegistry = (0,_validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_14__.buildTypesRegistry)(sugarRoot);
|
|
@@ -129464,7 +128912,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
129464
128912
|
dataDeclaration
|
|
129465
128913
|
} = dataDeclarationGenerator.generate();
|
|
129466
128914
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
129467
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, additionalContent.validationsContent);
|
|
128915
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, (_sugarRoot$deepOption = sugarRoot.deepOptionalSchemaValidations) !== null && _sugarRoot$deepOption !== void 0 ? _sugarRoot$deepOption : false, additionalContent.validationsContent);
|
|
129468
128916
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, controlCustomizationContext);
|
|
129469
128917
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
129470
128918
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
@@ -129486,6 +128934,8 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
129486
128934
|
builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
|
|
129487
128935
|
const validationFunctionsContent = validationGenerator.generate();
|
|
129488
128936
|
builder.addResource("validationFunctions.js", validationFunctionsContent);
|
|
128937
|
+
const rngSchemaValidationConfigurator = validationGenerator.generateRngSchemaValidationConfigurator();
|
|
128938
|
+
builder.addResource("rngSchemaValidationConfigurator.js", rngSchemaValidationConfigurator);
|
|
129489
128939
|
const importedKcXmlValidations = getImportedKcXmlValidations(sugarRoot, additionalContent);
|
|
129490
128940
|
const kcXmlValidationGenerator = new _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_22__.KCXmlValidationGenerator(formSchemaRng);
|
|
129491
128941
|
builder.addResource("kcXmlValidationConfigurator.js", kcXmlValidationGenerator.generate(importedKcXmlValidations)); // const importedAutoCalculations = getImportedAutoCalculations(sugarRoot);
|
|
@@ -129576,17 +129026,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129576
129026
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
129577
129027
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ "path");
|
|
129578
129028
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
129579
|
-
/* harmony import */ var
|
|
129580
|
-
/* harmony import */ var
|
|
129581
|
-
/* harmony import */ var
|
|
129582
|
-
/* harmony import */ var
|
|
129583
|
-
/* harmony import */ var
|
|
129584
|
-
/* harmony import */ var
|
|
129585
|
-
/* harmony import */ var
|
|
129586
|
-
/* harmony import */ var
|
|
129587
|
-
/* harmony import */ var
|
|
129588
|
-
/* harmony import */ var
|
|
129589
|
-
/* harmony import */ var
|
|
129029
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! util */ "util");
|
|
129030
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
|
|
129031
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js");
|
|
129032
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
|
|
129033
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js");
|
|
129034
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_4__);
|
|
129035
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
|
129036
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_5__);
|
|
129037
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! md5-file */ "./node_modules/md5-file/index.js");
|
|
129038
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(md5_file__WEBPACK_IMPORTED_MODULE_6__);
|
|
129039
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! recursive-readdir */ "./node_modules/recursive-readdir/index.js");
|
|
129040
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(recursive_readdir__WEBPACK_IMPORTED_MODULE_7__);
|
|
129041
|
+
/* harmony import */ var _common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/ExtractSugarReferences */ "./Generator/src/common/ExtractSugarReferences.ts");
|
|
129042
|
+
|
|
129590
129043
|
|
|
129591
129044
|
|
|
129592
129045
|
|
|
@@ -129595,6 +129048,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129595
129048
|
|
|
129596
129049
|
|
|
129597
129050
|
|
|
129051
|
+
const statAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.stat);
|
|
129052
|
+
const readFileAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readFile);
|
|
129053
|
+
const readdirAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readdir);
|
|
129598
129054
|
async function readFormSources(formSourcesPath, farmDirectory) {
|
|
129599
129055
|
var _JSON$parse$settings;
|
|
129600
129056
|
|
|
@@ -129606,9 +129062,9 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
129606
129062
|
|
|
129607
129063
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
129608
129064
|
// eslint-disable-next-line no-console
|
|
129609
|
-
console.warn(
|
|
129065
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`[WARN] Форма не содержит ссылок на fetch-функции. Будут автоматически подключены функции из каталога legacyfetchfuctions\n` + `[WARN] В будущем необходимо явно прописывать ссылки на используемые fetch-функции`));
|
|
129610
129066
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
129611
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
129067
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
129612
129068
|
}
|
|
129613
129069
|
|
|
129614
129070
|
const result = {
|
|
@@ -129618,12 +129074,11 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
129618
129074
|
formSourcesPath: formSourcesPath,
|
|
129619
129075
|
formJsonSettings: (_JSON$parse$settings = JSON.parse(await readFileSource(formSourcesPath, "form.json", "{}"))["settings"]) !== null && _JSON$parse$settings !== void 0 ? _JSON$parse$settings : {},
|
|
129620
129076
|
additionalSettings: await readFileSource(formSourcesPath, "settings.json", "{}"),
|
|
129621
|
-
autocalcsContent: await
|
|
129077
|
+
autocalcsContent: await readAutoCalcFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc")),
|
|
129622
129078
|
helpersContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers")),
|
|
129623
129079
|
validationsContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations")),
|
|
129624
129080
|
schemaRngContent: await readSchemaRngFile(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"), formName),
|
|
129625
|
-
kcJsXmlContent: await
|
|
129626
|
-
kclangAutocaclulationsContent: await readFilesFromDir(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), /\.kclang$/),
|
|
129081
|
+
kcJsXmlContent: (await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), `${formName}.КС.candy.js.xml`, "<dummy/>")) || "",
|
|
129627
129082
|
tourSteps: await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "tour"), "tour.js", "{}"),
|
|
129628
129083
|
hooksContent: await readHooksFile(formSourcesPath),
|
|
129629
129084
|
customControlsContent: await readCustomControlsFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls")),
|
|
@@ -129667,7 +129122,7 @@ function evalModule(moduleCode) {
|
|
|
129667
129122
|
|
|
129668
129123
|
async function isDirectoryExists(directoryPath) {
|
|
129669
129124
|
try {
|
|
129670
|
-
const dirStat = await (
|
|
129125
|
+
const dirStat = await statAsync(directoryPath);
|
|
129671
129126
|
return dirStat.isDirectory();
|
|
129672
129127
|
} catch (ignoreError) {
|
|
129673
129128
|
return false;
|
|
@@ -129678,27 +129133,27 @@ async function readFiles(filePaths) {
|
|
|
129678
129133
|
const result = [];
|
|
129679
129134
|
|
|
129680
129135
|
for (const filePath of filePaths) {
|
|
129681
|
-
result.push(await (
|
|
129136
|
+
result.push(await readFileAsync(filePath, "utf-8"));
|
|
129682
129137
|
}
|
|
129683
129138
|
|
|
129684
129139
|
return result;
|
|
129685
129140
|
}
|
|
129686
129141
|
|
|
129687
129142
|
async function extractReferences(formSugarDirectoryPath) {
|
|
129688
|
-
const indexContent = await (
|
|
129689
|
-
return (0,
|
|
129143
|
+
const indexContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8");
|
|
129144
|
+
return (0,_common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__.extractSugarReferences)(indexContent, filePath => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, filePath), "utf-8"));
|
|
129690
129145
|
}
|
|
129691
129146
|
|
|
129692
129147
|
async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
129693
|
-
if (!(await (0,
|
|
129148
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(directoryPath))) {
|
|
129694
129149
|
return [];
|
|
129695
129150
|
}
|
|
129696
129151
|
|
|
129697
|
-
const files = await (
|
|
129152
|
+
const files = await readdirAsync(directoryPath);
|
|
129698
129153
|
let filelist = _filelist || [];
|
|
129699
129154
|
|
|
129700
129155
|
for (const file of files) {
|
|
129701
|
-
if ((await (
|
|
129156
|
+
if ((await statAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file))).isDirectory()) {
|
|
129702
129157
|
filelist = await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file), filelist);
|
|
129703
129158
|
} else {
|
|
129704
129159
|
filelist.push(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file));
|
|
@@ -129709,7 +129164,7 @@ async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
|
129709
129164
|
}
|
|
129710
129165
|
|
|
129711
129166
|
async function checkFileExists(filePath) {
|
|
129712
|
-
if (!(await (0,
|
|
129167
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(filePath))) {
|
|
129713
129168
|
return [];
|
|
129714
129169
|
}
|
|
129715
129170
|
|
|
@@ -129722,7 +129177,7 @@ async function getAllDependencies(formSourcesPath, farmDirectory) {
|
|
|
129722
129177
|
|
|
129723
129178
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
129724
129179
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
129725
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
129180
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
129726
129181
|
}
|
|
129727
129182
|
|
|
129728
129183
|
return [path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), ...sugarReferences.fetchFunctionFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...sugarReferences.sugarFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x + ".sugar.xml")), ...sugarReferences.resourceFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "settings.json"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"))), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "tour", "tour.js"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "localization")))];
|
|
@@ -129735,23 +129190,23 @@ function normalizeLineEndings(content) {
|
|
|
129735
129190
|
async function getAllDependenciesHash(formSourcesPath, farmDirectory) {
|
|
129736
129191
|
const allDeps = await getAllDependencies(formSourcesPath, farmDirectory);
|
|
129737
129192
|
const hashes = await Promise.all(allDeps.map(async depFilePath => {
|
|
129738
|
-
if ([".js", ".
|
|
129739
|
-
let content = await (
|
|
129193
|
+
if ([".js", ".xml", ".xslt", ".json"].some(ext => depFilePath.endsWith(ext))) {
|
|
129194
|
+
let content = await readFileAsync(depFilePath, "utf-8");
|
|
129740
129195
|
content = normalizeLineEndings(content);
|
|
129741
|
-
return
|
|
129196
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(content);
|
|
129742
129197
|
}
|
|
129743
129198
|
|
|
129744
|
-
return
|
|
129199
|
+
return md5_file__WEBPACK_IMPORTED_MODULE_6___default()(depFilePath);
|
|
129745
129200
|
}));
|
|
129746
|
-
return
|
|
129201
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(hashes.join(""));
|
|
129747
129202
|
}
|
|
129748
129203
|
async function readSugarFiles(formSugarDirectoryPath, references) {
|
|
129749
129204
|
const result = {
|
|
129750
|
-
"./index": await (
|
|
129205
|
+
"./index": await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8")
|
|
129751
129206
|
};
|
|
129752
129207
|
|
|
129753
129208
|
for (const sugarPath of references.sugarFiles) {
|
|
129754
|
-
const sugarModuleContent = await (
|
|
129209
|
+
const sugarModuleContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, sugarPath + ".sugar.xml"), "utf-8");
|
|
129755
129210
|
result[sugarPath] = sugarModuleContent;
|
|
129756
129211
|
}
|
|
129757
129212
|
|
|
@@ -129763,11 +129218,11 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
129763
129218
|
return {};
|
|
129764
129219
|
}
|
|
129765
129220
|
|
|
129766
|
-
const fileNames = await
|
|
129221
|
+
const fileNames = await recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default()(formSugarDirectoryPath);
|
|
129767
129222
|
const result = {};
|
|
129768
129223
|
|
|
129769
129224
|
for (const fileName of fileNames) {
|
|
129770
|
-
const sugarModuleContent = await (
|
|
129225
|
+
const sugarModuleContent = await readFileAsync(fileName, "utf-8");
|
|
129771
129226
|
const relativeFileName = ("controls\\" + fileName.replace(formSugarDirectoryPath + "\\", "")).replace(/\\/g, "/");
|
|
129772
129227
|
result[relativeFileName] = sugarModuleContent;
|
|
129773
129228
|
}
|
|
@@ -129775,23 +129230,23 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
129775
129230
|
return result;
|
|
129776
129231
|
}
|
|
129777
129232
|
|
|
129778
|
-
async function
|
|
129779
|
-
|
|
129233
|
+
async function readAutoCalcFiles(formAutoCalcPath) {
|
|
129234
|
+
try {
|
|
129235
|
+
const files = await readdirAsync(formAutoCalcPath);
|
|
129236
|
+
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129237
|
+
return Promise.all(jsFiles.map(filename => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formAutoCalcPath, filename), "utf-8")));
|
|
129238
|
+
} catch (ignoreError) {
|
|
129780
129239
|
return [];
|
|
129781
129240
|
}
|
|
129782
|
-
|
|
129783
|
-
const files = await (0,fs_extra__WEBPACK_IMPORTED_MODULE_3__.readdir)(directoryPath);
|
|
129784
|
-
const jsFiles = files.filter(filename => fileNameTest.test(filename));
|
|
129785
|
-
return Promise.all(jsFiles.map(filename => (0,fs_extra__WEBPACK_IMPORTED_MODULE_3__.readFile)(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, filename), "utf-8")));
|
|
129786
129241
|
}
|
|
129787
129242
|
|
|
129788
129243
|
async function readImportedFiles(rootPath) {
|
|
129789
129244
|
try {
|
|
129790
129245
|
const result = {};
|
|
129791
|
-
const files = await (
|
|
129246
|
+
const files = await readdirAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations"));
|
|
129792
129247
|
|
|
129793
129248
|
for (const fileName of files) {
|
|
129794
|
-
result["../validations/" + fileName] = await (
|
|
129249
|
+
result["../validations/" + fileName] = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations", fileName), "utf-8");
|
|
129795
129250
|
}
|
|
129796
129251
|
|
|
129797
129252
|
return result;
|
|
@@ -129802,11 +129257,11 @@ async function readImportedFiles(rootPath) {
|
|
|
129802
129257
|
|
|
129803
129258
|
async function readJavaScriptFilesWithNames(formJavaScriptFilesPath) {
|
|
129804
129259
|
try {
|
|
129805
|
-
const files = await (
|
|
129260
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
129806
129261
|
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129807
129262
|
return Promise.all(jsFiles.map(async filename => ({
|
|
129808
129263
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
129809
|
-
content: await (
|
|
129264
|
+
content: await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8")
|
|
129810
129265
|
})));
|
|
129811
129266
|
} catch (ignoreError) {
|
|
129812
129267
|
return [];
|
|
@@ -129817,7 +129272,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129817
129272
|
let jsFiles;
|
|
129818
129273
|
|
|
129819
129274
|
try {
|
|
129820
|
-
const files = await (
|
|
129275
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
129821
129276
|
jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129822
129277
|
const result = [];
|
|
129823
129278
|
|
|
@@ -129825,7 +129280,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129825
129280
|
result.push({
|
|
129826
129281
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
129827
129282
|
// tslint:disable-next-line no-unsafe-any
|
|
129828
|
-
content: evalModule(await (
|
|
129283
|
+
content: evalModule(await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8"))
|
|
129829
129284
|
});
|
|
129830
129285
|
}
|
|
129831
129286
|
|
|
@@ -129836,16 +129291,16 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129836
129291
|
}
|
|
129837
129292
|
|
|
129838
129293
|
function readSchemaRngFile(formSchemasPath, gfv) {
|
|
129839
|
-
return (
|
|
129294
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasPath, `${gfv}.rng.xml`), "utf-8");
|
|
129840
129295
|
}
|
|
129841
129296
|
|
|
129842
129297
|
function readHooksFile(formDirectoryPath) {
|
|
129843
|
-
return (
|
|
129298
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formDirectoryPath, "hooks.js"), "utf-8").catch(() => "");
|
|
129844
129299
|
}
|
|
129845
129300
|
|
|
129846
129301
|
async function readFileSource(filePath, filename, defaultValue) {
|
|
129847
129302
|
try {
|
|
129848
|
-
return await (
|
|
129303
|
+
return await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(filePath, filename), "utf-8");
|
|
129849
129304
|
} catch (ingoreError) {
|
|
129850
129305
|
return defaultValue;
|
|
129851
129306
|
}
|
|
@@ -130400,18 +129855,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
130400
129855
|
|
|
130401
129856
|
|
|
130402
129857
|
class NormalizationRulesGenerator {
|
|
130403
|
-
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng,
|
|
129858
|
+
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng, mathContainer, typesRegistry, useSchemaValidations, controlCustomizationContext) {
|
|
130404
129859
|
this.sugarRoot = void 0;
|
|
130405
129860
|
this.dataDeclarationHelper = void 0;
|
|
130406
129861
|
this.formSchemaRng = void 0;
|
|
130407
|
-
this.
|
|
129862
|
+
this.mathContainer = void 0;
|
|
130408
129863
|
this.typesRegistry = void 0;
|
|
130409
129864
|
this.controlCustomizationContext = void 0;
|
|
130410
129865
|
this.useSchemaValidations = void 0;
|
|
130411
129866
|
this.sugarRoot = sugarRoot;
|
|
130412
129867
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
130413
129868
|
this.formSchemaRng = formSchemaRng;
|
|
130414
|
-
this.
|
|
129869
|
+
this.mathContainer = mathContainer;
|
|
130415
129870
|
this.typesRegistry = typesRegistry;
|
|
130416
129871
|
this.useSchemaValidations = useSchemaValidations;
|
|
130417
129872
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -130441,7 +129896,9 @@ class NormalizationRulesGenerator {
|
|
|
130441
129896
|
}
|
|
130442
129897
|
|
|
130443
129898
|
*buildFormulaFLangRules() {
|
|
130444
|
-
for (const formula of this.formulas) {
|
|
129899
|
+
for (const formula of (_this$mathContainer$f = (_this$mathContainer = this.mathContainer) === null || _this$mathContainer === void 0 ? void 0 : (_this$mathContainer$f2 = _this$mathContainer.formulas) === null || _this$mathContainer$f2 === void 0 ? void 0 : _this$mathContainer$f2.items) !== null && _this$mathContainer$f !== void 0 ? _this$mathContainer$f : []) {
|
|
129900
|
+
var _this$mathContainer$f, _this$mathContainer, _this$mathContainer$f2;
|
|
129901
|
+
|
|
130445
129902
|
yield* this.buildFormulaFlashRule(formula);
|
|
130446
129903
|
}
|
|
130447
129904
|
}
|
|
@@ -134910,7 +134367,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134910
134367
|
/* harmony import */ var _UserPicklist_UserPicklistNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../UserPicklist/UserPicklistNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/UserPicklist/UserPicklistNode.ts");
|
|
134911
134368
|
/* harmony import */ var _Nodes_PanelNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Nodes/PanelNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/Nodes/PanelNode.ts");
|
|
134912
134369
|
/* harmony import */ var _TypeListNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TypeListNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/TypeListNode.ts");
|
|
134913
|
-
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _class4, _class5, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32;
|
|
134370
|
+
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _class4, _class5, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33;
|
|
134914
134371
|
|
|
134915
134372
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
134916
134373
|
|
|
@@ -134941,7 +134398,7 @@ let FetchFunctionsReferenceNode = (_dec = (0,_Serializer_SugarSerializer__WEBPAC
|
|
|
134941
134398
|
writable: true,
|
|
134942
134399
|
initializer: null
|
|
134943
134400
|
})), _class2)) || _class);
|
|
134944
|
-
let FormNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("form", `Корневой элемент формы.`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form sync recursive .md$")), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_1__.DataBindingScopeMixinNode), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("userpicklist", [_UserPicklist_UserPicklistNode__WEBPACK_IMPORTED_MODULE_7__.UserPicklistNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("tour", [_Tour_TourNode__WEBPACK_IMPORTED_MODULE_6__.TourNode]), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("fetchfunctions", [FetchFunctionsReferenceNode]), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("modalIE8", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Removed), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("m", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("uf", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("forceNavigate", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("hideUnitsAdder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("hasRegionalForms", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.UntypedUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("controls"), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("import", [_SugarNodes_Nodes_ImportNode__WEBPACK_IMPORTED_MODULE_4__.ImportNode]), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("panel", [_Nodes_PanelNode__WEBPACK_IMPORTED_MODULE_8__.PanelNode]), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("page", [_Page_PageNode__WEBPACK_IMPORTED_MODULE_5__.PageNode]), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("simple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("schemaValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("ieSizeLimitation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Это флаг включает отображение заглушки для IE, если фуф больше опреленного размера`),
|
|
134401
|
+
let FormNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("form", `Корневой элемент формы.`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form sync recursive .md$")), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_1__.DataBindingScopeMixinNode), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("userpicklist", [_UserPicklist_UserPicklistNode__WEBPACK_IMPORTED_MODULE_7__.UserPicklistNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("tour", [_Tour_TourNode__WEBPACK_IMPORTED_MODULE_6__.TourNode]), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("fetchfunctions", [FetchFunctionsReferenceNode]), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("modalIE8", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Removed), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("m", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("uf", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("forceNavigate", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("hideUnitsAdder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.deprecatedAttr)("hasRegionalForms", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.UntypedUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("controls"), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("import", [_SugarNodes_Nodes_ImportNode__WEBPACK_IMPORTED_MODULE_4__.ImportNode]), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("panel", [_Nodes_PanelNode__WEBPACK_IMPORTED_MODULE_8__.PanelNode]), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("page", [_Page_PageNode__WEBPACK_IMPORTED_MODULE_5__.PageNode]), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("simple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("schemaValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("deepOptionalSchemaValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Этот флаг включает режим при котором в необязательных элементах схемы все атрибуты и элементы считаются не обязательными, пока не заполнен хотя бы один из них. disclaimer! Пока не готов к использованию в формах, в которых есть опциональный элемент внутри которого очень моного элементов, например больше 50 `), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("ieSizeLimitation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Это флаг включает отображение заглушки для IE, если фуф больше опреленного размера`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("templates", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Управляет влючение возможность создавать и применять шаблоны keweb-а (кнопка в меню)`), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("plain", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Форма без боковой панели, которая будет содержать один раздел`), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("requisite", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Есть подозрение что это свойство не используется`), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, ``), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("padding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.lengthUnit, ``), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("maxunitscount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Если количество разделов привышает \`maxunitscount\`, тода начинает работать частичный рендеринг (рендерятся не все разедлы, при скроллинге рендерятся другие). Например, это используется в ЕНВД, раздел 2 множественный, и у пользователей может быть много`), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("unitscount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, ``), _dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("transferText", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.localizedString, `Текст в лайтбоксе, который появляется по кнопке "Перенести данные"`), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("navigationLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Количество множественных разделов при котором навигация сворачивается (в левой колонке отображаются не все экземпляры), как выглядит можешь посмотреть в ЕНВд при количестве разделов 2 больше 15`), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("uploadFufButtonEnabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Включает кнопку загрузить отчет в "Другие действия" в панели слева.`), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("uploadFufLightboxHideDemandNameButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Отключает кнопку "Показать имя требования" внутри лайтбокса Загрузки файла.`), _dec33 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("uploadInquiryButtonEnabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Включает кнопку загрузить справки в панели слева. (только для 6ндфл и РСВ)`), _dec34 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("type", [_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.TypeNode]), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("types", [_TypeListNode__WEBPACK_IMPORTED_MODULE_9__.TypeListNode]), _dec3(_class4 = (_class5 = class FormNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
134945
134402
|
constructor(...args) {
|
|
134946
134403
|
super(...args);
|
|
134947
134404
|
|
|
@@ -134977,35 +134434,37 @@ let FormNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
134977
134434
|
|
|
134978
134435
|
_initializerDefineProperty(this, "schemaValidations", _descriptor17, this);
|
|
134979
134436
|
|
|
134980
|
-
_initializerDefineProperty(this, "
|
|
134437
|
+
_initializerDefineProperty(this, "deepOptionalSchemaValidations", _descriptor18, this);
|
|
134981
134438
|
|
|
134982
|
-
_initializerDefineProperty(this, "
|
|
134439
|
+
_initializerDefineProperty(this, "ieSizeLimitation", _descriptor19, this);
|
|
134983
134440
|
|
|
134984
|
-
_initializerDefineProperty(this, "
|
|
134441
|
+
_initializerDefineProperty(this, "templates", _descriptor20, this);
|
|
134985
134442
|
|
|
134986
|
-
_initializerDefineProperty(this, "
|
|
134443
|
+
_initializerDefineProperty(this, "plain", _descriptor21, this);
|
|
134987
134444
|
|
|
134988
|
-
_initializerDefineProperty(this, "
|
|
134445
|
+
_initializerDefineProperty(this, "requisite", _descriptor22, this);
|
|
134446
|
+
|
|
134447
|
+
_initializerDefineProperty(this, "width", _descriptor23, this);
|
|
134989
134448
|
|
|
134990
|
-
_initializerDefineProperty(this, "padding",
|
|
134449
|
+
_initializerDefineProperty(this, "padding", _descriptor24, this);
|
|
134991
134450
|
|
|
134992
|
-
_initializerDefineProperty(this, "maxUnitsCount",
|
|
134451
|
+
_initializerDefineProperty(this, "maxUnitsCount", _descriptor25, this);
|
|
134993
134452
|
|
|
134994
|
-
_initializerDefineProperty(this, "unitsCount",
|
|
134453
|
+
_initializerDefineProperty(this, "unitsCount", _descriptor26, this);
|
|
134995
134454
|
|
|
134996
|
-
_initializerDefineProperty(this, "transferText",
|
|
134455
|
+
_initializerDefineProperty(this, "transferText", _descriptor27, this);
|
|
134997
134456
|
|
|
134998
|
-
_initializerDefineProperty(this, "navigationLimit",
|
|
134457
|
+
_initializerDefineProperty(this, "navigationLimit", _descriptor28, this);
|
|
134999
134458
|
|
|
135000
|
-
_initializerDefineProperty(this, "uploadFufButtonEnabled",
|
|
134459
|
+
_initializerDefineProperty(this, "uploadFufButtonEnabled", _descriptor29, this);
|
|
135001
134460
|
|
|
135002
|
-
_initializerDefineProperty(this, "uploadFufLightboxHideDemandNameButton",
|
|
134461
|
+
_initializerDefineProperty(this, "uploadFufLightboxHideDemandNameButton", _descriptor30, this);
|
|
135003
134462
|
|
|
135004
|
-
_initializerDefineProperty(this, "uploadInquiryButtonEnabled",
|
|
134463
|
+
_initializerDefineProperty(this, "uploadInquiryButtonEnabled", _descriptor31, this);
|
|
135005
134464
|
|
|
135006
|
-
_initializerDefineProperty(this, "types",
|
|
134465
|
+
_initializerDefineProperty(this, "types", _descriptor32, this);
|
|
135007
134466
|
|
|
135008
|
-
_initializerDefineProperty(this, "typeLists",
|
|
134467
|
+
_initializerDefineProperty(this, "typeLists", _descriptor33, this);
|
|
135009
134468
|
}
|
|
135010
134469
|
|
|
135011
134470
|
getOwnPath() {
|
|
@@ -135100,77 +134559,82 @@ let FormNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
135100
134559
|
enumerable: true,
|
|
135101
134560
|
writable: true,
|
|
135102
134561
|
initializer: null
|
|
135103
|
-
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134562
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, "deepOptionalSchemaValidations", [_dec20], {
|
|
135104
134563
|
configurable: true,
|
|
135105
134564
|
enumerable: true,
|
|
135106
134565
|
writable: true,
|
|
135107
134566
|
initializer: null
|
|
135108
|
-
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134567
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, "ieSizeLimitation", [_dec21], {
|
|
135109
134568
|
configurable: true,
|
|
135110
134569
|
enumerable: true,
|
|
135111
134570
|
writable: true,
|
|
135112
134571
|
initializer: null
|
|
135113
|
-
}), _descriptor20 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134572
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class5.prototype, "templates", [_dec22], {
|
|
135114
134573
|
configurable: true,
|
|
135115
134574
|
enumerable: true,
|
|
135116
134575
|
writable: true,
|
|
135117
134576
|
initializer: null
|
|
135118
|
-
}), _descriptor21 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134577
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class5.prototype, "plain", [_dec23], {
|
|
135119
134578
|
configurable: true,
|
|
135120
134579
|
enumerable: true,
|
|
135121
134580
|
writable: true,
|
|
135122
134581
|
initializer: null
|
|
135123
|
-
}), _descriptor22 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134582
|
+
}), _descriptor22 = _applyDecoratedDescriptor(_class5.prototype, "requisite", [_dec24], {
|
|
135124
134583
|
configurable: true,
|
|
135125
134584
|
enumerable: true,
|
|
135126
134585
|
writable: true,
|
|
135127
134586
|
initializer: null
|
|
135128
|
-
}), _descriptor23 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134587
|
+
}), _descriptor23 = _applyDecoratedDescriptor(_class5.prototype, "width", [_dec25], {
|
|
135129
134588
|
configurable: true,
|
|
135130
134589
|
enumerable: true,
|
|
135131
134590
|
writable: true,
|
|
135132
134591
|
initializer: null
|
|
135133
|
-
}), _descriptor24 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134592
|
+
}), _descriptor24 = _applyDecoratedDescriptor(_class5.prototype, "padding", [_dec26], {
|
|
135134
134593
|
configurable: true,
|
|
135135
134594
|
enumerable: true,
|
|
135136
134595
|
writable: true,
|
|
135137
134596
|
initializer: null
|
|
135138
|
-
}), _descriptor25 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134597
|
+
}), _descriptor25 = _applyDecoratedDescriptor(_class5.prototype, "maxUnitsCount", [_dec27], {
|
|
135139
134598
|
configurable: true,
|
|
135140
134599
|
enumerable: true,
|
|
135141
134600
|
writable: true,
|
|
135142
134601
|
initializer: null
|
|
135143
|
-
}), _descriptor26 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134602
|
+
}), _descriptor26 = _applyDecoratedDescriptor(_class5.prototype, "unitsCount", [_dec28], {
|
|
135144
134603
|
configurable: true,
|
|
135145
134604
|
enumerable: true,
|
|
135146
134605
|
writable: true,
|
|
135147
134606
|
initializer: null
|
|
135148
|
-
}), _descriptor27 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134607
|
+
}), _descriptor27 = _applyDecoratedDescriptor(_class5.prototype, "transferText", [_dec29], {
|
|
135149
134608
|
configurable: true,
|
|
135150
134609
|
enumerable: true,
|
|
135151
134610
|
writable: true,
|
|
135152
134611
|
initializer: null
|
|
135153
|
-
}), _descriptor28 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134612
|
+
}), _descriptor28 = _applyDecoratedDescriptor(_class5.prototype, "navigationLimit", [_dec30], {
|
|
135154
134613
|
configurable: true,
|
|
135155
134614
|
enumerable: true,
|
|
135156
134615
|
writable: true,
|
|
135157
134616
|
initializer: null
|
|
135158
|
-
}), _descriptor29 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134617
|
+
}), _descriptor29 = _applyDecoratedDescriptor(_class5.prototype, "uploadFufButtonEnabled", [_dec31], {
|
|
135159
134618
|
configurable: true,
|
|
135160
134619
|
enumerable: true,
|
|
135161
134620
|
writable: true,
|
|
135162
134621
|
initializer: null
|
|
135163
|
-
}), _descriptor30 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134622
|
+
}), _descriptor30 = _applyDecoratedDescriptor(_class5.prototype, "uploadFufLightboxHideDemandNameButton", [_dec32], {
|
|
135164
134623
|
configurable: true,
|
|
135165
134624
|
enumerable: true,
|
|
135166
134625
|
writable: true,
|
|
135167
134626
|
initializer: null
|
|
135168
|
-
}), _descriptor31 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134627
|
+
}), _descriptor31 = _applyDecoratedDescriptor(_class5.prototype, "uploadInquiryButtonEnabled", [_dec33], {
|
|
135169
134628
|
configurable: true,
|
|
135170
134629
|
enumerable: true,
|
|
135171
134630
|
writable: true,
|
|
135172
134631
|
initializer: null
|
|
135173
|
-
}), _descriptor32 = _applyDecoratedDescriptor(_class5.prototype, "
|
|
134632
|
+
}), _descriptor32 = _applyDecoratedDescriptor(_class5.prototype, "types", [_dec34], {
|
|
134633
|
+
configurable: true,
|
|
134634
|
+
enumerable: true,
|
|
134635
|
+
writable: true,
|
|
134636
|
+
initializer: null
|
|
134637
|
+
}), _descriptor33 = _applyDecoratedDescriptor(_class5.prototype, "typeLists", [_dec35], {
|
|
135174
134638
|
configurable: true,
|
|
135175
134639
|
enumerable: true,
|
|
135176
134640
|
writable: true,
|
|
@@ -136419,7 +135883,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
136419
135883
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_9__.SugarAttributeReadError(`userpicklist.editor должен содержать ровно один элемент (временно)`, node, "editor");
|
|
136420
135884
|
}
|
|
136421
135885
|
|
|
136422
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_6__.ValidationGenerator((_findSugarNodeBases$ = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$ !== void 0 ? _findSugarNodeBases$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), context.typesRegistry, context.controlCustomizationContext, _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_7__.FormSchemaRng.createEmpty(), false);
|
|
135886
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_6__.ValidationGenerator((_findSugarNodeBases$ = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$ !== void 0 ? _findSugarNodeBases$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), context.typesRegistry, context.controlCustomizationContext, _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_7__.FormSchemaRng.createEmpty(), false, false);
|
|
136423
135887
|
userPicklistDeclarationBuilder.prop(x => x.editorValidations).set({
|
|
136424
135888
|
type: "Expression",
|
|
136425
135889
|
expression: validationGenerator.generateValidationsFactory()
|
|
@@ -145838,10 +145302,13 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
145838
145302
|
}
|
|
145839
145303
|
|
|
145840
145304
|
doBuildDataDeclaration(context) {
|
|
145841
|
-
var _node$optional;
|
|
145842
|
-
|
|
145843
145305
|
const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
|
|
145844
|
-
|
|
145306
|
+
|
|
145307
|
+
if (node.optional) {
|
|
145308
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError("Элемент tabs не может быть опциональным", node, "optional");
|
|
145309
|
+
}
|
|
145310
|
+
|
|
145311
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children(false)]]), context.addPathSectionDeclarationEntry(node));
|
|
145845
145312
|
}
|
|
145846
145313
|
|
|
145847
145314
|
buildChildrenDataDeclaration(context) {
|
|
@@ -149275,14 +148742,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149275
148742
|
/* harmony export */ "InputConverter": () => (/* binding */ InputConverter)
|
|
149276
148743
|
/* harmony export */ });
|
|
149277
148744
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
149278
|
-
/* harmony import */ var
|
|
149279
|
-
/* harmony import */ var
|
|
149280
|
-
/* harmony import */ var
|
|
149281
|
-
/* harmony import */ var
|
|
149282
|
-
/* harmony import */ var
|
|
149283
|
-
/* harmony import */ var
|
|
149284
|
-
/* harmony import */ var
|
|
149285
|
-
/* harmony import */ var
|
|
148745
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
148746
|
+
/* harmony import */ var _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../validationGenerator/Nodes/TypeNode */ "./Generator/src/generators/validationGenerator/Nodes/TypeNode.ts");
|
|
148747
|
+
/* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
|
|
148748
|
+
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
148749
|
+
/* harmony import */ var _CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps.ts");
|
|
148750
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
148751
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
148752
|
+
/* harmony import */ var _InputLimitations__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./InputLimitations */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Input/InputLimitations.ts");
|
|
148753
|
+
/* harmony import */ var _InputNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./InputNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Input/InputNode.ts");
|
|
148754
|
+
|
|
149286
148755
|
|
|
149287
148756
|
|
|
149288
148757
|
|
|
@@ -149292,18 +148761,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149292
148761
|
|
|
149293
148762
|
|
|
149294
148763
|
|
|
149295
|
-
class InputConverter extends
|
|
148764
|
+
class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.SugarNodeConverterBase {
|
|
149296
148765
|
static getAcceptNodeClass() {
|
|
149297
|
-
return
|
|
148766
|
+
return _InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode;
|
|
149298
148767
|
}
|
|
149299
148768
|
|
|
149300
148769
|
get nodePaths() {
|
|
149301
|
-
const node = this.getCurrentNodeAs(
|
|
149302
|
-
return [(0,
|
|
148770
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
148771
|
+
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getNewBindingPathExpression)(node)];
|
|
149303
148772
|
}
|
|
149304
148773
|
|
|
149305
148774
|
doBuildFLangValidations(buildContext) {
|
|
149306
|
-
const node = this.getCurrentNodeAs(
|
|
148775
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149307
148776
|
const targetPath = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.AbsoluteModelPath.createAbsoluteFromMask(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
|
|
149308
148777
|
const typeNode = buildContext.getTypeNode(node.validationInfo);
|
|
149309
148778
|
const schemaTypeNode = buildContext.getSchemaTypeInfo(targetPath);
|
|
@@ -149316,12 +148785,12 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149316
148785
|
}
|
|
149317
148786
|
|
|
149318
148787
|
doBuildNodeValidations(validationGenerator) {
|
|
149319
|
-
const node = this.getCurrentNodeAs(
|
|
148788
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149320
148789
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
149321
148790
|
}
|
|
149322
148791
|
|
|
149323
148792
|
doBuildDataDeclaration(context) {
|
|
149324
|
-
const node = this.getCurrentNodeAs(
|
|
148793
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149325
148794
|
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, {
|
|
149326
148795
|
optional: node.dataBinding.optional,
|
|
149327
148796
|
disabled: node.disabled
|
|
@@ -149329,7 +148798,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149329
148798
|
}
|
|
149330
148799
|
|
|
149331
148800
|
doBuildNormalizeRules(builder) {
|
|
149332
|
-
const node = this.getCurrentNodeAs(
|
|
148801
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149333
148802
|
return [builder.valueInitializer(node, node.dataBinding, node.disabled), ...builder.specialFieldsInitializer(node, {
|
|
149334
148803
|
optional: node.dataBinding.optional,
|
|
149335
148804
|
disabled: node.disabled
|
|
@@ -149337,17 +148806,17 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149337
148806
|
}
|
|
149338
148807
|
|
|
149339
148808
|
buildChildrenDataDeclaration(context) {
|
|
149340
|
-
const node = this.getCurrentNodeAs(
|
|
148809
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149341
148810
|
return context.processChildrenDataDeclaration(node.helpNodes);
|
|
149342
148811
|
}
|
|
149343
148812
|
|
|
149344
148813
|
*doTraverseChildren() {
|
|
149345
|
-
const node = this.getCurrentNodeAs(
|
|
148814
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149346
148815
|
yield* node.helpNodes;
|
|
149347
148816
|
}
|
|
149348
148817
|
|
|
149349
148818
|
doConvert(context) {
|
|
149350
|
-
const node = this.getCurrentNodeAs(
|
|
148819
|
+
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_9__.InputNode);
|
|
149351
148820
|
this.ensurePathExists(node, node.dataBinding.path);
|
|
149352
148821
|
|
|
149353
148822
|
if (node.auto) {
|
|
@@ -149357,13 +148826,62 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149357
148826
|
}
|
|
149358
148827
|
}
|
|
149359
148828
|
|
|
148829
|
+
setCurrencyProps(markupBuilder, context, node) {
|
|
148830
|
+
const typeNode = context.getTypeNode(node.validationInfo);
|
|
148831
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
148832
|
+
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
148833
|
+
|
|
148834
|
+
if (node.currency) {
|
|
148835
|
+
var _typeNode$base;
|
|
148836
|
+
|
|
148837
|
+
const baseTypeName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
148838
|
+
|
|
148839
|
+
if (baseTypeName === "decimal") {
|
|
148840
|
+
var _ref, _ref2, _ref3, _ref4, _typeNode$flattenType, _typeNode$flattenType2, _typeNode$flattenType3, _typeNode$flattenType4, _typeNode$flattenType5, _typeNode$flattenType6, _typeNode$flattenType7, _typeNode$flattenType8;
|
|
148841
|
+
|
|
148842
|
+
const maxLength = (_ref = (_ref2 = (_ref3 = (_ref4 = (_typeNode$flattenType = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType2 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.LengthTypeCheckNode))) === null || _typeNode$flattenType2 === void 0 ? void 0 : _typeNode$flattenType2.value) !== null && _typeNode$flattenType !== void 0 ? _typeNode$flattenType : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.length) !== null && _ref4 !== void 0 ? _ref4 : typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType3 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxlengthTypeCheckNode))) === null || _typeNode$flattenType3 === void 0 ? void 0 : _typeNode$flattenType3.value) !== null && _ref3 !== void 0 ? _ref3 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.maxLength) !== null && _ref2 !== void 0 ? _ref2 : typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType4 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.TotaldigitsTypeCheckNode))) === null || _typeNode$flattenType4 === void 0 ? void 0 : _typeNode$flattenType4.value) !== null && _ref !== void 0 ? _ref : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.totalDigits;
|
|
148843
|
+
const fractionDigits = (_typeNode$flattenType5 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType6 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.FractiondigitsTypeCheckNode))) === null || _typeNode$flattenType6 === void 0 ? void 0 : _typeNode$flattenType6.value) !== null && _typeNode$flattenType5 !== void 0 ? _typeNode$flattenType5 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.fractionDigits;
|
|
148844
|
+
const integerDigits = (_typeNode$flattenType7 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType8 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.IntegerdigitsTypeCheckNode))) === null || _typeNode$flattenType8 === void 0 ? void 0 : _typeNode$flattenType8.value) !== null && _typeNode$flattenType7 !== void 0 ? _typeNode$flattenType7 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.integerDigits;
|
|
148845
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
148846
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
148847
|
+
|
|
148848
|
+
if (maxLength != undefined && fractionDigits != undefined && integerDigits == undefined) {
|
|
148849
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(maxLength - fractionDigits);
|
|
148850
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
148851
|
+
} else if (maxLength != undefined && fractionDigits == undefined && integerDigits != undefined) {
|
|
148852
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
148853
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(maxLength - integerDigits);
|
|
148854
|
+
} else if (maxLength == undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
148855
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
148856
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
148857
|
+
} else if (maxLength == undefined && fractionDigits != undefined && integerDigits == undefined) {
|
|
148858
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
148859
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
148860
|
+
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
148861
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
148862
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
148863
|
+
} else {
|
|
148864
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints", node, "currency");
|
|
148865
|
+
}
|
|
148866
|
+
} else if (baseTypeName === "integer") {
|
|
148867
|
+
var _ref5, _typeNode$flattenType9, _typeNode$flattenType10, _ref6, _typeNode$flattenType11, _typeNode$flattenType12, _ref7, _typeNode$flattenType13, _typeNode$flattenType14;
|
|
148868
|
+
|
|
148869
|
+
const maxLength = Math.max((_ref5 = (_typeNode$flattenType9 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType10 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.LengthTypeCheckNode))) === null || _typeNode$flattenType10 === void 0 ? void 0 : _typeNode$flattenType10.value) !== null && _typeNode$flattenType9 !== void 0 ? _typeNode$flattenType9 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.length) !== null && _ref5 !== void 0 ? _ref5 : -1, (_ref6 = (_typeNode$flattenType11 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType12 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxlengthTypeCheckNode))) === null || _typeNode$flattenType12 === void 0 ? void 0 : _typeNode$flattenType12.value) !== null && _typeNode$flattenType11 !== void 0 ? _typeNode$flattenType11 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.maxLength) !== null && _ref6 !== void 0 ? _ref6 : -1, (_ref7 = (_typeNode$flattenType13 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType14 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.TotaldigitsTypeCheckNode))) === null || _typeNode$flattenType14 === void 0 ? void 0 : _typeNode$flattenType14.value) !== null && _typeNode$flattenType13 !== void 0 ? _typeNode$flattenType13 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.totalDigits) !== null && _ref7 !== void 0 ? _ref7 : -1);
|
|
148870
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(maxLength === -1 ? undefined : maxLength);
|
|
148871
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
148872
|
+
} else if (baseTypeName != undefined) {
|
|
148873
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor for non numberic types", node, "currency");
|
|
148874
|
+
}
|
|
148875
|
+
}
|
|
148876
|
+
}
|
|
148877
|
+
|
|
149360
148878
|
buildRegularInput(context, node) {
|
|
149361
|
-
var _typeNode$
|
|
148879
|
+
var _typeNode$base2, _node$maskChar, _node$width;
|
|
149362
148880
|
|
|
149363
148881
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
149364
148882
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
149365
|
-
const typeBase = (_typeNode$
|
|
149366
|
-
const markupBuilder = (0,
|
|
148883
|
+
const typeBase = (_typeNode$base2 = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base2 !== void 0 ? _typeNode$base2 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
148884
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("Input");
|
|
149367
148885
|
|
|
149368
148886
|
if (node.visible != undefined) {
|
|
149369
148887
|
markupBuilder.prop(x => x.visible).set({
|
|
@@ -149372,12 +148890,12 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149372
148890
|
});
|
|
149373
148891
|
}
|
|
149374
148892
|
|
|
149375
|
-
markupBuilder.prop(x => x.bindingPath).set((0,
|
|
148893
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getNewBindingPathExpression)(node));
|
|
149376
148894
|
markupBuilder.prop(x => x.placeholder).set(node.placeholder);
|
|
149377
148895
|
markupBuilder.prop(x => x.disabled).set(node.disabled);
|
|
149378
148896
|
|
|
149379
148897
|
if (node.disabled2 != undefined) {
|
|
149380
|
-
markupBuilder.prop(x => x.disabled2).set((0,
|
|
148898
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(node.disabled2));
|
|
149381
148899
|
|
|
149382
148900
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
149383
148901
|
markupBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
@@ -149389,10 +148907,10 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149389
148907
|
markupBuilder.prop(x => x.maskChar).set(node.mask ? (_node$maskChar = node.maskChar) !== null && _node$maskChar !== void 0 ? _node$maskChar : "_" : undefined);
|
|
149390
148908
|
markupBuilder.prop(x => x.formatChars).set(node.formatChars);
|
|
149391
148909
|
markupBuilder.prop(x => x.width).set((_node$width = node.width) !== null && _node$width !== void 0 ? _node$width : "100%");
|
|
149392
|
-
|
|
148910
|
+
this.setCurrencyProps(markupBuilder, context, node);
|
|
149393
148911
|
markupBuilder.prop(x => x.useMaskExtender).set(node.useMaskExtender);
|
|
149394
|
-
(0,
|
|
149395
|
-
const inputLimitations = (0,
|
|
148912
|
+
(0,_CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_5__.setTooltipSettingsProps)(markupBuilder, node.tooltipSettings);
|
|
148913
|
+
const inputLimitations = (0,_InputLimitations__WEBPACK_IMPORTED_MODULE_8__.getInputLimitations)(typeNode, schemaTypeInfo);
|
|
149396
148914
|
|
|
149397
148915
|
if (inputLimitations !== null) {
|
|
149398
148916
|
markupBuilder.prop(x => x.inputLimit).set(inputLimitations);
|
|
@@ -149414,12 +148932,12 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149414
148932
|
}
|
|
149415
148933
|
|
|
149416
148934
|
buildFxInput(context, node) {
|
|
149417
|
-
var _typeNode$
|
|
148935
|
+
var _typeNode$base3, _node$width2;
|
|
149418
148936
|
|
|
149419
148937
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
149420
148938
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
149421
|
-
const typeBase = (_typeNode$
|
|
149422
|
-
const markupBuilder = (0,
|
|
148939
|
+
const typeBase = (_typeNode$base3 = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base3 !== void 0 ? _typeNode$base3 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
148940
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("FxInput");
|
|
149423
148941
|
|
|
149424
148942
|
if (node.visible != undefined) {
|
|
149425
148943
|
markupBuilder.prop(x => x.visible).set({
|
|
@@ -149428,15 +148946,15 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149428
148946
|
});
|
|
149429
148947
|
}
|
|
149430
148948
|
|
|
149431
|
-
markupBuilder.prop(x => x.bindingPath).set((0,
|
|
148949
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getNewBindingPathExpression)(node));
|
|
149432
148950
|
markupBuilder.prop(x => x.hint).set(this.getConverterResultFromAttributeWithMarkup(context, node.hint));
|
|
149433
148951
|
markupBuilder.prop(x => x.disabled).set(node.disabled);
|
|
149434
148952
|
markupBuilder.prop(x => x.disabledPure).set(node.deprecatedDisabledForRpn);
|
|
149435
148953
|
markupBuilder.prop(x => x.align).set(node.align);
|
|
149436
148954
|
markupBuilder.prop(x => x.width).set((_node$width2 = node.width) !== null && _node$width2 !== void 0 ? _node$width2 : "100%");
|
|
149437
|
-
|
|
149438
|
-
(0,
|
|
149439
|
-
const inputLimitations = (0,
|
|
148955
|
+
this.setCurrencyProps(markupBuilder, context, node);
|
|
148956
|
+
(0,_CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_5__.setTooltipSettingsProps)(markupBuilder, node.tooltipSettings);
|
|
148957
|
+
const inputLimitations = (0,_InputLimitations__WEBPACK_IMPORTED_MODULE_8__.getInputLimitations)(typeNode, schemaTypeInfo);
|
|
149440
148958
|
|
|
149441
148959
|
if (inputLimitations !== null) {
|
|
149442
148960
|
markupBuilder.prop(x => x.inputLimit).set(inputLimitations);
|
|
@@ -149469,7 +148987,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149469
148987
|
markupBuilder.prop(x => x.prefix).set(this.getConverterResultFromAttributeWithMarkup(context, node.prefix));
|
|
149470
148988
|
|
|
149471
148989
|
if (node.disabled2 != undefined) {
|
|
149472
|
-
markupBuilder.prop(x => x.disabled2).set((0,
|
|
148990
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(node.disabled2));
|
|
149473
148991
|
|
|
149474
148992
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
149475
148993
|
markupBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
@@ -149920,76 +149438,6 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
|
|
|
149920
149438
|
|
|
149921
149439
|
/***/ }),
|
|
149922
149440
|
|
|
149923
|
-
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Input/SetCurrencyProps.ts":
|
|
149924
|
-
/*!***********************************************************************************************************!*\
|
|
149925
|
-
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Input/SetCurrencyProps.ts ***!
|
|
149926
|
-
\***********************************************************************************************************/
|
|
149927
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
149928
|
-
|
|
149929
|
-
"use strict";
|
|
149930
|
-
__webpack_require__.r(__webpack_exports__);
|
|
149931
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
149932
|
-
/* harmony export */ "setCurrencyProps": () => (/* binding */ setCurrencyProps)
|
|
149933
|
-
/* harmony export */ });
|
|
149934
|
-
/* harmony import */ var _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../validationGenerator/Nodes/TypeNode */ "./Generator/src/generators/validationGenerator/Nodes/TypeNode.ts");
|
|
149935
|
-
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
149936
|
-
|
|
149937
|
-
|
|
149938
|
-
function setCurrencyProps(markupBuilder, context, node) {
|
|
149939
|
-
const typeNode = context.getTypeNode(node.validationInfo);
|
|
149940
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
149941
|
-
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
149942
|
-
|
|
149943
|
-
if (node.currency) {
|
|
149944
|
-
var _typeNode$base;
|
|
149945
|
-
|
|
149946
|
-
const baseTypeName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
149947
|
-
|
|
149948
|
-
if (baseTypeName === "decimal") {
|
|
149949
|
-
var _typeNode$flattenType, _typeNode$flattenType2, _ref, _ref2, _ref3, _ref4, _typeNode$flattenType3, _typeNode$flattenType4, _typeNode$flattenType5, _typeNode$flattenType6, _typeNode$flattenType7, _typeNode$flattenType8, _typeNode$flattenType9, _typeNode$flattenType10;
|
|
149950
|
-
|
|
149951
|
-
const totalDigits = (_typeNode$flattenType = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType2 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.TotaldigitsTypeCheckNode))) === null || _typeNode$flattenType2 === void 0 ? void 0 : _typeNode$flattenType2.value) !== null && _typeNode$flattenType !== void 0 ? _typeNode$flattenType : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.totalDigits;
|
|
149952
|
-
const maxLength = (_ref = (_ref2 = (_ref3 = (_ref4 = (_typeNode$flattenType3 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType4 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.LengthTypeCheckNode))) === null || _typeNode$flattenType4 === void 0 ? void 0 : _typeNode$flattenType4.value) !== null && _typeNode$flattenType3 !== void 0 ? _typeNode$flattenType3 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.length) !== null && _ref4 !== void 0 ? _ref4 : typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType5 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MaxlengthTypeCheckNode))) === null || _typeNode$flattenType5 === void 0 ? void 0 : _typeNode$flattenType5.value) !== null && _ref3 !== void 0 ? _ref3 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.maxLength) !== null && _ref2 !== void 0 ? _ref2 : typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType6 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.TotaldigitsTypeCheckNode))) === null || _typeNode$flattenType6 === void 0 ? void 0 : _typeNode$flattenType6.value) !== null && _ref !== void 0 ? _ref : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.totalDigits;
|
|
149953
|
-
const fractionDigits = (_typeNode$flattenType7 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType8 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.FractiondigitsTypeCheckNode))) === null || _typeNode$flattenType8 === void 0 ? void 0 : _typeNode$flattenType8.value) !== null && _typeNode$flattenType7 !== void 0 ? _typeNode$flattenType7 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.fractionDigits;
|
|
149954
|
-
const integerDigits = (_typeNode$flattenType9 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType10 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.IntegerdigitsTypeCheckNode))) === null || _typeNode$flattenType10 === void 0 ? void 0 : _typeNode$flattenType10.value) !== null && _typeNode$flattenType9 !== void 0 ? _typeNode$flattenType9 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.integerDigits;
|
|
149955
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
149956
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
149957
|
-
|
|
149958
|
-
if (maxLength != undefined && fractionDigits != undefined && integerDigits == undefined) {
|
|
149959
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(maxLength - fractionDigits);
|
|
149960
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
149961
|
-
} else if (maxLength != undefined && fractionDigits == undefined && integerDigits != undefined) {
|
|
149962
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
149963
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(maxLength - integerDigits);
|
|
149964
|
-
} else if (maxLength == undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
149965
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
149966
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
149967
|
-
} else if (maxLength == undefined && fractionDigits != undefined && integerDigits == undefined) {
|
|
149968
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
149969
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
149970
|
-
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
149971
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
149972
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
149973
|
-
} else if (totalDigits != undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
149974
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(totalDigits);
|
|
149975
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
149976
|
-
} else {
|
|
149977
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints", node, "currency");
|
|
149978
|
-
}
|
|
149979
|
-
} else if (baseTypeName === "integer") {
|
|
149980
|
-
var _ref5, _typeNode$flattenType11, _typeNode$flattenType12, _ref6, _typeNode$flattenType13, _typeNode$flattenType14, _ref7, _typeNode$flattenType15, _typeNode$flattenType16;
|
|
149981
|
-
|
|
149982
|
-
const maxLength = Math.max((_ref5 = (_typeNode$flattenType11 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType12 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.LengthTypeCheckNode))) === null || _typeNode$flattenType12 === void 0 ? void 0 : _typeNode$flattenType12.value) !== null && _typeNode$flattenType11 !== void 0 ? _typeNode$flattenType11 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.length) !== null && _ref5 !== void 0 ? _ref5 : -1, (_ref6 = (_typeNode$flattenType13 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType14 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MaxlengthTypeCheckNode))) === null || _typeNode$flattenType14 === void 0 ? void 0 : _typeNode$flattenType14.value) !== null && _typeNode$flattenType13 !== void 0 ? _typeNode$flattenType13 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.maxLength) !== null && _ref6 !== void 0 ? _ref6 : -1, (_ref7 = (_typeNode$flattenType15 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType16 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.TotaldigitsTypeCheckNode))) === null || _typeNode$flattenType16 === void 0 ? void 0 : _typeNode$flattenType16.value) !== null && _typeNode$flattenType15 !== void 0 ? _typeNode$flattenType15 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.totalDigits) !== null && _ref7 !== void 0 ? _ref7 : -1);
|
|
149983
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(maxLength === -1 ? undefined : maxLength);
|
|
149984
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
149985
|
-
} else if (baseTypeName != undefined) {
|
|
149986
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor for non numberic types", node, "currency");
|
|
149987
|
-
}
|
|
149988
|
-
}
|
|
149989
|
-
}
|
|
149990
|
-
|
|
149991
|
-
/***/ }),
|
|
149992
|
-
|
|
149993
149441
|
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Kladr/KladrConverter.ts":
|
|
149994
149442
|
/*!*********************************************************************************************************!*\
|
|
149995
149443
|
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Kladr/KladrConverter.ts ***!
|
|
@@ -152826,9 +152274,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
152826
152274
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
152827
152275
|
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
152828
152276
|
/* harmony import */ var _CommonNodeProperties_FontWeight__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../CommonNodeProperties/FontWeight */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/FontWeight.ts");
|
|
152829
|
-
/* harmony import */ var
|
|
152830
|
-
/* harmony import */ var _TextNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TextNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueViewers/Text/TextNode.ts");
|
|
152831
|
-
|
|
152277
|
+
/* harmony import */ var _TextNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TextNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueViewers/Text/TextNode.ts");
|
|
152832
152278
|
|
|
152833
152279
|
|
|
152834
152280
|
|
|
@@ -152840,16 +152286,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
152840
152286
|
|
|
152841
152287
|
class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.SugarNodeConverterBase {
|
|
152842
152288
|
static getAcceptNodeClass() {
|
|
152843
|
-
return
|
|
152289
|
+
return _TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode;
|
|
152844
152290
|
}
|
|
152845
152291
|
|
|
152846
152292
|
doBuildNodeValidations(validationGenerator) {
|
|
152847
|
-
const node = this.getCurrentNodeAs(
|
|
152293
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152848
152294
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
152849
152295
|
}
|
|
152850
152296
|
|
|
152851
152297
|
doBuildNormalizeRules() {
|
|
152852
|
-
const node = this.getCurrentNodeAs(
|
|
152298
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152853
152299
|
const defaultValue = "";
|
|
152854
152300
|
const targetValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.ModelPath.createFromMask(this.getResolvedBindingPath(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each), "value");
|
|
152855
152301
|
const currentValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.ModelPath.createFromMask(this.getResolvedBindingPath(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.current), "value");
|
|
@@ -152867,7 +152313,7 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
152867
152313
|
}
|
|
152868
152314
|
|
|
152869
152315
|
doBuildDataDeclaration(context) {
|
|
152870
|
-
const node = this.getCurrentNodeAs(
|
|
152316
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152871
152317
|
|
|
152872
152318
|
if (!node.dataBinding.path) {
|
|
152873
152319
|
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
|
|
@@ -152881,18 +152327,18 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
152881
152327
|
}
|
|
152882
152328
|
|
|
152883
152329
|
buildChildrenDataDeclaration(context) {
|
|
152884
|
-
const node = this.getCurrentNodeAs(
|
|
152330
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152885
152331
|
return context.processChildrenDataDeclaration([...node.helpNodes, ...node.children]);
|
|
152886
152332
|
}
|
|
152887
152333
|
|
|
152888
152334
|
*doTraverseChildren() {
|
|
152889
|
-
const node = this.getCurrentNodeAs(
|
|
152335
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152890
152336
|
yield* node.helpNodes;
|
|
152891
152337
|
yield* node.children;
|
|
152892
152338
|
}
|
|
152893
152339
|
|
|
152894
152340
|
get nodePaths() {
|
|
152895
|
-
const node = this.getCurrentNodeAs(
|
|
152341
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152896
152342
|
let bindingPath;
|
|
152897
152343
|
|
|
152898
152344
|
if (node.path != undefined) {
|
|
@@ -152907,7 +152353,7 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
152907
152353
|
}
|
|
152908
152354
|
|
|
152909
152355
|
doConvert(context) {
|
|
152910
|
-
const node = this.getCurrentNodeAs(
|
|
152356
|
+
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_8__.TextNode);
|
|
152911
152357
|
|
|
152912
152358
|
if (node.path != undefined) {
|
|
152913
152359
|
return this.buildTextWithPathAttribute(context, node);
|
|
@@ -152965,12 +152411,6 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
152965
152411
|
|
|
152966
152412
|
buildTextWithPathAttribute(context, node) {
|
|
152967
152413
|
const mb = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("Text");
|
|
152968
|
-
(0,_ValueEditors_Input_SetCurrencyProps__WEBPACK_IMPORTED_MODULE_8__.setCurrencyProps)(mb, context, node);
|
|
152969
|
-
|
|
152970
|
-
if (node.currency) {
|
|
152971
|
-
mb.prop(x => x.rouble).set(node.rouble);
|
|
152972
|
-
}
|
|
152973
|
-
|
|
152974
152414
|
mb.prop(x => x.showError).set(node.showError);
|
|
152975
152415
|
mb.prop(x => x.quotes).set(node.quotes);
|
|
152976
152416
|
mb.prop(x => x.hint).set(node.hint);
|
|
@@ -153018,7 +152458,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153018
152458
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
153019
152459
|
/* harmony import */ var _Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Helpers/Help/HelpNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Helpers/Help/HelpNode.ts");
|
|
153020
152460
|
/* harmony import */ var _Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Commons/DocumentationLinks */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/DocumentationLinks.ts");
|
|
153021
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40,
|
|
152461
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39;
|
|
153022
152462
|
|
|
153023
152463
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
153024
152464
|
|
|
@@ -153033,7 +152473,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
153033
152473
|
|
|
153034
152474
|
|
|
153035
152475
|
|
|
153036
|
-
let TextNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("text", `Текст с возможностью взять значение из модели`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueViewers/Text sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_1__.ValidationInfoNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("editable", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Removed), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("auto", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("offsetLeft", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("rngAttribute", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("autoResize", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("rows", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("textOverflow", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("description", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("font", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("gId", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.UntypedUsage), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("showError", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Показывать ли ошибку, если она есть по соотв. binding path, вместо значения`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("field", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `**Внутренне поле** Нелепое поле генерируемое препроцессором для кладра`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Поле не редактируемое`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("requisite", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `(Проставляется c disabled="true" всегда!)\tэтот атрибут говорит о том, что поле должно каждый раз подтягиваться из реквизитов и поэтому нормализуется при каждом открытии черновика. Нужен, чтобы реквизиты подтягивались из реквизитов при каждом открытии формы и при загрузке ФУФа с пустым ИНН, а не только в первый раз.`), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("line", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Режим отображения текста: блочный или текстовый. Если line="false", то текст будет отображаться в отдельной строке`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("quotes", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Поле состоящее из двух символов и соответвует кавычкам, в которые будет заключено значение. Например: \`quotes="<>"\``), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("hint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Маленький статичный черный хинт над значением.`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("valueName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Из какого ${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.viewModelFieldLink, "поля ViewModel")} брать значение. По умолчанию: \`value\``), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("for", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.bindingPath, ``), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("tooltipWidth", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, `Ширина тултипа с ошибкой`), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("color", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.color, "Цвет"), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginTop", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ сверху"), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginBottom", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ снизу"), _dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("textalign", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("center", "justify", "left", "right", "start", "end"), "Выравнивание"), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Ширина блока"), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginLeft", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ слева"), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginRight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ справа"), _dec33 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("size", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Ширина блока"), _dec34 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("lineHeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Высота строки"), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fetchfn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Указывается название функции, которая прокидывает реквизиты в форму"), _dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fontWeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("bold", "normal", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700"), "Толщина текста"), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("baseline", "bottom", "middle", "sub", "super", "text-bottom", "text-top", "top"), "Выравнивание"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)(), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Текст для отображения ${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.helpTooltipLink)}-а`), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__.HelpNode]),
|
|
152476
|
+
let TextNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("text", `Текст с возможностью взять значение из модели`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueViewers/Text sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_1__.ValidationInfoNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("editable", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Removed), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("auto", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("offsetLeft", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("rngAttribute", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("autoResize", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("rows", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("textOverflow", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("description", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("font", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.InvalidUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("gId", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.UntypedUsage), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("showError", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Показывать ли ошибку, если она есть по соотв. binding path, вместо значения`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("field", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `**Внутренне поле** Нелепое поле генерируемое препроцессором для кладра`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Поле не редактируемое`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("requisite", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `(Проставляется c disabled="true" всегда!)\tэтот атрибут говорит о том, что поле должно каждый раз подтягиваться из реквизитов и поэтому нормализуется при каждом открытии черновика. Нужен, чтобы реквизиты подтягивались из реквизитов при каждом открытии формы и при загрузке ФУФа с пустым ИНН, а не только в первый раз.`), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("line", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Режим отображения текста: блочный или текстовый. Если line="false", то текст будет отображаться в отдельной строке`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("quotes", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Поле состоящее из двух символов и соответвует кавычкам, в которые будет заключено значение. Например: \`quotes="<>"\``), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("hint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Маленький статичный черный хинт над значением.`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("valueName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Из какого ${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.viewModelFieldLink, "поля ViewModel")} брать значение. По умолчанию: \`value\``), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("for", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.bindingPath, ``), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("tooltipWidth", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, `Ширина тултипа с ошибкой`), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("color", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.color, "Цвет"), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginTop", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ сверху"), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginBottom", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ снизу"), _dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("textalign", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("center", "justify", "left", "right", "start", "end"), "Выравнивание"), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Ширина блока"), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginLeft", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ слева"), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("marginRight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Отступ справа"), _dec33 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("size", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, "Ширина блока"), _dec34 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("lineHeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Высота строки"), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fetchfn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Указывается название функции, которая прокидывает реквизиты в форму"), _dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fontWeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("bold", "normal", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700"), "Толщина текста"), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType["enum"]("baseline", "bottom", "middle", "sub", "super", "text-bottom", "text-top", "top"), "Выравнивание"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)(), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Текст для отображения ${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.helpTooltipLink)}-а`), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__.HelpNode]), _dec(_class = (_class2 = class TextNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_3__.SugarNodeWithLegacyVisibility {
|
|
153037
152477
|
constructor(...args) {
|
|
153038
152478
|
super(...args);
|
|
153039
152479
|
|
|
@@ -153114,10 +152554,6 @@ let TextNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4
|
|
|
153114
152554
|
_initializerDefineProperty(this, "help", _descriptor38, this);
|
|
153115
152555
|
|
|
153116
152556
|
_initializerDefineProperty(this, "helpNodes", _descriptor39, this);
|
|
153117
|
-
|
|
153118
|
-
_initializerDefineProperty(this, "currency", _descriptor40, this);
|
|
153119
|
-
|
|
153120
|
-
_initializerDefineProperty(this, "rouble", _descriptor41, this);
|
|
153121
152557
|
}
|
|
153122
152558
|
|
|
153123
152559
|
get path() {
|
|
@@ -153323,16 +152759,6 @@ let TextNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4
|
|
|
153323
152759
|
enumerable: true,
|
|
153324
152760
|
writable: true,
|
|
153325
152761
|
initializer: null
|
|
153326
|
-
}), _descriptor40 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec41], {
|
|
153327
|
-
configurable: true,
|
|
153328
|
-
enumerable: true,
|
|
153329
|
-
writable: true,
|
|
153330
|
-
initializer: null
|
|
153331
|
-
}), _descriptor41 = _applyDecoratedDescriptor(_class2.prototype, "rouble", [_dec42], {
|
|
153332
|
-
configurable: true,
|
|
153333
|
-
enumerable: true,
|
|
153334
|
-
writable: true,
|
|
153335
|
-
initializer: null
|
|
153336
152762
|
})), _class2)) || _class);
|
|
153337
152763
|
|
|
153338
152764
|
/***/ }),
|
|
@@ -157567,7 +156993,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
157567
156993
|
|
|
157568
156994
|
|
|
157569
156995
|
class ValidationGenerator {
|
|
157570
|
-
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = []) {
|
|
156996
|
+
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, useDeepOptionalSchemaValidations, validationsContent = []) {
|
|
157571
156997
|
this.typeBasedValidatorGenerators = [_TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__.MatchOneOfPatternValidatorGenerator, _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__.EnumerationValidatorGenerator, _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__.StringLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__.NumberLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__.IntegerRangeValueValidatorGenerator, _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__.DigestCheckValueValidatorGenerator, _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_8__.AttachmentsValueValidatorGenerator, _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__.CustomValidationValueValidatorGenerator];
|
|
157572
156998
|
this.sugarRoot = void 0;
|
|
157573
156999
|
this.validationsContent = void 0;
|
|
@@ -157577,11 +157003,14 @@ class ValidationGenerator {
|
|
|
157577
157003
|
this.schemaRng = void 0;
|
|
157578
157004
|
this.controlCustomizationContext = void 0;
|
|
157579
157005
|
this.useSchemaValidations = void 0;
|
|
157006
|
+
this.useDeepOptionalSchemaValidations = void 0;
|
|
157007
|
+
this.criterionOfExistenceFromSchemaRng = [];
|
|
157580
157008
|
this.sugarRoot = sugarRoot;
|
|
157581
157009
|
this.typesRegistry = typesRegistry;
|
|
157582
157010
|
this.validationsContent = validationsContent;
|
|
157583
157011
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
157584
157012
|
this.useSchemaValidations = useSchemaValidations;
|
|
157013
|
+
this.useDeepOptionalSchemaValidations = useDeepOptionalSchemaValidations;
|
|
157585
157014
|
this.customValidations = {};
|
|
157586
157015
|
this.schemaRng = schemaRng;
|
|
157587
157016
|
|
|
@@ -157646,6 +157075,58 @@ class ValidationGenerator {
|
|
|
157646
157075
|
|
|
157647
157076
|
result = unescape(result.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2"));
|
|
157648
157077
|
return result;
|
|
157078
|
+
} // это можно прибрать попозже, например кода Дима задачу выпустит.
|
|
157079
|
+
|
|
157080
|
+
|
|
157081
|
+
modelPathInstance(target) {
|
|
157082
|
+
return `new AbsoluteModelPath([${[...target.getPathParts()].map(x => {
|
|
157083
|
+
if (x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.PathTokens.each) {
|
|
157084
|
+
return "PathTokens.each";
|
|
157085
|
+
}
|
|
157086
|
+
|
|
157087
|
+
if (x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.PathTokens.current) {
|
|
157088
|
+
return "PathTokens.current";
|
|
157089
|
+
}
|
|
157090
|
+
|
|
157091
|
+
return `"${x.toString()}"`;
|
|
157092
|
+
}).join(", ")}], ${true.toString()})`;
|
|
157093
|
+
}
|
|
157094
|
+
|
|
157095
|
+
generateRngSchemaValidationConfigurator() {
|
|
157096
|
+
const emptyResult = `export default function rngSchemaValidationConfigurator ({ form, AbsoluteModelPath, ValidationFunction, DependenciesRequiredAreEmpty }) {}`;
|
|
157097
|
+
const compiledConditions = [];
|
|
157098
|
+
|
|
157099
|
+
for (const [bindingPath, deps, localizedString] of this.criterionOfExistenceFromSchemaRng) {
|
|
157100
|
+
compiledConditions.push(this.generateRequiredValidationByDeps(bindingPath, deps !== null && deps !== void 0 ? deps : [], localizedString));
|
|
157101
|
+
}
|
|
157102
|
+
|
|
157103
|
+
if (this.criterionOfExistenceFromSchemaRng.length === 0) {
|
|
157104
|
+
// NOTE Просто, чтоб не падали аппрувал тесты
|
|
157105
|
+
return emptyResult;
|
|
157106
|
+
}
|
|
157107
|
+
|
|
157108
|
+
const result = `export default function rngSchemaValidationConfigurator ({ form, ValidationHelper, Validators, AbsoluteModelPath, ValidationFunction, DependenciesRequiredAreEmpty, PathTokens }) {
|
|
157109
|
+
const t = str => x => x.translate(str);
|
|
157110
|
+
${compiledConditions.join("\n")}
|
|
157111
|
+
}
|
|
157112
|
+
`;
|
|
157113
|
+
return result;
|
|
157114
|
+
}
|
|
157115
|
+
|
|
157116
|
+
generateRequiredValidationByDeps(bindingPath, dependencies, localizedString) {
|
|
157117
|
+
const targetAsString = this.modelPathInstance(bindingPath);
|
|
157118
|
+
const dependenciesAsString = dependencies.map(x => this.modelPathInstance(x.toCurrentIteration())).join(", \n");
|
|
157119
|
+
const message = typeof localizedString === "string" ? `"${localizedString}"` : localizedString.expression;
|
|
157120
|
+
return `
|
|
157121
|
+
const deps${bindingPath.getHash()} = [${dependenciesAsString}]
|
|
157122
|
+
form.calculator2.addCalculationFunction(
|
|
157123
|
+
new ValidationFunction(
|
|
157124
|
+
${targetAsString},
|
|
157125
|
+
deps${bindingPath.getHash()},
|
|
157126
|
+
context =>
|
|
157127
|
+
DependenciesRequiredAreEmpty.execute(context, ${targetAsString}, deps${bindingPath.getHash()}, ${message}, "Error", form.localization)
|
|
157128
|
+
)
|
|
157129
|
+
);`;
|
|
157649
157130
|
}
|
|
157650
157131
|
|
|
157651
157132
|
getValidationBySugarNodeType(sugarTypeNodes, gId) {
|
|
@@ -157707,7 +157188,7 @@ class ValidationGenerator {
|
|
|
157707
157188
|
const bindingPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(firstItem.bindingPath);
|
|
157708
157189
|
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
157709
157190
|
const sugarOptional = (_validationInfos$find = validationInfos.find(x => x.sugarOptional != undefined)) === null || _validationInfos$find === void 0 ? void 0 : _validationInfos$find.sugarOptional;
|
|
157710
|
-
const isOptional =
|
|
157191
|
+
const [isOptional, requiredDependencies] = this.getOptionalWithDependencies(bindingPath, sugarOptional);
|
|
157711
157192
|
const sugarRequiredDescription = validationInfos.map(x => {
|
|
157712
157193
|
var _x$sugarNodeType;
|
|
157713
157194
|
|
|
@@ -157720,7 +157201,9 @@ class ValidationGenerator {
|
|
|
157720
157201
|
}).find(x => x != undefined);
|
|
157721
157202
|
const sugarNodeWithBase = validationInfos.map(x => x.sugarNodeType).find(x => (x === null || x === void 0 ? void 0 : x.base) != undefined);
|
|
157722
157203
|
const highOrderDescription = (_validationInfos$find2 = validationInfos.find(x => x.highOrderDescription != undefined)) === null || _validationInfos$find2 === void 0 ? void 0 : _validationInfos$find2.highOrderDescription;
|
|
157723
|
-
const
|
|
157204
|
+
const requiredDescription = (_ref = (_ref2 = (_ref3 = (_ref4 = highOrderDescription !== null && highOrderDescription !== void 0 ? highOrderDescription : sugarRequiredDescription) !== null && _ref4 !== void 0 ? _ref4 : rngSchemaNodeType === null || rngSchemaNodeType === void 0 ? void 0 : rngSchemaNodeType.requiredDescription) !== null && _ref3 !== void 0 ? _ref3 : sugarDescription) !== null && _ref2 !== void 0 ? _ref2 : rngSchemaNodeType === null || rngSchemaNodeType === void 0 ? void 0 : rngSchemaNodeType.description) !== null && _ref !== void 0 ? _ref : "Поле должно быть заполнено";
|
|
157205
|
+
this.addCriterionOfExistence(bindingPath, requiredDependencies, requiredDescription);
|
|
157206
|
+
const requiredValidators = [this.buildRequiredValidator(requiredDescription)];
|
|
157724
157207
|
const sugarNodeBaseType = (_sugarNodeWithBase$ba = sugarNodeWithBase === null || sugarNodeWithBase === void 0 ? void 0 : sugarNodeWithBase.base) !== null && _sugarNodeWithBase$ba !== void 0 ? _sugarNodeWithBase$ba : rngSchemaNodeType === null || rngSchemaNodeType === void 0 ? void 0 : rngSchemaNodeType.baseType;
|
|
157725
157208
|
let baseTypeValidator;
|
|
157726
157209
|
|
|
@@ -157744,7 +157227,7 @@ class ValidationGenerator {
|
|
|
157744
157227
|
processValidations(bindingPath, sugarOptional, sugarNodeType, gId, highOrderDescription, fileLoaderOptions) {
|
|
157745
157228
|
const rngSchemaNodeType = this.getRngSchemaTypeInfo((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(bindingPath));
|
|
157746
157229
|
|
|
157747
|
-
if (bindingPath && (sugarNodeType != undefined || rngSchemaNodeType != undefined)) {
|
|
157230
|
+
if (bindingPath && (sugarNodeType != undefined || rngSchemaNodeType != undefined || this.useDeepOptionalSchemaValidations)) {
|
|
157748
157231
|
var _this$validations$val;
|
|
157749
157232
|
|
|
157750
157233
|
let validationBindingPath = bindingPath;
|
|
@@ -157773,6 +157256,39 @@ class ValidationGenerator {
|
|
|
157773
157256
|
return this.schemaRng.getIsOptionalByPath(bindingPath);
|
|
157774
157257
|
}
|
|
157775
157258
|
|
|
157259
|
+
addCriterionOfExistence(bindingPath, dependencies, message) {
|
|
157260
|
+
if (dependencies.length > 0) {
|
|
157261
|
+
this.criterionOfExistenceFromSchemaRng.push([bindingPath, dependencies, message]);
|
|
157262
|
+
}
|
|
157263
|
+
}
|
|
157264
|
+
|
|
157265
|
+
getOptionalWithDependencies(bindingPath, sugarOptional) {
|
|
157266
|
+
if (sugarOptional != undefined) {
|
|
157267
|
+
return [sugarOptional, []];
|
|
157268
|
+
}
|
|
157269
|
+
|
|
157270
|
+
if (!this.useDeepOptionalSchemaValidations) {
|
|
157271
|
+
return [this.isOptionalFromSchema(bindingPath), []];
|
|
157272
|
+
}
|
|
157273
|
+
|
|
157274
|
+
const [optionalFromSchemaRng, dependenciesFromSchemaRng] = this.getOptionalWithDependenciesFromSchemaRng(bindingPath);
|
|
157275
|
+
return [optionalFromSchemaRng, dependenciesFromSchemaRng];
|
|
157276
|
+
}
|
|
157277
|
+
|
|
157278
|
+
getOptionalWithDependenciesFromSchemaRng(bindingPath) {
|
|
157279
|
+
const dependenciesRequiredValidator = this.schemaRng.getDependenciesFromSchema(bindingPath);
|
|
157280
|
+
|
|
157281
|
+
if (dependenciesRequiredValidator.optional) {
|
|
157282
|
+
return [true, []];
|
|
157283
|
+
} else if (!dependenciesRequiredValidator.hasOptionalParent) {
|
|
157284
|
+
return [false, []];
|
|
157285
|
+
} else if (dependenciesRequiredValidator.dependencies.length > 0 && dependenciesRequiredValidator.dependencies.length < 16) {
|
|
157286
|
+
return [true, dependenciesRequiredValidator.dependencies];
|
|
157287
|
+
}
|
|
157288
|
+
|
|
157289
|
+
return [false, []];
|
|
157290
|
+
}
|
|
157291
|
+
|
|
157776
157292
|
getRngSchemaTypeInfo(bindingPath) {
|
|
157777
157293
|
return this.useSchemaValidations ? this.schemaRng.getTypeNodeByPath(bindingPath) : undefined;
|
|
157778
157294
|
}
|