@kontur.candy/generator 4.245.0 → 4.247.0-nillable.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 +205 -851
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -113312,7 +113312,11 @@ function ensureNotNullOrUndefined(input) {
|
|
|
113312
113312
|
function noop() {// noop
|
|
113313
113313
|
}
|
|
113314
113314
|
function reject(message) {
|
|
113315
|
-
|
|
113315
|
+
if (typeof message === "string" || message == undefined) {
|
|
113316
|
+
throw new Error(message !== null && message !== void 0 ? message : "Undefined is not allowed");
|
|
113317
|
+
} else {
|
|
113318
|
+
throw message;
|
|
113319
|
+
}
|
|
113316
113320
|
}
|
|
113317
113321
|
function isLengthGreaterThenOrEqual(items, minLength) {
|
|
113318
113322
|
return items.length >= minLength;
|
|
@@ -120490,293 +120494,6 @@ class CompositionOperandContext extends antlr4ts_ParserRuleContext__WEBPACK_IMPO
|
|
|
120490
120494
|
|
|
120491
120495
|
/***/ }),
|
|
120492
120496
|
|
|
120493
|
-
/***/ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts":
|
|
120494
|
-
/*!*****************************************************************!*\
|
|
120495
|
-
!*** ./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts ***!
|
|
120496
|
-
\*****************************************************************/
|
|
120497
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120498
|
-
|
|
120499
|
-
"use strict";
|
|
120500
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120501
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120502
|
-
/* harmony export */ "traverseKCLangExpression": () => (/* binding */ traverseKCLangExpression),
|
|
120503
|
-
/* harmony export */ "DefaultKCLangExpressionVisitor": () => (/* binding */ DefaultKCLangExpressionVisitor)
|
|
120504
|
-
/* harmony export */ });
|
|
120505
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
120506
|
-
|
|
120507
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
120508
|
-
function traverseKCLangExpression(node, visitor) {
|
|
120509
|
-
switch (node.type) {
|
|
120510
|
-
case "cast":
|
|
120511
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120512
|
-
visitor.visitCastExpressionKCLangNode(node);
|
|
120513
|
-
break;
|
|
120514
|
-
|
|
120515
|
-
case "oneof":
|
|
120516
|
-
traverseKCLangExpression(node.testExpression, visitor);
|
|
120517
|
-
visitor.visitOneOfExpressionKCLangNode(node);
|
|
120518
|
-
break;
|
|
120519
|
-
|
|
120520
|
-
case "abs":
|
|
120521
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120522
|
-
visitor.visitAbsKCLangNode(node);
|
|
120523
|
-
break;
|
|
120524
|
-
|
|
120525
|
-
case "xabs":
|
|
120526
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120527
|
-
visitor.visitXAbsKCLangNode(node);
|
|
120528
|
-
break;
|
|
120529
|
-
|
|
120530
|
-
case "exists":
|
|
120531
|
-
visitor.visitExistsKCLangNode(node);
|
|
120532
|
-
break;
|
|
120533
|
-
|
|
120534
|
-
case "length":
|
|
120535
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120536
|
-
visitor.visitLengthKCLangNode(node);
|
|
120537
|
-
break;
|
|
120538
|
-
|
|
120539
|
-
case "and":
|
|
120540
|
-
for (const expression of node.expressions) {
|
|
120541
|
-
traverseKCLangExpression(expression, visitor);
|
|
120542
|
-
}
|
|
120543
|
-
|
|
120544
|
-
visitor.visitAndKCLangNode(node);
|
|
120545
|
-
break;
|
|
120546
|
-
|
|
120547
|
-
case "sum":
|
|
120548
|
-
visitor.visitSumKCLangNode(node);
|
|
120549
|
-
break;
|
|
120550
|
-
|
|
120551
|
-
case "gt":
|
|
120552
|
-
case "ge":
|
|
120553
|
-
case "lt":
|
|
120554
|
-
case "le":
|
|
120555
|
-
case "eq":
|
|
120556
|
-
case "noteq":
|
|
120557
|
-
for (const expression of node.expressions) {
|
|
120558
|
-
traverseKCLangExpression(expression, visitor);
|
|
120559
|
-
}
|
|
120560
|
-
|
|
120561
|
-
visitor.visitComparisonKCLangNode(node);
|
|
120562
|
-
break;
|
|
120563
|
-
|
|
120564
|
-
case "division":
|
|
120565
|
-
case "multiply":
|
|
120566
|
-
for (const expression of node.expressions) {
|
|
120567
|
-
traverseKCLangExpression(expression, visitor);
|
|
120568
|
-
}
|
|
120569
|
-
|
|
120570
|
-
visitor.visitMultiplyKCLangNode(node);
|
|
120571
|
-
break;
|
|
120572
|
-
|
|
120573
|
-
case "minus":
|
|
120574
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120575
|
-
visitor.visitMinusKCLangNode(node);
|
|
120576
|
-
break;
|
|
120577
|
-
|
|
120578
|
-
case "not":
|
|
120579
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120580
|
-
visitor.visitNotKCLangNode(node);
|
|
120581
|
-
break;
|
|
120582
|
-
|
|
120583
|
-
case "round":
|
|
120584
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120585
|
-
visitor.visitRoundKCLangNode(node);
|
|
120586
|
-
break;
|
|
120587
|
-
|
|
120588
|
-
case "choose":
|
|
120589
|
-
traverseKCLangExpression(node.if, visitor);
|
|
120590
|
-
traverseKCLangExpression(node.else, visitor);
|
|
120591
|
-
traverseKCLangExpression(node.then, visitor);
|
|
120592
|
-
visitor.visitChooseKCLangNode(node);
|
|
120593
|
-
break;
|
|
120594
|
-
|
|
120595
|
-
case "const":
|
|
120596
|
-
visitor.visitConstKCLangNode(node);
|
|
120597
|
-
break;
|
|
120598
|
-
|
|
120599
|
-
case "argument":
|
|
120600
|
-
visitor.visitArgumentKCLangNode(node);
|
|
120601
|
-
break;
|
|
120602
|
-
|
|
120603
|
-
case "or":
|
|
120604
|
-
for (const expression of node.expressions) {
|
|
120605
|
-
traverseKCLangExpression(expression, visitor);
|
|
120606
|
-
}
|
|
120607
|
-
|
|
120608
|
-
visitor.visitOrKCLangNode(node);
|
|
120609
|
-
break;
|
|
120610
|
-
|
|
120611
|
-
case "multySum":
|
|
120612
|
-
visitor.visitMultySumKCLangNode(node);
|
|
120613
|
-
break;
|
|
120614
|
-
|
|
120615
|
-
case "substring":
|
|
120616
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120617
|
-
visitor.visitSubstringKCLangNode(node);
|
|
120618
|
-
break;
|
|
120619
|
-
|
|
120620
|
-
case "regexMatch":
|
|
120621
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
120622
|
-
visitor.visitRegexMatchKCLangNode(node);
|
|
120623
|
-
break;
|
|
120624
|
-
|
|
120625
|
-
default:
|
|
120626
|
-
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
120627
|
-
break;
|
|
120628
|
-
}
|
|
120629
|
-
}
|
|
120630
|
-
class DefaultKCLangExpressionVisitor {
|
|
120631
|
-
visitAbsKCLangNode(node) {// default empty implementation
|
|
120632
|
-
}
|
|
120633
|
-
|
|
120634
|
-
visitAndKCLangNode(node) {// default empty implementation
|
|
120635
|
-
}
|
|
120636
|
-
|
|
120637
|
-
visitArgumentKCLangNode(node) {// default empty implementation
|
|
120638
|
-
}
|
|
120639
|
-
|
|
120640
|
-
visitCastExpressionKCLangNode(node) {// default empty implementation
|
|
120641
|
-
}
|
|
120642
|
-
|
|
120643
|
-
visitChooseKCLangNode(node) {// default empty implementation
|
|
120644
|
-
}
|
|
120645
|
-
|
|
120646
|
-
visitComparisonKCLangNode(node) {// default empty implementation
|
|
120647
|
-
}
|
|
120648
|
-
|
|
120649
|
-
visitConstKCLangNode(node) {// default empty implementation
|
|
120650
|
-
}
|
|
120651
|
-
|
|
120652
|
-
visitExistsKCLangNode(node) {// default empty implementation
|
|
120653
|
-
}
|
|
120654
|
-
|
|
120655
|
-
visitLengthKCLangNode(node) {// default empty implementation
|
|
120656
|
-
}
|
|
120657
|
-
|
|
120658
|
-
visitMinusKCLangNode(node) {// default empty implementation
|
|
120659
|
-
}
|
|
120660
|
-
|
|
120661
|
-
visitMultiplyKCLangNode(node) {// default empty implementation
|
|
120662
|
-
}
|
|
120663
|
-
|
|
120664
|
-
visitMultySumKCLangNode(node) {// default empty implementation
|
|
120665
|
-
}
|
|
120666
|
-
|
|
120667
|
-
visitNotKCLangNode(node) {// default empty implementation
|
|
120668
|
-
}
|
|
120669
|
-
|
|
120670
|
-
visitOneOfExpressionKCLangNode(node) {// default empty implementation
|
|
120671
|
-
}
|
|
120672
|
-
|
|
120673
|
-
visitOrKCLangNode(node) {// default empty implementation
|
|
120674
|
-
}
|
|
120675
|
-
|
|
120676
|
-
visitRegexMatchKCLangNode(node) {// default empty implementation
|
|
120677
|
-
}
|
|
120678
|
-
|
|
120679
|
-
visitRoundKCLangNode(node) {// default empty implementation
|
|
120680
|
-
}
|
|
120681
|
-
|
|
120682
|
-
visitSubstringKCLangNode(node) {// default empty implementation
|
|
120683
|
-
}
|
|
120684
|
-
|
|
120685
|
-
visitSumKCLangNode(node) {// default empty implementation
|
|
120686
|
-
}
|
|
120687
|
-
|
|
120688
|
-
visitXAbsKCLangNode(node) {// default empty implementation
|
|
120689
|
-
}
|
|
120690
|
-
|
|
120691
|
-
}
|
|
120692
|
-
|
|
120693
|
-
/***/ }),
|
|
120694
|
-
|
|
120695
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts":
|
|
120696
|
-
/*!*****************************************************************!*\
|
|
120697
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts ***!
|
|
120698
|
-
\*****************************************************************/
|
|
120699
|
-
/***/ ((module) => {
|
|
120700
|
-
|
|
120701
|
-
// this file was prevaled
|
|
120702
|
-
|
|
120703
|
-
/* eslint-disable */
|
|
120704
|
-
// @ts-ignore
|
|
120705
|
-
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})()";
|
|
120706
|
-
|
|
120707
|
-
/***/ }),
|
|
120708
|
-
|
|
120709
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts":
|
|
120710
|
-
/*!****************************************************************!*\
|
|
120711
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionParser.ts ***!
|
|
120712
|
-
\****************************************************************/
|
|
120713
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120714
|
-
|
|
120715
|
-
"use strict";
|
|
120716
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120717
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120718
|
-
/* harmony export */ "KCLangDescriptionParser": () => (/* binding */ KCLangDescriptionParser)
|
|
120719
|
-
/* harmony export */ });
|
|
120720
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./KCLangDescriptionGrammar */ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts");
|
|
120721
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__);
|
|
120722
|
-
// @ts-ignore
|
|
120723
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
120724
|
-
|
|
120725
|
-
const evalParse = eval((_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default())).parse;
|
|
120726
|
-
class KCLangDescriptionParser {
|
|
120727
|
-
static getOrCreateParser() {
|
|
120728
|
-
return evalParse;
|
|
120729
|
-
}
|
|
120730
|
-
|
|
120731
|
-
static parse(code) {
|
|
120732
|
-
const parser = this.getOrCreateParser();
|
|
120733
|
-
return parser(code);
|
|
120734
|
-
}
|
|
120735
|
-
|
|
120736
|
-
}
|
|
120737
|
-
|
|
120738
|
-
/***/ }),
|
|
120739
|
-
|
|
120740
|
-
/***/ "./Generator/src/common/KCLang/KCLangNodes.ts":
|
|
120741
|
-
/*!****************************************************!*\
|
|
120742
|
-
!*** ./Generator/src/common/KCLang/KCLangNodes.ts ***!
|
|
120743
|
-
\****************************************************/
|
|
120744
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
120745
|
-
|
|
120746
|
-
"use strict";
|
|
120747
|
-
__webpack_require__.r(__webpack_exports__);
|
|
120748
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
120749
|
-
/* harmony export */ "isFormulaStatement": () => (/* binding */ isFormulaStatement),
|
|
120750
|
-
/* harmony export */ "isBlockStatement": () => (/* binding */ isBlockStatement),
|
|
120751
|
-
/* harmony export */ "isEnsureStatement": () => (/* binding */ isEnsureStatement),
|
|
120752
|
-
/* harmony export */ "isConditionalStatement": () => (/* binding */ isConditionalStatement),
|
|
120753
|
-
/* harmony export */ "isDescribeStatement": () => (/* binding */ isDescribeStatement),
|
|
120754
|
-
/* harmony export */ "andKCLangNode": () => (/* binding */ andKCLangNode)
|
|
120755
|
-
/* harmony export */ });
|
|
120756
|
-
function isFormulaStatement(node) {
|
|
120757
|
-
return node.type === "formula";
|
|
120758
|
-
}
|
|
120759
|
-
function isBlockStatement(node) {
|
|
120760
|
-
return node.type === "block";
|
|
120761
|
-
}
|
|
120762
|
-
function isEnsureStatement(node) {
|
|
120763
|
-
return node.type === "ensure";
|
|
120764
|
-
}
|
|
120765
|
-
function isConditionalStatement(node) {
|
|
120766
|
-
return node.type === "if";
|
|
120767
|
-
}
|
|
120768
|
-
function isDescribeStatement(node) {
|
|
120769
|
-
return node.type === "describe";
|
|
120770
|
-
}
|
|
120771
|
-
function andKCLangNode(...expressions) {
|
|
120772
|
-
return {
|
|
120773
|
-
type: "and",
|
|
120774
|
-
expressions: expressions
|
|
120775
|
-
};
|
|
120776
|
-
}
|
|
120777
|
-
|
|
120778
|
-
/***/ }),
|
|
120779
|
-
|
|
120780
120497
|
/***/ "./Generator/src/common/KCLang/KCLangToJsTranspiler.ts":
|
|
120781
120498
|
/*!*************************************************************!*\
|
|
120782
120499
|
!*** ./Generator/src/common/KCLang/KCLangToJsTranspiler.ts ***!
|
|
@@ -121074,345 +120791,6 @@ class KCLangToJsTranspiler {
|
|
|
121074
120791
|
|
|
121075
120792
|
/***/ }),
|
|
121076
120793
|
|
|
121077
|
-
/***/ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts":
|
|
121078
|
-
/*!**************************************************************!*\
|
|
121079
|
-
!*** ./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts ***!
|
|
121080
|
-
\**************************************************************/
|
|
121081
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
121082
|
-
|
|
121083
|
-
"use strict";
|
|
121084
|
-
__webpack_require__.r(__webpack_exports__);
|
|
121085
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
121086
|
-
/* harmony export */ "KCLangToXmlTranspiler": () => (/* binding */ KCLangToXmlTranspiler),
|
|
121087
|
-
/* harmony export */ "kclang": () => (/* binding */ kclang)
|
|
121088
|
-
/* harmony export */ });
|
|
121089
|
-
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
121090
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
121091
|
-
/* harmony import */ var _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./IKCLangExpressionVisitor */ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts");
|
|
121092
|
-
/* harmony import */ var _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./KCLangDescriptionParser */ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts");
|
|
121093
|
-
/* harmony import */ var _KCLangNodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./KCLangNodes */ "./Generator/src/common/KCLang/KCLangNodes.ts");
|
|
121094
|
-
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils */ "./Generator/src/common/KCLang/Utils.ts");
|
|
121095
|
-
/* harmony import */ var _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Antlr/KCLangAntlrParser */ "./Generator/src/common/KCLang/Antlr/KCLangAntlrParser.ts");
|
|
121096
|
-
|
|
121097
|
-
|
|
121098
|
-
|
|
121099
|
-
|
|
121100
|
-
|
|
121101
|
-
|
|
121102
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
121103
|
-
|
|
121104
|
-
function generateKCXmlExpression(expression) {
|
|
121105
|
-
switch (expression.type) {
|
|
121106
|
-
case "abs":
|
|
121107
|
-
case "xabs":
|
|
121108
|
-
case "length":
|
|
121109
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
121110
|
-
|
|
121111
|
-
case "exists":
|
|
121112
|
-
case "multySum":
|
|
121113
|
-
return `<m:${expression.type} select="${expression.select}" />`;
|
|
121114
|
-
|
|
121115
|
-
case "cast":
|
|
121116
|
-
if (expression.expression.type === "argument") {
|
|
121117
|
-
return `<m:argument select="${expression.expression.select}" type="${expression.targetType}" />`;
|
|
121118
|
-
}
|
|
121119
|
-
|
|
121120
|
-
throw new Error("Cast supports only for argument");
|
|
121121
|
-
|
|
121122
|
-
case "and":
|
|
121123
|
-
case "or":
|
|
121124
|
-
return [`<m:${expression.type}>`, ...expression.expressions.map(generateKCXmlExpression).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
121125
|
-
|
|
121126
|
-
case "sum":
|
|
121127
|
-
return [`<m:sum>`, ...expression.operands.map(operand => {
|
|
121128
|
-
if (operand.operator === "+") {
|
|
121129
|
-
return generateKCXmlExpression(operand.expression);
|
|
121130
|
-
}
|
|
121131
|
-
|
|
121132
|
-
return [`<m:minus>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(operand.expression), 1), `</m:minus>`].join("\n");
|
|
121133
|
-
}).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:sum>`].join("\n");
|
|
121134
|
-
|
|
121135
|
-
case "gt":
|
|
121136
|
-
case "ge":
|
|
121137
|
-
case "lt":
|
|
121138
|
-
case "le":
|
|
121139
|
-
case "eq":
|
|
121140
|
-
case "multiply":
|
|
121141
|
-
case "division":
|
|
121142
|
-
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");
|
|
121143
|
-
|
|
121144
|
-
case "noteq":
|
|
121145
|
-
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");
|
|
121146
|
-
|
|
121147
|
-
case "minus":
|
|
121148
|
-
case "not":
|
|
121149
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
121150
|
-
break;
|
|
121151
|
-
break;
|
|
121152
|
-
|
|
121153
|
-
case "round":
|
|
121154
|
-
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");
|
|
121155
|
-
|
|
121156
|
-
case "substring":
|
|
121157
|
-
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");
|
|
121158
|
-
|
|
121159
|
-
case "regexMatch":
|
|
121160
|
-
return [`<m:regexMatch pattern="${expression.pattern}">`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:regexMatch>`].join("\n");
|
|
121161
|
-
|
|
121162
|
-
case "choose":
|
|
121163
|
-
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");
|
|
121164
|
-
break;
|
|
121165
|
-
|
|
121166
|
-
case "const":
|
|
121167
|
-
if (expression.value.type === "decimal") {
|
|
121168
|
-
return `<m:const value="${expression.value.value}" type="decimal" />`;
|
|
121169
|
-
}
|
|
121170
|
-
|
|
121171
|
-
if (expression.value.type === "string") {
|
|
121172
|
-
return `<m:const value="${expression.value.value}" type="string" />`;
|
|
121173
|
-
}
|
|
121174
|
-
|
|
121175
|
-
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_0__.NotImplementedError();
|
|
121176
|
-
|
|
121177
|
-
case "argument":
|
|
121178
|
-
return `<m:argument select="${expression.select}" />`;
|
|
121179
|
-
|
|
121180
|
-
case "oneof":
|
|
121181
|
-
{
|
|
121182
|
-
const testExpr = generateKCXmlExpression(expression.testExpression);
|
|
121183
|
-
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");
|
|
121184
|
-
}
|
|
121185
|
-
|
|
121186
|
-
default:
|
|
121187
|
-
// @ts-ignore
|
|
121188
|
-
throw new Error(`Expression of type '${expression.type}' is not supported`);
|
|
121189
|
-
}
|
|
121190
|
-
}
|
|
121191
|
-
|
|
121192
|
-
function formatDescribeStatement(ast, matchPath, describe) {
|
|
121193
|
-
return _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__.KCLangDescriptionParser.parse(describe.text).map(item => {
|
|
121194
|
-
if (typeof item === "string") {
|
|
121195
|
-
return item;
|
|
121196
|
-
} else {
|
|
121197
|
-
return `{{link ref=${item.src}}}${item.text.join(" ")}{{/link}}`;
|
|
121198
|
-
}
|
|
121199
|
-
}).join(" ");
|
|
121200
|
-
}
|
|
121201
|
-
|
|
121202
|
-
function generateKCXmlFormula(ast, matchPath, describe) {
|
|
121203
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
121204
|
-
return `<m:formula match="${matchPath}" target="${ast.target}"${descriptionAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:formula>`;
|
|
121205
|
-
}
|
|
121206
|
-
|
|
121207
|
-
function removeTrailingSlash(inputStr) {
|
|
121208
|
-
if (inputStr.endsWith("/")) {
|
|
121209
|
-
return inputStr.substring(0, inputStr.length - 1);
|
|
121210
|
-
}
|
|
121211
|
-
|
|
121212
|
-
return inputStr;
|
|
121213
|
-
}
|
|
121214
|
-
|
|
121215
|
-
function joinPaths(paths) {
|
|
121216
|
-
return paths.map(removeTrailingSlash).join("/");
|
|
121217
|
-
}
|
|
121218
|
-
|
|
121219
|
-
function generateBlockKCXmlFormulas(block, parents) {
|
|
121220
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
121221
|
-
const result = [];
|
|
121222
|
-
let lastDescribeStatement;
|
|
121223
|
-
|
|
121224
|
-
for (const statement of block.statements) {
|
|
121225
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
121226
|
-
result.push(generateKCXmlFormula(statement, matchPath, lastDescribeStatement));
|
|
121227
|
-
lastDescribeStatement = undefined;
|
|
121228
|
-
}
|
|
121229
|
-
|
|
121230
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
121231
|
-
lastDescribeStatement = undefined;
|
|
121232
|
-
}
|
|
121233
|
-
|
|
121234
|
-
if (lastDescribeStatement != undefined) {
|
|
121235
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121236
|
-
}
|
|
121237
|
-
|
|
121238
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
121239
|
-
lastDescribeStatement = statement;
|
|
121240
|
-
}
|
|
121241
|
-
|
|
121242
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
121243
|
-
result.push(generateBlockKCXmlFormulas(statement, [...(parents !== null && parents !== void 0 ? parents : []), block]));
|
|
121244
|
-
}
|
|
121245
|
-
}
|
|
121246
|
-
|
|
121247
|
-
return result.join("\n");
|
|
121248
|
-
}
|
|
121249
|
-
|
|
121250
|
-
function guessConditionTarget(condition) {
|
|
121251
|
-
let result;
|
|
121252
|
-
|
|
121253
|
-
class GuessConditionTargetVisitor extends _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.DefaultKCLangExpressionVisitor {
|
|
121254
|
-
visitExistsKCLangNode(node) {
|
|
121255
|
-
if (result == undefined) {
|
|
121256
|
-
result = node.select;
|
|
121257
|
-
}
|
|
121258
|
-
}
|
|
121259
|
-
|
|
121260
|
-
visitArgumentKCLangNode(node) {
|
|
121261
|
-
if (result == undefined) {
|
|
121262
|
-
result = node.select;
|
|
121263
|
-
}
|
|
121264
|
-
}
|
|
121265
|
-
|
|
121266
|
-
}
|
|
121267
|
-
|
|
121268
|
-
(0,_IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.traverseKCLangExpression)(condition.expression, new GuessConditionTargetVisitor());
|
|
121269
|
-
return result;
|
|
121270
|
-
}
|
|
121271
|
-
|
|
121272
|
-
function generateKCXmlCondition(ast, matchPath, parentConditions, describe) {
|
|
121273
|
-
const levelAttr = ast.level === "error" ? ` errorLevel="Error"` : "";
|
|
121274
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
121275
|
-
const guessedTarget = guessConditionTarget(ast);
|
|
121276
|
-
const targetAttr = guessedTarget != undefined ? ` target="${guessedTarget}"` : "";
|
|
121277
|
-
|
|
121278
|
-
if (parentConditions != undefined && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.arrayIsNotEmpty)(parentConditions)) {
|
|
121279
|
-
var _parentConditions$map;
|
|
121280
|
-
|
|
121281
|
-
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 : []));
|
|
121282
|
-
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>`;
|
|
121283
|
-
}
|
|
121284
|
-
|
|
121285
|
-
return `<m:condition match="${matchPath}"${descriptionAttr}${levelAttr}${targetAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:condition>`;
|
|
121286
|
-
}
|
|
121287
|
-
|
|
121288
|
-
function generateBlockKCXmlConditions(block, parents, parentConditions) {
|
|
121289
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
121290
|
-
const result = [];
|
|
121291
|
-
let lastDescribeStatement;
|
|
121292
|
-
|
|
121293
|
-
for (const statement of block.statements) {
|
|
121294
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
121295
|
-
lastDescribeStatement = undefined;
|
|
121296
|
-
}
|
|
121297
|
-
|
|
121298
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
121299
|
-
result.push(generateKCXmlCondition(statement, matchPath, parentConditions, lastDescribeStatement));
|
|
121300
|
-
lastDescribeStatement = undefined;
|
|
121301
|
-
}
|
|
121302
|
-
|
|
121303
|
-
if (lastDescribeStatement != undefined) {
|
|
121304
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121305
|
-
}
|
|
121306
|
-
|
|
121307
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
121308
|
-
lastDescribeStatement = statement;
|
|
121309
|
-
}
|
|
121310
|
-
|
|
121311
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(statement)) {
|
|
121312
|
-
result.push(generateConditionalConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
121313
|
-
}
|
|
121314
|
-
|
|
121315
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
121316
|
-
result.push(generateBlockKCXmlConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
121317
|
-
}
|
|
121318
|
-
}
|
|
121319
|
-
|
|
121320
|
-
return result.join("\n");
|
|
121321
|
-
}
|
|
121322
|
-
|
|
121323
|
-
function generateConditionalConditions(conditionalStatement, parents, parentConditions) {
|
|
121324
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path)]);
|
|
121325
|
-
const result = [];
|
|
121326
|
-
let lastDescribeStatement;
|
|
121327
|
-
|
|
121328
|
-
for (const x of conditionalStatement.statements) {
|
|
121329
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(x)) {
|
|
121330
|
-
result.push(generateKCXmlCondition(x, matchPath, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement], lastDescribeStatement));
|
|
121331
|
-
lastDescribeStatement = undefined;
|
|
121332
|
-
}
|
|
121333
|
-
|
|
121334
|
-
if (lastDescribeStatement != undefined) {
|
|
121335
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
121336
|
-
}
|
|
121337
|
-
|
|
121338
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(x)) {
|
|
121339
|
-
lastDescribeStatement = x;
|
|
121340
|
-
}
|
|
121341
|
-
|
|
121342
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(x)) {
|
|
121343
|
-
result.push(generateConditionalConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
121344
|
-
}
|
|
121345
|
-
|
|
121346
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(x)) {
|
|
121347
|
-
result.push(generateBlockKCXmlConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
121348
|
-
}
|
|
121349
|
-
}
|
|
121350
|
-
|
|
121351
|
-
return result.join("\n");
|
|
121352
|
-
}
|
|
121353
|
-
|
|
121354
|
-
function generateKCXmlFormulas(blocks) {
|
|
121355
|
-
const formulas = Iterator.from(blocks).map(generateBlockKCXmlFormulas).toArray();
|
|
121356
|
-
|
|
121357
|
-
if (formulas.filter(x => x !== "").length > 0) {
|
|
121358
|
-
return `<m:formulas>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(formulas.join("\n"), 1) + "\n" + `</m:formulas>\n`;
|
|
121359
|
-
} else {
|
|
121360
|
-
return "";
|
|
121361
|
-
}
|
|
121362
|
-
}
|
|
121363
|
-
|
|
121364
|
-
function generateKCXmlConditions(blocks) {
|
|
121365
|
-
const conditions = Iterator.from(blocks).map(generateBlockKCXmlConditions).toArray();
|
|
121366
|
-
|
|
121367
|
-
if (conditions.filter(x => x !== "").length > 0) {
|
|
121368
|
-
return `<m:conditions>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(conditions.join("\n"), 1) + "\n" + `</m:conditions>\n`;
|
|
121369
|
-
} else {
|
|
121370
|
-
return "";
|
|
121371
|
-
}
|
|
121372
|
-
}
|
|
121373
|
-
|
|
121374
|
-
function generateKCXml(blocks) {
|
|
121375
|
-
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>`;
|
|
121376
|
-
}
|
|
121377
|
-
|
|
121378
|
-
class KCLangToXmlTranspiler {
|
|
121379
|
-
static transpile(kcLang, customParser) {
|
|
121380
|
-
const parser = customParser !== null && customParser !== void 0 ? customParser : _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__.KCLangAntlrParser.parse;
|
|
121381
|
-
const kcxml = generateKCXml(parser(kcLang).blocks);
|
|
121382
|
-
return kcxml;
|
|
121383
|
-
}
|
|
121384
|
-
|
|
121385
|
-
}
|
|
121386
|
-
function kclang(str) {
|
|
121387
|
-
return KCLangToXmlTranspiler.transpile(str.join(""));
|
|
121388
|
-
}
|
|
121389
|
-
|
|
121390
|
-
/***/ }),
|
|
121391
|
-
|
|
121392
|
-
/***/ "./Generator/src/common/KCLang/Utils.ts":
|
|
121393
|
-
/*!**********************************************!*\
|
|
121394
|
-
!*** ./Generator/src/common/KCLang/Utils.ts ***!
|
|
121395
|
-
\**********************************************/
|
|
121396
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
121397
|
-
|
|
121398
|
-
"use strict";
|
|
121399
|
-
__webpack_require__.r(__webpack_exports__);
|
|
121400
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
121401
|
-
/* harmony export */ "indent": () => (/* binding */ indent)
|
|
121402
|
-
/* harmony export */ });
|
|
121403
|
-
function indent(str, count) {
|
|
121404
|
-
const indentStr = new Array(count * 2).fill(" ").join("");
|
|
121405
|
-
return str.split("\n").map(x => {
|
|
121406
|
-
if (x === "") {
|
|
121407
|
-
return x;
|
|
121408
|
-
}
|
|
121409
|
-
|
|
121410
|
-
return indentStr + x;
|
|
121411
|
-
}).join("\n");
|
|
121412
|
-
}
|
|
121413
|
-
|
|
121414
|
-
/***/ }),
|
|
121415
|
-
|
|
121416
120794
|
/***/ "./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts":
|
|
121417
120795
|
/*!*********************************************************************************!*\
|
|
121418
120796
|
!*** ./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts ***!
|
|
@@ -121470,34 +120848,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121470
120848
|
|
|
121471
120849
|
|
|
121472
120850
|
class FormSchemaRngAttribute {
|
|
121473
|
-
constructor(name, description, type, optional, parent) {
|
|
120851
|
+
constructor(name, description, type, optional, nillable, parent) {
|
|
121474
120852
|
this.name = void 0;
|
|
121475
|
-
this.optional = void 0;
|
|
121476
120853
|
this.type = void 0;
|
|
121477
120854
|
this.description = void 0;
|
|
121478
120855
|
this.parent = void 0;
|
|
120856
|
+
this.optional = void 0;
|
|
120857
|
+
this.nillable = void 0;
|
|
121479
120858
|
this.description = description;
|
|
121480
120859
|
this.optional = optional;
|
|
120860
|
+
this.nillable = nillable;
|
|
121481
120861
|
this.type = type;
|
|
121482
120862
|
this.name = name;
|
|
121483
120863
|
this.parent = parent;
|
|
121484
120864
|
}
|
|
121485
120865
|
|
|
120866
|
+
isOptionalOrNillable() {
|
|
120867
|
+
return this.optional || this.nillable || false;
|
|
120868
|
+
}
|
|
120869
|
+
|
|
121486
120870
|
}
|
|
121487
120871
|
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
121488
120872
|
class FormSchemaRngElement {
|
|
121489
|
-
constructor(name, parent, optional, multiple) {
|
|
120873
|
+
constructor(name, parent, optional, multiple, nillable) {
|
|
121490
120874
|
this.name = void 0;
|
|
121491
|
-
this.optional = void 0;
|
|
121492
120875
|
this.multiple = void 0;
|
|
121493
120876
|
this.innerTextType = void 0;
|
|
121494
120877
|
this.children = new Map();
|
|
121495
120878
|
this.attributes = new Map();
|
|
121496
120879
|
this.parent = void 0;
|
|
120880
|
+
this.optional = void 0;
|
|
120881
|
+
this.nillable = void 0;
|
|
121497
120882
|
this.name = name;
|
|
121498
120883
|
this.parent = parent;
|
|
121499
120884
|
this.multiple = multiple;
|
|
121500
120885
|
this.optional = optional;
|
|
120886
|
+
this.nillable = nillable;
|
|
121501
120887
|
}
|
|
121502
120888
|
|
|
121503
120889
|
addElement(element) {
|
|
@@ -121518,6 +120904,10 @@ class FormSchemaRngElement {
|
|
|
121518
120904
|
return (_this$children$get = this.children.get(name)) !== null && _this$children$get !== void 0 ? _this$children$get : this.attributes.get(name);
|
|
121519
120905
|
}
|
|
121520
120906
|
|
|
120907
|
+
isOptionalOrNillable() {
|
|
120908
|
+
return this.optional || this.nillable || false;
|
|
120909
|
+
}
|
|
120910
|
+
|
|
121521
120911
|
}
|
|
121522
120912
|
class FormSchemaRng {
|
|
121523
120913
|
constructor(rootElement) {
|
|
@@ -121536,7 +120926,7 @@ class FormSchemaRng {
|
|
|
121536
120926
|
}
|
|
121537
120927
|
|
|
121538
120928
|
static convertSchemaRngElement(schemaRngElement, parent) {
|
|
121539
|
-
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple);
|
|
120929
|
+
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable);
|
|
121540
120930
|
|
|
121541
120931
|
if (schemaRngElement.innerText != undefined) {
|
|
121542
120932
|
if (schemaRngElement.innerText.type != undefined) {
|
|
@@ -121615,7 +121005,7 @@ class FormSchemaRng {
|
|
|
121615
121005
|
}
|
|
121616
121006
|
|
|
121617
121007
|
static convertSchemaRngAttribute(attribute, parent) {
|
|
121618
|
-
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, parent);
|
|
121008
|
+
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, attribute.nillable, parent);
|
|
121619
121009
|
}
|
|
121620
121010
|
|
|
121621
121011
|
adjustPathMultiplicity(path) {
|
|
@@ -121689,41 +121079,6 @@ class FormSchemaRng {
|
|
|
121689
121079
|
return currentElement;
|
|
121690
121080
|
}
|
|
121691
121081
|
|
|
121692
|
-
getIsOptionalByPath(modelPath) {
|
|
121693
|
-
let isOptionalStatus = false;
|
|
121694
|
-
let currentElement;
|
|
121695
|
-
|
|
121696
|
-
for (const part of modelPath.getPathParts()) {
|
|
121697
|
-
if (currentElement == undefined) {
|
|
121698
|
-
if (this.rootElement.name === part) {
|
|
121699
|
-
var _this$rootElement$opt, _this$rootElement;
|
|
121700
|
-
|
|
121701
|
-
currentElement = this.rootElement;
|
|
121702
|
-
isOptionalStatus = (_this$rootElement$opt = (_this$rootElement = this.rootElement) === null || _this$rootElement === void 0 ? void 0 : _this$rootElement.optional) !== null && _this$rootElement$opt !== void 0 ? _this$rootElement$opt : false;
|
|
121703
|
-
continue;
|
|
121704
|
-
} else {
|
|
121705
|
-
return false;
|
|
121706
|
-
}
|
|
121707
|
-
}
|
|
121708
|
-
|
|
121709
|
-
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121710
|
-
var _currentElement$multi, _currentElement2, _currentElement3;
|
|
121711
|
-
|
|
121712
|
-
currentElement = currentElement.getElementByName(part);
|
|
121713
|
-
|
|
121714
|
-
if (currentElement instanceof FormSchemaRngElement && ((_currentElement$multi = (_currentElement2 = currentElement) === null || _currentElement2 === void 0 ? void 0 : _currentElement2.multiple) !== null && _currentElement$multi !== void 0 ? _currentElement$multi : false)) {
|
|
121715
|
-
isOptionalStatus = false;
|
|
121716
|
-
} else if (((_currentElement3 = currentElement) === null || _currentElement3 === void 0 ? void 0 : _currentElement3.optional) === undefined) {
|
|
121717
|
-
continue;
|
|
121718
|
-
} else {
|
|
121719
|
-
isOptionalStatus = currentElement.optional;
|
|
121720
|
-
}
|
|
121721
|
-
}
|
|
121722
|
-
}
|
|
121723
|
-
|
|
121724
|
-
return isOptionalStatus;
|
|
121725
|
-
}
|
|
121726
|
-
|
|
121727
121082
|
getDependenciesFromSchema(bindingPath) {
|
|
121728
121083
|
var _endOptionalElement;
|
|
121729
121084
|
|
|
@@ -121735,7 +121090,7 @@ class FormSchemaRng {
|
|
|
121735
121090
|
if (this.rootElement.name === part) {
|
|
121736
121091
|
currentElement = this.rootElement;
|
|
121737
121092
|
|
|
121738
|
-
if (currentElement.
|
|
121093
|
+
if (currentElement.isOptionalOrNillable()) {
|
|
121739
121094
|
endOptionalElement = currentElement;
|
|
121740
121095
|
}
|
|
121741
121096
|
|
|
@@ -121750,15 +121105,13 @@ class FormSchemaRng {
|
|
|
121750
121105
|
}
|
|
121751
121106
|
|
|
121752
121107
|
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121753
|
-
var _currentElement4;
|
|
121754
|
-
|
|
121755
121108
|
currentElement = currentElement.getElementByName(part);
|
|
121756
121109
|
|
|
121757
|
-
if (currentElement instanceof FormSchemaRngElement && currentElement.
|
|
121110
|
+
if (currentElement instanceof FormSchemaRngElement && currentElement.isOptionalOrNillable() === true) {
|
|
121758
121111
|
endOptionalElement = currentElement;
|
|
121759
121112
|
}
|
|
121760
121113
|
|
|
121761
|
-
if (currentElement instanceof FormSchemaRngAttribute &&
|
|
121114
|
+
if (currentElement instanceof FormSchemaRngAttribute && currentElement.isOptionalOrNillable() === true) {
|
|
121762
121115
|
endOptionalElement = currentElement;
|
|
121763
121116
|
}
|
|
121764
121117
|
}
|
|
@@ -121787,7 +121140,6 @@ class FormSchemaRng {
|
|
|
121787
121140
|
return {
|
|
121788
121141
|
dependencies: deps,
|
|
121789
121142
|
hasOptionalParent: endOptionalElement != undefined,
|
|
121790
|
-
// true
|
|
121791
121143
|
optional: false
|
|
121792
121144
|
};
|
|
121793
121145
|
}
|
|
@@ -121827,12 +121179,6 @@ class FormSchemaRng {
|
|
|
121827
121179
|
return new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(result, true);
|
|
121828
121180
|
}
|
|
121829
121181
|
|
|
121830
|
-
getIsOptionalByExactPath(bindingPath) {
|
|
121831
|
-
var _this$getElementByPat, _this$getElementByPat2;
|
|
121832
|
-
|
|
121833
|
-
return (_this$getElementByPat = (_this$getElementByPat2 = this.getElementByPath(bindingPath)) === null || _this$getElementByPat2 === void 0 ? void 0 : _this$getElementByPat2.optional) !== null && _this$getElementByPat !== void 0 ? _this$getElementByPat : false;
|
|
121834
|
-
}
|
|
121835
|
-
|
|
121836
121182
|
getTypeNodeByPath(bindingPath) {
|
|
121837
121183
|
const currentElement = this.getElementByPath(bindingPath);
|
|
121838
121184
|
|
|
@@ -121982,7 +121328,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121982
121328
|
|
|
121983
121329
|
|
|
121984
121330
|
|
|
121985
|
-
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _class7, _class8, _descriptor3, _dec7, _dec8, _class10, _class11, _descriptor4, _dec9, _dec10, _class13, _class14, _descriptor5, _dec11, _dec12, _class16, _class17, _descriptor6, _dec13, _dec14, _class19, _class20, _descriptor7, _dec15, _dec16, _class22, _class23, _descriptor8, _dec17, _dec18, _class25, _class26, _descriptor9, _dec19, _dec20, _class28, _class29, _descriptor10, _dec21, _dec22, _dec23, _dec24, _dec25, _class31, _class32, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _dec26, _dec27, _dec28, _dec29, _dec30, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18,
|
|
121331
|
+
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _class7, _class8, _descriptor3, _dec7, _dec8, _class10, _class11, _descriptor4, _dec9, _dec10, _class13, _class14, _descriptor5, _dec11, _dec12, _class16, _class17, _descriptor6, _dec13, _dec14, _class19, _class20, _descriptor7, _dec15, _dec16, _class22, _class23, _descriptor8, _dec17, _dec18, _class25, _class26, _descriptor9, _dec19, _dec20, _class28, _class29, _descriptor10, _dec21, _dec22, _dec23, _dec24, _dec25, _class31, _class32, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _dec32, _dec33, _class37, _class38, _descriptor20, _dec34, _dec35, _class40, _class41, _descriptor21, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _class43, _class44, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30;
|
|
121986
121332
|
|
|
121987
121333
|
|
|
121988
121334
|
class SchemaRngTypeCheck extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {}
|
|
@@ -122150,7 +121496,7 @@ let SchemaRngType = (_dec21 = (0,_generators_markupGenerator_Serializer_SugarSer
|
|
|
122150
121496
|
writable: true,
|
|
122151
121497
|
initializer: null
|
|
122152
121498
|
})), _class32)) || _class31);
|
|
122153
|
-
let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("attribute", ``), _dec27 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec28 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec29 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec30 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec26(_class34 = (_class35 = class SchemaRngAttribute extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121499
|
+
let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("attribute", ``), _dec27 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec28 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec29 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec30 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec31 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec26(_class34 = (_class35 = class SchemaRngAttribute extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
122154
121500
|
constructor(...args) {
|
|
122155
121501
|
super(...args);
|
|
122156
121502
|
|
|
@@ -122160,7 +121506,9 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
122160
121506
|
|
|
122161
121507
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor17, this);
|
|
122162
121508
|
|
|
122163
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121509
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor18, this);
|
|
121510
|
+
|
|
121511
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor19, this);
|
|
122164
121512
|
}
|
|
122165
121513
|
|
|
122166
121514
|
}, (_descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "name", [_dec27], {
|
|
@@ -122178,95 +121526,107 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
122178
121526
|
enumerable: true,
|
|
122179
121527
|
writable: true,
|
|
122180
121528
|
initializer: null
|
|
122181
|
-
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "
|
|
121529
|
+
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "nillable", [_dec30], {
|
|
121530
|
+
configurable: true,
|
|
121531
|
+
enumerable: true,
|
|
121532
|
+
writable: true,
|
|
121533
|
+
initializer: null
|
|
121534
|
+
}), _descriptor19 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "description", [_dec31], {
|
|
122182
121535
|
configurable: true,
|
|
122183
121536
|
enumerable: true,
|
|
122184
121537
|
writable: true,
|
|
122185
121538
|
initializer: null
|
|
122186
121539
|
})), _class35)) || _class34);
|
|
122187
|
-
let SchemaRngInnerText = (
|
|
121540
|
+
let SchemaRngInnerText = (_dec32 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("innertext", ``), _dec33 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec32(_class37 = (_class38 = class SchemaRngInnerText extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
122188
121541
|
constructor(...args) {
|
|
122189
121542
|
super(...args);
|
|
122190
121543
|
|
|
122191
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type",
|
|
121544
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type", _descriptor20, this);
|
|
122192
121545
|
}
|
|
122193
121546
|
|
|
122194
|
-
}, (
|
|
121547
|
+
}, (_descriptor20 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class38.prototype, "type", [_dec33], {
|
|
122195
121548
|
configurable: true,
|
|
122196
121549
|
enumerable: true,
|
|
122197
121550
|
writable: true,
|
|
122198
121551
|
initializer: null
|
|
122199
121552
|
})), _class38)) || _class37);
|
|
122200
|
-
let SchemaRngElementChoiceElement = (
|
|
121553
|
+
let SchemaRngElementChoiceElement = (_dec34 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("choice", ``), _dec35 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec34(_class40 = (_class41 = class SchemaRngElementChoiceElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
122201
121554
|
constructor(...args) {
|
|
122202
121555
|
super(...args);
|
|
122203
121556
|
|
|
122204
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children",
|
|
121557
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor21, this);
|
|
122205
121558
|
}
|
|
122206
121559
|
|
|
122207
|
-
}, (
|
|
121560
|
+
}, (_descriptor21 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class41.prototype, "children", [_dec35], {
|
|
122208
121561
|
configurable: true,
|
|
122209
121562
|
enumerable: true,
|
|
122210
121563
|
writable: true,
|
|
122211
121564
|
initializer: null
|
|
122212
121565
|
})), _class41)) || _class40);
|
|
122213
|
-
let SchemaRngElement = (
|
|
121566
|
+
let SchemaRngElement = (_dec36 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("element", ``), _dec37 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, ``), _dec38 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec39 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec40 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec41 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("multiple", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec42 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("attribute", [SchemaRngAttribute]), _dec43 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec44 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("choice"), _dec45 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("innertext", [SchemaRngInnerText]), _dec36(_class43 = (_class44 = class SchemaRngElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
122214
121567
|
constructor(...args) {
|
|
122215
121568
|
super(...args);
|
|
122216
121569
|
|
|
122217
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name",
|
|
121570
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor22, this);
|
|
122218
121571
|
|
|
122219
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description",
|
|
121572
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor23, this);
|
|
122220
121573
|
|
|
122221
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional",
|
|
121574
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor24, this);
|
|
122222
121575
|
|
|
122223
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121576
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor25, this);
|
|
122224
121577
|
|
|
122225
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121578
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor26, this);
|
|
122226
121579
|
|
|
122227
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121580
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "attributes", _descriptor27, this);
|
|
121581
|
+
|
|
121582
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor28, this);
|
|
122228
121583
|
|
|
122229
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices",
|
|
121584
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices", _descriptor29, this);
|
|
122230
121585
|
|
|
122231
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText",
|
|
121586
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText", _descriptor30, this);
|
|
122232
121587
|
}
|
|
122233
121588
|
|
|
122234
|
-
}, (
|
|
121589
|
+
}, (_descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "name", [_dec37], {
|
|
122235
121590
|
configurable: true,
|
|
122236
121591
|
enumerable: true,
|
|
122237
121592
|
writable: true,
|
|
122238
121593
|
initializer: null
|
|
122239
|
-
}),
|
|
121594
|
+
}), _descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "description", [_dec38], {
|
|
122240
121595
|
configurable: true,
|
|
122241
121596
|
enumerable: true,
|
|
122242
121597
|
writable: true,
|
|
122243
121598
|
initializer: null
|
|
122244
|
-
}),
|
|
121599
|
+
}), _descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "optional", [_dec39], {
|
|
122245
121600
|
configurable: true,
|
|
122246
121601
|
enumerable: true,
|
|
122247
121602
|
writable: true,
|
|
122248
121603
|
initializer: null
|
|
122249
|
-
}),
|
|
121604
|
+
}), _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "nillable", [_dec40], {
|
|
122250
121605
|
configurable: true,
|
|
122251
121606
|
enumerable: true,
|
|
122252
121607
|
writable: true,
|
|
122253
121608
|
initializer: null
|
|
122254
|
-
}),
|
|
121609
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "multiple", [_dec41], {
|
|
122255
121610
|
configurable: true,
|
|
122256
121611
|
enumerable: true,
|
|
122257
121612
|
writable: true,
|
|
122258
121613
|
initializer: null
|
|
122259
|
-
}),
|
|
121614
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "attributes", [_dec42], {
|
|
122260
121615
|
configurable: true,
|
|
122261
121616
|
enumerable: true,
|
|
122262
121617
|
writable: true,
|
|
122263
121618
|
initializer: null
|
|
122264
|
-
}),
|
|
121619
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "children", [_dec43], {
|
|
122265
121620
|
configurable: true,
|
|
122266
121621
|
enumerable: true,
|
|
122267
121622
|
writable: true,
|
|
122268
121623
|
initializer: null
|
|
122269
|
-
}),
|
|
121624
|
+
}), _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "choices", [_dec44], {
|
|
121625
|
+
configurable: true,
|
|
121626
|
+
enumerable: true,
|
|
121627
|
+
writable: true,
|
|
121628
|
+
initializer: null
|
|
121629
|
+
}), _descriptor30 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "innerText", [_dec45], {
|
|
122270
121630
|
configurable: true,
|
|
122271
121631
|
enumerable: true,
|
|
122272
121632
|
writable: true,
|
|
@@ -124949,6 +124309,7 @@ function normalizeToArray(value) {
|
|
|
124949
124309
|
"use strict";
|
|
124950
124310
|
__webpack_require__.r(__webpack_exports__);
|
|
124951
124311
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
124312
|
+
/* harmony export */ "getNodeSource": () => (/* binding */ getNodeSource),
|
|
124952
124313
|
/* harmony export */ "XmlNode": () => (/* binding */ XmlNode),
|
|
124953
124314
|
/* harmony export */ "ASTNode": () => (/* binding */ ASTNode),
|
|
124954
124315
|
/* harmony export */ "SugarReadingError": () => (/* binding */ SugarReadingError),
|
|
@@ -124961,6 +124322,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
124961
124322
|
|
|
124962
124323
|
|
|
124963
124324
|
|
|
124325
|
+
function getNodeSource(node) {
|
|
124326
|
+
if (node.source == undefined) {
|
|
124327
|
+
return "N/A";
|
|
124328
|
+
}
|
|
124329
|
+
|
|
124330
|
+
try {
|
|
124331
|
+
const sourceLines = node.source.sourceText.split("\n");
|
|
124332
|
+
return sourceLines.slice(node.source.location.start.line - 1, node.source.location.end.line).join("\n");
|
|
124333
|
+
} catch {
|
|
124334
|
+
return "N/A";
|
|
124335
|
+
}
|
|
124336
|
+
}
|
|
124964
124337
|
class XmlNode {
|
|
124965
124338
|
constructor(createParams) {
|
|
124966
124339
|
var _createParams$parent, _createParams$attribu, _createParams$childre;
|
|
@@ -126806,7 +126179,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
126806
126179
|
|
|
126807
126180
|
|
|
126808
126181
|
class FormulasAutoCalculationsGenerator {
|
|
126809
|
-
generate(
|
|
126182
|
+
generate(formulaContainer, schemaRng, dataDeclarationHelper) {
|
|
126183
|
+
const formulas = formulaContainer.formulas == undefined || formulaContainer.formulas.items == undefined ? [] : formulaContainer.formulas.items;
|
|
126810
126184
|
const formulaAutoCalculations = formulas.map(formula => this.buildFormulaAutoCalculation(formula, schemaRng, dataDeclarationHelper)).flat();
|
|
126811
126185
|
return this.mergeFormulaAutoCalculations(formulaAutoCalculations);
|
|
126812
126186
|
}
|
|
@@ -127536,73 +126910,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127536
126910
|
/* harmony export */ });
|
|
127537
126911
|
/* harmony import */ var _common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/XmlParser/XmlParser */ "./Generator/src/common/XmlParser/XmlParser.ts");
|
|
127538
126912
|
/* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
127539
|
-
/* harmony import */ var
|
|
127540
|
-
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
127541
|
-
|
|
126913
|
+
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
127542
126914
|
|
|
127543
126915
|
|
|
127544
126916
|
|
|
127545
126917
|
class FormulaReader {
|
|
127546
|
-
readFormulas(
|
|
126918
|
+
readFormulas(kcxmlSource) {
|
|
127547
126919
|
const serializer = this.createFormulaSerializer();
|
|
127548
|
-
const result =
|
|
126920
|
+
const result = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
127549
126921
|
|
|
127550
|
-
|
|
127551
|
-
|
|
127552
|
-
|
|
127553
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127554
|
-
var _rootNode$formulas$it, _rootNode$formulas;
|
|
127555
|
-
|
|
127556
|
-
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 : []));
|
|
127557
|
-
}
|
|
127558
|
-
}
|
|
127559
|
-
|
|
127560
|
-
for (const kclangSource of kclangSources) {
|
|
127561
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
127562
|
-
|
|
127563
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127564
|
-
var _rootNode$formulas$it2, _rootNode$formulas2;
|
|
127565
|
-
|
|
127566
|
-
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 : []));
|
|
127567
|
-
}
|
|
126922
|
+
if (result instanceof _Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent) {
|
|
126923
|
+
return this.createEmptyMathContainer();
|
|
127568
126924
|
}
|
|
127569
126925
|
|
|
127570
126926
|
return result;
|
|
127571
126927
|
}
|
|
127572
126928
|
|
|
127573
|
-
|
|
127574
|
-
const
|
|
127575
|
-
|
|
127576
|
-
|
|
127577
|
-
|
|
127578
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
127579
|
-
|
|
127580
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127581
|
-
var _rootNode$conditions$, _rootNode$conditions;
|
|
127582
|
-
|
|
127583
|
-
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$ : []));
|
|
127584
|
-
}
|
|
127585
|
-
}
|
|
127586
|
-
|
|
127587
|
-
for (const kclangSource of kclangSources) {
|
|
127588
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
127589
|
-
|
|
127590
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
127591
|
-
var _rootNode$conditions$2, _rootNode$conditions2;
|
|
127592
|
-
|
|
127593
|
-
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 : []));
|
|
127594
|
-
}
|
|
127595
|
-
}
|
|
127596
|
-
|
|
127597
|
-
return result;
|
|
126929
|
+
createEmptyMathContainer() {
|
|
126930
|
+
const mathContainer = new _Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer();
|
|
126931
|
+
mathContainer.formulas = new _Formula__WEBPACK_IMPORTED_MODULE_2__.Formulas();
|
|
126932
|
+
mathContainer.formulas.items = [];
|
|
126933
|
+
return mathContainer;
|
|
127598
126934
|
}
|
|
127599
126935
|
|
|
127600
126936
|
createFormulaSerializer() {
|
|
127601
126937
|
const result = new _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.SugarSerializer();
|
|
127602
|
-
result.registerNode(
|
|
127603
|
-
result.registerNode(
|
|
126938
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent);
|
|
126939
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer);
|
|
127604
126940
|
|
|
127605
|
-
for (const formulaExpression of
|
|
126941
|
+
for (const formulaExpression of _Formula__WEBPACK_IMPORTED_MODULE_2__.formulaExpressions) {
|
|
127606
126942
|
result.registerNode(formulaExpression);
|
|
127607
126943
|
}
|
|
127608
126944
|
|
|
@@ -129043,26 +128379,47 @@ const gfv = '${gfv}'
|
|
|
129043
128379
|
const resourcesHash = ${JSON.stringify(resourcesHash)}
|
|
129044
128380
|
|
|
129045
128381
|
window.CF.entryPoint = window.CF.entryPoint || {};
|
|
129046
|
-
window.CF.entryPoint[gfv]
|
|
129047
|
-
const
|
|
129048
|
-
|
|
129049
|
-
|
|
129050
|
-
|
|
129051
|
-
|
|
129052
|
-
|
|
129053
|
-
|
|
129054
|
-
|
|
129055
|
-
|
|
129056
|
-
settings: {
|
|
129057
|
-
...defaultSettings,
|
|
129058
|
-
...settings,
|
|
129059
|
-
isDisabledCleanForm: defaultSettings.isDisabledCleanForm || settings.isDisabledCleanForm,
|
|
129060
|
-
isDisabledCloseButton: defaultSettings.isDisabledCloseButton || settings.isDisabledCloseButton,
|
|
129061
|
-
isDisabledCloseAndSaveButton: defaultSettings.isDisabledCloseAndSaveButton || settings.isDisabledCloseAndSaveButton,
|
|
129062
|
-
}
|
|
128382
|
+
if (window.CF.entryPoint[gfv]) {
|
|
128383
|
+
for (const instance of window.CF.entryPoint[gfv].instances) {
|
|
128384
|
+
const resources = {
|
|
128385
|
+
dataDeclaration: dataDeclaration,
|
|
128386
|
+
calculationFunctions: calculationFunctions,
|
|
128387
|
+
validationFunctions: validationFunctions,
|
|
128388
|
+
requisiteList: requisiteList,
|
|
128389
|
+
autocalculationConfigurators: [...autocalculationConfigurators, kcXmlValidationConfigurator, rngSchemaValidationConfigurator],
|
|
128390
|
+
}
|
|
128391
|
+
instance.updateFormResources(Form, resources);
|
|
129063
128392
|
}
|
|
129064
|
-
|
|
129065
|
-
}
|
|
128393
|
+
} else {
|
|
128394
|
+
window.CF.entryPoint[gfv] = async function(container, { renderForm, ...settings }) {
|
|
128395
|
+
const resources = {
|
|
128396
|
+
dataDeclaration: dataDeclaration,
|
|
128397
|
+
calculationFunctions: calculationFunctions,
|
|
128398
|
+
validationFunctions: validationFunctions,
|
|
128399
|
+
requisiteList: requisiteList,
|
|
128400
|
+
resourcesHash: resourcesHash,
|
|
128401
|
+
localizationDictionary: localizationDictionary,
|
|
128402
|
+
hooks: hooks,
|
|
128403
|
+
autocalculationConfigurators: [...autocalculationConfigurators, kcXmlValidationConfigurator, rngSchemaValidationConfigurator],
|
|
128404
|
+
settings: {
|
|
128405
|
+
...defaultSettings,
|
|
128406
|
+
...settings,
|
|
128407
|
+
isDisabledCleanForm: defaultSettings.isDisabledCleanForm || settings.isDisabledCleanForm,
|
|
128408
|
+
isDisabledCloseButton: defaultSettings.isDisabledCloseButton || settings.isDisabledCloseButton,
|
|
128409
|
+
isDisabledCloseAndSaveButton: defaultSettings.isDisabledCloseAndSaveButton || settings.isDisabledCloseAndSaveButton,
|
|
128410
|
+
}
|
|
128411
|
+
}
|
|
128412
|
+
const formInstance = await renderForm(Form, resources, container)
|
|
128413
|
+
window.CF.entryPoint[gfv].instances = window.CF.entryPoint[gfv].instances ?? [];
|
|
128414
|
+
window.CF.entryPoint[gfv].instances.push(formInstance)
|
|
128415
|
+
return formInstance;
|
|
128416
|
+
}
|
|
128417
|
+
}
|
|
128418
|
+
|
|
128419
|
+
if (module.hot) {
|
|
128420
|
+
module.hot.accept();
|
|
128421
|
+
}
|
|
128422
|
+
`;
|
|
129066
128423
|
}
|
|
129067
128424
|
|
|
129068
128425
|
/***/ }),
|
|
@@ -129212,6 +128569,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129212
128569
|
/* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
129213
128570
|
/* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader.ts");
|
|
129214
128571
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
128572
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
128573
|
+
|
|
129215
128574
|
|
|
129216
128575
|
|
|
129217
128576
|
|
|
@@ -129230,9 +128589,11 @@ class KCXmlValidationGenerator {
|
|
|
129230
128589
|
const conditionReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_2__.FormulaReader();
|
|
129231
128590
|
|
|
129232
128591
|
for (const file of importedKcXmlValidations) {
|
|
129233
|
-
const
|
|
128592
|
+
const math = conditionReader.readFormulas(file);
|
|
128593
|
+
|
|
128594
|
+
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 : []) {
|
|
128595
|
+
var _math$conditions$item, _math$conditions;
|
|
129234
128596
|
|
|
129235
|
-
for (const condition of conditions) {
|
|
129236
128597
|
compiledConditions.push(this.compileCondition(condition));
|
|
129237
128598
|
}
|
|
129238
128599
|
}
|
|
@@ -129256,7 +128617,7 @@ class KCXmlValidationGenerator {
|
|
|
129256
128617
|
const target = prefix.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.ModelPath.createFromMask(condition.target, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each));
|
|
129257
128618
|
const deps = [];
|
|
129258
128619
|
const compiledExpression = this.compileExpression(prefix, condition.expression, deps);
|
|
129259
|
-
return `new ValidationFunction` + `(` + this.modelPathInstance(target) + `,` + `[${deps.map(x => x.toCurrentIteration()).map(x => this.modelPathInstance(x)).join(", ")}]` + `, ` + `context => KCCondition.execute(context, expression => ${compiledExpression}` + `, ` + `() => "${(_condition$descriptio = condition.description) !== null && _condition$descriptio !== void 0 ? _condition$descriptio : "Error Message"}"` + `, ` + `"${(_condition$errorLevel = condition.errorLevel) !== null && _condition$errorLevel !== void 0 ? _condition$errorLevel : "Error"}" )` + `)`;
|
|
128620
|
+
return `new ValidationFunction` + `(` + this.modelPathInstance(target) + `,` + `[${deps.map(x => x.toCurrentIteration()).map(x => this.modelPathInstance(x)).join(", ")}]` + `, ` + `context => KCCondition.execute(context, expression => ${compiledExpression}` + `, ` + `() => "${(_condition$descriptio = condition.description) !== null && _condition$descriptio !== void 0 ? _condition$descriptio : "Error Message"}"` + `, ` + `"${(_condition$errorLevel = condition.errorLevel) !== null && _condition$errorLevel !== void 0 ? _condition$errorLevel : "Error"}" )` + `, ` + JSON.stringify((0,_common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_4__.getNodeSource)(condition.sourceXmlNode)) + `)`;
|
|
129260
128621
|
}
|
|
129261
128622
|
|
|
129262
128623
|
compileExpression(prefix, expression, deps) {
|
|
@@ -129417,7 +128778,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
129417
128778
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
129418
128779
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
129419
128780
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_13__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_10__.FormNode);
|
|
129420
|
-
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent
|
|
128781
|
+
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
|
|
129421
128782
|
const schemaRng = (0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__.parseXml)(additionalContent.schemaRngContent);
|
|
129422
128783
|
const formSchemaRng = _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.FormSchemaRng.createFromSchemaRng(additionalContent.schemaRngContent);
|
|
129423
128784
|
const typeRegistry = (0,_validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_14__.buildTypesRegistry)(sugarRoot);
|
|
@@ -129547,17 +128908,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129547
128908
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
129548
128909
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ "path");
|
|
129549
128910
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
129550
|
-
/* harmony import */ var
|
|
129551
|
-
/* harmony import */ var
|
|
129552
|
-
/* harmony import */ var
|
|
129553
|
-
/* harmony import */ var
|
|
129554
|
-
/* harmony import */ var
|
|
129555
|
-
/* harmony import */ var
|
|
129556
|
-
/* harmony import */ var
|
|
129557
|
-
/* harmony import */ var
|
|
129558
|
-
/* harmony import */ var
|
|
129559
|
-
/* harmony import */ var
|
|
129560
|
-
/* harmony import */ var
|
|
128911
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! util */ "util");
|
|
128912
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
|
|
128913
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js");
|
|
128914
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
|
|
128915
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js");
|
|
128916
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_4__);
|
|
128917
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
|
128918
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_5__);
|
|
128919
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! md5-file */ "./node_modules/md5-file/index.js");
|
|
128920
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(md5_file__WEBPACK_IMPORTED_MODULE_6__);
|
|
128921
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! recursive-readdir */ "./node_modules/recursive-readdir/index.js");
|
|
128922
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(recursive_readdir__WEBPACK_IMPORTED_MODULE_7__);
|
|
128923
|
+
/* harmony import */ var _common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/ExtractSugarReferences */ "./Generator/src/common/ExtractSugarReferences.ts");
|
|
128924
|
+
|
|
129561
128925
|
|
|
129562
128926
|
|
|
129563
128927
|
|
|
@@ -129566,6 +128930,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129566
128930
|
|
|
129567
128931
|
|
|
129568
128932
|
|
|
128933
|
+
const statAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.stat);
|
|
128934
|
+
const readFileAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readFile);
|
|
128935
|
+
const readdirAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readdir);
|
|
129569
128936
|
async function readFormSources(formSourcesPath, farmDirectory) {
|
|
129570
128937
|
var _JSON$parse$settings;
|
|
129571
128938
|
|
|
@@ -129577,9 +128944,9 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
129577
128944
|
|
|
129578
128945
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
129579
128946
|
// eslint-disable-next-line no-console
|
|
129580
|
-
console.warn(
|
|
128947
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`[WARN] Форма не содержит ссылок на fetch-функции. Будут автоматически подключены функции из каталога legacyfetchfuctions\n` + `[WARN] В будущем необходимо явно прописывать ссылки на используемые fetch-функции`));
|
|
129581
128948
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
129582
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
128949
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
129583
128950
|
}
|
|
129584
128951
|
|
|
129585
128952
|
const result = {
|
|
@@ -129589,12 +128956,11 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
129589
128956
|
formSourcesPath: formSourcesPath,
|
|
129590
128957
|
formJsonSettings: (_JSON$parse$settings = JSON.parse(await readFileSource(formSourcesPath, "form.json", "{}"))["settings"]) !== null && _JSON$parse$settings !== void 0 ? _JSON$parse$settings : {},
|
|
129591
128958
|
additionalSettings: await readFileSource(formSourcesPath, "settings.json", "{}"),
|
|
129592
|
-
autocalcsContent: await
|
|
128959
|
+
autocalcsContent: await readAutoCalcFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc")),
|
|
129593
128960
|
helpersContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers")),
|
|
129594
128961
|
validationsContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations")),
|
|
129595
128962
|
schemaRngContent: await readSchemaRngFile(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"), formName),
|
|
129596
|
-
kcJsXmlContent: await
|
|
129597
|
-
kclangAutocaclulationsContent: await readFilesFromDir(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), /\.kclang$/),
|
|
128963
|
+
kcJsXmlContent: (await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), `${formName}.КС.candy.js.xml`, "<dummy/>")) || "",
|
|
129598
128964
|
tourSteps: await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "tour"), "tour.js", "{}"),
|
|
129599
128965
|
hooksContent: await readHooksFile(formSourcesPath),
|
|
129600
128966
|
customControlsContent: await readCustomControlsFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls")),
|
|
@@ -129638,7 +129004,7 @@ function evalModule(moduleCode) {
|
|
|
129638
129004
|
|
|
129639
129005
|
async function isDirectoryExists(directoryPath) {
|
|
129640
129006
|
try {
|
|
129641
|
-
const dirStat = await (
|
|
129007
|
+
const dirStat = await statAsync(directoryPath);
|
|
129642
129008
|
return dirStat.isDirectory();
|
|
129643
129009
|
} catch (ignoreError) {
|
|
129644
129010
|
return false;
|
|
@@ -129649,27 +129015,27 @@ async function readFiles(filePaths) {
|
|
|
129649
129015
|
const result = [];
|
|
129650
129016
|
|
|
129651
129017
|
for (const filePath of filePaths) {
|
|
129652
|
-
result.push(await (
|
|
129018
|
+
result.push(await readFileAsync(filePath, "utf-8"));
|
|
129653
129019
|
}
|
|
129654
129020
|
|
|
129655
129021
|
return result;
|
|
129656
129022
|
}
|
|
129657
129023
|
|
|
129658
129024
|
async function extractReferences(formSugarDirectoryPath) {
|
|
129659
|
-
const indexContent = await (
|
|
129660
|
-
return (0,
|
|
129025
|
+
const indexContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8");
|
|
129026
|
+
return (0,_common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__.extractSugarReferences)(indexContent, filePath => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, filePath), "utf-8"));
|
|
129661
129027
|
}
|
|
129662
129028
|
|
|
129663
129029
|
async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
129664
|
-
if (!(await (0,
|
|
129030
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(directoryPath))) {
|
|
129665
129031
|
return [];
|
|
129666
129032
|
}
|
|
129667
129033
|
|
|
129668
|
-
const files = await (
|
|
129034
|
+
const files = await readdirAsync(directoryPath);
|
|
129669
129035
|
let filelist = _filelist || [];
|
|
129670
129036
|
|
|
129671
129037
|
for (const file of files) {
|
|
129672
|
-
if ((await (
|
|
129038
|
+
if ((await statAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file))).isDirectory()) {
|
|
129673
129039
|
filelist = await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file), filelist);
|
|
129674
129040
|
} else {
|
|
129675
129041
|
filelist.push(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file));
|
|
@@ -129680,7 +129046,7 @@ async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
|
129680
129046
|
}
|
|
129681
129047
|
|
|
129682
129048
|
async function checkFileExists(filePath) {
|
|
129683
|
-
if (!(await (0,
|
|
129049
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(filePath))) {
|
|
129684
129050
|
return [];
|
|
129685
129051
|
}
|
|
129686
129052
|
|
|
@@ -129693,7 +129059,7 @@ async function getAllDependencies(formSourcesPath, farmDirectory) {
|
|
|
129693
129059
|
|
|
129694
129060
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
129695
129061
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
129696
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
129062
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
129697
129063
|
}
|
|
129698
129064
|
|
|
129699
129065
|
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 checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "hooks.js"))), ...(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")))];
|
|
@@ -129706,23 +129072,23 @@ function normalizeLineEndings(content) {
|
|
|
129706
129072
|
async function getAllDependenciesHash(formSourcesPath, farmDirectory) {
|
|
129707
129073
|
const allDeps = await getAllDependencies(formSourcesPath, farmDirectory);
|
|
129708
129074
|
const hashes = await Promise.all(allDeps.map(async depFilePath => {
|
|
129709
|
-
if ([".js", ".
|
|
129710
|
-
let content = await (
|
|
129075
|
+
if ([".js", ".xml", ".xslt", ".json"].some(ext => depFilePath.endsWith(ext))) {
|
|
129076
|
+
let content = await readFileAsync(depFilePath, "utf-8");
|
|
129711
129077
|
content = normalizeLineEndings(content);
|
|
129712
|
-
return
|
|
129078
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(content);
|
|
129713
129079
|
}
|
|
129714
129080
|
|
|
129715
|
-
return
|
|
129081
|
+
return md5_file__WEBPACK_IMPORTED_MODULE_6___default()(depFilePath);
|
|
129716
129082
|
}));
|
|
129717
|
-
return
|
|
129083
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(hashes.join(""));
|
|
129718
129084
|
}
|
|
129719
129085
|
async function readSugarFiles(formSugarDirectoryPath, references) {
|
|
129720
129086
|
const result = {
|
|
129721
|
-
"./index": await (
|
|
129087
|
+
"./index": await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8")
|
|
129722
129088
|
};
|
|
129723
129089
|
|
|
129724
129090
|
for (const sugarPath of references.sugarFiles) {
|
|
129725
|
-
const sugarModuleContent = await (
|
|
129091
|
+
const sugarModuleContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, sugarPath + ".sugar.xml"), "utf-8");
|
|
129726
129092
|
result[sugarPath] = sugarModuleContent;
|
|
129727
129093
|
}
|
|
129728
129094
|
|
|
@@ -129734,11 +129100,11 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
129734
129100
|
return {};
|
|
129735
129101
|
}
|
|
129736
129102
|
|
|
129737
|
-
const fileNames = await
|
|
129103
|
+
const fileNames = await recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default()(formSugarDirectoryPath);
|
|
129738
129104
|
const result = {};
|
|
129739
129105
|
|
|
129740
129106
|
for (const fileName of fileNames) {
|
|
129741
|
-
const sugarModuleContent = await (
|
|
129107
|
+
const sugarModuleContent = await readFileAsync(fileName, "utf-8");
|
|
129742
129108
|
const relativeFileName = ("controls\\" + fileName.replace(formSugarDirectoryPath + "\\", "")).replace(/\\/g, "/");
|
|
129743
129109
|
result[relativeFileName] = sugarModuleContent;
|
|
129744
129110
|
}
|
|
@@ -129746,23 +129112,23 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
129746
129112
|
return result;
|
|
129747
129113
|
}
|
|
129748
129114
|
|
|
129749
|
-
async function
|
|
129750
|
-
|
|
129115
|
+
async function readAutoCalcFiles(formAutoCalcPath) {
|
|
129116
|
+
try {
|
|
129117
|
+
const files = await readdirAsync(formAutoCalcPath);
|
|
129118
|
+
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129119
|
+
return Promise.all(jsFiles.map(filename => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formAutoCalcPath, filename), "utf-8")));
|
|
129120
|
+
} catch (ignoreError) {
|
|
129751
129121
|
return [];
|
|
129752
129122
|
}
|
|
129753
|
-
|
|
129754
|
-
const files = await (0,fs_extra__WEBPACK_IMPORTED_MODULE_3__.readdir)(directoryPath);
|
|
129755
|
-
const jsFiles = files.filter(filename => fileNameTest.test(filename));
|
|
129756
|
-
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")));
|
|
129757
129123
|
}
|
|
129758
129124
|
|
|
129759
129125
|
async function readImportedFiles(rootPath) {
|
|
129760
129126
|
try {
|
|
129761
129127
|
const result = {};
|
|
129762
|
-
const files = await (
|
|
129128
|
+
const files = await readdirAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations"));
|
|
129763
129129
|
|
|
129764
129130
|
for (const fileName of files) {
|
|
129765
|
-
result["../validations/" + fileName] = await (
|
|
129131
|
+
result["../validations/" + fileName] = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations", fileName), "utf-8");
|
|
129766
129132
|
}
|
|
129767
129133
|
|
|
129768
129134
|
return result;
|
|
@@ -129773,11 +129139,11 @@ async function readImportedFiles(rootPath) {
|
|
|
129773
129139
|
|
|
129774
129140
|
async function readJavaScriptFilesWithNames(formJavaScriptFilesPath) {
|
|
129775
129141
|
try {
|
|
129776
|
-
const files = await (
|
|
129142
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
129777
129143
|
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129778
129144
|
return Promise.all(jsFiles.map(async filename => ({
|
|
129779
129145
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
129780
|
-
content: await (
|
|
129146
|
+
content: await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8")
|
|
129781
129147
|
})));
|
|
129782
129148
|
} catch (ignoreError) {
|
|
129783
129149
|
return [];
|
|
@@ -129788,7 +129154,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129788
129154
|
let jsFiles;
|
|
129789
129155
|
|
|
129790
129156
|
try {
|
|
129791
|
-
const files = await (
|
|
129157
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
129792
129158
|
jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
129793
129159
|
const result = [];
|
|
129794
129160
|
|
|
@@ -129796,7 +129162,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129796
129162
|
result.push({
|
|
129797
129163
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
129798
129164
|
// tslint:disable-next-line no-unsafe-any
|
|
129799
|
-
content: evalModule(await (
|
|
129165
|
+
content: evalModule(await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8"))
|
|
129800
129166
|
});
|
|
129801
129167
|
}
|
|
129802
129168
|
|
|
@@ -129807,16 +129173,16 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
129807
129173
|
}
|
|
129808
129174
|
|
|
129809
129175
|
function readSchemaRngFile(formSchemasPath, gfv) {
|
|
129810
|
-
return (
|
|
129176
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasPath, `${gfv}.rng.xml`), "utf-8");
|
|
129811
129177
|
}
|
|
129812
129178
|
|
|
129813
129179
|
function readHooksFile(formDirectoryPath) {
|
|
129814
|
-
return (
|
|
129180
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formDirectoryPath, "hooks.js"), "utf-8").catch(() => "");
|
|
129815
129181
|
}
|
|
129816
129182
|
|
|
129817
129183
|
async function readFileSource(filePath, filename, defaultValue) {
|
|
129818
129184
|
try {
|
|
129819
|
-
return await (
|
|
129185
|
+
return await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(filePath, filename), "utf-8");
|
|
129820
129186
|
} catch (ingoreError) {
|
|
129821
129187
|
return defaultValue;
|
|
129822
129188
|
}
|
|
@@ -130376,18 +129742,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
130376
129742
|
|
|
130377
129743
|
|
|
130378
129744
|
class NormalizationRulesGenerator {
|
|
130379
|
-
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng,
|
|
129745
|
+
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng, mathContainer, typesRegistry, useSchemaValidations, controlCustomizationContext) {
|
|
130380
129746
|
this.sugarRoot = void 0;
|
|
130381
129747
|
this.dataDeclarationHelper = void 0;
|
|
130382
129748
|
this.formSchemaRng = void 0;
|
|
130383
|
-
this.
|
|
129749
|
+
this.mathContainer = void 0;
|
|
130384
129750
|
this.typesRegistry = void 0;
|
|
130385
129751
|
this.controlCustomizationContext = void 0;
|
|
130386
129752
|
this.useSchemaValidations = void 0;
|
|
130387
129753
|
this.sugarRoot = sugarRoot;
|
|
130388
129754
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
130389
129755
|
this.formSchemaRng = formSchemaRng;
|
|
130390
|
-
this.
|
|
129756
|
+
this.mathContainer = mathContainer;
|
|
130391
129757
|
this.typesRegistry = typesRegistry;
|
|
130392
129758
|
this.useSchemaValidations = useSchemaValidations;
|
|
130393
129759
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -130417,7 +129783,9 @@ class NormalizationRulesGenerator {
|
|
|
130417
129783
|
}
|
|
130418
129784
|
|
|
130419
129785
|
*buildFormulaFLangRules() {
|
|
130420
|
-
for (const formula of this.formulas) {
|
|
129786
|
+
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 : []) {
|
|
129787
|
+
var _this$mathContainer$f, _this$mathContainer, _this$mathContainer$f2;
|
|
129788
|
+
|
|
130421
129789
|
yield* this.buildFormulaFlashRule(formula);
|
|
130422
129790
|
}
|
|
130423
129791
|
}
|
|
@@ -154202,19 +153570,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
154202
153570
|
|
|
154203
153571
|
|
|
154204
153572
|
class MarkupBuildingContext {
|
|
154205
|
-
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng,
|
|
153573
|
+
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
154206
153574
|
this.convertNode = void 0;
|
|
154207
153575
|
this.formSourcesPath = void 0;
|
|
154208
153576
|
this.helpers = void 0;
|
|
154209
153577
|
this.pathsContext = void 0;
|
|
154210
|
-
this.dataDeclarationHelper = void 0;
|
|
154211
153578
|
this.schemaRng = void 0;
|
|
154212
153579
|
this.useSchemaValidations = void 0;
|
|
154213
153580
|
this.typesRegistry = void 0;
|
|
154214
153581
|
this.uniqueControlIdIncrement = new Map();
|
|
154215
153582
|
this.controlCustomizationContext = void 0;
|
|
154216
153583
|
this.tourSteps = void 0;
|
|
154217
|
-
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
154218
153584
|
this.schemaRng = schemaRng;
|
|
154219
153585
|
this.useSchemaValidations = useSchemaValidations;
|
|
154220
153586
|
this.typesRegistry = typesRegistry;
|
|
@@ -154226,18 +153592,6 @@ class MarkupBuildingContext {
|
|
|
154226
153592
|
this.helpers = helpers;
|
|
154227
153593
|
}
|
|
154228
153594
|
|
|
154229
|
-
isNodeOptional(nodePath) {
|
|
154230
|
-
if (this.useSchemaValidations) {
|
|
154231
|
-
if (this.dataDeclarationHelper.isNodeOptional(nodePath) == false) {
|
|
154232
|
-
return this.schemaRng.getIsOptionalByPath(nodePath);
|
|
154233
|
-
} else {
|
|
154234
|
-
return true;
|
|
154235
|
-
}
|
|
154236
|
-
}
|
|
154237
|
-
|
|
154238
|
-
return this.dataDeclarationHelper.isNodeOptional(nodePath);
|
|
154239
|
-
}
|
|
154240
|
-
|
|
154241
153595
|
getUniqueControlId(context) {
|
|
154242
153596
|
let currentValue = this.uniqueControlIdIncrement.get(context);
|
|
154243
153597
|
|
|
@@ -154404,7 +153758,7 @@ class MarkupGenerator {
|
|
|
154404
153758
|
};
|
|
154405
153759
|
|
|
154406
153760
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
154407
|
-
this.markupBuilderContext = new _IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_5__.MarkupBuildingContext(this.convertNode, new _ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_7__.NodePathsContext(), formSourcesPath, helpers, tourSteps, this.controlCustomizationContext, typesRegistry, schemaRng,
|
|
153761
|
+
this.markupBuilderContext = new _IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_5__.MarkupBuildingContext(this.convertNode, new _ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_7__.NodePathsContext(), formSourcesPath, helpers, tourSteps, this.controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations);
|
|
154408
153762
|
}
|
|
154409
153763
|
|
|
154410
153764
|
generate(sugarRoot, builder) {
|