@kontur.candy/generator 5.13.0-fetchfn-disable.0 → 5.13.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 +15 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81769,7 +81769,7 @@ class NullCoalesceExpression extends FLangExpression {
|
|
|
81769
81769
|
if (this.expression instanceof LogicalExpression) {
|
|
81770
81770
|
expression = `(${expression})`;
|
|
81771
81771
|
}
|
|
81772
|
-
return `(
|
|
81772
|
+
return `(${expression}) ?? ${this.elseExpression.convertToString()}`;
|
|
81773
81773
|
}
|
|
81774
81774
|
}
|
|
81775
81775
|
class OneOfExpression extends FLangExpression {
|
|
@@ -100300,6 +100300,9 @@ class CheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
100300
100300
|
markupBuilder.prop(x => x.checkedValue).set(node.checkedValue);
|
|
100301
100301
|
markupBuilder.prop("data-tid").set(node.tid);
|
|
100302
100302
|
markupBuilder.prop(x => x.uncheckedValue).set(node.uncheckedValue);
|
|
100303
|
+
if (node.callHelperOnChange) {
|
|
100304
|
+
markupBuilder.prop(x => x.callHelperOnChange).set(context.generateHelperFunctionExpression(node, "callHelperOnChange", node.callHelperOnChange));
|
|
100305
|
+
}
|
|
100303
100306
|
if (node.disabled2 != undefined) {
|
|
100304
100307
|
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_4__.buildExpressionPropValue)(node.disabled2));
|
|
100305
100308
|
if (this.getLegacyNode().getParent() != undefined) {
|
|
@@ -100342,7 +100345,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100342
100345
|
|
|
100343
100346
|
|
|
100344
100347
|
|
|
100345
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
100348
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
100346
100349
|
|
|
100347
100350
|
|
|
100348
100351
|
|
|
@@ -100351,7 +100354,7 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11
|
|
|
100351
100354
|
|
|
100352
100355
|
|
|
100353
100356
|
|
|
100354
|
-
let CheckboxNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.sugarNode)("checkbox", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Checkbox sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_FocusManagementNode__WEBPACK_IMPORTED_MODULE_10__.FocusManagementNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("width", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_8__.TooltipSettingsNode), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("checkedValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("uncheckedValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)(undefined, undefined, ["type"]), _dec(_class = (_class2 = class CheckboxNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
100357
|
+
let CheckboxNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.sugarNode)("checkbox", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Checkbox sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_FocusManagementNode__WEBPACK_IMPORTED_MODULE_10__.FocusManagementNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("width", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_8__.TooltipSettingsNode), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("checkedValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("uncheckedValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("callHelperOnChange", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.helperFunctionName, "Вызов helper функции на onChange контролла"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)(undefined, undefined, ["type"]), _dec(_class = (_class2 = class CheckboxNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
100355
100358
|
constructor(...args) {
|
|
100356
100359
|
super(...args);
|
|
100357
100360
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataBinding", _descriptor, this);
|
|
@@ -100363,7 +100366,8 @@ let CheckboxNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODU
|
|
|
100363
100366
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipSettings", _descriptor7, this);
|
|
100364
100367
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "checkedValue", _descriptor8, this);
|
|
100365
100368
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "uncheckedValue", _descriptor9, this);
|
|
100366
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
100369
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "callHelperOnChange", _descriptor10, this);
|
|
100370
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor11, this);
|
|
100367
100371
|
}
|
|
100368
100372
|
getOwnPath() {
|
|
100369
100373
|
return this.dataBinding.getOwnPath();
|
|
@@ -100413,7 +100417,12 @@ let CheckboxNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODU
|
|
|
100413
100417
|
enumerable: true,
|
|
100414
100418
|
writable: true,
|
|
100415
100419
|
initializer: null
|
|
100416
|
-
}), _descriptor10 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
100420
|
+
}), _descriptor10 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "callHelperOnChange", [_dec11], {
|
|
100421
|
+
configurable: true,
|
|
100422
|
+
enumerable: true,
|
|
100423
|
+
writable: true,
|
|
100424
|
+
initializer: null
|
|
100425
|
+
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec12], {
|
|
100417
100426
|
configurable: true,
|
|
100418
100427
|
enumerable: true,
|
|
100419
100428
|
writable: true,
|
|
@@ -106981,7 +106990,7 @@ class FLangNormalizationRulesBuilder {
|
|
|
106981
106990
|
var _this$fetchFunctions$, _this$fetchFunctions$2;
|
|
106982
106991
|
const fetchFnText = (_this$fetchFunctions$ = (_this$fetchFunctions$2 = this.fetchFunctions.getFetchFunction(dataBinding.fetchfn + (fetchFunctionSuffix !== null && fetchFunctionSuffix !== void 0 ? fetchFunctionSuffix : ""))) === null || _this$fetchFunctions$2 === void 0 ? void 0 : _this$fetchFunctions$2.toString()) !== null && _this$fetchFunctions$ !== void 0 ? _this$fetchFunctions$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)();
|
|
106983
106992
|
const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
|
|
106984
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.
|
|
106993
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)));
|
|
106985
106994
|
} catch (e) {
|
|
106986
106995
|
// eslint-disable-next-line no-console
|
|
106987
106996
|
console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
|