@kontur.candy/generator 4.278.0-efs-partial-load.5 → 4.278.0-efs-partial-load.6

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.
Files changed (2) hide show
  1. package/dist/index.js +33 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -131999,7 +131999,7 @@ class FLangValidationBuildContext {
131999
131999
  }
132000
132000
 
132001
132001
  *createTypeValidations(valueReference, typeNode, schemaTypeNode) {
132002
- var _typeNode$children$fi, _typeNode$children, _typeNode$children$fi2, _schemaTypeNode$enume, _typeNode$children2, _typeNodeLength$value, _typeNode$children3, _typeNodeMinLength$va, _typeNode$children4, _typeNodeMaxLength$va, _typeNode$children5, _typeNodeMinInclusive, _typeNode$children6, _typeNodeMaxInclusive, _typeNode$children7, _typeNodeTotalDigits$, _typeNode$children8, _typeNodePattern$valu, _schemaTypeNode$patte, _typeNode$children9, _typeNodeFractional$v;
132002
+ var _typeNode$children$fi, _typeNode$children, _typeNode$children$fi2, _schemaTypeNode$enume, _typeNode$children2, _typeNodeLength$value, _typeNode$children3, _typeNodeMinLength$va, _typeNode$children4, _typeNodeMaxLength$va, _typeNode$children5, _typeNodeMinInclusive, _typeNode$children6, _typeNodeMaxInclusive, _typeNode$children7, _typeNodeTotalDigits$, _typeNode$children$fi3, _typeNode$children8, _schemaTypeNode$patte, _typeNode$children9, _typeNodeFractional$v;
132003
132003
 
132004
132004
  //const baseCheckType = typeNode?.checkType;
132005
132005
  const typeNodeEnumerations = (_typeNode$children$fi = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children = typeNode.children) === null || _typeNode$children === void 0 ? void 0 : (_typeNode$children$fi2 = _typeNode$children.filter(x => x instanceof _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.EnumerationTypeCheckNode)) === null || _typeNode$children$fi2 === void 0 ? void 0 : _typeNode$children$fi2.map(x => x.value)) !== null && _typeNode$children$fi !== void 0 ? _typeNode$children$fi : [];
@@ -132075,13 +132075,13 @@ class FLangValidationBuildContext {
132075
132075
  yield [totalDigitsRuleBody, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(`["Число не может содержать более ${totalDigitsValue} знаков"]`)];
132076
132076
  }
132077
132077
 
132078
- const typeNodePattern = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.PatternTypeCheckNode));
132079
- const pattern = (_typeNodePattern$valu = typeNodePattern === null || typeNodePattern === void 0 ? void 0 : typeNodePattern.value) !== null && _typeNodePattern$valu !== void 0 ? _typeNodePattern$valu : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : (_schemaTypeNode$patte = schemaTypeNode.patterns) === null || _schemaTypeNode$patte === void 0 ? void 0 : _schemaTypeNode$patte[0];
132078
+ const typeNodePatterns = (_typeNode$children$fi3 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.filter((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.PatternTypeCheckNode)).map(x => x.value).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.isNotNullOrUndefined)) !== null && _typeNode$children$fi3 !== void 0 ? _typeNode$children$fi3 : [];
132079
+ const patterns = ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.arrayIsNotEmpty)(typeNodePatterns) ? typeNodePatterns : (_schemaTypeNode$patte = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.patterns) !== null && _schemaTypeNode$patte !== void 0 ? _schemaTypeNode$patte : []).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.isNotNullOrUndefined).map(pattern => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(pattern))).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(acc, current) : current, undefined);
132080
132080
 
132081
- if (pattern != undefined) {
132081
+ if (patterns != undefined) {
132082
132082
  var _ref2, _typeNode$description2;
132083
132083
 
132084
- const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(pattern)));
132084
+ const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(patterns);
132085
132085
  const validationErrorMessage = (_ref2 = (_typeNode$description2 = typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _typeNode$description2 !== void 0 ? _typeNode$description2 : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description) !== null && _ref2 !== void 0 ? _ref2 : "Поле заполнено неверно";
132086
132086
  yield [totalDigitsRuleBody, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(`["${validationErrorMessage}"]`)];
132087
132087
  }
@@ -137448,17 +137448,18 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
137448
137448
  }
137449
137449
 
137450
137450
  *buildChildrenFLangValidations(buildContext, formSchemaRng) {
137451
- var _node$parent$getFullP, _node$parent;
137451
+ var _node$doNotIncludeInV, _node$parent$getFullP, _node$parent;
137452
137452
 
137453
137453
  const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
137454
- const contextPath = (_node$parent$getFullP = (_node$parent = node.parent) === null || _node$parent === void 0 ? void 0 : _node$parent.getFullPath()) !== null && _node$parent$getFullP !== void 0 ? _node$parent$getFullP : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)("Must be a parent with path!");
137455
137454
  const condition = this.getCondition(node);
137456
137455
 
137457
- if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.isNullOrEmpty)(condition)) {
137456
+ if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.isNullOrEmpty)(condition) || ((_node$doNotIncludeInV = node.doNotIncludeInValidations) !== null && _node$doNotIncludeInV !== void 0 ? _node$doNotIncludeInV : false)) {
137458
137457
  yield* super.buildChildrenFLangValidations(buildContext, formSchemaRng);
137459
137458
  return;
137460
137459
  }
137461
137460
 
137461
+ const contextPath = (_node$parent$getFullP = (_node$parent = node.parent) === null || _node$parent === void 0 ? void 0 : _node$parent.getFullPath()) !== null && _node$parent$getFullP !== void 0 ? _node$parent$getFullP : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)("Must be a parent with path!");
137462
+
137462
137463
  if (node.then != undefined) {
137463
137464
  try {
137464
137465
  buildContext.pushVisibilityCondition(condition, contextPath);
@@ -137491,8 +137492,15 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
137491
137492
  }
137492
137493
 
137493
137494
  buildChildrenValidations(validationGenerator) {
137495
+ var _node$doNotIncludeInV2;
137496
+
137494
137497
  const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
137495
137498
 
137499
+ if ((_node$doNotIncludeInV2 = node.doNotIncludeInValidations) !== null && _node$doNotIncludeInV2 !== void 0 ? _node$doNotIncludeInV2 : false) {
137500
+ super.buildChildrenValidations(validationGenerator);
137501
+ return;
137502
+ }
137503
+
137496
137504
  if (node.then != undefined) {
137497
137505
  const evaluatorsContextPathExpression = this.getEvaluatorsContextPathExpression();
137498
137506
  const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__.convertConditionToJsOrFailWithFriendlySugarError)(this.getCondition(node), "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_5__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_9__.extractPath)(x => x.condition));
@@ -137629,7 +137637,7 @@ __webpack_require__.r(__webpack_exports__);
137629
137637
 
137630
137638
 
137631
137639
 
137632
- var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class7, _class8, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
137640
+ var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class7, _class8, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
137633
137641
 
137634
137642
 
137635
137643
  let ThenNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("then", `Отображает блок, если выполняется условие.`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/If sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec(_class = (_class2 = class ThenNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
@@ -137658,19 +137666,21 @@ let ElseNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
137658
137666
  writable: true,
137659
137667
  initializer: null
137660
137668
  })), _class5)) || _class4);
137661
- let IfNode = (_dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("if", `Условное отображение контента на основе настроек или произвольного выражения`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/If sync recursive .md$")), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("condition", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, "Условие, при котором блок отображается"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("isIndividual", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Выполнит проверку settings.isIndividual == true`), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("then", [ThenNode]), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("else", [ElseNode]), _dec5(_class7 = (_class8 = class IfNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
137669
+ let IfNode = (_dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("if", `Условное отображение контента на основе настроек или произвольного выражения`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/If sync recursive .md$")), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("condition", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, "Условие, при котором блок отображается"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("doNotIncludeInValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, "Не включать это условие в валидацию видимых элементов"), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("isIndividual", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Выполнит проверку settings.isIndividual == true`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("then", [ThenNode]), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("else", [ElseNode]), _dec5(_class7 = (_class8 = class IfNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
137662
137670
  constructor(...args) {
137663
137671
  super(...args);
137664
137672
 
137665
137673
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "condition", _descriptor3, this);
137666
137674
 
137667
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isIndividual", _descriptor4, this);
137675
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "doNotIncludeInValidations", _descriptor4, this);
137668
137676
 
137669
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor5, this);
137677
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isIndividual", _descriptor5, this);
137678
+
137679
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor6, this);
137670
137680
 
137671
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "then", _descriptor6, this);
137681
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "then", _descriptor7, this);
137672
137682
 
137673
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "else", _descriptor7, this);
137683
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "else", _descriptor8, this);
137674
137684
  }
137675
137685
 
137676
137686
  }, (_descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "condition", [_dec6], {
@@ -137678,22 +137688,27 @@ let IfNode = (_dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3_
137678
137688
  enumerable: true,
137679
137689
  writable: true,
137680
137690
  initializer: null
137681
- }), _descriptor4 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "isIndividual", [_dec7], {
137691
+ }), _descriptor4 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "doNotIncludeInValidations", [_dec7], {
137692
+ configurable: true,
137693
+ enumerable: true,
137694
+ writable: true,
137695
+ initializer: null
137696
+ }), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "isIndividual", [_dec8], {
137682
137697
  configurable: true,
137683
137698
  enumerable: true,
137684
137699
  writable: true,
137685
137700
  initializer: null
137686
- }), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "children", [_dec8], {
137701
+ }), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "children", [_dec9], {
137687
137702
  configurable: true,
137688
137703
  enumerable: true,
137689
137704
  writable: true,
137690
137705
  initializer: null
137691
- }), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "then", [_dec9], {
137706
+ }), _descriptor7 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "then", [_dec10], {
137692
137707
  configurable: true,
137693
137708
  enumerable: true,
137694
137709
  writable: true,
137695
137710
  initializer: null
137696
- }), _descriptor7 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "else", [_dec10], {
137711
+ }), _descriptor8 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class8.prototype, "else", [_dec11], {
137697
137712
  configurable: true,
137698
137713
  enumerable: true,
137699
137714
  writable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "4.278.0-efs-partial-load.5",
3
+ "version": "4.278.0-efs-partial-load.6",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,