@infomaximum/widget-sdk 6.0.0-13 → 6.0.0-14
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/CHANGELOG.md +31 -5
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +13 -68
- package/dist/index.js +12 -68
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [6.0.0-
|
|
5
|
+
## [6.0.0-14](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.4...v6.0.0-14) (2025-10-01)
|
|
6
|
+
|
|
7
|
+
## [6.0.0-13](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.3...v6.0.0-13) (2025-10-01)
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
### Bug Fixes
|
|
@@ -11,26 +13,50 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
11
13
|
|
|
12
14
|
## [6.0.0-12](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-11...v6.0.0-12) (2025-09-29)
|
|
13
15
|
|
|
16
|
+
## [6.0.0-11](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.2...v6.0.0-11) (2025-09-23)
|
|
17
|
+
|
|
14
18
|
|
|
15
19
|
### Features
|
|
16
20
|
|
|
17
21
|
* для параметров действий образа добавлен id ([4b92d35](https://github.com/Infomaximum/widget-sdk/commit/4b92d3547a6048b8326db94ec360515d99e17b1a))
|
|
22
|
+
* удален флаг isBordered для IInputControl [BI-15461] ([d60c32d](https://github.com/Infomaximum/widget-sdk/commit/d60c32d02134c10b1aa799dc5a45e2656fe5aefd))
|
|
18
23
|
|
|
19
|
-
## [6.0.0-
|
|
24
|
+
## [6.0.0-10](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.1...v6.0.0-10) (2025-09-12)
|
|
25
|
+
|
|
26
|
+
## [6.0.0-9](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-8...v6.0.0-9) (2025-09-12)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* исправлен баг с подстановкой значений в template строки ([12166b5](https://github.com/Infomaximum/widget-sdk/commit/12166b587b74e0ff912822b0d065463b8f23121e))
|
|
32
|
+
|
|
33
|
+
## [6.0.0-8](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.0...v6.0.0-8) (2025-09-11)
|
|
20
34
|
|
|
35
|
+
## [6.0.0-13](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-12...v6.0.0-13) (2025-10-01)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
- исправлены шаблоны формул и функции подготовки параметров наполнения шаблонов. Отказ от удаления однострочных и многострочных комментариев ([97332be](https://github.com/Infomaximum/widget-sdk/commit/97332be7bddd6942f3670ff806470b9c1a59c122))
|
|
40
|
+
|
|
41
|
+
## [6.0.0-12](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-11...v6.0.0-12) (2025-09-29)
|
|
21
42
|
|
|
22
43
|
### Features
|
|
23
44
|
|
|
24
|
-
|
|
45
|
+
- для параметров действий образа добавлен id ([4b92d35](https://github.com/Infomaximum/widget-sdk/commit/4b92d3547a6048b8326db94ec360515d99e17b1a))
|
|
46
|
+
|
|
47
|
+
## [6.0.0-11](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-10...v6.0.0-11) (2025-09-23)
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
- удален флаг isBordered для IInputControl [BI-15461] ([d60c32d](https://github.com/Infomaximum/widget-sdk/commit/d60c32d02134c10b1aa799dc5a45e2656fe5aefd))
|
|
25
52
|
|
|
26
53
|
## [6.0.0-10](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.1...v6.0.0-10) (2025-09-12)
|
|
27
54
|
|
|
28
55
|
## [6.0.0-9](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-8...v6.0.0-9) (2025-09-12)
|
|
29
56
|
|
|
30
|
-
|
|
31
57
|
### Bug Fixes
|
|
32
58
|
|
|
33
|
-
|
|
59
|
+
- исправлен баг с подстановкой значений в template строки ([12166b5](https://github.com/Infomaximum/widget-sdk/commit/12166b587b74e0ff912822b0d065463b8f23121e))
|
|
34
60
|
|
|
35
61
|
## [6.0.0-8](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.0...v6.0.0-8) (2025-09-11)
|
|
36
62
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2088,8 +2088,6 @@ declare const countExecutionsTemplate = "process(countIf({eventNameFormula} in {
|
|
|
2088
2088
|
|
|
2089
2089
|
/** @deprecated - следует использовать fillTemplateSql */
|
|
2090
2090
|
declare function fillTemplateString(templateString: string, params: Record<string, any>): string;
|
|
2091
|
-
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
2092
|
-
declare function fillTemplateSql(templateString: string, params: Record<string, string>): string;
|
|
2093
2091
|
|
|
2094
2092
|
declare function generateColumnFormula(tableName: string, columnName: string): string;
|
|
2095
2093
|
|
|
@@ -2752,4 +2750,4 @@ declare global {
|
|
|
2752
2750
|
}
|
|
2753
2751
|
}
|
|
2754
2752
|
|
|
2755
|
-
export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionButton, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, 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 ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionProcessFilter, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type IInputTemplatedControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSettingsFilter, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas,
|
|
2753
|
+
export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionButton, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, 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 ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionProcessFilter, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type IInputTemplatedControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSettingsFilter, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.esm.js
CHANGED
|
@@ -132,35 +132,6 @@ function __rest(s, e) {
|
|
|
132
132
|
return t;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
function __values(o) {
|
|
136
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
137
|
-
if (m) return m.call(o);
|
|
138
|
-
if (o && typeof o.length === "number") return {
|
|
139
|
-
next: function () {
|
|
140
|
-
if (o && i >= o.length) o = void 0;
|
|
141
|
-
return { value: o && o[i++], done: !o };
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function __read(o, n) {
|
|
148
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
149
|
-
if (!m) return o;
|
|
150
|
-
var i = m.call(o), r, ar = [], e;
|
|
151
|
-
try {
|
|
152
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
153
|
-
}
|
|
154
|
-
catch (error) { e = { error: error }; }
|
|
155
|
-
finally {
|
|
156
|
-
try {
|
|
157
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
158
|
-
}
|
|
159
|
-
finally { if (e) throw e.error; }
|
|
160
|
-
}
|
|
161
|
-
return ar;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
135
|
function __makeTemplateObject(cooked, raw) {
|
|
165
136
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
166
137
|
return cooked;
|
|
@@ -826,32 +797,6 @@ function fillTemplateString(templateString, params) {
|
|
|
826
797
|
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
827
798
|
});
|
|
828
799
|
}
|
|
829
|
-
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
830
|
-
function fillTemplateSql(templateString, params) {
|
|
831
|
-
var e_1, _a;
|
|
832
|
-
var newParams = {};
|
|
833
|
-
if (templateString.indexOf("'{") >= 0) {
|
|
834
|
-
throw new Error("\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0448\u0430\u0431\u043B\u043E\u043D: \u043F\u043B\u0435\u0439\u0441\u0445\u043E\u043B\u0434\u0435\u0440\u044B \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0437\u0430\u043A\u043B\u044E\u0447\u0430\u0442\u044C\u0441\u044F \u0432 \u043E\u0434\u0438\u043D\u0430\u0440\u043D\u044B\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438.\n \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 {placeholder} \u0432\u043C\u0435\u0441\u0442\u043E '{placeholder}'.\n \u041A\u0430\u0432\u044B\u0447\u043A\u0438 \u0434\u043E\u043B\u0436\u043D\u044B \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u0445 \u043F\u043E\u043B\u0435\u0439 \u043F\u0440\u0438 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u043E\u0431\u044A\u0435\u043A\u0442\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432.");
|
|
835
|
-
}
|
|
836
|
-
try {
|
|
837
|
-
for (var _b = __values(Object.entries(params)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
838
|
-
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
839
|
-
if (String(value).indexOf("--") >= 0) {
|
|
840
|
-
newParams[key] = "".concat(value, "\n");
|
|
841
|
-
continue;
|
|
842
|
-
}
|
|
843
|
-
newParams[key] = sanitizeSingleLineComment(String(value));
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
847
|
-
finally {
|
|
848
|
-
try {
|
|
849
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
850
|
-
}
|
|
851
|
-
finally { if (e_1) throw e_1.error; }
|
|
852
|
-
}
|
|
853
|
-
return fillTemplateString(templateString, newParams);
|
|
854
|
-
}
|
|
855
800
|
|
|
856
801
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
857
802
|
var createEscaper = function (specialChars) { return function (str) {
|
|
@@ -1078,7 +1023,7 @@ var timeTemplates = (function () {
|
|
|
1078
1023
|
var generateTemplates = function (innerTemplate) {
|
|
1079
1024
|
var templates = {};
|
|
1080
1025
|
for (var key in dimensionTemplateFormulas) {
|
|
1081
|
-
templates[key] =
|
|
1026
|
+
templates[key] = fillTemplateString(dimensionTemplateFormulas[key], { columnFormula: innerTemplate });
|
|
1082
1027
|
}
|
|
1083
1028
|
return templates;
|
|
1084
1029
|
};
|
|
@@ -1121,7 +1066,7 @@ function getDimensionFormula(_a) {
|
|
|
1121
1066
|
if (!templateFormula || !tableName || !columnName) {
|
|
1122
1067
|
return "";
|
|
1123
1068
|
}
|
|
1124
|
-
return
|
|
1069
|
+
return fillTemplateString(templateFormula, {
|
|
1125
1070
|
columnFormula: generateColumnFormula(tableName, columnName),
|
|
1126
1071
|
});
|
|
1127
1072
|
}
|
|
@@ -1137,10 +1082,10 @@ function getProcessDimensionValueFormula(value) {
|
|
|
1137
1082
|
? dimensionTemplateFormulas[value.innerTemplateName]
|
|
1138
1083
|
: null;
|
|
1139
1084
|
var columnFormula = innerTemplate
|
|
1140
|
-
?
|
|
1085
|
+
? fillTemplateString(innerTemplate, { columnFormula: preparedParams.columnFormula })
|
|
1141
1086
|
: preparedParams.columnFormula;
|
|
1142
1087
|
var dimensionAggregationTemplate = dimensionAggregationTemplates[value.templateName];
|
|
1143
|
-
return
|
|
1088
|
+
return fillTemplateString(dimensionAggregationTemplate, __assign(__assign({}, preparedParams), { columnFormula: columnFormula }));
|
|
1144
1089
|
}
|
|
1145
1090
|
if (value.mode === EWidgetIndicatorValueModes.START_TIME ||
|
|
1146
1091
|
value.mode === EWidgetIndicatorValueModes.END_TIME) {
|
|
@@ -1149,7 +1094,7 @@ function getProcessDimensionValueFormula(value) {
|
|
|
1149
1094
|
return "";
|
|
1150
1095
|
}
|
|
1151
1096
|
var templateFormula = timeTemplates[value.mode][value.templateName];
|
|
1152
|
-
return
|
|
1097
|
+
return fillTemplateString(templateFormula, preparedParams);
|
|
1153
1098
|
}
|
|
1154
1099
|
}
|
|
1155
1100
|
|
|
@@ -1371,14 +1316,14 @@ function getMeasureFormula(_a) {
|
|
|
1371
1316
|
if (!templateFormula || !tableName || !columnName) {
|
|
1372
1317
|
return "";
|
|
1373
1318
|
}
|
|
1374
|
-
return
|
|
1319
|
+
return fillTemplateString(templateFormula, {
|
|
1375
1320
|
columnFormula: generateColumnFormula(tableName, columnName),
|
|
1376
1321
|
});
|
|
1377
1322
|
}
|
|
1378
1323
|
if (value.mode === EWidgetIndicatorValueModes.AGGREGATION) {
|
|
1379
1324
|
var preparedParams = prepareMeasureAggregationParams(value);
|
|
1380
1325
|
return preparedParams
|
|
1381
|
-
?
|
|
1326
|
+
? fillTemplateString(createAggregationTemplate(value.templateName, {
|
|
1382
1327
|
outerAggregation: preparedParams.outerAggregation,
|
|
1383
1328
|
anyEvent: value.anyEvent,
|
|
1384
1329
|
}), preparedParams)
|
|
@@ -1389,14 +1334,14 @@ function getMeasureFormula(_a) {
|
|
|
1389
1334
|
if (!preparedParams) {
|
|
1390
1335
|
return "";
|
|
1391
1336
|
}
|
|
1392
|
-
return
|
|
1337
|
+
return fillTemplateString(conversionTemplate, preparedParams);
|
|
1393
1338
|
}
|
|
1394
1339
|
if (value.mode === EWidgetIndicatorValueModes.DURATION) {
|
|
1395
1340
|
var preparedParams = prepareDurationParams(value);
|
|
1396
1341
|
if (!preparedParams) {
|
|
1397
1342
|
return "";
|
|
1398
1343
|
}
|
|
1399
|
-
return
|
|
1344
|
+
return fillTemplateString(durationTemplates[value.templateName], preparedParams);
|
|
1400
1345
|
}
|
|
1401
1346
|
return "";
|
|
1402
1347
|
}
|
|
@@ -1422,7 +1367,7 @@ function getEventMeasureFormula(_a, process) {
|
|
|
1422
1367
|
}
|
|
1423
1368
|
if (value.mode === EWidgetIndicatorValueModes.TEMPLATE) {
|
|
1424
1369
|
var templateFormula = eventMeasureTemplateFormulas[value.templateName];
|
|
1425
|
-
return templateFormula &&
|
|
1370
|
+
return templateFormula && fillTemplateString(templateFormula, process);
|
|
1426
1371
|
}
|
|
1427
1372
|
return "";
|
|
1428
1373
|
}
|
|
@@ -1448,7 +1393,7 @@ function getTransitionMeasureFormula(_a, process) {
|
|
|
1448
1393
|
}
|
|
1449
1394
|
if (value.mode === EWidgetIndicatorValueModes.TEMPLATE) {
|
|
1450
1395
|
var templateFormula = transitionMeasureTemplateFormulas[value.templateName];
|
|
1451
|
-
return templateFormula &&
|
|
1396
|
+
return templateFormula && fillTemplateString(templateFormula, process);
|
|
1452
1397
|
}
|
|
1453
1398
|
return "";
|
|
1454
1399
|
}
|
|
@@ -1640,7 +1585,7 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
|
1640
1585
|
if (!isFormulaFilterValue(filterValue)) {
|
|
1641
1586
|
return {
|
|
1642
1587
|
dbDataType: EClickHouseBaseTypes.Bool,
|
|
1643
|
-
formula:
|
|
1588
|
+
formula: fillTemplateString(displayConditionTemplate, {
|
|
1644
1589
|
formula: prepareFormulaForSql(filterValue.formula),
|
|
1645
1590
|
}),
|
|
1646
1591
|
values: ["true"],
|
|
@@ -2209,4 +2154,4 @@ var getColorByIndex = function (index) {
|
|
|
2209
2154
|
return color;
|
|
2210
2155
|
};
|
|
2211
2156
|
|
|
2212
|
-
export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, OuterAggregation, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas,
|
|
2157
|
+
export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, OuterAggregation, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.js
CHANGED
|
@@ -133,35 +133,6 @@ function __rest(s, e) {
|
|
|
133
133
|
return t;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
function __values(o) {
|
|
137
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
138
|
-
if (m) return m.call(o);
|
|
139
|
-
if (o && typeof o.length === "number") return {
|
|
140
|
-
next: function () {
|
|
141
|
-
if (o && i >= o.length) o = void 0;
|
|
142
|
-
return { value: o && o[i++], done: !o };
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function __read(o, n) {
|
|
149
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
150
|
-
if (!m) return o;
|
|
151
|
-
var i = m.call(o), r, ar = [], e;
|
|
152
|
-
try {
|
|
153
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
154
|
-
}
|
|
155
|
-
catch (error) { e = { error: error }; }
|
|
156
|
-
finally {
|
|
157
|
-
try {
|
|
158
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
159
|
-
}
|
|
160
|
-
finally { if (e) throw e.error; }
|
|
161
|
-
}
|
|
162
|
-
return ar;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
136
|
function __makeTemplateObject(cooked, raw) {
|
|
166
137
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
167
138
|
return cooked;
|
|
@@ -827,32 +798,6 @@ function fillTemplateString(templateString, params) {
|
|
|
827
798
|
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
828
799
|
});
|
|
829
800
|
}
|
|
830
|
-
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
831
|
-
function fillTemplateSql(templateString, params) {
|
|
832
|
-
var e_1, _a;
|
|
833
|
-
var newParams = {};
|
|
834
|
-
if (templateString.indexOf("'{") >= 0) {
|
|
835
|
-
throw new Error("\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0448\u0430\u0431\u043B\u043E\u043D: \u043F\u043B\u0435\u0439\u0441\u0445\u043E\u043B\u0434\u0435\u0440\u044B \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0437\u0430\u043A\u043B\u044E\u0447\u0430\u0442\u044C\u0441\u044F \u0432 \u043E\u0434\u0438\u043D\u0430\u0440\u043D\u044B\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438.\n \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 {placeholder} \u0432\u043C\u0435\u0441\u0442\u043E '{placeholder}'.\n \u041A\u0430\u0432\u044B\u0447\u043A\u0438 \u0434\u043E\u043B\u0436\u043D\u044B \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u0445 \u043F\u043E\u043B\u0435\u0439 \u043F\u0440\u0438 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u043E\u0431\u044A\u0435\u043A\u0442\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432.");
|
|
836
|
-
}
|
|
837
|
-
try {
|
|
838
|
-
for (var _b = __values(Object.entries(params)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
839
|
-
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
840
|
-
if (String(value).indexOf("--") >= 0) {
|
|
841
|
-
newParams[key] = "".concat(value, "\n");
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
newParams[key] = sanitizeSingleLineComment(String(value));
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
848
|
-
finally {
|
|
849
|
-
try {
|
|
850
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
851
|
-
}
|
|
852
|
-
finally { if (e_1) throw e_1.error; }
|
|
853
|
-
}
|
|
854
|
-
return fillTemplateString(templateString, newParams);
|
|
855
|
-
}
|
|
856
801
|
|
|
857
802
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
858
803
|
var createEscaper = function (specialChars) { return function (str) {
|
|
@@ -1079,7 +1024,7 @@ var timeTemplates = (function () {
|
|
|
1079
1024
|
var generateTemplates = function (innerTemplate) {
|
|
1080
1025
|
var templates = {};
|
|
1081
1026
|
for (var key in dimensionTemplateFormulas) {
|
|
1082
|
-
templates[key] =
|
|
1027
|
+
templates[key] = fillTemplateString(dimensionTemplateFormulas[key], { columnFormula: innerTemplate });
|
|
1083
1028
|
}
|
|
1084
1029
|
return templates;
|
|
1085
1030
|
};
|
|
@@ -1122,7 +1067,7 @@ function getDimensionFormula(_a) {
|
|
|
1122
1067
|
if (!templateFormula || !tableName || !columnName) {
|
|
1123
1068
|
return "";
|
|
1124
1069
|
}
|
|
1125
|
-
return
|
|
1070
|
+
return fillTemplateString(templateFormula, {
|
|
1126
1071
|
columnFormula: generateColumnFormula(tableName, columnName),
|
|
1127
1072
|
});
|
|
1128
1073
|
}
|
|
@@ -1138,10 +1083,10 @@ function getProcessDimensionValueFormula(value) {
|
|
|
1138
1083
|
? dimensionTemplateFormulas[value.innerTemplateName]
|
|
1139
1084
|
: null;
|
|
1140
1085
|
var columnFormula = innerTemplate
|
|
1141
|
-
?
|
|
1086
|
+
? fillTemplateString(innerTemplate, { columnFormula: preparedParams.columnFormula })
|
|
1142
1087
|
: preparedParams.columnFormula;
|
|
1143
1088
|
var dimensionAggregationTemplate = dimensionAggregationTemplates[value.templateName];
|
|
1144
|
-
return
|
|
1089
|
+
return fillTemplateString(dimensionAggregationTemplate, __assign(__assign({}, preparedParams), { columnFormula: columnFormula }));
|
|
1145
1090
|
}
|
|
1146
1091
|
if (value.mode === exports.EWidgetIndicatorValueModes.START_TIME ||
|
|
1147
1092
|
value.mode === exports.EWidgetIndicatorValueModes.END_TIME) {
|
|
@@ -1150,7 +1095,7 @@ function getProcessDimensionValueFormula(value) {
|
|
|
1150
1095
|
return "";
|
|
1151
1096
|
}
|
|
1152
1097
|
var templateFormula = timeTemplates[value.mode][value.templateName];
|
|
1153
|
-
return
|
|
1098
|
+
return fillTemplateString(templateFormula, preparedParams);
|
|
1154
1099
|
}
|
|
1155
1100
|
}
|
|
1156
1101
|
|
|
@@ -1372,14 +1317,14 @@ function getMeasureFormula(_a) {
|
|
|
1372
1317
|
if (!templateFormula || !tableName || !columnName) {
|
|
1373
1318
|
return "";
|
|
1374
1319
|
}
|
|
1375
|
-
return
|
|
1320
|
+
return fillTemplateString(templateFormula, {
|
|
1376
1321
|
columnFormula: generateColumnFormula(tableName, columnName),
|
|
1377
1322
|
});
|
|
1378
1323
|
}
|
|
1379
1324
|
if (value.mode === exports.EWidgetIndicatorValueModes.AGGREGATION) {
|
|
1380
1325
|
var preparedParams = prepareMeasureAggregationParams(value);
|
|
1381
1326
|
return preparedParams
|
|
1382
|
-
?
|
|
1327
|
+
? fillTemplateString(createAggregationTemplate(value.templateName, {
|
|
1383
1328
|
outerAggregation: preparedParams.outerAggregation,
|
|
1384
1329
|
anyEvent: value.anyEvent,
|
|
1385
1330
|
}), preparedParams)
|
|
@@ -1390,14 +1335,14 @@ function getMeasureFormula(_a) {
|
|
|
1390
1335
|
if (!preparedParams) {
|
|
1391
1336
|
return "";
|
|
1392
1337
|
}
|
|
1393
|
-
return
|
|
1338
|
+
return fillTemplateString(conversionTemplate, preparedParams);
|
|
1394
1339
|
}
|
|
1395
1340
|
if (value.mode === exports.EWidgetIndicatorValueModes.DURATION) {
|
|
1396
1341
|
var preparedParams = prepareDurationParams(value);
|
|
1397
1342
|
if (!preparedParams) {
|
|
1398
1343
|
return "";
|
|
1399
1344
|
}
|
|
1400
|
-
return
|
|
1345
|
+
return fillTemplateString(durationTemplates[value.templateName], preparedParams);
|
|
1401
1346
|
}
|
|
1402
1347
|
return "";
|
|
1403
1348
|
}
|
|
@@ -1423,7 +1368,7 @@ function getEventMeasureFormula(_a, process) {
|
|
|
1423
1368
|
}
|
|
1424
1369
|
if (value.mode === exports.EWidgetIndicatorValueModes.TEMPLATE) {
|
|
1425
1370
|
var templateFormula = eventMeasureTemplateFormulas[value.templateName];
|
|
1426
|
-
return templateFormula &&
|
|
1371
|
+
return templateFormula && fillTemplateString(templateFormula, process);
|
|
1427
1372
|
}
|
|
1428
1373
|
return "";
|
|
1429
1374
|
}
|
|
@@ -1449,7 +1394,7 @@ function getTransitionMeasureFormula(_a, process) {
|
|
|
1449
1394
|
}
|
|
1450
1395
|
if (value.mode === exports.EWidgetIndicatorValueModes.TEMPLATE) {
|
|
1451
1396
|
var templateFormula = transitionMeasureTemplateFormulas[value.templateName];
|
|
1452
|
-
return templateFormula &&
|
|
1397
|
+
return templateFormula && fillTemplateString(templateFormula, process);
|
|
1453
1398
|
}
|
|
1454
1399
|
return "";
|
|
1455
1400
|
}
|
|
@@ -1641,7 +1586,7 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
|
1641
1586
|
if (!isFormulaFilterValue(filterValue)) {
|
|
1642
1587
|
return {
|
|
1643
1588
|
dbDataType: exports.EClickHouseBaseTypes.Bool,
|
|
1644
|
-
formula:
|
|
1589
|
+
formula: fillTemplateString(displayConditionTemplate, {
|
|
1645
1590
|
formula: prepareFormulaForSql(filterValue.formula),
|
|
1646
1591
|
}),
|
|
1647
1592
|
values: ["true"],
|
|
@@ -2241,7 +2186,6 @@ exports.durationTemplates = durationTemplates;
|
|
|
2241
2186
|
exports.escapeCurlyBracketLinkName = escapeCurlyBracketLinkName;
|
|
2242
2187
|
exports.escapeDoubleQuoteLinkName = escapeDoubleQuoteLinkName;
|
|
2243
2188
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
2244
|
-
exports.fillTemplateSql = fillTemplateSql;
|
|
2245
2189
|
exports.fillTemplateString = fillTemplateString;
|
|
2246
2190
|
exports.formattingConfig = formattingConfig;
|
|
2247
2191
|
exports.formulaFilterMethods = formulaFilterMethods;
|