@kontur.candy/generator 5.28.0-metrics.0 → 5.28.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 +36 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -60364,6 +60364,7 @@ __webpack_require__.r(__webpack_exports__);
60364
60364
  /* harmony export */ getAllUnitIdInstances: () => (/* binding */ getAllUnitIdInstances),
60365
60365
  /* harmony export */ isUnitIdEquals: () => (/* binding */ isUnitIdEquals),
60366
60366
  /* harmony export */ sectionNameToUnitId: () => (/* binding */ sectionNameToUnitId),
60367
+ /* harmony export */ sectionNameToUnitIdForNavigation: () => (/* binding */ sectionNameToUnitIdForNavigation),
60367
60368
  /* harmony export */ unitIdToLegacyUnitId: () => (/* binding */ unitIdToLegacyUnitId),
60368
60369
  /* harmony export */ unitIdWithInstance: () => (/* binding */ unitIdWithInstance),
60369
60370
  /* harmony export */ unitWithoutInstance: () => (/* binding */ unitWithoutInstance)
@@ -60415,6 +60416,20 @@ function sectionNameToUnitId(sectionName) {
60415
60416
  };
60416
60417
  }
60417
60418
  }
60419
+ function sectionNameToUnitIdForNavigation(sectionName) {
60420
+ const [id, ...instances] = sectionName.split("-");
60421
+ if (instances.length === 0) {
60422
+ return {
60423
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
60424
+ };
60425
+ } else {
60426
+ var _instances$2;
60427
+ return {
60428
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
60429
+ instance: (_instances$2 = instances[0]) !== null && _instances$2 !== void 0 ? _instances$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
60430
+ };
60431
+ }
60432
+ }
60418
60433
  function getAllUnitIdInstances(unitId) {
60419
60434
  var _unitId$parentInstanc, _unitId$instance;
60420
60435
  return ((_unitId$parentInstanc = unitId.parentInstances) !== null && _unitId$parentInstanc !== void 0 ? _unitId$parentInstanc : []).concat((_unitId$instance = unitId.instance) !== null && _unitId$instance !== void 0 ? _unitId$instance : []);
@@ -83108,9 +83123,10 @@ class FormulaExpressionToFlangExpressionConverter {
83108
83123
  return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.wrapWithArgumentsCondition)(result);
83109
83124
  }
83110
83125
  compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
83126
+ const makeDivision = (numerator, denominator) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(denominator, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DivisionBinaryExpression(numerator, denominator), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression());
83111
83127
  const result = expression.arguments.reduce((acc, curr) => {
83112
83128
  const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule), 0);
83113
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DivisionBinaryExpression(acc, currExpr) : currExpr;
83129
+ return acc != undefined ? makeDivision(acc, currExpr) : currExpr;
83114
83130
  }, undefined);
83115
83131
  if (result == undefined) {
83116
83132
  throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
@@ -86543,6 +86559,7 @@ __webpack_require__.r(__webpack_exports__);
86543
86559
  /* harmony export */ setTooltipSettingsProps: () => (/* binding */ setTooltipSettingsProps)
86544
86560
  /* harmony export */ });
86545
86561
  function setTooltipSettingsProps(markupBuilder, tooltipSettings) {
86562
+ markupBuilder.prop(x => x.tooltip).set(tooltipSettings.tooltip);
86546
86563
  markupBuilder.prop(x => x.tooltipWidth).set(tooltipSettings.tooltipWidth);
86547
86564
  markupBuilder.prop(x => x.tooltipPosition).set(tooltipSettings.tooltipPosition);
86548
86565
  }
@@ -86571,21 +86588,27 @@ __webpack_require__.r(__webpack_exports__);
86571
86588
 
86572
86589
 
86573
86590
 
86574
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
86591
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
86575
86592
 
86576
86593
 
86577
- let TooltipSettingsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixinNode)(), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tooltipPosition", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.enum(..._Helpers_Help_PopupPosition__WEBPACK_IMPORTED_MODULE_4__.allPopupPositions), `Позиция тултипа. По умолчанию \"top left\". Возможные позиции: ${_Helpers_Help_PopupPosition__WEBPACK_IMPORTED_MODULE_4__.allPopupPositions.join(", ")}`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tooltipWidth", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.lengthUnit, ""), _dec(_class = (_class2 = class TooltipSettingsNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
86594
+ let TooltipSettingsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixinNode)(), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tooltip", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Текст в тултипе.`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tooltipPosition", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.enum(..._Helpers_Help_PopupPosition__WEBPACK_IMPORTED_MODULE_4__.allPopupPositions), `Позиция тултипа. По умолчанию \"top left\". Возможные позиции: ${_Helpers_Help_PopupPosition__WEBPACK_IMPORTED_MODULE_4__.allPopupPositions.join(", ")}`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tooltipWidth", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.lengthUnit, ""), _dec(_class = (_class2 = class TooltipSettingsNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
86578
86595
  constructor(...args) {
86579
86596
  super(...args);
86580
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipPosition", _descriptor, this);
86581
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipWidth", _descriptor2, this);
86597
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltip", _descriptor, this);
86598
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipPosition", _descriptor2, this);
86599
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipWidth", _descriptor3, this);
86582
86600
  }
86583
- }, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipPosition", [_dec2], {
86601
+ }, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltip", [_dec2], {
86602
+ configurable: true,
86603
+ enumerable: true,
86604
+ writable: true,
86605
+ initializer: null
86606
+ }), _descriptor2 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipPosition", [_dec3], {
86584
86607
  configurable: true,
86585
86608
  enumerable: true,
86586
86609
  writable: true,
86587
86610
  initializer: null
86588
- }), _descriptor2 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipWidth", [_dec3], {
86611
+ }), _descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipWidth", [_dec4], {
86589
86612
  configurable: true,
86590
86613
  enumerable: true,
86591
86614
  writable: true,
@@ -97569,6 +97592,12 @@ class StickyTableColumnConverter extends _Column_ColumnConverter__WEBPACK_IMPORT
97569
97592
  static getAcceptNodeClass() {
97570
97593
  return _StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode;
97571
97594
  }
97595
+ *doBuildNormalizeRules(builder) {
97596
+ const node = this.getCurrentNodeAs(_StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode);
97597
+ if (node.multiple) {
97598
+ yield* builder.childrenInitializer(node, false);
97599
+ }
97600
+ }
97572
97601
  doBuildDataDeclaration(context) {
97573
97602
  const node = this.getCurrentNodeAs(_StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode);
97574
97603
  if (node.multiple) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.28.0-metrics.0",
3
+ "version": "5.28.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,