@kontur.candy/generator 5.120.0 → 5.121.0-fixes-for-patch.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46776,10 +46776,10 @@ class AbsoluteModelFieldPath {
|
|
|
46776
46776
|
toString(includeLeadingSlash = false) {
|
|
46777
46777
|
return `${includeLeadingSlash ? "/" : ""}${this.path.toLegacyPath()}.${this.field}`;
|
|
46778
46778
|
}
|
|
46779
|
-
toLegacyPath() {
|
|
46779
|
+
toLegacyPath(addSlashIfLastTokenIsInstanceOrMultiplicity = true) {
|
|
46780
46780
|
const lastToken = _IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.last(this.path.getPathParts());
|
|
46781
46781
|
const isLastTokenAnInstanceOrMultiplicity = _ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.isInstanceTokenOrInstancesSpec(lastToken) || _ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.isMultiToken(lastToken);
|
|
46782
|
-
const slashIfRequired = isLastTokenAnInstanceOrMultiplicity && (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(this.field) ? "/" : "";
|
|
46782
|
+
const slashIfRequired = addSlashIfLastTokenIsInstanceOrMultiplicity && isLastTokenAnInstanceOrMultiplicity && (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(this.field) ? "/" : "";
|
|
46783
46783
|
const dotIfRequired = (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(this.field) ? "." : "";
|
|
46784
46784
|
return `${this.path.toLegacyPath()}${slashIfRequired}${dotIfRequired}${this.field}`;
|
|
46785
46785
|
}
|
|
@@ -81165,7 +81165,7 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
81165
81165
|
applyReplacements([/path\('([^']*?)',\s*'error'\)\s*!==?\s*''/g, "1 == 1"]);
|
|
81166
81166
|
applyReplacements([/path\('([^']*?)',\s*'warning'\)\s*===?\s*''/g, "1 == 0"]);
|
|
81167
81167
|
applyReplacements([/path\('([^']*?)',\s*'warning'\)\s*!==?\s*''/g, "1 == 1"]);
|
|
81168
|
-
applyReplacements([/path\('([^']*?)'\)\.length/g, "length($1)"]);
|
|
81168
|
+
applyReplacements([/path\('([^']*?)'\)\.length/g, "length($1 as string)"]);
|
|
81169
81169
|
applyReplacements([/path\('@formsClientInfo\/[^']*?'\)/g, "''"]);
|
|
81170
81170
|
applyReplacements([/path\('@featureFlags\/([^']*?)'\)/g, "getProperty('$1')"]);
|
|
81171
81171
|
applyReplacements([/path\('@draftMeta\/([^']*?)'\)/g, "getProperty('draftMeta/$1')"]);
|
|
@@ -81198,8 +81198,8 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
81198
81198
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*'true'/g, "1 == 1"]);
|
|
81199
81199
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*false/g, "0 == 1"]);
|
|
81200
81200
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*'false'/g, "0 == 1"]);
|
|
81201
|
-
applyReplacements([/path\('([^']*?)'\)\s*===?\s*'/g, "($1 as string) ==
|
|
81202
|
-
applyReplacements([/path\('([^']*?)'\)\s*!==?\s*'/g, "($1 as string) !=
|
|
81201
|
+
applyReplacements([/path\('([^']*?)'\)\s*===?\s*('|")/g, "($1 as string) == $2"]);
|
|
81202
|
+
applyReplacements([/path\('([^']*?)'\)\s*!==?\s*('|")/g, "($1 as string) != $2"]);
|
|
81203
81203
|
applyReplacements([/path\('([^']*?)'\)\s*===?\s*(\d)/g, "$1 == $2"]);
|
|
81204
81204
|
applyReplacements([[/path\('([^']*?)'\)\s*===?\s*(\d)/g, "$1 == $2"], [/path\('([^']*?)'\)\s*!==?\s*(\d)/g, "$1 != $2"], [/path\('([^']*?)'\)\s*>=?\s*(\d)/g, "$1 >= $2"], [/path\('([^']*?)'\)\s*<=?\s*(\d)/g, "$1 <= $2"], [/path\('([^']*?)'\)\s*>?\s*(\d)/g, "$1 > $2"], [/path\('([^']*?)'\)\s*<?\s*(\d)/g, "$1 < $2"], [/path\('([^']*?)'\)\s*===?\s*'(\d+)'/g, "$1 == $2"], [/path\('([^']*?)'\)\s*!==?\s*'(\d+)'/g, "$1 != $2"], [/path\('([^']*?)'\)\s*>?\s*'(\d+)'/g, "$1 > $2"], [/path\('([^']*?)'\)\s*<?\s*'(\d+)'/g, "$1 < $2"], [/path\('([^']*?)'\)\s*>=?\s*'(\d+)'/g, "$1 >= $2"], [/path\('([^']*?)'\)\s*<=?\s*'(\d+)'/g, "$1 <= $2"]]);
|
|
81205
81205
|
applyReplacements([/\|\|/g, "or"]);
|
|
@@ -81244,7 +81244,7 @@ const predefinedJsConditions = {
|
|
|
81244
81244
|
"path`('ПризнакПродавец') === '2'": "ПризнакПродавец == 2",
|
|
81245
81245
|
"(path('checked1') === 'true' && path('checked2') === 'true') or (path('checked1') === 'true')": "(checked1 and checked2) or checked1",
|
|
81246
81246
|
"path('СНИЛС') != ''": "СНИЛС != ''",
|
|
81247
|
-
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not /Файл/LazyLoadingEnabled",
|
|
81247
|
+
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not (/Файл/LazyLoadingEnabled == 'true')",
|
|
81248
81248
|
"path('НомКорр') !== '99'": "НомКорр != 99",
|
|
81249
81249
|
"tableIsEmpty != 'true'": "tableIsEmpty as string != 'true'",
|
|
81250
81250
|
"tableIsEmpty == 'true'": "tableIsEmpty as string == 'true'",
|
|
@@ -104305,6 +104305,9 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
104305
104305
|
}
|
|
104306
104306
|
doBuildNormalizeRules(builder) {
|
|
104307
104307
|
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_7__.TextNode);
|
|
104308
|
+
if (!node.dataBinding.path) {
|
|
104309
|
+
return [];
|
|
104310
|
+
}
|
|
104308
104311
|
return [builder.valueInitializer(node, node.dataBinding, node.disabled), ...builder.specialFieldsInitializer(node, {
|
|
104309
104312
|
disabled: node.disabled
|
|
104310
104313
|
})];
|
|
@@ -108223,7 +108226,8 @@ function getSettings(sugarRoot, gfv, additionalSettings, formJsonSettings) {
|
|
|
108223
108226
|
...additionalSettings,
|
|
108224
108227
|
useServerSideFLangNormalization: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideFLangNormalization,
|
|
108225
108228
|
useServerSideCalculations: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideCalculations,
|
|
108226
|
-
disableFlangRulesForEnableAutoFieldFeature: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.disableFlangRulesForEnableAutoFieldFeature
|
|
108229
|
+
disableFlangRulesForEnableAutoFieldFeature: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.disableFlangRulesForEnableAutoFieldFeature,
|
|
108230
|
+
enableAutocalcsInReadOnly: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.enableAutocalcsInReadOnly
|
|
108227
108231
|
};
|
|
108228
108232
|
return `module.exports = ${JSON.stringify(settings, undefined, 2)}`;
|
|
108229
108233
|
}
|