@kontur.candy/generator 5.28.0-metrics.2 → 5.28.0-metrics.3

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 +50 -8
  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 : []);
@@ -60952,7 +60967,8 @@ __webpack_require__.r(__webpack_exports__);
60952
60967
  /* harmony export */ getAsyncTextResultHandler: () => (/* binding */ getAsyncTextResultHandler),
60953
60968
  /* harmony export */ getOperands: () => (/* binding */ getOperands),
60954
60969
  /* harmony export */ getSum: () => (/* binding */ getSum),
60955
- /* harmony export */ wrapDecimalOperand: () => (/* binding */ wrapDecimalOperand)
60970
+ /* harmony export */ wrapDecimalOperand: () => (/* binding */ wrapDecimalOperand),
60971
+ /* harmony export */ wrapDecimalOrUndefined: () => (/* binding */ wrapDecimalOrUndefined)
60956
60972
  /* harmony export */ });
60957
60973
  /* harmony import */ var big_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! big.js */ "./node_modules/big.js/big.mjs");
60958
60974
  /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
@@ -61042,6 +61058,18 @@ function wrapDecimalOperand(value) {
61042
61058
  }
61043
61059
  return new big_js__WEBPACK_IMPORTED_MODULE_0__["default"](0);
61044
61060
  }
61061
+ function wrapDecimalOrUndefined(value) {
61062
+ if (typeof value === "number" && isFinite(value)) {
61063
+ return new big_js__WEBPACK_IMPORTED_MODULE_0__["default"](value);
61064
+ }
61065
+ if (typeof value === "string" && /^-?\d+[.]?\d*$/.test(value)) {
61066
+ return new big_js__WEBPACK_IMPORTED_MODULE_0__["default"](value);
61067
+ }
61068
+ if (value instanceof big_js__WEBPACK_IMPORTED_MODULE_0__["default"]) {
61069
+ return value;
61070
+ }
61071
+ return undefined;
61072
+ }
61045
61073
  function getSum(values) {
61046
61074
  let allValuesIsEmpty = true;
61047
61075
  if (values.length === 0) {
@@ -83108,9 +83136,10 @@ class FormulaExpressionToFlangExpressionConverter {
83108
83136
  return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.wrapWithArgumentsCondition)(result);
83109
83137
  }
83110
83138
  compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
83139
+ 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
83140
  const result = expression.arguments.reduce((acc, curr) => {
83112
83141
  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;
83142
+ return acc != undefined ? makeDivision(acc, currExpr) : currExpr;
83114
83143
  }, undefined);
83115
83144
  if (result == undefined) {
83116
83145
  throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
@@ -86543,6 +86572,7 @@ __webpack_require__.r(__webpack_exports__);
86543
86572
  /* harmony export */ setTooltipSettingsProps: () => (/* binding */ setTooltipSettingsProps)
86544
86573
  /* harmony export */ });
86545
86574
  function setTooltipSettingsProps(markupBuilder, tooltipSettings) {
86575
+ markupBuilder.prop(x => x.tooltip).set(tooltipSettings.tooltip);
86546
86576
  markupBuilder.prop(x => x.tooltipWidth).set(tooltipSettings.tooltipWidth);
86547
86577
  markupBuilder.prop(x => x.tooltipPosition).set(tooltipSettings.tooltipPosition);
86548
86578
  }
@@ -86571,21 +86601,27 @@ __webpack_require__.r(__webpack_exports__);
86571
86601
 
86572
86602
 
86573
86603
 
86574
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
86604
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
86575
86605
 
86576
86606
 
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 {
86607
+ 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
86608
  constructor(...args) {
86579
86609
  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);
86610
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltip", _descriptor, this);
86611
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipPosition", _descriptor2, this);
86612
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipWidth", _descriptor3, this);
86582
86613
  }
86583
- }, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipPosition", [_dec2], {
86614
+ }, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltip", [_dec2], {
86584
86615
  configurable: true,
86585
86616
  enumerable: true,
86586
86617
  writable: true,
86587
86618
  initializer: null
86588
- }), _descriptor2 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipWidth", [_dec3], {
86619
+ }), _descriptor2 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipPosition", [_dec3], {
86620
+ configurable: true,
86621
+ enumerable: true,
86622
+ writable: true,
86623
+ initializer: null
86624
+ }), _descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tooltipWidth", [_dec4], {
86589
86625
  configurable: true,
86590
86626
  enumerable: true,
86591
86627
  writable: true,
@@ -97569,6 +97605,12 @@ class StickyTableColumnConverter extends _Column_ColumnConverter__WEBPACK_IMPORT
97569
97605
  static getAcceptNodeClass() {
97570
97606
  return _StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode;
97571
97607
  }
97608
+ *doBuildNormalizeRules(builder) {
97609
+ const node = this.getCurrentNodeAs(_StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode);
97610
+ if (node.multiple) {
97611
+ yield* builder.childrenInitializer(node, false);
97612
+ }
97613
+ }
97572
97614
  doBuildDataDeclaration(context) {
97573
97615
  const node = this.getCurrentNodeAs(_StickyTableNode__WEBPACK_IMPORTED_MODULE_2__.StickyTableColumnNode);
97574
97616
  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.2",
3
+ "version": "5.28.0-metrics.3",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,