@infomaximum/widget-sdk 5.22.0 → 5.24.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 +14 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.esm.js +7 -6
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.24.0](https://github.com/Infomaximum/widget-sdk/compare/v5.23.0...v5.24.0) (2025-06-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* убрано экранирование символов ` \' из escapeSpecialCharacters ([b5020f9](https://github.com/Infomaximum/widget-sdk/commit/b5020f9a1e6532a8c3e3a0547309f98892aaf1ea))
|
|
11
|
+
|
|
12
|
+
## [5.23.0](https://github.com/Infomaximum/widget-sdk/compare/v5.22.0...v5.23.0) (2025-05-30)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* поддержан null для значения переменных ([6b2cd53](https://github.com/Infomaximum/widget-sdk/commit/6b2cd53b28b169e4a1e0500ed9e972870aa46c95))
|
|
18
|
+
|
|
5
19
|
## [5.22.0](https://github.com/Infomaximum/widget-sdk/compare/v5.21.0...v5.22.0) (2025-05-28)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.d.ts
CHANGED
|
@@ -661,7 +661,7 @@ interface IWidgetStaticVariable extends IBaseWidgetVariable {
|
|
|
661
661
|
/** Тип переменной */
|
|
662
662
|
type: EIndicatorType.STATIC;
|
|
663
663
|
/** Значение */
|
|
664
|
-
value: string;
|
|
664
|
+
value: string | null;
|
|
665
665
|
/** Обобщенный тип данных */
|
|
666
666
|
simpleInputType: ESimpleInputType;
|
|
667
667
|
}
|
|
@@ -673,7 +673,7 @@ interface IWidgetStaticListVariable extends IBaseWidgetVariable {
|
|
|
673
673
|
/** Тип переменной */
|
|
674
674
|
type: EIndicatorType.STATIC_LIST;
|
|
675
675
|
/** Значение */
|
|
676
|
-
value: string | string[];
|
|
676
|
+
value: string | string[] | null;
|
|
677
677
|
/** Элементы статического списка */
|
|
678
678
|
/** @deprecated поле будет удалено, необходимо использовать labeledOptions */
|
|
679
679
|
options: string[];
|
|
@@ -686,7 +686,7 @@ interface IWidgetDynamicListVariable extends IBaseWidgetVariable {
|
|
|
686
686
|
/** Тип переменной */
|
|
687
687
|
type: EIndicatorType.DYNAMIC_LIST;
|
|
688
688
|
/** Значение */
|
|
689
|
-
value: string | string[];
|
|
689
|
+
value: string | (string | null)[] | null;
|
|
690
690
|
/** Формула для отображения списка */
|
|
691
691
|
listFormula: TNullable<string>;
|
|
692
692
|
/** Тип данных */
|
|
@@ -704,7 +704,7 @@ interface IWidgetColumnListVariable extends IBaseWidgetVariable {
|
|
|
704
704
|
/** Имя таблицы */
|
|
705
705
|
tableName: string;
|
|
706
706
|
/** Значение (имя колонки) */
|
|
707
|
-
value: string;
|
|
707
|
+
value: string | null;
|
|
708
708
|
}
|
|
709
709
|
type TWidgetVariable = IWidgetStaticVariable | IWidgetStaticListVariable | IWidgetDynamicListVariable | IWidgetColumnListVariable;
|
|
710
710
|
declare function isDimensionsHierarchy(indicator: IWidgetColumnIndicator): indicator is IWidgetDimensionHierarchy;
|
|
@@ -2008,7 +2008,12 @@ declare function bindContentWithIndicator<Output extends ICalculatorIndicatorOut
|
|
|
2008
2008
|
*/
|
|
2009
2009
|
declare function bindContentsWithIndicators<Output extends ICalculatorIndicatorOutput, Indicator extends IWidgetIndicator>(outputs: Map<string, Output>, indicators: Indicator[]): TBoundedContentWithIndicator<Output, Indicator>[];
|
|
2010
2010
|
|
|
2011
|
-
/**
|
|
2011
|
+
/** Функция для экранирования специальных символов
|
|
2012
|
+
* при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
|
|
2013
|
+
* Пример: Если название переменной содержит кавычки или обратные слеши,
|
|
2014
|
+
* например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
|
|
2015
|
+
* Результат должен выглядеть так: `"inputs"."te\"s\\t"`
|
|
2016
|
+
*/
|
|
2012
2017
|
declare const escapeSpecialCharacters: (value: string) => string;
|
|
2013
2018
|
|
|
2014
2019
|
/** Удалить из строки символы экранирования */
|
package/dist/index.esm.js
CHANGED
|
@@ -752,13 +752,14 @@ function fillTemplateString(templateString, params) {
|
|
|
752
752
|
return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
/**
|
|
755
|
+
/** Функция для экранирования специальных символов
|
|
756
|
+
* при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
|
|
757
|
+
* Пример: Если название переменной содержит кавычки или обратные слеши,
|
|
758
|
+
* например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
|
|
759
|
+
* Результат должен выглядеть так: `"inputs"."te\"s\\t"`
|
|
760
|
+
*/
|
|
756
761
|
var escapeSpecialCharacters = function (value) {
|
|
757
|
-
return value
|
|
758
|
-
.replaceAll("\\", "\\\\")
|
|
759
|
-
.replaceAll('"', '\\"')
|
|
760
|
-
.replaceAll("'", "\\'")
|
|
761
|
-
.replaceAll("`", "\\`");
|
|
762
|
+
return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
762
763
|
};
|
|
763
764
|
|
|
764
765
|
function generateColumnFormula(tableName, columnName) {
|
package/dist/index.js
CHANGED
|
@@ -753,13 +753,14 @@ function fillTemplateString(templateString, params) {
|
|
|
753
753
|
return templateString.replace(/\{(.*?)\}/g, function (_, key) { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ""; });
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
/**
|
|
756
|
+
/** Функция для экранирования специальных символов
|
|
757
|
+
* при подстановке названий таблиц, колонок, переменных или показателей в SQL-формулы.
|
|
758
|
+
* Пример: Если название переменной содержит кавычки или обратные слеши,
|
|
759
|
+
* например: `te"s\t`, то перед подстановкой в SQL-формулу его следует экранировать.
|
|
760
|
+
* Результат должен выглядеть так: `"inputs"."te\"s\\t"`
|
|
761
|
+
*/
|
|
757
762
|
var escapeSpecialCharacters = function (value) {
|
|
758
|
-
return value
|
|
759
|
-
.replaceAll("\\", "\\\\")
|
|
760
|
-
.replaceAll('"', '\\"')
|
|
761
|
-
.replaceAll("'", "\\'")
|
|
762
|
-
.replaceAll("`", "\\`");
|
|
763
|
+
return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
763
764
|
};
|
|
764
765
|
|
|
765
766
|
function generateColumnFormula(tableName, columnName) {
|