@infomaximum/widget-sdk 3.24.1 → 3.25.0-24.3.01-2

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.
package/dist/index.d.ts CHANGED
@@ -34,7 +34,8 @@ declare enum EControlType {
34
34
  eventsColor = "eventsColor",
35
35
  inputMarkdown = "inputMarkdown",
36
36
  filter = "filter",
37
- actionOnClick = "actionOnClick"
37
+ actionOnClick = "actionOnClick",
38
+ eventsPicker = "eventsPicker"
38
39
  }
39
40
  /** Конфигурация элемента управления настройкой */
40
41
  interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
@@ -78,6 +79,9 @@ interface ICalculatorIndicatorOutput {
78
79
  interface ICalculatorDimensionInput extends ICalculatorIndicatorInput {
79
80
  formula: string;
80
81
  hideEmpty?: boolean;
82
+ /** Временно поддерживается обратная совместимость с форматом { alias: string; formula: string }[] */
83
+ /** Появилась необходимость в ленточном графике, т.к. разрез длительность используется, как мера */
84
+ additionalFormulas?: Map<string, string>;
81
85
  }
82
86
  interface ICalculatorDimensionOutput extends ICalculatorIndicatorOutput {
83
87
  }
@@ -424,25 +428,58 @@ type TWidgetFiltering = {
424
428
  mode: EWidgetFilterMode;
425
429
  };
426
430
  declare enum EColorMode {
431
+ DISABLED = "DISABLED",
427
432
  FORMULA = "FORMULA",
428
433
  BASE = "BASE",
429
434
  GRADIENT = "GRADIENT",
430
- AUTO = "AUTO"
435
+ AUTO = "AUTO",
436
+ RULE = "RULE",
437
+ VALUES = "VALUES",
438
+ BY_DIMENSION = "BY_DIMENSION"
431
439
  }
432
- /** Настройка цвета */
433
- type TColor = {
434
- mode: EColorMode.FORMULA;
435
- formula: string;
436
- } | {
440
+ type TColorBase = {
437
441
  mode: EColorMode.BASE;
438
442
  value?: string;
439
443
  defaultColor?: string;
444
+ };
445
+ declare enum EColorScope {
446
+ WORKSPACE = "WORKSPACE",
447
+ DASHBOARD = "DASHBOARD"
448
+ }
449
+ type TColorRuleCommon = {
450
+ mode: EColorMode.RULE;
451
+ ruleName: string;
452
+ };
453
+ type TColorRule = ({
454
+ scope: EColorScope.DASHBOARD | null;
440
455
  } | {
456
+ scope: EColorScope.WORKSPACE;
457
+ workspaceGroupId: number | null;
458
+ }) & TColorRuleCommon;
459
+ interface IColoredValue {
460
+ value: string;
461
+ color: TColorBase | TColorRule;
462
+ }
463
+ /** Настройка цвета */
464
+ type TColor = {
465
+ mode: EColorMode.FORMULA;
466
+ formula: string;
467
+ } | TColorBase | {
441
468
  mode: EColorMode.GRADIENT;
442
469
  startValue: string;
443
470
  endValue: string;
444
471
  } | {
445
472
  mode: EColorMode.AUTO;
473
+ } | TColorRule | {
474
+ mode: EColorMode.VALUES;
475
+ dimensionFormula: string;
476
+ items: IColoredValue[];
477
+ } | {
478
+ mode: EColorMode.BY_DIMENSION;
479
+ dimensionName: string;
480
+ items: IColoredValue[];
481
+ } | {
482
+ mode: EColorMode.DISABLED;
446
483
  };
447
484
  declare enum EDisplayConditionMode {
448
485
  DISABLED = "DISABLED",
@@ -707,6 +744,9 @@ interface IWidgetTable {
707
744
  * full - полный
708
745
  */
709
746
  type TDisplayMode = "preview" | "full";
747
+ interface IDisplayRule {
748
+ color: TColor;
749
+ }
710
750
  interface IWidgetsContext {
711
751
  /** используемый язык в системе */
712
752
  language: ELanguages;
@@ -729,6 +769,8 @@ interface IWidgetsContext {
729
769
  userLogin: string;
730
770
  scripts: Map<string, IActionScript>;
731
771
  tables: Set<string>;
772
+ reportDisplayRules: Map<string, IDisplayRule>;
773
+ workspaceDisplayRules: Map<number, Map<string, IDisplayRule>>;
732
774
  }
733
775
 
734
776
  declare enum EWidgetActionInputMode {
@@ -1119,7 +1161,7 @@ declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimens
1119
1161
  declare function mapMeasuresToInputs<T extends IWidgetMeasure>(measures: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (measure: T) => Map<string, string>): ICalculatorMeasureInput[];
1120
1162
 
1121
1163
  /** Конвертировать разрезы виджета во входы для вычислителя */
1122
- declare function mapDimensionsToInputs(dimensions: IWidgetDimension[], variables: Map<string, TWidgetVariable>): ICalculatorDimensionInput[];
1164
+ declare function mapDimensionsToInputs<T extends IWidgetDimension>(dimensions: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (dimension: T) => Map<string, string>): ICalculatorDimensionInput[];
1123
1165
 
1124
1166
  /** Конвертировать процессные показатели виджета во входы для вычислителя */
1125
1167
  declare function mapTransitionMeasuresToInputs<T extends IProcessIndicator>(indicators: T[], process: IWidgetProcess, variables: Map<string, TWidgetVariable>, addFormulas?: (indicator: T) => Map<string, string>): ICalculatorMeasureInput[];
@@ -1381,4 +1423,4 @@ declare global {
1381
1423
  }
1382
1424
  }
1383
1425
 
1384
- export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionScript, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorVariable, type ICalculatorVariablesValues, type ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, type IDivePanelDescription, type IDividerRecord, type IEdge, type IExportColumnOrder, type IFillSettings, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type ILens, type IPanelDescription, type IPanelDescriptionCreator, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IPlacement, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRange, type ISelectOption, type ISortOrder, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetAction, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TBoundedContentWithIndicator, type TColor, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TGroupLevelRecord, type TLaunchActionParams, type TProcessIndicatorValue, type TRecordAccessor, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetSortingValueRelatedWidgetDimension, type TWidgetSortingValueRelatedWidgetIndicator, type TWidgetSortingValueRelatedWidgetMeasure, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
1426
+ export { ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionScript, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorVariable, type ICalculatorVariablesValues, type IColoredValue, type ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IExportColumnOrder, type IFillSettings, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type ILens, type IPanelDescription, type IPanelDescriptionCreator, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IPlacement, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRange, type ISelectOption, type ISortOrder, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetAction, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TBoundedContentWithIndicator, type TColor, type TColorRule, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TGroupLevelRecord, type TLaunchActionParams, type TProcessIndicatorValue, type TRecordAccessor, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetSortingValueRelatedWidgetDimension, type TWidgetSortingValueRelatedWidgetIndicator, type TWidgetSortingValueRelatedWidgetMeasure, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
package/dist/index.esm.js CHANGED
@@ -476,11 +476,20 @@ var EWidgetFilterMode;
476
476
  })(EWidgetFilterMode || (EWidgetFilterMode = {}));
477
477
  var EColorMode;
478
478
  (function (EColorMode) {
479
+ EColorMode["DISABLED"] = "DISABLED";
479
480
  EColorMode["FORMULA"] = "FORMULA";
480
481
  EColorMode["BASE"] = "BASE";
481
482
  EColorMode["GRADIENT"] = "GRADIENT";
482
483
  EColorMode["AUTO"] = "AUTO";
484
+ EColorMode["RULE"] = "RULE";
485
+ EColorMode["VALUES"] = "VALUES";
486
+ EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
483
487
  })(EColorMode || (EColorMode = {}));
488
+ var EColorScope;
489
+ (function (EColorScope) {
490
+ EColorScope["WORKSPACE"] = "WORKSPACE";
491
+ EColorScope["DASHBOARD"] = "DASHBOARD";
492
+ })(EColorScope || (EColorScope = {}));
484
493
  var EDisplayConditionMode;
485
494
  (function (EDisplayConditionMode) {
486
495
  EDisplayConditionMode["DISABLED"] = "DISABLED";
@@ -517,8 +526,7 @@ var escapeSpecialCharacters = function (formula) {
517
526
  return formula
518
527
  .replaceAll("\\", "\\\\")
519
528
  .replaceAll('"', '\\"')
520
- .replaceAll("`", "\\`")
521
- .replaceAll("-", "\\-");
529
+ .replaceAll("`", "\\`");
522
530
  };
523
531
 
524
532
  function generateColumnFormula(tableName, columnName) {
@@ -760,7 +768,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
760
768
  });
761
769
  }
762
770
 
763
- function mapDimensionToInput(dimension, variables) {
771
+ function mapDimensionToInput(dimension, variables, addFormulas) {
772
+ if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
764
773
  var formula = getDimensionFormula(dimension);
765
774
  if (!formula) {
766
775
  return null;
@@ -774,12 +783,13 @@ function mapDimensionToInput(dimension, variables) {
774
783
  dataType: dimension.dataType,
775
784
  hideEmpty: dimension.hideEmptyValues,
776
785
  displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
786
+ additionalFormulas: addFormulas(dimension),
777
787
  };
778
788
  }
779
789
  /** Конвертировать разрезы виджета во входы для вычислителя */
780
- function mapDimensionsToInputs(dimensions, variables) {
790
+ function mapDimensionsToInputs(dimensions, variables, addFormulas) {
781
791
  return compactMap(dimensions, function (dimension) {
782
- return mapDimensionToInput(dimension, variables);
792
+ return mapDimensionToInput(dimension, variables, addFormulas);
783
793
  });
784
794
  }
785
795
 
@@ -941,6 +951,7 @@ var EControlType;
941
951
  EControlType["inputMarkdown"] = "inputMarkdown";
942
952
  EControlType["filter"] = "filter";
943
953
  EControlType["actionOnClick"] = "actionOnClick";
954
+ EControlType["eventsPicker"] = "eventsPicker";
944
955
  })(EControlType || (EControlType = {}));
945
956
 
946
957
  var ESortDirection;
@@ -1045,4 +1056,4 @@ var getLocalizedText = function (language, locObj, props) {
1045
1056
  return localization.getLocalized(locObj, props);
1046
1057
  };
1047
1058
 
1048
- export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
1059
+ export { ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
package/dist/index.js CHANGED
@@ -477,11 +477,20 @@ exports.EWidgetFilterMode = void 0;
477
477
  })(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
478
478
  exports.EColorMode = void 0;
479
479
  (function (EColorMode) {
480
+ EColorMode["DISABLED"] = "DISABLED";
480
481
  EColorMode["FORMULA"] = "FORMULA";
481
482
  EColorMode["BASE"] = "BASE";
482
483
  EColorMode["GRADIENT"] = "GRADIENT";
483
484
  EColorMode["AUTO"] = "AUTO";
485
+ EColorMode["RULE"] = "RULE";
486
+ EColorMode["VALUES"] = "VALUES";
487
+ EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
484
488
  })(exports.EColorMode || (exports.EColorMode = {}));
489
+ exports.EColorScope = void 0;
490
+ (function (EColorScope) {
491
+ EColorScope["WORKSPACE"] = "WORKSPACE";
492
+ EColorScope["DASHBOARD"] = "DASHBOARD";
493
+ })(exports.EColorScope || (exports.EColorScope = {}));
485
494
  exports.EDisplayConditionMode = void 0;
486
495
  (function (EDisplayConditionMode) {
487
496
  EDisplayConditionMode["DISABLED"] = "DISABLED";
@@ -518,8 +527,7 @@ var escapeSpecialCharacters = function (formula) {
518
527
  return formula
519
528
  .replaceAll("\\", "\\\\")
520
529
  .replaceAll('"', '\\"')
521
- .replaceAll("`", "\\`")
522
- .replaceAll("-", "\\-");
530
+ .replaceAll("`", "\\`");
523
531
  };
524
532
 
525
533
  function generateColumnFormula(tableName, columnName) {
@@ -761,7 +769,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
761
769
  });
762
770
  }
763
771
 
764
- function mapDimensionToInput(dimension, variables) {
772
+ function mapDimensionToInput(dimension, variables, addFormulas) {
773
+ if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
765
774
  var formula = getDimensionFormula(dimension);
766
775
  if (!formula) {
767
776
  return null;
@@ -775,12 +784,13 @@ function mapDimensionToInput(dimension, variables) {
775
784
  dataType: dimension.dataType,
776
785
  hideEmpty: dimension.hideEmptyValues,
777
786
  displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
787
+ additionalFormulas: addFormulas(dimension),
778
788
  };
779
789
  }
780
790
  /** Конвертировать разрезы виджета во входы для вычислителя */
781
- function mapDimensionsToInputs(dimensions, variables) {
791
+ function mapDimensionsToInputs(dimensions, variables, addFormulas) {
782
792
  return compactMap(dimensions, function (dimension) {
783
- return mapDimensionToInput(dimension, variables);
793
+ return mapDimensionToInput(dimension, variables, addFormulas);
784
794
  });
785
795
  }
786
796
 
@@ -942,6 +952,7 @@ exports.EControlType = void 0;
942
952
  EControlType["inputMarkdown"] = "inputMarkdown";
943
953
  EControlType["filter"] = "filter";
944
954
  EControlType["actionOnClick"] = "actionOnClick";
955
+ EControlType["eventsPicker"] = "eventsPicker";
945
956
  })(exports.EControlType || (exports.EControlType = {}));
946
957
 
947
958
  exports.ESortDirection = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "3.24.1",
3
+ "version": "3.25.0-24.03.01-2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",