@kontur.candy/generator 5.124.0-disable-focus-lock.0 → 5.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -6
- 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
|
}
|
|
@@ -81297,7 +81297,7 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
81297
81297
|
applyReplacements([/path\('([^']*?)',\s*'error'\)\s*!==?\s*''/g, "1 == 1"]);
|
|
81298
81298
|
applyReplacements([/path\('([^']*?)',\s*'warning'\)\s*===?\s*''/g, "1 == 0"]);
|
|
81299
81299
|
applyReplacements([/path\('([^']*?)',\s*'warning'\)\s*!==?\s*''/g, "1 == 1"]);
|
|
81300
|
-
applyReplacements([/path\('([^']*?)'\)\.length/g, "length($1)"]);
|
|
81300
|
+
applyReplacements([/path\('([^']*?)'\)\.length/g, "length($1 as string)"]);
|
|
81301
81301
|
applyReplacements([/path\('@formsClientInfo\/[^']*?'\)/g, "''"]);
|
|
81302
81302
|
applyReplacements([/path\('@featureFlags\/([^']*?)'\)/g, "getProperty('$1')"]);
|
|
81303
81303
|
applyReplacements([/path\('@draftMeta\/([^']*?)'\)/g, "getProperty('draftMeta/$1')"]);
|
|
@@ -81330,8 +81330,8 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
81330
81330
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*'true'/g, "1 == 1"]);
|
|
81331
81331
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*false/g, "0 == 1"]);
|
|
81332
81332
|
applyReplacements([/path\('@settings\/isFormInFormNds'\)\s*===?\s*'false'/g, "0 == 1"]);
|
|
81333
|
-
applyReplacements([/path\('([^']*?)'\)\s*===?\s*'/g, "($1 as string) ==
|
|
81334
|
-
applyReplacements([/path\('([^']*?)'\)\s*!==?\s*'/g, "($1 as string) !=
|
|
81333
|
+
applyReplacements([/path\('([^']*?)'\)\s*===?\s*('|")/g, "($1 as string) == $2"]);
|
|
81334
|
+
applyReplacements([/path\('([^']*?)'\)\s*!==?\s*('|")/g, "($1 as string) != $2"]);
|
|
81335
81335
|
applyReplacements([/path\('([^']*?)'\)\s*===?\s*(\d)/g, "$1 == $2"]);
|
|
81336
81336
|
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"]]);
|
|
81337
81337
|
applyReplacements([/\|\|/g, "or"]);
|
|
@@ -81376,7 +81376,7 @@ const predefinedJsConditions = {
|
|
|
81376
81376
|
"path`('ПризнакПродавец') === '2'": "ПризнакПродавец == 2",
|
|
81377
81377
|
"(path('checked1') === 'true' && path('checked2') === 'true') or (path('checked1') === 'true')": "(checked1 and checked2) or checked1",
|
|
81378
81378
|
"path('СНИЛС') != ''": "СНИЛС != ''",
|
|
81379
|
-
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not /Файл/LazyLoadingEnabled",
|
|
81379
|
+
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not (/Файл/LazyLoadingEnabled == 'true')",
|
|
81380
81380
|
"path('НомКорр') !== '99'": "НомКорр != 99",
|
|
81381
81381
|
"tableIsEmpty != 'true'": "tableIsEmpty as string != 'true'",
|
|
81382
81382
|
"tableIsEmpty == 'true'": "tableIsEmpty as string == 'true'",
|
|
@@ -104529,6 +104529,9 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
104529
104529
|
}
|
|
104530
104530
|
doBuildNormalizeRules(builder) {
|
|
104531
104531
|
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_7__.TextNode);
|
|
104532
|
+
if (!node.dataBinding.path) {
|
|
104533
|
+
return [];
|
|
104534
|
+
}
|
|
104532
104535
|
return [builder.valueInitializer(node, node.dataBinding, node.disabled), ...builder.specialFieldsInitializer(node, {
|
|
104533
104536
|
disabled: node.disabled
|
|
104534
104537
|
})];
|