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