@infomaximum/widget-sdk 6.0.0-1 → 6.0.0-3

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,26 @@
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-3](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2...v6.0.0-3) (2025-08-28)
6
+
7
+
8
+ ### Features
9
+
10
+ * виджета дана возможность фильтровать таблицы в дропдаунах кнопок добавления индикаторов и фильтрации по процессам ([cb9fd22](https://github.com/Infomaximum/widget-sdk/commit/cb9fd22cbf6ebf12f0261949ab9d467edcaf0a36))
11
+
12
+ ## [6.0.0-2](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-1...v6.0.0-2) (2025-08-26)
13
+
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * - Виджеты, использующие импорты, связанные со старым синтаксисом ссылок, будут работать некорректно в новой версии системы (dashboardLinkRegExp, workspaceLinkRegExp, parseIndicatorLink, getRuleColor, isValidColor).
18
+ - Функция escapeSpecialCharacters заменена на escapeDoubleQuoteLinkName.
19
+ - Константа linkNameRegExp удалена - вместо нее используется curlyBracketsContentPattern.
20
+
21
+ ### Features
22
+
23
+ * добавлена поддержка нового синтаксиса ссылок на показатели ([7449482](https://github.com/Infomaximum/widget-sdk/commit/74494820ae4ca9e05f5d225ad243a57ca0a6d6aa))
24
+
5
25
  ## [6.0.0-1](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-0...v6.0.0-1) (2025-08-26)
6
26
 
7
27
 
package/dist/index.d.ts CHANGED
@@ -1369,19 +1369,21 @@ declare function fillTemplateString(templateString: string, params: Record<strin
1369
1369
  declare function generateColumnFormula(tableName: string, columnName: string): string;
1370
1370
 
1371
1371
  /**
1372
- * Регулярное выражение для поиска имени ссылки внутри формулы.
1373
- * Учитывает, что имя внутри формулы содержит экраны.
1374
- *
1375
- * Принцип работы:
1376
- * Пробовать следующие вхождения:
1377
- * - \\\\ - экранированный символ обратного слэша.
1378
- * - Иначе \\" - экранированный символ кавычки.
1379
- * - Иначе [^"] - любой символ кроме кавычки.
1380
- * Если встречается любой другой символ, то это закрывающая кавычка имени переменной.
1372
+ * Паттерн подстроки, валидной для использования внутри фигурных скобок.
1373
+ * Требование к подстроке - отсутствие закрывающих фигурных скобок (кроме экранированных).
1374
+ */
1375
+ declare const curlyBracketsContentPattern: string;
1376
+ /**
1377
+ * Паттерн подстроки, валидной для использования внутри двойных кавычек.
1378
+ * Требование к подстроке - отсутствие двойных кавычек (кроме экранированных).
1381
1379
  */
1382
- declare const linkNameRegExp = "(?:\\\\\\\\|\\\\\"|[^\"])+";
1380
+ declare const doubleQuoteContentPattern: string;
1383
1381
  declare const dashboardLinkRegExp: RegExp;
1384
1382
  declare const workspaceLinkRegExp: RegExp;
1383
+ /** Экранирование спец.символов при подстановке названий таблиц и колонок */
1384
+ declare const escapeDoubleQuoteLinkName: (str: string) => string;
1385
+ /** Экранирование спец.символов при подстановке названий переменных и показателей */
1386
+ declare const escapeCurlyBracketLinkName: (str: string) => string;
1385
1387
  interface IIndicatorLink {
1386
1388
  /** string - имя группы пространства, null - используется текущий отчет */
1387
1389
  scopeName: string | null;
@@ -1680,6 +1682,8 @@ interface IFormulaControl {
1680
1682
  templates?: EDimensionTemplateNames[];
1681
1683
  };
1682
1684
  disabled?: boolean;
1685
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
1686
+ processKeys?: Iterable<string>;
1683
1687
  titleModal?: string;
1684
1688
  };
1685
1689
  }
@@ -1732,6 +1736,8 @@ interface IFilterControl {
1732
1736
  value: TExtendedFormulaFilterValue[];
1733
1737
  props: {
1734
1738
  buttonTitle?: string;
1739
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
1740
+ processKeys?: Iterable<string>;
1735
1741
  };
1736
1742
  }
1737
1743
  interface IDisplayConditionControl {
@@ -2031,13 +2037,8 @@ declare function bindContentWithIndicator<Output extends ICalculatorIndicatorOut
2031
2037
  */
2032
2038
  declare function bindContentsWithIndicators<Output extends ICalculatorIndicatorOutput, Indicator extends IWidgetIndicator>(outputs: Map<string, Output>, indicators: Indicator[]): TBoundedContentWithIndicator<Output, Indicator>[];
2033
2039
 
2034
- /** Функция для экранирования специальных символов
2035
- * при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
2036
- * Пример: Если название переменной содержит кавычки или обратные слеши,
2037
- * например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
2038
- * Результат должен выглядеть так: `"inputs"."te\"s\\t"`
2039
- */
2040
- declare const escapeSpecialCharacters: (value: string) => string;
2040
+ /** Создать функцию экранирования переданных `specialChars` внутри `str` */
2041
+ declare const createEscaper: (specialChars: string[]) => (str: string) => string;
2041
2042
 
2042
2043
  /** Удалить из строки символы экранирования */
2043
2044
  declare function unescapeSpecialCharacters(str: string): string;
@@ -2220,7 +2221,10 @@ interface IInitialSettings extends Record<string, any> {
2220
2221
  /** Кнопка добавления группы в набор */
2221
2222
  type TAddButton = {
2222
2223
  title: string;
2223
- props?: ICustomAddButtonProps | IMeasureAddButtonProps | ISortingAddButtonProps;
2224
+ props?: (ICustomAddButtonProps | IMeasureAddButtonProps | ISortingAddButtonProps) & {
2225
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
2226
+ processKeys?: Iterable<string>;
2227
+ };
2224
2228
  /**
2225
2229
  * Начальные настройки, которые получит показатель при создании через кнопку добавления.
2226
2230
  * Возможность не поддерживается для иерархии разрезов.
@@ -2736,4 +2740,4 @@ declare global {
2736
2740
  }
2737
2741
  }
2738
2742
 
2739
- export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, 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 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 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 THintPlacement, 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, createAggregationTemplate as createMeasureAggregationTemplate, 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, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
2743
+ export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, 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 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 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 THintPlacement, 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, 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, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, 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
@@ -138,6 +138,10 @@ function __rest(s, e) {
138
138
  return t;
139
139
  }
140
140
 
141
+ function __makeTemplateObject(cooked, raw) {
142
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
143
+ return cooked;
144
+ }
141
145
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
142
146
  var e = new Error(message);
143
147
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -765,20 +769,67 @@ function fillTemplateString(templateString, params) {
765
769
  return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
766
770
  }
767
771
 
768
- /** Функция для экранирования специальных символов
769
- * при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
770
- * Пример: Если название переменной содержит кавычки или обратные слеши,
771
- * например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
772
- * Результат должен выглядеть так: `"inputs"."te\"s\\t"`
772
+ /** Создать функцию экранирования переданных `specialChars` внутри `str` */
773
+ var createEscaper = function (specialChars) { return function (str) {
774
+ return specialChars.reduce(function (escaped, char) { return escaped.replaceAll(char, "\\".concat(char)); }, str);
775
+ }; };
776
+
777
+ /** Удалить из строки символы экранирования */
778
+ function unescapeSpecialCharacters(str) {
779
+ return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
780
+ }
781
+
782
+ /**
783
+ * Создает RegExp-паттерн для подстроки с безопасными символами.
784
+ *
785
+ * Подстрока может содержать любой символ, кроме:
786
+ * 1. `restrictedChar` - запрещено появление без экранирования.
787
+ * 2. Обратного слэша (`\`) - запрещено появление без пары.
788
+ *
789
+ * Правило экранирования:
790
+ * - Любой символ, включая `restrictedChar` и `\`, можно использовать с префиксом `\`.
791
+ * - Последний символ в подстроке не может быть одинокий слэш.
792
+ *
793
+ * @param restrictedChar Символ, который нельзя использовать без экранирования.
794
+ * @returns Строка для вставки внутрь RegExp.
773
795
  */
774
- var escapeSpecialCharacters = function (value) {
775
- return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
796
+ var createEscapableCharPattern = function (restrictedChar) {
797
+ return String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject(["(?:\\.|[^", "\\])*"], ["(?:\\\\.|[^", "\\\\])*"])), restrictedChar);
776
798
  };
799
+ /**
800
+ * Паттерн подстроки, валидной для использования внутри фигурных скобок.
801
+ * Требование к подстроке - отсутствие закрывающих фигурных скобок (кроме экранированных).
802
+ */
803
+ var curlyBracketsContentPattern = createEscapableCharPattern("}");
804
+ /**
805
+ * Паттерн подстроки, валидной для использования внутри двойных кавычек.
806
+ * Требование к подстроке - отсутствие двойных кавычек (кроме экранированных).
807
+ */
808
+ var doubleQuoteContentPattern = createEscapableCharPattern('"');
809
+ var dashboardLinkRegExp = new RegExp(String.raw(templateObject_2 || (templateObject_2 = __makeTemplateObject(["#{(", ")}(?!.{(", ")})"], ["#\\{(", ")\\}(?!\\.\\{(", ")\\})"])), curlyBracketsContentPattern, curlyBracketsContentPattern), "g");
810
+ var workspaceLinkRegExp = new RegExp(String.raw(templateObject_3 || (templateObject_3 = __makeTemplateObject(["#{(", ")}.{(", ")}"], ["#\\{(", ")\\}\\.\\{(", ")\\}"])), curlyBracketsContentPattern, curlyBracketsContentPattern), "g");
811
+ /** Экранирование спец.символов при подстановке названий таблиц и колонок */
812
+ var escapeDoubleQuoteLinkName = createEscaper(Array.from("\\\""));
813
+ /** Экранирование спец.символов при подстановке названий переменных и показателей */
814
+ var escapeCurlyBracketLinkName = createEscaper(Array.from("\\}.[]"));
815
+ var parseIndicatorLink = function (formula) {
816
+ var dashboardMatch = formula.match(dashboardLinkRegExp.source);
817
+ if (dashboardMatch) {
818
+ return { scopeName: null, indicatorName: dashboardMatch[1] };
819
+ }
820
+ var workspaceMatch = formula.match(workspaceLinkRegExp.source);
821
+ if (workspaceMatch) {
822
+ return {
823
+ scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
824
+ indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
825
+ };
826
+ }
827
+ return null;
828
+ };
829
+ var templateObject_1, templateObject_2, templateObject_3;
777
830
 
778
831
  function generateColumnFormula(tableName, columnName) {
779
- var preparedTableName = escapeSpecialCharacters(tableName);
780
- var preparedColumnName = escapeSpecialCharacters(columnName);
781
- return "\"".concat(preparedTableName, "\".\"").concat(preparedColumnName, "\"");
832
+ return "\"".concat(escapeDoubleQuoteLinkName(tableName), "\".\"").concat(escapeDoubleQuoteLinkName(columnName), "\"");
782
833
  }
783
834
 
784
835
  var escapeSingularQuotes = function (formula) {
@@ -1320,40 +1371,6 @@ function getTransitionMeasureFormula(_a, process) {
1320
1371
  return "";
1321
1372
  }
1322
1373
 
1323
- /** Удалить из строки символы экранирования */
1324
- function unescapeSpecialCharacters(str) {
1325
- return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
1326
- }
1327
-
1328
- /**
1329
- * Регулярное выражение для поиска имени ссылки внутри формулы.
1330
- * Учитывает, что имя внутри формулы содержит экраны.
1331
- *
1332
- * Принцип работы:
1333
- * Пробовать следующие вхождения:
1334
- * - \\\\ - экранированный символ обратного слэша.
1335
- * - Иначе \\" - экранированный символ кавычки.
1336
- * - Иначе [^"] - любой символ кроме кавычки.
1337
- * Если встречается любой другой символ, то это закрывающая кавычка имени переменной.
1338
- */
1339
- var linkNameRegExp = "(?:\\\\\\\\|\\\\\"|[^\"])+";
1340
- var dashboardLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"(?!\\.\"").concat(linkNameRegExp, "\")"), "g");
1341
- var workspaceLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"\\.\"(").concat(linkNameRegExp, ")\""), "g");
1342
- var parseIndicatorLink = function (formula) {
1343
- var dashboardMatch = formula.match(dashboardLinkRegExp.source);
1344
- if (dashboardMatch) {
1345
- return { scopeName: null, indicatorName: dashboardMatch[1] };
1346
- }
1347
- var workspaceMatch = formula.match(workspaceLinkRegExp.source);
1348
- if (workspaceMatch) {
1349
- return {
1350
- scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
1351
- indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
1352
- };
1353
- }
1354
- return null;
1355
- };
1356
-
1357
1374
  // Типы, используемые в значениях элементов управления.
1358
1375
  var EWidgetFilterMode;
1359
1376
  (function (EWidgetFilterMode) {
@@ -2082,4 +2099,4 @@ var getColorByIndex = function (index) {
2082
2099
  return color;
2083
2100
  };
2084
2101
 
2085
- export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, 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, OuterAggregation, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createAggregationTemplate as createMeasureAggregationTemplate, 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, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
2102
+ export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, 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, 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, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, 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.js CHANGED
@@ -139,6 +139,10 @@ function __rest(s, e) {
139
139
  return t;
140
140
  }
141
141
 
142
+ function __makeTemplateObject(cooked, raw) {
143
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
144
+ return cooked;
145
+ }
142
146
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
143
147
  var e = new Error(message);
144
148
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -766,20 +770,67 @@ function fillTemplateString(templateString, params) {
766
770
  return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
767
771
  }
768
772
 
769
- /** Функция для экранирования специальных символов
770
- * при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
771
- * Пример: Если название переменной содержит кавычки или обратные слеши,
772
- * например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
773
- * Результат должен выглядеть так: `"inputs"."te\"s\\t"`
773
+ /** Создать функцию экранирования переданных `specialChars` внутри `str` */
774
+ var createEscaper = function (specialChars) { return function (str) {
775
+ return specialChars.reduce(function (escaped, char) { return escaped.replaceAll(char, "\\".concat(char)); }, str);
776
+ }; };
777
+
778
+ /** Удалить из строки символы экранирования */
779
+ function unescapeSpecialCharacters(str) {
780
+ return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
781
+ }
782
+
783
+ /**
784
+ * Создает RegExp-паттерн для подстроки с безопасными символами.
785
+ *
786
+ * Подстрока может содержать любой символ, кроме:
787
+ * 1. `restrictedChar` - запрещено появление без экранирования.
788
+ * 2. Обратного слэша (`\`) - запрещено появление без пары.
789
+ *
790
+ * Правило экранирования:
791
+ * - Любой символ, включая `restrictedChar` и `\`, можно использовать с префиксом `\`.
792
+ * - Последний символ в подстроке не может быть одинокий слэш.
793
+ *
794
+ * @param restrictedChar Символ, который нельзя использовать без экранирования.
795
+ * @returns Строка для вставки внутрь RegExp.
774
796
  */
775
- var escapeSpecialCharacters = function (value) {
776
- return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
797
+ var createEscapableCharPattern = function (restrictedChar) {
798
+ return String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject(["(?:\\.|[^", "\\])*"], ["(?:\\\\.|[^", "\\\\])*"])), restrictedChar);
777
799
  };
800
+ /**
801
+ * Паттерн подстроки, валидной для использования внутри фигурных скобок.
802
+ * Требование к подстроке - отсутствие закрывающих фигурных скобок (кроме экранированных).
803
+ */
804
+ var curlyBracketsContentPattern = createEscapableCharPattern("}");
805
+ /**
806
+ * Паттерн подстроки, валидной для использования внутри двойных кавычек.
807
+ * Требование к подстроке - отсутствие двойных кавычек (кроме экранированных).
808
+ */
809
+ var doubleQuoteContentPattern = createEscapableCharPattern('"');
810
+ var dashboardLinkRegExp = new RegExp(String.raw(templateObject_2 || (templateObject_2 = __makeTemplateObject(["#{(", ")}(?!.{(", ")})"], ["#\\{(", ")\\}(?!\\.\\{(", ")\\})"])), curlyBracketsContentPattern, curlyBracketsContentPattern), "g");
811
+ var workspaceLinkRegExp = new RegExp(String.raw(templateObject_3 || (templateObject_3 = __makeTemplateObject(["#{(", ")}.{(", ")}"], ["#\\{(", ")\\}\\.\\{(", ")\\}"])), curlyBracketsContentPattern, curlyBracketsContentPattern), "g");
812
+ /** Экранирование спец.символов при подстановке названий таблиц и колонок */
813
+ var escapeDoubleQuoteLinkName = createEscaper(Array.from("\\\""));
814
+ /** Экранирование спец.символов при подстановке названий переменных и показателей */
815
+ var escapeCurlyBracketLinkName = createEscaper(Array.from("\\}.[]"));
816
+ var parseIndicatorLink = function (formula) {
817
+ var dashboardMatch = formula.match(dashboardLinkRegExp.source);
818
+ if (dashboardMatch) {
819
+ return { scopeName: null, indicatorName: dashboardMatch[1] };
820
+ }
821
+ var workspaceMatch = formula.match(workspaceLinkRegExp.source);
822
+ if (workspaceMatch) {
823
+ return {
824
+ scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
825
+ indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
826
+ };
827
+ }
828
+ return null;
829
+ };
830
+ var templateObject_1, templateObject_2, templateObject_3;
778
831
 
779
832
  function generateColumnFormula(tableName, columnName) {
780
- var preparedTableName = escapeSpecialCharacters(tableName);
781
- var preparedColumnName = escapeSpecialCharacters(columnName);
782
- return "\"".concat(preparedTableName, "\".\"").concat(preparedColumnName, "\"");
833
+ return "\"".concat(escapeDoubleQuoteLinkName(tableName), "\".\"").concat(escapeDoubleQuoteLinkName(columnName), "\"");
783
834
  }
784
835
 
785
836
  var escapeSingularQuotes = function (formula) {
@@ -1321,40 +1372,6 @@ function getTransitionMeasureFormula(_a, process) {
1321
1372
  return "";
1322
1373
  }
1323
1374
 
1324
- /** Удалить из строки символы экранирования */
1325
- function unescapeSpecialCharacters(str) {
1326
- return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
1327
- }
1328
-
1329
- /**
1330
- * Регулярное выражение для поиска имени ссылки внутри формулы.
1331
- * Учитывает, что имя внутри формулы содержит экраны.
1332
- *
1333
- * Принцип работы:
1334
- * Пробовать следующие вхождения:
1335
- * - \\\\ - экранированный символ обратного слэша.
1336
- * - Иначе \\" - экранированный символ кавычки.
1337
- * - Иначе [^"] - любой символ кроме кавычки.
1338
- * Если встречается любой другой символ, то это закрывающая кавычка имени переменной.
1339
- */
1340
- var linkNameRegExp = "(?:\\\\\\\\|\\\\\"|[^\"])+";
1341
- var dashboardLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"(?!\\.\"").concat(linkNameRegExp, "\")"), "g");
1342
- var workspaceLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"\\.\"(").concat(linkNameRegExp, ")\""), "g");
1343
- var parseIndicatorLink = function (formula) {
1344
- var dashboardMatch = formula.match(dashboardLinkRegExp.source);
1345
- if (dashboardMatch) {
1346
- return { scopeName: null, indicatorName: dashboardMatch[1] };
1347
- }
1348
- var workspaceMatch = formula.match(workspaceLinkRegExp.source);
1349
- if (workspaceMatch) {
1350
- return {
1351
- scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
1352
- indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
1353
- };
1354
- }
1355
- return null;
1356
- };
1357
-
1358
1375
  // Типы, используемые в значениях элементов управления.
1359
1376
  exports.EWidgetFilterMode = void 0;
1360
1377
  (function (EWidgetFilterMode) {
@@ -2102,13 +2119,17 @@ exports.conversionTemplate = conversionTemplate;
2102
2119
  exports.convertFiltersToFormula = convertFiltersToFormula;
2103
2120
  exports.convertToFormulasChain = convertToFormulasChain;
2104
2121
  exports.countExecutionsTemplate = countExecutionsTemplate;
2122
+ exports.createEscaper = createEscaper;
2105
2123
  exports.createMeasureAggregationTemplate = createAggregationTemplate;
2124
+ exports.curlyBracketsContentPattern = curlyBracketsContentPattern;
2106
2125
  exports.dashboardLinkRegExp = dashboardLinkRegExp;
2107
2126
  exports.dimensionAggregationTemplates = dimensionAggregationTemplates;
2108
2127
  exports.dimensionTemplateFormulas = dimensionTemplateFormulas;
2109
2128
  exports.displayConditionTemplate = displayConditionTemplate;
2129
+ exports.doubleQuoteContentPattern = doubleQuoteContentPattern;
2110
2130
  exports.durationTemplates = durationTemplates;
2111
- exports.escapeSpecialCharacters = escapeSpecialCharacters;
2131
+ exports.escapeCurlyBracketLinkName = escapeCurlyBracketLinkName;
2132
+ exports.escapeDoubleQuoteLinkName = escapeDoubleQuoteLinkName;
2112
2133
  exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
2113
2134
  exports.fillTemplateString = fillTemplateString;
2114
2135
  exports.formattingConfig = formattingConfig;
@@ -2126,7 +2147,6 @@ exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
2126
2147
  exports.isDimensionsHierarchy = isDimensionsHierarchy;
2127
2148
  exports.isFormulaFilterValue = isFormulaFilterValue;
2128
2149
  exports.isValidColor = isValidColor;
2129
- exports.linkNameRegExp = linkNameRegExp;
2130
2150
  exports.mapDimensionsToInputs = mapDimensionsToInputs;
2131
2151
  exports.mapEventMeasuresToInputs = mapEventMeasuresToInputs;
2132
2152
  exports.mapFormulaFilterToCalculatorInput = mapFormulaFilterToCalculatorInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "6.0.0-1",
3
+ "version": "6.0.0-3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",