@infomaximum/widget-sdk 6.0.0-7 → 6.0.0-9
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 +9 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.esm.js +5 -8
- package/dist/index.js +5 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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-9](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-8...v6.0.0-9) (2025-09-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* исправлен баг с подстановкой значений в template строки ([12166b5](https://github.com/Infomaximum/widget-sdk/commit/12166b587b74e0ff912822b0d065463b8f23121e))
|
|
11
|
+
|
|
12
|
+
## [6.0.0-8](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-7...v6.0.0-8) (2025-09-11)
|
|
13
|
+
|
|
5
14
|
## [6.0.0-7](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-6...v6.0.0-7) (2025-09-10)
|
|
6
15
|
|
|
7
16
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1447,7 +1447,6 @@ interface IFormulaControl {
|
|
|
1447
1447
|
dbDataType: string | undefined;
|
|
1448
1448
|
};
|
|
1449
1449
|
props: {
|
|
1450
|
-
showModeToggle?: boolean;
|
|
1451
1450
|
indicatorConfig?: ({
|
|
1452
1451
|
type: "measure";
|
|
1453
1452
|
templates?: TWidgetMeasureData["templates"];
|
|
@@ -1998,7 +1997,7 @@ declare const prepareMeasureAggregationParams: (value: Extract<IWidgetMeasure["v
|
|
|
1998
1997
|
outerAggregation: EOuterAggregation;
|
|
1999
1998
|
eventNameFormula: string;
|
|
2000
1999
|
caseCaseIdFormula: string;
|
|
2001
|
-
eventName: string
|
|
2000
|
+
eventName: string;
|
|
2002
2001
|
objectFilters: string;
|
|
2003
2002
|
filters: string;
|
|
2004
2003
|
eventTimeFormula: string;
|
|
@@ -2043,7 +2042,7 @@ declare const prepareDurationParams: (value: TWidgetIndicatorDurationValue) => {
|
|
|
2043
2042
|
endEventAggregationName: string;
|
|
2044
2043
|
} | null;
|
|
2045
2044
|
|
|
2046
|
-
declare function getEventMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
|
|
2045
|
+
declare function getEventMeasureFormula({ value }: IProcessIndicator, process: Omit<IWidgetProcess, "isValid">): string;
|
|
2047
2046
|
|
|
2048
2047
|
declare enum EEventMeasureTemplateNames {
|
|
2049
2048
|
eventsCount = "eventsCount",
|
|
@@ -2054,7 +2053,7 @@ declare const eventMeasureTemplateFormulas: {
|
|
|
2054
2053
|
readonly reworksCount: "count() - uniqExact({caseCaseIdFormula})";
|
|
2055
2054
|
};
|
|
2056
2055
|
|
|
2057
|
-
declare function getTransitionMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
|
|
2056
|
+
declare function getTransitionMeasureFormula({ value }: IProcessIndicator, process: Omit<IWidgetProcess, "isValid">): string;
|
|
2058
2057
|
|
|
2059
2058
|
declare enum ETransitionMeasureTemplateNames {
|
|
2060
2059
|
transitionsCount = "transitionsCount",
|
|
@@ -2070,7 +2069,7 @@ declare const countExecutionsTemplate = "process(countIf({eventNameFormula} in '
|
|
|
2070
2069
|
/** @deprecated - следует использовать fillTemplateSql */
|
|
2071
2070
|
declare function fillTemplateString(templateString: string, params: Record<string, any>): string;
|
|
2072
2071
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
2073
|
-
declare function fillTemplateSql(templateString: string, params: Record<string,
|
|
2072
|
+
declare function fillTemplateSql(templateString: string, params: Record<string, string>): string;
|
|
2074
2073
|
|
|
2075
2074
|
declare function generateColumnFormula(tableName: string, columnName: string): string;
|
|
2076
2075
|
|
package/dist/index.esm.js
CHANGED
|
@@ -807,17 +807,13 @@ function fillTemplateSql(templateString, params) {
|
|
|
807
807
|
try {
|
|
808
808
|
for (var _b = __values(Object.entries(params)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
809
809
|
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
810
|
-
if (!value) {
|
|
811
|
-
newParams[key] = value;
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
810
|
/** Эвристическая проверка на возможное присутствие sql-комментария в значении подставляемом в template
|
|
815
811
|
*/
|
|
816
|
-
if (
|
|
812
|
+
if (String(value).indexOf("--") >= 0) {
|
|
817
813
|
newParams[key] = "".concat(value, "\n");
|
|
818
|
-
|
|
814
|
+
continue;
|
|
819
815
|
}
|
|
820
|
-
newParams[key] = value;
|
|
816
|
+
newParams[key] = String(value);
|
|
821
817
|
}
|
|
822
818
|
}
|
|
823
819
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -1146,6 +1142,7 @@ var EMeasureAggregationTemplateName;
|
|
|
1146
1142
|
})(EMeasureAggregationTemplateName || (EMeasureAggregationTemplateName = {}));
|
|
1147
1143
|
/** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
|
|
1148
1144
|
var prepareMeasureAggregationParams = function (value) {
|
|
1145
|
+
var _a;
|
|
1149
1146
|
if ((!value.anyEvent && !value.eventName) ||
|
|
1150
1147
|
!value.caseCaseIdFormula ||
|
|
1151
1148
|
!value.eventNameFormula ||
|
|
@@ -1158,7 +1155,7 @@ var prepareMeasureAggregationParams = function (value) {
|
|
|
1158
1155
|
outerAggregation: value.outerAggregation,
|
|
1159
1156
|
eventNameFormula: value.eventNameFormula,
|
|
1160
1157
|
caseCaseIdFormula: value.caseCaseIdFormula,
|
|
1161
|
-
eventName: value.eventName,
|
|
1158
|
+
eventName: (_a = value.eventName) !== null && _a !== void 0 ? _a : "",
|
|
1162
1159
|
objectFilters: "1",
|
|
1163
1160
|
filters: convertFiltersToFormula(value.filters),
|
|
1164
1161
|
eventTimeFormula: "",
|
package/dist/index.js
CHANGED
|
@@ -808,17 +808,13 @@ function fillTemplateSql(templateString, params) {
|
|
|
808
808
|
try {
|
|
809
809
|
for (var _b = __values(Object.entries(params)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
810
810
|
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
811
|
-
if (!value) {
|
|
812
|
-
newParams[key] = value;
|
|
813
|
-
break;
|
|
814
|
-
}
|
|
815
811
|
/** Эвристическая проверка на возможное присутствие sql-комментария в значении подставляемом в template
|
|
816
812
|
*/
|
|
817
|
-
if (
|
|
813
|
+
if (String(value).indexOf("--") >= 0) {
|
|
818
814
|
newParams[key] = "".concat(value, "\n");
|
|
819
|
-
|
|
815
|
+
continue;
|
|
820
816
|
}
|
|
821
|
-
newParams[key] = value;
|
|
817
|
+
newParams[key] = String(value);
|
|
822
818
|
}
|
|
823
819
|
}
|
|
824
820
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -1147,6 +1143,7 @@ exports.EMeasureAggregationTemplateName = void 0;
|
|
|
1147
1143
|
})(exports.EMeasureAggregationTemplateName || (exports.EMeasureAggregationTemplateName = {}));
|
|
1148
1144
|
/** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
|
|
1149
1145
|
var prepareMeasureAggregationParams = function (value) {
|
|
1146
|
+
var _a;
|
|
1150
1147
|
if ((!value.anyEvent && !value.eventName) ||
|
|
1151
1148
|
!value.caseCaseIdFormula ||
|
|
1152
1149
|
!value.eventNameFormula ||
|
|
@@ -1159,7 +1156,7 @@ var prepareMeasureAggregationParams = function (value) {
|
|
|
1159
1156
|
outerAggregation: value.outerAggregation,
|
|
1160
1157
|
eventNameFormula: value.eventNameFormula,
|
|
1161
1158
|
caseCaseIdFormula: value.caseCaseIdFormula,
|
|
1162
|
-
eventName: value.eventName,
|
|
1159
|
+
eventName: (_a = value.eventName) !== null && _a !== void 0 ? _a : "",
|
|
1163
1160
|
objectFilters: "1",
|
|
1164
1161
|
filters: convertFiltersToFormula(value.filters),
|
|
1165
1162
|
eventTimeFormula: "",
|