@kontur.candy/generator 4.251.0-hobbit.0 → 4.251.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.
Files changed (2) hide show
  1. package/dist/index.js +184 -105
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -112518,8 +112518,7 @@ __webpack_require__.r(__webpack_exports__);
112518
112518
  /* harmony export */ "createRelativeFromTokens": () => (/* binding */ createRelativeFromTokens),
112519
112519
  /* harmony export */ "joinModelPaths": () => (/* binding */ joinModelPaths),
112520
112520
  /* harmony export */ "AbsoluteModelFieldPath": () => (/* binding */ AbsoluteModelFieldPath),
112521
- /* harmony export */ "ModelPath": () => (/* binding */ ModelPath),
112522
- /* harmony export */ "AbsoluteModelPath": () => (/* binding */ AbsoluteModelPath)
112521
+ /* harmony export */ "ModelPathImpl": () => (/* binding */ ModelPathImpl)
112523
112522
  /* harmony export */ });
112524
112523
  /* harmony import */ var _IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../IterableUtils */ "./Common/IterableUtils.ts");
112525
112524
  /* harmony import */ var _TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../TypingUtils */ "./Common/TypingUtils.ts");
@@ -112550,7 +112549,7 @@ class PathTokens {
112550
112549
  PathTokens.each = EachSymbol;
112551
112550
  PathTokens.current = CurrentSymbol;
112552
112551
  function isModelPath(path) {
112553
- return typeof path !== "string" && path instanceof ModelPath;
112552
+ return typeof path !== "string" && path instanceof ModelPathImpl;
112554
112553
  }
112555
112554
  function convertToLegacyPath(path) {
112556
112555
  return isModelPath(path) ? path.toLegacyPath() : path;
@@ -112559,10 +112558,10 @@ function convertToAbsolutModelPath(path) {
112559
112558
  return isModelPath(path) ? path : createAbsoluteFromMask(path, PathTokens.each);
112560
112559
  }
112561
112560
  function emptyModelPath() {
112562
- return new ModelPath([], false);
112561
+ return new ModelPathImpl([], false);
112563
112562
  }
112564
112563
  function emptyAbsoluteModelPath() {
112565
- return new AbsoluteModelPath([]);
112564
+ return new ModelPathImpl([], true);
112566
112565
  }
112567
112566
  function createModelPath(path, absolute) {
112568
112567
  const partPartStrings = path.split("/");
@@ -112570,43 +112569,43 @@ function createModelPath(path, absolute) {
112570
112569
 
112571
112570
  if (absolute === "auto") {
112572
112571
  if (path.startsWith("/")) {
112573
- return new ModelPath(partPartStrings.slice(1), true);
112572
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112574
112573
  } else {
112575
- return new ModelPath(partPartStrings, false);
112574
+ return new ModelPathImpl(partPartStrings, false);
112576
112575
  }
112577
112576
  }
112578
112577
 
112579
112578
  if (absolute && path.startsWith("/")) {
112580
- return new ModelPath(partPartStrings.slice(1), true);
112579
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112581
112580
  }
112582
112581
 
112583
- return new ModelPath(partPartStrings, absolute);
112582
+ return new ModelPathImpl(partPartStrings, absolute);
112584
112583
  }
112585
112584
  function createFromMask(path, absolute, multiplicitySymbol) {
112586
112585
  const partPartStrings = path.split("/").map(x => x === "*" ? multiplicitySymbol : x);
112587
112586
 
112588
112587
  if (absolute === "auto") {
112589
112588
  if (path.startsWith("/")) {
112590
- return new ModelPath(partPartStrings.slice(1), true);
112589
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112591
112590
  } else {
112592
- return new ModelPath(partPartStrings, false);
112591
+ return new ModelPathImpl(partPartStrings, false);
112593
112592
  }
112594
112593
  }
112595
112594
 
112596
112595
  if (absolute && path.startsWith("/")) {
112597
- return new ModelPath(partPartStrings.slice(1), true);
112596
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112598
112597
  }
112599
112598
 
112600
- return new ModelPath(partPartStrings, absolute);
112599
+ return new ModelPathImpl(partPartStrings, absolute);
112601
112600
  }
112602
112601
  function createAbsoluteFromMask(path, multiplicitySymbol) {
112603
112602
  const partPartStrings = path.split("/").map(x => x === "*" ? multiplicitySymbol : x);
112604
112603
 
112605
112604
  if (path.startsWith("/")) {
112606
- return new AbsoluteModelPath(partPartStrings.slice(1));
112605
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112607
112606
  }
112608
112607
 
112609
- return new AbsoluteModelPath(partPartStrings);
112608
+ return new ModelPathImpl(partPartStrings, true);
112610
112609
  }
112611
112610
 
112612
112611
  function ensurePlainPathPartsDoesNotContainMultiplicity(parts) {
@@ -112620,21 +112619,21 @@ function createAbsolute(path) {
112620
112619
  ensurePlainPathPartsDoesNotContainMultiplicity(partPartStrings);
112621
112620
 
112622
112621
  if (path.startsWith("/")) {
112623
- return new AbsoluteModelPath(partPartStrings.slice(1));
112622
+ return new ModelPathImpl(partPartStrings.slice(1), true);
112624
112623
  }
112625
112624
 
112626
- return new AbsoluteModelPath(partPartStrings);
112625
+ return new ModelPathImpl(partPartStrings, true);
112627
112626
  }
112628
112627
  function createRelativeResolvedModelPath(path) {
112629
112628
  const partPartStrings = path.split("/");
112630
112629
  ensurePlainPathPartsDoesNotContainMultiplicity(partPartStrings);
112631
- return new ModelPath(partPartStrings, false);
112630
+ return new ModelPathImpl(partPartStrings, false);
112632
112631
  }
112633
112632
  function createAbsoluteFromTokens(tokens) {
112634
- return new ModelPath(tokens, true);
112633
+ return new ModelPathImpl(tokens, true);
112635
112634
  }
112636
112635
  function createRelativeFromTokens(tokens) {
112637
- return new ModelPath(tokens, false);
112636
+ return new ModelPathImpl(tokens, false);
112638
112637
  }
112639
112638
  function joinModelPaths(...parts) {
112640
112639
  let absolute = false;
@@ -112643,7 +112642,7 @@ function joinModelPaths(...parts) {
112643
112642
  for (const joinItem of parts) {
112644
112643
  if (typeof joinItem === "string") {
112645
112644
  resultParts.push(joinItem);
112646
- } else if (joinItem instanceof ModelPath) {
112645
+ } else if (isModelPath(joinItem)) {
112647
112646
  if (joinItem.isAbsolute()) {
112648
112647
  absolute = true;
112649
112648
  resultParts = [...joinItem.getPathPartsAsArray()];
@@ -112657,7 +112656,7 @@ function joinModelPaths(...parts) {
112657
112656
  }
112658
112657
  }
112659
112658
 
112660
- return new ModelPath(resultParts, absolute);
112659
+ return new ModelPathImpl(resultParts, absolute);
112661
112660
  }
112662
112661
  class AbsoluteModelFieldPath {
112663
112662
  constructor(path, fieldName) {
@@ -112696,7 +112695,14 @@ class AbsoluteModelFieldPath {
112696
112695
  }
112697
112696
 
112698
112697
  }
112699
- class ModelPath {
112698
+
112699
+ function isAllTokensResolved(tokens) {
112700
+ // Я что-то немогу сообразить как тут всё строго написать...
112701
+ // @ts-expect-error
112702
+ return tokens.every(PathTokens.isSimpleToken);
112703
+ }
112704
+
112705
+ class ModelPathImpl {
112700
112706
  constructor(pathParts, absolute) {
112701
112707
  this.tokens = void 0;
112702
112708
  this.absolute = void 0;
@@ -112705,6 +112711,10 @@ class ModelPath {
112705
112711
  this.absolute = absolute;
112706
112712
  }
112707
112713
 
112714
+ get resolved() {
112715
+ return isAllTokensResolved(this.tokens);
112716
+ }
112717
+
112708
112718
  getPathParts() {
112709
112719
  return this.tokens;
112710
112720
  }
@@ -112741,6 +112751,7 @@ class ModelPath {
112741
112751
  }
112742
112752
 
112743
112753
  isResolved() {
112754
+ return isAllTokensResolved(this.tokens);
112744
112755
  return this.tokens.every(PathTokens.isSimpleToken);
112745
112756
  }
112746
112757
 
@@ -112752,7 +112763,7 @@ class ModelPath {
112752
112763
  return instance;
112753
112764
  }
112754
112765
  });
112755
- return new ModelPath(tokens, this.absolute);
112766
+ return new ModelPathImpl(tokens, this.absolute);
112756
112767
  }
112757
112768
 
112758
112769
  isContainIteration() {
@@ -112828,13 +112839,15 @@ class ModelPath {
112828
112839
  }
112829
112840
 
112830
112841
  isIncludes(modelPath) {
112831
- if (this.tokens.length !== modelPath.tokens.length) {
112842
+ const targetTokens = modelPath.getPathPartsAsArray();
112843
+
112844
+ if (this.tokens.length !== targetTokens.length) {
112832
112845
  return false;
112833
112846
  }
112834
112847
 
112835
112848
  for (let i = 0; i < this.tokens.length; i++) {
112836
112849
  const leftPart = this.tokens[i];
112837
- const rightPart = modelPath.tokens[i];
112850
+ const rightPart = targetTokens[i];
112838
112851
 
112839
112852
  if (typeof leftPart === "string") {
112840
112853
  if (typeof rightPart === "string") {
@@ -112883,7 +112896,7 @@ class ModelPath {
112883
112896
  throw new Error(`Cannot match non absolute path '${modelPath.toString()}'`);
112884
112897
  }
112885
112898
 
112886
- return _PathMatcher__WEBPACK_IMPORTED_MODULE_4__.PathMatcher.match(this.tokens, modelPath.tokens);
112899
+ return _PathMatcher__WEBPACK_IMPORTED_MODULE_4__.PathMatcher.match(this.tokens, modelPath.getPathPartsAsArray());
112887
112900
  }
112888
112901
 
112889
112902
  *splitByMultiplicity() {
@@ -112894,7 +112907,7 @@ class ModelPath {
112894
112907
  lastSimpleParts.append(token);
112895
112908
  } else {
112896
112909
  if (!lastSimpleParts.empty) {
112897
- yield lastSimpleParts.toPath();
112910
+ yield lastSimpleParts.toResolvedPath();
112898
112911
  lastSimpleParts = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(false);
112899
112912
  }
112900
112913
 
@@ -112903,7 +112916,7 @@ class ModelPath {
112903
112916
  }
112904
112917
 
112905
112918
  if (!lastSimpleParts.empty) {
112906
- yield lastSimpleParts.toPath();
112919
+ yield lastSimpleParts.toResolvedPath();
112907
112920
  }
112908
112921
  }
112909
112922
 
@@ -112930,7 +112943,7 @@ class ModelPath {
112930
112943
  resultTokens.push(pathPart);
112931
112944
  }
112932
112945
 
112933
- return new ModelPath(resultTokens, this.isAbsolute());
112946
+ return new ModelPathImpl(resultTokens, this.absolute);
112934
112947
  }
112935
112948
  /**
112936
112949
  * @summary Спецификаторы множественности Each заменяет на Current
@@ -112938,11 +112951,25 @@ class ModelPath {
112938
112951
 
112939
112952
 
112940
112953
  toCurrentIteration() {
112941
- return new ModelPath(this.tokens.map(x => x === PathTokens.each ? PathTokens.current : x), this.isAbsolute());
112954
+ if (this.isResolved()) {
112955
+ return this;
112956
+ } else {
112957
+ // NOTE Тут не получается наложить дискриминатор
112958
+ // @ts-expect-error
112959
+ const pathParts = this.tokens.map(x => x === PathTokens.each ? PathTokens.current : x);
112960
+ return new ModelPathImpl(pathParts, this.absolute);
112961
+ }
112942
112962
  }
112943
112963
 
112944
112964
  toEachIteration() {
112945
- return new ModelPath(this.tokens.map(x => x === PathTokens.current ? PathTokens.each : x), this.isAbsolute());
112965
+ if (this.isResolved()) {
112966
+ return this;
112967
+ } else {
112968
+ // NOTE Тут не получается наложить дискриминатор
112969
+ // @ts-expect-error
112970
+ const pathParts = this.tokens.map(x => x === PathTokens.current ? PathTokens.each : x);
112971
+ return new ModelPathImpl(pathParts, this.absolute);
112972
+ }
112946
112973
  }
112947
112974
 
112948
112975
  toAbsolute() {
@@ -112950,7 +112977,7 @@ class ModelPath {
112950
112977
  throw new Error(`Path '${this.toLegacyPath()} is not absolute'`);
112951
112978
  }
112952
112979
 
112953
- return new AbsoluteModelPath(this.tokens);
112980
+ return new ModelPathImpl(this.tokens, true);
112954
112981
  }
112955
112982
 
112956
112983
  *getAllParentPaths() {
@@ -112966,20 +112993,22 @@ class ModelPath {
112966
112993
  const lastItem = _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.last(this.tokens);
112967
112994
 
112968
112995
  if (lastItem != undefined && PathTokens.isMultiToken(lastItem)) {
112969
- return new ModelPath(this.tokens.slice(0, -1), this.absolute);
112996
+ return new ModelPathImpl(this.tokens.slice(0, -1), this.absolute);
112970
112997
  }
112971
112998
 
112972
112999
  return this;
112973
113000
  }
112974
113001
 
112975
113002
  getParentPath() {
112976
- const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.isAbsolute());
113003
+ const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.absolute);
112977
113004
 
112978
113005
  for (const token of _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.skipLast(this.getPathParts(), 1)) {
112979
113006
  result.append(token);
112980
- }
113007
+ } // Тут получается так, что по другому никак
113008
+ // @ts-expect-error
112981
113009
 
112982
- return result.toAbsolutePath();
113010
+
113011
+ return result.toPath();
112983
113012
  }
112984
113013
 
112985
113014
  applyInstancesDirty(instances) {
@@ -112988,7 +113017,7 @@ class ModelPath {
112988
113017
  }
112989
113018
 
112990
113019
  let instanceCounter = 0;
112991
- const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(false);
113020
+ const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(true);
112992
113021
 
112993
113022
  for (const token of this.getPathParts()) {
112994
113023
  if (PathTokens.isMultiToken(token) && instanceCounter < instances.length) {
@@ -112999,9 +113028,11 @@ class ModelPath {
112999
113028
  } else {
113000
113029
  result.append(token);
113001
113030
  }
113002
- }
113031
+ } // Тут получается так, что по другому никак
113032
+ // @ts-expect-error
113003
113033
 
113004
- return result.toAbsolutePath();
113034
+
113035
+ return result.toPath();
113005
113036
  }
113006
113037
 
113007
113038
  pathPartToString(pathPart) {
@@ -113020,30 +113051,6 @@ class ModelPath {
113020
113051
  throw new Error(`Unknown path part specified: ${(0,_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.ensureAndGetString)(pathPart)}`);
113021
113052
  }
113022
113053
 
113023
- }
113024
- class AbsoluteModelPath extends ModelPath {
113025
- constructor(pathParts) {
113026
- super(pathParts, true);
113027
- }
113028
-
113029
- joinWith(...path) {
113030
- return super.joinWith(...path).toAbsolute();
113031
- }
113032
-
113033
- getParentPath() {
113034
- const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(true);
113035
-
113036
- for (const token of _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.skipLast(this.getPathParts(), 1)) {
113037
- result.append(token);
113038
- }
113039
-
113040
- return result.toAbsolutePath();
113041
- }
113042
-
113043
- applyInstancesDirty(instances) {
113044
- return super.applyInstancesDirty(instances).toAbsolute();
113045
- }
113046
-
113047
113054
  }
113048
113055
 
113049
113056
  /***/ }),
@@ -113085,6 +113092,16 @@ class ModelPathBuilder {
113085
113092
  return (0,_ModelPath__WEBPACK_IMPORTED_MODULE_0__.joinModelPaths)(...this.parts);
113086
113093
  }
113087
113094
 
113095
+ toResolvedPath() {
113096
+ const result = this.toPath();
113097
+
113098
+ if (!result.isResolved()) {
113099
+ throw new Error("Path cannot be casted to resolved");
113100
+ }
113101
+
113102
+ return result;
113103
+ }
113104
+
113088
113105
  toAbsolutePath() {
113089
113106
  return this.toPath().toAbsolute();
113090
113107
  }
@@ -113468,6 +113485,7 @@ function assertIs(value) {// noop
113468
113485
  "use strict";
113469
113486
  __webpack_require__.r(__webpack_exports__);
113470
113487
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
113488
+ /* harmony export */ "unitWithoutInstance": () => (/* binding */ unitWithoutInstance),
113471
113489
  /* harmony export */ "isUnitIdEquals": () => (/* binding */ isUnitIdEquals),
113472
113490
  /* harmony export */ "sectionNameToUnitId": () => (/* binding */ sectionNameToUnitId),
113473
113491
  /* harmony export */ "unitIdToLegacyUnitId": () => (/* binding */ unitIdToLegacyUnitId),
@@ -113477,8 +113495,19 @@ __webpack_require__.r(__webpack_exports__);
113477
113495
  /* harmony import */ var fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fbjs/lib/areEqual */ "./node_modules/fbjs/lib/areEqual.js");
113478
113496
  /* harmony import */ var fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0__);
113479
113497
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
113498
+ /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
113499
+
113480
113500
 
113481
113501
 
113502
+ function unitWithoutInstance(unitId) {
113503
+ if (unitId.instance == undefined) {
113504
+ return unitId;
113505
+ }
113506
+
113507
+ return { ...unitId,
113508
+ instance: undefined
113509
+ };
113510
+ }
113482
113511
  function isUnitIdEquals(left, right) {
113483
113512
  var _left$instance, _right$instance, _left$parentInstances, _right$parentInstance;
113484
113513
 
@@ -113493,11 +113522,28 @@ function isUnitIdEquals(left, right) {
113493
113522
  return left.pageId === right.pageId && ((_left$instance = left.instance) !== null && _left$instance !== void 0 ? _left$instance : undefined) === ((_right$instance = right.instance) !== null && _right$instance !== void 0 ? _right$instance : undefined) && fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0___default()((_left$parentInstances = left.parentInstances) !== null && _left$parentInstances !== void 0 ? _left$parentInstances : [], (_right$parentInstance = right.parentInstances) !== null && _right$parentInstance !== void 0 ? _right$parentInstance : []);
113494
113523
  }
113495
113524
  function sectionNameToUnitId(sectionName) {
113496
- const [id, instance] = sectionName.split("-");
113497
- return {
113498
- pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
113499
- instance: instance
113500
- };
113525
+ const [id, ...instances] = sectionName.split("-");
113526
+
113527
+ if (instances.length === 0) {
113528
+ return {
113529
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
113530
+ };
113531
+ } else if (instances.length === 1) {
113532
+ var _instances$;
113533
+
113534
+ return {
113535
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
113536
+ instance: (_instances$ = instances[0]) !== null && _instances$ !== void 0 ? _instances$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
113537
+ };
113538
+ } else {
113539
+ var _IterUtils$last;
113540
+
113541
+ return {
113542
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
113543
+ parentInstances: instances.slice(0, -1),
113544
+ instance: (_IterUtils$last = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.last(instances)) !== null && _IterUtils$last !== void 0 ? _IterUtils$last : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
113545
+ };
113546
+ }
113501
113547
  }
113502
113548
  function unitIdToLegacyUnitId(unitId) {
113503
113549
  if (unitId == undefined) {
@@ -121302,7 +121348,7 @@ class FormSchemaRngTypeInfo {
121302
121348
  const builder = (0,_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_3__.instanceBuilder)("Validators.EnumerationValueValidator");
121303
121349
  builder.set(0, this.enumeration);
121304
121350
  builder.set(1, "error");
121305
- builder.set(2, description !== null && description !== void 0 ? description : this.buildDefaultDescription());
121351
+ builder.set(2, description);
121306
121352
  yield builder;
121307
121353
  }
121308
121354
 
@@ -127319,6 +127365,8 @@ __webpack_require__.r(__webpack_exports__);
127319
127365
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
127320
127366
  /* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
127321
127367
  /* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/ElementProcessors/FormParts/Page/PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
127368
+ /* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
127369
+
127322
127370
 
127323
127371
 
127324
127372
 
@@ -127338,8 +127386,10 @@ var RequisiteSectionMode;
127338
127386
 
127339
127387
  const emptyDataDeclarationCollection = {};
127340
127388
  class DataDeclarationGenerationContext {
127341
- constructor(initSequenceFactory, controlCustomizationContext, typesRegistry) {
127389
+ constructor(initSequenceFactory, controlCustomizationContext, typesRegistry, formSchemaRng, schemeValidations) {
127342
127390
  this.initSequenceFactory = void 0;
127391
+ this.formSchemaRng = void 0;
127392
+ this.schemeValidations = void 0;
127343
127393
  this.controlCustomizationContext = void 0;
127344
127394
  this.typesRegistry = void 0;
127345
127395
 
@@ -127369,11 +127419,29 @@ class DataDeclarationGenerationContext {
127369
127419
  return undefined;
127370
127420
  };
127371
127421
 
127422
+ this.formSchemaRng = formSchemaRng;
127423
+ this.schemeValidations = schemeValidations;
127372
127424
  this.initSequenceFactory = initSequenceFactory;
127373
127425
  this.controlCustomizationContext = controlCustomizationContext;
127374
127426
  this.typesRegistry = typesRegistry;
127375
127427
  }
127376
127428
 
127429
+ isMultipleNodeOptionalFromScheme(path) {
127430
+ if (!this.schemeValidations) {
127431
+ return undefined;
127432
+ }
127433
+
127434
+ const schemaNode = this.formSchemaRng.getElementByPath(path);
127435
+
127436
+ if (schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__.FormSchemaRngElement) {
127437
+ var _schemaNode$isOptiona;
127438
+
127439
+ return (_schemaNode$isOptiona = schemaNode.isOptionalOrNillable()) !== null && _schemaNode$isOptiona !== void 0 ? _schemaNode$isOptiona : false;
127440
+ }
127441
+
127442
+ return undefined;
127443
+ }
127444
+
127377
127445
  getTypeNode(node) {
127378
127446
  if (node.anonymousType != undefined) {
127379
127447
  return node.anonymousType;
@@ -127682,11 +127750,15 @@ __webpack_require__.r(__webpack_exports__);
127682
127750
 
127683
127751
 
127684
127752
  class DataDeclarationGenerator {
127685
- constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry) {
127753
+ constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry, formSchemaRng, schemeValidations) {
127686
127754
  this.sugarRoot = void 0;
127687
127755
  this.initSequenceFactory = void 0;
127756
+ this.formSchemaRng = void 0;
127757
+ this.schemeValidations = void 0;
127688
127758
  this.controlCustomizationContext = void 0;
127689
127759
  this.typesRegistry = void 0;
127760
+ this.formSchemaRng = formSchemaRng;
127761
+ this.schemeValidations = schemeValidations;
127690
127762
  this.sugarRoot = sugarRoot;
127691
127763
  this.initSequenceFactory = initSequenceFactory;
127692
127764
  this.controlCustomizationContext = controlCustomizationContext;
@@ -127698,7 +127770,7 @@ class DataDeclarationGenerator {
127698
127770
 
127699
127771
  const converterClass = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
127700
127772
  const converter = new converterClass(this.sugarRoot);
127701
- const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
127773
+ const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry, this.formSchemaRng, this.schemeValidations);
127702
127774
  const dataDeclaration = converter.buildDataDeclaration(context);
127703
127775
  const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
127704
127776
  const result = this.replaceHolder(`
@@ -127732,7 +127804,7 @@ class DataDeclarationGenerator {
127732
127804
 
127733
127805
  const converterClass = (_getConverterByNodeCl2 = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl2 !== void 0 ? _getConverterByNodeCl2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
127734
127806
  const converter = new converterClass(this.sugarRoot);
127735
- const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
127807
+ const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry, this.formSchemaRng, this.schemeValidations);
127736
127808
  const dataDeclaration = converter.buildDataDeclaration(context);
127737
127809
  const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
127738
127810
  return `
@@ -128856,7 +128928,7 @@ __webpack_require__.r(__webpack_exports__);
128856
128928
 
128857
128929
  function processSugar(formSugarContent, additionalContent, generationOptions) {
128858
128930
  try {
128859
- var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
128931
+ var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _sugarRoot$schemaVali3, _generationOptions$re, _sugarRoot$schemaVali4, _additionalContent$fo, _additionalContent$fo2;
128860
128932
 
128861
128933
  const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
128862
128934
  const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
@@ -128871,17 +128943,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
128871
128943
  const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions); // tslint:disable-next-line no-unsafe-any
128872
128944
 
128873
128945
  const additionalSettings = typeof additionalContent.additionalSettings === "string" ? JSON.parse(additionalContent.additionalSettings || "{}") : additionalContent.additionalSettings;
128874
- const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry);
128946
+ const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false);
128875
128947
  const {
128876
128948
  dataDeclarationContent,
128877
128949
  dataDeclaration
128878
128950
  } = dataDeclarationGenerator.generate();
128879
128951
  const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
128880
- const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, additionalContent.validationsContent);
128881
- const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, controlCustomizationContext);
128952
+ const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, additionalContent.validationsContent);
128953
+ const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false, controlCustomizationContext);
128882
128954
  const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
128883
128955
  const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
128884
- const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
128956
+ const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali4 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali4 !== void 0 ? _sugarRoot$schemaVali4 : false);
128885
128957
  markupGenerator.generate(sugarRoot, builder);
128886
128958
  builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
128887
128959
  builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
@@ -136015,7 +136087,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
136015
136087
  type: "Expression",
136016
136088
  expression: validationGenerator.generateValidationsFactory()
136017
136089
  });
136018
- const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry);
136090
+ const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry, _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_7__.FormSchemaRng.createEmpty(), false);
136019
136091
  userPicklistDeclarationBuilder.prop(x => x.editorDataDeclaration).set({
136020
136092
  type: "Expression",
136021
136093
  expression: dataDeclarationGenerator.generateDataDeclarationFactory()
@@ -140843,10 +140915,10 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
140843
140915
  }
140844
140916
 
140845
140917
  if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.MultilineNode) {
140846
- var _rowNode$optional2;
140918
+ var _ref, _rowNode$optional2;
140847
140919
 
140848
140920
  this.ensurePathExists(rowNode, rowNode.dataScope.path);
140849
- return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
140921
+ return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_ref = (_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath())) !== null && _ref !== void 0 ? _ref : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
140850
140922
  optional: rowNode.optional
140851
140923
  }), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
140852
140924
  if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.CrossfitTableRowNode) {
@@ -142768,10 +142840,10 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
142768
142840
  }
142769
142841
 
142770
142842
  doBuildDataDeclaration(context) {
142771
- var _node$optional;
142843
+ var _ref, _node$optional;
142772
142844
 
142773
142845
  const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
142774
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
142846
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addSpecialFieldsEntry(node, {
142775
142847
  optional: node.optional
142776
142848
  }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
142777
142849
  }
@@ -142937,10 +143009,10 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
142937
143009
  }
142938
143010
 
142939
143011
  doBuildDataDeclaration(context) {
142940
- var _node$optional;
143012
+ var _ref, _node$optional;
142941
143013
 
142942
143014
  const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
142943
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
143015
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addSpecialFieldsEntry(node, {
142944
143016
  optional: node.optional
142945
143017
  }), context.addPathSectionDeclarationEntry(node));
142946
143018
  }
@@ -144120,9 +144192,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
144120
144192
 
144121
144193
  processMultilineNode(context, rowNode) {
144122
144194
  if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.StickyTableMultilineNode) {
144123
- var _rowNode$optional;
144195
+ var _ref, _rowNode$optional;
144124
144196
 
144125
- return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
144197
+ return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_ref = (_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath())) !== null && _ref !== void 0 ? _ref : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
144126
144198
  optional: rowNode.optional
144127
144199
  }), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
144128
144200
  }
@@ -144195,11 +144267,11 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
144195
144267
  const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
144196
144268
 
144197
144269
  if (this.isSimpleForm()) {
144198
- var _ref, _node$deprecatedDiado;
144270
+ var _ref2, _node$deprecatedDiado;
144199
144271
 
144200
144272
  mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
144201
144273
  mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
144202
- const width = (_ref = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref !== void 0 ? _ref : maxWidthSimpleForm;
144274
+ const width = (_ref2 = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref2 !== void 0 ? _ref2 : maxWidthSimpleForm;
144203
144275
  mb.prop(x => x.width).set(width);
144204
144276
  mb.prop(x => x.footerHeight).set(160);
144205
144277
  } else {
@@ -144482,10 +144554,10 @@ BindingPath: ${errorPath}`));
144482
144554
  if (this.isSimpleForm()) {
144483
144555
  mb.prop(x => x.buttonType).set(undefined);
144484
144556
  } else {
144485
- var _multiline$rowmenu, _ref2, _tableNode$removeButt;
144557
+ var _multiline$rowmenu, _ref3, _tableNode$removeButt;
144486
144558
 
144487
144559
  const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
144488
- const removebutton = (_ref2 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref2 !== void 0 ? _ref2 : true;
144560
+ const removebutton = (_ref3 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true;
144489
144561
  mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
144490
144562
  }
144491
144563
 
@@ -144498,7 +144570,7 @@ BindingPath: ${errorPath}`));
144498
144570
  }
144499
144571
 
144500
144572
  getMultiline(context, node, multiline, start, end = Infinity) {
144501
- var _ref3, _node$removeButton, _multiline$rowmenu2, _ref4, _node$removeButton2, _context$popPathsCont2;
144573
+ var _ref4, _node$removeButton, _multiline$rowmenu2, _ref5, _node$removeButton2, _context$popPathsCont2;
144502
144574
 
144503
144575
  const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
144504
144576
  const mb = overrideInfo == undefined ? (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("MultiLine") : (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)(overrideInfo.dependencies, overrideInfo.controlName);
@@ -144511,7 +144583,7 @@ BindingPath: ${errorPath}`));
144511
144583
  mb.prop(x => x.isList).set(multiline.usepager === false ? true : undefined);
144512
144584
  mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_13__.getNewBindingPathExpression)(multiline));
144513
144585
  mb.prop(x => x.showRowBorder).set(multiline.showRowBorder);
144514
- const hasRemoveButton = ((_ref3 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
144586
+ const hasRemoveButton = ((_ref4 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
144515
144587
  const needAddButton = multiline.addbutton !== "false";
144516
144588
 
144517
144589
  if (this.isSimpleForm()) {
@@ -144524,7 +144596,7 @@ BindingPath: ${errorPath}`));
144524
144596
  mb.prop(x => x.removeButtonPosition).set(undefined);
144525
144597
  }
144526
144598
 
144527
- mb.prop(x => x.disableScroll).set(needAddButton || ((_ref4 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) ? undefined : true);
144599
+ mb.prop(x => x.disableScroll).set(needAddButton || ((_ref5 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) ? undefined : true);
144528
144600
  context.pushPathsContext();
144529
144601
 
144530
144602
  if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
@@ -144550,9 +144622,9 @@ BindingPath: ${errorPath}`));
144550
144622
  hasActionButton(node) {
144551
144623
  const multilines = node.rows.map(child => (0,_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)(child) ? child : child.columns.find(_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined);
144552
144624
  return multilines.some(multiline => {
144553
- var _ref5, _node$removeButton3;
144625
+ var _ref6, _node$removeButton3;
144554
144626
 
144555
- return ((_ref5 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) || multiline.rowmenu;
144627
+ return ((_ref6 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref6 !== void 0 ? _ref6 : true) || multiline.rowmenu;
144556
144628
  });
144557
144629
  }
144558
144630
 
@@ -144778,10 +144850,10 @@ class Table2MultirowConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
144778
144850
  }
144779
144851
 
144780
144852
  doBuildDataDeclaration(context) {
144781
- var _node$optional;
144853
+ var _ref, _node$optional;
144782
144854
 
144783
144855
  const node = this.getCurrentNodeAs(_Table2Node__WEBPACK_IMPORTED_MODULE_3__.Table2MultirowNode);
144784
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
144856
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addPathSectionDeclarationEntry(node));
144785
144857
  }
144786
144858
 
144787
144859
  buildChildrenDataDeclaration(context) {
@@ -145600,10 +145672,10 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
145600
145672
  }
145601
145673
 
145602
145674
  doBuildDataDeclaration(context) {
145603
- var _node$optional;
145675
+ var _ref, _node$optional;
145604
145676
 
145605
145677
  const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
145606
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
145678
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addPathSectionDeclarationEntry(node));
145607
145679
  }
145608
145680
 
145609
145681
  buildChildrenDataDeclaration(context) {
@@ -146798,7 +146870,6 @@ class HeaderPanelConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_
146798
146870
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("HeaderPanel");
146799
146871
  markupBuilder.appendChild(context.convertChildNodes(node.children));
146800
146872
  markupBuilder.prop(x => x.onBackButtonClick).set(context.generateHelperFunctionExpression(node, "onBackButtonClick", node.onBackButtonClick));
146801
- markupBuilder.prop(x => x.bindingPath).set(node.getFullPath());
146802
146873
  markupBuilder.prop(x => x.backButtonHint).set(node.backButtonHint);
146803
146874
  return markupBuilder.buildConverterResult();
146804
146875
  }
@@ -148385,6 +148456,7 @@ class FiasFssConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
148385
148456
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("FiasFss");
148386
148457
  markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_0__.getNewBindingPathExpression)(node));
148387
148458
  markupBuilder.prop(x => x.postalTransfer).set(node.postalTransfer || false);
148459
+ markupBuilder.prop(x => x.optionalIndex).set(node.optionalIndex || false);
148388
148460
  return markupBuilder.buildConverterResult();
148389
148461
  }
148390
148462
 
@@ -148415,17 +148487,19 @@ __webpack_require__.r(__webpack_exports__);
148415
148487
 
148416
148488
 
148417
148489
 
148418
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
148490
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
148419
148491
 
148420
148492
 
148421
148493
 
148422
- let FiasFssNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fiasfss", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FiasFss sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("postalTransfer", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Адрес для перевода выплаты по почте"), _dec(_class = (_class2 = class FiasFssNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
148494
+ let FiasFssNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fiasfss", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FiasFss sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("postalTransfer", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Адрес для перевода выплаты по почте"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("optionalIndex", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Опциональный индекс. По умолчание - false (не опциональный)"), _dec(_class = (_class2 = class FiasFssNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
148423
148495
  constructor(...args) {
148424
148496
  super(...args);
148425
148497
 
148426
148498
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataBinding", _descriptor, this);
148427
148499
 
148428
148500
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "postalTransfer", _descriptor2, this);
148501
+
148502
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optionalIndex", _descriptor3, this);
148429
148503
  }
148430
148504
 
148431
148505
  getOwnPath() {
@@ -148442,6 +148516,11 @@ let FiasFssNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODUL
148442
148516
  enumerable: true,
148443
148517
  writable: true,
148444
148518
  initializer: null
148519
+ }), _descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "optionalIndex", [_dec4], {
148520
+ configurable: true,
148521
+ enumerable: true,
148522
+ writable: true,
148523
+ initializer: null
148445
148524
  })), _class2)) || _class);
148446
148525
 
148447
148526
  /***/ }),
@@ -148586,7 +148665,7 @@ class FiasPfrConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
148586
148665
 
148587
148666
  doBuildDataDeclaration(context) {
148588
148667
  const node = this.getCurrentNodeAs(_FiasPfrNode__WEBPACK_IMPORTED_MODULE_4__.FiasPfrNode);
148589
- return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ТипАдреса", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "Индекс", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Регион/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Регион/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Район/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Район/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Город/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Город/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/НаселенныйПункт/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/НаселенныйПункт/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Улица/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Улица/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Дом/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Дом/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Корпус/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Корпус/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Квартира/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Квартира/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/КодСтраны", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/НазваниеСтраны", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/Адрес", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "НеструктурированныйАдрес/Адрес", node.dataBinding.requisite));
148668
+ return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ТипАдреса", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "Индекс", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Регион/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Регион/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Район/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Район/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Город/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Город/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/НаселенныйПункт/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/НаселенныйПункт/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Улица/ГеографическоеНазвание", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Улица/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Дом/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Дом/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Корпус/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Корпус/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Квартира/Сокращение", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "РоссийскийАдрес/Квартира/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/КодСтраны", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/НазваниеСтраны", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИностранныйАдрес/Адрес", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "НеструктурированныйАдрес/Адрес", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "fullAddress", node.dataBinding.requisite));
148590
148669
  }
148591
148670
 
148592
148671
  buildChildrenDataDeclaration(context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "4.251.0-hobbit.0",
3
+ "version": "4.251.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,