@infomaximum/widget-sdk 5.20.0 → 5.22.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/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
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
+ ## [5.22.0](https://github.com/Infomaximum/widget-sdk/compare/v5.21.0...v5.22.0) (2025-05-28)
6
+
7
+
8
+ ### Features
9
+
10
+ * добавлена возможность управлять отображением системного индикатора загрузки через вычислитель ([400c598](https://github.com/Infomaximum/widget-sdk/commit/400c5983510d8f18d917851f4079ab63a4a580f3))
11
+ * обработаны одинарные кавычки при экранировании значений для sql-выражений ([27f3e49](https://github.com/Infomaximum/widget-sdk/commit/27f3e498b2400b1ecef7956b4802f4892ce91876))
12
+
13
+ ## [5.21.0](https://github.com/Infomaximum/widget-sdk/compare/v5.20.0...v5.21.0) (2025-05-23)
14
+
15
+
16
+ ### Features
17
+
18
+ * добавлен шаблон форматирования 'x' ([8905393](https://github.com/Infomaximum/widget-sdk/commit/890539367b03e78852e0a75096f6b56835b8ae2d))
19
+ * добавлена настройка 'Позиционирование по клику' ([b4107b9](https://github.com/Infomaximum/widget-sdk/commit/b4107b91cd1c00b102226a343838d6dfdf1bee29))
20
+ * изменены интерфейсы IPositionConfig и IClickPosition ([052ab57](https://github.com/Infomaximum/widget-sdk/commit/052ab574285887c09121b65860bf49070f757bab))
21
+
5
22
  ## [5.20.0](https://github.com/Infomaximum/widget-sdk/compare/v5.19.0...v5.20.0) (2025-05-22)
6
23
 
7
24
 
package/dist/index.d.ts CHANGED
@@ -164,6 +164,7 @@ declare enum EFormattingPresets {
164
164
  "MM" = "MM",
165
165
  "MMMM" = "MMMM",
166
166
  "k" = "k",
167
+ "x" = "x",
167
168
  "#,##x" = "#,##x",
168
169
  "#,##x.x" = "#,##x.x",
169
170
  "#,##x.xx" = "#,##x.xx",
@@ -302,11 +303,12 @@ interface IProcessTransitionFilterValue extends IProcessFilterValue {
302
303
  interface IClickPosition {
303
304
  x: number;
304
305
  y: number;
305
- elementWidth: number;
306
- elementHeight: number;
306
+ elementWidth?: number;
307
+ elementHeight?: number;
307
308
  }
308
309
  interface IPositionConfig extends IClickPosition {
309
- type: string;
310
+ offsetX?: number;
311
+ offsetY?: number;
310
312
  }
311
313
  interface IAddPresenceOfEventFilter {
312
314
  (name: EProcessFilterNames.presenceOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
@@ -1075,6 +1077,7 @@ type TActionOpenIn = {
1075
1077
  } | {
1076
1078
  openIn: EViewOpenIn.MODAL_WINDOW;
1077
1079
  actinButtons: boolean;
1080
+ positionByClick?: boolean;
1078
1081
  }
1079
1082
  /** @deprecated необходимо использовать EViewOpenIn.WINDOW с флагом newWindow - false */
1080
1083
  | {
@@ -2005,7 +2008,8 @@ declare function bindContentWithIndicator<Output extends ICalculatorIndicatorOut
2005
2008
  */
2006
2009
  declare function bindContentsWithIndicators<Output extends ICalculatorIndicatorOutput, Indicator extends IWidgetIndicator>(outputs: Map<string, Output>, indicators: Indicator[]): TBoundedContentWithIndicator<Output, Indicator>[];
2007
2010
 
2008
- declare const escapeSpecialCharacters: (formula: string) => string;
2011
+ /** Экранировать специальные символы перед вставкой значения в sql-выражение */
2012
+ declare const escapeSpecialCharacters: (value: string) => string;
2009
2013
 
2010
2014
  /** Удалить из строки символы экранирования */
2011
2015
  declare function unescapeSpecialCharacters(str: string): string;
@@ -2017,6 +2021,13 @@ declare const clearMultiLineComments: (formula: string) => string;
2017
2021
  declare const convertToFormulasChain: (values: TExtendedFormulaFilterValue[]) => string;
2018
2022
  declare const convertFiltersToFormula: (filters: TExtendedFormulaFilterValue[]) => string;
2019
2023
 
2024
+ interface ICalculatorOptions {
2025
+ /**
2026
+ * Должен ли созданный вычислитель влиять на отображение системного индикатора загрузки
2027
+ * По умолчанию - true
2028
+ */
2029
+ affectLoader: boolean;
2030
+ }
2020
2031
  /** Фабрика вычислителей */
2021
2032
  interface ICalculatorFactory {
2022
2033
  /**
@@ -2027,7 +2038,7 @@ interface ICalculatorFactory {
2027
2038
  * Подходит для большинства задач, где требуется сделать одну или несколько группировок
2028
2039
  * и при необходимости посчитать показатель по каждой группе.
2029
2040
  */
2030
- general: () => IGeneralCalculator;
2041
+ general: (options?: ICalculatorOptions) => IGeneralCalculator;
2031
2042
  /**
2032
2043
  * Вычислитель с двумя лимитами.
2033
2044
  * Для работы требует ровно 2 разреза(для каждого из которых указывается свой лимит) и
@@ -2035,7 +2046,7 @@ interface ICalculatorFactory {
2035
2046
  *
2036
2047
  * Используется для отображения данных в виде двумерных матриц со значениями разрезов на осях.
2037
2048
  */
2038
- twoLimits: () => ITwoLimitsCalculator;
2049
+ twoLimits: (options?: ICalculatorOptions) => ITwoLimitsCalculator;
2039
2050
  /**
2040
2051
  * Вычислитель круговой диаграммы.
2041
2052
  * Для работы требует ровно 1 разрез и 1 меру.
@@ -2044,19 +2055,19 @@ interface ICalculatorFactory {
2044
2055
  * а не как меру по всему объему данных. Такая особенность необходима для расчета
2045
2056
  * размера оставшегося сектора круговой диаграммы.
2046
2057
  */
2047
- pie: () => IPieCalculator;
2058
+ pie: (options?: ICalculatorOptions) => IPieCalculator;
2048
2059
  /**
2049
2060
  * Вычислитель, предназначенный для вычисления графа по переданному процессу.
2050
2061
  * Возвращает информацию о событиях процесса и связях(переходах) между ними.
2051
2062
  *
2052
2063
  * Может вычислять любое количество мер, отдельно для событий и переходов.
2053
2064
  */
2054
- processGraph: () => IProcessGraphCalculator;
2065
+ processGraph: (options?: ICalculatorOptions) => IProcessGraphCalculator;
2055
2066
  /**
2056
2067
  * Вычислитель гистограммы.
2057
2068
  * Вычисляет "корзины" для переданного разреза.
2058
2069
  */
2059
- histogram: () => IHistogramCalculator;
2070
+ histogram: (options?: ICalculatorOptions) => IHistogramCalculator;
2060
2071
  /**
2061
2072
  * Вычислитель типа для разрезов и мер.
2062
2073
  * Принимает любое количество разрезов и мер.
@@ -2064,7 +2075,7 @@ interface ICalculatorFactory {
2064
2075
  * Под капотом использует general-вычислитель, оборачивая формулы в toTypeName, поэтому
2065
2076
  * все переданные формулы должны использовать связанные таблицы модели данных.
2066
2077
  */
2067
- type: () => ITypeCalculator;
2078
+ type: (options?: ICalculatorOptions) => ITypeCalculator;
2068
2079
  }
2069
2080
 
2070
2081
  interface ILens<T extends TNullable<object>, Value> {
@@ -2682,4 +2693,4 @@ declare global {
2682
2693
  }
2683
2694
  }
2684
2695
 
2685
- export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, 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 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 ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, 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 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 TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, 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, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
2696
+ export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, 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 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 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 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 TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, 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, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
package/dist/index.esm.js CHANGED
@@ -418,6 +418,7 @@ var EFormattingPresets;
418
418
  EFormattingPresets["MMMM"] = "MMMM";
419
419
  //Группа шаблонов для формата NUMBER
420
420
  EFormattingPresets["k"] = "k";
421
+ EFormattingPresets["x"] = "x";
421
422
  EFormattingPresets["#,##x"] = "#,##x";
422
423
  EFormattingPresets["#,##x.x"] = "#,##x.x";
423
424
  EFormattingPresets["#,##x.xx"] = "#,##x.xx";
@@ -553,6 +554,7 @@ var formattingConfig = {
553
554
  ],
554
555
  _a[EFormatTypes.NUMBER] = [
555
556
  EFormattingPresets.AUTO,
557
+ EFormattingPresets["x"],
556
558
  EFormattingPresets["#,##x"],
557
559
  EFormattingPresets["#,##x.x"],
558
560
  EFormattingPresets["#,##x.xx"],
@@ -750,10 +752,12 @@ function fillTemplateString(templateString, params) {
750
752
  return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
751
753
  }
752
754
 
753
- var escapeSpecialCharacters = function (formula) {
754
- return formula
755
+ /** Экранировать специальные символы перед вставкой значения в sql-выражение */
756
+ var escapeSpecialCharacters = function (value) {
757
+ return value
755
758
  .replaceAll("\\", "\\\\")
756
759
  .replaceAll('"', '\\"')
760
+ .replaceAll("'", "\\'")
757
761
  .replaceAll("`", "\\`");
758
762
  };
759
763
 
package/dist/index.js CHANGED
@@ -419,6 +419,7 @@ exports.EFormattingPresets = void 0;
419
419
  EFormattingPresets["MMMM"] = "MMMM";
420
420
  //Группа шаблонов для формата NUMBER
421
421
  EFormattingPresets["k"] = "k";
422
+ EFormattingPresets["x"] = "x";
422
423
  EFormattingPresets["#,##x"] = "#,##x";
423
424
  EFormattingPresets["#,##x.x"] = "#,##x.x";
424
425
  EFormattingPresets["#,##x.xx"] = "#,##x.xx";
@@ -554,6 +555,7 @@ var formattingConfig = {
554
555
  ],
555
556
  _a[exports.EFormatTypes.NUMBER] = [
556
557
  exports.EFormattingPresets.AUTO,
558
+ exports.EFormattingPresets["x"],
557
559
  exports.EFormattingPresets["#,##x"],
558
560
  exports.EFormattingPresets["#,##x.x"],
559
561
  exports.EFormattingPresets["#,##x.xx"],
@@ -751,10 +753,12 @@ function fillTemplateString(templateString, params) {
751
753
  return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
752
754
  }
753
755
 
754
- var escapeSpecialCharacters = function (formula) {
755
- return formula
756
+ /** Экранировать специальные символы перед вставкой значения в sql-выражение */
757
+ var escapeSpecialCharacters = function (value) {
758
+ return value
756
759
  .replaceAll("\\", "\\\\")
757
760
  .replaceAll('"', '\\"')
761
+ .replaceAll("'", "\\'")
758
762
  .replaceAll("`", "\\`");
759
763
  };
760
764
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",