@kontur.candy/generator 5.5.0-multiuploadefs.2 → 5.5.0-ndflinquiryredisign.1

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 +20 -42
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -60452,7 +60452,7 @@ 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";
60455
+ PatchFufSteps[PatchFufSteps["ShowCombineResult"] = 4] = "ShowCombineResult";
60456
60456
  return PatchFufSteps;
60457
60457
  }({});
60458
60458
  let TableType = /*#__PURE__*/function (TableType) {
@@ -81208,22 +81208,15 @@ class FormulaExpressionToFlangExpressionConverter {
81208
81208
  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
81209
  }
81210
81210
  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
- }
81211
+ const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
81212
+ const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
81213
+ const firstPart = matchPaths.matchedPath.toCurrentIteration();
81214
+ const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
81215
+ const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
81216
+ const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
81217
+ const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
81218
+ const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
81219
+ 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
81220
  const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetExpression(reduceExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(targetKeyPath.toCurrentIteration(), "value"));
81228
81221
  return finalValueExpression;
81229
81222
  }
@@ -83398,11 +83391,11 @@ __webpack_require__.r(__webpack_exports__);
83398
83391
 
83399
83392
 
83400
83393
 
83401
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
83394
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
83402
83395
 
83403
83396
 
83404
83397
 
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 {
83398
+ 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
83399
  constructor(...args) {
83407
83400
  super(...args);
83408
83401
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataReference", _descriptor, this);
@@ -83412,8 +83405,7 @@ let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
83412
83405
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disabled", _descriptor5, this);
83413
83406
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disabled2", _descriptor6, this);
83414
83407
  _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);
83408
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor8, this);
83417
83409
  }
83418
83410
  getOwnPath() {
83419
83411
  return this.dataReference.getOwnPath();
@@ -83453,12 +83445,7 @@ let ActionNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
83453
83445
  enumerable: true,
83454
83446
  writable: true,
83455
83447
  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], {
83448
+ }), _descriptor8 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec9], {
83462
83449
  configurable: true,
83463
83450
  enumerable: true,
83464
83451
  writable: true,
@@ -83790,9 +83777,7 @@ __webpack_require__.r(__webpack_exports__);
83790
83777
  /* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
83791
83778
  /* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
83792
83779
  /* 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
-
83780
+ /* harmony import */ var _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DropdownButtonNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Action/DropdownButton/DropdownButtonNode.ts");
83796
83781
 
83797
83782
 
83798
83783
 
@@ -83800,27 +83785,27 @@ __webpack_require__.r(__webpack_exports__);
83800
83785
 
83801
83786
  class DropdownButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
83802
83787
  static getAcceptNodeClass() {
83803
- return _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode;
83788
+ return _DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode;
83804
83789
  }
83805
83790
  get nodePaths() {
83806
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83791
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83807
83792
  return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(node)];
83808
83793
  }
83809
83794
  doBuildDataDeclaration(context) {
83810
83795
  return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
83811
83796
  }
83812
83797
  buildChildrenDataDeclaration(context) {
83813
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83798
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83814
83799
  return context.mergeDataDeclaration(...node.items.map(item => context.processChildrenDataDeclaration(item.children)));
83815
83800
  }
83816
83801
  *doTraverseChildren() {
83817
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83802
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83818
83803
  for (const item of node.items) {
83819
83804
  yield* item.children;
83820
83805
  }
83821
83806
  }
83822
83807
  doConvert(context) {
83823
- const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_5__.DropdownButtonNode);
83808
+ const node = this.getCurrentNodeAs(_DropdownButtonNode__WEBPACK_IMPORTED_MODULE_4__.DropdownButtonNode);
83824
83809
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("DropdownButton");
83825
83810
  markupBuilder.prop("data-tid").set(node.tid);
83826
83811
  markupBuilder.prop(x => x.width).set(node.width);
@@ -83832,13 +83817,6 @@ class DropdownButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
83832
83817
  itemBuilder.prop("data-tid").set(item.tid);
83833
83818
  itemBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(item));
83834
83819
  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
83820
  itemBuilder.prop(x => x.onActionClick).set(context.generateHelperFunctionExpression(node, "onClick", item.onClick));
83843
83821
  itemBuilder.appendChild(context.convertChildNodes(item.children));
83844
83822
  }
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-ndflinquiryredisign.1",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,