@kontur.candy/generator 5.5.0-multiuploadefs.2 → 5.5.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 +19 -42
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -60452,7 +60452,6 @@ let PatchFufSteps = /*#__PURE__*/function (PatchFufSteps) {
60452
60452
  PatchFufSteps[PatchFufSteps["SelectFiles"] = 1] = "SelectFiles";
60453
60453
  PatchFufSteps[PatchFufSteps["ErrorMessage"] = 2] = "ErrorMessage";
60454
60454
  PatchFufSteps[PatchFufSteps["LoadToForm"] = 3] = "LoadToForm";
60455
- PatchFufSteps[PatchFufSteps["ConfirmMerge"] = 4] = "ConfirmMerge";
60456
60455
  return PatchFufSteps;
60457
60456
  }({});
60458
60457
  let TableType = /*#__PURE__*/function (TableType) {
@@ -81208,22 +81207,15 @@ class FormulaExpressionToFlangExpressionConverter {
81208
81207
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(left), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(right));
81209
81208
  }
81210
81209
  compileGroupSumExpressionWithCustomValueExpression(prefix, target, targetKeyPath, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
81211
- const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__.buildIterationSequence)(sourceKeyPath))];
81212
- const finalAnonymousFunction = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddSumExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value"), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(sourceValueExpression)));
81213
- const getWrapReduceFunction = innerReduceCall => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict)], innerReduceCall);
81214
- const createReduceExpression = (iterablePath, initialValue, innerReduce) => {
81215
- const reduceBody = innerReduce != undefined ? getWrapReduceFunction(innerReduce) : finalAnonymousFunction;
81216
- const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), reduceBody, initialValue);
81217
- return reduceExpression;
81218
- };
81219
- const reduceExpression = iterationEntries.reduce((prevReduceExpr, curr, index) => {
81220
- const initialValue = index === iterationEntries.length - 1 ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DictLiteralExpression() : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result");
81221
- const reduceExpr = createReduceExpression(curr.iterable, initialValue, prevReduceExpr);
81222
- return reduceExpr;
81223
- }, undefined);
81224
- if (reduceExpression == undefined) {
81225
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.NotSupportedError("Target and source must be in different collections! " + "\n" + `Target: ${target}` + "\n" + `SourceKey: ${sourceKeyPath}`);
81226
- }
81210
+ const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
81211
+ const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
81212
+ const firstPart = matchPaths.matchedPath.toCurrentIteration();
81213
+ const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
81214
+ const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
81215
+ const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
81216
+ const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
81217
+ const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
81218
+ const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddSumExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value"), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DictLiteralExpression());
81227
81219
  const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetExpression(reduceExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(targetKeyPath.toCurrentIteration(), "value"));
81228
81220
  return finalValueExpression;
81229
81221
  }
@@ -83398,11 +83390,11 @@ __webpack_require__.r(__webpack_exports__);
83398
83390
 
83399
83391
 
83400
83392
 
83401
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
83393
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
83402
83394
 
83403
83395
 
83404
83396
 
83405
- let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("action", `Элемент выпадашки/кнопки с выпадющим меню`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/Action/Common sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_4__.DataReferenceMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("onClick", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется при клике"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("metricName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Название метрики"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ""), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("icon", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Название кастомной иконки`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("menuSeparator", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Элемент разделителя меню`), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec(_class = (_class2 = class ActionNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
83397
+ let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("action", `Элемент выпадашки/кнопки с выпадющим меню`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/Action/Common sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_4__.DataReferenceMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("onClick", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется при клике"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("metricName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Название метрики"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ""), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("icon", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Название кастомной иконки`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec(_class = (_class2 = class ActionNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
83406
83398
  constructor(...args) {
83407
83399
  super(...args);
83408
83400
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataReference", _descriptor, this);
@@ -83412,8 +83404,7 @@ let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
83412
83404
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disabled", _descriptor5, this);
83413
83405
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disabled2", _descriptor6, this);
83414
83406
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "icon", _descriptor7, this);
83415
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "menuSeparator", _descriptor8, this);
83416
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor9, this);
83407
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor8, this);
83417
83408
  }
83418
83409
  getOwnPath() {
83419
83410
  return this.dataReference.getOwnPath();
@@ -83453,12 +83444,7 @@ let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
83453
83444
  enumerable: true,
83454
83445
  writable: true,
83455
83446
  initializer: null
83456
- }), _descriptor8 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "menuSeparator", [_dec9], {
83457
- configurable: true,
83458
- enumerable: true,
83459
- writable: true,
83460
- initializer: null
83461
- }), _descriptor9 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec10], {
83447
+ }), _descriptor8 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec9], {
83462
83448
  configurable: true,
83463
83449
  enumerable: true,
83464
83450
  writable: true,
@@ -83790,9 +83776,7 @@ __webpack_require__.r(__webpack_exports__);
83790
83776
  /* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
83791
83777
  /* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
83792
83778
  /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
83793
- /* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
83794
- /* harmony import */ var _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DropdownButtonNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Action/DropdownButton/DropdownButtonNode.ts");
83795
-
83779
+ /* harmony import */ var _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DropdownButtonNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Action/DropdownButton/DropdownButtonNode.ts");
83796
83780
 
83797
83781
 
83798
83782
 
@@ -83800,27 +83784,27 @@ __webpack_require__.r(__webpack_exports__);
83800
83784
 
83801
83785
  class DropdownButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
83802
83786
  static getAcceptNodeClass() {
83803
- return _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode;
83787
+ return _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode;
83804
83788
  }
83805
83789
  get nodePaths() {
83806
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83790
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83807
83791
  return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(node)];
83808
83792
  }
83809
83793
  doBuildDataDeclaration(context) {
83810
83794
  return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
83811
83795
  }
83812
83796
  buildChildrenDataDeclaration(context) {
83813
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83797
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83814
83798
  return context.mergeDataDeclaration(...node.items.map(item => context.processChildrenDataDeclaration(item.children)));
83815
83799
  }
83816
83800
  *doTraverseChildren() {
83817
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83801
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83818
83802
  for (const item of node.items) {
83819
83803
  yield* item.children;
83820
83804
  }
83821
83805
  }
83822
83806
  doConvert(context) {
83823
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83807
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83824
83808
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("DropdownButton");
83825
83809
  markupBuilder.prop("data-tid").set(node.tid);
83826
83810
  markupBuilder.prop(x => x.width).set(node.width);
@@ -83832,13 +83816,6 @@ class DropdownButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
83832
83816
  itemBuilder.prop("data-tid").set(item.tid);
83833
83817
  itemBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(item));
83834
83818
  itemBuilder.prop(x => x.metricName).set(item.metricName);
83835
- itemBuilder.prop(x => x.menuSeparator).set(item.menuSeparator);
83836
- if (item.disabled2 != undefined) {
83837
- itemBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_4__.buildExpressionPropValue)(item.disabled2));
83838
- if (this.getLegacyNode().getParent() != undefined) {
83839
- itemBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
83840
- }
83841
- }
83842
83819
  itemBuilder.prop(x => x.onActionClick).set(context.generateHelperFunctionExpression(node, "onClick", item.onClick));
83843
83820
  itemBuilder.appendChild(context.convertChildNodes(item.children));
83844
83821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.5.0-multiuploadefs.2",
3
+ "version": "5.5.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,