@infomaximum/widget-sdk 3.27.1 → 3.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.
- package/dist/index.d.ts +49 -8
- package/dist/index.esm.js +17 -4
- package/dist/index.js +16 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,9 @@ interface ICalculatorIndicatorOutput {
|
|
|
79
79
|
interface ICalculatorDimensionInput extends ICalculatorIndicatorInput {
|
|
80
80
|
formula: string;
|
|
81
81
|
hideEmpty?: boolean;
|
|
82
|
+
/** Временно поддерживается обратная совместимость с форматом { alias: string; formula: string }[] */
|
|
83
|
+
/** Появилась необходимость в ленточном графике, т.к. разрез длительность используется, как мера */
|
|
84
|
+
additionalFormulas?: Map<string, string>;
|
|
82
85
|
}
|
|
83
86
|
interface ICalculatorDimensionOutput extends ICalculatorIndicatorOutput {
|
|
84
87
|
}
|
|
@@ -425,10 +428,37 @@ type TWidgetFiltering = {
|
|
|
425
428
|
mode: EWidgetFilterMode;
|
|
426
429
|
};
|
|
427
430
|
declare enum EColorMode {
|
|
431
|
+
DISABLED = "DISABLED",
|
|
428
432
|
FORMULA = "FORMULA",
|
|
429
433
|
BASE = "BASE",
|
|
430
434
|
GRADIENT = "GRADIENT",
|
|
431
|
-
AUTO = "AUTO"
|
|
435
|
+
AUTO = "AUTO",
|
|
436
|
+
RULE = "RULE",
|
|
437
|
+
VALUES = "VALUES",
|
|
438
|
+
BY_DIMENSION = "BY_DIMENSION"
|
|
439
|
+
}
|
|
440
|
+
type TColorBase = {
|
|
441
|
+
mode: EColorMode.BASE;
|
|
442
|
+
value?: string;
|
|
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;
|
|
455
|
+
} | {
|
|
456
|
+
scope: EColorScope.WORKSPACE;
|
|
457
|
+
workspaceGroupId: number | null;
|
|
458
|
+
}) & TColorRuleCommon;
|
|
459
|
+
interface IColoredValue {
|
|
460
|
+
value: string;
|
|
461
|
+
color: TColorBase | TColorRule;
|
|
432
462
|
}
|
|
433
463
|
declare enum EMarkdownDisplayMode {
|
|
434
464
|
NONE = "NONE",
|
|
@@ -438,16 +468,22 @@ declare enum EMarkdownDisplayMode {
|
|
|
438
468
|
type TColor = {
|
|
439
469
|
mode: EColorMode.FORMULA;
|
|
440
470
|
formula: string;
|
|
441
|
-
} | {
|
|
442
|
-
mode: EColorMode.BASE;
|
|
443
|
-
value?: string;
|
|
444
|
-
defaultColor?: string;
|
|
445
|
-
} | {
|
|
471
|
+
} | TColorBase | {
|
|
446
472
|
mode: EColorMode.GRADIENT;
|
|
447
473
|
startValue: string;
|
|
448
474
|
endValue: string;
|
|
449
475
|
} | {
|
|
450
476
|
mode: EColorMode.AUTO;
|
|
477
|
+
} | TColorRule | {
|
|
478
|
+
mode: EColorMode.VALUES;
|
|
479
|
+
dimensionFormula: string;
|
|
480
|
+
items: IColoredValue[];
|
|
481
|
+
} | {
|
|
482
|
+
mode: EColorMode.BY_DIMENSION;
|
|
483
|
+
dimensionName: string;
|
|
484
|
+
items: IColoredValue[];
|
|
485
|
+
} | {
|
|
486
|
+
mode: EColorMode.DISABLED;
|
|
451
487
|
};
|
|
452
488
|
declare enum EDisplayConditionMode {
|
|
453
489
|
DISABLED = "DISABLED",
|
|
@@ -717,6 +753,9 @@ interface IWidgetTable {
|
|
|
717
753
|
* full - полный
|
|
718
754
|
*/
|
|
719
755
|
type TDisplayMode = "preview" | "full";
|
|
756
|
+
interface IDisplayRule {
|
|
757
|
+
color: TColor;
|
|
758
|
+
}
|
|
720
759
|
interface IWidgetsContext {
|
|
721
760
|
/** используемый язык в системе */
|
|
722
761
|
language: ELanguages;
|
|
@@ -739,6 +778,8 @@ interface IWidgetsContext {
|
|
|
739
778
|
userLogin: string;
|
|
740
779
|
scripts: Map<string, IActionScript>;
|
|
741
780
|
tables: Set<string>;
|
|
781
|
+
reportDisplayRules: Map<string, IDisplayRule>;
|
|
782
|
+
workspaceDisplayRules: Map<number, Map<string, IDisplayRule>>;
|
|
742
783
|
}
|
|
743
784
|
|
|
744
785
|
declare enum EWidgetActionInputMode {
|
|
@@ -1136,7 +1177,7 @@ declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimens
|
|
|
1136
1177
|
declare function mapMeasuresToInputs<T extends IWidgetMeasure>(measures: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (measure: T) => Map<string, string>): ICalculatorMeasureInput[];
|
|
1137
1178
|
|
|
1138
1179
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
1139
|
-
declare function mapDimensionsToInputs(dimensions:
|
|
1180
|
+
declare function mapDimensionsToInputs<T extends IWidgetDimension>(dimensions: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (dimension: T) => Map<string, string>): ICalculatorDimensionInput[];
|
|
1140
1181
|
|
|
1141
1182
|
/** Конвертировать процессные показатели виджета во входы для вычислителя */
|
|
1142
1183
|
declare function mapTransitionMeasuresToInputs<T extends IProcessIndicator>(indicators: T[], process: IWidgetProcess, variables: Map<string, TWidgetVariable>, addFormulas?: (indicator: T) => Map<string, string>): ICalculatorMeasureInput[];
|
|
@@ -1398,4 +1439,4 @@ declare global {
|
|
|
1398
1439
|
}
|
|
1399
1440
|
}
|
|
1400
1441
|
|
|
1401
|
-
export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, 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 IMarkdownMeasure, 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 };
|
|
1442
|
+
export { ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, 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 IMarkdownMeasure, 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
|
@@ -475,11 +475,20 @@ var EWidgetFilterMode;
|
|
|
475
475
|
})(EWidgetFilterMode || (EWidgetFilterMode = {}));
|
|
476
476
|
var EColorMode;
|
|
477
477
|
(function (EColorMode) {
|
|
478
|
+
EColorMode["DISABLED"] = "DISABLED";
|
|
478
479
|
EColorMode["FORMULA"] = "FORMULA";
|
|
479
480
|
EColorMode["BASE"] = "BASE";
|
|
480
481
|
EColorMode["GRADIENT"] = "GRADIENT";
|
|
481
482
|
EColorMode["AUTO"] = "AUTO";
|
|
483
|
+
EColorMode["RULE"] = "RULE";
|
|
484
|
+
EColorMode["VALUES"] = "VALUES";
|
|
485
|
+
EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
|
|
482
486
|
})(EColorMode || (EColorMode = {}));
|
|
487
|
+
var EColorScope;
|
|
488
|
+
(function (EColorScope) {
|
|
489
|
+
EColorScope["WORKSPACE"] = "WORKSPACE";
|
|
490
|
+
EColorScope["DASHBOARD"] = "DASHBOARD";
|
|
491
|
+
})(EColorScope || (EColorScope = {}));
|
|
483
492
|
var EMarkdownDisplayMode;
|
|
484
493
|
(function (EMarkdownDisplayMode) {
|
|
485
494
|
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
@@ -760,7 +769,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
760
769
|
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
761
770
|
}
|
|
762
771
|
|
|
763
|
-
function mapDimensionToInput(dimension, variables) {
|
|
772
|
+
function mapDimensionToInput(dimension, variables, addFormulas) {
|
|
773
|
+
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
764
774
|
var formula = getDimensionFormula(dimension);
|
|
765
775
|
if (!formula) {
|
|
766
776
|
return null;
|
|
@@ -774,11 +784,14 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
774
784
|
dataType: dimension.dataType,
|
|
775
785
|
hideEmpty: dimension.hideEmptyValues,
|
|
776
786
|
displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
|
|
787
|
+
additionalFormulas: addFormulas(dimension),
|
|
777
788
|
};
|
|
778
789
|
}
|
|
779
790
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
780
|
-
function mapDimensionsToInputs(dimensions, variables) {
|
|
781
|
-
return compactMap(dimensions, function (dimension) {
|
|
791
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
792
|
+
return compactMap(dimensions, function (dimension) {
|
|
793
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
794
|
+
});
|
|
782
795
|
}
|
|
783
796
|
|
|
784
797
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|
|
@@ -1053,4 +1066,4 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1053
1066
|
return localization.getLocalized(locObj, props);
|
|
1054
1067
|
};
|
|
1055
1068
|
|
|
1056
|
-
export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, 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 };
|
|
1069
|
+
export { ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, 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
|
@@ -476,11 +476,20 @@ exports.EWidgetFilterMode = void 0;
|
|
|
476
476
|
})(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
|
|
477
477
|
exports.EColorMode = void 0;
|
|
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
|
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
488
|
+
exports.EColorScope = void 0;
|
|
489
|
+
(function (EColorScope) {
|
|
490
|
+
EColorScope["WORKSPACE"] = "WORKSPACE";
|
|
491
|
+
EColorScope["DASHBOARD"] = "DASHBOARD";
|
|
492
|
+
})(exports.EColorScope || (exports.EColorScope = {}));
|
|
484
493
|
exports.EMarkdownDisplayMode = void 0;
|
|
485
494
|
(function (EMarkdownDisplayMode) {
|
|
486
495
|
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
@@ -761,7 +770,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
761
770
|
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
762
771
|
}
|
|
763
772
|
|
|
764
|
-
function mapDimensionToInput(dimension, variables) {
|
|
773
|
+
function mapDimensionToInput(dimension, variables, addFormulas) {
|
|
774
|
+
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
765
775
|
var formula = getDimensionFormula(dimension);
|
|
766
776
|
if (!formula) {
|
|
767
777
|
return null;
|
|
@@ -775,11 +785,14 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
775
785
|
dataType: dimension.dataType,
|
|
776
786
|
hideEmpty: dimension.hideEmptyValues,
|
|
777
787
|
displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
|
|
788
|
+
additionalFormulas: addFormulas(dimension),
|
|
778
789
|
};
|
|
779
790
|
}
|
|
780
791
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
781
|
-
function mapDimensionsToInputs(dimensions, variables) {
|
|
782
|
-
return compactMap(dimensions, function (dimension) {
|
|
792
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
793
|
+
return compactMap(dimensions, function (dimension) {
|
|
794
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
795
|
+
});
|
|
783
796
|
}
|
|
784
797
|
|
|
785
798
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|