@kontur.candy/generator 5.73.2 → 5.73.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 +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60192,7 +60192,15 @@ function removeTrailingSlash(inputStr) {
|
|
|
60192
60192
|
return inputStr;
|
|
60193
60193
|
}
|
|
60194
60194
|
function joinPaths(paths) {
|
|
60195
|
-
|
|
60195
|
+
let result = "";
|
|
60196
|
+
for (const path of paths) {
|
|
60197
|
+
if (path.startsWith("/")) {
|
|
60198
|
+
result = removeTrailingSlash(path);
|
|
60199
|
+
} else {
|
|
60200
|
+
result += (result == "" ? "" : "/") + removeTrailingSlash(path);
|
|
60201
|
+
}
|
|
60202
|
+
}
|
|
60203
|
+
return result;
|
|
60196
60204
|
}
|
|
60197
60205
|
function generateBlockKCXmlFormulas(block, parents) {
|
|
60198
60206
|
const nextParents = [...parents, {
|
|
@@ -70974,7 +70982,7 @@ function getAllMatches(regexPattern, sourceString) {
|
|
|
70974
70982
|
}
|
|
70975
70983
|
function getRequisitesFromEvaluablePropValue(filter) {
|
|
70976
70984
|
var _filter$match$map$fil, _filter$match, _getAllMatches$map$fi;
|
|
70977
|
-
return [...((_filter$match$map$fil = (_filter$match = filter.match(/path([^)]+)/g)) === null || _filter$match === void 0 ? void 0 : _filter$match.map(path => path.slice(6, -1)).filter(path => path.startsWith("@clientInfo") || path.startsWith("@formsClientInfo")).map(path => `${path}.value`)) !== null && _filter$match$map$fil !== void 0 ? _filter$match$map$fil : []), ...((_getAllMatches$map$fi = getAllMatches(/getProperty\('([^']+?)'\)/g, filter).map(path => path[1]).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined).filter(path => path.startsWith("currentAccount") || path.startsWith("recipient") || (path === null || path === void 0 ? void 0 : path.startsWith("sender"))).map(path => `@formsClientInfo/${path}.value`)) !== null && _getAllMatches$map$fi !== void 0 ? _getAllMatches$map$fi : [])];
|
|
70985
|
+
return [...((_filter$match$map$fil = (_filter$match = filter.match(/path([^)]+)/g)) === null || _filter$match === void 0 ? void 0 : _filter$match.map(path => path.slice(6, -1)).filter(path => path.startsWith("@clientInfo") || path.startsWith("@formsClientInfo") || path.startsWith("@draftMeta")).map(path => `${path}.value`)) !== null && _filter$match$map$fil !== void 0 ? _filter$match$map$fil : []), ...((_getAllMatches$map$fi = getAllMatches(/getProperty\('([^']+?)'\)/g, filter).map(path => path[1]).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined).filter(path => path.startsWith("currentAccount") || path.startsWith("recipient") || (path === null || path === void 0 ? void 0 : path.startsWith("sender"))).map(path => `@formsClientInfo/${path}.value`)) !== null && _getAllMatches$map$fi !== void 0 ? _getAllMatches$map$fi : [])];
|
|
70978
70986
|
}
|
|
70979
70987
|
function getPathsFromEvaluablePropValue(evaluableProp) {
|
|
70980
70988
|
const pathRegex = /(?<=path\((?:'|")).*?(?=(?:'|"))/g;
|
|
@@ -78145,6 +78153,7 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
78145
78153
|
applyReplacements([/path\('([^']*?)'\)\.length/g, "length($1)"]);
|
|
78146
78154
|
applyReplacements([/path\('@formsClientInfo\/[^']*?'\)/g, "''"]);
|
|
78147
78155
|
applyReplacements([/path\('@featureFlags\/([^']*?)'\)/g, "getProperty('$1')"]);
|
|
78156
|
+
applyReplacements([/path\('@draftMeta\/([^']*?)'\)/g, "getProperty('draftMeta/$1')"]);
|
|
78148
78157
|
applyReplacements([/path\('@settings\/someSettings'\)/g, "getProperty('someSettings')"]);
|
|
78149
78158
|
applyReplacements([/path\('@settings\/scenario'\)/g, "''"]);
|
|
78150
78159
|
applyReplacements([/path\('@settings\/isForeign'\)/g, "'false'"]);
|