@kontur.candy/generator 4.244.0-nightly.6g814 → 4.244.3
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 +136 -983
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -122044,394 +122044,6 @@ class CompositionOperandContext extends antlr4ts_ParserRuleContext__WEBPACK_IMPO
|
|
|
122044
122044
|
|
|
122045
122045
|
/***/ }),
|
|
122046
122046
|
|
|
122047
|
-
/***/ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts":
|
|
122048
|
-
/*!*****************************************************************!*\
|
|
122049
|
-
!*** ./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts ***!
|
|
122050
|
-
\*****************************************************************/
|
|
122051
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
122052
|
-
|
|
122053
|
-
"use strict";
|
|
122054
|
-
__webpack_require__.r(__webpack_exports__);
|
|
122055
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122056
|
-
/* harmony export */ "traverseKCLangExpression": () => (/* binding */ traverseKCLangExpression),
|
|
122057
|
-
/* harmony export */ "DefaultKCLangExpressionVisitor": () => (/* binding */ DefaultKCLangExpressionVisitor)
|
|
122058
|
-
/* harmony export */ });
|
|
122059
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
122060
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
122061
|
-
(function () {
|
|
122062
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
122063
|
-
enterModule && enterModule(module);
|
|
122064
|
-
})();
|
|
122065
|
-
|
|
122066
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
122067
|
-
return a;
|
|
122068
|
-
};
|
|
122069
|
-
|
|
122070
|
-
|
|
122071
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
122072
|
-
function traverseKCLangExpression(node, visitor) {
|
|
122073
|
-
switch (node.type) {
|
|
122074
|
-
case "cast":
|
|
122075
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122076
|
-
visitor.visitCastExpressionKCLangNode(node);
|
|
122077
|
-
break;
|
|
122078
|
-
|
|
122079
|
-
case "oneof":
|
|
122080
|
-
traverseKCLangExpression(node.testExpression, visitor);
|
|
122081
|
-
visitor.visitOneOfExpressionKCLangNode(node);
|
|
122082
|
-
break;
|
|
122083
|
-
|
|
122084
|
-
case "abs":
|
|
122085
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122086
|
-
visitor.visitAbsKCLangNode(node);
|
|
122087
|
-
break;
|
|
122088
|
-
|
|
122089
|
-
case "xabs":
|
|
122090
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122091
|
-
visitor.visitXAbsKCLangNode(node);
|
|
122092
|
-
break;
|
|
122093
|
-
|
|
122094
|
-
case "exists":
|
|
122095
|
-
visitor.visitExistsKCLangNode(node);
|
|
122096
|
-
break;
|
|
122097
|
-
|
|
122098
|
-
case "length":
|
|
122099
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122100
|
-
visitor.visitLengthKCLangNode(node);
|
|
122101
|
-
break;
|
|
122102
|
-
|
|
122103
|
-
case "and":
|
|
122104
|
-
for (const expression of node.expressions) {
|
|
122105
|
-
traverseKCLangExpression(expression, visitor);
|
|
122106
|
-
}
|
|
122107
|
-
|
|
122108
|
-
visitor.visitAndKCLangNode(node);
|
|
122109
|
-
break;
|
|
122110
|
-
|
|
122111
|
-
case "sum":
|
|
122112
|
-
visitor.visitSumKCLangNode(node);
|
|
122113
|
-
break;
|
|
122114
|
-
|
|
122115
|
-
case "gt":
|
|
122116
|
-
case "ge":
|
|
122117
|
-
case "lt":
|
|
122118
|
-
case "le":
|
|
122119
|
-
case "eq":
|
|
122120
|
-
case "noteq":
|
|
122121
|
-
for (const expression of node.expressions) {
|
|
122122
|
-
traverseKCLangExpression(expression, visitor);
|
|
122123
|
-
}
|
|
122124
|
-
|
|
122125
|
-
visitor.visitComparisonKCLangNode(node);
|
|
122126
|
-
break;
|
|
122127
|
-
|
|
122128
|
-
case "division":
|
|
122129
|
-
case "multiply":
|
|
122130
|
-
for (const expression of node.expressions) {
|
|
122131
|
-
traverseKCLangExpression(expression, visitor);
|
|
122132
|
-
}
|
|
122133
|
-
|
|
122134
|
-
visitor.visitMultiplyKCLangNode(node);
|
|
122135
|
-
break;
|
|
122136
|
-
|
|
122137
|
-
case "minus":
|
|
122138
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122139
|
-
visitor.visitMinusKCLangNode(node);
|
|
122140
|
-
break;
|
|
122141
|
-
|
|
122142
|
-
case "not":
|
|
122143
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122144
|
-
visitor.visitNotKCLangNode(node);
|
|
122145
|
-
break;
|
|
122146
|
-
|
|
122147
|
-
case "round":
|
|
122148
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122149
|
-
visitor.visitRoundKCLangNode(node);
|
|
122150
|
-
break;
|
|
122151
|
-
|
|
122152
|
-
case "choose":
|
|
122153
|
-
traverseKCLangExpression(node.if, visitor);
|
|
122154
|
-
traverseKCLangExpression(node.else, visitor);
|
|
122155
|
-
traverseKCLangExpression(node.then, visitor);
|
|
122156
|
-
visitor.visitChooseKCLangNode(node);
|
|
122157
|
-
break;
|
|
122158
|
-
|
|
122159
|
-
case "const":
|
|
122160
|
-
visitor.visitConstKCLangNode(node);
|
|
122161
|
-
break;
|
|
122162
|
-
|
|
122163
|
-
case "argument":
|
|
122164
|
-
visitor.visitArgumentKCLangNode(node);
|
|
122165
|
-
break;
|
|
122166
|
-
|
|
122167
|
-
case "or":
|
|
122168
|
-
for (const expression of node.expressions) {
|
|
122169
|
-
traverseKCLangExpression(expression, visitor);
|
|
122170
|
-
}
|
|
122171
|
-
|
|
122172
|
-
visitor.visitOrKCLangNode(node);
|
|
122173
|
-
break;
|
|
122174
|
-
|
|
122175
|
-
case "multySum":
|
|
122176
|
-
visitor.visitMultySumKCLangNode(node);
|
|
122177
|
-
break;
|
|
122178
|
-
|
|
122179
|
-
case "substring":
|
|
122180
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122181
|
-
visitor.visitSubstringKCLangNode(node);
|
|
122182
|
-
break;
|
|
122183
|
-
|
|
122184
|
-
case "regexMatch":
|
|
122185
|
-
traverseKCLangExpression(node.expression, visitor);
|
|
122186
|
-
visitor.visitRegexMatchKCLangNode(node);
|
|
122187
|
-
break;
|
|
122188
|
-
|
|
122189
|
-
default:
|
|
122190
|
-
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
122191
|
-
break;
|
|
122192
|
-
}
|
|
122193
|
-
}
|
|
122194
|
-
class DefaultKCLangExpressionVisitor {
|
|
122195
|
-
visitAbsKCLangNode(node) {// default empty implementation
|
|
122196
|
-
}
|
|
122197
|
-
|
|
122198
|
-
visitAndKCLangNode(node) {// default empty implementation
|
|
122199
|
-
}
|
|
122200
|
-
|
|
122201
|
-
visitArgumentKCLangNode(node) {// default empty implementation
|
|
122202
|
-
}
|
|
122203
|
-
|
|
122204
|
-
visitCastExpressionKCLangNode(node) {// default empty implementation
|
|
122205
|
-
}
|
|
122206
|
-
|
|
122207
|
-
visitChooseKCLangNode(node) {// default empty implementation
|
|
122208
|
-
}
|
|
122209
|
-
|
|
122210
|
-
visitComparisonKCLangNode(node) {// default empty implementation
|
|
122211
|
-
}
|
|
122212
|
-
|
|
122213
|
-
visitConstKCLangNode(node) {// default empty implementation
|
|
122214
|
-
}
|
|
122215
|
-
|
|
122216
|
-
visitExistsKCLangNode(node) {// default empty implementation
|
|
122217
|
-
}
|
|
122218
|
-
|
|
122219
|
-
visitLengthKCLangNode(node) {// default empty implementation
|
|
122220
|
-
}
|
|
122221
|
-
|
|
122222
|
-
visitMinusKCLangNode(node) {// default empty implementation
|
|
122223
|
-
}
|
|
122224
|
-
|
|
122225
|
-
visitMultiplyKCLangNode(node) {// default empty implementation
|
|
122226
|
-
}
|
|
122227
|
-
|
|
122228
|
-
visitMultySumKCLangNode(node) {// default empty implementation
|
|
122229
|
-
}
|
|
122230
|
-
|
|
122231
|
-
visitNotKCLangNode(node) {// default empty implementation
|
|
122232
|
-
}
|
|
122233
|
-
|
|
122234
|
-
visitOneOfExpressionKCLangNode(node) {// default empty implementation
|
|
122235
|
-
}
|
|
122236
|
-
|
|
122237
|
-
visitOrKCLangNode(node) {// default empty implementation
|
|
122238
|
-
}
|
|
122239
|
-
|
|
122240
|
-
visitRegexMatchKCLangNode(node) {// default empty implementation
|
|
122241
|
-
}
|
|
122242
|
-
|
|
122243
|
-
visitRoundKCLangNode(node) {// default empty implementation
|
|
122244
|
-
}
|
|
122245
|
-
|
|
122246
|
-
visitSubstringKCLangNode(node) {// default empty implementation
|
|
122247
|
-
}
|
|
122248
|
-
|
|
122249
|
-
visitSumKCLangNode(node) {// default empty implementation
|
|
122250
|
-
}
|
|
122251
|
-
|
|
122252
|
-
visitXAbsKCLangNode(node) {// default empty implementation
|
|
122253
|
-
}
|
|
122254
|
-
|
|
122255
|
-
// @ts-ignore
|
|
122256
|
-
__reactstandin__regenerateByEval(key, code) {
|
|
122257
|
-
// @ts-ignore
|
|
122258
|
-
this[key] = eval(code);
|
|
122259
|
-
}
|
|
122260
|
-
|
|
122261
|
-
}
|
|
122262
|
-
;
|
|
122263
|
-
|
|
122264
|
-
(function () {
|
|
122265
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
122266
|
-
|
|
122267
|
-
if (!reactHotLoader) {
|
|
122268
|
-
return;
|
|
122269
|
-
}
|
|
122270
|
-
|
|
122271
|
-
reactHotLoader.register(traverseKCLangExpression, "traverseKCLangExpression", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\IKCLangExpressionVisitor.ts");
|
|
122272
|
-
reactHotLoader.register(DefaultKCLangExpressionVisitor, "DefaultKCLangExpressionVisitor", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\IKCLangExpressionVisitor.ts");
|
|
122273
|
-
})();
|
|
122274
|
-
|
|
122275
|
-
;
|
|
122276
|
-
|
|
122277
|
-
(function () {
|
|
122278
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
122279
|
-
leaveModule && leaveModule(module);
|
|
122280
|
-
})();
|
|
122281
|
-
|
|
122282
|
-
/***/ }),
|
|
122283
|
-
|
|
122284
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts":
|
|
122285
|
-
/*!*****************************************************************!*\
|
|
122286
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts ***!
|
|
122287
|
-
\*****************************************************************/
|
|
122288
|
-
/***/ ((module) => {
|
|
122289
|
-
|
|
122290
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
122291
|
-
return a;
|
|
122292
|
-
};
|
|
122293
|
-
|
|
122294
|
-
// this file was prevaled
|
|
122295
|
-
|
|
122296
|
-
/* eslint-disable */
|
|
122297
|
-
// @ts-ignore
|
|
122298
|
-
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})()";
|
|
122299
|
-
|
|
122300
|
-
/***/ }),
|
|
122301
|
-
|
|
122302
|
-
/***/ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts":
|
|
122303
|
-
/*!****************************************************************!*\
|
|
122304
|
-
!*** ./Generator/src/common/KCLang/KCLangDescriptionParser.ts ***!
|
|
122305
|
-
\****************************************************************/
|
|
122306
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
122307
|
-
|
|
122308
|
-
"use strict";
|
|
122309
|
-
__webpack_require__.r(__webpack_exports__);
|
|
122310
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122311
|
-
/* harmony export */ "KCLangDescriptionParser": () => (/* binding */ KCLangDescriptionParser)
|
|
122312
|
-
/* harmony export */ });
|
|
122313
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./KCLangDescriptionGrammar */ "./Generator/src/common/KCLang/KCLangDescriptionGrammar.ts");
|
|
122314
|
-
/* harmony import */ var _KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0__);
|
|
122315
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
122316
|
-
(function () {
|
|
122317
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
122318
|
-
enterModule && enterModule(module);
|
|
122319
|
-
})();
|
|
122320
|
-
|
|
122321
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
122322
|
-
return a;
|
|
122323
|
-
};
|
|
122324
|
-
|
|
122325
|
-
// @ts-ignore
|
|
122326
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
122327
|
-
|
|
122328
|
-
const evalParse = eval((_KCLangDescriptionGrammar__WEBPACK_IMPORTED_MODULE_0___default())).parse;
|
|
122329
|
-
class KCLangDescriptionParser {
|
|
122330
|
-
static getOrCreateParser() {
|
|
122331
|
-
return evalParse;
|
|
122332
|
-
}
|
|
122333
|
-
|
|
122334
|
-
static parse(code) {
|
|
122335
|
-
const parser = this.getOrCreateParser();
|
|
122336
|
-
return parser(code);
|
|
122337
|
-
}
|
|
122338
|
-
|
|
122339
|
-
}
|
|
122340
|
-
;
|
|
122341
|
-
|
|
122342
|
-
(function () {
|
|
122343
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
122344
|
-
|
|
122345
|
-
if (!reactHotLoader) {
|
|
122346
|
-
return;
|
|
122347
|
-
}
|
|
122348
|
-
|
|
122349
|
-
reactHotLoader.register(evalParse, "evalParse", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangDescriptionParser.ts");
|
|
122350
|
-
reactHotLoader.register(KCLangDescriptionParser, "KCLangDescriptionParser", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangDescriptionParser.ts");
|
|
122351
|
-
})();
|
|
122352
|
-
|
|
122353
|
-
;
|
|
122354
|
-
|
|
122355
|
-
(function () {
|
|
122356
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
122357
|
-
leaveModule && leaveModule(module);
|
|
122358
|
-
})();
|
|
122359
|
-
|
|
122360
|
-
/***/ }),
|
|
122361
|
-
|
|
122362
|
-
/***/ "./Generator/src/common/KCLang/KCLangNodes.ts":
|
|
122363
|
-
/*!****************************************************!*\
|
|
122364
|
-
!*** ./Generator/src/common/KCLang/KCLangNodes.ts ***!
|
|
122365
|
-
\****************************************************/
|
|
122366
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
122367
|
-
|
|
122368
|
-
"use strict";
|
|
122369
|
-
__webpack_require__.r(__webpack_exports__);
|
|
122370
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122371
|
-
/* harmony export */ "isFormulaStatement": () => (/* binding */ isFormulaStatement),
|
|
122372
|
-
/* harmony export */ "isBlockStatement": () => (/* binding */ isBlockStatement),
|
|
122373
|
-
/* harmony export */ "isEnsureStatement": () => (/* binding */ isEnsureStatement),
|
|
122374
|
-
/* harmony export */ "isConditionalStatement": () => (/* binding */ isConditionalStatement),
|
|
122375
|
-
/* harmony export */ "isDescribeStatement": () => (/* binding */ isDescribeStatement),
|
|
122376
|
-
/* harmony export */ "andKCLangNode": () => (/* binding */ andKCLangNode)
|
|
122377
|
-
/* harmony export */ });
|
|
122378
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
122379
|
-
(function () {
|
|
122380
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
122381
|
-
enterModule && enterModule(module);
|
|
122382
|
-
})();
|
|
122383
|
-
|
|
122384
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
122385
|
-
return a;
|
|
122386
|
-
};
|
|
122387
|
-
|
|
122388
|
-
function isFormulaStatement(node) {
|
|
122389
|
-
return node.type === "formula";
|
|
122390
|
-
}
|
|
122391
|
-
function isBlockStatement(node) {
|
|
122392
|
-
return node.type === "block";
|
|
122393
|
-
}
|
|
122394
|
-
function isEnsureStatement(node) {
|
|
122395
|
-
return node.type === "ensure";
|
|
122396
|
-
}
|
|
122397
|
-
function isConditionalStatement(node) {
|
|
122398
|
-
return node.type === "if";
|
|
122399
|
-
}
|
|
122400
|
-
function isDescribeStatement(node) {
|
|
122401
|
-
return node.type === "describe";
|
|
122402
|
-
}
|
|
122403
|
-
function andKCLangNode(...expressions) {
|
|
122404
|
-
return {
|
|
122405
|
-
type: "and",
|
|
122406
|
-
expressions: expressions
|
|
122407
|
-
};
|
|
122408
|
-
}
|
|
122409
|
-
;
|
|
122410
|
-
|
|
122411
|
-
(function () {
|
|
122412
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
122413
|
-
|
|
122414
|
-
if (!reactHotLoader) {
|
|
122415
|
-
return;
|
|
122416
|
-
}
|
|
122417
|
-
|
|
122418
|
-
reactHotLoader.register(isFormulaStatement, "isFormulaStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122419
|
-
reactHotLoader.register(isBlockStatement, "isBlockStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122420
|
-
reactHotLoader.register(isEnsureStatement, "isEnsureStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122421
|
-
reactHotLoader.register(isConditionalStatement, "isConditionalStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122422
|
-
reactHotLoader.register(isDescribeStatement, "isDescribeStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122423
|
-
reactHotLoader.register(andKCLangNode, "andKCLangNode", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangNodes.ts");
|
|
122424
|
-
})();
|
|
122425
|
-
|
|
122426
|
-
;
|
|
122427
|
-
|
|
122428
|
-
(function () {
|
|
122429
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
122430
|
-
leaveModule && leaveModule(module);
|
|
122431
|
-
})();
|
|
122432
|
-
|
|
122433
|
-
/***/ }),
|
|
122434
|
-
|
|
122435
122047
|
/***/ "./Generator/src/common/KCLang/KCLangToJsTranspiler.ts":
|
|
122436
122048
|
/*!*************************************************************!*\
|
|
122437
122049
|
!*** ./Generator/src/common/KCLang/KCLangToJsTranspiler.ts ***!
|
|
@@ -122760,421 +122372,6 @@ class KCLangToJsTranspiler {
|
|
|
122760
122372
|
|
|
122761
122373
|
/***/ }),
|
|
122762
122374
|
|
|
122763
|
-
/***/ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts":
|
|
122764
|
-
/*!**************************************************************!*\
|
|
122765
|
-
!*** ./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts ***!
|
|
122766
|
-
\**************************************************************/
|
|
122767
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
122768
|
-
|
|
122769
|
-
"use strict";
|
|
122770
|
-
__webpack_require__.r(__webpack_exports__);
|
|
122771
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122772
|
-
/* harmony export */ "KCLangToXmlTranspiler": () => (/* binding */ KCLangToXmlTranspiler),
|
|
122773
|
-
/* harmony export */ "kclang": () => (/* binding */ kclang)
|
|
122774
|
-
/* harmony export */ });
|
|
122775
|
-
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
122776
|
-
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
122777
|
-
/* harmony import */ var _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./IKCLangExpressionVisitor */ "./Generator/src/common/KCLang/IKCLangExpressionVisitor.ts");
|
|
122778
|
-
/* harmony import */ var _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./KCLangDescriptionParser */ "./Generator/src/common/KCLang/KCLangDescriptionParser.ts");
|
|
122779
|
-
/* harmony import */ var _KCLangNodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./KCLangNodes */ "./Generator/src/common/KCLang/KCLangNodes.ts");
|
|
122780
|
-
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils */ "./Generator/src/common/KCLang/Utils.ts");
|
|
122781
|
-
/* harmony import */ var _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Antlr/KCLangAntlrParser */ "./Generator/src/common/KCLang/Antlr/KCLangAntlrParser.ts");
|
|
122782
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
122783
|
-
(function () {
|
|
122784
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
122785
|
-
enterModule && enterModule(module);
|
|
122786
|
-
})();
|
|
122787
|
-
|
|
122788
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
122789
|
-
return a;
|
|
122790
|
-
};
|
|
122791
|
-
|
|
122792
|
-
|
|
122793
|
-
|
|
122794
|
-
|
|
122795
|
-
|
|
122796
|
-
|
|
122797
|
-
|
|
122798
|
-
// tslint:disable-next-line:cyclomatic-complexity
|
|
122799
|
-
|
|
122800
|
-
function generateKCXmlExpression(expression) {
|
|
122801
|
-
switch (expression.type) {
|
|
122802
|
-
case "abs":
|
|
122803
|
-
case "xabs":
|
|
122804
|
-
case "length":
|
|
122805
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
122806
|
-
|
|
122807
|
-
case "exists":
|
|
122808
|
-
case "multySum":
|
|
122809
|
-
return `<m:${expression.type} select="${expression.select}" />`;
|
|
122810
|
-
|
|
122811
|
-
case "cast":
|
|
122812
|
-
if (expression.expression.type === "argument") {
|
|
122813
|
-
return `<m:argument select="${expression.expression.select}" type="${expression.targetType}" />`;
|
|
122814
|
-
}
|
|
122815
|
-
|
|
122816
|
-
throw new Error("Cast supports only for argument");
|
|
122817
|
-
|
|
122818
|
-
case "and":
|
|
122819
|
-
case "or":
|
|
122820
|
-
return [`<m:${expression.type}>`, ...expression.expressions.map(generateKCXmlExpression).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
122821
|
-
|
|
122822
|
-
case "sum":
|
|
122823
|
-
return [`<m:sum>`, ...expression.operands.map(operand => {
|
|
122824
|
-
if (operand.operator === "+") {
|
|
122825
|
-
return generateKCXmlExpression(operand.expression);
|
|
122826
|
-
}
|
|
122827
|
-
|
|
122828
|
-
return [`<m:minus>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(operand.expression), 1), `</m:minus>`].join("\n");
|
|
122829
|
-
}).map(x => (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(x, 1)), `</m:sum>`].join("\n");
|
|
122830
|
-
|
|
122831
|
-
case "gt":
|
|
122832
|
-
case "ge":
|
|
122833
|
-
case "lt":
|
|
122834
|
-
case "le":
|
|
122835
|
-
case "eq":
|
|
122836
|
-
case "multiply":
|
|
122837
|
-
case "division":
|
|
122838
|
-
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");
|
|
122839
|
-
|
|
122840
|
-
case "noteq":
|
|
122841
|
-
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");
|
|
122842
|
-
|
|
122843
|
-
case "minus":
|
|
122844
|
-
case "not":
|
|
122845
|
-
return [`<m:${expression.type}>`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
122846
|
-
break;
|
|
122847
|
-
break;
|
|
122848
|
-
|
|
122849
|
-
case "round":
|
|
122850
|
-
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");
|
|
122851
|
-
|
|
122852
|
-
case "substring":
|
|
122853
|
-
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");
|
|
122854
|
-
|
|
122855
|
-
case "regexMatch":
|
|
122856
|
-
return [`<m:regexMatch pattern="${expression.pattern}">`, (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:regexMatch>`].join("\n");
|
|
122857
|
-
|
|
122858
|
-
case "choose":
|
|
122859
|
-
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");
|
|
122860
|
-
break;
|
|
122861
|
-
|
|
122862
|
-
case "const":
|
|
122863
|
-
if (expression.value.type === "decimal") {
|
|
122864
|
-
return `<m:const value="${expression.value.value}" type="decimal" />`;
|
|
122865
|
-
}
|
|
122866
|
-
|
|
122867
|
-
if (expression.value.type === "string") {
|
|
122868
|
-
return `<m:const value="${expression.value.value}" type="string" />`;
|
|
122869
|
-
}
|
|
122870
|
-
|
|
122871
|
-
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_0__.NotImplementedError();
|
|
122872
|
-
|
|
122873
|
-
case "argument":
|
|
122874
|
-
return `<m:argument select="${expression.select}" />`;
|
|
122875
|
-
|
|
122876
|
-
case "oneof":
|
|
122877
|
-
{
|
|
122878
|
-
const testExpr = generateKCXmlExpression(expression.testExpression);
|
|
122879
|
-
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");
|
|
122880
|
-
}
|
|
122881
|
-
|
|
122882
|
-
default:
|
|
122883
|
-
// @ts-ignore
|
|
122884
|
-
throw new Error(`Expression of type '${expression.type}' is not supported`);
|
|
122885
|
-
}
|
|
122886
|
-
}
|
|
122887
|
-
|
|
122888
|
-
function formatDescribeStatement(ast, matchPath, describe) {
|
|
122889
|
-
return _KCLangDescriptionParser__WEBPACK_IMPORTED_MODULE_3__.KCLangDescriptionParser.parse(describe.text).map(item => {
|
|
122890
|
-
if (typeof item === "string") {
|
|
122891
|
-
return item;
|
|
122892
|
-
} else {
|
|
122893
|
-
return `{{link ref=${item.src}}}${item.text.join(" ")}{{/link}}`;
|
|
122894
|
-
}
|
|
122895
|
-
}).join(" ");
|
|
122896
|
-
}
|
|
122897
|
-
|
|
122898
|
-
function generateKCXmlFormula(ast, matchPath, describe) {
|
|
122899
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
122900
|
-
return `<m:formula match="${matchPath}" target="${ast.target}"${descriptionAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:formula>`;
|
|
122901
|
-
}
|
|
122902
|
-
|
|
122903
|
-
function removeTrailingSlash(inputStr) {
|
|
122904
|
-
if (inputStr.endsWith("/")) {
|
|
122905
|
-
return inputStr.substring(0, inputStr.length - 1);
|
|
122906
|
-
}
|
|
122907
|
-
|
|
122908
|
-
return inputStr;
|
|
122909
|
-
}
|
|
122910
|
-
|
|
122911
|
-
function joinPaths(paths) {
|
|
122912
|
-
return paths.map(removeTrailingSlash).join("/");
|
|
122913
|
-
}
|
|
122914
|
-
|
|
122915
|
-
function generateBlockKCXmlFormulas(block, parents) {
|
|
122916
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
122917
|
-
const result = [];
|
|
122918
|
-
let lastDescribeStatement;
|
|
122919
|
-
|
|
122920
|
-
for (const statement of block.statements) {
|
|
122921
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
122922
|
-
result.push(generateKCXmlFormula(statement, matchPath, lastDescribeStatement));
|
|
122923
|
-
lastDescribeStatement = undefined;
|
|
122924
|
-
}
|
|
122925
|
-
|
|
122926
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
122927
|
-
lastDescribeStatement = undefined;
|
|
122928
|
-
}
|
|
122929
|
-
|
|
122930
|
-
if (lastDescribeStatement != undefined) {
|
|
122931
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
122932
|
-
}
|
|
122933
|
-
|
|
122934
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
122935
|
-
lastDescribeStatement = statement;
|
|
122936
|
-
}
|
|
122937
|
-
|
|
122938
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
122939
|
-
result.push(generateBlockKCXmlFormulas(statement, [...(parents !== null && parents !== void 0 ? parents : []), block]));
|
|
122940
|
-
}
|
|
122941
|
-
}
|
|
122942
|
-
|
|
122943
|
-
return result.join("\n");
|
|
122944
|
-
}
|
|
122945
|
-
|
|
122946
|
-
function guessConditionTarget(condition) {
|
|
122947
|
-
let result;
|
|
122948
|
-
|
|
122949
|
-
class GuessConditionTargetVisitor extends _IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.DefaultKCLangExpressionVisitor {
|
|
122950
|
-
visitExistsKCLangNode(node) {
|
|
122951
|
-
if (result == undefined) {
|
|
122952
|
-
result = node.select;
|
|
122953
|
-
}
|
|
122954
|
-
}
|
|
122955
|
-
|
|
122956
|
-
visitArgumentKCLangNode(node) {
|
|
122957
|
-
if (result == undefined) {
|
|
122958
|
-
result = node.select;
|
|
122959
|
-
}
|
|
122960
|
-
}
|
|
122961
|
-
|
|
122962
|
-
// @ts-ignore
|
|
122963
|
-
__reactstandin__regenerateByEval(key, code) {
|
|
122964
|
-
// @ts-ignore
|
|
122965
|
-
this[key] = eval(code);
|
|
122966
|
-
}
|
|
122967
|
-
|
|
122968
|
-
}
|
|
122969
|
-
|
|
122970
|
-
(0,_IKCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_2__.traverseKCLangExpression)(condition.expression, new GuessConditionTargetVisitor());
|
|
122971
|
-
return result;
|
|
122972
|
-
}
|
|
122973
|
-
|
|
122974
|
-
function generateKCXmlCondition(ast, matchPath, parentConditions, describe) {
|
|
122975
|
-
const levelAttr = ast.level === "error" ? ` errorLevel="Error"` : "";
|
|
122976
|
-
const descriptionAttr = describe != undefined ? ` description="${formatDescribeStatement(ast, matchPath, describe)}"` : "";
|
|
122977
|
-
const guessedTarget = guessConditionTarget(ast);
|
|
122978
|
-
const targetAttr = guessedTarget != undefined ? ` target="${guessedTarget}"` : "";
|
|
122979
|
-
|
|
122980
|
-
if (parentConditions != undefined && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.arrayIsNotEmpty)(parentConditions)) {
|
|
122981
|
-
var _parentConditions$map;
|
|
122982
|
-
|
|
122983
|
-
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 : []));
|
|
122984
|
-
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>`;
|
|
122985
|
-
}
|
|
122986
|
-
|
|
122987
|
-
return `<m:condition match="${matchPath}"${descriptionAttr}${levelAttr}${targetAttr}>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(generateKCXmlExpression(ast.expression), 1) + "\n" + `</m:condition>`;
|
|
122988
|
-
}
|
|
122989
|
-
|
|
122990
|
-
function generateBlockKCXmlConditions(block, parents, parentConditions) {
|
|
122991
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path), block.path]);
|
|
122992
|
-
const result = [];
|
|
122993
|
-
let lastDescribeStatement;
|
|
122994
|
-
|
|
122995
|
-
for (const statement of block.statements) {
|
|
122996
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isFormulaStatement)(statement)) {
|
|
122997
|
-
lastDescribeStatement = undefined;
|
|
122998
|
-
}
|
|
122999
|
-
|
|
123000
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(statement)) {
|
|
123001
|
-
result.push(generateKCXmlCondition(statement, matchPath, parentConditions, lastDescribeStatement));
|
|
123002
|
-
lastDescribeStatement = undefined;
|
|
123003
|
-
}
|
|
123004
|
-
|
|
123005
|
-
if (lastDescribeStatement != undefined) {
|
|
123006
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
123007
|
-
}
|
|
123008
|
-
|
|
123009
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(statement)) {
|
|
123010
|
-
lastDescribeStatement = statement;
|
|
123011
|
-
}
|
|
123012
|
-
|
|
123013
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(statement)) {
|
|
123014
|
-
result.push(generateConditionalConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
123015
|
-
}
|
|
123016
|
-
|
|
123017
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(statement)) {
|
|
123018
|
-
result.push(generateBlockKCXmlConditions(statement, [...(parents !== null && parents !== void 0 ? parents : []), block], parentConditions));
|
|
123019
|
-
}
|
|
123020
|
-
}
|
|
123021
|
-
|
|
123022
|
-
return result.join("\n");
|
|
123023
|
-
}
|
|
123024
|
-
|
|
123025
|
-
function generateConditionalConditions(conditionalStatement, parents, parentConditions) {
|
|
123026
|
-
const matchPath = joinPaths([...(parents !== null && parents !== void 0 ? parents : []).map(x => x.path)]);
|
|
123027
|
-
const result = [];
|
|
123028
|
-
let lastDescribeStatement;
|
|
123029
|
-
|
|
123030
|
-
for (const x of conditionalStatement.statements) {
|
|
123031
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isEnsureStatement)(x)) {
|
|
123032
|
-
result.push(generateKCXmlCondition(x, matchPath, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement], lastDescribeStatement));
|
|
123033
|
-
lastDescribeStatement = undefined;
|
|
123034
|
-
}
|
|
123035
|
-
|
|
123036
|
-
if (lastDescribeStatement != undefined) {
|
|
123037
|
-
throw new Error("Describe should be placed before assign of ensure statements");
|
|
123038
|
-
}
|
|
123039
|
-
|
|
123040
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isDescribeStatement)(x)) {
|
|
123041
|
-
lastDescribeStatement = x;
|
|
123042
|
-
}
|
|
123043
|
-
|
|
123044
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isConditionalStatement)(x)) {
|
|
123045
|
-
result.push(generateConditionalConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
123046
|
-
}
|
|
123047
|
-
|
|
123048
|
-
if ((0,_KCLangNodes__WEBPACK_IMPORTED_MODULE_4__.isBlockStatement)(x)) {
|
|
123049
|
-
result.push(generateBlockKCXmlConditions(x, parents, [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), conditionalStatement]));
|
|
123050
|
-
}
|
|
123051
|
-
}
|
|
123052
|
-
|
|
123053
|
-
return result.join("\n");
|
|
123054
|
-
}
|
|
123055
|
-
|
|
123056
|
-
function generateKCXmlFormulas(blocks) {
|
|
123057
|
-
const formulas = Iterator.from(blocks).map(generateBlockKCXmlFormulas).toArray();
|
|
123058
|
-
|
|
123059
|
-
if (formulas.filter(x => x !== "").length > 0) {
|
|
123060
|
-
return `<m:formulas>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(formulas.join("\n"), 1) + "\n" + `</m:formulas>\n`;
|
|
123061
|
-
} else {
|
|
123062
|
-
return "";
|
|
123063
|
-
}
|
|
123064
|
-
}
|
|
123065
|
-
|
|
123066
|
-
function generateKCXmlConditions(blocks) {
|
|
123067
|
-
const conditions = Iterator.from(blocks).map(generateBlockKCXmlConditions).toArray();
|
|
123068
|
-
|
|
123069
|
-
if (conditions.filter(x => x !== "").length > 0) {
|
|
123070
|
-
return `<m:conditions>\n` + (0,_Utils__WEBPACK_IMPORTED_MODULE_5__.indent)(conditions.join("\n"), 1) + "\n" + `</m:conditions>\n`;
|
|
123071
|
-
} else {
|
|
123072
|
-
return "";
|
|
123073
|
-
}
|
|
123074
|
-
}
|
|
123075
|
-
|
|
123076
|
-
function generateKCXml(blocks) {
|
|
123077
|
-
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>`;
|
|
123078
|
-
}
|
|
123079
|
-
|
|
123080
|
-
class KCLangToXmlTranspiler {
|
|
123081
|
-
static transpile(kcLang, customParser) {
|
|
123082
|
-
const parser = customParser !== null && customParser !== void 0 ? customParser : _Antlr_KCLangAntlrParser__WEBPACK_IMPORTED_MODULE_6__.KCLangAntlrParser.parse;
|
|
123083
|
-
const kcxml = generateKCXml(parser(kcLang).blocks);
|
|
123084
|
-
return kcxml;
|
|
123085
|
-
}
|
|
123086
|
-
|
|
123087
|
-
}
|
|
123088
|
-
function kclang(str) {
|
|
123089
|
-
return KCLangToXmlTranspiler.transpile(str.join(""));
|
|
123090
|
-
}
|
|
123091
|
-
;
|
|
123092
|
-
|
|
123093
|
-
(function () {
|
|
123094
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
123095
|
-
|
|
123096
|
-
if (!reactHotLoader) {
|
|
123097
|
-
return;
|
|
123098
|
-
}
|
|
123099
|
-
|
|
123100
|
-
reactHotLoader.register(generateKCXmlExpression, "generateKCXmlExpression", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123101
|
-
reactHotLoader.register(formatDescribeStatement, "formatDescribeStatement", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123102
|
-
reactHotLoader.register(generateKCXmlFormula, "generateKCXmlFormula", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123103
|
-
reactHotLoader.register(removeTrailingSlash, "removeTrailingSlash", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123104
|
-
reactHotLoader.register(joinPaths, "joinPaths", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123105
|
-
reactHotLoader.register(generateBlockKCXmlFormulas, "generateBlockKCXmlFormulas", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123106
|
-
reactHotLoader.register(guessConditionTarget, "guessConditionTarget", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123107
|
-
reactHotLoader.register(generateKCXmlCondition, "generateKCXmlCondition", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123108
|
-
reactHotLoader.register(generateBlockKCXmlConditions, "generateBlockKCXmlConditions", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123109
|
-
reactHotLoader.register(generateConditionalConditions, "generateConditionalConditions", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123110
|
-
reactHotLoader.register(generateKCXmlFormulas, "generateKCXmlFormulas", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123111
|
-
reactHotLoader.register(generateKCXmlConditions, "generateKCXmlConditions", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123112
|
-
reactHotLoader.register(generateKCXml, "generateKCXml", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123113
|
-
reactHotLoader.register(KCLangToXmlTranspiler, "KCLangToXmlTranspiler", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123114
|
-
reactHotLoader.register(kclang, "kclang", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\KCLangToXmlTranspiler.ts");
|
|
123115
|
-
})();
|
|
123116
|
-
|
|
123117
|
-
;
|
|
123118
|
-
|
|
123119
|
-
(function () {
|
|
123120
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
123121
|
-
leaveModule && leaveModule(module);
|
|
123122
|
-
})();
|
|
123123
|
-
|
|
123124
|
-
/***/ }),
|
|
123125
|
-
|
|
123126
|
-
/***/ "./Generator/src/common/KCLang/Utils.ts":
|
|
123127
|
-
/*!**********************************************!*\
|
|
123128
|
-
!*** ./Generator/src/common/KCLang/Utils.ts ***!
|
|
123129
|
-
\**********************************************/
|
|
123130
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
123131
|
-
|
|
123132
|
-
"use strict";
|
|
123133
|
-
__webpack_require__.r(__webpack_exports__);
|
|
123134
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
123135
|
-
/* harmony export */ "indent": () => (/* binding */ indent)
|
|
123136
|
-
/* harmony export */ });
|
|
123137
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
123138
|
-
(function () {
|
|
123139
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
123140
|
-
enterModule && enterModule(module);
|
|
123141
|
-
})();
|
|
123142
|
-
|
|
123143
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
123144
|
-
return a;
|
|
123145
|
-
};
|
|
123146
|
-
|
|
123147
|
-
function indent(str, count) {
|
|
123148
|
-
const indentStr = new Array(count * 2).fill(" ").join("");
|
|
123149
|
-
return str.split("\n").map(x => {
|
|
123150
|
-
if (x === "") {
|
|
123151
|
-
return x;
|
|
123152
|
-
}
|
|
123153
|
-
|
|
123154
|
-
return indentStr + x;
|
|
123155
|
-
}).join("\n");
|
|
123156
|
-
}
|
|
123157
|
-
;
|
|
123158
|
-
|
|
123159
|
-
(function () {
|
|
123160
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
123161
|
-
|
|
123162
|
-
if (!reactHotLoader) {
|
|
123163
|
-
return;
|
|
123164
|
-
}
|
|
123165
|
-
|
|
123166
|
-
reactHotLoader.register(indent, "indent", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\common\\KCLang\\Utils.ts");
|
|
123167
|
-
})();
|
|
123168
|
-
|
|
123169
|
-
;
|
|
123170
|
-
|
|
123171
|
-
(function () {
|
|
123172
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
123173
|
-
leaveModule && leaveModule(module);
|
|
123174
|
-
})();
|
|
123175
|
-
|
|
123176
|
-
/***/ }),
|
|
123177
|
-
|
|
123178
122375
|
/***/ "./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts":
|
|
123179
122376
|
/*!*********************************************************************************!*\
|
|
123180
122377
|
!*** ./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts ***!
|
|
@@ -124689,7 +123886,9 @@ class ApplyTemplatesNodeVisitor {
|
|
|
124689
123886
|
value: value
|
|
124690
123887
|
});
|
|
124691
123888
|
} else if (parameterInfo.type === _SugarTemplateInfo__WEBPACK_IMPORTED_MODULE_4__.SugarTemplateParameterType.Sugar) {
|
|
124692
|
-
|
|
123889
|
+
var _this$extractSugarMar;
|
|
123890
|
+
|
|
123891
|
+
const value = (_this$extractSugarMar = this.extractSugarMarkupValue(node, parameterInfo.name)) !== null && _this$extractSugarMar !== void 0 ? _this$extractSugarMar : this.extractStringValue(node, parameterInfo.name);
|
|
124693
123892
|
result.push({
|
|
124694
123893
|
parameterInfo: parameterInfo,
|
|
124695
123894
|
value: value
|
|
@@ -130223,7 +129422,8 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
130223
129422
|
|
|
130224
129423
|
|
|
130225
129424
|
class FormulasAutoCalculationsGenerator {
|
|
130226
|
-
generate(
|
|
129425
|
+
generate(formulaContainer, schemaRng, dataDeclarationHelper) {
|
|
129426
|
+
const formulas = formulaContainer.formulas == undefined || formulaContainer.formulas.items == undefined ? [] : formulaContainer.formulas.items;
|
|
130227
129427
|
const formulaAutoCalculations = formulas.map(formula => this.buildFormulaAutoCalculation(formula, schemaRng, dataDeclarationHelper)).flat();
|
|
130228
129428
|
return this.mergeFormulaAutoCalculations(formulaAutoCalculations);
|
|
130229
129429
|
}
|
|
@@ -131233,8 +130433,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
131233
130433
|
/* harmony export */ });
|
|
131234
130434
|
/* harmony import */ var _common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../common/XmlParser/XmlParser */ "./Generator/src/common/XmlParser/XmlParser.ts");
|
|
131235
130435
|
/* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
131236
|
-
/* harmony import */ var
|
|
131237
|
-
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
130436
|
+
/* harmony import */ var _Formula__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
131238
130437
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
131239
130438
|
(function () {
|
|
131240
130439
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
@@ -131248,68 +130447,31 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
131248
130447
|
|
|
131249
130448
|
|
|
131250
130449
|
|
|
131251
|
-
|
|
131252
130450
|
class FormulaReader {
|
|
131253
|
-
readFormulas(
|
|
130451
|
+
readFormulas(kcxmlSource) {
|
|
131254
130452
|
const serializer = this.createFormulaSerializer();
|
|
131255
|
-
const result =
|
|
131256
|
-
|
|
131257
|
-
for (const kcxmlSource of kcxmlSources) {
|
|
131258
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
131259
|
-
|
|
131260
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
131261
|
-
var _rootNode$formulas$it, _rootNode$formulas;
|
|
130453
|
+
const result = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
131262
130454
|
|
|
131263
|
-
|
|
131264
|
-
|
|
131265
|
-
}
|
|
131266
|
-
|
|
131267
|
-
for (const kclangSource of kclangSources) {
|
|
131268
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
131269
|
-
|
|
131270
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
131271
|
-
var _rootNode$formulas$it2, _rootNode$formulas2;
|
|
131272
|
-
|
|
131273
|
-
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 : []));
|
|
131274
|
-
}
|
|
130455
|
+
if (result instanceof _Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent) {
|
|
130456
|
+
return this.createEmptyMathContainer();
|
|
131275
130457
|
}
|
|
131276
130458
|
|
|
131277
130459
|
return result;
|
|
131278
130460
|
}
|
|
131279
130461
|
|
|
131280
|
-
|
|
131281
|
-
const
|
|
131282
|
-
|
|
131283
|
-
|
|
131284
|
-
|
|
131285
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(kcxmlSource));
|
|
131286
|
-
|
|
131287
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
131288
|
-
var _rootNode$conditions$, _rootNode$conditions;
|
|
131289
|
-
|
|
131290
|
-
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$ : []));
|
|
131291
|
-
}
|
|
131292
|
-
}
|
|
131293
|
-
|
|
131294
|
-
for (const kclangSource of kclangSources) {
|
|
131295
|
-
const rootNode = serializer.deserializeFromSugarXmlNode((0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_0__.parseXml)(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_2__.KCLangToXmlTranspiler.transpile(kclangSource)));
|
|
131296
|
-
|
|
131297
|
-
if (rootNode instanceof _Formula__WEBPACK_IMPORTED_MODULE_3__.MathContainer) {
|
|
131298
|
-
var _rootNode$conditions$2, _rootNode$conditions2;
|
|
131299
|
-
|
|
131300
|
-
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 : []));
|
|
131301
|
-
}
|
|
131302
|
-
}
|
|
131303
|
-
|
|
131304
|
-
return result;
|
|
130462
|
+
createEmptyMathContainer() {
|
|
130463
|
+
const mathContainer = new _Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer();
|
|
130464
|
+
mathContainer.formulas = new _Formula__WEBPACK_IMPORTED_MODULE_2__.Formulas();
|
|
130465
|
+
mathContainer.formulas.items = [];
|
|
130466
|
+
return mathContainer;
|
|
131305
130467
|
}
|
|
131306
130468
|
|
|
131307
130469
|
createFormulaSerializer() {
|
|
131308
130470
|
const result = new _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.SugarSerializer();
|
|
131309
|
-
result.registerNode(
|
|
131310
|
-
result.registerNode(
|
|
130471
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.DummyContent);
|
|
130472
|
+
result.registerNode(_Formula__WEBPACK_IMPORTED_MODULE_2__.MathContainer);
|
|
131311
130473
|
|
|
131312
|
-
for (const formulaExpression of
|
|
130474
|
+
for (const formulaExpression of _Formula__WEBPACK_IMPORTED_MODULE_2__.formulaExpressions) {
|
|
131313
130475
|
result.registerNode(formulaExpression);
|
|
131314
130476
|
}
|
|
131315
130477
|
|
|
@@ -131757,7 +130919,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
131757
130919
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
131758
130920
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
131759
130921
|
/* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/ElementProcessors/FormParts/Page/PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
|
|
131760
|
-
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
131761
130922
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
131762
130923
|
(function () {
|
|
131763
130924
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
@@ -131777,7 +130938,6 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
131777
130938
|
|
|
131778
130939
|
|
|
131779
130940
|
|
|
131780
|
-
|
|
131781
130941
|
var RequisiteSectionMode;
|
|
131782
130942
|
|
|
131783
130943
|
(function (RequisiteSectionMode) {
|
|
@@ -131788,10 +130948,8 @@ var RequisiteSectionMode;
|
|
|
131788
130948
|
|
|
131789
130949
|
const emptyDataDeclarationCollection = {};
|
|
131790
130950
|
class DataDeclarationGenerationContext {
|
|
131791
|
-
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
130951
|
+
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
131792
130952
|
this.initSequenceFactory = void 0;
|
|
131793
|
-
this.formSchemaRng = void 0;
|
|
131794
|
-
this.schemeValidations = void 0;
|
|
131795
130953
|
this.controlCustomizationContext = void 0;
|
|
131796
130954
|
this.typesRegistry = void 0;
|
|
131797
130955
|
|
|
@@ -131821,29 +130979,11 @@ class DataDeclarationGenerationContext {
|
|
|
131821
130979
|
return undefined;
|
|
131822
130980
|
};
|
|
131823
130981
|
|
|
131824
|
-
this.formSchemaRng = formSchemaRng;
|
|
131825
|
-
this.schemeValidations = schemeValidations;
|
|
131826
130982
|
this.initSequenceFactory = initSequenceFactory;
|
|
131827
130983
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
131828
130984
|
this.typesRegistry = typesRegistry;
|
|
131829
130985
|
}
|
|
131830
130986
|
|
|
131831
|
-
isMultipleNodeOptionalFromScheme(path) {
|
|
131832
|
-
if (!this.schemeValidations) {
|
|
131833
|
-
return undefined;
|
|
131834
|
-
}
|
|
131835
|
-
|
|
131836
|
-
const schemaNode = this.formSchemaRng.getElementByPath(path);
|
|
131837
|
-
|
|
131838
|
-
if (schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__.FormSchemaRngElement) {
|
|
131839
|
-
var _schemaNode$optional;
|
|
131840
|
-
|
|
131841
|
-
return (_schemaNode$optional = schemaNode.optional) !== null && _schemaNode$optional !== void 0 ? _schemaNode$optional : false;
|
|
131842
|
-
}
|
|
131843
|
-
|
|
131844
|
-
return undefined;
|
|
131845
|
-
}
|
|
131846
|
-
|
|
131847
130987
|
getTypeNode(node) {
|
|
131848
130988
|
if (node.anonymousType != undefined) {
|
|
131849
130989
|
return node.anonymousType;
|
|
@@ -132221,15 +131361,11 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
132221
131361
|
|
|
132222
131362
|
|
|
132223
131363
|
class DataDeclarationGenerator {
|
|
132224
|
-
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
131364
|
+
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
132225
131365
|
this.sugarRoot = void 0;
|
|
132226
131366
|
this.initSequenceFactory = void 0;
|
|
132227
|
-
this.formSchemaRng = void 0;
|
|
132228
|
-
this.schemeValidations = void 0;
|
|
132229
131367
|
this.controlCustomizationContext = void 0;
|
|
132230
131368
|
this.typesRegistry = void 0;
|
|
132231
|
-
this.formSchemaRng = formSchemaRng;
|
|
132232
|
-
this.schemeValidations = schemeValidations;
|
|
132233
131369
|
this.sugarRoot = sugarRoot;
|
|
132234
131370
|
this.initSequenceFactory = initSequenceFactory;
|
|
132235
131371
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -132241,7 +131377,7 @@ class DataDeclarationGenerator {
|
|
|
132241
131377
|
|
|
132242
131378
|
const converterClass = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
132243
131379
|
const converter = new converterClass(this.sugarRoot);
|
|
132244
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
131380
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
132245
131381
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
132246
131382
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
132247
131383
|
const result = this.replaceHolder(`
|
|
@@ -132275,7 +131411,7 @@ class DataDeclarationGenerator {
|
|
|
132275
131411
|
|
|
132276
131412
|
const converterClass = (_getConverterByNodeCl2 = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl2 !== void 0 ? _getConverterByNodeCl2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
132277
131413
|
const converter = new converterClass(this.sugarRoot);
|
|
132278
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
131414
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
132279
131415
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
132280
131416
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
132281
131417
|
return `
|
|
@@ -133535,9 +132671,11 @@ class KCXmlValidationGenerator {
|
|
|
133535
132671
|
const conditionReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_2__.FormulaReader();
|
|
133536
132672
|
|
|
133537
132673
|
for (const file of importedKcXmlValidations) {
|
|
133538
|
-
const
|
|
132674
|
+
const math = conditionReader.readFormulas(file);
|
|
132675
|
+
|
|
132676
|
+
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 : []) {
|
|
132677
|
+
var _math$conditions$item, _math$conditions;
|
|
133539
132678
|
|
|
133540
|
-
for (const condition of conditions) {
|
|
133541
132679
|
compiledConditions.push(this.compileCondition(condition));
|
|
133542
132680
|
}
|
|
133543
132681
|
}
|
|
@@ -133752,12 +132890,12 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
133752
132890
|
|
|
133753
132891
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
133754
132892
|
try {
|
|
133755
|
-
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$
|
|
132893
|
+
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$deepOption, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
|
|
133756
132894
|
|
|
133757
132895
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
133758
132896
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
133759
132897
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_13__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_10__.FormNode);
|
|
133760
|
-
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent
|
|
132898
|
+
const formulas = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_16__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
|
|
133761
132899
|
const schemaRng = (0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__.parseXml)(additionalContent.schemaRngContent);
|
|
133762
132900
|
const formSchemaRng = _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.FormSchemaRng.createFromSchemaRng(additionalContent.schemaRngContent);
|
|
133763
132901
|
const typeRegistry = (0,_validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_14__.buildTypesRegistry)(sugarRoot);
|
|
@@ -133767,17 +132905,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
133767
132905
|
const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions); // tslint:disable-next-line no-unsafe-any
|
|
133768
132906
|
|
|
133769
132907
|
const additionalSettings = JSON.parse(additionalContent.additionalSettings || "{}");
|
|
133770
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry
|
|
132908
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry);
|
|
133771
132909
|
const {
|
|
133772
132910
|
dataDeclarationContent,
|
|
133773
132911
|
dataDeclaration
|
|
133774
132912
|
} = dataDeclarationGenerator.generate();
|
|
133775
132913
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
133776
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$
|
|
133777
|
-
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$
|
|
132914
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, (_sugarRoot$deepOption = sugarRoot.deepOptionalSchemaValidations) !== null && _sugarRoot$deepOption !== void 0 ? _sugarRoot$deepOption : false, additionalContent.validationsContent);
|
|
132915
|
+
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, controlCustomizationContext);
|
|
133778
132916
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
133779
132917
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
133780
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$
|
|
132918
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
133781
132919
|
markupGenerator.generate(sugarRoot, builder);
|
|
133782
132920
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
|
|
133783
132921
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -133910,17 +133048,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133910
133048
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
133911
133049
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ "path");
|
|
133912
133050
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
133913
|
-
/* harmony import */ var
|
|
133914
|
-
/* harmony import */ var
|
|
133915
|
-
/* harmony import */ var
|
|
133916
|
-
/* harmony import */ var
|
|
133917
|
-
/* harmony import */ var
|
|
133918
|
-
/* harmony import */ var
|
|
133919
|
-
/* harmony import */ var
|
|
133920
|
-
/* harmony import */ var
|
|
133921
|
-
/* harmony import */ var
|
|
133922
|
-
/* harmony import */ var
|
|
133923
|
-
/* harmony import */ var
|
|
133051
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! util */ "util");
|
|
133052
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
|
|
133053
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js");
|
|
133054
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_3__);
|
|
133055
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js");
|
|
133056
|
+
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_4__);
|
|
133057
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
|
133058
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_5__);
|
|
133059
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! md5-file */ "./node_modules/md5-file/index.js");
|
|
133060
|
+
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(md5_file__WEBPACK_IMPORTED_MODULE_6__);
|
|
133061
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! recursive-readdir */ "./node_modules/recursive-readdir/index.js");
|
|
133062
|
+
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(recursive_readdir__WEBPACK_IMPORTED_MODULE_7__);
|
|
133063
|
+
/* harmony import */ var _common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/ExtractSugarReferences */ "./Generator/src/common/ExtractSugarReferences.ts");
|
|
133924
133064
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
133925
133065
|
(function () {
|
|
133926
133066
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
@@ -133939,6 +133079,10 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
133939
133079
|
|
|
133940
133080
|
|
|
133941
133081
|
|
|
133082
|
+
|
|
133083
|
+
const statAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.stat);
|
|
133084
|
+
const readFileAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readFile);
|
|
133085
|
+
const readdirAsync = (0,util__WEBPACK_IMPORTED_MODULE_2__.promisify)(fs__WEBPACK_IMPORTED_MODULE_0__.readdir);
|
|
133942
133086
|
async function readFormSources(formSourcesPath, farmDirectory) {
|
|
133943
133087
|
var _JSON$parse$settings;
|
|
133944
133088
|
|
|
@@ -133950,9 +133094,9 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
133950
133094
|
|
|
133951
133095
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
133952
133096
|
// eslint-disable-next-line no-console
|
|
133953
|
-
console.warn(
|
|
133097
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_3___default().yellow(`[WARN] Форма не содержит ссылок на fetch-функции. Будут автоматически подключены функции из каталога legacyfetchfuctions\n` + `[WARN] В будущем необходимо явно прописывать ссылки на используемые fetch-функции`));
|
|
133954
133098
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
133955
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
133099
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
133956
133100
|
}
|
|
133957
133101
|
|
|
133958
133102
|
const result = {
|
|
@@ -133962,12 +133106,11 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
133962
133106
|
formSourcesPath: formSourcesPath,
|
|
133963
133107
|
formJsonSettings: (_JSON$parse$settings = JSON.parse(await readFileSource(formSourcesPath, "form.json", "{}"))["settings"]) !== null && _JSON$parse$settings !== void 0 ? _JSON$parse$settings : {},
|
|
133964
133108
|
additionalSettings: await readFileSource(formSourcesPath, "settings.json", "{}"),
|
|
133965
|
-
autocalcsContent: await
|
|
133109
|
+
autocalcsContent: await readAutoCalcFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc")),
|
|
133966
133110
|
helpersContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers")),
|
|
133967
133111
|
validationsContent: await readJavaScriptFilesWithNames(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations")),
|
|
133968
133112
|
schemaRngContent: await readSchemaRngFile(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"), formName),
|
|
133969
|
-
kcJsXmlContent: await
|
|
133970
|
-
kclangAutocaclulationsContent: await readFilesFromDir(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), /\.kclang$/),
|
|
133113
|
+
kcJsXmlContent: (await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"), `${formName}.КС.candy.js.xml`, "<dummy/>")) || "",
|
|
133971
133114
|
tourSteps: await readFileSource(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "tour"), "tour.js", "{}"),
|
|
133972
133115
|
hooksContent: await readHooksFile(formSourcesPath),
|
|
133973
133116
|
customControlsContent: await readCustomControlsFiles(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls")),
|
|
@@ -134011,7 +133154,7 @@ function evalModule(moduleCode) {
|
|
|
134011
133154
|
|
|
134012
133155
|
async function isDirectoryExists(directoryPath) {
|
|
134013
133156
|
try {
|
|
134014
|
-
const dirStat = await (
|
|
133157
|
+
const dirStat = await statAsync(directoryPath);
|
|
134015
133158
|
return dirStat.isDirectory();
|
|
134016
133159
|
} catch (ignoreError) {
|
|
134017
133160
|
return false;
|
|
@@ -134022,27 +133165,27 @@ async function readFiles(filePaths) {
|
|
|
134022
133165
|
const result = [];
|
|
134023
133166
|
|
|
134024
133167
|
for (const filePath of filePaths) {
|
|
134025
|
-
result.push(await (
|
|
133168
|
+
result.push(await readFileAsync(filePath, "utf-8"));
|
|
134026
133169
|
}
|
|
134027
133170
|
|
|
134028
133171
|
return result;
|
|
134029
133172
|
}
|
|
134030
133173
|
|
|
134031
133174
|
async function extractReferences(formSugarDirectoryPath) {
|
|
134032
|
-
const indexContent = await (
|
|
134033
|
-
return (0,
|
|
133175
|
+
const indexContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8");
|
|
133176
|
+
return (0,_common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__.extractSugarReferences)(indexContent, filePath => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, filePath), "utf-8"));
|
|
134034
133177
|
}
|
|
134035
133178
|
|
|
134036
133179
|
async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
134037
|
-
if (!(await (0,
|
|
133180
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(directoryPath))) {
|
|
134038
133181
|
return [];
|
|
134039
133182
|
}
|
|
134040
133183
|
|
|
134041
|
-
const files = await (
|
|
133184
|
+
const files = await readdirAsync(directoryPath);
|
|
134042
133185
|
let filelist = _filelist || [];
|
|
134043
133186
|
|
|
134044
133187
|
for (const file of files) {
|
|
134045
|
-
if ((await (
|
|
133188
|
+
if ((await statAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file))).isDirectory()) {
|
|
134046
133189
|
filelist = await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file), filelist);
|
|
134047
133190
|
} else {
|
|
134048
133191
|
filelist.push(path__WEBPACK_IMPORTED_MODULE_1___default().join(directoryPath, file));
|
|
@@ -134053,7 +133196,7 @@ async function getAllFilePathsInDirectory(directoryPath, _filelist) {
|
|
|
134053
133196
|
}
|
|
134054
133197
|
|
|
134055
133198
|
async function checkFileExists(filePath) {
|
|
134056
|
-
if (!(await (0,
|
|
133199
|
+
if (!(await (0,fs_extra__WEBPACK_IMPORTED_MODULE_4__.pathExists)(filePath))) {
|
|
134057
133200
|
return [];
|
|
134058
133201
|
}
|
|
134059
133202
|
|
|
@@ -134066,7 +133209,7 @@ async function getAllDependencies(formSourcesPath, farmDirectory) {
|
|
|
134066
133209
|
|
|
134067
133210
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
134068
133211
|
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
134069
|
-
sugarReferences.fetchFunctionFiles = (await (
|
|
133212
|
+
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
134070
133213
|
}
|
|
134071
133214
|
|
|
134072
133215
|
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")))];
|
|
@@ -134079,23 +133222,23 @@ function normalizeLineEndings(content) {
|
|
|
134079
133222
|
async function getAllDependenciesHash(formSourcesPath, farmDirectory) {
|
|
134080
133223
|
const allDeps = await getAllDependencies(formSourcesPath, farmDirectory);
|
|
134081
133224
|
const hashes = await Promise.all(allDeps.map(async depFilePath => {
|
|
134082
|
-
if ([".js", ".
|
|
134083
|
-
let content = await (
|
|
133225
|
+
if ([".js", ".xml", ".xslt", ".json"].some(ext => depFilePath.endsWith(ext))) {
|
|
133226
|
+
let content = await readFileAsync(depFilePath, "utf-8");
|
|
134084
133227
|
content = normalizeLineEndings(content);
|
|
134085
|
-
return
|
|
133228
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(content);
|
|
134086
133229
|
}
|
|
134087
133230
|
|
|
134088
|
-
return
|
|
133231
|
+
return md5_file__WEBPACK_IMPORTED_MODULE_6___default()(depFilePath);
|
|
134089
133232
|
}));
|
|
134090
|
-
return
|
|
133233
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(hashes.join(""));
|
|
134091
133234
|
}
|
|
134092
133235
|
async function readSugarFiles(formSugarDirectoryPath, references) {
|
|
134093
133236
|
const result = {
|
|
134094
|
-
"./index": await (
|
|
133237
|
+
"./index": await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), "utf-8")
|
|
134095
133238
|
};
|
|
134096
133239
|
|
|
134097
133240
|
for (const sugarPath of references.sugarFiles) {
|
|
134098
|
-
const sugarModuleContent = await (
|
|
133241
|
+
const sugarModuleContent = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, sugarPath + ".sugar.xml"), "utf-8");
|
|
134099
133242
|
result[sugarPath] = sugarModuleContent;
|
|
134100
133243
|
}
|
|
134101
133244
|
|
|
@@ -134107,11 +133250,11 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
134107
133250
|
return {};
|
|
134108
133251
|
}
|
|
134109
133252
|
|
|
134110
|
-
const fileNames = await
|
|
133253
|
+
const fileNames = await recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default()(formSugarDirectoryPath);
|
|
134111
133254
|
const result = {};
|
|
134112
133255
|
|
|
134113
133256
|
for (const fileName of fileNames) {
|
|
134114
|
-
const sugarModuleContent = await (
|
|
133257
|
+
const sugarModuleContent = await readFileAsync(fileName, "utf-8");
|
|
134115
133258
|
const relativeFileName = ("controls\\" + fileName.replace(formSugarDirectoryPath + "\\", "")).replace(/\\/g, "/");
|
|
134116
133259
|
result[relativeFileName] = sugarModuleContent;
|
|
134117
133260
|
}
|
|
@@ -134119,23 +133262,23 @@ async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
|
134119
133262
|
return result;
|
|
134120
133263
|
}
|
|
134121
133264
|
|
|
134122
|
-
async function
|
|
134123
|
-
|
|
133265
|
+
async function readAutoCalcFiles(formAutoCalcPath) {
|
|
133266
|
+
try {
|
|
133267
|
+
const files = await readdirAsync(formAutoCalcPath);
|
|
133268
|
+
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
133269
|
+
return Promise.all(jsFiles.map(filename => readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formAutoCalcPath, filename), "utf-8")));
|
|
133270
|
+
} catch (ignoreError) {
|
|
134124
133271
|
return [];
|
|
134125
133272
|
}
|
|
134126
|
-
|
|
134127
|
-
const files = await (0,fs_extra__WEBPACK_IMPORTED_MODULE_3__.readdir)(directoryPath);
|
|
134128
|
-
const jsFiles = files.filter(filename => fileNameTest.test(filename));
|
|
134129
|
-
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")));
|
|
134130
133273
|
}
|
|
134131
133274
|
|
|
134132
133275
|
async function readImportedFiles(rootPath) {
|
|
134133
133276
|
try {
|
|
134134
133277
|
const result = {};
|
|
134135
|
-
const files = await (
|
|
133278
|
+
const files = await readdirAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations"));
|
|
134136
133279
|
|
|
134137
133280
|
for (const fileName of files) {
|
|
134138
|
-
result["../validations/" + fileName] = await (
|
|
133281
|
+
result["../validations/" + fileName] = await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(rootPath, "validations", fileName), "utf-8");
|
|
134139
133282
|
}
|
|
134140
133283
|
|
|
134141
133284
|
return result;
|
|
@@ -134146,11 +133289,11 @@ async function readImportedFiles(rootPath) {
|
|
|
134146
133289
|
|
|
134147
133290
|
async function readJavaScriptFilesWithNames(formJavaScriptFilesPath) {
|
|
134148
133291
|
try {
|
|
134149
|
-
const files = await (
|
|
133292
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
134150
133293
|
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
134151
133294
|
return Promise.all(jsFiles.map(async filename => ({
|
|
134152
133295
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
134153
|
-
content: await (
|
|
133296
|
+
content: await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8")
|
|
134154
133297
|
})));
|
|
134155
133298
|
} catch (ignoreError) {
|
|
134156
133299
|
return [];
|
|
@@ -134161,7 +133304,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
134161
133304
|
let jsFiles;
|
|
134162
133305
|
|
|
134163
133306
|
try {
|
|
134164
|
-
const files = await (
|
|
133307
|
+
const files = await readdirAsync(formJavaScriptFilesPath);
|
|
134165
133308
|
jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
134166
133309
|
const result = [];
|
|
134167
133310
|
|
|
@@ -134169,7 +133312,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
134169
133312
|
result.push({
|
|
134170
133313
|
filename: path__WEBPACK_IMPORTED_MODULE_1___default().parse(filename).name,
|
|
134171
133314
|
// tslint:disable-next-line no-unsafe-any
|
|
134172
|
-
content: evalModule(await (
|
|
133315
|
+
content: evalModule(await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formJavaScriptFilesPath, filename), "utf-8"))
|
|
134173
133316
|
});
|
|
134174
133317
|
}
|
|
134175
133318
|
|
|
@@ -134180,16 +133323,16 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
134180
133323
|
}
|
|
134181
133324
|
|
|
134182
133325
|
function readSchemaRngFile(formSchemasPath, gfv) {
|
|
134183
|
-
return (
|
|
133326
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasPath, `${gfv}.rng.xml`), "utf-8");
|
|
134184
133327
|
}
|
|
134185
133328
|
|
|
134186
133329
|
function readHooksFile(formDirectoryPath) {
|
|
134187
|
-
return (
|
|
133330
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formDirectoryPath, "hooks.js"), "utf-8").catch(() => "");
|
|
134188
133331
|
}
|
|
134189
133332
|
|
|
134190
133333
|
async function readFileSource(filePath, filename, defaultValue) {
|
|
134191
133334
|
try {
|
|
134192
|
-
return await (
|
|
133335
|
+
return await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(filePath, filename), "utf-8");
|
|
134193
133336
|
} catch (ingoreError) {
|
|
134194
133337
|
return defaultValue;
|
|
134195
133338
|
}
|
|
@@ -134204,6 +133347,9 @@ async function readFileSource(filePath, filename, defaultValue) {
|
|
|
134204
133347
|
return;
|
|
134205
133348
|
}
|
|
134206
133349
|
|
|
133350
|
+
reactHotLoader.register(statAsync, "statAsync", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
133351
|
+
reactHotLoader.register(readFileAsync, "readFileAsync", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
133352
|
+
reactHotLoader.register(readdirAsync, "readdirAsync", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134207
133353
|
reactHotLoader.register(readFormSources, "readFormSources", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134208
133354
|
reactHotLoader.register(evalModule, "evalModule", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134209
133355
|
reactHotLoader.register(isDirectoryExists, "isDirectoryExists", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
@@ -134216,7 +133362,7 @@ async function readFileSource(filePath, filename, defaultValue) {
|
|
|
134216
133362
|
reactHotLoader.register(getAllDependenciesHash, "getAllDependenciesHash", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134217
133363
|
reactHotLoader.register(readSugarFiles, "readSugarFiles", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134218
133364
|
reactHotLoader.register(readCustomControlsFiles, "readCustomControlsFiles", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134219
|
-
reactHotLoader.register(
|
|
133365
|
+
reactHotLoader.register(readAutoCalcFiles, "readAutoCalcFiles", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134220
133366
|
reactHotLoader.register(readImportedFiles, "readImportedFiles", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134221
133367
|
reactHotLoader.register(readJavaScriptFilesWithNames, "readJavaScriptFilesWithNames", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
134222
133368
|
reactHotLoader.register(connectJSFilesWithNames, "connectJSFilesWithNames", "C:\\buildAgent\\work\\8df8f1edd755969c\\Generator\\src\\generators\\ReadFormSources.ts");
|
|
@@ -135043,18 +134189,18 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
135043
134189
|
|
|
135044
134190
|
|
|
135045
134191
|
class NormalizationRulesGenerator {
|
|
135046
|
-
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng,
|
|
134192
|
+
constructor(sugarRoot, dataDeclarationHelper, formSchemaRng, mathContainer, typesRegistry, useSchemaValidations, controlCustomizationContext) {
|
|
135047
134193
|
this.sugarRoot = void 0;
|
|
135048
134194
|
this.dataDeclarationHelper = void 0;
|
|
135049
134195
|
this.formSchemaRng = void 0;
|
|
135050
|
-
this.
|
|
134196
|
+
this.mathContainer = void 0;
|
|
135051
134197
|
this.typesRegistry = void 0;
|
|
135052
134198
|
this.controlCustomizationContext = void 0;
|
|
135053
134199
|
this.useSchemaValidations = void 0;
|
|
135054
134200
|
this.sugarRoot = sugarRoot;
|
|
135055
134201
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
135056
134202
|
this.formSchemaRng = formSchemaRng;
|
|
135057
|
-
this.
|
|
134203
|
+
this.mathContainer = mathContainer;
|
|
135058
134204
|
this.typesRegistry = typesRegistry;
|
|
135059
134205
|
this.useSchemaValidations = useSchemaValidations;
|
|
135060
134206
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -135084,7 +134230,9 @@ class NormalizationRulesGenerator {
|
|
|
135084
134230
|
}
|
|
135085
134231
|
|
|
135086
134232
|
*buildFormulaFLangRules() {
|
|
135087
|
-
for (const formula of this.formulas) {
|
|
134233
|
+
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 : []) {
|
|
134234
|
+
var _this$mathContainer$f, _this$mathContainer, _this$mathContainer$f2;
|
|
134235
|
+
|
|
135088
134236
|
yield* this.buildFormulaFlashRule(formula);
|
|
135089
134237
|
}
|
|
135090
134238
|
}
|
|
@@ -143567,7 +142715,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
143567
142715
|
type: "Expression",
|
|
143568
142716
|
expression: validationGenerator.generateValidationsFactory()
|
|
143569
142717
|
});
|
|
143570
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry
|
|
142718
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry);
|
|
143571
142719
|
userPicklistDeclarationBuilder.prop(x => x.editorDataDeclaration).set({
|
|
143572
142720
|
type: "Expression",
|
|
143573
142721
|
expression: dataDeclarationGenerator.generateDataDeclarationFactory()
|
|
@@ -150527,10 +149675,10 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
150527
149675
|
}
|
|
150528
149676
|
|
|
150529
149677
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.MultilineNode) {
|
|
150530
|
-
var
|
|
149678
|
+
var _rowNode$optional2;
|
|
150531
149679
|
|
|
150532
149680
|
this.ensurePathExists(rowNode, rowNode.dataScope.path);
|
|
150533
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
149681
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
150534
149682
|
optional: rowNode.optional
|
|
150535
149683
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
|
|
150536
149684
|
if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.CrossfitTableRowNode) {
|
|
@@ -152938,10 +152086,10 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
152938
152086
|
}
|
|
152939
152087
|
|
|
152940
152088
|
doBuildDataDeclaration(context) {
|
|
152941
|
-
var
|
|
152089
|
+
var _node$optional;
|
|
152942
152090
|
|
|
152943
152091
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
152944
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
152092
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
152945
152093
|
optional: node.optional
|
|
152946
152094
|
}), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
152947
152095
|
}
|
|
@@ -153171,10 +152319,10 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
153171
152319
|
}
|
|
153172
152320
|
|
|
153173
152321
|
doBuildDataDeclaration(context) {
|
|
153174
|
-
var
|
|
152322
|
+
var _node$optional;
|
|
153175
152323
|
|
|
153176
152324
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
153177
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
152325
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
153178
152326
|
optional: node.optional
|
|
153179
152327
|
}), context.addPathSectionDeclarationEntry(node));
|
|
153180
152328
|
}
|
|
@@ -154669,9 +153817,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
154669
153817
|
|
|
154670
153818
|
processMultilineNode(context, rowNode) {
|
|
154671
153819
|
if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.StickyTableMultilineNode) {
|
|
154672
|
-
var
|
|
153820
|
+
var _rowNode$optional;
|
|
154673
153821
|
|
|
154674
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
153822
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
154675
153823
|
optional: rowNode.optional
|
|
154676
153824
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
|
|
154677
153825
|
}
|
|
@@ -154744,11 +153892,11 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
154744
153892
|
const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
|
|
154745
153893
|
|
|
154746
153894
|
if (this.isSimpleForm()) {
|
|
154747
|
-
var
|
|
153895
|
+
var _ref, _node$deprecatedDiado;
|
|
154748
153896
|
|
|
154749
153897
|
mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
|
|
154750
153898
|
mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
|
|
154751
|
-
const width = (
|
|
153899
|
+
const width = (_ref = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref !== void 0 ? _ref : maxWidthSimpleForm;
|
|
154752
153900
|
mb.prop(x => x.width).set(width);
|
|
154753
153901
|
mb.prop(x => x.footerHeight).set(160);
|
|
154754
153902
|
} else {
|
|
@@ -155031,10 +154179,10 @@ BindingPath: ${errorPath}`));
|
|
|
155031
154179
|
if (this.isSimpleForm()) {
|
|
155032
154180
|
mb.prop(x => x.buttonType).set(undefined);
|
|
155033
154181
|
} else {
|
|
155034
|
-
var _multiline$rowmenu,
|
|
154182
|
+
var _multiline$rowmenu, _ref2, _tableNode$removeButt;
|
|
155035
154183
|
|
|
155036
154184
|
const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
|
|
155037
|
-
const removebutton = (
|
|
154185
|
+
const removebutton = (_ref2 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref2 !== void 0 ? _ref2 : true;
|
|
155038
154186
|
mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
|
|
155039
154187
|
}
|
|
155040
154188
|
|
|
@@ -155047,7 +154195,7 @@ BindingPath: ${errorPath}`));
|
|
|
155047
154195
|
}
|
|
155048
154196
|
|
|
155049
154197
|
getMultiline(context, node, multiline, start, end = Infinity) {
|
|
155050
|
-
var
|
|
154198
|
+
var _ref3, _node$removeButton, _multiline$rowmenu2, _ref4, _node$removeButton2, _context$popPathsCont2;
|
|
155051
154199
|
|
|
155052
154200
|
const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
|
|
155053
154201
|
const mb = overrideInfo == undefined ? (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("MultiLine") : (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)(overrideInfo.dependencies, overrideInfo.controlName);
|
|
@@ -155060,7 +154208,7 @@ BindingPath: ${errorPath}`));
|
|
|
155060
154208
|
mb.prop(x => x.isList).set(multiline.usepager === false ? true : undefined);
|
|
155061
154209
|
mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_13__.getNewBindingPathExpression)(multiline));
|
|
155062
154210
|
mb.prop(x => x.showRowBorder).set(multiline.showRowBorder);
|
|
155063
|
-
const hasRemoveButton = ((
|
|
154211
|
+
const hasRemoveButton = ((_ref3 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
|
|
155064
154212
|
const needAddButton = multiline.addbutton !== "false";
|
|
155065
154213
|
|
|
155066
154214
|
if (this.isSimpleForm()) {
|
|
@@ -155073,7 +154221,7 @@ BindingPath: ${errorPath}`));
|
|
|
155073
154221
|
mb.prop(x => x.removeButtonPosition).set(undefined);
|
|
155074
154222
|
}
|
|
155075
154223
|
|
|
155076
|
-
mb.prop(x => x.disableScroll).set(needAddButton || ((
|
|
154224
|
+
mb.prop(x => x.disableScroll).set(needAddButton || ((_ref4 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) ? undefined : true);
|
|
155077
154225
|
context.pushPathsContext();
|
|
155078
154226
|
|
|
155079
154227
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
|
|
@@ -155099,9 +154247,9 @@ BindingPath: ${errorPath}`));
|
|
|
155099
154247
|
hasActionButton(node) {
|
|
155100
154248
|
const multilines = node.rows.map(child => (0,_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)(child) ? child : child.columns.find(_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined);
|
|
155101
154249
|
return multilines.some(multiline => {
|
|
155102
|
-
var
|
|
154250
|
+
var _ref5, _node$removeButton3;
|
|
155103
154251
|
|
|
155104
|
-
return ((
|
|
154252
|
+
return ((_ref5 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) || multiline.rowmenu;
|
|
155105
154253
|
});
|
|
155106
154254
|
}
|
|
155107
154255
|
|
|
@@ -155415,10 +154563,10 @@ class Table2MultirowConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
155415
154563
|
}
|
|
155416
154564
|
|
|
155417
154565
|
doBuildDataDeclaration(context) {
|
|
155418
|
-
var
|
|
154566
|
+
var _node$optional;
|
|
155419
154567
|
|
|
155420
154568
|
const node = this.getCurrentNodeAs(_Table2Node__WEBPACK_IMPORTED_MODULE_3__.Table2MultirowNode);
|
|
155421
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
154569
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
155422
154570
|
}
|
|
155423
154571
|
|
|
155424
154572
|
buildChildrenDataDeclaration(context) {
|
|
@@ -156578,10 +155726,10 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
156578
155726
|
}
|
|
156579
155727
|
|
|
156580
155728
|
doBuildDataDeclaration(context) {
|
|
156581
|
-
var
|
|
155729
|
+
var _node$optional;
|
|
156582
155730
|
|
|
156583
155731
|
const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
|
|
156584
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
155732
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
156585
155733
|
}
|
|
156586
155734
|
|
|
156587
155735
|
buildChildrenDataDeclaration(context) {
|
|
@@ -160328,6 +159476,7 @@ class FiasFnsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
160328
159476
|
markupBuilder.prop(x => x.withSteads).set(node.withSteads);
|
|
160329
159477
|
}
|
|
160330
159478
|
|
|
159479
|
+
markupBuilder.prop(x => x.allAbbreviationsType).set(node.allAbbreviationsType || "long");
|
|
160331
159480
|
return markupBuilder.buildConverterResult();
|
|
160332
159481
|
}
|
|
160333
159482
|
|
|
@@ -160373,7 +159522,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
160373
159522
|
/* harmony import */ var _CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../CommonNodeProperties/DataBindingMixinNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/DataBindingMixinNode.ts");
|
|
160374
159523
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
160375
159524
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
160376
|
-
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
159525
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
160377
159526
|
|
|
160378
159527
|
(function () {
|
|
160379
159528
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
@@ -160392,13 +159541,15 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
160392
159541
|
|
|
160393
159542
|
|
|
160394
159543
|
|
|
160395
|
-
let FiasFnsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.sugarNode)("fiasfns", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FiasFns sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attr)("withSteads", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attrType.boolean, "Земельные участки для формы"), _dec(_class = (_class2 = class FiasFnsNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.SugarNodeBase {
|
|
159544
|
+
let FiasFnsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.sugarNode)("fiasfns", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FiasFns sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attr)("withSteads", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attrType.boolean, "Земельные участки для формы"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attr)("allAbbreviationsType", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.attrType["enum"]("long", "short"), "Выгрузка в фуф всех абривиатур типа short/long. По умолчанию long"), _dec(_class = (_class2 = class FiasFnsNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.SugarNodeBase {
|
|
160396
159545
|
constructor(...args) {
|
|
160397
159546
|
super(...args);
|
|
160398
159547
|
|
|
160399
159548
|
_initializerDefineProperty(this, "dataBinding", _descriptor, this);
|
|
160400
159549
|
|
|
160401
159550
|
_initializerDefineProperty(this, "withSteads", _descriptor2, this);
|
|
159551
|
+
|
|
159552
|
+
_initializerDefineProperty(this, "allAbbreviationsType", _descriptor3, this);
|
|
160402
159553
|
}
|
|
160403
159554
|
|
|
160404
159555
|
getOwnPath() {
|
|
@@ -160421,6 +159572,11 @@ let FiasFnsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODUL
|
|
|
160421
159572
|
enumerable: true,
|
|
160422
159573
|
writable: true,
|
|
160423
159574
|
initializer: null
|
|
159575
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "allAbbreviationsType", [_dec4], {
|
|
159576
|
+
configurable: true,
|
|
159577
|
+
enumerable: true,
|
|
159578
|
+
writable: true,
|
|
159579
|
+
initializer: null
|
|
160424
159580
|
})), _class2)) || _class);
|
|
160425
159581
|
;
|
|
160426
159582
|
|
|
@@ -160489,7 +159645,7 @@ class FiasFssConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
160489
159645
|
|
|
160490
159646
|
doBuildDataDeclaration(context) {
|
|
160491
159647
|
const node = this.getCurrentNodeAs(_FiasFssNode__WEBPACK_IMPORTED_MODULE_4__.FiasFssNode);
|
|
160492
|
-
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "
|
|
159648
|
+
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "countryCode", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "address/houseGuid", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "address/guid", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "address/house", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "address/building", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "currentFiasAddress/houseGuid", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "currentFiasAddress/guid", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "currentFiasAddress/house", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "currentFiasAddress/building", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "flat", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "postalCode", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "foreignAddress", node.dataBinding.requisite));
|
|
160493
159649
|
}
|
|
160494
159650
|
|
|
160495
159651
|
buildChildrenDataDeclaration(context) {
|
|
@@ -162631,15 +161787,15 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
|
|
|
162631
161787
|
|
|
162632
161788
|
|
|
162633
161789
|
function setCurrencyProps(markupBuilder, context, node) {
|
|
162634
|
-
var _typeNode$base, _node$currency;
|
|
162635
|
-
|
|
162636
161790
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
162637
161791
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
162638
|
-
|
|
162639
|
-
|
|
162640
|
-
|
|
161792
|
+
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
161793
|
+
|
|
161794
|
+
if (node.currency) {
|
|
161795
|
+
var _typeNode$base;
|
|
161796
|
+
|
|
161797
|
+
const baseTypeName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
162641
161798
|
|
|
162642
|
-
if (currency) {
|
|
162643
161799
|
if (baseTypeName === "decimal") {
|
|
162644
161800
|
var _typeNode$flattenType, _typeNode$flattenType2, _ref, _ref2, _ref3, _ref4, _typeNode$flattenType3, _typeNode$flattenType4, _typeNode$flattenType5, _typeNode$flattenType6, _typeNode$flattenType7, _typeNode$flattenType8, _typeNode$flattenType9, _typeNode$flattenType10;
|
|
162645
161801
|
|
|
@@ -162665,14 +161821,11 @@ function setCurrencyProps(markupBuilder, context, node) {
|
|
|
162665
161821
|
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
162666
161822
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
162667
161823
|
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
162668
|
-
} else if (maxLength != undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
162669
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
162670
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
162671
161824
|
} else if (totalDigits != undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
162672
161825
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(totalDigits);
|
|
162673
161826
|
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
162674
161827
|
} else {
|
|
162675
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(
|
|
161828
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints", node, "currency");
|
|
162676
161829
|
}
|
|
162677
161830
|
} else if (baseTypeName === "integer") {
|
|
162678
161831
|
var _ref5, _typeNode$flattenType11, _typeNode$flattenType12, _ref6, _typeNode$flattenType13, _typeNode$flattenType14, _ref7, _typeNode$flattenType15, _typeNode$flattenType16;
|