@kontur.candy/generator 5.120.0 → 5.121.0-fixes-for-patch.1
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 +8 -4
- 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')"]);
|
|
@@ -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
|
}
|