@infomaximum/widget-sdk 3.24.1 → 3.25.0-24.3.01-1
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 +52 -10
- package/dist/index.esm.js +16 -4
- package/dist/index.js +17 -5
- package/package.json +1 -1
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:
|
|
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[];
|
|
@@ -1365,7 +1407,7 @@ declare const replaceFiltersBySelection: (filters: ICalculatorFilter[], selectio
|
|
|
1365
1407
|
* @param {P} [props] - Дополнительные параметры локализации.
|
|
1366
1408
|
* @returns {string} - Локализованный текст для указанного языка.
|
|
1367
1409
|
*/
|
|
1368
|
-
declare const getLocalizedText: <L extends TLocalizationDescription, P extends ILocalizationProps = TExtractLocalizationParams<L>>(language: ELanguages, locObj: L, props?: P
|
|
1410
|
+
declare const getLocalizedText: <L extends TLocalizationDescription, P extends ILocalizationProps = TExtractLocalizationParams<L>>(language: ELanguages, locObj: L, props?: P) => string;
|
|
1369
1411
|
|
|
1370
1412
|
type TDefineWidgetOptions = {
|
|
1371
1413
|
manifest?: Record<string, unknown>;
|
|
@@ -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";
|
|
@@ -760,7 +769,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
760
769
|
});
|
|
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,12 +784,13 @@ 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) {
|
|
791
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
781
792
|
return compactMap(dimensions, function (dimension) {
|
|
782
|
-
return mapDimensionToInput(dimension, variables);
|
|
793
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
783
794
|
});
|
|
784
795
|
}
|
|
785
796
|
|
|
@@ -941,6 +952,7 @@ var EControlType;
|
|
|
941
952
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
942
953
|
EControlType["filter"] = "filter";
|
|
943
954
|
EControlType["actionOnClick"] = "actionOnClick";
|
|
955
|
+
EControlType["eventsPicker"] = "eventsPicker";
|
|
944
956
|
})(EControlType || (EControlType = {}));
|
|
945
957
|
|
|
946
958
|
var ESortDirection;
|
|
@@ -1045,4 +1057,4 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1045
1057
|
return localization.getLocalized(locObj, props);
|
|
1046
1058
|
};
|
|
1047
1059
|
|
|
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 };
|
|
1060
|
+
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";
|
|
@@ -761,7 +770,8 @@ function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
|
761
770
|
});
|
|
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,12 +785,13 @@ 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) {
|
|
792
|
+
function mapDimensionsToInputs(dimensions, variables, addFormulas) {
|
|
782
793
|
return compactMap(dimensions, function (dimension) {
|
|
783
|
-
return mapDimensionToInput(dimension, variables);
|
|
794
|
+
return mapDimensionToInput(dimension, variables, addFormulas);
|
|
784
795
|
});
|
|
785
796
|
}
|
|
786
797
|
|
|
@@ -942,6 +953,7 @@ exports.EControlType = void 0;
|
|
|
942
953
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
943
954
|
EControlType["filter"] = "filter";
|
|
944
955
|
EControlType["actionOnClick"] = "actionOnClick";
|
|
956
|
+
EControlType["eventsPicker"] = "eventsPicker";
|
|
945
957
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
946
958
|
|
|
947
959
|
exports.ESortDirection = void 0;
|
|
@@ -1046,11 +1058,11 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1046
1058
|
return localization.getLocalized(locObj, props);
|
|
1047
1059
|
};
|
|
1048
1060
|
|
|
1049
|
-
Object.defineProperty(exports,
|
|
1061
|
+
Object.defineProperty(exports, "ELanguages", {
|
|
1050
1062
|
enumerable: true,
|
|
1051
1063
|
get: function () { return localization$1.ELanguages; }
|
|
1052
1064
|
});
|
|
1053
|
-
Object.defineProperty(exports,
|
|
1065
|
+
Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
1054
1066
|
enumerable: true,
|
|
1055
1067
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
1056
1068
|
});
|