@infomaximum/widget-sdk 3.22.0 → 3.23.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 +11 -8
- package/dist/index.esm.js +9 -8
- package/dist/index.js +9 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,8 @@ declare enum EControlType {
|
|
|
33
33
|
displayCondition = "displayCondition",
|
|
34
34
|
eventsColor = "eventsColor",
|
|
35
35
|
inputMarkdown = "inputMarkdown",
|
|
36
|
-
filter = "filter"
|
|
36
|
+
filter = "filter",
|
|
37
|
+
actionOnClick = "actionOnClick"
|
|
37
38
|
}
|
|
38
39
|
/** Конфигурация элемента управления настройкой */
|
|
39
40
|
interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
|
|
@@ -1152,6 +1153,12 @@ interface IDefinition<WidgetSettings extends IBaseWidgetSettings, GroupSettings
|
|
|
1152
1153
|
getMeasures?(settings: WidgetSettings): IWidgetMeasure[];
|
|
1153
1154
|
}
|
|
1154
1155
|
|
|
1156
|
+
type TLaunchActionParams = {
|
|
1157
|
+
action: IWidgetAction;
|
|
1158
|
+
onSuccess: () => void;
|
|
1159
|
+
filters: ICalculatorFilter[];
|
|
1160
|
+
needConfirmation?: boolean;
|
|
1161
|
+
};
|
|
1155
1162
|
interface IWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSettings> {
|
|
1156
1163
|
/** guid виджета */
|
|
1157
1164
|
guid: string;
|
|
@@ -1174,12 +1181,8 @@ interface IWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetS
|
|
|
1174
1181
|
placeholder: IWidgetPlaceholderController;
|
|
1175
1182
|
/** Контекст виджета */
|
|
1176
1183
|
widgetsContext: IWidgetsContext;
|
|
1177
|
-
/**
|
|
1178
|
-
launchAction(params:
|
|
1179
|
-
action: IWidgetAction;
|
|
1180
|
-
onSuccess: () => void;
|
|
1181
|
-
filters: ICalculatorFilter[];
|
|
1182
|
-
}): void;
|
|
1184
|
+
/** Запуск действия */
|
|
1185
|
+
launchAction(params: TLaunchActionParams): void;
|
|
1183
1186
|
}
|
|
1184
1187
|
interface ICustomWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSettings> extends IWidgetProps<WidgetSettings> {
|
|
1185
1188
|
/** @deprecated - нужно использовать из widgetsContext */
|
|
@@ -1351,4 +1354,4 @@ declare global {
|
|
|
1351
1354
|
}
|
|
1352
1355
|
}
|
|
1353
1356
|
|
|
1354
|
-
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 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 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 TProcessIndicatorValue, type TRecordAccessor, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, 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 };
|
|
1357
|
+
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 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 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 TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, 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
|
@@ -513,6 +513,14 @@ var replaceDisplayCondition = function (dimension, displayCondition) {
|
|
|
513
513
|
: __assign(__assign({}, dimension), { displayCondition: displayCondition });
|
|
514
514
|
};
|
|
515
515
|
|
|
516
|
+
var escapeSpecialCharacters = function (formula) {
|
|
517
|
+
return formula
|
|
518
|
+
.replaceAll("\\", "\\\\")
|
|
519
|
+
.replaceAll('"', '\\"')
|
|
520
|
+
.replaceAll("`", "\\`")
|
|
521
|
+
.replaceAll("-", "\\-");
|
|
522
|
+
};
|
|
523
|
+
|
|
516
524
|
function generateColumnFormula(tableName, columnName) {
|
|
517
525
|
var preparedTableName = escapeSpecialCharacters(tableName);
|
|
518
526
|
var preparedColumnName = escapeSpecialCharacters(columnName);
|
|
@@ -913,14 +921,6 @@ function bindContentsWithIndicators(outputs, indicators) {
|
|
|
913
921
|
});
|
|
914
922
|
}
|
|
915
923
|
|
|
916
|
-
var escapeSpecialCharacters = function (formula) {
|
|
917
|
-
return formula
|
|
918
|
-
.replaceAll("\\", "\\\\")
|
|
919
|
-
.replaceAll('"', '\\"')
|
|
920
|
-
.replaceAll("`", "\\`")
|
|
921
|
-
.replaceAll("-", "\\-");
|
|
922
|
-
};
|
|
923
|
-
|
|
924
924
|
var EControlType;
|
|
925
925
|
(function (EControlType) {
|
|
926
926
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -940,6 +940,7 @@ var EControlType;
|
|
|
940
940
|
EControlType["eventsColor"] = "eventsColor";
|
|
941
941
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
942
942
|
EControlType["filter"] = "filter";
|
|
943
|
+
EControlType["actionOnClick"] = "actionOnClick";
|
|
943
944
|
})(EControlType || (EControlType = {}));
|
|
944
945
|
|
|
945
946
|
var ESortDirection;
|
package/dist/index.js
CHANGED
|
@@ -514,6 +514,14 @@ var replaceDisplayCondition = function (dimension, displayCondition) {
|
|
|
514
514
|
: __assign(__assign({}, dimension), { displayCondition: displayCondition });
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
+
var escapeSpecialCharacters = function (formula) {
|
|
518
|
+
return formula
|
|
519
|
+
.replaceAll("\\", "\\\\")
|
|
520
|
+
.replaceAll('"', '\\"')
|
|
521
|
+
.replaceAll("`", "\\`")
|
|
522
|
+
.replaceAll("-", "\\-");
|
|
523
|
+
};
|
|
524
|
+
|
|
517
525
|
function generateColumnFormula(tableName, columnName) {
|
|
518
526
|
var preparedTableName = escapeSpecialCharacters(tableName);
|
|
519
527
|
var preparedColumnName = escapeSpecialCharacters(columnName);
|
|
@@ -914,14 +922,6 @@ function bindContentsWithIndicators(outputs, indicators) {
|
|
|
914
922
|
});
|
|
915
923
|
}
|
|
916
924
|
|
|
917
|
-
var escapeSpecialCharacters = function (formula) {
|
|
918
|
-
return formula
|
|
919
|
-
.replaceAll("\\", "\\\\")
|
|
920
|
-
.replaceAll('"', '\\"')
|
|
921
|
-
.replaceAll("`", "\\`")
|
|
922
|
-
.replaceAll("-", "\\-");
|
|
923
|
-
};
|
|
924
|
-
|
|
925
925
|
exports.EControlType = void 0;
|
|
926
926
|
(function (EControlType) {
|
|
927
927
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -941,6 +941,7 @@ exports.EControlType = void 0;
|
|
|
941
941
|
EControlType["eventsColor"] = "eventsColor";
|
|
942
942
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
943
943
|
EControlType["filter"] = "filter";
|
|
944
|
+
EControlType["actionOnClick"] = "actionOnClick";
|
|
944
945
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
945
946
|
|
|
946
947
|
exports.ESortDirection = void 0;
|