@infomaximum/widget-sdk 4.0.0-beta11 → 4.0.0-beta13
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 +18 -2
- package/dist/index.esm.js +22 -3
- package/dist/index.js +21 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -423,6 +423,10 @@ declare enum EColorMode {
|
|
|
423
423
|
GRADIENT = "GRADIENT",
|
|
424
424
|
AUTO = "AUTO"
|
|
425
425
|
}
|
|
426
|
+
declare enum EMarkdownDisplayMode {
|
|
427
|
+
NONE = "NONE",
|
|
428
|
+
INDICATOR = "INDICATOR"
|
|
429
|
+
}
|
|
426
430
|
/** Настройка цвета */
|
|
427
431
|
type TColor = {
|
|
428
432
|
mode: EColorMode.FORMULA;
|
|
@@ -470,6 +474,7 @@ type TSortDirection = ESortDirection.ascend | ESortDirection.descend;
|
|
|
470
474
|
interface ISortOrder {
|
|
471
475
|
formula: string;
|
|
472
476
|
direction: TSortDirection;
|
|
477
|
+
displayCondition?: TNullable<string>;
|
|
473
478
|
}
|
|
474
479
|
type TWidgetSortingValueRelatedWidgetMeasure = {
|
|
475
480
|
mode: ESortingValueModes.MEASURE_IN_WIDGET;
|
|
@@ -613,6 +618,10 @@ interface IWidgetDimension extends IWidgetColumnIndicator {
|
|
|
613
618
|
interface IWidgetMeasure extends IWidgetColumnIndicator {
|
|
614
619
|
type: EWidgetIndicatorType.MEASURE;
|
|
615
620
|
}
|
|
621
|
+
interface IMarkdownMeasure extends IWidgetMeasure {
|
|
622
|
+
format: EFormatTypes;
|
|
623
|
+
displayMode: EMarkdownDisplayMode;
|
|
624
|
+
}
|
|
616
625
|
/** Тип показателя */
|
|
617
626
|
declare enum EIndicatorType {
|
|
618
627
|
/** Показатели процесса */
|
|
@@ -822,6 +831,9 @@ interface IBaseWidgetSettings {
|
|
|
822
831
|
header?: string;
|
|
823
832
|
headerSize?: number;
|
|
824
833
|
stateName?: string | null;
|
|
834
|
+
showMarkdown?: boolean;
|
|
835
|
+
markdownMeasures?: IMarkdownMeasure[];
|
|
836
|
+
markdownText?: string;
|
|
825
837
|
filters?: (IFormulaFilterValue | string)[];
|
|
826
838
|
filterMode?: EWidgetFilterMode;
|
|
827
839
|
ignoreFilters?: boolean;
|
|
@@ -905,6 +917,10 @@ interface IGroupSetDescription<Settings extends object, GroupSettings extends ob
|
|
|
905
917
|
}
|
|
906
918
|
/** Конфигурация левой панели */
|
|
907
919
|
interface IPanelDescription<Settings extends object, GroupSettings extends IGroupSettings = IGroupSettings> {
|
|
920
|
+
/** Добавить заголовок для виджета */
|
|
921
|
+
useHeader?: boolean;
|
|
922
|
+
/** Добавить описание для виджета */
|
|
923
|
+
useMarkdown?: boolean;
|
|
908
924
|
/** Конфигурация настроек данных виджета */
|
|
909
925
|
dataRecords?: TWidgetLevelRecord<Settings>[];
|
|
910
926
|
/** Конфигурация настроек отображения виджета */
|
|
@@ -1171,7 +1187,7 @@ declare function mapEventMeasuresToInputs<T extends IProcessIndicator>(indicator
|
|
|
1171
1187
|
* @param measuresInOriginalOrder меры виджета (конкретная мера будет браться по индексу)
|
|
1172
1188
|
* @returns
|
|
1173
1189
|
*/
|
|
1174
|
-
declare function mapSortingToInputs(sortingIndicators
|
|
1190
|
+
declare function mapSortingToInputs(sortingIndicators: IWidgetSortingIndicator[] | undefined, dimensionsInOriginalOrder: IWidgetDimension[] | undefined, measuresInOriginalOrder: IWidgetMeasure[] | undefined, variables: Map<string, TWidgetVariable>): ISortOrder[];
|
|
1175
1191
|
|
|
1176
1192
|
/**
|
|
1177
1193
|
* Выбрать активный разрез иерархии на основе активных фильтров.
|
|
@@ -1424,4 +1440,4 @@ declare global {
|
|
|
1424
1440
|
}
|
|
1425
1441
|
}
|
|
1426
1442
|
|
|
1427
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, 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 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 };
|
|
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -507,6 +507,11 @@ var EColorMode;
|
|
|
507
507
|
EColorMode["GRADIENT"] = "GRADIENT";
|
|
508
508
|
EColorMode["AUTO"] = "AUTO";
|
|
509
509
|
})(EColorMode || (EColorMode = {}));
|
|
510
|
+
var EMarkdownDisplayMode;
|
|
511
|
+
(function (EMarkdownDisplayMode) {
|
|
512
|
+
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
513
|
+
EMarkdownDisplayMode["INDICATOR"] = "INDICATOR";
|
|
514
|
+
})(EMarkdownDisplayMode || (EMarkdownDisplayMode = {}));
|
|
510
515
|
var EDisplayConditionMode;
|
|
511
516
|
(function (EDisplayConditionMode) {
|
|
512
517
|
EDisplayConditionMode["DISABLED"] = "DISABLED";
|
|
@@ -858,11 +863,12 @@ function mapEventMeasuresToInputs(indicators, process, variables, addFormulas) {
|
|
|
858
863
|
* @param measuresInOriginalOrder меры виджета (конкретная мера будет браться по индексу)
|
|
859
864
|
* @returns
|
|
860
865
|
*/
|
|
861
|
-
function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measuresInOriginalOrder) {
|
|
866
|
+
function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measuresInOriginalOrder, variables) {
|
|
862
867
|
if (sortingIndicators === void 0) { sortingIndicators = []; }
|
|
863
868
|
if (dimensionsInOriginalOrder === void 0) { dimensionsInOriginalOrder = []; }
|
|
864
869
|
if (measuresInOriginalOrder === void 0) { measuresInOriginalOrder = []; }
|
|
865
870
|
return compactMap(sortingIndicators, function (_a) {
|
|
871
|
+
var _b;
|
|
866
872
|
var value = _a.value, direction = _a.direction;
|
|
867
873
|
if (value.mode === ESortingValueModes.FORMULA ||
|
|
868
874
|
value.mode === ESortingValueModes.QUANTITY ||
|
|
@@ -873,7 +879,20 @@ function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measur
|
|
|
873
879
|
if (value.mode === ESortingValueModes.DIMENSION_IN_WIDGET ||
|
|
874
880
|
value.mode === ESortingValueModes.HIERARCHY) {
|
|
875
881
|
var dimension = dimensionsInOriginalOrder[value.index];
|
|
876
|
-
|
|
882
|
+
if (!dimension) {
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
var formula = getDimensionFormula(dimension);
|
|
886
|
+
if (!formula || !checkDisplayCondition(dimension.displayCondition, variables)) {
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
return {
|
|
890
|
+
formula: getDimensionFormula(dimension),
|
|
891
|
+
direction: direction,
|
|
892
|
+
displayCondition: ((_b = dimension.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === EDisplayConditionMode.FORMULA
|
|
893
|
+
? dimension.displayCondition.formula
|
|
894
|
+
: undefined,
|
|
895
|
+
};
|
|
877
896
|
}
|
|
878
897
|
if (value.mode === ESortingValueModes.MEASURE_IN_WIDGET) {
|
|
879
898
|
var measure = measuresInOriginalOrder[value.index];
|
|
@@ -1061,4 +1080,4 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1061
1080
|
return localization.getLocalized(locObj, props);
|
|
1062
1081
|
};
|
|
1063
1082
|
|
|
1064
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -508,6 +508,11 @@ exports.EColorMode = void 0;
|
|
|
508
508
|
EColorMode["GRADIENT"] = "GRADIENT";
|
|
509
509
|
EColorMode["AUTO"] = "AUTO";
|
|
510
510
|
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
511
|
+
exports.EMarkdownDisplayMode = void 0;
|
|
512
|
+
(function (EMarkdownDisplayMode) {
|
|
513
|
+
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
514
|
+
EMarkdownDisplayMode["INDICATOR"] = "INDICATOR";
|
|
515
|
+
})(exports.EMarkdownDisplayMode || (exports.EMarkdownDisplayMode = {}));
|
|
511
516
|
exports.EDisplayConditionMode = void 0;
|
|
512
517
|
(function (EDisplayConditionMode) {
|
|
513
518
|
EDisplayConditionMode["DISABLED"] = "DISABLED";
|
|
@@ -859,11 +864,12 @@ function mapEventMeasuresToInputs(indicators, process, variables, addFormulas) {
|
|
|
859
864
|
* @param measuresInOriginalOrder меры виджета (конкретная мера будет браться по индексу)
|
|
860
865
|
* @returns
|
|
861
866
|
*/
|
|
862
|
-
function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measuresInOriginalOrder) {
|
|
867
|
+
function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measuresInOriginalOrder, variables) {
|
|
863
868
|
if (sortingIndicators === void 0) { sortingIndicators = []; }
|
|
864
869
|
if (dimensionsInOriginalOrder === void 0) { dimensionsInOriginalOrder = []; }
|
|
865
870
|
if (measuresInOriginalOrder === void 0) { measuresInOriginalOrder = []; }
|
|
866
871
|
return compactMap(sortingIndicators, function (_a) {
|
|
872
|
+
var _b;
|
|
867
873
|
var value = _a.value, direction = _a.direction;
|
|
868
874
|
if (value.mode === exports.ESortingValueModes.FORMULA ||
|
|
869
875
|
value.mode === exports.ESortingValueModes.QUANTITY ||
|
|
@@ -874,7 +880,20 @@ function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measur
|
|
|
874
880
|
if (value.mode === exports.ESortingValueModes.DIMENSION_IN_WIDGET ||
|
|
875
881
|
value.mode === exports.ESortingValueModes.HIERARCHY) {
|
|
876
882
|
var dimension = dimensionsInOriginalOrder[value.index];
|
|
877
|
-
|
|
883
|
+
if (!dimension) {
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
var formula = getDimensionFormula(dimension);
|
|
887
|
+
if (!formula || !checkDisplayCondition(dimension.displayCondition, variables)) {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
return {
|
|
891
|
+
formula: getDimensionFormula(dimension),
|
|
892
|
+
direction: direction,
|
|
893
|
+
displayCondition: ((_b = dimension.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === exports.EDisplayConditionMode.FORMULA
|
|
894
|
+
? dimension.displayCondition.formula
|
|
895
|
+
: undefined,
|
|
896
|
+
};
|
|
878
897
|
}
|
|
879
898
|
if (value.mode === exports.ESortingValueModes.MEASURE_IN_WIDGET) {
|
|
880
899
|
var measure = measuresInOriginalOrder[value.index];
|