@infomaximum/widget-sdk 4.0.0-beta6 → 4.0.0-beta60
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/dist/index.d.ts +762 -421
- package/dist/index.esm.js +332 -194
- package/dist/index.js +343 -198
- package/package.json +10 -7
package/dist/index.js
CHANGED
|
@@ -3,103 +3,73 @@
|
|
|
3
3
|
var localization$1 = require('@infomaximum/localization');
|
|
4
4
|
var baseFilter = require('@infomaximum/base-filter');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
finally { if (e) throw e.error; }
|
|
47
|
-
}
|
|
48
|
-
return ar;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function __spreadArray(to, from, pack) {
|
|
52
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
53
|
-
if (ar || !(i in from)) {
|
|
54
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
55
|
-
ar[i] = from[i];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
62
|
-
var e = new Error(message);
|
|
63
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
exports.EWidgetActionInputMode = void 0;
|
|
67
|
-
(function (EWidgetActionInputMode) {
|
|
68
|
-
EWidgetActionInputMode["FROM_COLUMN"] = "FROM_COLUMN";
|
|
69
|
-
EWidgetActionInputMode["FROM_VARIABLE"] = "FROM_VARIABLE";
|
|
70
|
-
EWidgetActionInputMode["STATIC_LIST"] = "STATIC_LIST";
|
|
71
|
-
EWidgetActionInputMode["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
72
|
-
EWidgetActionInputMode["FORMULA"] = "FORMULA";
|
|
73
|
-
EWidgetActionInputMode["MANUALLY"] = "MANUALLY";
|
|
74
|
-
})(exports.EWidgetActionInputMode || (exports.EWidgetActionInputMode = {}));
|
|
75
|
-
var isActionValid = function (action, _a) {
|
|
6
|
+
exports.EWidgetActionInputMethod = void 0;
|
|
7
|
+
(function (EWidgetActionInputMethod) {
|
|
8
|
+
EWidgetActionInputMethod["COLUMN"] = "COLUMN";
|
|
9
|
+
EWidgetActionInputMethod["VARIABLE"] = "VARIABLE";
|
|
10
|
+
EWidgetActionInputMethod["STATIC_LIST"] = "STATIC_LIST";
|
|
11
|
+
EWidgetActionInputMethod["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
12
|
+
EWidgetActionInputMethod["FORMULA"] = "FORMULA";
|
|
13
|
+
EWidgetActionInputMethod["MANUALLY"] = "MANUALLY";
|
|
14
|
+
EWidgetActionInputMethod["EVENT"] = "EVENT";
|
|
15
|
+
EWidgetActionInputMethod["START_EVENT"] = "START_EVENT";
|
|
16
|
+
EWidgetActionInputMethod["FINISH_EVENT"] = "FINISH_EVENT";
|
|
17
|
+
})(exports.EWidgetActionInputMethod || (exports.EWidgetActionInputMethod = {}));
|
|
18
|
+
exports.EActionTypes = void 0;
|
|
19
|
+
(function (EActionTypes) {
|
|
20
|
+
EActionTypes["OPEN_URL"] = "OPEN_URL";
|
|
21
|
+
EActionTypes["UPDATE_VARIABLE"] = "UPDATE_VARIABLE";
|
|
22
|
+
EActionTypes["EXECUTE_SCRIPT"] = "EXECUTE_SCRIPT";
|
|
23
|
+
EActionTypes["OPEN_VIEW"] = "OPEN_VIEW";
|
|
24
|
+
})(exports.EActionTypes || (exports.EActionTypes = {}));
|
|
25
|
+
exports.EViewMode = void 0;
|
|
26
|
+
(function (EViewMode) {
|
|
27
|
+
EViewMode["EXISTED_VIEW"] = "EXISTED_VIEW";
|
|
28
|
+
EViewMode["GENERATED_BY_SCRIPT"] = "GENERATED_BY_SCRIPT";
|
|
29
|
+
EViewMode["EMPTY"] = "EMPTY";
|
|
30
|
+
})(exports.EViewMode || (exports.EViewMode = {}));
|
|
31
|
+
exports.EViewOpenIn = void 0;
|
|
32
|
+
(function (EViewOpenIn) {
|
|
33
|
+
EViewOpenIn["NEW_WINDOW"] = "NEW_WINDOW";
|
|
34
|
+
EViewOpenIn["CURRENT_WINDOW"] = "CURRENT_WINDOW";
|
|
35
|
+
EViewOpenIn["PLACEHOLDER"] = "PLACEHOLDER";
|
|
36
|
+
EViewOpenIn["MODAL_WINDOW"] = "MODAL_WINDOW";
|
|
37
|
+
EViewOpenIn["DRAWER_WINDOW"] = "DRAWER_WINDOW";
|
|
38
|
+
})(exports.EViewOpenIn || (exports.EViewOpenIn = {}));
|
|
39
|
+
exports.EDrawerPlacement = void 0;
|
|
40
|
+
(function (EDrawerPlacement) {
|
|
41
|
+
EDrawerPlacement["LEFT"] = "LEFT";
|
|
42
|
+
EDrawerPlacement["RIGHT"] = "RIGHT";
|
|
43
|
+
})(exports.EDrawerPlacement || (exports.EDrawerPlacement = {}));
|
|
44
|
+
var isExecuteScriptActionValid = function (action, _a) {
|
|
76
45
|
var _b;
|
|
77
|
-
var scripts = _a.scripts, tables = _a.tables;
|
|
78
|
-
var currentScript = scripts.get((_b = action.
|
|
46
|
+
var scripts = _a.scripts, tables = _a.tables, variables = _a.variables;
|
|
47
|
+
var currentScript = scripts.get((_b = action.scriptKey) !== null && _b !== void 0 ? _b : "");
|
|
79
48
|
if (!currentScript) {
|
|
80
49
|
return false;
|
|
81
50
|
}
|
|
82
|
-
var actionInputsMap = new Map(action.
|
|
83
|
-
if (actionInputsMap.size < currentScript.
|
|
51
|
+
var actionInputsMap = new Map(action.parameters.map(function (parameter) { return [parameter.name, parameter]; }));
|
|
52
|
+
if (actionInputsMap.size < currentScript.fields.length) {
|
|
84
53
|
return false;
|
|
85
54
|
}
|
|
86
|
-
return
|
|
87
|
-
var
|
|
55
|
+
return currentScript.fields.every(function (_a) {
|
|
56
|
+
var name = _a.name;
|
|
57
|
+
var actionInput = actionInputsMap.get(name !== null && name !== void 0 ? name : "");
|
|
88
58
|
if (!actionInput) {
|
|
89
59
|
return false;
|
|
90
60
|
}
|
|
91
|
-
|
|
92
|
-
|
|
61
|
+
if (actionInput.inputMethod === exports.EWidgetActionInputMethod.VARIABLE &&
|
|
62
|
+
!variables.has(actionInput.sourceVariable)) {
|
|
93
63
|
return false;
|
|
94
64
|
}
|
|
95
|
-
if (
|
|
65
|
+
if (actionInput.inputMethod === exports.EWidgetActionInputMethod.FORMULA && !actionInput.formula) {
|
|
96
66
|
return false;
|
|
97
67
|
}
|
|
98
|
-
if (
|
|
68
|
+
if (actionInput.inputMethod === exports.EWidgetActionInputMethod.DYNAMIC_LIST && !actionInput.formula) {
|
|
99
69
|
return false;
|
|
100
70
|
}
|
|
101
|
-
if (
|
|
102
|
-
!tables.has(
|
|
71
|
+
if (actionInput.inputMethod === exports.EWidgetActionInputMethod.COLUMN &&
|
|
72
|
+
!tables.has(actionInput.tableName)) {
|
|
103
73
|
return false;
|
|
104
74
|
}
|
|
105
75
|
return true;
|
|
@@ -124,9 +94,7 @@ var prepareValuesForSql = function (dataType, values) {
|
|
|
124
94
|
dataType === exports.ESimpleDataType.BOOLEAN
|
|
125
95
|
? values
|
|
126
96
|
: values.map(function (value) {
|
|
127
|
-
return value === null
|
|
128
|
-
? null
|
|
129
|
-
: "'".concat(escapeSingularQuotes(escapeReverseSlash(value)), "'");
|
|
97
|
+
return value === null ? null : "'".concat(escapeSingularQuotes(escapeReverseSlash(value)), "'");
|
|
130
98
|
});
|
|
131
99
|
};
|
|
132
100
|
var escapeReverseSlash = function (formula) {
|
|
@@ -136,19 +104,39 @@ var escapeSingularQuotes = function (formula) {
|
|
|
136
104
|
return formula.replaceAll("'", "\\'");
|
|
137
105
|
};
|
|
138
106
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
107
|
+
/******************************************************************************
|
|
108
|
+
Copyright (c) Microsoft Corporation.
|
|
109
|
+
|
|
110
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
111
|
+
purpose with or without fee is hereby granted.
|
|
112
|
+
|
|
113
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
114
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
115
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
116
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
117
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
118
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
119
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
120
|
+
***************************************************************************** */
|
|
121
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
var __assign = function() {
|
|
125
|
+
__assign = Object.assign || function __assign(t) {
|
|
126
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
127
|
+
s = arguments[i];
|
|
128
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
129
|
+
}
|
|
130
|
+
return t;
|
|
131
|
+
};
|
|
132
|
+
return __assign.apply(this, arguments);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
136
|
+
var e = new Error(message);
|
|
137
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
143
138
|
};
|
|
144
139
|
|
|
145
|
-
function mapVariablesToInputs(variables) {
|
|
146
|
-
return new Map(compactMap(__spreadArray([], __read(variables.values()), false), function (_a) {
|
|
147
|
-
var name = _a.name, dataType = _a.dataType, value = _a.value;
|
|
148
|
-
return !isNil(value) ? [name, { dataType: dataType, value: value }] : null;
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
140
|
exports.ECalculatorFilterMethods = void 0;
|
|
153
141
|
(function (ECalculatorFilterMethods) {
|
|
154
142
|
ECalculatorFilterMethods["EQUAL_TO"] = "EQUAL_TO";
|
|
@@ -193,6 +181,17 @@ exports.EFormulaFilterFieldKeys = void 0;
|
|
|
193
181
|
EFormulaFilterFieldKeys["lastTimeUnit"] = "lastTimeUnit";
|
|
194
182
|
EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
|
|
195
183
|
})(exports.EFormulaFilterFieldKeys || (exports.EFormulaFilterFieldKeys = {}));
|
|
184
|
+
var isFormulaFilterValue = function (value) {
|
|
185
|
+
return "filteringMethod" in value;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
189
|
+
var compactMap = function (items, f) {
|
|
190
|
+
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
191
|
+
};
|
|
192
|
+
var isNil = function (value) {
|
|
193
|
+
return value === null || value === undefined;
|
|
194
|
+
};
|
|
196
195
|
|
|
197
196
|
exports.EFormatTypes = void 0;
|
|
198
197
|
(function (EFormatTypes) {
|
|
@@ -231,7 +230,7 @@ exports.EFormattingPresets = void 0;
|
|
|
231
230
|
(function (EFormattingPresets) {
|
|
232
231
|
//Общая группа шаблонов
|
|
233
232
|
EFormattingPresets["AUTO"] = "AUTO";
|
|
234
|
-
EFormattingPresets["
|
|
233
|
+
EFormattingPresets["CUSTOM"] = "CUSTOM";
|
|
235
234
|
//Группа шаблонов для формата DATE
|
|
236
235
|
EFormattingPresets["DD/M/YYYY"] = "DD/M/YYYY";
|
|
237
236
|
EFormattingPresets["DD-MM-YYYY"] = "DD-MM-YYYY";
|
|
@@ -447,10 +446,10 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
|
447
446
|
if (!filterValue) {
|
|
448
447
|
return null;
|
|
449
448
|
}
|
|
450
|
-
if (
|
|
449
|
+
if (!isFormulaFilterValue(filterValue)) {
|
|
451
450
|
return {
|
|
452
451
|
dataType: exports.ESimpleDataType.OTHER,
|
|
453
|
-
formula: filterValue,
|
|
452
|
+
formula: filterValue.formula,
|
|
454
453
|
values: ["1"],
|
|
455
454
|
filteringMethod: formulaFilterMethods.EQUAL_TO,
|
|
456
455
|
};
|
|
@@ -475,25 +474,28 @@ exports.EWidgetFilterMode = void 0;
|
|
|
475
474
|
EWidgetFilterMode["MULTI"] = "MULTI";
|
|
476
475
|
EWidgetFilterMode["DISABLED"] = "DISABLED";
|
|
477
476
|
})(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
|
|
478
|
-
exports.
|
|
479
|
-
(function (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
EColorMode["AUTO"] = "AUTO";
|
|
484
|
-
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
477
|
+
exports.EMarkdownDisplayMode = void 0;
|
|
478
|
+
(function (EMarkdownDisplayMode) {
|
|
479
|
+
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
480
|
+
EMarkdownDisplayMode["INDICATOR"] = "INDICATOR";
|
|
481
|
+
})(exports.EMarkdownDisplayMode || (exports.EMarkdownDisplayMode = {}));
|
|
485
482
|
exports.EDisplayConditionMode = void 0;
|
|
486
483
|
(function (EDisplayConditionMode) {
|
|
487
484
|
EDisplayConditionMode["DISABLED"] = "DISABLED";
|
|
488
485
|
EDisplayConditionMode["FORMULA"] = "FORMULA";
|
|
489
486
|
EDisplayConditionMode["VARIABLE"] = "VARIABLE";
|
|
490
487
|
})(exports.EDisplayConditionMode || (exports.EDisplayConditionMode = {}));
|
|
488
|
+
exports.EFontWeight = void 0;
|
|
489
|
+
(function (EFontWeight) {
|
|
490
|
+
EFontWeight["NORMAL"] = "NORMAL";
|
|
491
|
+
EFontWeight["BOLD"] = "BOLD";
|
|
492
|
+
})(exports.EFontWeight || (exports.EFontWeight = {}));
|
|
491
493
|
|
|
492
494
|
function checkDisplayCondition(displayCondition, variables) {
|
|
493
495
|
var _a;
|
|
494
496
|
if ((displayCondition === null || displayCondition === void 0 ? void 0 : displayCondition.mode) === exports.EDisplayConditionMode.VARIABLE) {
|
|
495
|
-
var
|
|
496
|
-
var currentVariableValue =
|
|
497
|
+
var variableName = displayCondition.variableName, variableValue = displayCondition.variableValue;
|
|
498
|
+
var currentVariableValue = variableName && ((_a = variables.get(variableName)) === null || _a === void 0 ? void 0 : _a.value);
|
|
497
499
|
var isCurrentVariableMatch = Array.isArray(currentVariableValue)
|
|
498
500
|
? !!variableValue && (currentVariableValue === null || currentVariableValue === void 0 ? void 0 : currentVariableValue.includes(variableValue))
|
|
499
501
|
: currentVariableValue === variableValue;
|
|
@@ -509,17 +511,14 @@ function getDisplayConditionFormula(displayCondition) {
|
|
|
509
511
|
}
|
|
510
512
|
}
|
|
511
513
|
var replaceDisplayCondition = function (dimension, displayCondition) {
|
|
512
|
-
return isNil(displayCondition)
|
|
513
|
-
? dimension
|
|
514
|
-
: __assign(__assign({}, dimension), { displayCondition: displayCondition });
|
|
514
|
+
return isNil(displayCondition) ? dimension : __assign(__assign({}, dimension), { displayCondition: displayCondition });
|
|
515
515
|
};
|
|
516
516
|
|
|
517
517
|
var escapeSpecialCharacters = function (formula) {
|
|
518
518
|
return formula
|
|
519
519
|
.replaceAll("\\", "\\\\")
|
|
520
520
|
.replaceAll('"', '\\"')
|
|
521
|
-
.replaceAll("`", "\\`")
|
|
522
|
-
.replaceAll("-", "\\-");
|
|
521
|
+
.replaceAll("`", "\\`");
|
|
523
522
|
};
|
|
524
523
|
|
|
525
524
|
function generateColumnFormula(tableName, columnName) {
|
|
@@ -537,10 +536,7 @@ exports.EWidgetIndicatorType = void 0;
|
|
|
537
536
|
EWidgetIndicatorType["EVENT_INDICATOR"] = "EVENT_INDICATOR";
|
|
538
537
|
EWidgetIndicatorType["TRANSITION_INDICATOR"] = "TRANSITION_INDICATOR";
|
|
539
538
|
EWidgetIndicatorType["DIMENSION"] = "DIMENSION";
|
|
540
|
-
EWidgetIndicatorType["DIMENSION_HIERARCHY"] = "DIMENSION_HIERARCHY";
|
|
541
|
-
EWidgetIndicatorType["VARIABLE"] = "VARIABLE";
|
|
542
539
|
EWidgetIndicatorType["SORTING"] = "SORTING";
|
|
543
|
-
EWidgetIndicatorType["CUSTOM"] = "CUSTOM";
|
|
544
540
|
})(exports.EWidgetIndicatorType || (exports.EWidgetIndicatorType = {}));
|
|
545
541
|
exports.EDbType = void 0;
|
|
546
542
|
(function (EDbType) {
|
|
@@ -560,18 +556,8 @@ exports.ESortingValueModes = void 0;
|
|
|
560
556
|
(function (ESortingValueModes) {
|
|
561
557
|
/** Сортировка по формуле */
|
|
562
558
|
ESortingValueModes["FORMULA"] = "FORMULA";
|
|
563
|
-
/**
|
|
564
|
-
ESortingValueModes["
|
|
565
|
-
/** @deprecated Для сортировки по иерархии используется режим DIMENSION_IN_WIDGET */
|
|
566
|
-
ESortingValueModes["HIERARCHY"] = "HIERARCHY";
|
|
567
|
-
/** Сортировка по мере виджета */
|
|
568
|
-
ESortingValueModes["MEASURE_IN_WIDGET"] = "MEASURE_IN_WIDGET";
|
|
569
|
-
/** Сортировка по разрезу(в т.ч. по иерархии) виджета */
|
|
570
|
-
ESortingValueModes["DIMENSION_IN_WIDGET"] = "DIMENSION_IN_WIDGET";
|
|
571
|
-
/** Сортировка по мере отчета */
|
|
572
|
-
ESortingValueModes["IN_DASHBOARD"] = "IN_DASHBOARD";
|
|
573
|
-
/** Сортировка по мере пространства */
|
|
574
|
-
ESortingValueModes["IN_WORKSPACE"] = "IN_WORKSPACE";
|
|
559
|
+
/** Сортировка по показателю(разрезу или мере) виджета */
|
|
560
|
+
ESortingValueModes["IN_WIDGET"] = "IN_WIDGET";
|
|
575
561
|
})(exports.ESortingValueModes || (exports.ESortingValueModes = {}));
|
|
576
562
|
/** Тип показателя */
|
|
577
563
|
exports.EIndicatorType = void 0;
|
|
@@ -593,8 +579,8 @@ exports.EIndicatorType = void 0;
|
|
|
593
579
|
/** Пользовательская сортировка */
|
|
594
580
|
EIndicatorType["USER_SORTING"] = "USER_SORTING";
|
|
595
581
|
})(exports.EIndicatorType || (exports.EIndicatorType = {}));
|
|
596
|
-
function
|
|
597
|
-
return
|
|
582
|
+
function isDimensionsHierarchy(indicator) {
|
|
583
|
+
return "hierarchyDimensions" in indicator;
|
|
598
584
|
}
|
|
599
585
|
|
|
600
586
|
var _a$3;
|
|
@@ -690,11 +676,11 @@ function getMeasureFormula(_a) {
|
|
|
690
676
|
var _a$1;
|
|
691
677
|
exports.EEventMeasureTemplateNames = void 0;
|
|
692
678
|
(function (EEventMeasureTemplateNames) {
|
|
693
|
-
EEventMeasureTemplateNames["
|
|
679
|
+
EEventMeasureTemplateNames["eventsCount"] = "eventsCount";
|
|
694
680
|
EEventMeasureTemplateNames["reworksCount"] = "reworksCount";
|
|
695
681
|
})(exports.EEventMeasureTemplateNames || (exports.EEventMeasureTemplateNames = {}));
|
|
696
682
|
var eventMeasureTemplateFormulas = (_a$1 = {},
|
|
697
|
-
_a$1[exports.EEventMeasureTemplateNames.
|
|
683
|
+
_a$1[exports.EEventMeasureTemplateNames.eventsCount] = "count()",
|
|
698
684
|
_a$1[exports.EEventMeasureTemplateNames.reworksCount] = "count() - uniqExact({caseCaseIdFormula})",
|
|
699
685
|
_a$1);
|
|
700
686
|
function getEventMeasureFormula(_a, process) {
|
|
@@ -715,11 +701,11 @@ function getEventMeasureFormula(_a, process) {
|
|
|
715
701
|
var _a;
|
|
716
702
|
exports.ETransitionMeasureTemplateNames = void 0;
|
|
717
703
|
(function (ETransitionMeasureTemplateNames) {
|
|
718
|
-
ETransitionMeasureTemplateNames["
|
|
704
|
+
ETransitionMeasureTemplateNames["transitionsCount"] = "transitionsCount";
|
|
719
705
|
ETransitionMeasureTemplateNames["medianTime"] = "medianTime";
|
|
720
706
|
})(exports.ETransitionMeasureTemplateNames || (exports.ETransitionMeasureTemplateNames = {}));
|
|
721
707
|
var transitionMeasureTemplateFormulas = (_a = {},
|
|
722
|
-
_a[exports.ETransitionMeasureTemplateNames.
|
|
708
|
+
_a[exports.ETransitionMeasureTemplateNames.transitionsCount] = "count()",
|
|
723
709
|
_a[exports.ETransitionMeasureTemplateNames.medianTime] = "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))",
|
|
724
710
|
_a);
|
|
725
711
|
function getTransitionMeasureFormula(_a, process) {
|
|
@@ -737,6 +723,32 @@ function getTransitionMeasureFormula(_a, process) {
|
|
|
737
723
|
return "";
|
|
738
724
|
}
|
|
739
725
|
|
|
726
|
+
/**
|
|
727
|
+
* Регулярное выражение для поиска имени ссылки внутри формулы.
|
|
728
|
+
* Учитывает, что имя внутри формулы содержит экраны.
|
|
729
|
+
*
|
|
730
|
+
* Принцип работы:
|
|
731
|
+
* Пробовать следующие вхождения:
|
|
732
|
+
* - \\\\ - экранированный символ обратного слэша.
|
|
733
|
+
* - Иначе \\" - экранированный символ кавычки.
|
|
734
|
+
* - Иначе [^"] - любой символ кроме кавычки.
|
|
735
|
+
* Если встречается любой другой символ, то это закрывающая кавычка имени переменной.
|
|
736
|
+
*/
|
|
737
|
+
var linkNameRegExp = "(?:\\\\\\\\|\\\\\"|[^\"])+";
|
|
738
|
+
var dashboardLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"(?!\\.\"").concat(linkNameRegExp, "\")"), "g");
|
|
739
|
+
var workspaceLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"\\.\"(").concat(linkNameRegExp, ")\""), "g");
|
|
740
|
+
var parseIndicatorLink = function (formula) {
|
|
741
|
+
var dashboardMatch = formula.match(dashboardLinkRegExp.source);
|
|
742
|
+
if (dashboardMatch) {
|
|
743
|
+
return { scopeName: null, indicatorName: dashboardMatch[1] };
|
|
744
|
+
}
|
|
745
|
+
var workspaceMatch = formula.match(workspaceLinkRegExp.source);
|
|
746
|
+
if (workspaceMatch) {
|
|
747
|
+
return { scopeName: workspaceMatch[1], indicatorName: workspaceMatch[2] };
|
|
748
|
+
}
|
|
749
|
+
return null;
|
|
750
|
+
};
|
|
751
|
+
|
|
740
752
|
function mapMeasureToInput(measure, variables, addFormulas) {
|
|
741
753
|
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
742
754
|
var mainFormula = getMeasureFormula(measure);
|
|
@@ -756,9 +768,7 @@ function mapMeasureToInput(measure, variables, addFormulas) {
|
|
|
756
768
|
}
|
|
757
769
|
/** Конвертировать меры виджета во входы для вычислителя */
|
|
758
770
|
function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
759
|
-
return compactMap(measures, function (measure) {
|
|
760
|
-
return mapMeasureToInput(measure, variables, addFormulas);
|
|
761
|
-
});
|
|
771
|
+
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
762
772
|
}
|
|
763
773
|
|
|
764
774
|
function mapDimensionToInput(dimension, variables) {
|
|
@@ -779,9 +789,7 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
779
789
|
}
|
|
780
790
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
781
791
|
function mapDimensionsToInputs(dimensions, variables) {
|
|
782
|
-
return compactMap(dimensions, function (dimension) {
|
|
783
|
-
return mapDimensionToInput(dimension, variables);
|
|
784
|
-
});
|
|
792
|
+
return compactMap(dimensions, function (dimension) { return mapDimensionToInput(dimension, variables); });
|
|
785
793
|
}
|
|
786
794
|
|
|
787
795
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|
|
@@ -832,36 +840,13 @@ function mapEventMeasuresToInputs(indicators, process, variables, addFormulas) {
|
|
|
832
840
|
});
|
|
833
841
|
}
|
|
834
842
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measuresInOriginalOrder) {
|
|
843
|
-
if (sortingIndicators === void 0) { sortingIndicators = []; }
|
|
844
|
-
if (dimensionsInOriginalOrder === void 0) { dimensionsInOriginalOrder = []; }
|
|
845
|
-
if (measuresInOriginalOrder === void 0) { measuresInOriginalOrder = []; }
|
|
846
|
-
return compactMap(sortingIndicators, function (_a) {
|
|
847
|
-
var value = _a.value, direction = _a.direction;
|
|
848
|
-
if (value.mode === exports.ESortingValueModes.FORMULA ||
|
|
849
|
-
value.mode === exports.ESortingValueModes.QUANTITY ||
|
|
850
|
-
value.mode === exports.ESortingValueModes.IN_DASHBOARD ||
|
|
851
|
-
value.mode === exports.ESortingValueModes.IN_WORKSPACE) {
|
|
852
|
-
return value.formula ? { formula: value.formula, direction: direction } : undefined;
|
|
853
|
-
}
|
|
854
|
-
if (value.mode === exports.ESortingValueModes.DIMENSION_IN_WIDGET ||
|
|
855
|
-
value.mode === exports.ESortingValueModes.HIERARCHY) {
|
|
856
|
-
var dimension = dimensionsInOriginalOrder[value.index];
|
|
857
|
-
return (dimension && { formula: getDimensionFormula(dimension), direction: direction });
|
|
858
|
-
}
|
|
859
|
-
if (value.mode === exports.ESortingValueModes.MEASURE_IN_WIDGET) {
|
|
860
|
-
var measure = measuresInOriginalOrder[value.index];
|
|
861
|
-
return measure && { formula: getMeasureFormula(measure), direction: direction };
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
}
|
|
843
|
+
exports.ESortDirection = void 0;
|
|
844
|
+
(function (ESortDirection) {
|
|
845
|
+
ESortDirection["descend"] = "DESC";
|
|
846
|
+
ESortDirection["ascend"] = "ASC";
|
|
847
|
+
ESortDirection["ASC"] = "ascend";
|
|
848
|
+
ESortDirection["DESC"] = "descend";
|
|
849
|
+
})(exports.ESortDirection || (exports.ESortDirection = {}));
|
|
865
850
|
|
|
866
851
|
/**
|
|
867
852
|
* Выбрать активный разрез иерархии на основе активных фильтров.
|
|
@@ -870,9 +855,9 @@ function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measur
|
|
|
870
855
|
* Если к разрезу иерархии применяется INCLUDE-фильтр с несколькими значениями - выбираем данный разрез
|
|
871
856
|
*/
|
|
872
857
|
function selectDimensionFromHierarchy(_a, filters) {
|
|
873
|
-
var
|
|
858
|
+
var hierarchyDimensions = _a.hierarchyDimensions;
|
|
874
859
|
var _loop_1 = function (i) {
|
|
875
|
-
var dimension =
|
|
860
|
+
var dimension = hierarchyDimensions[i];
|
|
876
861
|
// todo: widgets - возможно, стоит использовать Map фильтров для быстрого поиска
|
|
877
862
|
var matchedFilter = filters.find(function (_a) {
|
|
878
863
|
var formula = _a.formula, filteringMethod = _a.filteringMethod;
|
|
@@ -882,25 +867,123 @@ function selectDimensionFromHierarchy(_a, filters) {
|
|
|
882
867
|
if (!matchedFilter) {
|
|
883
868
|
return "continue";
|
|
884
869
|
}
|
|
885
|
-
var selectionIndex = matchedFilter.values.length > 1
|
|
886
|
-
|
|
887
|
-
: Math.min(i + 1, dimensions.length - 1);
|
|
888
|
-
return { value: dimensions[selectionIndex] };
|
|
870
|
+
var selectionIndex = matchedFilter.values.length > 1 ? i : Math.min(i + 1, hierarchyDimensions.length - 1);
|
|
871
|
+
return { value: hierarchyDimensions[selectionIndex] };
|
|
889
872
|
};
|
|
890
|
-
for (var i =
|
|
873
|
+
for (var i = hierarchyDimensions.length - 1; i >= 0; i--) {
|
|
891
874
|
var state_1 = _loop_1(i);
|
|
892
875
|
if (typeof state_1 === "object")
|
|
893
876
|
return state_1.value;
|
|
894
877
|
}
|
|
895
|
-
return
|
|
878
|
+
return hierarchyDimensions[0];
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
var getDefaultSortOrder = function (dimensions, measures) {
|
|
882
|
+
/** Если есть условие отображения, то не делаем авто-сортировку */
|
|
883
|
+
if (dimensions.some(function (dimension) {
|
|
884
|
+
return dimension.displayCondition &&
|
|
885
|
+
dimension.displayCondition.mode !== exports.EDisplayConditionMode.DISABLED;
|
|
886
|
+
})) {
|
|
887
|
+
return [];
|
|
888
|
+
}
|
|
889
|
+
/** Если есть временной разрез, то авто-сортировка по первому такому разрезу (по возрастанию) */
|
|
890
|
+
var timeDimension = dimensions.find(function (dimension) {
|
|
891
|
+
return dimension.format &&
|
|
892
|
+
[
|
|
893
|
+
exports.EFormatTypes.DATE,
|
|
894
|
+
exports.EFormatTypes.MONTH,
|
|
895
|
+
exports.EFormatTypes.DATETIME,
|
|
896
|
+
exports.EFormatTypes.DAY_OF_WEEK,
|
|
897
|
+
exports.EFormatTypes.HOUR,
|
|
898
|
+
exports.EFormatTypes.MONTH_YEAR,
|
|
899
|
+
exports.EFormatTypes.YEAR,
|
|
900
|
+
exports.EFormatTypes.QUARTER,
|
|
901
|
+
exports.EFormatTypes.QUARTER_YEAR,
|
|
902
|
+
exports.EFormatTypes.DAY_OF_MONTH,
|
|
903
|
+
exports.EFormatTypes.WEEK,
|
|
904
|
+
].includes(dimension.format);
|
|
905
|
+
});
|
|
906
|
+
if (timeDimension) {
|
|
907
|
+
return [{ formula: getDimensionFormula(timeDimension), direction: exports.ESortDirection.ascend }];
|
|
908
|
+
}
|
|
909
|
+
if (measures.length > 0) {
|
|
910
|
+
var firstMeasure = measures[0];
|
|
911
|
+
if (firstMeasure) {
|
|
912
|
+
return [
|
|
913
|
+
{
|
|
914
|
+
direction: exports.ESortDirection.descend,
|
|
915
|
+
formula: getMeasureFormula(firstMeasure),
|
|
916
|
+
},
|
|
917
|
+
];
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return [];
|
|
921
|
+
};
|
|
922
|
+
function mapSortingToInputs(_a) {
|
|
923
|
+
var _b;
|
|
924
|
+
var settings = _a.settings, variables = _a.variables, filters = _a.filters, getIndicatorType = _a.getIndicatorType, _c = _a.withDefaultSortOrder, withDefaultSortOrder = _c === void 0 ? true : _c, _d = _a.sortableIndicatorsKeys, sortableIndicatorsKeys = _d === void 0 ? [] : _d;
|
|
925
|
+
var sortOrder = compactMap((_b = settings["sorting"]) !== null && _b !== void 0 ? _b : [], function (_a) {
|
|
926
|
+
var _b;
|
|
927
|
+
var direction = _a.direction, value = _a.value;
|
|
928
|
+
if (value.mode === exports.ESortingValueModes.FORMULA) {
|
|
929
|
+
return value.formula ? { formula: value.formula, direction: direction } : undefined;
|
|
930
|
+
}
|
|
931
|
+
var indicatorsGroup = settings[value.group];
|
|
932
|
+
var indicator = indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup[value.index];
|
|
933
|
+
if (!indicator) {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
if (getIndicatorType(value.group, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
937
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
938
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
939
|
+
: indicator;
|
|
940
|
+
var formula = activeDimensions && getDimensionFormula(activeDimensions);
|
|
941
|
+
if (!formula || !checkDisplayCondition(indicator.displayCondition, variables)) {
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
return {
|
|
945
|
+
formula: formula,
|
|
946
|
+
direction: direction,
|
|
947
|
+
displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === exports.EDisplayConditionMode.FORMULA
|
|
948
|
+
? indicator.displayCondition.formula
|
|
949
|
+
: undefined,
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
return {
|
|
953
|
+
formula: getMeasureFormula(indicator),
|
|
954
|
+
direction: direction,
|
|
955
|
+
};
|
|
956
|
+
});
|
|
957
|
+
if (sortOrder.length > 0) {
|
|
958
|
+
return sortOrder;
|
|
959
|
+
}
|
|
960
|
+
if (sortableIndicatorsKeys.length === 0 || withDefaultSortOrder === false) {
|
|
961
|
+
return [];
|
|
962
|
+
}
|
|
963
|
+
var dimensions = [];
|
|
964
|
+
var measures = [];
|
|
965
|
+
sortableIndicatorsKeys.forEach(function (key) {
|
|
966
|
+
var indicatorsGroup = settings[key];
|
|
967
|
+
indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup.forEach(function (indicator) {
|
|
968
|
+
if (getIndicatorType(key, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
969
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
970
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
971
|
+
: indicator;
|
|
972
|
+
activeDimensions && dimensions.push(activeDimensions);
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
measures.push(indicator);
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
});
|
|
979
|
+
return getDefaultSortOrder(dimensions, measures);
|
|
896
980
|
}
|
|
897
981
|
|
|
898
982
|
var replaceHierarchiesWithDimensions = function (dimensions, filters) {
|
|
899
983
|
return compactMap(dimensions, function (indicator) {
|
|
900
|
-
if (
|
|
984
|
+
if (isDimensionsHierarchy(indicator)) {
|
|
901
985
|
var selectedDimension = selectDimensionFromHierarchy(indicator, filters);
|
|
902
|
-
return (selectedDimension &&
|
|
903
|
-
replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
986
|
+
return (selectedDimension && replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
904
987
|
}
|
|
905
988
|
return indicator;
|
|
906
989
|
});
|
|
@@ -917,11 +1000,19 @@ function bindContentWithIndicator(outputs, indicator) {
|
|
|
917
1000
|
* Массив объектов, каждый из которых содержит показатель и его контент
|
|
918
1001
|
*/
|
|
919
1002
|
function bindContentsWithIndicators(outputs, indicators) {
|
|
920
|
-
return compactMap(indicators, function (indicator) {
|
|
921
|
-
return bindContentWithIndicator(outputs, indicator);
|
|
922
|
-
});
|
|
1003
|
+
return compactMap(indicators, function (indicator) { return bindContentWithIndicator(outputs, indicator); });
|
|
923
1004
|
}
|
|
924
1005
|
|
|
1006
|
+
/** Удалить из строки символы экранирования */
|
|
1007
|
+
function unescapeSpecialCharacters(str) {
|
|
1008
|
+
return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
exports.EUnitMode = void 0;
|
|
1012
|
+
(function (EUnitMode) {
|
|
1013
|
+
EUnitMode["PIXEL"] = "PIXEL";
|
|
1014
|
+
EUnitMode["PERCENT"] = "PERCENT";
|
|
1015
|
+
})(exports.EUnitMode || (exports.EUnitMode = {}));
|
|
925
1016
|
exports.EControlType = void 0;
|
|
926
1017
|
(function (EControlType) {
|
|
927
1018
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -935,22 +1026,28 @@ exports.EControlType = void 0;
|
|
|
935
1026
|
EControlType["typedFormula"] = "typedFormula";
|
|
936
1027
|
EControlType["inputRange"] = "inputRange";
|
|
937
1028
|
EControlType["colorPicker"] = "colorPicker";
|
|
938
|
-
/** @deprecated - удалится в ближайшее время */
|
|
939
|
-
EControlType["filterMode"] = "filterMode";
|
|
940
1029
|
EControlType["displayCondition"] = "displayCondition";
|
|
941
1030
|
EControlType["eventsColor"] = "eventsColor";
|
|
942
1031
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
943
1032
|
EControlType["filter"] = "filter";
|
|
944
1033
|
EControlType["actionOnClick"] = "actionOnClick";
|
|
1034
|
+
EControlType["eventsPicker"] = "eventsPicker";
|
|
1035
|
+
EControlType["size"] = "size";
|
|
945
1036
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
946
1037
|
|
|
947
|
-
exports.
|
|
948
|
-
(function (
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1038
|
+
exports.ESelectOptionTypes = void 0;
|
|
1039
|
+
(function (ESelectOptionTypes) {
|
|
1040
|
+
ESelectOptionTypes["DIVIDER"] = "DIVIDER";
|
|
1041
|
+
ESelectOptionTypes["SYSTEM"] = "SYSTEM";
|
|
1042
|
+
ESelectOptionTypes["GROUP"] = "GROUP";
|
|
1043
|
+
ESelectOptionTypes["BRANCH"] = "BRANCH";
|
|
1044
|
+
ESelectOptionTypes["LEAF"] = "LEAF";
|
|
1045
|
+
})(exports.ESelectOptionTypes || (exports.ESelectOptionTypes = {}));
|
|
1046
|
+
exports.ECustomSelectTemplates = void 0;
|
|
1047
|
+
(function (ECustomSelectTemplates) {
|
|
1048
|
+
ECustomSelectTemplates["FORMULA"] = "FORMULA";
|
|
1049
|
+
ECustomSelectTemplates["DIMENSION_GROUPS"] = "DIMENSION_GROUPS";
|
|
1050
|
+
})(exports.ECustomSelectTemplates || (exports.ECustomSelectTemplates = {}));
|
|
954
1051
|
|
|
955
1052
|
var findFilterByFormula = function (filters, formula) {
|
|
956
1053
|
var _a;
|
|
@@ -1046,17 +1143,59 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1046
1143
|
return localization.getLocalized(locObj, props);
|
|
1047
1144
|
};
|
|
1048
1145
|
|
|
1049
|
-
|
|
1146
|
+
exports.EColorMode = void 0;
|
|
1147
|
+
(function (EColorMode) {
|
|
1148
|
+
/** Окрашивание отключено */
|
|
1149
|
+
EColorMode["DISABLED"] = "DISABLED";
|
|
1150
|
+
/** Цвет каждого значения вычисляется по формуле */
|
|
1151
|
+
EColorMode["FORMULA"] = "FORMULA";
|
|
1152
|
+
/** Один цвет для всех значений */
|
|
1153
|
+
EColorMode["BASE"] = "BASE";
|
|
1154
|
+
/** Окрашивание каждого значения по градиенту относительно минимального и максимального значений */
|
|
1155
|
+
EColorMode["GRADIENT"] = "GRADIENT";
|
|
1156
|
+
/** Использовать автоматический цвет: по умолчанию определяется порядковым номером показателя */
|
|
1157
|
+
EColorMode["AUTO"] = "AUTO";
|
|
1158
|
+
/** Использовать цвет из правила отображения (в правиле отображения рекурсивно определен цвет) */
|
|
1159
|
+
EColorMode["RULE"] = "RULE";
|
|
1160
|
+
/** Задать цвет конкретным значениям разреза */
|
|
1161
|
+
EColorMode["VALUES"] = "VALUES";
|
|
1162
|
+
/** Задать цвет конкретным значениям общего разреза. Режим используется только для настроек правила отображения */
|
|
1163
|
+
EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
|
|
1164
|
+
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
1165
|
+
var getRuleColor = function (ruleFormula, globalContext) {
|
|
1166
|
+
var _a, _b;
|
|
1167
|
+
var link = parseIndicatorLink(ruleFormula);
|
|
1168
|
+
if (!link) {
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
var _c = link.scopeName, scopeName = _c === void 0 ? null : _c, ruleName = link.indicatorName;
|
|
1172
|
+
var rulesByScope = isNil(scopeName)
|
|
1173
|
+
? globalContext.reportDisplayRules
|
|
1174
|
+
: (_a = globalContext.workspaceDisplayRules) === null || _a === void 0 ? void 0 : _a.get(scopeName);
|
|
1175
|
+
return (_b = rulesByScope === null || rulesByScope === void 0 ? void 0 : rulesByScope.get(ruleName)) === null || _b === void 0 ? void 0 : _b.color;
|
|
1176
|
+
};
|
|
1177
|
+
var isValidColor = function (color, globalContext) {
|
|
1178
|
+
if (color.mode === exports.EColorMode.RULE) {
|
|
1179
|
+
return !color.formula || Boolean(getRuleColor(color.formula, globalContext));
|
|
1180
|
+
}
|
|
1181
|
+
if (color.mode === exports.EColorMode.VALUES) {
|
|
1182
|
+
return color.items.every(function (item) { return isValidColor(item.color, globalContext); });
|
|
1183
|
+
}
|
|
1184
|
+
return true;
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
Object.defineProperty(exports, "ELanguages", {
|
|
1050
1188
|
enumerable: true,
|
|
1051
1189
|
get: function () { return localization$1.ELanguages; }
|
|
1052
1190
|
});
|
|
1053
|
-
Object.defineProperty(exports,
|
|
1191
|
+
Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
1054
1192
|
enumerable: true,
|
|
1055
1193
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
1056
1194
|
});
|
|
1057
1195
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
1058
1196
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|
|
1059
1197
|
exports.checkDisplayCondition = checkDisplayCondition;
|
|
1198
|
+
exports.dashboardLinkRegExp = dashboardLinkRegExp;
|
|
1060
1199
|
exports.dimensionTemplateFormulas = dimensionTemplateFormulas;
|
|
1061
1200
|
exports.escapeSpecialCharacters = escapeSpecialCharacters;
|
|
1062
1201
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
@@ -1068,9 +1207,13 @@ exports.getDisplayConditionFormula = getDisplayConditionFormula;
|
|
|
1068
1207
|
exports.getEventMeasureFormula = getEventMeasureFormula;
|
|
1069
1208
|
exports.getLocalizedText = getLocalizedText;
|
|
1070
1209
|
exports.getMeasureFormula = getMeasureFormula;
|
|
1210
|
+
exports.getRuleColor = getRuleColor;
|
|
1071
1211
|
exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
|
|
1072
|
-
exports.
|
|
1073
|
-
exports.
|
|
1212
|
+
exports.isDimensionsHierarchy = isDimensionsHierarchy;
|
|
1213
|
+
exports.isExecuteScriptActionValid = isExecuteScriptActionValid;
|
|
1214
|
+
exports.isFormulaFilterValue = isFormulaFilterValue;
|
|
1215
|
+
exports.isValidColor = isValidColor;
|
|
1216
|
+
exports.linkNameRegExp = linkNameRegExp;
|
|
1074
1217
|
exports.mapDimensionsToInputs = mapDimensionsToInputs;
|
|
1075
1218
|
exports.mapEventMeasuresToInputs = mapEventMeasuresToInputs;
|
|
1076
1219
|
exports.mapFormulaFilterToCalculatorInput = mapFormulaFilterToCalculatorInput;
|
|
@@ -1078,14 +1221,16 @@ exports.mapFormulaFiltersToInputs = mapFormulaFiltersToInputs;
|
|
|
1078
1221
|
exports.mapMeasuresToInputs = mapMeasuresToInputs;
|
|
1079
1222
|
exports.mapSortingToInputs = mapSortingToInputs;
|
|
1080
1223
|
exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
|
|
1081
|
-
exports.mapVariablesToInputs = mapVariablesToInputs;
|
|
1082
1224
|
exports.measureTemplateFormulas = measureTemplateFormulas;
|
|
1225
|
+
exports.parseIndicatorLink = parseIndicatorLink;
|
|
1083
1226
|
exports.prepareValuesForSql = prepareValuesForSql;
|
|
1084
1227
|
exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
1085
1228
|
exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
1086
1229
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
1087
1230
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
1088
1231
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|
|
1232
|
+
exports.unescapeSpecialCharacters = unescapeSpecialCharacters;
|
|
1089
1233
|
exports.updateDefaultModeSelection = updateDefaultModeSelection;
|
|
1090
1234
|
exports.updateMultiModeSelection = updateMultiModeSelection;
|
|
1091
1235
|
exports.updateSingleModeSelection = updateSingleModeSelection;
|
|
1236
|
+
exports.workspaceLinkRegExp = workspaceLinkRegExp;
|