@infomaximum/widget-sdk 4.0.0-beta13 → 4.0.0-beta14
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
|
}
|
|
@@ -418,10 +421,37 @@ type TWidgetFiltering = {
|
|
|
418
421
|
mode: EWidgetFilterMode;
|
|
419
422
|
};
|
|
420
423
|
declare enum EColorMode {
|
|
424
|
+
DISABLED = "DISABLED",
|
|
421
425
|
FORMULA = "FORMULA",
|
|
422
426
|
BASE = "BASE",
|
|
423
427
|
GRADIENT = "GRADIENT",
|
|
424
|
-
AUTO = "AUTO"
|
|
428
|
+
AUTO = "AUTO",
|
|
429
|
+
RULE = "RULE",
|
|
430
|
+
VALUES = "VALUES",
|
|
431
|
+
BY_DIMENSION = "BY_DIMENSION"
|
|
432
|
+
}
|
|
433
|
+
type TColorBase = {
|
|
434
|
+
mode: EColorMode.BASE;
|
|
435
|
+
value?: string;
|
|
436
|
+
defaultColor?: string;
|
|
437
|
+
};
|
|
438
|
+
declare enum EColorScope {
|
|
439
|
+
WORKSPACE = "WORKSPACE",
|
|
440
|
+
DASHBOARD = "DASHBOARD"
|
|
441
|
+
}
|
|
442
|
+
type TColorRuleCommon = {
|
|
443
|
+
mode: EColorMode.RULE;
|
|
444
|
+
ruleName: string;
|
|
445
|
+
};
|
|
446
|
+
type TColorRule = ({
|
|
447
|
+
scope: EColorScope.DASHBOARD | null;
|
|
448
|
+
} | {
|
|
449
|
+
scope: EColorScope.WORKSPACE;
|
|
450
|
+
workspaceGroupId: number | null;
|
|
451
|
+
}) & TColorRuleCommon;
|
|
452
|
+
interface IColoredValue {
|
|
453
|
+
value: string;
|
|
454
|
+
color: TColorBase | TColorRule;
|
|
425
455
|
}
|
|
426
456
|
declare enum EMarkdownDisplayMode {
|
|
427
457
|
NONE = "NONE",
|
|
@@ -431,16 +461,22 @@ declare enum EMarkdownDisplayMode {
|
|
|
431
461
|
type TColor = {
|
|
432
462
|
mode: EColorMode.FORMULA;
|
|
433
463
|
formula: string;
|
|
434
|
-
} | {
|
|
435
|
-
mode: EColorMode.BASE;
|
|
436
|
-
value?: string;
|
|
437
|
-
defaultColor?: string;
|
|
438
|
-
} | {
|
|
464
|
+
} | TColorBase | {
|
|
439
465
|
mode: EColorMode.GRADIENT;
|
|
440
466
|
startValue: string;
|
|
441
467
|
endValue: string;
|
|
442
468
|
} | {
|
|
443
469
|
mode: EColorMode.AUTO;
|
|
470
|
+
} | TColorRule | {
|
|
471
|
+
mode: EColorMode.VALUES;
|
|
472
|
+
dimensionFormula: string;
|
|
473
|
+
items: IColoredValue[];
|
|
474
|
+
} | {
|
|
475
|
+
mode: EColorMode.BY_DIMENSION;
|
|
476
|
+
dimensionName: string;
|
|
477
|
+
items: IColoredValue[];
|
|
478
|
+
} | {
|
|
479
|
+
mode: EColorMode.DISABLED;
|
|
444
480
|
};
|
|
445
481
|
declare enum EDisplayConditionMode {
|
|
446
482
|
DISABLED = "DISABLED",
|
|
@@ -709,6 +745,9 @@ interface IWidgetTable {
|
|
|
709
745
|
* full - полный
|
|
710
746
|
*/
|
|
711
747
|
type TDisplayMode = "preview" | "full";
|
|
748
|
+
interface IDisplayRule {
|
|
749
|
+
color: TColor;
|
|
750
|
+
}
|
|
712
751
|
interface IWidgetsContext {
|
|
713
752
|
/** используемый язык в системе */
|
|
714
753
|
language: ELanguages;
|
|
@@ -731,6 +770,8 @@ interface IWidgetsContext {
|
|
|
731
770
|
userLogin: string;
|
|
732
771
|
scripts: Map<string, IActionScript>;
|
|
733
772
|
tables: Set<string>;
|
|
773
|
+
reportDisplayRules: Map<string, IDisplayRule>;
|
|
774
|
+
workspaceDisplayRules: Map<number, Map<string, IDisplayRule>>;
|
|
734
775
|
}
|
|
735
776
|
|
|
736
777
|
declare enum EWidgetActionInputMode {
|
|
@@ -1172,7 +1213,7 @@ declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimens
|
|
|
1172
1213
|
declare function mapMeasuresToInputs<T extends IWidgetMeasure>(measures: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (measure: T) => Map<string, string>): ICalculatorMeasureInput[];
|
|
1173
1214
|
|
|
1174
1215
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
1175
|
-
declare function mapDimensionsToInputs(dimensions:
|
|
1216
|
+
declare function mapDimensionsToInputs<T extends IWidgetDimension>(dimensions: T[], variables: Map<string, TWidgetVariable>, addFormulas?: (dimension: T) => Map<string, string>): ICalculatorDimensionInput[];
|
|
1176
1217
|
|
|
1177
1218
|
/** Конвертировать процессные показатели виджета во входы для вычислителя */
|
|
1178
1219
|
declare function mapTransitionMeasuresToInputs<T extends IProcessIndicator>(indicators: T[], process: IWidgetProcess, variables: Map<string, TWidgetVariable>, addFormulas?: (indicator: T) => Map<string, string>): ICalculatorMeasureInput[];
|
|
@@ -1440,4 +1481,4 @@ declare global {
|
|
|
1440
1481
|
}
|
|
1441
1482
|
}
|
|
1442
1483
|
|
|
1443
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, 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 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 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 TActionsOnClick, 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 TWidgetContainer, 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 };
|
|
1484
|
+
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, 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 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 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 TActionsOnClick, 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 TWidgetContainer, 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
|
@@ -502,11 +502,20 @@ var EWidgetFilterMode;
|
|
|
502
502
|
})(EWidgetFilterMode || (EWidgetFilterMode = {}));
|
|
503
503
|
var EColorMode;
|
|
504
504
|
(function (EColorMode) {
|
|
505
|
+
EColorMode["DISABLED"] = "DISABLED";
|
|
505
506
|
EColorMode["FORMULA"] = "FORMULA";
|
|
506
507
|
EColorMode["BASE"] = "BASE";
|
|
507
508
|
EColorMode["GRADIENT"] = "GRADIENT";
|
|
508
509
|
EColorMode["AUTO"] = "AUTO";
|
|
510
|
+
EColorMode["RULE"] = "RULE";
|
|
511
|
+
EColorMode["VALUES"] = "VALUES";
|
|
512
|
+
EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
|
|
509
513
|
})(EColorMode || (EColorMode = {}));
|
|
514
|
+
var EColorScope;
|
|
515
|
+
(function (EColorScope) {
|
|
516
|
+
EColorScope["WORKSPACE"] = "WORKSPACE";
|
|
517
|
+
EColorScope["DASHBOARD"] = "DASHBOARD";
|
|
518
|
+
})(EColorScope || (EColorScope = {}));
|
|
510
519
|
var EMarkdownDisplayMode;
|
|
511
520
|
(function (EMarkdownDisplayMode) {
|
|
512
521
|
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
@@ -787,7 +796,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
787
796
|
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
788
797
|
}
|
|
789
798
|
|
|
790
|
-
function mapDimensionToInput(dimension, variables) {
|
|
799
|
+
function mapDimensionToInput(dimension, variables, addFormulas) {
|
|
800
|
+
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
791
801
|
var formula = getDimensionFormula(dimension);
|
|
792
802
|
if (!formula) {
|
|
793
803
|
return null;
|
|
@@ -801,11 +811,14 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
801
811
|
dataType: dimension.dataType,
|
|
802
812
|
hideEmpty: dimension.hideEmptyValues,
|
|
803
813
|
displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
|
|
814
|
+
additionalFormulas: addFormulas(dimension),
|
|
804
815
|
};
|
|
805
816
|
}
|
|
806
817
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
807
|
-
function mapDimensionsToInputs(dimensions, variables) {
|
|
808
|
-
return compactMap(dimensions, function (dimension) {
|
|
818
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
819
|
+
return compactMap(dimensions, function (dimension) {
|
|
820
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
821
|
+
});
|
|
809
822
|
}
|
|
810
823
|
|
|
811
824
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|
|
@@ -1080,4 +1093,4 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1080
1093
|
return localization.getLocalized(locObj, props);
|
|
1081
1094
|
};
|
|
1082
1095
|
|
|
1083
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, 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 };
|
|
1096
|
+
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, 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
|
@@ -503,11 +503,20 @@ exports.EWidgetFilterMode = void 0;
|
|
|
503
503
|
})(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
|
|
504
504
|
exports.EColorMode = void 0;
|
|
505
505
|
(function (EColorMode) {
|
|
506
|
+
EColorMode["DISABLED"] = "DISABLED";
|
|
506
507
|
EColorMode["FORMULA"] = "FORMULA";
|
|
507
508
|
EColorMode["BASE"] = "BASE";
|
|
508
509
|
EColorMode["GRADIENT"] = "GRADIENT";
|
|
509
510
|
EColorMode["AUTO"] = "AUTO";
|
|
511
|
+
EColorMode["RULE"] = "RULE";
|
|
512
|
+
EColorMode["VALUES"] = "VALUES";
|
|
513
|
+
EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
|
|
510
514
|
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
515
|
+
exports.EColorScope = void 0;
|
|
516
|
+
(function (EColorScope) {
|
|
517
|
+
EColorScope["WORKSPACE"] = "WORKSPACE";
|
|
518
|
+
EColorScope["DASHBOARD"] = "DASHBOARD";
|
|
519
|
+
})(exports.EColorScope || (exports.EColorScope = {}));
|
|
511
520
|
exports.EMarkdownDisplayMode = void 0;
|
|
512
521
|
(function (EMarkdownDisplayMode) {
|
|
513
522
|
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
@@ -788,7 +797,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
788
797
|
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
789
798
|
}
|
|
790
799
|
|
|
791
|
-
function mapDimensionToInput(dimension, variables) {
|
|
800
|
+
function mapDimensionToInput(dimension, variables, addFormulas) {
|
|
801
|
+
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
792
802
|
var formula = getDimensionFormula(dimension);
|
|
793
803
|
if (!formula) {
|
|
794
804
|
return null;
|
|
@@ -802,11 +812,14 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
802
812
|
dataType: dimension.dataType,
|
|
803
813
|
hideEmpty: dimension.hideEmptyValues,
|
|
804
814
|
displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
|
|
815
|
+
additionalFormulas: addFormulas(dimension),
|
|
805
816
|
};
|
|
806
817
|
}
|
|
807
818
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
808
|
-
function mapDimensionsToInputs(dimensions, variables) {
|
|
809
|
-
return compactMap(dimensions, function (dimension) {
|
|
819
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
820
|
+
return compactMap(dimensions, function (dimension) {
|
|
821
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
822
|
+
});
|
|
810
823
|
}
|
|
811
824
|
|
|
812
825
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|