@kontur.candy/generator 5.129.0-perm-links.1 → 5.129.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 +350 -54
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -47473,7 +47473,7 @@ class ModelPathImpl {
47473
47473
  }
47474
47474
  return this;
47475
47475
  }
47476
- trimFirstStarIfLastToken() {
47476
+ trimFirstStarIfFirstToken() {
47477
47477
  const firstItem = _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.first(this.tokens);
47478
47478
  if (firstItem != undefined && PathTokens.isMultiToken(firstItem)) {
47479
47479
  return new ModelPathImpl(this.tokens.slice(1), this.absolute);
@@ -47512,6 +47512,26 @@ class ModelPathImpl {
47512
47512
  // @ts-expect-error
47513
47513
  return result.toPath();
47514
47514
  }
47515
+ applyCommonInstancesFromAnotherPath(modelPath) {
47516
+ const anotherTokens = modelPath.getPathPartsAsArray();
47517
+ const updatedTokens = this.tokens.reduce((acc, token, index) => {
47518
+ const anotherToken = anotherTokens[index];
47519
+ const nextTokenInfo = acc.matching && (PathTokens.isMultiToken(token) && PathTokens.isInstanceToken(anotherToken) || PathTokens.isSimpleToken(token) && PathTokens.isSimpleToken(anotherToken) && token === anotherToken) ? {
47520
+ nextToken: anotherToken,
47521
+ matching: true
47522
+ } : {
47523
+ nextToken: token,
47524
+ matching: false
47525
+ };
47526
+ acc.matching = nextTokenInfo.matching;
47527
+ acc.tokens[index] = nextTokenInfo.nextToken;
47528
+ return acc;
47529
+ }, {
47530
+ tokens: Array.from(this.tokens),
47531
+ matching: true
47532
+ }).tokens;
47533
+ return new ModelPathImpl(updatedTokens, this.absolute);
47534
+ }
47515
47535
  pathPartToString(pathPart) {
47516
47536
  if (typeof pathPart === "string") {
47517
47537
  return pathPart;
@@ -49041,7 +49061,7 @@ function nonRegularFieldName(fieldName) {
49041
49061
  function ensureIsKnownViewModelFieldName(fieldName) {
49042
49062
  return getKnownViewModelFieldNames().has(fieldName) ? fieldName : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(`[${fieldName}] is not known ViewModelFieldName`);
49043
49063
  }
49044
- const keysOfViewModelFieldName = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId", "dirtyChangedPathMasks"];
49064
+ const keysOfViewModelFieldName = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId", "dirtyChangedPathMasks", "forceAutoValue"];
49045
49065
  const allKeysOfViewModelFieldName = keysOfViewModelFieldName;
49046
49066
  const names = new Set(allKeysOfViewModelFieldName);
49047
49067
  function getKnownViewModelFieldNames() {
@@ -49691,6 +49711,7 @@ __webpack_require__.r(__webpack_exports__);
49691
49711
  /* harmony export */ isValidDate: () => (/* binding */ isValidDate),
49692
49712
  /* harmony export */ isValidStringDate: () => (/* binding */ isValidStringDate),
49693
49713
  /* harmony export */ parseDateString: () => (/* binding */ parseDateString),
49714
+ /* harmony export */ parseDateStringAsDate: () => (/* binding */ parseDateStringAsDate),
49694
49715
  /* harmony export */ tryGetValidDateShape: () => (/* binding */ tryGetValidDateShape)
49695
49716
  /* harmony export */ });
49696
49717
  /* harmony import */ var _Engine_ValidationHelper_ValidationHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Engine/ValidationHelper/ValidationHelper */ "./Engine/src/Engine/ValidationHelper/ValidationHelper.ts");
@@ -49725,6 +49746,10 @@ function tryGetValidDateShape(x) {
49725
49746
  }
49726
49747
  return undefined;
49727
49748
  }
49749
+ function parseDateStringAsDate(value) {
49750
+ const shape = tryGetValidDateShape(parseDateString(value));
49751
+ return shape != undefined ? new Date(Date.UTC(shape.year, shape.month, shape.date)) : undefined;
49752
+ }
49728
49753
  const comparator = (a, b) => {
49729
49754
  if (a.year < b.year) {
49730
49755
  return -1;
@@ -49868,7 +49893,9 @@ __webpack_require__.r(__webpack_exports__);
49868
49893
  /* harmony export */ });
49869
49894
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
49870
49895
  /* harmony import */ var _DateHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DateHelpers */ "./Engine/src/Helpers/DateHelpers.ts");
49871
- /* harmony import */ var _FilterExpression__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FilterExpression */ "./Engine/src/Helpers/FilterExpressions/FilterExpression.ts");
49896
+ /* harmony import */ var _AutocalcCommonFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AutocalcCommonFunctions */ "./Engine/src/Helpers/AutocalcCommonFunctions.ts");
49897
+ /* harmony import */ var _FilterExpression__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FilterExpression */ "./Engine/src/Helpers/FilterExpressions/FilterExpression.ts");
49898
+
49872
49899
 
49873
49900
 
49874
49901
 
@@ -49879,22 +49906,26 @@ function compileFilterExpression(expression) {
49879
49906
  class FilterExpressionTransduceVisitor {
49880
49907
  transformExpression(expression) {
49881
49908
  switch (expression.operator) {
49882
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.Or:
49909
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.Or:
49883
49910
  return this.transformOrExpression(expression);
49884
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.And:
49911
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.And:
49885
49912
  return this.transformAndExpression(expression);
49886
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.Equal:
49913
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.Equal:
49887
49914
  return this.transformEqualExpression(expression);
49888
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.StartDate:
49915
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.StartDate:
49889
49916
  return this.transformStartDateExpression(expression);
49890
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.EndDate:
49917
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.EndDate:
49891
49918
  return this.transformEndDateExpression(expression);
49892
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.Substring:
49919
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.Substring:
49893
49920
  return this.transformSubstringExpression(expression);
49894
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.UnaryNot:
49921
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.UnaryNot:
49895
49922
  return this.transformUnaryNotExpression(expression);
49896
- case _FilterExpression__WEBPACK_IMPORTED_MODULE_2__.OperatorType.ByInstances:
49923
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.ByInstances:
49897
49924
  return this.transformByInstancesExpression(expression);
49925
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.LessOrEqual:
49926
+ return this.transformLessOrEqualExpression(expression);
49927
+ case _FilterExpression__WEBPACK_IMPORTED_MODULE_3__.OperatorType.GreaterOrEqual:
49928
+ return this.transformGreaterOrEqualExpression(expression);
49898
49929
  default:
49899
49930
  (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(expression);
49900
49931
  return this.createDefaultResult();
@@ -49942,6 +49973,20 @@ class CompileFilterExpressionTransduceVisitor extends FilterExpressionTransduceV
49942
49973
  return expression.condition.instances.some(x => x === instance);
49943
49974
  };
49944
49975
  }
49976
+ transformLessOrEqualExpression(expression) {
49977
+ const conditionValue = (0,_AutocalcCommonFunctions__WEBPACK_IMPORTED_MODULE_2__.wrapDecimalOrUndefined)(this.transformConditionValueExpression(expression.condition));
49978
+ return getModelValuesFn => getModelValuesFn(expression.condition.dataPath).some(x => {
49979
+ const typedDataPathValue = (0,_AutocalcCommonFunctions__WEBPACK_IMPORTED_MODULE_2__.wrapDecimalOrUndefined)(x);
49980
+ return conditionValue != undefined && typedDataPathValue != undefined ? typedDataPathValue.lte(conditionValue) : false;
49981
+ });
49982
+ }
49983
+ transformGreaterOrEqualExpression(expression) {
49984
+ const conditionValue = (0,_AutocalcCommonFunctions__WEBPACK_IMPORTED_MODULE_2__.wrapDecimalOrUndefined)(this.transformConditionValueExpression(expression.condition));
49985
+ return getModelValuesFn => getModelValuesFn(expression.condition.dataPath).some(x => {
49986
+ const typedDataPathValue = (0,_AutocalcCommonFunctions__WEBPACK_IMPORTED_MODULE_2__.wrapDecimalOrUndefined)(x);
49987
+ return conditionValue != undefined && typedDataPathValue != undefined ? typedDataPathValue.gte(conditionValue) : false;
49988
+ });
49989
+ }
49945
49990
  }
49946
49991
  function stringNormalize(str) {
49947
49992
  return str.trim().toLocaleLowerCase();
@@ -49998,6 +50043,8 @@ let OperatorType = /*#__PURE__*/function (OperatorType) {
49998
50043
  OperatorType["EndDate"] = "endDate";
49999
50044
  OperatorType["Substring"] = "substring";
50000
50045
  OperatorType["ByInstances"] = "byInstances";
50046
+ OperatorType["LessOrEqual"] = "lessOrEqual";
50047
+ OperatorType["GreaterOrEqual"] = "greaterOrEqual";
50001
50048
  return OperatorType;
50002
50049
  }({});
50003
50050
  let FilterType = /*#__PURE__*/function (FilterType) {
@@ -50096,6 +50143,24 @@ class FilterExpressionResolveBindingPaths extends _CompileFilterExpression__WEBP
50096
50143
  condition: this.transformExpression(expression.condition)
50097
50144
  };
50098
50145
  }
50146
+ transformLessOrEqualExpression(expression) {
50147
+ return {
50148
+ ...expression,
50149
+ condition: {
50150
+ ...expression.condition,
50151
+ dataPath: this.pathResolver(expression.condition.dataPath)
50152
+ }
50153
+ };
50154
+ }
50155
+ transformGreaterOrEqualExpression(expression) {
50156
+ return {
50157
+ ...expression,
50158
+ condition: {
50159
+ ...expression.condition,
50160
+ dataPath: this.pathResolver(expression.condition.dataPath)
50161
+ }
50162
+ };
50163
+ }
50099
50164
  }
50100
50165
 
50101
50166
  /***/ }),
@@ -50778,6 +50843,7 @@ __webpack_require__.r(__webpack_exports__);
50778
50843
  /* harmony export */ existsKCLangFunction: () => (/* binding */ existsKCLangFunction),
50779
50844
  /* harmony export */ firstOrDefaultKCLangFunction: () => (/* binding */ firstOrDefaultKCLangFunction),
50780
50845
  /* harmony export */ floorKCLangFunction: () => (/* binding */ floorKCLangFunction),
50846
+ /* harmony export */ getDateTimeTicksKCLangFunction: () => (/* binding */ getDateTimeTicksKCLangFunction),
50781
50847
  /* harmony export */ getDayKCLangFunction: () => (/* binding */ getDayKCLangFunction),
50782
50848
  /* harmony export */ getDaysInMonthKCLangFunction: () => (/* binding */ getDaysInMonthKCLangFunction),
50783
50849
  /* harmony export */ getMonthKCLangFunction: () => (/* binding */ getMonthKCLangFunction),
@@ -51597,6 +51663,22 @@ const denominatorKCLangFunction = params => {
51597
51663
  expression: param
51598
51664
  };
51599
51665
  };
51666
+ const getDateTimeTicksKCLangFunction = params => {
51667
+ var _params$58;
51668
+ const errors = Array.from(validateParams(params, 1));
51669
+ if (errors.length > 0) {
51670
+ return new FunctionValidationErrorCollection(errors);
51671
+ }
51672
+ const expr = (_params$58 = params[0]) === null || _params$58 === void 0 ? void 0 : _params$58.value;
51673
+ if (expr == undefined) {
51674
+ const argumentsValidationError = new ArgumentValidationError("Invalid arguments expression");
51675
+ return new FunctionValidationErrorCollection([argumentsValidationError]);
51676
+ }
51677
+ return {
51678
+ type: "getDateTimeTicks",
51679
+ expression: expr
51680
+ };
51681
+ };
51600
51682
 
51601
51683
  /***/ }),
51602
51684
 
@@ -51676,7 +51758,8 @@ const getKCLangGlobalFunctionBuilders = () => ({
51676
51758
  join: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.joinKCLangFunction],
51677
51759
  isEqualToAutoCalculated: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.isEqualToAutoCalculatedFunction],
51678
51760
  numerator: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.numeratorKCLangFunction],
51679
- denominator: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.denominatorKCLangFunction]
51761
+ denominator: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.denominatorKCLangFunction],
51762
+ getDateTimeTicks: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_7__.getDateTimeTicksKCLangFunction]
51680
51763
  });
51681
51764
  class KCLangAntlrParser {
51682
51765
  static parse(code) {
@@ -52071,7 +52154,7 @@ class KCLangAntlrVisitor {
52071
52154
  dataType = "array";
52072
52155
  break;
52073
52156
  default:
52074
- throw Error("visitType syntax incorrect");
52157
+ throw Error(`visitType syntax incorrect: ${contextName} is not supported!`);
52075
52158
  }
52076
52159
  return {
52077
52160
  type: "CastDataTypeNode",
@@ -60373,6 +60456,32 @@ class FunctionCall extends _KCLangExpression__WEBPACK_IMPORTED_MODULE_0__.KCLang
60373
60456
 
60374
60457
  /***/ }),
60375
60458
 
60459
+ /***/ "./Generator/src/common/KCLang/CodeDom/Functions/DateTimeFunctionCall.ts":
60460
+ /*!*******************************************************************************!*\
60461
+ !*** ./Generator/src/common/KCLang/CodeDom/Functions/DateTimeFunctionCall.ts ***!
60462
+ \*******************************************************************************/
60463
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
60464
+
60465
+ "use strict";
60466
+ __webpack_require__.r(__webpack_exports__);
60467
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
60468
+ /* harmony export */ DateTimeFunctionCall: () => (/* binding */ DateTimeFunctionCall)
60469
+ /* harmony export */ });
60470
+ /* harmony import */ var _FunctionCall__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../FunctionCall */ "./Generator/src/common/KCLang/CodeDom/FunctionCall.ts");
60471
+ /* harmony import */ var _KCLangType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../KCLangType */ "./Generator/src/common/KCLang/CodeDom/KCLangType.ts");
60472
+
60473
+
60474
+ class DateTimeFunctionCall extends _FunctionCall__WEBPACK_IMPORTED_MODULE_0__.FunctionCall {
60475
+ constructor(expr) {
60476
+ super("dateTime", [expr]);
60477
+ }
60478
+ getType() {
60479
+ return _KCLangType__WEBPACK_IMPORTED_MODULE_1__.DateType.default;
60480
+ }
60481
+ }
60482
+
60483
+ /***/ }),
60484
+
60376
60485
  /***/ "./Generator/src/common/KCLang/CodeDom/Functions/ExistsFunctionCall.ts":
60377
60486
  /*!*****************************************************************************!*\
60378
60487
  !*** ./Generator/src/common/KCLang/CodeDom/Functions/ExistsFunctionCall.ts ***!
@@ -60399,6 +60508,32 @@ class ExistsFunctionCall extends _FunctionCall__WEBPACK_IMPORTED_MODULE_0__.Func
60399
60508
 
60400
60509
  /***/ }),
60401
60510
 
60511
+ /***/ "./Generator/src/common/KCLang/CodeDom/Functions/GetDateTimeTicksFunctionCall.ts":
60512
+ /*!***************************************************************************************!*\
60513
+ !*** ./Generator/src/common/KCLang/CodeDom/Functions/GetDateTimeTicksFunctionCall.ts ***!
60514
+ \***************************************************************************************/
60515
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
60516
+
60517
+ "use strict";
60518
+ __webpack_require__.r(__webpack_exports__);
60519
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
60520
+ /* harmony export */ GetDateTimeTicksFunctionCall: () => (/* binding */ GetDateTimeTicksFunctionCall)
60521
+ /* harmony export */ });
60522
+ /* harmony import */ var _FunctionCall__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../FunctionCall */ "./Generator/src/common/KCLang/CodeDom/FunctionCall.ts");
60523
+ /* harmony import */ var _KCLangType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../KCLangType */ "./Generator/src/common/KCLang/CodeDom/KCLangType.ts");
60524
+
60525
+
60526
+ class GetDateTimeTicksFunctionCall extends _FunctionCall__WEBPACK_IMPORTED_MODULE_0__.FunctionCall {
60527
+ constructor(expr) {
60528
+ super("getDateTimeTicks", [expr]);
60529
+ }
60530
+ getType() {
60531
+ return _KCLangType__WEBPACK_IMPORTED_MODULE_1__.DecimalType.default;
60532
+ }
60533
+ }
60534
+
60535
+ /***/ }),
60536
+
60402
60537
  /***/ "./Generator/src/common/KCLang/CodeDom/Functions/GetPicklistValuesFunctionCall.ts":
60403
60538
  /*!****************************************************************************************!*\
60404
60539
  !*** ./Generator/src/common/KCLang/CodeDom/Functions/GetPicklistValuesFunctionCall.ts ***!
@@ -61583,6 +61718,9 @@ function traverseKCLangExpression(node, visitor) {
61583
61718
  case "denominator":
61584
61719
  visitor.visitDenominatorKCLangNode(node);
61585
61720
  break;
61721
+ case "getDateTimeTicks":
61722
+ visitor.visitGetDateTimeTicksNode(node);
61723
+ break;
61586
61724
  default:
61587
61725
  (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
61588
61726
  break;
@@ -61592,6 +61730,9 @@ class DefaultKCLangExpressionVisitor {
61592
61730
  visitAbsKCLangNode(_node) {
61593
61731
  // default empty implementation
61594
61732
  }
61733
+ visitGetDateTimeTicksNode(_node) {
61734
+ // default empty implementation
61735
+ }
61595
61736
  visitArrayKCLangNode(_node) {
61596
61737
  // default empty implementation
61597
61738
  }
@@ -62112,6 +62253,7 @@ const getGenerateJsExpressionFunc = options => {
62112
62253
  case "makeDict":
62113
62254
  case "getSumByKeys":
62114
62255
  case "join":
62256
+ case "getDateTimeTicks":
62115
62257
  throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
62116
62258
  default:
62117
62259
  (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(expression);
@@ -62303,9 +62445,10 @@ function generateKCXmlExpression(expression, prefixPath = "") {
62303
62445
  throw new Error(`One of supports only array literal on the right`);
62304
62446
  }
62305
62447
  }
62448
+ case "getDateTimeTicks":
62449
+ return [`<m:getDateTimeTicks>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression, prefixPath), 1), `</m:getDateTimeTicks>`].join("\n");
62306
62450
  default:
62307
- // @ts-ignore
62308
- throw new Error(`Expression of type '${expression.type}' is not supported`);
62451
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Expression '${expression}' is not supported`);
62309
62452
  }
62310
62453
  }
62311
62454
  function isPathPrefix(contextBlock) {
@@ -62704,6 +62847,7 @@ class FormSchemaRngElement {
62704
62847
  this.useServerFilters = void 0;
62705
62848
  this.attributes = new Map();
62706
62849
  this.parent = void 0;
62850
+ this.choices = [];
62707
62851
  this.optional = void 0;
62708
62852
  this.nillable = void 0;
62709
62853
  this.editorOnly = void 0;
@@ -62727,6 +62871,9 @@ class FormSchemaRngElement {
62727
62871
  addAttribute(attribute) {
62728
62872
  this.attributes.set(attribute.name, attribute);
62729
62873
  }
62874
+ setChoices(choices) {
62875
+ this.choices.push(choices);
62876
+ }
62730
62877
  setInnerTextType(type) {
62731
62878
  this.innerTextType = type;
62732
62879
  }
@@ -62794,9 +62941,17 @@ class FormSchemaRng {
62794
62941
  result.addElement(this.convertSchemaRngElement(childElement, result));
62795
62942
  }
62796
62943
  for (const childChoiceElement of schemaRngElement.choices) {
62944
+ const choiceChildren = new Map();
62945
+ const rngElements = [];
62797
62946
  for (const childElement of childChoiceElement.children) {
62798
- result.addElement(this.convertSchemaRngElement(childElement, result));
62947
+ const rngElement = this.convertSchemaRngElement(childElement, result);
62948
+ rngElements.push(rngElement);
62949
+ choiceChildren.set(childElement.name, rngElement);
62799
62950
  }
62951
+ rngElements.forEach(rngElement => {
62952
+ rngElement.setChoices(choiceChildren);
62953
+ result.addElement(rngElement);
62954
+ });
62800
62955
  }
62801
62956
  }
62802
62957
  return result;
@@ -62944,6 +63099,13 @@ class FormSchemaRng {
62944
63099
  optional: true
62945
63100
  };
62946
63101
  }
63102
+ if (currentElement instanceof FormSchemaRngElement && currentElement.choices.length > 0) {
63103
+ return {
63104
+ dependencies: [],
63105
+ hasOptionalParent: false,
63106
+ optional: false
63107
+ };
63108
+ }
62947
63109
  if (endOptionalElement == undefined || endOptionalElement instanceof FormSchemaRngElement && ((_endOptionalElement = endOptionalElement) === null || _endOptionalElement === void 0 ? void 0 : _endOptionalElement.multiple) === true) {
62948
63110
  return {
62949
63111
  dependencies: [],
@@ -67521,6 +67683,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
67521
67683
  const autoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(target.toLegacyPath());
67522
67684
  const disabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(target.toLegacyPath());
67523
67685
  const optional = this.dataDeclarationHelper.isNodeOptionalBySchemaOrSugar(target);
67686
+ const forceAutoValue = this.dataDeclarationHelper.isNodeHasForcedAutoValueEntry(target);
67524
67687
  const compiledTarget = this.modelPathInstance(target);
67525
67688
  const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.distinctBy(dependencies.map(x => ({
67526
67689
  path: x.asDependencyModelPath(),
@@ -67531,7 +67694,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
67531
67694
  const compiledExpressionWithCheck = this.compileAllItemsIsEmptyCheckBlock(compiledExpression, dependencyModelPaths.filter(x => !x.isIgnoreForChecks).map(x => x.path));
67532
67695
  const compiledDelegate = `context => KCCalculation.execute(context, expression => ${compiledExpressionWithCheck}, "${defaultValue}")`;
67533
67696
  return {
67534
- compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled}, ${optional})`,
67697
+ compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled}, ${optional}, ${forceAutoValue})`,
67535
67698
  dependencies: dependencies
67536
67699
  };
67537
67700
  }
@@ -68447,6 +68610,7 @@ __webpack_require__.r(__webpack_exports__);
68447
68610
  /* harmony export */ FormulaFirstOrDefaultExpression: () => (/* binding */ FormulaFirstOrDefaultExpression),
68448
68611
  /* harmony export */ FormulaFloorExpression: () => (/* binding */ FormulaFloorExpression),
68449
68612
  /* harmony export */ FormulaGeExpression: () => (/* binding */ FormulaGeExpression),
68613
+ /* harmony export */ FormulaGetDateTimeTicksExpression: () => (/* binding */ FormulaGetDateTimeTicksExpression),
68450
68614
  /* harmony export */ FormulaGetDayExpression: () => (/* binding */ FormulaGetDayExpression),
68451
68615
  /* harmony export */ FormulaGetDaysInMonthExpression: () => (/* binding */ FormulaGetDaysInMonthExpression),
68452
68616
  /* harmony export */ FormulaGetMonthExpression: () => (/* binding */ FormulaGetMonthExpression),
@@ -68508,7 +68672,7 @@ __webpack_require__.r(__webpack_exports__);
68508
68672
 
68509
68673
 
68510
68674
 
68511
- var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _class93, _class94, _descriptor59, _dec108, _dec109, _class95, _class96, _descriptor60, _dec110, _dec111, _class97, _class98, _descriptor61, _dec112, _dec113, _class99, _class100, _descriptor62, _dec114, _dec115, _dec116, _class101, _class102, _descriptor63, _descriptor64, _dec117, _dec118, _dec119, _class103, _class104, _descriptor65, _descriptor66, _dec120, _dec121, _class105, _class106, _descriptor67, _dec122, _dec123, _class107, _class108, _descriptor68, _dec124, _dec125, _class109, _class110, _descriptor69, _dec126, _dec127, _dec128, _dec129, _dec130, _class111, _class112, _descriptor70, _descriptor71, _descriptor72, _descriptor73, _dec131, _dec132, _class113, _class114, _descriptor74, _dec133, _dec134, _class115, _class116, _descriptor75, _dec135, _dec136, _class117, _class118, _descriptor76, _dec137, _dec138, _class119, _class120, _descriptor77, _dec139, _dec140, _dec141, _class121, _class122, _descriptor78, _descriptor79, _dec142, _dec143, _class123, _class124, _descriptor80, _dec144, _dec145, _dec146, _class125, _class126, _descriptor81, _descriptor82, _dec147, _dec148, _class127, _class128, _descriptor83, _dec149, _dec150, _class129, _class130, _descriptor84, _dec151, _dec152, _class131, _class132, _descriptor85, _dec153, _class133, _dec154, _dec155, _dec156, _dec157, _class134, _class135, _descriptor86, _descriptor87, _descriptor88, _dec158, _dec159, _class136, _class137, _descriptor89, _dec160, _dec161, _class138, _class139, _descriptor90, _dec162, _dec163, _dec164, _dec165, _dec166, _dec167, _class140, _class141, _descriptor91, _descriptor92, _descriptor93, _descriptor94, _descriptor95, _dec168, _dec169, _class142, _class143, _descriptor96, _dec170, _dec171, _dec172, _class144, _class145, _descriptor97, _descriptor98, _dec173, _dec174, _dec175, _class146, _class147, _descriptor99, _descriptor100, _dec176, _dec177, _dec178, _class148, _class149, _descriptor101, _descriptor102, _dec179, _dec180, _dec181, _dec182, _class150, _class151, _descriptor103, _descriptor104, _descriptor105, _dec183, _dec184, _dec185, _class152, _class153, _descriptor106, _descriptor107, _dec186, _dec187, _class154, _class155, _descriptor108, _dec188, _dec189, _class156, _class157, _descriptor109;
68675
+ var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _class93, _class94, _descriptor59, _dec108, _dec109, _class95, _class96, _descriptor60, _dec110, _dec111, _class97, _class98, _descriptor61, _dec112, _dec113, _class99, _class100, _descriptor62, _dec114, _dec115, _dec116, _class101, _class102, _descriptor63, _descriptor64, _dec117, _dec118, _dec119, _class103, _class104, _descriptor65, _descriptor66, _dec120, _dec121, _class105, _class106, _descriptor67, _dec122, _dec123, _class107, _class108, _descriptor68, _dec124, _dec125, _class109, _class110, _descriptor69, _dec126, _dec127, _dec128, _dec129, _dec130, _class111, _class112, _descriptor70, _descriptor71, _descriptor72, _descriptor73, _dec131, _dec132, _class113, _class114, _descriptor74, _dec133, _dec134, _class115, _class116, _descriptor75, _dec135, _dec136, _class117, _class118, _descriptor76, _dec137, _dec138, _class119, _class120, _descriptor77, _dec139, _dec140, _dec141, _class121, _class122, _descriptor78, _descriptor79, _dec142, _dec143, _class123, _class124, _descriptor80, _dec144, _dec145, _dec146, _class125, _class126, _descriptor81, _descriptor82, _dec147, _dec148, _class127, _class128, _descriptor83, _dec149, _dec150, _class129, _class130, _descriptor84, _dec151, _dec152, _class131, _class132, _descriptor85, _dec153, _class133, _dec154, _dec155, _dec156, _dec157, _class134, _class135, _descriptor86, _descriptor87, _descriptor88, _dec158, _dec159, _class136, _class137, _descriptor89, _dec160, _dec161, _class138, _class139, _descriptor90, _dec162, _dec163, _dec164, _dec165, _dec166, _dec167, _class140, _class141, _descriptor91, _descriptor92, _descriptor93, _descriptor94, _descriptor95, _dec168, _dec169, _class142, _class143, _descriptor96, _dec170, _dec171, _dec172, _class144, _class145, _descriptor97, _descriptor98, _dec173, _dec174, _dec175, _class146, _class147, _descriptor99, _descriptor100, _dec176, _dec177, _dec178, _class148, _class149, _descriptor101, _descriptor102, _dec179, _dec180, _dec181, _dec182, _class150, _class151, _descriptor103, _descriptor104, _descriptor105, _dec183, _dec184, _dec185, _class152, _class153, _descriptor106, _descriptor107, _dec186, _dec187, _class154, _class155, _descriptor108, _dec188, _dec189, _class156, _class157, _descriptor109, _dec190, _dec191, _class158, _class159, _descriptor110;
68512
68676
 
68513
68677
 
68514
68678
 
@@ -69661,7 +69825,21 @@ let FormulaDenominatorExpression = (_dec188 = (0,_markupGenerator_Serializer_Sug
69661
69825
  writable: true,
69662
69826
  initializer: null
69663
69827
  }), _class157)) || _class156);
69664
- const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaInstanceCountExpression, FormulaIsEqualToAutoCalculatedExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaSumOfDayWeightsExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsOgrnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression, FormulaMakeDictExpression, FormulaGetSumByKeysExpression, FormulaJoinExpression, FormulaPropertyByNameExpression, FormulaNumeratorExpression, FormulaDenominatorExpression];
69828
+ let FormulaGetDateTimeTicksExpression = (_dec190 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getdatetimeticks", `Получить количество тиков от 01.01.0001`), _dec191 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec190(_class158 = (_class159 = class FormulaGetDateTimeTicksExpression extends FormulaExpression {
69829
+ constructor(...args) {
69830
+ super(...args);
69831
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor110, this);
69832
+ }
69833
+ getLegacyExpressionTypeForFunctionName() {
69834
+ return "getDateTimeTicks";
69835
+ }
69836
+ }, _descriptor110 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class159.prototype, "expression", [_dec191], {
69837
+ configurable: true,
69838
+ enumerable: true,
69839
+ writable: true,
69840
+ initializer: null
69841
+ }), _class159)) || _class158);
69842
+ const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaInstanceCountExpression, FormulaIsEqualToAutoCalculatedExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaSumOfDayWeightsExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsOgrnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression, FormulaMakeDictExpression, FormulaGetSumByKeysExpression, FormulaJoinExpression, FormulaPropertyByNameExpression, FormulaNumeratorExpression, FormulaDenominatorExpression, FormulaGetDateTimeTicksExpression];
69665
69843
 
69666
69844
  /***/ }),
69667
69845
 
@@ -70439,6 +70617,10 @@ class DataDeclarationGenerationTimeHelper {
70439
70617
  const declEntry = this.getDataDeclarationEntry(targetPath);
70440
70618
  return (declEntry === null || declEntry === void 0 || (_declEntry$disabled = declEntry.disabled) === null || _declEntry$disabled === void 0 ? void 0 : _declEntry$disabled[0]) == true;
70441
70619
  }
70620
+ isNodeHasForcedAutoValueEntry(targetPath) {
70621
+ const declEntry = this.getDataDeclarationEntry(targetPath);
70622
+ return Boolean(declEntry === null || declEntry === void 0 ? void 0 : declEntry.forceAutoValue);
70623
+ }
70442
70624
  getDefaultValue(targetPath) {
70443
70625
  const declEntry = this.getDataDeclarationEntry(targetPath);
70444
70626
  const lastValue = declEntry !== undefined && "value" in declEntry && declEntry.value != undefined ? declEntry.value[declEntry.value.length - 1] : "";
@@ -72373,6 +72555,9 @@ class KCXmlGeneratorBase {
72373
72555
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaSumOfDayWeightsExpression) {
72374
72556
  return "null";
72375
72557
  }
72558
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetDateTimeTicksExpression) {
72559
+ return "null";
72560
+ }
72376
72561
  // -----
72377
72562
 
72378
72563
  throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_5__.NotSupportedError(`Unsupported node type: ${expression.constructor.name}`);
@@ -73609,6 +73794,7 @@ __webpack_require__.r(__webpack_exports__);
73609
73794
  /* harmony export */ FloorExpression: () => (/* binding */ FloorExpression),
73610
73795
  /* harmony export */ FractionalLenExpression: () => (/* binding */ FractionalLenExpression),
73611
73796
  /* harmony export */ GeExpression: () => (/* binding */ GeExpression),
73797
+ /* harmony export */ GetDateTimeTicksExpression: () => (/* binding */ GetDateTimeTicksExpression),
73612
73798
  /* harmony export */ GetDayExpression: () => (/* binding */ GetDayExpression),
73613
73799
  /* harmony export */ GetDaysInMonthExpression: () => (/* binding */ GetDaysInMonthExpression),
73614
73800
  /* harmony export */ GetExternalInfoExpression: () => (/* binding */ GetExternalInfoExpression),
@@ -74334,6 +74520,19 @@ class RoundExpression extends FLangDecimalExpression {
74334
74520
  return `round(${this.expression.convertToString()}, ${fractionalPart})`;
74335
74521
  }
74336
74522
  }
74523
+ class GetDateTimeTicksExpression extends FLangDecimalExpression {
74524
+ constructor(expression) {
74525
+ super();
74526
+ this.expression = void 0;
74527
+ this.expression = expression;
74528
+ }
74529
+ *getChildNodes() {
74530
+ yield this.expression;
74531
+ }
74532
+ convertToString() {
74533
+ return `getDateTimeTicks(${this.expression.convertToString()})`;
74534
+ }
74535
+ }
74337
74536
  class FloorExpression extends FLangDecimalExpression {
74338
74537
  constructor(expression) {
74339
74538
  super();
@@ -75110,6 +75309,7 @@ __webpack_require__.r(__webpack_exports__);
75110
75309
  /* harmony export */ combineByOrFlangExpr: () => (/* binding */ combineByOrFlangExpr),
75111
75310
  /* harmony export */ combineRulesWithOptionalSectionChecking: () => (/* binding */ combineRulesWithOptionalSectionChecking),
75112
75311
  /* harmony export */ composeFlangExpressionsByOr: () => (/* binding */ composeFlangExpressionsByOr),
75312
+ /* harmony export */ decimalFieldNameSuffix: () => (/* binding */ decimalFieldNameSuffix),
75113
75313
  /* harmony export */ decimalWrapper: () => (/* binding */ decimalWrapper),
75114
75314
  /* harmony export */ dictFieldNameSuffix: () => (/* binding */ dictFieldNameSuffix),
75115
75315
  /* harmony export */ ensureCorrectFieldNameByExpressionType: () => (/* binding */ ensureCorrectFieldNameByExpressionType),
@@ -75144,6 +75344,7 @@ __webpack_require__.r(__webpack_exports__);
75144
75344
 
75145
75345
 
75146
75346
 
75347
+ const decimalFieldNameSuffix = "_decimal";
75147
75348
  const dictFieldNameSuffix = "_dict";
75148
75349
  const arrayFieldNameSuffix = "_array";
75149
75350
  const hashSetFieldNameSuffix = "_hashSet";
@@ -75238,8 +75439,8 @@ function tryExtractValueReferenceAsStringFromDecimal(expression) {
75238
75439
  }
75239
75440
  return expression;
75240
75441
  }
75241
- function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
75242
- if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet)) {
75442
+ function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, fullTarget, decimalFormat = "G29") {
75443
+ if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal && fullTarget.toString().endsWith(decimalFieldNameSuffix))) {
75243
75444
  return operandExpression;
75244
75445
  }
75245
75446
  return castOperandToStringIfNeed(operandExpression, decimalFormat);
@@ -75360,8 +75561,11 @@ function ensureCorrectFieldNameByExpressionType(statement) {
75360
75561
  if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
75361
75562
  throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
75362
75563
  }
75363
- if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
75364
- throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
75564
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal && !lastStringPart.endsWith(decimalFieldNameSuffix)) {
75565
+ throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${decimalFieldNameSuffix}"`);
75566
+ }
75567
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix) || lastStringPart.endsWith(decimalFieldNameSuffix))) {
75568
+ throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}", "${decimalFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
75365
75569
  }
75366
75570
  }
75367
75571
  }
@@ -75881,6 +76085,10 @@ class FormulaExpressionToFlangExpressionConverter {
75881
76085
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDenominatorExpression) {
75882
76086
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DenominatorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
75883
76087
  }
76088
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDateTimeTicksExpression) {
76089
+ const arg = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
76090
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetDateTimeTicksExpression(arg);
76091
+ }
75884
76092
  throw new Error(`Unsupported type of node: ${expression.constructor.name}, ${expression.sourceXmlNode.name}`);
75885
76093
  }
75886
76094
  castOperandForComparisonExpression(formulaExpression, flangExpression) {
@@ -76472,7 +76680,7 @@ class FormulaOnlyNormalizationRuleGenerator {
76472
76680
  const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
76473
76681
  const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
76474
76682
  const getFormulaExpression = field => {
76475
- const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
76683
+ const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), this.options.enableTypedFlang, fullTarget, "G29");
76476
76684
  const resultType = result.getType();
76477
76685
  return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue)) : result;
76478
76686
  };
@@ -76643,7 +76851,7 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
76643
76851
  const isDisabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(fullTarget.toAbsolute());
76644
76852
  const isDecimal = ((_this$formSchemaRng$g = this.formSchemaRng.getTypeNodeByPath(fullTarget.toAbsolute())) === null || _this$formSchemaRng$g === void 0 ? void 0 : _this$formSchemaRng$g.baseType) === "decimal";
76645
76853
  const getFormulaExpression = targetField => {
76646
- const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
76854
+ const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), this.options.enableTypedFlang, fullTarget, "G29");
76647
76855
  const resultType = result.getType();
76648
76856
  return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)) : result;
76649
76857
  };
@@ -92308,7 +92516,29 @@ __webpack_require__.r(__webpack_exports__);
92308
92516
  /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
92309
92517
  /* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
92310
92518
  /* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
92311
- /* harmony import */ var _FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FilterDateRangeNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/MultiControls/FilterDateRange/FilterDateRangeNode.ts");
92519
+ /* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
92520
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
92521
+ /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
92522
+ /* harmony import */ var _common_KCLang_CodeDom_CheckStatement__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/CheckStatement */ "./Generator/src/common/KCLang/CodeDom/CheckStatement.ts");
92523
+ /* harmony import */ var _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/ValueReferenceExpression */ "./Generator/src/common/KCLang/CodeDom/ValueReferenceExpression.ts");
92524
+ /* harmony import */ var _common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/KCLangPath */ "./Generator/src/common/KCLang/CodeDom/KCLangPath.ts");
92525
+ /* harmony import */ var _common_KCLang_CodeDom_FormulaStatement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/FormulaStatement */ "./Generator/src/common/KCLang/CodeDom/FormulaStatement.ts");
92526
+ /* harmony import */ var _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/CastExpression */ "./Generator/src/common/KCLang/CodeDom/CastExpression.ts");
92527
+ /* harmony import */ var _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/KCLangType */ "./Generator/src/common/KCLang/CodeDom/KCLangType.ts");
92528
+ /* harmony import */ var _common_KCLang_CodeDom_Functions_GetDateTimeTicksFunctionCall__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/Functions/GetDateTimeTicksFunctionCall */ "./Generator/src/common/KCLang/CodeDom/Functions/GetDateTimeTicksFunctionCall.ts");
92529
+ /* harmony import */ var _common_KCLang_CodeDom_Functions_DateTimeFunctionCall__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../../common/KCLang/CodeDom/Functions/DateTimeFunctionCall */ "./Generator/src/common/KCLang/CodeDom/Functions/DateTimeFunctionCall.ts");
92530
+ /* harmony import */ var _FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./FilterDateRangeNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/MultiControls/FilterDateRange/FilterDateRangeNode.ts");
92531
+
92532
+
92533
+
92534
+
92535
+
92536
+
92537
+
92538
+
92539
+
92540
+
92541
+
92312
92542
 
92313
92543
 
92314
92544
 
@@ -92316,7 +92546,7 @@ __webpack_require__.r(__webpack_exports__);
92316
92546
 
92317
92547
  class FilterDateRangeConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.SugarNodeConverterBase {
92318
92548
  static getAcceptNodeClass() {
92319
- return _FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_4__.FilterDateRangeNode;
92549
+ return _FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_15__.FilterDateRangeNode;
92320
92550
  }
92321
92551
  doBuildDataDeclaration() {
92322
92552
  return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
@@ -92327,11 +92557,47 @@ class FilterDateRangeConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MOD
92327
92557
  *doTraverseChildren() {
92328
92558
  // no children
92329
92559
  }
92330
- doConvert() {
92331
- const node = this.getCurrentNodeAs(_FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_4__.FilterDateRangeNode);
92560
+ getServerFiltersIsUsed(formSchemaRng) {
92561
+ const node = this.getCurrentNodeAs(_FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_15__.FilterDateRangeNode);
92562
+ const multilinePath = (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(node);
92563
+ const multilineElementSchemaInfo = formSchemaRng.getElementByPath(multilinePath);
92564
+ const useServerFilters = multilineElementSchemaInfo instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_4__.FormSchemaRngElement && multilineElementSchemaInfo.useServerFilters == true;
92565
+ return useServerFilters;
92566
+ }
92567
+ getNameForExtraField(fieldName) {
92568
+ return `cf_${fieldName}_decimal`;
92569
+ }
92570
+ getExtraFieldDataPath(dataPath) {
92571
+ var _tokens;
92572
+ const tokens = dataPath.getPathPartsAsArray();
92573
+ const tokensWithoutLastToken = tokens.slice(0, tokens.length - 1);
92574
+ const lastToken = (_tokens = tokens[tokens.length - 1]) !== null && _tokens !== void 0 ? _tokens : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
92575
+ const lastTokenAsDecimal = this.getNameForExtraField(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.isSimpleToken(lastToken) ? lastToken : "this");
92576
+ const extraFilteringFieldPath = dataPath.isAbsolute() ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.createAbsoluteFromTokens)([...tokensWithoutLastToken, lastTokenAsDecimal]) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.createRelativeFromTokens)([...tokensWithoutLastToken, lastTokenAsDecimal]);
92577
+ // @ts-ignore
92578
+ return extraFilteringFieldPath;
92579
+ }
92580
+ doBuildKCLangCalculations(_buildContext, formSchemaRng, _prefixPath) {
92581
+ const node = this.getCurrentNodeAs(_FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_15__.FilterDateRangeNode);
92582
+ const useServerFilters = this.getServerFiltersIsUsed(formSchemaRng);
92583
+ if (useServerFilters) {
92584
+ const dataPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.createRelativeFromMask)(node.dataPath, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each).getPathWithoutIterations();
92585
+ const extraFilteringFieldPath = this.getExtraFieldDataPath(dataPath).getPathWithoutIterations();
92586
+ const extraFieldStatement = new _common_KCLang_CodeDom_CheckStatement__WEBPACK_IMPORTED_MODULE_7__.CheckStatement(new _common_KCLang_CodeDom_FormulaStatement__WEBPACK_IMPORTED_MODULE_10__.FormulaStatement(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_9__.KCLangPath.fromModelPath(extraFilteringFieldPath), new _common_KCLang_CodeDom_Functions_GetDateTimeTicksFunctionCall__WEBPACK_IMPORTED_MODULE_13__.GetDateTimeTicksFunctionCall(new _common_KCLang_CodeDom_Functions_DateTimeFunctionCall__WEBPACK_IMPORTED_MODULE_14__.DateTimeFunctionCall(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_9__.KCLangPath.fromModelPath(dataPath)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_12__.StringType.default)))));
92587
+ return [extraFieldStatement];
92588
+ }
92589
+ return [];
92590
+ }
92591
+ doConvert(context) {
92592
+ const node = this.getCurrentNodeAs(_FilterDateRangeNode__WEBPACK_IMPORTED_MODULE_15__.FilterDateRangeNode);
92593
+ const useServerFilters = this.getServerFiltersIsUsed(context.schemaRng);
92594
+ const dataPath = useServerFilters ? this.getExtraFieldDataPath((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(node, node.dataPath)) : (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(node, node.dataPath);
92332
92595
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("FilterDateRange");
92333
- markupBuilder.prop(x => x.dataPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(node, node.dataPath));
92596
+ markupBuilder.prop(x => x.dataPath).set(dataPath);
92334
92597
  markupBuilder.prop(x => x.filteredUniqKey).set(node.filteredUniqKey);
92598
+ if (useServerFilters) {
92599
+ markupBuilder.prop(x => x.convertDateToTicksInFilterExpression).set(useServerFilters);
92600
+ }
92335
92601
  return markupBuilder.buildConverterResult();
92336
92602
  }
92337
92603
  }
@@ -97474,7 +97740,7 @@ class ComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__
97474
97740
  disabled: node.disabled
97475
97741
  })];
97476
97742
  }
97477
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
97743
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
97478
97744
  const node = this.getCurrentNodeAs(_ComboBoxNode__WEBPACK_IMPORTED_MODULE_10__.ComboBoxNode);
97479
97745
  const element = formSchemaRng.getElementByPath(node.getFullPath());
97480
97746
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each);
@@ -98020,7 +98286,7 @@ class DateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Sug
98020
98286
  static getAcceptNodeClass() {
98021
98287
  return _DateNode__WEBPACK_IMPORTED_MODULE_6__.DateNode;
98022
98288
  }
98023
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
98289
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
98024
98290
  const node = this.getCurrentNodeAs(_DateNode__WEBPACK_IMPORTED_MODULE_6__.DateNode);
98025
98291
  const element = formSchemaRng.getElementByPath(node.getFullPath());
98026
98292
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.PathTokens.each);
@@ -98282,7 +98548,7 @@ class DiadocSuggestComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORT
98282
98548
  const node = this.getCurrentNodeAs(_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_7__.DiadocSuggestComboBoxNode);
98283
98549
  validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
98284
98550
  }
98285
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
98551
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
98286
98552
  const node = this.getCurrentNodeAs(_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_7__.DiadocSuggestComboBoxNode);
98287
98553
  const element = formSchemaRng.getElementByPath(node.getFullPath());
98288
98554
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -98731,7 +98997,7 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
98731
98997
  markupBuilder.prop(x => x.extendedFields).set(parsedExtendFields);
98732
98998
  return markupBuilder.buildConverterResult();
98733
98999
  }
98734
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
99000
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
98735
99001
  const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
98736
99002
  const element = formSchemaRng.getElementByPath(node.getFullPath());
98737
99003
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.each);
@@ -99979,7 +100245,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
99979
100245
  const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_8__.InputNode);
99980
100246
  return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getNewBindingPathExpression)(node)];
99981
100247
  }
99982
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
100248
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
99983
100249
  const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_8__.InputNode);
99984
100250
  const element = formSchemaRng.getElementByPath(node.getFullPath());
99985
100251
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
@@ -99997,7 +100263,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
99997
100263
  }
99998
100264
  doBuildDataDeclaration(context) {
99999
100265
  const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_8__.InputNode);
100000
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.auto ? ["autoFlag", context.initSequenceFactory.takeFromModel()] : undefined, node.auto ? ["autoValue", context.initSequenceFactory.takeFromModelOrDefaultValue(node.dataBinding.defaultValue)] : undefined]), context.addSpecialFieldsEntry(node, {
100266
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.auto ? ["autoFlag", context.initSequenceFactory.takeFromModel()] : undefined, node.auto ? ["autoValue", context.initSequenceFactory.takeFromModelOrDefaultValue(node.dataBinding.defaultValue)] : undefined, node.auto && node.forceAutoValue != undefined ? ["forceAutoValue", [node.forceAutoValue]] : undefined]), context.addSpecialFieldsEntry(node, {
100001
100267
  optional: node.dataBinding.optional,
100002
100268
  disabled: node.disabled
100003
100269
  }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
@@ -100271,7 +100537,7 @@ __webpack_require__.r(__webpack_exports__);
100271
100537
 
100272
100538
 
100273
100539
 
100274
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45, _descriptor46, _descriptor47, _descriptor48, _descriptor49;
100540
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45, _descriptor46, _descriptor47, _descriptor48, _descriptor49, _descriptor50;
100275
100541
 
100276
100542
 
100277
100543
 
@@ -100333,7 +100599,7 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
100333
100599
  Отключает использование mask только для валидного по маске значения и при отсутствии ошибки/предупреждения в валидации.
100334
100600
  По умолчанию включен показ кривых значений после импорта и,
100335
100601
  после ручного исправления на правильное по маске и валидное значение, редактирование будет доступно уже только в пределах маски.
100336
- `), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec36 = (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)} для условного задизейбливания контрола`), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("settings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "'true': всегда первой будет применяться указанная fetchfn, а если она вернет undefined то тогда будет брать из модели - из фуфа/draftinfo (то, что придет с сервера). В противном случае fetchfn сработает только в том случае, когда бекенд ничего не прислал"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("deprecated-disabled-for-rpn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit.default("100%"), "Ширина поля"), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного скрытия контрола`), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("left", "right"), "Выравнивание текста внутри поля ввода (`left` | `right`, default: `left`)"), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("formula", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Всплывающая подсказка по авторасчету"), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("suffix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в правой части input-а`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в левой части input-а`), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("currency", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, `При включении этого флага значение в поле отображается как денежное: с двумя знаками после запятой и пробелами между тысячами.`), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("showNegativeAsBrackets", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Отрицательные числа будут отображаться в скобках и без минуса (только визуально и только при потере фокуса)"), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("removeReadonlyBackground", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает серый background у ридонли инпута"), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("noReadonlyPadding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает дефолтный паддинг 2px у контейнера ридонли инпута"), _dec(_class = (_class2 = class InputNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
100602
+ `), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec36 = (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)} для условного задизейбливания контрола`), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("settings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "'true': всегда первой будет применяться указанная fetchfn, а если она вернет undefined то тогда будет брать из модели - из фуфа/draftinfo (то, что придет с сервера). В противном случае fetchfn сработает только в том случае, когда бекенд ничего не прислал"), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("deprecated-disabled-for-rpn", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Поле ввода становится заблокированным для редактирования"), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit.default("100%"), "Ширина поля"), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_9__.javaScriptExpressionLink)} для условного скрытия контрола`), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("align", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("left", "right"), "Выравнивание текста внутри поля ввода (`left` | `right`, default: `left`)"), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("formula", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Всплывающая подсказка по авторасчету"), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("suffix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в правой части input-а`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.markupAttr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, `Текст или верстка отображаемая в левой части input-а`), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("currency", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, `При включении этого флага значение в поле отображается как денежное: с двумя знаками после запятой и пробелами между тысячами.`), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("showNegativeAsBrackets", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Отрицательные числа будут отображаться в скобках и без минуса (только визуально и только при потере фокуса)"), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("removeReadonlyBackground", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает серый background у ридонли инпута"), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("noReadonlyPadding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Убирает дефолтный паддинг 2px у контейнера ридонли инпута"), _dec51 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("forceAutoValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, "Принудительно устанавливает autoValue при ините черновика (не работает для серверной нормализации)"), _dec(_class = (_class2 = class InputNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
100337
100603
  constructor(...args) {
100338
100604
  super(...args);
100339
100605
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "validationInfo", _descriptor, this);
@@ -100387,6 +100653,7 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
100387
100653
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "showNegativeAsBrackets", _descriptor47, this);
100388
100654
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "removeReadonlyBackground", _descriptor48, this);
100389
100655
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "noReadonlyPadding", _descriptor49, this);
100656
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "forceAutoValue", _descriptor50, this);
100390
100657
  }
100391
100658
  getOwnPath() {
100392
100659
  return this.dataBinding.getOwnPath();
@@ -100639,6 +100906,11 @@ let InputNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_
100639
100906
  enumerable: true,
100640
100907
  writable: true,
100641
100908
  initializer: null
100909
+ }), _descriptor50 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "forceAutoValue", [_dec51], {
100910
+ configurable: true,
100911
+ enumerable: true,
100912
+ writable: true,
100913
+ initializer: null
100642
100914
  }), _class2)) || _class);
100643
100915
 
100644
100916
  /***/ }),
@@ -100752,7 +101024,7 @@ class KladrConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_5__.Su
100752
101024
  static getAcceptNodeClass() {
100753
101025
  return _KladrNode__WEBPACK_IMPORTED_MODULE_8__.KladrNode;
100754
101026
  }
100755
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
101027
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
100756
101028
  const node = this.getCurrentNodeAs(_KladrNode__WEBPACK_IMPORTED_MODULE_8__.KladrNode);
100757
101029
  const element = formSchemaRng.getElementByPath(node.getFullPath());
100758
101030
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.PathTokens.each);
@@ -101060,7 +101332,7 @@ class PicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__
101060
101332
  static getAcceptNodeClass() {
101061
101333
  return _PicklistNode__WEBPACK_IMPORTED_MODULE_8__.PicklistNode;
101062
101334
  }
101063
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
101335
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
101064
101336
  const node = this.getCurrentNodeAs(_PicklistNode__WEBPACK_IMPORTED_MODULE_8__.PicklistNode);
101065
101337
  const element = formSchemaRng.getElementByPath(node.getFullPath());
101066
101338
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -101529,7 +101801,7 @@ class RadioGroupConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
101529
101801
  const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode);
101530
101802
  validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
101531
101803
  }
101532
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
101804
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
101533
101805
  const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode);
101534
101806
  const element = formSchemaRng.getElementByPath(node.getFullPath());
101535
101807
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -102048,7 +102320,7 @@ class SelectConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.S
102048
102320
  disabled: node.disabled
102049
102321
  }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
102050
102322
  }
102051
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
102323
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
102052
102324
  const node = this.getCurrentNodeAs(_SelectNode__WEBPACK_IMPORTED_MODULE_6__.SelectNode);
102053
102325
  const element = formSchemaRng.getElementByPath(node.getFullPath());
102054
102326
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -102811,7 +103083,7 @@ class TaxRebateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3_
102811
103083
  const node = this.getCurrentNodeAs(_TaxRebateNode__WEBPACK_IMPORTED_MODULE_7__.TaxRebateNode);
102812
103084
  return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getNewBindingPathExpression)(node)];
102813
103085
  }
102814
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
103086
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
102815
103087
  const node = this.getCurrentNodeAs(_TaxRebateNode__WEBPACK_IMPORTED_MODULE_7__.TaxRebateNode);
102816
103088
  const element = formSchemaRng.getElementByPath(node.getFullPath());
102817
103089
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
@@ -103068,7 +103340,7 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
103068
103340
  const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_8__.TextAreaNode);
103069
103341
  validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
103070
103342
  }
103071
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
103343
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
103072
103344
  const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_8__.TextAreaNode);
103073
103345
  const element = formSchemaRng.getElementByPath(node.getFullPath());
103074
103346
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -103807,7 +104079,7 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
103807
104079
  disabled: node.disabled
103808
104080
  })];
103809
104081
  }
103810
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
104082
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
103811
104083
  const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_8__.PopupTextAreaNode);
103812
104084
  const element = formSchemaRng.getElementByPath(node.getFullPath());
103813
104085
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.each);
@@ -104393,7 +104665,7 @@ class FIOConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Suga
104393
104665
  pathSuffix: "Отчество"
104394
104666
  })];
104395
104667
  }
104396
- doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
104668
+ doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
104397
104669
  var _node$getOwnPathForKC;
104398
104670
  const node = this.getCurrentNodeAs(_FIONode__WEBPACK_IMPORTED_MODULE_7__.FIONode);
104399
104671
  const minlengthTypeCheckNode = new _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.MinlengthTypeCheckNode();
@@ -104729,7 +105001,7 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
104729
105001
  const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_7__.TextNode);
104730
105002
  validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
104731
105003
  }
104732
- *doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath) {
105004
+ *doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
104733
105005
  const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_7__.TextNode);
104734
105006
  const element = formSchemaRng.getElementByPath(node.getFullPath());
104735
105007
  const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsoluteFromMask)(this.getResolvedBindingPath(node), _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.each);
@@ -105461,11 +105733,11 @@ class MarkupBuildingContext {
105461
105733
  this.formSourcesPath = void 0;
105462
105734
  this.helpers = void 0;
105463
105735
  this.pathsContext = void 0;
105464
- this.schemaRng = void 0;
105465
105736
  this.useSchemaValidations = void 0;
105466
105737
  this.dataDeclarationHelper = void 0;
105467
105738
  this.typesRegistry = void 0;
105468
105739
  this.uniqueControlIdIncrement = new Map();
105740
+ this.schemaRng = void 0;
105469
105741
  this.controlCustomizationContext = void 0;
105470
105742
  this.tourSteps = void 0;
105471
105743
  this.dataDeclarationHelper = dataDeclarationHelper;
@@ -105605,7 +105877,8 @@ class MarkupBuildingContext {
105605
105877
  __webpack_require__.r(__webpack_exports__);
105606
105878
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
105607
105879
  /* harmony export */ KCLangCalculationsBuildContext: () => (/* binding */ KCLangCalculationsBuildContext),
105608
- /* harmony export */ combineByAndKCLangExpr: () => (/* binding */ combineByAndKCLangExpr)
105880
+ /* harmony export */ combineByAndKCLangExpr: () => (/* binding */ combineByAndKCLangExpr),
105881
+ /* harmony export */ combineByOrKCLangExpr: () => (/* binding */ combineByOrKCLangExpr)
105609
105882
  /* harmony export */ });
105610
105883
  /* harmony import */ var _Common_AutoValidationUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/AutoValidationUtils */ "./Common/AutoValidationUtils.ts");
105611
105884
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
@@ -105728,9 +106001,29 @@ class KCLangCalculationsBuildContext {
105728
106001
  if (((_allChildrenPaths$len = (_allChildrenPaths = allChildrenPaths) === null || _allChildrenPaths === void 0 ? void 0 : _allChildrenPaths.length) !== null && _allChildrenPaths$len !== void 0 ? _allChildrenPaths$len : 0) > _validationGenerator_MaxOptionalChildrenLimit__WEBPACK_IMPORTED_MODULE_31__.maxOptionalChildrenLimit) {
105729
106002
  allChildrenPaths = undefined;
105730
106003
  }
105731
- const restChecks = (_allChildrenPaths2 = allChildrenPaths) === null || _allChildrenPaths2 === void 0 ? void 0 : _allChildrenPaths2.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(combineByAndKCLangExpr, undefined);
106004
+ const restChecks = (_allChildrenPaths2 = allChildrenPaths) === null || _allChildrenPaths2 === void 0 ? void 0 : _allChildrenPaths2.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(combineByOrKCLangExpr, undefined);
106005
+ let choiceChecks;
106006
+ const haveChoices = schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_28__.FormSchemaRngElement && schemaNode.choices.length > 0;
106007
+ if (haveChoices) {
106008
+ const choiceRules = [];
106009
+ for (const schemaNodeChoice of schemaNode.choices) {
106010
+ if (schemaNodeChoice !== null && schemaNodeChoice !== void 0 && schemaNodeChoice.values().every(el => el.isOptional())) {
106011
+ continue;
106012
+ }
106013
+ const allChoicesPaths = schemaNodeChoice === null || schemaNodeChoice === void 0 ? void 0 : schemaNodeChoice.values().map(x => this.schemaRng.getPath(x, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).filter(x => !(0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_2__.getMatchedAndDifferentModelPaths)(targetFullPath, x).differentPath.isContainIteration());
106014
+ choiceChecks = allChoicesPaths === null || allChoicesPaths === void 0 ? void 0 : allChoicesPaths.map(childPath => new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(childPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression("")))).reduce(combineByOrKCLangExpr, undefined);
106015
+ if (choiceChecks) {
106016
+ choiceRules.push(new _common_KCLang_CodeDom_NotExpression__WEBPACK_IMPORTED_MODULE_21__.NotExpression(choiceChecks));
106017
+ }
106018
+ }
106019
+ choiceChecks = choiceRules.reduce(combineByOrKCLangExpr, undefined);
106020
+ }
105732
106021
  const checkRequiredStatement = new _common_KCLang_CodeDom_CheckStatement__WEBPACK_IMPORTED_MODULE_6__.CheckStatement(new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(new _common_KCLang_CodeDom_Functions_ExistsFunctionCall__WEBPACK_IMPORTED_MODULE_10__.ExistsFunctionCall(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(targetPath, true))), new _common_KCLang_CodeDom_NotEqExpression__WEBPACK_IMPORTED_MODULE_20__.NotEqExpression(new _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_5__.CastExpression(new _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_26__.ValueReferenceExpression(_common_KCLang_CodeDom_KCLangPath__WEBPACK_IMPORTED_MODULE_17__.KCLangPath.fromModelPath(targetPath, true)), _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_18__.StringType.default), new _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_25__.StringConstExpression(""))), [new _common_KCLang_CodeDom_WithBlock__WEBPACK_IMPORTED_MODULE_27__.WithBlock("description", new _common_KCLang_CodeDom_DescriptionText__WEBPACK_IMPORTED_MODULE_8__.DescriptionText((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_38__.omitLocalization)(requiredDescription))), new _common_KCLang_CodeDom_WithBlock__WEBPACK_IMPORTED_MODULE_27__.WithBlock("target", new _common_KCLang_CodeDom_DescriptionText__WEBPACK_IMPORTED_MODULE_8__.DescriptionText((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(Iterator.from(targetPath.getPathParts()).filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken).toArray()).toString()))]);
105733
- if (restChecks != undefined) {
106022
+ if (restChecks != undefined && choiceChecks != undefined) {
106023
+ yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(restChecks, choiceChecks), [checkRequiredStatement]);
106024
+ } else if (choiceChecks != undefined) {
106025
+ yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(choiceChecks, [checkRequiredStatement]);
106026
+ } else if (restChecks != undefined) {
105734
106027
  yield new _common_KCLang_CodeDom_IfStatement__WEBPACK_IMPORTED_MODULE_16__.IfStatement(restChecks, [checkRequiredStatement]);
105735
106028
  } else {
105736
106029
  yield checkRequiredStatement;
@@ -105931,9 +106224,12 @@ class KCLangCalculationsBuildContext {
105931
106224
  }
105932
106225
  }
105933
106226
  }
105934
- function combineByAndKCLangExpr(acc, current) {
106227
+ function combineByOrKCLangExpr(acc, current) {
105935
106228
  return acc != undefined ? new _common_KCLang_CodeDom_OrExpression__WEBPACK_IMPORTED_MODULE_23__.OrExpression(acc, current) : current;
105936
106229
  }
106230
+ function combineByAndKCLangExpr(acc, current) {
106231
+ return acc != undefined ? new _common_KCLang_CodeDom_AndExpression__WEBPACK_IMPORTED_MODULE_4__.AndExpression(acc, current) : current;
106232
+ }
105937
106233
 
105938
106234
  /***/ }),
105939
106235
 
@@ -107571,7 +107867,7 @@ class SugarNodeConverterBase {
107571
107867
  }
107572
107868
  buildSugarKCLangCalculations(buildContext, formSchemaRng, prefixPath) {
107573
107869
  const result = [];
107574
- result.push(...this.doBuildKCLangValidations(buildContext, formSchemaRng, prefixPath));
107870
+ result.push(...this.doBuildKCLangCalculations(buildContext, formSchemaRng, prefixPath));
107575
107871
  const children = this.buildChildrenKCLangValidations(buildContext, formSchemaRng);
107576
107872
  const childrenArray = Iterator.from(children).toArray();
107577
107873
  const ownPath = this.node.getOwnPathForKCLang();
@@ -107707,7 +108003,7 @@ class SugarNodeConverterBase {
107707
108003
  processFocusManagementAttributes(converterResult) {
107708
108004
  return _FocusManagementProcessor__WEBPACK_IMPORTED_MODULE_11__.FocusManagementProcessor.processFocusManagementAttributes(this.node, converterResult);
107709
108005
  }
107710
- doBuildKCLangValidations(_buildContext, _formSchemaRng, _prefixPath) {
108006
+ doBuildKCLangCalculations(_buildContext, _formSchemaRng, _prefixPath) {
107711
108007
  return [];
107712
108008
  }
107713
108009
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.129.0-perm-links.1",
3
+ "version": "5.129.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,
@@ -10,4 +10,4 @@
10
10
  "main": "./dist/index.js",
11
11
  "dependencies": {},
12
12
  "devDependencies": {}
13
- }
13
+ }